sqllogictest
Artifact Content
Not logged in

Artifact 5d2e63b70f38770223699f0ccbbd77ed89285f63:


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)

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

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

query I rowsort
SELECT DISTINCT - 42 AS col0 FROM tab2
----
-42

query I rowsort
SELECT - + 59 * col0 AS col0 FROM tab2 AS cor0
----
-413
-4602
-4661

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4
SELECT DISTINCT - + CAST( NULL AS DECIMAL ) FROM tab2, tab0, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4
SELECT DISTINCT - + CAST ( NULL AS REAL ) FROM tab2, tab0, tab1 AS cor0
----
NULL

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

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

skipif mysql # not compatible
query I rowsort label-6
SELECT ( col0 ) + - CAST ( - col2 AS INTEGER ) FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - 81 * - col2 FROM tab1 AS cor0
----
4374
4617
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-8
SELECT DISTINCT 73 * + cor0.col0 + cor0.col2 * 69 DIV col1 AS col0 FROM tab2 AS cor0
----
571
5724
5921

skipif mysql # not compatible
query I rowsort label-8
SELECT DISTINCT 73 * + cor0.col0 + cor0.col2 * 69 / col1 AS col0 FROM tab2 AS cor0
----
571
5724
5921

query I rowsort
SELECT ALL col2 * col2 + col1 * cor0.col0 * cor0.col1 FROM tab1 cor0
----
22736
4944
9649

query I rowsort
SELECT DISTINCT - col2 * - col0 + col0 * - col1 * col1 AS col1 FROM tab1 AS cor0
----
-1866
-2752
-5840

query I rowsort
SELECT + - 89 * col2 * col2 AS col1 FROM tab1 AS cor0
----
-259524
-289161
-820224

query I rowsort
SELECT - - 29 AS col1 FROM tab1 AS cor0
----
29
29
29

query I rowsort
SELECT + 75 * + col0 * ( col1 ) FROM tab2 AS cor0
----
100725
16275
345150

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-15
SELECT - col1 DIV - col1 - col1 FROM tab0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-15
SELECT - col1 / - col1 - col1 FROM tab0
----
-85
-90
-96

query I rowsort
SELECT DISTINCT + 5 + + col1 * + 62 * ( col2 ) FROM tab2 AS cor0
----
40057
51899
95113

query I rowsort
SELECT ALL - col1 + + cor0.col1 * + col2 AS col0 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT - + 2 * - col0 * ( 97 ) - col0 * 62 AS col2 FROM tab0 AS cor0
----
11748
3168
4620

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * 87 + 19 * - cor0.col1 + 14 col2 FROM tab1 AS cor0
----
4218
4783
8119

query I rowsort
SELECT ALL - col1 + + 63 AS col0 FROM tab0 AS cor0
----
-23
-28
-34

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + 49 col0 FROM tab1 AS cor0
----
113
129
52

query I rowsort
SELECT DISTINCT - col0 * + 12 + col0 AS col2 FROM tab0 cor0
----
-264
-385
-979

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-26
SELECT - ( + 90 ) + cor1.col0 DIV 90 AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

skipif mysql # not compatible
query I rowsort label-26
SELECT - ( + 90 ) + cor1.col0 / 90 AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

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

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

skipif mysql # not compatible
query I rowsort label-28
SELECT ALL + 26 / col1 FROM tab0
----
0
0
0

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 80 ) * + cor0.col2 col0 FROM tab0 AS cor0
----
2640
6560
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + col0 * + col2 * + col2 col2 FROM tab2 AS cor0
----
114038
5076
52702

query I rowsort
SELECT ALL + 11 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

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

skipif mysql # not compatible
query I rowsort label-33
SELECT DISTINCT col0 * + CAST ( - col0 * col1 AS INTEGER ) AS col1 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT - col1 * 57 + - col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1550
1239
374

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-39
SELECT + 35 / col1 + - cor0.col1 AS col2 FROM tab2 cor0
----
-15
-30
-59

query I rowsort
SELECT col1 * 38 - - col0 AS col2 FROM tab2
----
1185
2320
725

onlyif mysql # use DIV operator for integer division
query I rowsort label-41
SELECT col1 * col2 + - col0 DIV - col2 AS col2 FROM tab1 AS cor0
----
1248
1404
571

skipif mysql # not compatible
query I rowsort label-41
SELECT col1 * col2 + - col0 / - col2 AS col2 FROM tab1 AS cor0
----
1248
1404
571

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 + + col2 col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT + col0 * - cor0.col2 * col2 + col0 * cor0.col0 FROM tab2 cor0
----
-107835
-46644
-5054

query I rowsort
SELECT + col2 * - col0 + col2 * - col2 FROM tab1 AS cor0
----
-16896
-3078
-6897

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-51
SELECT ALL col0 * col2 + col2 DIV col1 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-51
SELECT ALL col0 * col2 + col2 / col1 FROM tab0 AS cor0
----
35
7298
792

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

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

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

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

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

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

query I rowsort
SELECT ALL col0 + - col2 + col2 * + col2 AS col0 FROM tab0
----
1080
35
6731

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 + col0 col0 FROM tab1 AS cor0
----
121
176
57

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-64
SELECT DISTINCT 69 + + col1 DIV col0 - col2 AS col1 FROM tab1 AS cor0
----
-27
12
23

skipif mysql # not compatible
query I rowsort label-64
SELECT DISTINCT 69 + + col1 / col0 - col2 AS col1 FROM tab1 AS cor0
----
-27
12
23

query I rowsort
SELECT - col2 * 42 + col1 FROM tab2
----
-1033
-1103
-1579

query I rowsort
SELECT ALL - ( - 94 ) AS col0 FROM tab2
----
94
94
94

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

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

query I rowsort
SELECT ALL col2 - col0 * + col0 * col2 FROM tab0
----
-1224
-18975
-649440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 59 * col0 + - col0 col1 FROM tab2 AS cor0
----
406
4524
4582

query I rowsort
SELECT ALL + - 3 - col2 FROM tab0 cor0
----
-36
-4
-85

query I rowsort
SELECT DISTINCT - - 42 + - col1 AS col2 FROM tab0 AS cor0
----
-44
-49
-55

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

query I rowsort
SELECT ALL + 74 * + col1 FROM tab1
----
1924
740
962

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-76
SELECT - col0 / - col0 col0 FROM tab0
----
1
1
1

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

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

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

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

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

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL NOT BETWEEN col0 * col2 - col0 / + col1 AND NULL
----

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col1 * col0 col0 FROM tab2
----
1264
210
4524

query I rowsort
SELECT col2 * - col2 + + col2 * col0 * col0 AS col2 FROM tab0
----
1224
17919
642798

onlyif mysql # use DIV operator for integer division
query I rowsort label-86
SELECT DISTINCT - col2 + tab1.col2 * col2 DIV col0 FROM tab1
----
-7
19
918

skipif mysql # not compatible
query I rowsort label-86
SELECT DISTINCT - col2 + tab1.col2 * col2 / col0 FROM tab1
----
-7
19
918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col1 * col2 col1 FROM tab1
----
1344
1458
627

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

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT ( col1 + col1 ) IN ( + tab2.col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-92
SELECT col0 * - tab0.col0 + + col2 * col2 DIV + col1 AS col1 FROM tab0
----
-1225
-564
-7848

skipif mysql # not compatible
query I rowsort label-92
SELECT col0 * - tab0.col0 + + col2 * col2 / + col1 AS col1 FROM tab0
----
-1225
-564
-7848

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT tab2.col0 * - col1 IN ( + col2 / + col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

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

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL > col0 + col0
----

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab2 WHERE NULL < col1
----

query I rowsort
SELECT - col2 * col0 + col2 + cor0.col1 AS col1 FROM tab0 AS cor0
----
-673
-7125
63

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

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

query I rowsort
SELECT + col1 * col0 + col0 + col2 AS col1 FROM tab0 AS cor0
----
2121
3431
8270

onlyif mysql # use DIV operator for integer division
query I rowsort label-101
SELECT - - col2 + col2 + col0 DIV + cor0.col2 FROM tab0 AS cor0
----
165
37
66

skipif mysql # not compatible
query I rowsort label-101
SELECT - - col2 + col2 + col0 / + cor0.col2 FROM tab0 AS cor0
----
165
37
66

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

query I rowsort
SELECT + col2 * col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
26136
35
598436

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

skipif mysql # not compatible
query I rowsort label-104
SELECT col0 + + col1 / col0 + + col2 AS col1 FROM tab2 AS cor0
----
104
117
38

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

query I rowsort
SELECT ALL - + 26 + cor0.col2 FROM tab0 cor0
----
-25
56
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 + - col1 * - ( + col0 ) col0 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT 27 * - col0 + 62 AS col2 FROM tab0 AS cor0
----
-2341
-586
-883

query I rowsort
SELECT + ( 36 ) AS col0 FROM tab0, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to 4d1892e880125dc90345721151acb22c

onlyif mysql # use DIV operator for integer division
query I rowsort label-110
SELECT DISTINCT + 2 DIV col1 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-110
SELECT DISTINCT + 2 / col1 FROM tab2
----
0

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

query I rowsort
SELECT DISTINCT - tab2.col1 * ( col1 + col2 ) FROM tab2
----
-1798
-5015
-935

query I rowsort
SELECT + 20 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT DISTINCT - 4 * col1 + - col1 AS col2 FROM tab0 AS cor0
----
-430
-455
-485

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

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

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

query I rowsort
SELECT - 92 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

query I rowsort
SELECT + col2 - + 20 FROM tab2
----
18
6
7

query I rowsort
SELECT + ( col1 ) + tab0.col2 FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 62 + col0 col0 FROM tab2
----
140
141
69

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-122
SELECT CAST ( - col0 AS INTEGER ) * + col1 + col1 col2 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT + cor0.col1 * 83 AS col0 FROM tab0 AS cor0
----
7138
7553
8051

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

query I rowsort
SELECT + + ( + 21 ) * cor0.col0 AS col2 FROM tab0 AS cor0
----
1869
504
735

onlyif mysql # use DIV operator for integer division
query I rowsort label-126
SELECT DISTINCT 95 + - 8 DIV col1 FROM tab0 AS cor0
----
95

skipif mysql # not compatible
query I rowsort label-126
SELECT DISTINCT 95 + - 8 / col1 FROM tab0 AS cor0
----
95

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

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

query I rowsort
SELECT - 64 * col1 AS col2 FROM tab1
----
-1664
-640
-832

query I rowsort
SELECT tab0.col1 * - col0 + + col0 + col2 FROM tab0
----
-2007
-3359
-7928

query I rowsort
SELECT DISTINCT 13 - + col1 * - col0 FROM tab0
----
2077
3408
8112

query I rowsort
SELECT + + 4 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

query I rowsort
SELECT 32 * cor0.col2 + 67 FROM tab0 AS cor0
----
1123
2691
99

query I rowsort
SELECT - + col0 + - col1 - 44 FROM tab2 AS cor0
----
-140
-181
-82

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-136
SELECT DISTINCT cor0.col0 * - ( + 76 ) + - col0 DIV - col1 FROM tab2 AS cor0
----
-532
-5927
-6000

skipif mysql # not compatible
query I rowsort label-136
SELECT DISTINCT cor0.col0 * - ( + 76 ) + - col0 / - col1 FROM tab2 AS cor0
----
-532
-5927
-6000

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

query I rowsort
SELECT + - col1 * - 68 FROM tab2 AS cor0
----
1156
2108
4012

query I rowsort
SELECT - col2 * + col2 + 59 * - col2 FROM tab1 AS cor0
----
-14880
-6102
-6612

query I rowsort
SELECT - col2 + + ( + 8 * col0 + col1 ) AS col0 FROM tab2 AS cor0
----
60
611
657

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

skipif mysql # not compatible
query I rowsort label-141
SELECT DISTINCT 74 / + col1 FROM tab0
----
0

query I rowsort
SELECT + 23 * col2 AS col2 FROM tab2
----
598
621
874

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

query I rowsort
SELECT ALL - col2 + ( col0 + col0 ) FROM tab1 AS cor0
----
-48
64
71

query I rowsort
SELECT - col2 * - col0 + col0 * + col0 FROM tab2 AS cor0
----
238
8112
9243

query I rowsort
SELECT DISTINCT - cor0.col0 + - tab1.col1 * 39 FROM tab1, tab2 AS cor0
----
9 values hashing to beca16718af0b0723de3edbb8b6fbfeb

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

query I rowsort
SELECT col1 * tab1.col0 * - col1 - col0 * col0 FROM tab1
----
-10496
-19920
-2037

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 63 + col0 * + 7 col2 FROM tab2
----
112
609
616

query I rowsort
SELECT 19 + col0 AS col1 FROM tab1
----
22
83
99

query I rowsort
SELECT 92 * col2 AS col0 FROM tab1 cor0
----
4968
5244
8832

query I rowsort
SELECT ALL 64 * + col2 + ( cor0.col0 ) FROM tab1 cor0
----
3459
3712
6224

query I rowsort
SELECT ALL + col0 * + col1 * cor0.col0 + - cor0.col1 * col1 FROM tab1 AS cor0
----
-442
40860
83031

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col2 ) + 26 + - cor0.col1 col0 FROM tab2 AS cor0
----
-7
22
47

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-156
SELECT + col1 * - cor0.col1 + + 50 DIV col1 FROM tab2 AS cor0
----
-287
-3481
-960

skipif mysql # not compatible
query I rowsort label-156
SELECT + col1 * - cor0.col1 + + 50 / col1 FROM tab2 AS cor0
----
-287
-3481
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-157
SELECT ALL + col2 + 17 * 65 + + cor0.col1 DIV + col1 AS col0 FROM tab1 AS cor0
----
1160
1163
1202

skipif mysql # not compatible
query I rowsort label-157
SELECT ALL + col2 + 17 * 65 + + cor0.col1 / + col1 AS col0 FROM tab1 AS cor0
----
1160
1163
1202

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

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

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

query I rowsort
SELECT DISTINCT - col0 * 90 + col0 FROM tab1 AS cor0
----
-267
-5696
-7120

query I rowsort
SELECT ALL col1 * - ( + col0 ) + + col0 + col2 * col0 FROM tab2 cor0
----
-21
-2496
1738

query I rowsort
SELECT + cor0.col2 + + 3 FROM tab1 AS cor0
----
57
60
99

query I rowsort
SELECT ALL cor0.col0 * 68 * ( cor0.col1 ) FROM tab1, tab1 AS cor0
----
9 values hashing to d9bac7b99ca629ca97a1e831d32d263f

query I rowsort
SELECT ALL - + col2 * 66 + - col1 FROM tab1 AS cor0
----
-3590
-3772
-6349

onlyif mysql # use DIV operator for integer division
query I rowsort label-165
SELECT ALL col1 + 29 DIV col1 col0 FROM tab2 AS cor0
----
18
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-165
SELECT ALL col1 + 29 / col1 col0 FROM tab2 AS cor0
----
18
31
59

query I rowsort
SELECT col0 * - 91 + - 19 AS col0 FROM tab2 AS cor0
----
-656
-7117
-7208

query I rowsort
SELECT DISTINCT ( 62 ) * col2 + ( - cor0.col1 + col1 ) FROM tab0 AS cor0
----
2046
5084
62

query I rowsort
SELECT ALL - + col0 * col0 * col1 - 6 FROM tab1 AS cor0
----
-240
-40966
-83206

query I rowsort
SELECT DISTINCT + + 7 AS col1 FROM tab2 AS cor0
----
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( 72 ) * - col1 col1 FROM tab0 AS cor0
----
6192
6552
6984

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

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

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

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

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

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

query I rowsort
SELECT ALL + 19 FROM tab0, tab0 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

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

query I rowsort
SELECT ( + col2 ) + col1 * col1 FROM tab0 cor0
----
7429
8363
9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 28 col1 FROM tab0 AS cor0
----
-2492
-672
-980

query I rowsort
SELECT - ( 49 ) * - col2 FROM tab0 AS cor0
----
1617
4018
49

query I rowsort
SELECT DISTINCT - ( col1 ) * cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT + + 50 * ( - col1 ) + 9 AS col1 FROM tab1 AS cor0
----
-1291
-491
-641

onlyif mysql # use DIV operator for integer division
query I rowsort label-183
SELECT DISTINCT - 62 * col1 DIV - col2 FROM tab0 AS cor0
----
161
6014
68

skipif mysql # not compatible
query I rowsort label-183
SELECT DISTINCT - 62 * col1 / - col2 FROM tab0 AS cor0
----
161
6014
68

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

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

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 + 72 AS col0 FROM tab2 cor0
----
121
6156
6313

query I rowsort
SELECT ALL + 8 - col0 FROM tab1 AS cor0
----
-56
-72
5

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

query I rowsort
SELECT - 88 + - col1 FROM tab1
----
-101
-114
-98

skipif mysql # not compatible
query I rowsort
SELECT + col2 + - col1 * + CAST ( - 64 AS REAL ) FROM tab1 cor0
----
1718
697
928

query I rowsort
SELECT 24 * - col1 AS col0 FROM tab1 cor0
----
-240
-312
-624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 74 * - col0 col2 FROM tab0 cor0
----
-1776
-2590
-6586

onlyif mysql # use DIV operator for integer division
query I rowsort label-193
SELECT ALL + + 75 DIV + col0 FROM tab2 AS cor0
----
0
0
10

skipif mysql # not compatible
query I rowsort label-193
SELECT ALL + + 75 / + col0 FROM tab2 AS cor0
----
0
0
10

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

query I rowsort
SELECT DISTINCT - - 36 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
1116
2124
612

query I rowsort
SELECT 49 + col2 AS col1 FROM tab2 AS cor0
----
75
76
87

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

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

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

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

query I rowsort
SELECT DISTINCT col1 + - col1 * ( - col1 ) + - col0 * ( cor0.col0 ) FROM tab0 AS cor0
----
451
6906
8281

onlyif mysql # use DIV operator for integer division
query I rowsort label-201
SELECT ALL + 70 * - col2 DIV + col2 - - col0 * - cor0.col1 FROM tab0 AS cor0
----
-2134
-3465
-8169

skipif mysql # not compatible
query I rowsort label-201
SELECT ALL + 70 * - col2 / + col2 - - col0 * - cor0.col1 FROM tab0 AS cor0
----
-2134
-3465
-8169

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

query I rowsort
SELECT + - 21 * col2 FROM tab0 AS cor0
----
-1722
-21
-693

query I rowsort
SELECT DISTINCT col2 * col0 - ( - 23 + + cor0.col2 ) AS col0 FROM tab2 AS cor0
----
185
2025
2987

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-206
SELECT col0 + ( col1 ) DIV + col0 + - 99 AS col0 FROM tab2
----
-20
-21
-88

skipif mysql # not compatible
query I rowsort label-206
SELECT col0 + ( col1 ) / + col0 + - 99 AS col0 FROM tab2
----
-20
-21
-88

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

skipif mysql # not compatible
query I rowsort label-207
SELECT + - CAST ( ( col1 ) AS INTEGER ) * col0 + + col1 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-208
SELECT ALL col1 + tab0.col0 DIV - col2 + - col1 * - col1 * - tab0.col0 FROM tab0
----
-177418
-329253
-736919

skipif mysql # not compatible
query I rowsort label-208
SELECT ALL col1 + tab0.col0 / - col2 + - col1 * - col1 * - tab0.col0 FROM tab0
----
-177418
-329253
-736919

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

skipif mysql # not compatible
query I rowsort label-209
SELECT - cor0.col1 / 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-210
SELECT DISTINCT + tab0.col2 + + col0 * col1 + + col1 * - CAST( NULL AS SIGNED ) FROM tab0
----
NULL

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

query I rowsort
SELECT DISTINCT + cor0.col2 + 79 AS col2 FROM tab2 cor0
----
105
106
117

query I rowsort
SELECT ( tab0.col1 * - col0 ) + - 60 * 37 FROM tab0
----
-10319
-4284
-5615

query I rowsort
SELECT 18 * ( - tab1.col2 + ( 6 ) ) FROM tab1
----
-1620
-864
-918

query I rowsort
SELECT + 87 + 67 * + col0 FROM tab2
----
5313
5380
556

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * - col1 + col2 col1 FROM tab0 AS cor0
----
7429
8363
9410

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 * - ( + col1 ) col1 FROM tab0 AS cor0
----
-1290
-1365
-1455

query I rowsort
SELECT cor0.col0 * 40 + + col1 FROM tab1 AS cor0
----
146
2570
3213

onlyif mysql # use DIV operator for integer division
query I rowsort label-222
SELECT DISTINCT - + cor0.col2 DIV 5 FROM tab2 AS cor0
----
-5
-7

skipif mysql # not compatible
query I rowsort label-222
SELECT DISTINCT - + cor0.col2 / 5 FROM tab2 AS cor0
----
-5
-7

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + cor1.col1 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

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

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

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

query I rowsort
SELECT ALL cor0.col2 * + 78 FROM tab2 AS cor0
----
2028
2106
2964

query I rowsort
SELECT - - 48 + col2 + col0 * 95 AS col2 FROM tab0 AS cor0
----
2361
3374
8585

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

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

query I rowsort
SELECT ALL + 75 + + col2 FROM tab0 AS cor0
----
108
157
76

query I rowsort
SELECT DISTINCT tab2.col1 * - col0 + + col0 * col1 FROM tab2
----
0

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

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

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

query I rowsort
SELECT - 74 * col0 AS col1 FROM tab0
----
-1776
-2590
-6586

query I rowsort
SELECT ALL col0 * + 29 FROM tab2 AS cor0
----
203
2262
2291

query I rowsort
SELECT - - col2 + + 87 AS col0 FROM tab2 AS cor0
----
113
114
125

query I rowsort
SELECT ALL - ( - col0 ) + ( col2 ) * col2 - + col1 * 5 AS col2 FROM tab2
----
1438
459
581

query I rowsort
SELECT + 73 * - 85 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 8453647a822727b4f499b38319fd8126

query I rowsort
SELECT + 0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT ALL - col2 + tab0.col1 + tab0.col1 AS col1 FROM tab0
----
100
139
193

query I rowsort
SELECT DISTINCT + cor0.col2 * 49 AS col1 FROM tab2, tab1 AS cor0
----
2646
2793
4704

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 13 * 16 * + col0 AS col2 FROM tab2
----
1456
16224
16432

onlyif mysql # use DIV operator for integer division
query I rowsort label-253
SELECT ALL 73 DIV - ( col2 ) FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-253
SELECT ALL 73 / - ( col2 ) FROM tab1
----
-1
-1
0

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

query I rowsort
SELECT 64 + - col0 * + col2 FROM tab0 AS cor0
----
-7234
-728
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-256
SELECT ( 22 * col2 ) + col1 DIV 50 AS col1 FROM tab1
----
1188
1254
2112

skipif mysql # not compatible
query I rowsort label-256
SELECT ( 22 * col2 ) + col1 / 50 AS col1 FROM tab1
----
1188
1254
2112

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

skipif mysql # not compatible
query I rowsort
SELECT - - ( col2 ) + CAST ( + col2 AS REAL ) FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT + col0 * cor0.col0 - + col0 * - cor0.col2 FROM tab2 AS cor0
----
238
8112
9243

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-261
SELECT - + col0 * cor0.col0 DIV 68 AS col0 FROM tab2 cor0
----
-89
-91
0

skipif mysql # not compatible
query I rowsort label-261
SELECT - + col0 * cor0.col0 / 68 AS col0 FROM tab2 cor0
----
-89
-91
0

query I rowsort
SELECT ALL - col2 + col1 * ( + col1 + col1 ) FROM tab0 AS cor0
----
14759
16480
18817

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

skipif mysql # not compatible
query I rowsort label-263
SELECT CAST ( col0 AS INTEGER ) + - col1 * + 50 AS col2 FROM tab0 cor0
----
-4276
-4461
-4815

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

query I rowsort
SELECT ALL ( - ( cor0.col1 ) ) AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT - 3 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

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

query I rowsort
SELECT ALL - 33 - + col1 * - col0 AS col0 FROM tab1 AS cor0
----
1007
45
607

query I rowsort
SELECT ALL + + ( ( - col2 ) ) * 51 FROM tab0 AS cor0
----
-1683
-4182
-51

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-272
SELECT + + 37 * col0 DIV + col0 FROM tab0 AS cor0
----
37
37
37

skipif mysql # not compatible
query I rowsort label-272
SELECT + + 37 * col0 / + col0 FROM tab0 AS cor0
----
37
37
37

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

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

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

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

query I rowsort
SELECT + col1 * 43 AS col1 FROM tab0 cor0
----
3698
3913
4171

query I rowsort
SELECT ALL col2 * + 36 * col2 + + col2 AS col1 FROM tab1 AS cor0
----
105030
117021
331872

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-279
SELECT col2 DIV - CAST( - col1 AS SIGNED ) FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-279
SELECT col2 / - CAST ( - col1 AS INTEGER ) FROM tab1 AS cor0
----
2
5
7

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

query I rowsort
SELECT ALL - col0 * 57 AS col2 FROM tab0 AS cor0
----
-1368
-1995
-5073

query I rowsort
SELECT + - col0 + col2 * + col0 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-1260
-19032
-649611

query I rowsort
SELECT + col0 + tab2.col0 * + ( - col1 ) + - col1 FROM tab2
----
-1281
-241
-4583

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 64 - + col1 col1 FROM tab1
----
38
51
54

query I rowsort
SELECT DISTINCT col2 + - col0 * cor0.col1 * col1 FROM tab0 AS cor0
----
-177471
-329314
-736927

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

query I rowsort
SELECT ALL + + col2 * ( 28 ) FROM tab1 AS cor0
----
1512
1596
2688

onlyif mysql # use DIV operator for integer division
query I rowsort label-288
SELECT ALL - col2 DIV ( - 1 ) AS col2 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-288
SELECT ALL - col2 / ( - 1 ) AS col2 FROM tab2
----
26
27
38

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-291
SELECT + + CAST ( col0 AS INTEGER ) * cor0.col1 + + cor0.col1 AS col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT + 45 * - col0 FROM tab2 AS cor0
----
-315
-3510
-3555

query I rowsort
SELECT - - col2 * 44 + col1 + col2 FROM tab0 cor0
----
142
1571
3781

query I rowsort
SELECT DISTINCT tab1.col2 * + 32 * - ( col0 ) FROM tab1
----
-116736
-245760
-5184

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

query I rowsort
SELECT DISTINCT + col0 * - col0 * + col1 + col1 AS col1 FROM tab1 AS cor0
----
-208
-40950
-83187

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

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

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

query I rowsort
SELECT + 41 * cor0.col1 AS col0 FROM tab2 AS cor0
----
1271
2419
697

query I rowsort
SELECT DISTINCT 11 * col1 + 8 * + col2 * - col2 AS col1 FROM tab2 AS cor0
----
-11365
-4759
-5491

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

query I rowsort
SELECT ( 39 ) + - col2 AS col1 FROM tab0
----
-43
38
6

query I rowsort
SELECT + col0 + + col1 * 70 AS col1 FROM tab1 AS cor0
----
1823
764
990

query I rowsort
SELECT 6 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to f1e8f0199f3714ee8fcc24ce0cc3ea04

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

query I rowsort
SELECT 14 + 61 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

onlyif mysql # use DIV operator for integer division
query I rowsort label-307
SELECT DISTINCT tab1.col2 + col2 DIV 31 FROM tab1
----
55
58
99

skipif mysql # not compatible
query I rowsort label-307
SELECT DISTINCT tab1.col2 + col2 / 31 FROM tab1
----
55
58
99

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

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

query I rowsort
SELECT ALL cor1.col1 + cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d994d266bacb99d3939b70b2c7903ce8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 88 * - col1 col0 FROM tab0
----
7568
8008
8536

onlyif mysql # use DIV operator for integer division
query I rowsort label-311
SELECT DISTINCT 80 DIV + col0 AS col2 FROM tab2
----
1
11

skipif mysql # not compatible
query I rowsort label-311
SELECT DISTINCT 80 / + col0 AS col2 FROM tab2
----
1
11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-312
SELECT + 49 * + col1 + CAST( + 60 AS SIGNED ) * + cor0.col1 FROM tab1 AS cor0
----
1090
1417
2834

skipif mysql # not compatible
query I rowsort label-312
SELECT + 49 * + col1 + CAST ( + 60 AS INTEGER ) * + cor0.col1 FROM tab1 AS cor0
----
1090
1417
2834

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

query I rowsort
SELECT DISTINCT 83 * col2 FROM tab2 AS cor0
----
2158
2241
3154

query I rowsort
SELECT - 26 + - col2 AS col1 FROM tab0
----
-108
-27
-59

query I rowsort
SELECT tab2.col0 * + tab2.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 458b4c13e6825f9686b15a38663930f4

query I rowsort
SELECT 8 - col2 * col0 AS col0 FROM tab0
----
-27
-7290
-784

query I rowsort
SELECT DISTINCT - 75 + col1 - + col1 * + ( col2 + col1 * - tab1.col2 ) FROM tab1
----
14914
35051
5065

query I rowsort
SELECT 18 * col2 FROM tab1
----
1026
1728
972

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

query I rowsort
SELECT - col0 * + col1 - ( tab1.col1 ) * col1 AS col0 FROM tab1
----
-1209
-740
-754

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 17 + col2 * 73 * col0 col2 FROM tab1 AS cor0
----
11843
266321
560657

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 56 + col2 * col1 col2 FROM tab1 cor0
----
1304
1460
626

query I rowsort
SELECT ALL + 18 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
-8
5
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * cor0.col0 * - col1 col2 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT - 7 + col1 AS col2 FROM tab0 AS cor0
----
79
84
90

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col1 * - 60 col0 FROM tab2 AS cor0
----
-38760
-50220
-92040

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

query I rowsort
SELECT + - cor0.col2 * + 76 AS col2 FROM tab2 cor0
----
-1976
-2052
-2888

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

query I rowsort
SELECT + - ( 18 ) + + col1 * + col1 * cor0.col1 FROM tab0 cor0
----
636038
753553
912655

query I rowsort
SELECT ALL 19 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-334
SELECT + cor0.col0 * + CAST ( NULL AS REAL ) col1 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-335
SELECT - 75 DIV + col2 + - col2 FROM tab0 AS cor0
----
-35
-76
-82

skipif mysql # not compatible
query I rowsort label-335
SELECT - 75 / + col2 + - col2 FROM tab0 AS cor0
----
-35
-76
-82

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-339
SELECT DISTINCT + CAST( col2 AS SIGNED ) * - col2 + - 5 FROM tab2 AS cor0
----
-1449
-681
-734

skipif mysql # not compatible
query I rowsort label-339
SELECT DISTINCT + CAST ( col2 AS INTEGER ) * - col2 + - 5 FROM tab2 AS cor0
----
-1449
-681
-734

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

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

query I rowsort
SELECT DISTINCT 20 * + col1 FROM tab2 AS cor0
----
1180
340
620

query I rowsort
SELECT ALL - 97 + + col0 FROM tab2 AS cor0
----
-18
-19
-90

query I rowsort
SELECT + col2 * 62 AS col2 FROM tab2 AS cor0
----
1612
1674
2356

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

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

query I rowsort
SELECT DISTINCT col1 * 97 - col1 * - cor0.col1 * col2 FROM tab2 AS cor0
----
12631
28954
96229

query I rowsort
SELECT ALL 58 * + col1 + col2 AS col2 FROM tab1 AS cor0
----
1562
637
850

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-349
SELECT + col0 DIV col2 + - col1 AS col1 FROM tab0 AS cor0
----
-62
-86
-90

skipif mysql # not compatible
query I rowsort label-349
SELECT + col0 / col2 + - col1 AS col1 FROM tab0 AS cor0
----
-62
-86
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - col0 ) col0 FROM tab2 AS cor0
----
-7
-78
-79

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 + col1 col2 FROM tab2 AS cor0
----
112
70
84

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

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

query I rowsort
SELECT ALL - cor0.col0 - - col0 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 - 95 FROM tab1 AS cor0
----
-15
-31
-92

query I rowsort
SELECT + 37 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + 44 col1 FROM tab1 AS cor0
----
108
124
47

query I rowsort
SELECT DISTINCT - col0 * ( col2 * col1 ) + - 54 FROM tab1 AS cor0
----
-36534
-4266
-99894

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

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

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col2 + + cor0.col0 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT DISTINCT - 66 + col2 AS col1 FROM tab1 AS cor0
----
-12
-9
30

query I rowsort
SELECT - col2 + + col1 * col1 * - tab2.col0 FROM tab2
----
-22869
-271544
-6754

query I rowsort
SELECT + 75 AS col1 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab1, tab0 AS cor2
----
243 values hashing to 5418e29983129f6ba0e1aa0e11342822

query I rowsort
SELECT DISTINCT + 79 * col0 AS col0 FROM tab2 AS cor0
----
553
6162
6241

query I rowsort
SELECT + 20 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

onlyif mysql # use DIV operator for integer division
query I rowsort label-369
SELECT - - col2 + - col1 * col2 DIV 95 AS col2 FROM tab2 AS cor0
----
10
19
32

skipif mysql # not compatible
query I rowsort label-369
SELECT - - col2 + - col1 * col2 / 95 AS col2 FROM tab2 AS cor0
----
10
19
32

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

skipif mysql # not compatible
query I rowsort label-370
SELECT DISTINCT + + col0 + col1 / 93 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col1 + cor0.col2 col1 FROM tab1 cor0
----
1136
132
697

query I rowsort
SELECT + 25 + ( - col2 ) - col2 * - col0 AS col2 FROM tab0
----
59
7241
784

query I rowsort
SELECT ALL + 37 * + col0 * - col2 + + 80 AS col2 FROM tab0
----
-1215
-269946
-29224

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

query I rowsort
SELECT - 32 + col2 AS col1 FROM tab0 AS cor0
----
-31
1
50

query I rowsort
SELECT + + col0 + + col1 * + col2 * - col0 + col0 AS col1 FROM tab0 cor0
----
-3325
-663940
-68064

query I rowsort
SELECT + 21 * - col2 AS col2 FROM tab0
----
-1722
-21
-693

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

skipif mysql # not compatible
query I rowsort
SELECT tab2.col0 * + CAST ( + col0 * - col1 AS REAL ) FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT + col1 + tab2.col2 - - 53 * col0 FROM tab2
----
4219
4242
429

query I rowsort
SELECT DISTINCT 53 + - ( col2 ) FROM tab0 AS cor0
----
-29
20
52

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

query I rowsort
SELECT + ( + col2 ) + cor0.col0 + + ( col2 * - col1 ) FROM tab2 AS cor0
----
-1430
-529
-803

onlyif mysql # use DIV operator for integer division
query I rowsort label-384
SELECT ALL - 32 + + col2 DIV col0 FROM tab2 AS cor0
----
-29
-32
-32

skipif mysql # not compatible
query I rowsort label-384
SELECT ALL - 32 + + col2 / col0 FROM tab2 AS cor0
----
-29
-32
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 98 + + col1 col1 FROM tab0 AS cor0
----
184
189
195

query I rowsort
SELECT + col0 * 53 FROM tab2 AS cor0
----
371
4134
4187

onlyif mysql # use DIV operator for integer division
query I rowsort label-387
SELECT DISTINCT + col0 DIV 96 AS col0 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-387
SELECT DISTINCT + col0 / 96 AS col0 FROM tab1
----
0

query I rowsort
SELECT 92 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

onlyif mysql # use DIV operator for integer division
query I rowsort label-389
SELECT DISTINCT + tab1.col0 DIV + col0 + + 93 * col1 - - 33 * col1 FROM tab1
----
1261
1639
3277

skipif mysql # not compatible
query I rowsort label-389
SELECT DISTINCT + tab1.col0 / + col0 + + 93 * col1 - - 33 * col1 FROM tab1
----
1261
1639
3277

query I rowsort
SELECT - col1 * 2 - + ( + col1 ) AS col2 FROM tab0
----
-258
-273
-291

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

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

query I rowsort
SELECT col2 * 40 + + col0 FROM tab2
----
1087
1118
1599

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

skipif mysql # not compatible
query I rowsort label-393
SELECT + col2 / + ( col0 ) FROM tab2
----
0
0
3

query I rowsort
SELECT col2 + 38 * col1 FROM tab0
----
3301
3540
3687

onlyif mysql # use DIV operator for integer division
query I rowsort label-395
SELECT DISTINCT 40 DIV col0 + + col2 FROM tab2
----
26
32
38

skipif mysql # not compatible
query I rowsort label-395
SELECT DISTINCT 40 / col0 + + col2 FROM tab2
----
26
32
38

query I rowsort
SELECT ALL - - col0 + + 24 FROM tab1 AS cor0
----
104
27
88

query I rowsort
SELECT ALL + 26 + 32 * - col2 AS col1 FROM tab1 AS cor0
----
-1702
-1798
-3046

query I rowsort
SELECT DISTINCT col1 * col0 - + col2 * col0 FROM tab2 AS cor0
----
-1659
2574
28

query I rowsort
SELECT + 79 * + 91 + col0 AS col0 FROM tab0 AS cor0
----
7213
7224
7278

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

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

query I rowsort
SELECT - ( col2 ) * col2 + col0 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
-14022
-1881
-36

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

query I rowsort
SELECT + col0 + - 88 + - col1 FROM tab0 cor0
----
-150
-150
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-404
SELECT ALL + CAST( + 30 AS SIGNED ) * + col2 AS col2 FROM tab1 AS cor0
----
1620
1710
2880

skipif mysql # not compatible
query I rowsort label-404
SELECT ALL + CAST ( + 30 AS INTEGER ) * + col2 AS col2 FROM tab1 AS cor0
----
1620
1710
2880

onlyif mysql # use DIV operator for integer division
query I rowsort label-405
SELECT DISTINCT col1 + 1 DIV cor0.col0 col0 FROM tab2 cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-405
SELECT DISTINCT col1 + 1 / cor0.col0 col0 FROM tab2 cor0
----
17
31
59

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

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

query I rowsort
SELECT ALL 61 + col0 AS col1 FROM tab0 cor0
----
150
85
96

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

query I rowsort
SELECT ALL col0 * + tab0.col1 + + col2 + col1 AS col0 FROM tab0
----
2183
3493
8272

onlyif mysql # use DIV operator for integer division
query I rowsort label-410
SELECT + 92 DIV 7 AS col2 FROM tab2
----
13
13
13

skipif mysql # not compatible
query I rowsort label-410
SELECT + 92 / 7 AS col2 FROM tab2
----
13
13
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-411
SELECT ALL - col1 DIV + ( col2 ) + + 41 FROM tab0
----
-56
39
40

skipif mysql # not compatible
query I rowsort label-411
SELECT ALL - col1 / + ( col2 ) + + 41 FROM tab0
----
-56
39
40

query I rowsort
SELECT + 58 * - col1 + tab0.col1 * + col0 + col1 FROM tab0
----
-2134
-2838
2912

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

query I rowsort
SELECT ALL 10 FROM tab1, tab2 cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-416
SELECT ALL ( + ( - col0 ) * CAST( col1 AS SIGNED ) ) + col0 DIV + col0 + col1 FROM tab2
----
-1325
-185
-4542

skipif mysql # not compatible
query I rowsort label-416
SELECT ALL ( + ( - col0 ) * CAST ( col1 AS INTEGER ) ) + col0 / + col0 + col1 FROM tab2
----
-1325
-185
-4542

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-417
SELECT DISTINCT - + cor0.col0 / - col0 col0 FROM tab0 AS cor0
----
1

query I rowsort
SELECT ALL ( tab2.col2 ) AS col2 FROM tab1, tab0, tab0 AS cor0, tab2
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col1 + - 53 col1 FROM tab2 AS cor0
----
-1014
-342
-3534

query I rowsort
SELECT + col2 + col2 * + ( col1 + col1 ) AS col2 FROM tab0 AS cor0
----
15006
195
5709

query I rowsort
SELECT + - 44 * + col0 + + col0 - - col1 AS col1 FROM tab2 AS cor0
----
-270
-3295
-3380

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-425
SELECT ALL - col2 * - CAST( + col0 + + cor0.col1 AS SIGNED ) FROM tab0 cor0
----
132
14760
3630

skipif mysql # not compatible
query I rowsort label-425
SELECT ALL - col2 * - CAST ( + col0 + + cor0.col1 AS INTEGER ) FROM tab0 cor0
----
132
14760
3630

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

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

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

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

query I rowsort
SELECT + 51 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

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

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

query I rowsort
SELECT ALL + col0 + col0 * + 91 AS col1 FROM tab1 cor0
----
276
5888
7360

query I rowsort
SELECT DISTINCT + col0 - - 45 * 51 AS col1 FROM tab2 AS cor0
----
2302
2373
2374

query I rowsort
SELECT col0 * 72 FROM tab1 AS cor0
----
216
4608
5760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-435
SELECT ALL col1 + CAST( 52 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
138
143
149

skipif mysql # not compatible
query I rowsort label-435
SELECT ALL col1 + CAST ( 52 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
138
143
149

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

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

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

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

query I rowsort
SELECT ALL col0 * - 37 * + 78 AS col2 FROM tab1 AS cor0
----
-184704
-230880
-8658

query I rowsort
SELECT - col1 - + 21 * - col0 AS col1 FROM tab0 AS cor0
----
1778
418
638

query I rowsort
SELECT DISTINCT - col1 * 71 AS col2 FROM tab0 AS cor0
----
-6106
-6461
-6887

query I rowsort
SELECT + col1 * - ( 92 ) AS col1 FROM tab2 AS cor0
----
-1564
-2852
-5428

query I rowsort
SELECT col0 * 22 * col2 - + col2 AS col2 FROM tab0 AS cor0
----
160474
17391
769

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col1 FROM tab1, tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + ( col1 * col1 ) AS col2 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT - + 14 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

query I rowsort
SELECT - cor0.col1 + - 4 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
-155
-295
-85

query I rowsort
SELECT - - col1 * - col0 - 13 FROM tab0 AS cor0
----
-2077
-3408
-8112

query I rowsort
SELECT + + cor0.col0 + 8 AS col0 FROM tab1 AS cor0
----
11
72
88

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

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

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

query I rowsort
SELECT + col0 * + ( - 23 ) - col1 * col2 AS col0 FROM tab1 AS cor0
----
-1473
-2042
-3088

query I rowsort
SELECT ALL + + 14 AS col1 FROM tab1, tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

query I rowsort
SELECT + col2 * col0 * - 91 FROM tab2 AS cor0
----
-17199
-184548
-273182

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

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

query I rowsort
SELECT DISTINCT + 2 * - col0 FROM tab1 cor0
----
-128
-160
-6

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

query I rowsort
SELECT + 55 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT - - 16 + col1 * ( - col0 ) AS col0 FROM tab1 AS cor0
----
-1024
-62
-624

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

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

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

query I rowsort
SELECT ALL - 89 + cor0.col0 FROM tab0 AS cor0
----
-54
-65
0

query I rowsort
SELECT ALL - 90 + col2 FROM tab1 AS cor0
----
-33
-36
6

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

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col1 + - ( col2 ) * - col0 * + cor0.col1 AS col0 FROM tab0 AS cor0
----
3492
671580
70950

query I rowsort
SELECT ALL 99 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 05ea182fd6036c7f5e0ea08fc061cc67

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

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

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

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

query I rowsort
SELECT - ( - 28 ) + col2 AS col0 FROM tab0 cor0
----
110
29
61

query I rowsort
SELECT + 15 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 97c4e033347d2076218e240ed49af0a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-473
SELECT ALL + 99 DIV - 30 + - col0 * col1 col1 FROM tab0
----
-2067
-3398
-8102

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-473
SELECT ALL + 99 / - 30 + - col0 * col1 col1 FROM tab0
----
-2067
-3398
-8102

query I rowsort
SELECT ALL + col1 + col2 * col1 FROM tab1
----
1261
1430
580

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

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

query I rowsort
SELECT DISTINCT col0 + col2 * col2 + + col1 FROM tab0 AS cor0
----
1199
133
6904

query I rowsort
SELECT DISTINCT 75 * - ( + col0 ) FROM tab1 AS cor0
----
-225
-4800
-6000

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

query I rowsort
SELECT + + col2 * + 36 + - cor0.col0 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
-2044
-2944
1935

query I rowsort
SELECT col1 + - 57 FROM tab2 cor0
----
-26
-40
2

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

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

query I rowsort
SELECT DISTINCT col1 + + col0 + - 17 * col2 AS col1 FROM tab1 AS cor0
----
-1539
-889
-895

query I rowsort
SELECT DISTINCT + - col1 * - col2 + + 48 * col1 AS col0 FROM tab2 AS cor0
----
1462
2325
4366

onlyif mysql # use DIV operator for integer division
query I rowsort label-485
SELECT ALL - 87 * col1 DIV - 54 FROM tab2 AS cor0
----
27
49
95

skipif mysql # not compatible
query I rowsort label-485
SELECT ALL - 87 * col1 / - 54 FROM tab2 AS cor0
----
27
49
95

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

query I rowsort
SELECT ALL - col1 + col2 * + col2 FROM tab2 AS cor0
----
1427
617
698

onlyif mysql # use DIV operator for integer division
query I rowsort label-488
SELECT ALL - 41 DIV - col0 + tab1.col2 * + 37 AS col0 FROM tab1
----
2011
2109
3552

skipif mysql # not compatible
query I rowsort label-488
SELECT ALL - 41 / - col0 + tab1.col2 * + 37 AS col0 FROM tab1
----
2011
2109
3552

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

query I rowsort
SELECT ALL + 65 + 82 FROM tab2
----
147
147
147

query I rowsort
SELECT ALL - tab1.col2 + - 55 FROM tab1
----
-109
-112
-151

query I rowsort
SELECT + ( col0 ) * + tab1.col0 * + col2 FROM tab1
----
233472
486
614400

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

query I rowsort
SELECT col0 * - 15 - - col0 FROM tab1 cor0
----
-1120
-42
-896

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

query I rowsort
SELECT ALL + ( col1 ) * col1 * 55 AS col1 FROM tab1 AS cor0
----
37180
5500
9295

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

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

query I rowsort
SELECT DISTINCT col2 * + cor0.col1 + + col0 + - 0 * 19 FROM tab0 cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT - 2 + col0 * col1 FROM tab0 AS cor0
----
2062
3393
8097

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 34 * + 8 + - col1 * + col0 col1 FROM tab0 AS cor0
----
-1792
-3123
-7827

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

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

query I rowsort
SELECT ALL + + col1 + 4 AS col0 FROM tab2 AS cor0
----
21
35
63

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-504
SELECT ALL col1 DIV - col2 - col2 FROM tab0 AS cor0
----
-35
-83
-98

skipif mysql # not compatible
query I rowsort label-504
SELECT ALL col1 / - col2 - col2 FROM tab0 AS cor0
----
-35
-83
-98

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

query I rowsort
SELECT ALL + + 62 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT + col1 * - 22 + - col1 - - col0 AS col2 FROM tab2 AS cor0
----
-1279
-312
-706

onlyif mysql # use DIV operator for integer division
query I rowsort label-508
SELECT + col2 * col2 DIV - col1 FROM tab0 AS cor0
----
-12
-73
0

skipif mysql # not compatible
query I rowsort label-508
SELECT + col2 * col2 / - col1 FROM tab0 AS cor0
----
-12
-73
0

query I rowsort
SELECT + - 21 * cor0.col1 FROM tab0 AS cor0
----
-1806
-1911
-2037

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-511
SELECT col2 * 92 + 24 DIV col2 FROM tab0
----
116
3036
7544

skipif mysql # not compatible
query I rowsort label-511
SELECT col2 * 92 + 24 / col2 FROM tab0
----
116
3036
7544

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-512
SELECT DISTINCT - cor0.col0 * + CAST( NULL AS DECIMAL ) + 59 FROM tab1, tab1 cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-512
SELECT DISTINCT - cor0.col0 * + CAST ( NULL AS REAL ) + 59 FROM tab1, tab1 cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT - ( + 49 ) AS col0 FROM tab0, tab1, tab1 AS cor0
----
-49

query I rowsort
SELECT + cor0.col0 + + 98 FROM tab1 AS cor0
----
101
162
178

query I rowsort
SELECT DISTINCT - 68 * col2 FROM tab2
----
-1768
-1836
-2584

query I rowsort
SELECT DISTINCT - col1 * 91 + + 25 FROM tab0 AS cor0
----
-7801
-8256
-8802

query I rowsort
SELECT + 72 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

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

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

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

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

query I rowsort
SELECT - + col0 + ( 53 ) FROM tab1 AS cor0
----
-11
-27
50

query I rowsort
SELECT + col0 * 44 + + 13 * - col0 AS col2 FROM tab1 AS cor0
----
1984
2480
93

query I rowsort
SELECT + col1 * + 77 AS col1 FROM tab1 AS cor0
----
1001
2002
770

query I rowsort
SELECT - cor0.col2 * cor0.col0 + - 97 FROM tab0 AS cor0
----
-132
-7395
-889

query I rowsort
SELECT 99 * - col0 + tab0.col0 FROM tab0
----
-2352
-3430
-8722

skipif mysql # not compatible
query I rowsort
SELECT - ( cor0.col1 ) * CAST ( + col0 AS REAL ) FROM tab1 AS cor0
----
-1040
-640
-78

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

query I rowsort
SELECT - cor0.col0 + + col0 * 84 AS col1 FROM tab1 AS cor0
----
249
5312
6640

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

query I rowsort
SELECT - + col1 * ( - ( - cor0.col0 ) ) * + 73 FROM tab2 AS cor0
----
-15841
-335946
-98039

query I rowsort
SELECT + - col0 * col2 * 55 FROM tab0 AS cor0
----
-1925
-401390
-43560

query I rowsort
SELECT DISTINCT + cor0.col2 * + 49 + - col1 * - col2 FROM tab1 AS cor0
----
3363
4050
5952

query I rowsort
SELECT ALL + cor0.col2 * 89 * 59 FROM tab2 AS cor0
----
136526
141777
199538

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + 1 col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + col1 * col0 * col0 + col2 * - ( col1 ) AS col1 FROM tab1 AS cor0
----
-1170
40390
81952

query I rowsort
SELECT DISTINCT col2 * - 72 * - col2 FROM tab0 AS cor0
----
484128
72
78408

query I rowsort
SELECT - col2 * 88 * + col2 AS col0 FROM tab2 AS cor0
----
-127072
-59488
-64152

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-539
SELECT + col0 / + 60 col0 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT - 96 AS col0 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to a7b3e5dd01c8929180b7ffda67f79798

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT - col0 + - col2 <= col2
----

query I rowsort
SELECT DISTINCT col2 + col0 * col2 * col2 FROM tab1
----
207993
737376
8802

query I rowsort
SELECT - col2 - col0 * tab1.col2 FROM tab1
----
-216
-3705
-7776

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NULL ) BETWEEN ( + col0 / col0 + col2 * + col2 - col1 ) AND col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col1 * + col1 col0 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT col0 * col2 * - tab1.col1 + - col0 AS col1 FROM tab1
----
-36544
-4215
-99920

query I rowsort
SELECT ALL + col0 * col2 - tab1.col0 AS col1 FROM tab1
----
159
3584
7600

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

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL <= - tab2.col1
----

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

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

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE col1 <= col2 * col1 + + col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT ALL col1 + + col1 * col0 * - col2 AS col1 FROM tab1
----
-36470
-4186
-99827

query I rowsort
SELECT - tab1.col2 * col1 FROM tab1 WHERE ( NULL ) = col2 - tab1.col0
----

query I rowsort
SELECT DISTINCT col0 / - col2 AS col0 FROM tab2 WHERE col1 IN ( tab2.col2 * - col0 )
----

query I rowsort
SELECT - col2 FROM tab1 WHERE NOT tab1.col2 > NULL
----

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

query I rowsort
SELECT col2 + - tab1.col1 / + col1 FROM tab1 WHERE ( NULL ) = ( NULL )
----

query I rowsort
SELECT DISTINCT tab2.col1 * + tab2.col1 - - col0 * col1 AS col2 FROM tab2
----
1178
1632
8083

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

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL NOT BETWEEN - col0 * col1 AND NULL
----

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col1 * col1 - col2 * col2 * cor0.col2 col1 FROM tab1 AS cor0
----
-156788
-185093
-884567

onlyif mysql # use DIV operator for integer division
query I rowsort label-565
SELECT ALL + - cor0.col1 - - col2 DIV col0 AS col1 FROM tab2 AS cor0
----
-17
-28
-59

skipif mysql # not compatible
query I rowsort label-565
SELECT ALL + - cor0.col1 - - col2 / col0 AS col1 FROM tab2 AS cor0
----
-17
-28
-59

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

query I rowsort
SELECT 84 + - col1 * 66 * col2 AS col2 FROM tab1 AS cor0
----
-37536
-82284
-92580

onlyif mysql # use DIV operator for integer division
query I rowsort label-568
SELECT DISTINCT col0 DIV col0 + 24 * - 62 AS col1 FROM tab2 AS cor0
----
-1487

skipif mysql # not compatible
query I rowsort label-568
SELECT DISTINCT col0 / col0 + 24 * - 62 AS col1 FROM tab2 AS cor0
----
-1487

onlyif mysql # use DIV operator for integer division
query I rowsort label-569
SELECT - + col1 + col0 DIV - 31 FROM tab1 AS cor0
----
-12
-15
-26

skipif mysql # not compatible
query I rowsort label-569
SELECT - + col1 + col0 / - 31 FROM tab1 AS cor0
----
-12
-15
-26

query I rowsort
SELECT DISTINCT - 31 + col1 AS col1 FROM tab2 AS cor0
----
-14
0
28

query I rowsort
SELECT DISTINCT col1 + 72 * col1 FROM tab1
----
1898
730
949

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

query I rowsort
SELECT ALL - - 76 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

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

query I rowsort
SELECT ALL - col1 * - col2 * col1 + 82 * - cor0.col0 AS col0 FROM tab2 AS cor0
----
25373
4504
84110

query I rowsort
SELECT ALL - ( tab0.col2 ) FROM tab0, tab2 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT + col0 * 62 AS col1 FROM tab1
----
186
3968
4960

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

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

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

query I rowsort
SELECT ALL 68 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 cor2
----
81 values hashing to 7ff6433dda3248dce73040b2c590f3da

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * 66 col0 FROM tab1 AS cor0
----
198
4224
5280

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

skipif mysql # not compatible
query I rowsort label-582
SELECT ALL - CAST ( NULL AS REAL ) FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

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

skipif mysql # not compatible
query I rowsort label-583
SELECT + CAST ( + col2 AS INTEGER ) * + col1 + - 27 AS col2 FROM tab0 AS cor0
----
2811
70
7435

query I rowsort
SELECT - 27 * - col2 + - cor0.col1 FROM tab1 AS cor0
----
1432
1529
2579

query I rowsort
SELECT ALL + + col1 + + 50 * col0 FROM tab0 AS cor0
----
1286
1847
4541

query I rowsort
SELECT ALL + + 89 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

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

query I rowsort
SELECT 99 + + cor0.col2 FROM tab0 AS cor0
----
100
132
181

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

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

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

skipif mysql # not compatible
query I rowsort label-591
SELECT DISTINCT - ( col2 ) + - 9 / - col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - col2 + ( - cor0.col2 ) * col0 AS col0 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT - cor0.col0 * 98 - col2 FROM tab0 cor0
----
-2385
-3431
-8804

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

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

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

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

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

query I rowsort
SELECT ALL + - ( 35 ) FROM tab1 cor0
----
-35
-35
-35

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-601
SELECT DISTINCT + - 73 DIV - col1 AS col2 FROM tab2 cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-601
SELECT DISTINCT + - 73 / - col1 AS col2 FROM tab2 cor0
----
1
2
4

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

query I rowsort
SELECT - + col0 * + 49 FROM tab2 AS cor0
----
-343
-3822
-3871

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

query I rowsort
SELECT ( - ( + cor0.col0 ) ) + col0 * + cor0.col1 + + col1 AS col0 FROM tab0 cor0
----
2126
3457
8101

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

query I rowsort
SELECT DISTINCT - 36 * col2 + - col2 + - 38 AS col2 FROM tab2 AS cor0
----
-1000
-1037
-1444

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 91 * - col0 col2 FROM tab2 AS cor0
----
-637
-7098
-7189

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-611
SELECT ALL + cor0.col1 + col1 * CAST( col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
194
2924
7553

skipif mysql # not compatible
query I rowsort label-611
SELECT ALL + cor0.col1 + col1 * CAST ( col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + col0 + + 22 FROM tab2
----
100
101
29

query I rowsort
SELECT ALL 48 * - tab1.col0 FROM tab1
----
-144
-3072
-3840

query I rowsort
SELECT ALL + - 26 + - col0 AS col1 FROM tab1 AS cor0
----
-106
-29
-90

query I rowsort
SELECT cor0.col1 * col0 + 18 AS col0 FROM tab0 AS cor0
----
2082
3413
8117

query I rowsort
SELECT - 10 + - cor0.col1 * 80 FROM tab2 AS cor0
----
-1370
-2490
-4730

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

query I rowsort
SELECT DISTINCT + + cor0.col2 + ( - cor0.col2 ) FROM tab2, tab0 AS cor0
----
0

query I rowsort
SELECT - 68 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 6fbba7db5bccb533a35aa5125a231f88

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

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

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

query I rowsort
SELECT ALL col1 + 4 FROM tab0
----
101
90
95

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

query I rowsort
SELECT + + cor0.col2 + - 25 FROM tab0 cor0
----
-24
57
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col1 * col1 col1 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT ALL - 47 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

onlyif mysql # use DIV operator for integer division
query I rowsort label-627
SELECT - col0 DIV 59 + col1 FROM tab2
----
16
31
58

skipif mysql # not compatible
query I rowsort label-627
SELECT - col0 / 59 + col1 FROM tab2
----
16
31
58

query I rowsort
SELECT DISTINCT - - col0 * 67 + + col0 * - col2 FROM tab1 AS cor0
----
-2320
39
640

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

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

query I rowsort
SELECT + col2 + - col2 * + col1 * - ( + 4 ) AS col2 FROM tab0 AS cor0
----
11385
29930
389

query I rowsort
SELECT ALL 54 * col2 AS col0 FROM tab0 AS cor0
----
1782
4428
54

query I rowsort
SELECT DISTINCT col2 + ( - 99 * col1 ) + col1 FROM tab0
----
-8395
-8836
-9505

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

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1, tab2 AS cor0, tab2 cor1, tab2, tab2 AS cor2
----
243 values hashing to 3dcd863493ac16ce594c62d4ac8b0412

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - 79 * + ( col2 ) col2 FROM tab0
----
-2574
-6396
-78

query I rowsort
SELECT tab0.col2 - + ( ( col2 ) ) FROM tab0
----
0
0
0

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

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

query I rowsort
SELECT + col1 * - 16 FROM tab2 AS cor0
----
-272
-496
-944

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

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

query I rowsort
SELECT + + col0 * col2 * - col2 FROM tab0 cor0
----
-26136
-35
-598436

query I rowsort
SELECT 77 * col2 * cor0.col2 AS col0 FROM tab2 AS cor0
----
111188
52052
56133

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

query I rowsort
SELECT - + 79 * col2 FROM tab2 AS cor0
----
-2054
-2133
-3002

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-646
SELECT ALL 63 DIV 81 + col0 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-646
SELECT ALL 63 / 81 + col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT - col1 * col2 * + col1 + col1 AS col0 FROM tab1 AS cor0
----
-16211
-36478
-5690

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 * col0 + - 67 AS col2 FROM tab1 AS cor0
----
-4163
-6467
-76

query I rowsort
SELECT DISTINCT + col1 + 37 FROM tab0 cor0
----
123
128
134

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

skipif mysql # not compatible
query I rowsort label-656
SELECT ALL col0 / 99 AS col1 FROM tab0 AS cor0
----
0
0
0

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

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

query I rowsort
SELECT ALL 58 * col2 AS col0 FROM tab0
----
1914
4756
58

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

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

query I rowsort
SELECT - col0 + ( 29 * - col1 ) AS col2 FROM tab1 AS cor0
----
-354
-457
-757

query I rowsort
SELECT DISTINCT col0 + - 17 * - col2 FROM tab1 AS cor0
----
1033
1712
921

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

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

query I rowsort
SELECT + col2 + + 15 FROM tab1 AS cor0
----
111
69
72

query I rowsort
SELECT ALL - - col1 * 87 FROM tab2 AS cor0
----
1479
2697
5133

query I rowsort
SELECT DISTINCT + col0 * - col2 * col0 + + col2 AS col0 FROM tab0 AS cor0
----
-1224
-18975
-649440

query I rowsort
SELECT ALL - + col2 * col0 + 91 AS col0 FROM tab2 AS cor0
----
-1937
-2911
-98

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

query I rowsort
SELECT col0 * 85 FROM tab2 cor0
----
595
6630
6715

query I rowsort
SELECT ALL col1 * + 41 + col2 FROM tab1 AS cor0
----
1120
467
629

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 * col0 * - 76 col1 FROM tab2
----
-46284
-515736
-522348

query I rowsort
SELECT - col1 * tab2.col2 * + col1 + col0 * + tab2.col0 + col2 FROM tab2
----
-25871
-4703
-84396

query I rowsort
SELECT - tab1.col2 * - cor0.col0 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 844087611670bb7fd62286733e4f81ac

query I rowsort
SELECT ALL col0 - col1 * + 14 FROM tab2
----
-159
-427
-748

onlyif mysql # use DIV operator for integer division
query I rowsort label-675
SELECT 94 DIV - col2 + - col0 + - col2 AS col2 FROM tab1
----
-122
-176
-58

skipif mysql # not compatible
query I rowsort label-675
SELECT 94 / - col2 + - col0 + - col2 AS col2 FROM tab1
----
-122
-176
-58

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

query I rowsort
SELECT - col2 + - ( + 69 ) AS col0 FROM tab2 AS cor0
----
-107
-95
-96

query I rowsort
SELECT DISTINCT - col1 + 33 * + col0 * col0 FROM tab1 AS cor0
----
135158
211187
271

query I rowsort
SELECT DISTINCT ( - cor1.col2 ) + ( - 26 ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-52
-53
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + col0 + + col0 col0 FROM tab1 cor0
----
3
64
80

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

query I rowsort
SELECT DISTINCT - 32 + + col2 FROM tab1 AS cor0
----
22
25
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 27 - col1 col2 FROM tab1 cor0
----
1
14
17

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

query I rowsort
SELECT - 78 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

query I rowsort
SELECT + 54 * col2 AS col1 FROM tab2
----
1404
1458
2052

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

query I rowsort
SELECT DISTINCT + 8 FROM tab2, tab0, tab2 cor0
----
8

query I rowsort
SELECT DISTINCT - ( + col1 ) - - 97 AS col2 FROM tab0
----
0
11
6

query I rowsort
SELECT - 18 + tab1.col1 + + col2 FROM tab1
----
49
62
91

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

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

query I rowsort
SELECT ALL 93 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT DISTINCT 3 + + col0 AS col0 FROM tab1 AS cor0
----
6
67
83

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

skipif mysql # not compatible
query I rowsort label-694
SELECT DISTINCT - - ( + col1 ) * - col1 + + CAST ( cor0.col2 AS INTEGER ) * cor0.col0 * col2 FROM tab2 AS cor0
----
113787
4142
49247

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

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

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

query I rowsort
SELECT ALL cor0.col1 * 82 * + col1 FROM tab2 AS cor0
----
23698
285442
78802

onlyif mysql # use DIV operator for integer division
query I rowsort label-699
SELECT DISTINCT + col2 DIV + col1 + 40 * - tab0.col1 + col2 col0 FROM tab0
----
-3407
-3558
-3879

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-699
SELECT DISTINCT + col2 / + col1 + 40 * - tab0.col1 + col2 col0 FROM tab0
----
-3407
-3558
-3879

query I rowsort
SELECT - cor0.col0 * 35 FROM tab0 cor0
----
-1225
-3115
-840

query I rowsort
SELECT - + cor0.col1 + ( - col1 ) * col0 * + col1 FROM tab1 AS cor0
----
-13533
-2054
-6410

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

query I rowsort
SELECT DISTINCT + 11 AS col2 FROM tab0, tab2 AS cor0
----
11

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

query I rowsort
SELECT - col2 * + 44 AS col0 FROM tab2 cor0
----
-1144
-1188
-1672

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

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

query I rowsort
SELECT DISTINCT - 91 + cor0.col1 AS col2 FROM tab2, tab2 AS cor0
----
-32
-60
-74

query I rowsort
SELECT ALL col2 + ( + col2 ) FROM tab2
----
52
54
76

query I rowsort
SELECT ALL 38 * - col1 * + col0 + + col1 FROM tab1
----
-24310
-2938
-39507

onlyif mysql # use DIV operator for integer division
query I rowsort label-711
SELECT ALL + col1 + - col2 DIV col1 AS col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-711
SELECT ALL + col1 + - col2 / col1 AS col2 FROM tab0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-712
SELECT - CAST( col2 AS SIGNED ) + - col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

skipif mysql # not compatible
query I rowsort label-712
SELECT - CAST ( col2 AS INTEGER ) + - col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT - 79 - - 24 FROM tab2 AS cor0
----
-55

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-715
SELECT ALL - col2 * cor0.col0 DIV + col1 + - col2 + + col0 AS col0 FROM tab1 AS cor0
----
-357
-57
-606

skipif mysql # not compatible
query I rowsort label-715
SELECT ALL - col2 * cor0.col0 / + col1 + - col2 + + col0 AS col0 FROM tab1 AS cor0
----
-357
-57
-606

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

query I rowsort
SELECT + + 59 * - col1 + col0 FROM tab2 AS cor0
----
-1822
-3403
-924

query I rowsort
SELECT ALL 39 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

query I rowsort
SELECT + 8 * col1 AS col2 FROM tab0 AS cor0
----
688
728
776

query I rowsort
SELECT + - col1 * col0 + + 6 FROM tab0 AS cor0
----
-2058
-3389
-8093

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

skipif mysql # not compatible
query I rowsort label-721
SELECT + col0 + - col2 / 54 AS col0 FROM tab2 AS cor0
----
7
78
79

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

query I rowsort
SELECT + + col2 + + ( 41 ) FROM tab0 AS cor0
----
123
42
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-724
SELECT + + col2 * + col2 + col1 DIV + col0 FROM tab1 AS cor0
----
2924
3249
9216

skipif mysql # not compatible
query I rowsort label-724
SELECT + + col2 * + col2 + col1 / + col0 FROM tab1 AS cor0
----
2924
3249
9216

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL - ( col1 ) + - col1 AS col2 FROM tab1
----
-20
-26
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-727
SELECT DISTINCT - col1 + + col1 DIV col0 + + 67 AS col1 FROM tab2
----
40
50
8

skipif mysql # not compatible
query I rowsort label-727
SELECT DISTINCT - col1 + + col1 / col0 + + 67 AS col1 FROM tab2
----
40
50
8

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

query I rowsort
SELECT ALL + col1 + col2 * + col1 * - col0 FROM tab1
----
-36470
-4186
-99827

query I rowsort
SELECT ( + 17 ) AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-732
SELECT DISTINCT - - col0 + col0 DIV + col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-732
SELECT DISTINCT - - col0 + col0 / + col0 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT ALL + + col0 + + cor0.col2 * cor0.col1 * + col1 FROM tab0 AS cor0
----
244092
679131
9444

query I rowsort
SELECT - 44 * - col1 + - cor0.col1 FROM tab2 cor0
----
1333
2537
731

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

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

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

skipif mysql # not compatible
query I rowsort label-736
SELECT - ( tab1.col0 ) / col2 AS col1 FROM tab1
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 10 * + col2 col2 FROM tab0
----
10
330
820

query I rowsort
SELECT + 64 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

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

query I rowsort
SELECT ALL col1 + + col0 * 92 FROM tab2
----
675
7235
7285

query I rowsort
SELECT ALL + 28 + col1 AS col0 FROM tab2
----
45
59
87

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

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

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

query I rowsort
SELECT DISTINCT - col2 * - 57 AS col1 FROM tab2
----
1482
1539
2166

onlyif mysql # use DIV operator for integer division
query I rowsort label-746
SELECT + col2 * 56 - tab1.col1 DIV tab1.col2 AS col0 FROM tab1
----
3024
3192
5376

skipif mysql # not compatible
query I rowsort label-746
SELECT + col2 * 56 - tab1.col1 / tab1.col2 AS col0 FROM tab1
----
3024
3192
5376

query I rowsort
SELECT + col0 * + 81 - col1 FROM tab2
----
536
6259
6382

query I rowsort
SELECT - col0 + + tab1.col2 * + tab1.col2 AS col2 FROM tab1
----
2913
3185
9136

query I rowsort
SELECT ALL + 75 - - col1 * col2 FROM tab0
----
172
2913
7537

onlyif mysql # use DIV operator for integer division
query I rowsort label-750
SELECT - + ( 14 ) DIV col1 FROM tab1 cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-750
SELECT - + ( 14 ) / col1 FROM tab1 cor0
----
-1
-1
0

query I rowsort
SELECT + + ( 74 ) * cor0.col0 AS col1 FROM tab2 AS cor0
----
518
5772
5846

query I rowsort
SELECT DISTINCT - 31 * ( col0 ) FROM tab1 AS cor0
----
-1984
-2480
-93

query I rowsort
SELECT DISTINCT + ( col1 ) * col0 + cor0.col0 * + 18 AS col0 FROM tab1 AS cor0
----
132
1792
2480

query I rowsort
SELECT ALL cor0.col0 * - 18 FROM tab0 cor0
----
-1602
-432
-630

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

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

query I rowsort
SELECT - ( 36 ) + + cor0.col1 + + col1 AS col1 FROM tab2 AS cor0
----
-2
26
82

query I rowsort
SELECT - col1 + 45 FROM tab1 cor0
----
19
32
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-758
SELECT + - ( + col0 ) + col2 + + col0 DIV 12 AS col1 FROM tab2 AS cor0
----
-35
-46
20

skipif mysql # not compatible
query I rowsort label-758
SELECT + - ( + col0 ) + col2 + + col0 / 12 AS col1 FROM tab2 AS cor0
----
-35
-46
20

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

query I rowsort
SELECT DISTINCT - col2 * 50 * - col0 FROM tab1 AS cor0
----
182400
384000
8100

onlyif mysql # use DIV operator for integer division
query I rowsort label-761
SELECT 32 DIV 89 + tab1.col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-761
SELECT 32 / 89 + tab1.col2 FROM tab1
----
54
57
96

query I rowsort
SELECT + 40 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 98 * - col2 * col2 col2 FROM tab0
----
-106722
-658952
-98

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

query I rowsort
SELECT ALL 74 * cor0.col1 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 2bc65e52b35c1e02e7c244003eb6ecdb

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 60 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

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

query I rowsort
SELECT ALL + 99 + - 23 AS col0 FROM tab1 AS cor0
----
76
76
76

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-771
SELECT DISTINCT + CAST( 50 AS SIGNED ) * + col1 + col0 * 84 AS col0 FROM tab0 AS cor0
----
12026
6316
7790

skipif mysql # not compatible
query I rowsort label-771
SELECT DISTINCT + CAST ( 50 AS INTEGER ) * + col1 + col0 * 84 AS col0 FROM tab0 AS cor0
----
12026
6316
7790

query I rowsort
SELECT - 59 + - col1 AS col1 FROM tab1 cor0
----
-69
-72
-85

query I rowsort
SELECT DISTINCT + 10 * + cor0.col0 * ( col1 + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
47360
74400
870

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

query I rowsort
SELECT DISTINCT - - 59 * col0 FROM tab2 AS cor0
----
413
4602
4661

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * - cor0.col2 - + col1 * - col2 col1 FROM tab2 AS cor0
----
1292
1674
3068

query I rowsort
SELECT 1 + - cor0.col0 FROM tab0 AS cor0
----
-23
-34
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-779
SELECT DISTINCT 17 DIV + col0 + col2 AS col0 FROM tab2 AS cor0
----
26
29
38

skipif mysql # not compatible
query I rowsort label-779
SELECT DISTINCT 17 / + col0 + col2 AS col0 FROM tab2 AS cor0
----
26
29
38

query I rowsort
SELECT DISTINCT col2 + col2 - - col0 * + ( cor0.col0 ) FROM tab2 AS cor0
----
103
6136
6317

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-782
SELECT ALL - 97 - - col2 DIV col0 FROM tab2
----
-94
-97
-97

skipif mysql # not compatible
query I rowsort label-782
SELECT ALL - 97 - - col2 / col0 FROM tab2
----
-94
-97
-97

query I rowsort
SELECT ALL - ( + ( - col2 ) ) + 67 - - col0 AS col1 FROM tab2
----
101
171
184

query I rowsort
SELECT DISTINCT + tab2.col1 - - 11 * + tab2.col0 FROM tab2
----
108
886
917

query I rowsort
SELECT DISTINCT + 4 + - col1 FROM tab2 cor0
----
-13
-27
-55

query I rowsort
SELECT + - 63 + - col2 - 43 AS col0 FROM tab1 AS cor0
----
-160
-163
-202

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-788
SELECT - 65 + col0 DIV col0 + 52 AS col1 FROM tab2 AS cor0
----
-12
-12
-12

skipif mysql # not compatible
query I rowsort label-788
SELECT - 65 + col0 / col0 + 52 AS col1 FROM tab2 AS cor0
----
-12
-12
-12

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

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

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

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

query I rowsort
SELECT ALL + col0 * col0 * col2 + col1 FROM tab1 AS cor0
----
233482
512
614413

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

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

query I rowsort
SELECT ALL - col2 + - 26 AS col2 FROM tab2 AS cor0
----
-52
-53
-64

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

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

query I rowsort
SELECT col0 + - ( 66 ) AS col0 FROM tab1 AS cor0
----
-2
-63
14

query I rowsort
SELECT + 28 FROM tab2, tab2 cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT ALL col0 * 31 AS col0 FROM tab1
----
1984
2480
93

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + 53 col2 FROM tab0 AS cor0
----
135
54
86

query I rowsort
SELECT ALL cor0.col1 - + 96 * 10 FROM tab0 cor0
----
-863
-869
-874

query I rowsort
SELECT + col0 + col1 + col1 AS col0 FROM tab2 cor0
----
113
196
69

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-803
SELECT DISTINCT col1 * tab2.col1 DIV - 77 AS col0 FROM tab2
----
-12
-3
-45

skipif mysql # not compatible
query I rowsort label-803
SELECT DISTINCT col1 * tab2.col1 / - 77 AS col0 FROM tab2
----
-12
-3
-45

query I rowsort
SELECT DISTINCT col0 + 35 AS col0 FROM tab1 AS cor0
----
115
38
99

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

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

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

query I rowsort
SELECT ALL + + col1 * 27 - col0 FROM tab0 AS cor0
----
2298
2368
2584

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

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

query I rowsort
SELECT - 97 * ( col2 * 36 ) FROM tab1 cor0
----
-188568
-199044
-335232

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

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

query I rowsort
SELECT 82 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 660751b3166f5cb8964b7ef659605795

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-814
SELECT col1 DIV - col1 + 31 * col2 AS col1 FROM tab0
----
1022
2541
30

skipif mysql # not compatible
query I rowsort label-814
SELECT col1 / - col1 + 31 * col2 AS col1 FROM tab0
----
1022
2541
30

query I rowsort
SELECT ALL - 63 * + cor0.col0 FROM tab2 AS cor0
----
-441
-4914
-4977

query I rowsort
SELECT DISTINCT - 66 + - col0 AS col1 FROM tab0 cor0
----
-101
-155
-90

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

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

query I rowsort
SELECT DISTINCT - col2 + cor0.col0 + col2 AS col1 FROM tab2 AS cor0
----
7
78
79

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

query I rowsort
SELECT + col1 * cor0.col1 + col0 + col2 * - col1 AS col2 FROM tab1 AS cor0
----
-406
-725
-999

onlyif mysql # use DIV operator for integer division
query I rowsort label-822
SELECT + ( - col2 ) + + col0 DIV - col1 + - col1 AS col2 FROM tab1 AS cor0
----
-115
-73
-80

skipif mysql # not compatible
query I rowsort label-822
SELECT + ( - col2 ) + + col0 / - col1 + - col1 AS col2 FROM tab1 AS cor0
----
-115
-73
-80

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 86 * col0 col0 FROM tab2 cor0
----
-602
-6708
-6794

query I rowsort
SELECT col1 * col2 + + col0 + + col1 FROM tab0 AS cor0
----
229
2948
7642

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

query I rowsort
SELECT + + col0 + + cor0.col2 + col0 FROM tab1 cor0
----
185
256
60

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

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

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

query I rowsort
SELECT DISTINCT - ( - 40 ) * + cor0.col2 FROM tab0 cor0
----
1320
3280
40

query I rowsort
SELECT 9 + cor0.col2 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 62eabbed21c8d12c3a0b7b427fb027f8

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

query I rowsort
SELECT ALL 25 + col2 AS col0 FROM tab0
----
107
26
58

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

query I rowsort
SELECT ALL 43 + tab2.col2 * + col1 FROM tab2
----
1577
689
880

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

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 WHERE ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT + cor0.col1 * - cor0.col1 FROM tab0 AS cor0 WHERE NOT ( NULL ) > ( NULL )
----

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

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

query I rowsort
SELECT col2 * - col2 + + col2 * + col0 AS col0 FROM tab2 AS cor0
----
-540
1352
1558

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

query I rowsort
SELECT - cor0.col0 * col2 FROM tab1 AS cor0 WHERE NOT ( cor0.col0 ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL col1 * + col2 - tab2.col2 AS col2 FROM tab2 WHERE NOT ( - col2 - - col1 * col1 / tab2.col0 ) NOT IN ( - col2 )
----

query I rowsort
SELECT ALL col0 * col2 + col2 * tab1.col0 - col2 FROM tab1
----
15264
270
7239

query III rowsort
SELECT * FROM tab1 WHERE NOT - col0 <= NULL
----

query I rowsort
SELECT DISTINCT col0 + - cor0.col2 AS col0 FROM tab0 cor0 WHERE ( - col2 ) > ( NULL )
----

query IIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 WHERE NULL NOT BETWEEN ( NULL ) AND NULL
----

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

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

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

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

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

query I rowsort
SELECT - col2 * col2 + + col0 * col0 FROM tab0
----
-513
1197
1224

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

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

query I rowsort
SELECT - col1 + - col2 - col1 * col2 AS col1 FROM tab0 AS cor0
----
-195
-2957
-7635

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 col1 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-860
SELECT col2 * + CAST( col0 AS SIGNED ) AS col2 FROM tab2
----
189
2028
3002

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

query I rowsort
SELECT DISTINCT + - ( 74 ) * + col0 FROM tab0 AS cor0
----
-1776
-2590
-6586

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 40 + 16 col0 FROM tab0 AS cor0
----
56
56
56

query I rowsort
SELECT col2 + 37 FROM tab0
----
119
38
70

query I rowsort
SELECT DISTINCT + col0 - - col0 * + 19 FROM tab1
----
1280
1600
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 - 12 col1 FROM tab2
----
-38
-39
-50

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

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

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

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

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

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

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

query I rowsort
SELECT + ( 13 ) FROM tab1
----
13
13
13

query I rowsort
SELECT ALL + - col0 + col2 + - col0 * - col1 AS col2 FROM tab2 AS cor0
----
1302
237
4550

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

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

skipif mysql # not compatible
query I rowsort label-874
SELECT DISTINCT cor0.col1 / col1 + col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT ALL 3 AS col0 FROM tab1, tab0, tab0 AS cor0, tab0 AS cor1
----
81 values hashing to c7bd37716aa9c76e684a54f53d1ee343

onlyif mysql # use DIV operator for integer division
query I rowsort label-876
SELECT 97 DIV cor0.col2 FROM tab2, tab1 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-876
SELECT 97 / cor0.col2 FROM tab2, tab1 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT - col0 * + col0 - + ( - 41 ) FROM tab0
----
-1184
-535
-7880

query I rowsort
SELECT + tab2.col0 - 49 FROM tab2, tab1 AS cor0
----
9 values hashing to 6fa7788285c309983693ceba2282f85b

query I rowsort
SELECT ALL + ( + 74 ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT - cor0.col1 + col2 * - 42 AS col0 FROM tab2 AS cor0
----
-1151
-1165
-1613

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-882
SELECT ALL cor0.col1 - + CAST( 51 AS SIGNED ) FROM tab1 AS cor0
----
-25
-38
-41

skipif mysql # not compatible
query I rowsort label-882
SELECT ALL cor0.col1 - + CAST ( 51 AS INTEGER ) FROM tab1 AS cor0
----
-25
-38
-41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-883
SELECT col0 * CAST( col0 AS SIGNED ) * cor0.col2 FROM tab0 AS cor0
----
1225
19008
649522

skipif mysql # not compatible
query I rowsort label-883
SELECT col0 * CAST ( col0 AS INTEGER ) * cor0.col2 FROM tab0 AS cor0
----
1225
19008
649522

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

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

query I rowsort
SELECT - col2 * tab0.col2 * 67 + col2 AS col2 FROM tab0
----
-450426
-66
-72930

onlyif mysql # use DIV operator for integer division
query I rowsort label-886
SELECT - 35 * tab1.col2 * col2 + + col2 DIV + col1 AS col2 FROM tab1
----
-102058
-113710
-322553

skipif mysql # not compatible
query I rowsort label-886
SELECT - 35 * tab1.col2 * col2 + + col2 / + col1 AS col2 FROM tab1
----
-102058
-113710
-322553

query I rowsort
SELECT - col0 * - col0 + 95 * col0 FROM tab2
----
13494
13746
714

onlyif mysql # use DIV operator for integer division
query I rowsort label-888
SELECT - cor0.col2 DIV ( col0 + + col0 ) FROM tab1 AS cor0
----
-9
0
0

skipif mysql # not compatible
query I rowsort label-888
SELECT - cor0.col2 / ( col0 + + col0 ) FROM tab1 AS cor0
----
-9
0
0

query I rowsort
SELECT ALL + col1 + 11 - col0 * + col2 FROM tab2 AS cor0
----
-147
-1958
-2974

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + 23 + + col1 * - cor0.col1 col2 FROM tab2 AS cor0
----
-2124
-248
102

onlyif mysql # use DIV operator for integer division
query I rowsort label-891
SELECT DISTINCT + col2 DIV - col1 + - col1 * col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-891
SELECT DISTINCT + col2 / - col1 + - col1 * col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

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

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

skipif mysql # not compatible
query I rowsort label-893
SELECT ALL + col1 * - CAST ( - col1 AS INTEGER ) FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + 63 col2 FROM tab2 AS cor0
----
-15
-16
56

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

query I rowsort
SELECT DISTINCT + col1 * col1 * + col1 + col1 FROM tab2
----
205438
29822
4930

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

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

query I rowsort
SELECT ( col0 * + col0 ) + 4 AS col2 FROM tab0
----
1229
580
7925

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

query I rowsort
SELECT DISTINCT + 97 + col1 FROM tab1 AS cor0
----
107
110
123

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 * col1 col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT - - col1 * 95 + col2 * ( col1 ) FROM tab0 cor0
----
11008
16107
9312

query I rowsort
SELECT DISTINCT - - 31 * cor0.col1 FROM tab0 AS cor0
----
2666
2821
3007

query I rowsort
SELECT 60 - - col1 FROM tab1 AS cor0
----
70
73
86

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

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

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

skipif mysql # not compatible
query I rowsort label-908
SELECT DISTINCT ( 71 ) / col0 FROM tab2 AS cor0
----
0
10

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

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

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

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

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

query I rowsort
SELECT + 78 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

query I rowsort
SELECT + - 48 * col2 FROM tab1 cor0
----
-2592
-2736
-4608

query I rowsort
SELECT + 14 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

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

query I rowsort
SELECT + - col1 + + col0 * + 5 * + col1 FROM tab0 AS cor0
----
10234
16878
40404

query I rowsort
SELECT col2 * - col1 * 57 FROM tab1 AS cor0
----
-32490
-71136
-80028

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

query I rowsort
SELECT ALL + col2 + col1 * 59 FROM tab1 AS cor0
----
1588
647
863

onlyif mysql # use DIV operator for integer division
query I rowsort label-921
SELECT DISTINCT + col2 DIV 99 + col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-921
SELECT DISTINCT + col2 / 99 + col2 FROM tab1
----
54
57
96

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

query I rowsort
SELECT 36 * + col2 + tab0.col2 * - ( tab0.col1 * - col2 + col2 * col2 ) AS col1 FROM tab0
----
132
58905
63468

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

skipif mysql # not compatible
query I rowsort label-924
SELECT CAST ( 74 AS INTEGER ) * + col2 FROM tab2 AS cor0
----
1924
1998
2812

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

query I rowsort
SELECT DISTINCT - - ( col1 ) + + 34 AS col2 FROM tab2 cor0
----
51
65
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-927
SELECT + col2 + - cor0.col2 DIV + col1 FROM tab1 AS cor0
----
52
52
89

skipif mysql # not compatible
query I rowsort label-927
SELECT + col2 + - cor0.col2 / + col1 FROM tab1 AS cor0
----
52
52
89

query I rowsort
SELECT + 24 + col1 AS col1 FROM tab0 AS cor0
----
110
115
121

query I rowsort
SELECT + - 47 + - col0 - 28 AS col2 FROM tab2 AS cor0
----
-153
-154
-82

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

skipif mysql # not compatible
query I rowsort label-930
SELECT - + col2 + + col2 / 3 AS col0 FROM tab0 AS cor0
----
-1
-22
-55

query I rowsort
SELECT DISTINCT cor0.col2 * - ( 41 ) * + col2 FROM tab1 AS cor0
----
-119556
-133209
-377856

query I rowsort
SELECT - col1 * + 24 FROM tab1 cor0
----
-240
-312
-624

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

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

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

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

skipif mysql # not compatible
query I rowsort label-935
SELECT DISTINCT col1 + CAST ( + ( - col2 ) AS INTEGER ) * ( col0 ) FROM tab2 cor0
----
-158
-1969
-2985

query I rowsort
SELECT + col1 * - 65 AS col0 FROM tab1 cor0
----
-1690
-650
-845

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-937
SELECT DISTINCT col1 * CAST( - col1 AS SIGNED ) FROM tab1 AS cor0
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort label-937
SELECT DISTINCT col1 * CAST ( - col1 AS INTEGER ) FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-938
SELECT ALL col2 DIV 40 + 27 AS col2 FROM tab1 AS cor0
----
28
28
29

skipif mysql # not compatible
query I rowsort label-938
SELECT ALL col2 / 40 + 27 AS col2 FROM tab1 AS cor0
----
28
28
29

query I rowsort
SELECT col0 + cor0.col2 * + col0 * - 80 FROM tab0 AS cor0
----
-2765
-583751
-63336

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-941
SELECT ( col0 ) * col0 DIV - 38 FROM tab2 AS cor0
----
-1
-160
-164

skipif mysql # not compatible
query I rowsort label-941
SELECT ( col0 ) * col0 / - 38 FROM tab2 AS cor0
----
-1
-160
-164

onlyif mysql # use DIV operator for integer division
query I rowsort label-942
SELECT - 25 DIV - 43 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-942
SELECT - 25 / - 43 FROM tab1 cor0
----
0
0
0

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

query I rowsort
SELECT - + col2 + - 88 FROM tab1 AS cor0
----
-142
-145
-184

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

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

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

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

query I rowsort
SELECT + 47 + + col0 FROM tab2 AS cor0
----
125
126
54

query I rowsort
SELECT DISTINCT - col0 + col0 * - 6 FROM tab1 AS cor0
----
-21
-448
-560

query I rowsort
SELECT + col1 * col2 + + col1 * - col1 FROM tab1
----
1079
470
728

query I rowsort
SELECT + 16 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

query I rowsort
SELECT - 69 FROM tab1, tab0 cor0, tab2 cor1
----
27 values hashing to ca5f4bc365dc2c6b14187d6ffc83a01d

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 81 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

query I rowsort
SELECT + ( - 57 ) FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to 0b74bbd7631afe9b2eeb9f18b9dc6505

query I rowsort
SELECT - 73 + col2 AS col0 FROM tab0
----
-40
-72
9

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-957
SELECT col2 * + col1 / + col1 col0 FROM tab2 AS cor0
----
26
27
38

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

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

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

query I rowsort
SELECT + + col2 * 93 AS col0 FROM tab0 cor0
----
3069
7626
93

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

query I rowsort
SELECT DISTINCT cor0.col2 * 58 FROM tab1 AS cor0
----
3132
3306
5568

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 * + col1 col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-964
SELECT DISTINCT + col2 DIV 5 - + ( col1 * + col1 ) FROM tab2 AS cor0
----
-282
-3476
-956

skipif mysql # not compatible
query I rowsort label-964
SELECT DISTINCT + col2 / 5 - + ( col1 * + col1 ) FROM tab2 AS cor0
----
-282
-3476
-956

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

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

query I rowsort
SELECT DISTINCT - col0 * 10 AS col0 FROM tab0 AS cor0
----
-240
-350
-890

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

query I rowsort
SELECT col2 * col0 + cor0.col2 * cor0.col0 + + col1 AS col0 FROM tab1 AS cor0
----
15373
350
7306

query I rowsort
SELECT ALL - 32 * cor0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to eae5c0e4679b2adb33231e50215302dc

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

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

query I rowsort
SELECT ALL tab2.col0 * + tab2.col0 * - col0 + - 80 * 92 AS col1 FROM tab2
----
-481912
-500399
-7703

onlyif mysql # use DIV operator for integer division
query I rowsort label-972
SELECT ALL - col1 DIV col0 + cor0.col2 * + cor0.col1 FROM tab2 cor0
----
1534
646
833

skipif mysql # not compatible
query I rowsort label-972
SELECT ALL - col1 / col0 + cor0.col2 * + cor0.col1 FROM tab2 cor0
----
1534
646
833

query I rowsort
SELECT DISTINCT + ( col2 ) * - cor0.col2 + 2 FROM tab1 cor0
----
-2914
-3247
-9214

query I rowsort
SELECT ALL + - 33 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-2112
-2640
-99

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

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

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

skipif mysql # not compatible
query I rowsort label-976
SELECT ALL + CAST ( + col1 AS INTEGER ) + + cor0.col2 + - col0 * - col0 AS col0 FROM tab2 AS cor0
----
107
6169
6296

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-977
SELECT DISTINCT CAST( + 74 AS SIGNED ) + col2 FROM tab0 AS cor0
----
107
156
75

skipif mysql # not compatible
query I rowsort label-977
SELECT DISTINCT CAST ( + 74 AS INTEGER ) + col2 FROM tab0 AS cor0
----
107
156
75

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-979
SELECT ALL + 55 DIV + col0 FROM tab1 AS cor0
----
0
0
18

skipif mysql # not compatible
query I rowsort label-979
SELECT ALL + 55 / + col0 FROM tab1 AS cor0
----
0
0
18

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

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

query I rowsort
SELECT ALL + cor0.col0 * + col1 * col1 AS col0 FROM tab0 AS cor0
----
177504
329315
737009

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-985
SELECT DISTINCT - 32 DIV + col0 AS col1 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-985
SELECT DISTINCT - 32 / + col0 AS col1 FROM tab0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col2 ) + col1 * col2 col0 FROM tab1
----
1344
1458
627

query I rowsort
SELECT DISTINCT + 72 * cor0.col2 AS col2 FROM tab1, tab1 AS cor0
----
3888
4104
6912

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

query I rowsort
SELECT DISTINCT cor0.col0 * + col2 * - col1 + - ( col1 ) + - col0 AS col0 FROM tab1 AS cor0
----
-36554
-4241
-99933

query I rowsort
SELECT DISTINCT + 17 * col1 FROM tab0 cor0
----
1462
1547
1649

query I rowsort
SELECT - 24 * + col0 AS col2 FROM tab1 AS cor0
----
-1536
-1920
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 58 + + col2 * + col2 col0 FROM tab1 AS cor0
----
2858
3191
9158

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-995
SELECT - - 5 * col2 * - col0 + - col1 DIV - col1 AS col1 FROM tab1 AS cor0
----
-18239
-38399
-809

skipif mysql # not compatible
query I rowsort label-995
SELECT - - 5 * col2 * - col0 + - col1 / - col1 AS col1 FROM tab1 AS cor0
----
-18239
-38399
-809

query I rowsort
SELECT - - 89 + col0 * col0 AS col1 FROM tab0 AS cor0
----
1314
665
8010

query I rowsort
SELECT - col1 * col0 * 67 FROM tab0
----
-138288
-227465
-542633

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

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

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

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

query I rowsort
SELECT ALL ( cor0.col2 ) + col0 * col0 AS col0 FROM tab2 AS cor0
----
6110
6279
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-1002
SELECT ALL + col1 * col1 * col1 + col2 DIV - col1 FROM tab0 AS cor0
----
636056
753571
912673

skipif mysql # not compatible
query I rowsort label-1002
SELECT ALL + col1 * col1 * col1 + col2 / - col1 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT - - 46 * col0 FROM tab0 AS cor0
----
1104
1610
4094

onlyif mysql # use DIV operator for integer division
query I rowsort label-1004
SELECT DISTINCT col2 DIV 65 - col0 FROM tab1
----
-3
-64
-79

skipif mysql # not compatible
query I rowsort label-1004
SELECT DISTINCT col2 / 65 - col0 FROM tab1
----
-3
-64
-79

query I rowsort
SELECT col0 + + col1 * + col2 + + col1 AS col1 FROM tab2
----
1671
742
875

query I rowsort
SELECT col1 + 94 * col2 AS col2 FROM tab0
----
191
3188
7799

query I rowsort
SELECT DISTINCT + col2 - - 29 AS col2 FROM tab2
----
55
56
67

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - + col1 * cor0.col1 col1 FROM tab1 cor0
----
-156
-650
-90

query I rowsort
SELECT DISTINCT - - col2 + 90 FROM tab0 AS cor0
----
123
172
91

query I rowsort
SELECT DISTINCT ( 54 ) * - col0 FROM tab0 AS cor0
----
-1296
-1890
-4806

query I rowsort
SELECT - col2 * 11 + + cor0.col1 FROM tab1 AS cor0
----
-1043
-568
-617

query I rowsort
SELECT DISTINCT - col2 + - 27 AS col0 FROM tab0 AS cor0
----
-109
-28
-60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1014
SELECT - CAST( NULL AS SIGNED ) / + col1 + col0 * ( col2 ) * - 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-1014
SELECT - CAST ( NULL AS INTEGER ) / + col1 + col0 * ( col2 ) * - col2 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col1 + col1 * + col0 * col0 FROM tab1 AS cor0
----
208
40950
83187

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

query I rowsort
SELECT ALL - col0 - 28 * - col2 FROM tab0 AS cor0
----
-7
2207
900

query I rowsort
SELECT - 45 + + col2 FROM tab1 AS cor0
----
12
51
9

query I rowsort
SELECT ALL - col2 * 81 * - col2 FROM tab0 AS cor0
----
544644
81
88209

query I rowsort
SELECT 11 + col1 AS col1 FROM tab2
----
28
42
70

query I rowsort
SELECT 90 * + col1 + - tab0.col1 AS col0 FROM tab0
----
7654
8099
8633

query I rowsort
SELECT DISTINCT ( - col0 * tab1.col0 ) AS col0 FROM tab1
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1023
SELECT col0 + col2 DIV + col2 AS col2 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-1023
SELECT col0 + col2 / + col2 AS col2 FROM tab1
----
4
65
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-1024
SELECT tab0.col2 DIV 5 FROM tab0
----
0
16
6

skipif mysql # not compatible
query I rowsort label-1024
SELECT tab0.col2 / 5 FROM tab0
----
0
16
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1025
SELECT + tab2.col2 DIV + 72 AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1025
SELECT + tab2.col2 / + 72 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT - cor0.col0 * 86 FROM tab0 cor0
----
-2064
-3010
-7654

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1029
SELECT col0 / + CAST ( cor0.col1 AS INTEGER ) + - col1 / - col1 col0 FROM tab2 AS cor0
----
1
2
5

query I rowsort
SELECT ALL col2 + + ( 21 ) AS col2 FROM tab2 AS cor0
----
47
48
59

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

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

query I rowsort
SELECT col1 + 42 * col0 AS col2 FROM tab2 AS cor0
----
325
3335
3335

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col0 * col0 AS REAL ) FROM tab2
----
49
6084
6241

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 37 * col1 + + cor0.col1 col2 FROM tab2 AS cor0
----
-1116
-2124
-612

query I rowsort
SELECT + + 57 * 32 + + col0 FROM tab1 AS cor0
----
1827
1888
1904

query I rowsort
SELECT DISTINCT - + col2 + - ( - col2 ) * - 15 AS col1 FROM tab2 AS cor0
----
-416
-432
-608

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

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

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

query I rowsort
SELECT - 44 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 38f05fdaaf15e64b62f27cd96f73fb79

query I rowsort
SELECT ALL cor0.col1 * - cor0.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 75a608bf2ba236d24f146ac4aff9ec52

query I rowsort
SELECT DISTINCT - ( + col2 ) * + col0 + 22 FROM tab2 AS cor0
----
-167
-2006
-2980

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS 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-1045
SELECT - 19 DIV + col0 + 37 FROM tab0 AS cor0
----
37
37
37

skipif mysql # not compatible
query I rowsort label-1045
SELECT - 19 / + col0 + 37 FROM tab0 AS cor0
----
37
37
37

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * col2 col1 FROM tab1 cor0
----
1248
1404
570

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

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

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

query I rowsort
SELECT ALL + 17 * + cor1.col2 AS col0 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to 7f8606dc8608a54f07dec074fa67d4d4

query I rowsort
SELECT - 63 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

query I rowsort
SELECT col0 * 60 AS col2 FROM tab1 AS cor0
----
180
3840
4800

onlyif mysql # use DIV operator for integer division
query I rowsort label-1054
SELECT ALL col0 DIV - 72 + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-81

skipif mysql # not compatible
query I rowsort label-1054
SELECT ALL col0 / - 72 + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-81

query I rowsort
SELECT DISTINCT + + cor0.col0 * - 27 FROM tab1, tab2 AS cor0
----
-189
-2106
-2133

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

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

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

query I rowsort
SELECT ALL - cor0.col2 + 7 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to 6ee46bbd7683b9e3ed4df0348ee760ab

query I rowsort
SELECT col0 + 23 + + col1 AS col1 FROM tab0
----
133
155
203

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 ) * - col0 + 73 col1 FROM tab1 AS cor0
----
235
3721
7753

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + 95 AS REAL ) + col2 AS col0 FROM tab0 cor0
----
-13
-62
-94

query I rowsort
SELECT cor1.col1 AS col0 FROM tab2, tab1 cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT col2 + - col0 * col1 * col0 AS col0 FROM tab1 AS cor0
----
-180
-40903
-83104

query I rowsort
SELECT ALL col1 * - 20 FROM tab1 AS cor0
----
-200
-260
-520

query I rowsort
SELECT 42 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

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

query I rowsort
SELECT cor0.col0 + - cor0.col2 - 6 FROM tab2 cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 0108978236b179f3bf7891e763841c07

query I rowsort
SELECT DISTINCT col1 - - 71 * - col0 AS col0 FROM tab2 AS cor0
----
-466
-5479
-5592

query I rowsort
SELECT + 34 * 53 + col1 AS col0 FROM tab1 AS cor0
----
1812
1815
1828

onlyif mysql # use DIV operator for integer division
query I rowsort label-1071
SELECT - col2 DIV + col0 + + 70 AS col2 FROM tab1
----
52
69
70

skipif mysql # not compatible
query I rowsort label-1071
SELECT - col2 / + col0 + + 70 AS col2 FROM tab1
----
52
69
70

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

query I rowsort
SELECT - 63 + col0 FROM tab0 cor0
----
-28
-39
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 14 * col1 col1 FROM tab2 AS cor0
----
-238
-434
-826

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

skipif mysql # not compatible
query I rowsort label-1075
SELECT DISTINCT col1 / 67 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT col2 * - 42 + + col0 AS col2 FROM tab2 cor0
----
-1014
-1127
-1517

query I rowsort
SELECT 98 * col2 + + col0 * tab1.col2 - col2 FROM tab1
----
16992
5400
9177

query I rowsort
SELECT ALL 48 * - col1 * + ( 30 * tab1.col0 ) + - ( col0 ) * col1 - + tab1.col1 AS col1 FROM tab1
----
-112424
-1498653
-922250

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - col0 - - col1 col2 FROM tab0
----
148
159
93

query I rowsort
SELECT DISTINCT + ( - col2 ) * 71 AS col1 FROM tab0
----
-2343
-5822
-71

query I rowsort
SELECT 11 AS col2 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

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

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

query I rowsort
SELECT - col0 * + 92 + + col1 AS col0 FROM tab2 AS cor0
----
-613
-7117
-7251

query I rowsort
SELECT DISTINCT 38 * + col1 AS col2 FROM tab2
----
1178
2242
646

query I rowsort
SELECT ALL + 10 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

onlyif mysql # use DIV operator for integer division
query I rowsort label-1087
SELECT ALL + 57 DIV + col1 FROM tab2
----
0
1
3

skipif mysql # not compatible
query I rowsort label-1087
SELECT ALL + 57 / + col1 FROM tab2
----
0
1
3

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1089
SELECT col2 * 69 DIV 4 FROM tab0 cor0
----
1414
17
569

skipif mysql # not compatible
query I rowsort label-1089
SELECT col2 * 69 / 4 FROM tab0 cor0
----
1414
17
569

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1091
SELECT + + col1 DIV CAST( - col2 AS SIGNED ) FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-1091
SELECT + + col1 / CAST ( - col2 AS INTEGER ) FROM tab0 AS cor0
----
-1
-2
-97

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

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

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

query I rowsort
SELECT DISTINCT col0 * 85 + col0 * col0 FROM tab2 cor0
----
12714
12956
644

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

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

query I rowsort
SELECT + + 44 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT col2 * 49 + - col2 * 18 AS col1 FROM tab1 cor0
----
1674
1767
2976

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

query I rowsort
SELECT - + col0 * - 65 + + col2 AS col1 FROM tab1 cor0
----
249
4217
5296

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

skipif mysql # not compatible
query I rowsort label-1100
SELECT - col1 * + col1 + col0 * - CAST ( col1 * col1 AS INTEGER ) FROM tab2 AS cor0
----
-23120
-274999
-7688

query I rowsort
SELECT ALL + col2 + - ( - ( col1 ) ) * - col2 * + tab2.col0 FROM tab2
----
-119626
-50996
-5832

onlyif mysql # use DIV operator for integer division
query I rowsort label-1102
SELECT DISTINCT - col0 DIV 99 + col2 * - col2 AS col2 FROM tab0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-1102
SELECT DISTINCT - col0 / 99 + col2 * - col2 AS col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT col2 - - 38 * tab2.col1 FROM tab2
----
1205
2268
684

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col2 + col0 + 69 col0 FROM tab1 AS cor0
----
-1099
-1332
-437

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

query I rowsort
SELECT ALL col1 - + col1 * 78 FROM tab0 AS cor0
----
-6622
-7007
-7469

query I rowsort
SELECT ALL + - col2 + - col1 + - col1 * - col0 FROM tab2 AS cor0
----
1288
159
4517

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - col2 col1 FROM tab1 AS cor0
----
-108
-114
-192

onlyif mysql # use DIV operator for integer division
query I rowsort label-1109
SELECT DISTINCT col2 DIV + col2 + 18 + - cor0.col2 FROM tab0 AS cor0
----
-14
-63
18

skipif mysql # not compatible
query I rowsort label-1109
SELECT DISTINCT col2 / + col2 + 18 + - cor0.col2 FROM tab0 AS cor0
----
-14
-63
18

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

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

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

query I rowsort
SELECT DISTINCT col0 + + col2 * + 58 FROM tab0 AS cor0
----
1938
4845
93

query I rowsort
SELECT ALL - 87 * 40 FROM tab0
----
-3480
-3480
-3480

query I rowsort
SELECT - tab2.col0 + + 81 * - col2 FROM tab2
----
-2184
-2194
-3157

query I rowsort
SELECT ALL col1 + col1 * + 11 + + 7 * col0 AS col1 FROM tab0 cor0
----
1200
1409
1715

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

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

query I rowsort
SELECT DISTINCT + col0 * col0 + - col0 * + 96 + col0 FROM tab2 AS cor0
----
-1264
-1326
-616

query I rowsort
SELECT - + 13 * + col0 FROM tab1 AS cor0
----
-1040
-39
-832

query I rowsort
SELECT DISTINCT 7 * col1 AS col0 FROM tab2 AS cor0
----
119
217
413

query I rowsort
SELECT 40 * col1 + - col1 FROM tab2
----
1209
2301
663

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 WHERE NOT NULL IN ( cor0.col1 )
----

query I rowsort
SELECT + col0 + + 59 FROM tab1
----
123
139
62

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

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

query I rowsort
SELECT ( - col2 ) + - col2 * + cor0.col0 * col2 FROM tab2 AS cor0
----
-114114
-5130
-52754

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

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

query I rowsort
SELECT 33 + col2 * cor0.col2 FROM tab0 AS cor0
----
1122
34
6757

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

skipif mysql # not compatible
query I rowsort label-1129
SELECT DISTINCT + 94 / col2 FROM tab0
----
1
2
94

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1131
SELECT - + col0 - + cor0.col2 DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-1131
SELECT - + col0 - + cor0.col2 / cor0.col2 AS col1 FROM tab1 AS cor0
----
-4
-65
-81

query I rowsort
SELECT + col2 * col2 + 86 * - cor0.col1 * col0 FROM tab2 AS cor0
----
-114054
-17933
-395096

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

skipif mysql # not compatible
query I rowsort label-1133
SELECT cor0.col1 + - col2 / + ( col2 * + col2 ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ( col0 ) * col0 + col2 * - col2 FROM tab1
----
-2816
-2907
847

query I rowsort
SELECT col2 + col0 + - col1 * col2 FROM tab0
----
-2781
-61
-7291

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

skipif mysql # not compatible
query I rowsort label-1136
SELECT DISTINCT + tab1.col0 * CAST ( NULL AS REAL ) AS col2 FROM tab1, tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1137
SELECT + col0 + tab1.col0 DIV col1 FROM tab1
----
3
70
86

skipif mysql # not compatible
query I rowsort label-1137
SELECT + col0 + tab1.col0 / col1 FROM tab1
----
3
70
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-1138
SELECT ALL - - cor0.col0 DIV - col1 + 12 + + col1 * - col2 FROM tab2 AS cor0
----
-1523
-638
-825

skipif mysql # not compatible
query I rowsort label-1138
SELECT ALL - - cor0.col0 / - col1 + 12 + + col1 * - col2 FROM tab2 AS cor0
----
-1523
-638
-825

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

query I rowsort
SELECT DISTINCT - - 72 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
72

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 * - col0 col2 FROM tab0
----
-1225
-19008
-649522

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

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

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

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

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

query I rowsort
SELECT ALL 64 * - col1 FROM tab1
----
-1664
-640
-832

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

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

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

query I rowsort
SELECT - col1 * + col2 * + col2 AS col0 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT col2 + + col1 * - 77 * + 54 AS col1 FROM tab1 AS cor0
----
-108054
-41523
-53958

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

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

query I rowsort
SELECT - - 70 + + col0 * - col2 FROM tab2 AS cor0
----
-119
-1958
-2932

query I rowsort
SELECT DISTINCT + 22 + - cor0.col0 FROM tab2 AS cor0
----
-56
-57
15

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

skipif mysql # not compatible
query I rowsort label-1159
SELECT 93 / col2 FROM tab1 AS cor0
----
0
1
1

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

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

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

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

query I rowsort
SELECT - 90 * col0 + cor0.col2 AS col2 FROM tab2 AS cor0
----
-603
-6994
-7072

onlyif mysql # use DIV operator for integer division
query I rowsort label-1164
SELECT - tab1.col0 DIV tab1.col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1164
SELECT - tab1.col0 / tab1.col0 FROM tab1
----
-1
-1
-1

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

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

query I rowsort
SELECT ALL 62 + col1 FROM tab1 AS cor0
----
72
75
88

query I rowsort
SELECT ALL + col1 + col0 * 91 * col1 AS col0 FROM tab2 AS cor0
----
122230
19778
418841

query I rowsort
SELECT DISTINCT - - col1 + + 77 * 8 * cor0.col0 FROM tab2 AS cor0
----
4343
48107
48681

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

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

skipif mysql # not compatible
query I rowsort label-1170
SELECT DISTINCT + ( + cor0.col0 ) + + col0 * + CAST ( - cor0.col1 + - col0 AS INTEGER ) FROM tab1 AS cor0
----
-4672
-7360
-84

query I rowsort
SELECT DISTINCT ( col2 ) * + col1 + - 63 FROM tab1 AS cor0
----
1185
1341
507

query I rowsort
SELECT ALL col2 * - 66 FROM tab2 cor0
----
-1716
-1782
-2508

query I rowsort
SELECT - ( - col0 ) + col1 FROM tab1
----
29
74
93

query I rowsort
SELECT + 75 * - col1 AS col2 FROM tab1
----
-1950
-750
-975

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1177
SELECT ( tab1.col1 ) + col1 DIV 82 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1177
SELECT ( tab1.col1 ) + col1 / 82 FROM tab1
----
10
13
26

query I rowsort
SELECT col2 + + 21 - + col2 FROM tab0
----
21
21
21

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1183
SELECT - tab1.col1 * + col0 DIV - col0 + + ( - col1 * + col1 ) AS col1 FROM tab1
----
-156
-650
-90

skipif mysql # not compatible
query I rowsort label-1183
SELECT - tab1.col1 * + col0 / - col0 + + ( - col1 * + col1 ) AS col1 FROM tab1
----
-156
-650
-90

query I rowsort
SELECT - + 45 * - 29 FROM tab1 AS cor0
----
1305
1305
1305

query I rowsort
SELECT + col0 * ( cor0.col2 * + col2 ) FROM tab0 AS cor0
----
26136
35
598436

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

query I rowsort
SELECT DISTINCT + + 66 - cor0.col0 FROM tab0 AS cor0
----
-23
31
42

query I rowsort
SELECT ALL - 91 * col1 AS col1 FROM tab2 AS cor0
----
-1547
-2821
-5369

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

query I rowsort
SELECT ALL - 76 * col1 AS col1 FROM tab0
----
-6536
-6916
-7372

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

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

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

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

query I rowsort
SELECT + col0 + 36 AS col1 FROM tab2
----
114
115
43

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

query I rowsort
SELECT + col1 * 89 + col2 FROM tab2
----
1551
2786
5277

query I rowsort
SELECT DISTINCT col2 + - 83 FROM tab2 AS cor0
----
-45
-56
-57

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1199
SELECT + col0 DIV 63 + + col1 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-288
-3480
-961

skipif mysql # not compatible
query I rowsort label-1199
SELECT + col0 / 63 + + col1 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-288
-3480
-961

query I rowsort
SELECT ALL + col1 + + col0 * col2 * col0 AS col0 FROM tab2 AS cor0
----
1354
158243
237175

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

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

query I rowsort
SELECT ALL ( col1 ) + cor0.col1 AS col1 FROM tab0 AS cor0
----
172
182
194

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

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

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

query I rowsort
SELECT 78 * + ( col2 ) AS col1 FROM tab1 AS cor0
----
4212
4446
7488

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

query I rowsort
SELECT ALL 75 * col0 + + col0 FROM tab0 AS cor0
----
1824
2660
6764

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

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

skipif mysql # not compatible
query I rowsort label-1211
SELECT + CAST ( + 91 AS INTEGER ) * col1 AS col2 FROM tab0 AS cor0
----
7826
8281
8827

query I rowsort
SELECT ALL col1 + + 67 * col0 * + 18 AS col1 FROM tab1 AS cor0
----
3644
77194
96493

query I rowsort
SELECT DISTINCT tab0.col0 * - ( col0 * tab0.col1 + 88 ) FROM tab0
----
-121905
-51648
-728643

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1215
SELECT ALL - tab2.col2 * - cor0.col1 - 10 DIV 64 col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to beb2df893579871bcb51459c78b13f94

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1215
SELECT ALL - tab2.col2 * - cor0.col1 - 10 / 64 col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to beb2df893579871bcb51459c78b13f94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1216
SELECT CAST( cor0.col2 AS SIGNED ) FROM tab2, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

skipif mysql # not compatible
query I rowsort label-1216
SELECT CAST ( cor0.col2 AS INTEGER ) FROM tab2, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT col1 * + ( 93 ) FROM tab0
----
7998
8463
9021

query I rowsort
SELECT - col2 * - 93 + col0 FROM tab2 AS cor0
----
2496
2518
3613

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

skipif mysql # not compatible
query I rowsort label-1219
SELECT - - col0 / 74 AS col1 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT ( + ( - cor0.col2 ) ) + - 90 FROM tab0 AS cor0
----
-123
-172
-91

query I rowsort
SELECT ( col1 ) + - col1 * ( + 69 + + col2 ) AS col0 FROM tab0 AS cor0
----
-13650
-6693
-8686

query I rowsort
SELECT + - 11 + col1 AS col1 FROM tab2 AS cor0
----
20
48
6

query I rowsort
SELECT + col1 * 13 + col0 FROM tab2 AS cor0
----
300
410
845

query I rowsort
SELECT + 88 + cor0.col1 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 92f87f957233febfe86bc179f47367c2

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

query I rowsort
SELECT - 22 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

query I rowsort
SELECT - 1 * 84 FROM tab2 AS cor0
----
-84
-84
-84

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

query I rowsort
SELECT + col1 * + cor0.col2 + - col0 * + col2 + - col2 AS col2 FROM tab0 AS cor0
----
2013
61
82

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

query I rowsort
SELECT DISTINCT 71 + - col2 AS col1 FROM tab1 AS cor0
----
-25
14
17

query I rowsort
SELECT 84 + + col0 FROM tab1 cor0
----
148
164
87

query I rowsort
SELECT + cor0.col2 + - col1 - - cor0.col1 FROM tab0 AS cor0
----
1
33
82

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

skipif mysql # not compatible
query I rowsort label-1234
SELECT - 75 / + col0 AS col0 FROM tab2 AS cor0
----
-10
0
0

query I rowsort
SELECT cor0.col0 + col0 * cor0.col1 - + 11 * - col0 AS col0 FROM tab1 cor0
----
114
1408
2000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 * + col0 + - col0 col0 FROM tab1 cor0
----
-276
-5888
-7360

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

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

query I rowsort
SELECT col2 + - 64 FROM tab0 cor0
----
-31
-63
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1240
SELECT + CAST( NULL AS SIGNED ) * - cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1240
SELECT + CAST ( NULL AS INTEGER ) * - cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1243
SELECT + - col1 + + col2 DIV col2 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-1243
SELECT + - col1 + + col2 / col2 FROM tab0 AS cor0
----
-85
-90
-96

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1245
SELECT DISTINCT + col0 DIV + col0 + - 69 AS col1 FROM tab1 AS cor0
----
-68

skipif mysql # not compatible
query I rowsort label-1245
SELECT DISTINCT + col0 / + col0 + - 69 AS col1 FROM tab1 AS cor0
----
-68

query I rowsort
SELECT DISTINCT - - col2 * ( - ( col2 ) ) + col2 AS col2 FROM tab2 cor0
----
-1406
-650
-702

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

query I rowsort
SELECT + col0 * 59 FROM tab1 cor0
----
177
3776
4720

query I rowsort
SELECT col2 * + col0 + - cor0.col1 * col1 AS col1 FROM tab0 AS cor0
----
-6604
-9374
-983

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

query I rowsort
SELECT - col2 + - 48 FROM tab1 AS cor0
----
-102
-105
-144

query I rowsort
SELECT + 54 + - cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cf09b04c50431c9929957b9b0227f082

query I rowsort
SELECT col2 - 75 FROM tab2 AS cor0
----
-37
-48
-49

query I rowsort
SELECT - col0 * 64 AS col2 FROM tab2 AS cor0
----
-448
-4992
-5056

query I rowsort
SELECT - 48 FROM tab0, tab1 cor0
----
9 values hashing to 31c94943c073954e4ca20b170ab61f8c

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

query I rowsort
SELECT 76 * col2 AS col1 FROM tab2 AS cor0
----
1976
2052
2888

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1263
SELECT ALL col2 DIV col1 + col0 + + col1 AS col2 FROM tab0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-1263
SELECT ALL col2 / col1 + col0 + + col1 AS col2 FROM tab0
----
110
132
180

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1266
SELECT col0 + col2 DIV + col2 col2 FROM tab0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1266
SELECT col0 + col2 / + col2 col2 FROM tab0
----
25
36
90

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

query I rowsort
SELECT 6 * col2 + 81 * - cor0.col2 AS col2 FROM tab0 cor0
----
-2475
-6150
-75

query I rowsort
SELECT DISTINCT 91 + - cor2.col2 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
-5
34
37

query I rowsort
SELECT 14 + col2 AS col0 FROM tab2 AS cor0
----
40
41
52

query I rowsort
SELECT ALL 85 * col2 * - ( col2 * cor0.col0 ) AS col0 FROM tab2 AS cor0
----
-433755
-4481880
-9696460

query I rowsort
SELECT DISTINCT 93 + col0 * 24 AS col0 FROM tab2 cor0
----
1965
1989
261

query I rowsort
SELECT + 79 + + cor0.col2 FROM tab2 AS cor0
----
105
106
117

query I rowsort
SELECT cor1.col1 AS col1 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT - 53 * cor0.col1 FROM tab0 AS cor0
----
-4558
-4823
-5141

query I rowsort
SELECT ALL + col1 * + col0 + col1 + + tab0.col0 * col1 * col2 AS col1 FROM tab0
----
672308
6887
70262

onlyif mysql # use DIV operator for integer division
query I rowsort label-1277
SELECT DISTINCT col0 * + col2 DIV + col2 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-1277
SELECT DISTINCT col0 * + col2 / + col2 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col0 + col1 col1 FROM tab0
----
133
143
262

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

query I rowsort
SELECT ALL - col1 * col0 + + col2 + col0 FROM tab2
----
-1226
-183
-4498

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1282
SELECT ALL tab1.col1 * - col2 DIV - col2 AS col1 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1282
SELECT ALL tab1.col1 * - col2 / - col2 AS col1 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-1283
SELECT DISTINCT col1 DIV - col2 + col0 + tab0.col1 FROM tab0
----
108
179
35

skipif mysql # not compatible
query I rowsort label-1283
SELECT DISTINCT col1 / - col2 + col0 + tab0.col1 FROM tab0
----
108
179
35

query I rowsort
SELECT ALL col1 + + col1 + - col0 FROM tab0
----
148
159
93

query I rowsort
SELECT - col2 FROM tab0 AS cor0 WHERE NOT NULL <> NULL
----

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

query I rowsort
SELECT + col1 * - col0 FROM tab2 WHERE col2 NOT IN ( col0 )
----
-1343
-217
-4602

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT + col1 * col0 + - col1 <> ( col2 )
----

query III rowsort
SELECT ALL * FROM tab1 WHERE col0 - - col0 IN ( tab1.col2 )
----

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

query I rowsort
SELECT + col2 + col2 + - col1 * col0 FROM tab1
----
-526
-848
30

query I rowsort
SELECT + col2 * - col0 AS col0 FROM tab2 WHERE NOT - col2 * - col0 <> NULL
----

query I rowsort
SELECT tab1.col1 AS col1 FROM tab1 WHERE NULL NOT BETWEEN NULL AND col2 + col1
----

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

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

query I rowsort
SELECT ALL col2 * + col2 + - col1 * col1 FROM tab1
----
2240
3149
9047

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

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

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

query I rowsort
SELECT - ( - 63 ) + - cor0.col1 FROM tab0 AS cor0
----
-23
-28
-34

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

query I rowsort
SELECT ALL - 94 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

onlyif mysql # use DIV operator for integer division
query I rowsort label-1302
SELECT DISTINCT 77 DIV - col1 AS col0 FROM tab2
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-1302
SELECT DISTINCT 77 / - col1 AS col0 FROM tab2
----
-1
-2
-4

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

query I rowsort
SELECT + 94 AS col0 FROM tab1
----
94
94
94

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

query I rowsort
SELECT ALL + - col0 - - col2 * + col1 * + col1 AS col2 FROM tab1 AS cor0
----
16144
36501
5636

query I rowsort
SELECT - col2 + - 50 AS col1 FROM tab1 AS cor0
----
-104
-107
-146

onlyif mysql # use DIV operator for integer division
query I rowsort label-1308
SELECT ALL 73 DIV - col1 + col1 + cor0.col0 * + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-26050
-598345
62

skipif mysql # not compatible
query I rowsort label-1308
SELECT ALL 73 / - col1 + col1 + cor0.col0 * + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-26050
-598345
62

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

query I rowsort
SELECT 46 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

query I rowsort
SELECT tab0.col2 * tab0.col0 + - 69 AS col2 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 7734d8073525055306fa87be8d3f57f8

query I rowsort
SELECT ALL ( col2 ) + + 51 * col0 FROM tab0
----
1257
1786
4621

query I rowsort
SELECT + col2 + tab0.col2 * 71 * col2 + - tab0.col1 * - col0 FROM tab0
----
3467
485585
79416

query I rowsort
SELECT DISTINCT - 24 + - col2 FROM tab1
----
-120
-78
-81

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1316
SELECT ALL col0 * - col1 + + col2 DIV ( col1 ) col0 FROM tab1
----
-1033
-635
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1316
SELECT ALL col0 * - col1 + + col2 / ( col1 ) col0 FROM tab1
----
-1033
-635
-76

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

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

query I rowsort
SELECT - - col0 + - 56 FROM tab2 AS cor0
----
-49
22
23

query I rowsort
SELECT DISTINCT - col0 * + 39 * col1 + col1 FROM tab2 AS cor0
----
-179419
-52360
-8432

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

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

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

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

query I rowsort
SELECT DISTINCT col0 * - 38 + col0 * + col1 AS col2 FROM tab0 AS cor0
----
1152
2065
4717

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + 71 col0 FROM tab2 AS cor0
----
109
97
98

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

skipif mysql # not compatible
query I rowsort label-1325
SELECT ALL - - col0 + col1 / 64 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT + + col0 + - 57 AS col1 FROM tab1 AS cor0
----
-54
23
7

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

query I rowsort
SELECT + col1 + - col2 * ( + col2 + col1 * + 21 ) FROM tab0 AS cor0
----
-163335
-1941
-60601

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

query I rowsort
SELECT DISTINCT + + col1 + col0 * - cor0.col0 * col0 + ( - col1 ) AS col0 FROM tab2 AS cor0
----
-343
-474552
-493039

query I rowsort
SELECT ALL col1 * + 77 AS col0 FROM tab2 cor0
----
1309
2387
4543

query I rowsort
SELECT + col1 * - col1 + - col1 * + col1 FROM tab0 AS cor0
----
-14792
-16562
-18818

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

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

query I rowsort
SELECT ALL + + 27 + col2 FROM tab1 AS cor0
----
123
81
84

query I rowsort
SELECT DISTINCT + 76 + - col2 * col2 FROM tab0
----
-1013
-6648
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-1336
SELECT 45 DIV + tab2.col0 FROM tab2
----
0
0
6

skipif mysql # not compatible
query I rowsort label-1336
SELECT 45 / + tab2.col0 FROM tab2
----
0
0
6

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

skipif mysql # not compatible
query I rowsort label-1337
SELECT col2 / ( - col0 * 69 ) AS col1 FROM tab0
----
0
0
0

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

skipif mysql # not compatible
query I rowsort label-1338
SELECT DISTINCT - col2 * col0 * + CAST ( - ( + tab2.col0 ) AS INTEGER ) AS col1 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT - col1 + col0 + + col2 * 33 FROM tab1
----
1759
1935
3235

query I rowsort
SELECT - + 69 * + col2 + - col2 FROM tab1 AS cor0
----
-3780
-3990
-6720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( cor0.col1 ) + - col1 col0 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT - 73 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 2931474b870c05694e446771031a6949

query I rowsort
SELECT - col1 * - col0 + - col1 * col1 FROM tab1
----
-598
540
871

query I rowsort
SELECT - col2 + + ( - col2 ) * - col2 FROM tab0
----
0
1056
6642

query I rowsort
SELECT - col1 + + 93 AS col1 FROM tab1
----
67
80
83

query I rowsort
SELECT ALL - col0 * 62 + 15 AS col0 FROM tab0 AS cor0
----
-1473
-2155
-5503

query I rowsort
SELECT + col2 + col0 * - col1 * + col0 FROM tab0 AS cor0
----
-118824
-49503
-720729

query I rowsort
SELECT ALL + - 43 * 94 AS col0 FROM tab2, tab0, tab1 AS cor0, tab1
----
81 values hashing to de35b324ee04fa4ba5e8b52a20f12923

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

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

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

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

query I rowsort
SELECT 8 * - col1 AS col1 FROM tab1 AS cor0
----
-104
-208
-80

query I rowsort
SELECT 8 FROM tab0, tab1 cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

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

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

query I rowsort
SELECT - 33 * 4 FROM tab1 AS cor0
----
-132
-132
-132

query I rowsort
SELECT 28 * - col2 FROM tab2 AS cor0
----
-1064
-728
-756

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

query I rowsort
SELECT ALL ( col1 ) * col2 * + col1 AS col1 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT ALL + 80 + ( col1 ) * col0 AS col0 FROM tab0 AS cor0
----
2144
3475
8179

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

skipif mysql # not compatible
query I rowsort label-1361
SELECT DISTINCT 6 / - col1 FROM tab2 AS cor0
----
0

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

skipif mysql # not compatible
query I rowsort label-1362
SELECT - col1 + col0 / + col0 FROM tab1 cor0
----
-12
-25
-9

query I rowsort
SELECT DISTINCT + + 35 + cor0.col0 FROM tab0 AS cor0
----
124
59
70

query I rowsort
SELECT + 60 * - 58 FROM tab2 AS cor0
----
-3480
-3480
-3480

query I rowsort
SELECT DISTINCT 36 * col2 AS col0 FROM tab0 AS cor0
----
1188
2952
36

query I rowsort
SELECT - 1 + - col1 FROM tab1 AS cor0
----
-11
-14
-27

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

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

query I rowsort
SELECT ALL + cor0.col2 * + col2 + - 53 + cor0.col1 * col2 FROM tab1 AS cor0
----
10411
3766
4267

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 99 + col1 col1 FROM tab1 AS cor0
----
-73
-86
-89

query I rowsort
SELECT ALL 25 - + cor0.col0 FROM tab1 AS cor0
----
-39
-55
22

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

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

query I rowsort
SELECT ALL 96 * col0 + col1 * + 85 * col0 AS col0 FROM tab1 AS cor0
----
60544
6918
96080

onlyif mysql # use DIV operator for integer division
query I rowsort label-1374
SELECT ALL tab2.col0 DIV + col0 AS col2 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1374
SELECT ALL tab2.col0 / + col0 AS col2 FROM tab2
----
1
1
1

query I rowsort
SELECT - + col2 * 95 + col2 + col0 AS col1 FROM tab2 AS cor0
----
-2366
-2531
-3493

query I rowsort
SELECT + col2 * 80 AS col0 FROM tab0 AS cor0
----
2640
6560
80

query I rowsort
SELECT + + col2 * 95 + ( col0 ) AS col1 FROM tab2 AS cor0
----
2548
2572
3689

query I rowsort
SELECT DISTINCT - col2 * 69 + - col2 AS col2 FROM tab1 AS cor0
----
-3780
-3990
-6720

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

query I rowsort
SELECT ALL + col2 + 20 AS col2 FROM tab2 AS cor0
----
46
47
58

query I rowsort
SELECT + tab2.col1 * - tab0.col2 FROM tab2, tab1, tab1 AS cor0, tab0
----
81 values hashing to cc1a396fb45af6abcfb2c5894b259e5c

query I rowsort
SELECT DISTINCT + - col0 * 89 AS col0 FROM tab1 AS cor0
----
-267
-5696
-7120

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

query I rowsort
SELECT + 22 + - cor0.col1 AS col0 FROM tab1 cor0
----
-4
12
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1385
SELECT ALL - ( + cor0.col2 ) + col0 DIV + col0 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-1385
SELECT ALL - ( + cor0.col2 ) + col0 / + col0 FROM tab0 AS cor0
----
-32
-81
0

query I rowsort
SELECT col2 - + 31 FROM tab2
----
-4
-5
7

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

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

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

query I rowsort
SELECT DISTINCT col1 + - 57 AS col2 FROM tab1 AS cor0
----
-31
-44
-47

query I rowsort
SELECT ALL col2 + 76 + - col2 * - col2 AS col1 FROM tab1 AS cor0
----
3046
3382
9388

query I rowsort
SELECT ALL - 78 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * - 61 col2 FROM tab2 AS cor0
----
1586
1647
2318

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

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

query I rowsort
SELECT ALL col1 * 32 AS col2 FROM tab1 AS cor0
----
320
416
832

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

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

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

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

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

query I rowsort
SELECT + col0 + col0 * 51 FROM tab1 AS cor0
----
156
3328
4160

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1405
SELECT ALL - + col2 * - col1 * col1 + + col0 DIV ( col0 ) + + col2 FROM tab2 AS cor0
----
11021
25975
90533

skipif mysql # not compatible
query I rowsort label-1405
SELECT ALL - + col2 * - col1 * col1 + + col0 / ( col0 ) + + col2 FROM tab2 AS cor0
----
11021
25975
90533

query I rowsort
SELECT DISTINCT + col0 * - 88 + col2 AS col2 FROM tab0
----
-2079
-3079
-7750

query I rowsort
SELECT DISTINCT 85 * - tab0.col2 AS col0 FROM tab0, tab0 AS cor0
----
-2805
-6970
-85

query I rowsort
SELECT + - 91 * 47 FROM tab0 AS cor0
----
-4277
-4277
-4277

query I rowsort
SELECT DISTINCT 89 + col0 FROM tab2
----
167
168
96

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

query I rowsort
SELECT + 92 * ( + col2 * - col0 ) AS col2 FROM tab1 AS cor0
----
-14904
-335616
-706560

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 + - col1 col2 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT - 62 * - col1 AS col1 FROM tab1 AS cor0
----
1612
620
806

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1419
SELECT DISTINCT - 78 DIV cor0.col0 + 33 AS col0 FROM tab2 AS cor0
----
22
32
33

skipif mysql # not compatible
query I rowsort label-1419
SELECT DISTINCT - 78 / cor0.col0 + 33 AS col0 FROM tab2 AS cor0
----
22
32
33

query I rowsort
SELECT ALL + col2 * col1 * 15 - 46 AS col2 FROM tab1 cor0
----
18674
21014
8504

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

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

query I rowsort
SELECT DISTINCT - 91 * col0 AS col2 FROM tab1 AS cor0
----
-273
-5824
-7280

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

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

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

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

query I rowsort
SELECT DISTINCT - 61 + + col1 AS col1 FROM tab0 AS cor0
----
25
30
36

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

query I rowsort
SELECT ALL + 64 AS col0 FROM tab0
----
64
64
64

query I rowsort
SELECT DISTINCT + - cor1.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-1
-33
-82

query I rowsort
SELECT + 40 * - cor0.col1 FROM tab0 AS cor0
----
-3440
-3640
-3880

query I rowsort
SELECT - 72 * - col2 + 18 AS col1 FROM tab2 AS cor0
----
1890
1962
2754

onlyif mysql # use DIV operator for integer division
query I rowsort label-1433
SELECT + + 3 + + col2 + col0 DIV 2 AS col1 FROM tab2 AS cor0
----
33
68
80

skipif mysql # not compatible
query I rowsort label-1433
SELECT + + 3 + + col2 + col0 / 2 AS col1 FROM tab2 AS cor0
----
33
68
80

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

query I rowsort
SELECT + - col1 * - 95 * - col2 FROM tab1 AS cor0
----
-118560
-133380
-54150

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

skipif mysql # not compatible
query I rowsort label-1436
SELECT - col0 + - col2 / - col0 AS col2 FROM tab0 AS cor0
----
-23
-35
-89

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1, tab0 cor0 WHERE NULL > NULL
----

query IIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 WHERE NOT tab1.col2 < ( NULL )
----

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

query I rowsort
SELECT DISTINCT - 32 * col0 FROM tab1 AS cor0
----
-2048
-2560
-96

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab1, tab2 cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT - 94 * + 54 + cor0.col1 FROM tab2 AS cor0
----
-5017
-5045
-5059

query I rowsort
SELECT ALL - + 11 AS col1 FROM tab2 AS cor0
----
-11
-11
-11

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1445
SELECT DISTINCT - col0 DIV + 60 + col0 FROM tab1
----
3
63
79

skipif mysql # not compatible
query I rowsort label-1445
SELECT DISTINCT - col0 / + 60 + col0 FROM tab1
----
3
63
79

query I rowsort
SELECT - 92 + 84 AS col2 FROM tab1
----
-8
-8
-8

query I rowsort
SELECT ALL + - 84 FROM tab0 cor0
----
-84
-84
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-1448
SELECT ALL - ( + col1 + + col2 ) DIV 33 FROM tab0
----
-2
-3
-5

skipif mysql # not compatible
query I rowsort label-1448
SELECT ALL - ( + col1 + + col2 ) / 33 FROM tab0
----
-2
-3
-5

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1451
SELECT DISTINCT + tab1.col1 + col0 DIV 12 FROM tab1
----
15
19
26

skipif mysql # not compatible
query I rowsort label-1451
SELECT DISTINCT + tab1.col1 + col0 / 12 FROM tab1
----
15
19
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-1452
SELECT + col0 * tab1.col0 DIV - col0 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-1452
SELECT + col0 * tab1.col0 / - col0 FROM tab1
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1453
SELECT ALL col1 * - CAST( col0 + col2 * + ( col0 ) AS SIGNED ) AS col2 FROM tab2
----
-124254
-52377
-6076

skipif mysql # not compatible
query I rowsort label-1453
SELECT ALL col1 * - CAST ( col0 + col2 * + ( col0 ) AS INTEGER ) AS col2 FROM tab2
----
-124254
-52377
-6076

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

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

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

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

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

query I rowsort
SELECT DISTINCT + - 54 * - col1 AS col2 FROM tab0 AS cor0
----
4644
4914
5238

query I rowsort
SELECT ALL + ( col0 ) * cor0.col0 + col2 FROM tab2 AS cor0
----
6110
6279
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-1461
SELECT ALL - 95 + + col1 DIV 18 AS col2 FROM tab1 AS cor0
----
-94
-95
-95

skipif mysql # not compatible
query I rowsort label-1461
SELECT ALL - 95 + + col1 / 18 AS col2 FROM tab1 AS cor0
----
-94
-95
-95

query I rowsort
SELECT DISTINCT - 63 * - 30 + - cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
1831
1859
1873

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 * + col0 col2 FROM tab1 AS cor0
----
285
6080
7600

query I rowsort
SELECT DISTINCT - 32 + col1 FROM tab2
----
-1
-15
27

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 92 - col2 col2 FROM tab1
----
-4
35
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1467
SELECT ALL - - col0 * col0 + - ( col0 ) * col1 - col2 DIV + col1 FROM tab2 AS cor0
----
-168
1482
4896

skipif mysql # not compatible
query I rowsort label-1467
SELECT ALL - - col0 * col0 + - ( col0 ) * col1 - col2 / + col1 FROM tab2 AS cor0
----
-168
1482
4896

query I rowsort
SELECT ALL - col0 * - col0 * + 40 AS col1 FROM tab0
----
23040
316840
49000

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - - 86 * - col0 + col0 * - 98 - col2 * col1 AS col0 FROM tab2 AS cor0
----
-15182
-15886
-2125

query I rowsort
SELECT 32 + + col0 AS col1 FROM tab0 AS cor0
----
121
56
67

query I rowsort
SELECT DISTINCT + 55 + + col2 AS col2 FROM tab0 cor0
----
137
56
88

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

skipif mysql # not compatible
query I rowsort label-1479
SELECT col2 / + 31 AS col0 FROM tab2 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1480
SELECT + col1 DIV - 24 + + col2 - + col1 AS col2 FROM tab0 AS cor0
----
-100
-12
-56

skipif mysql # not compatible
query I rowsort label-1480
SELECT + col1 / - 24 + + col2 - + col1 AS col2 FROM tab0 AS cor0
----
-100
-12
-56

query I rowsort
SELECT - - 28 * col2 + - col0 FROM tab2 AS cor0
----
650
749
985

query I rowsort
SELECT 35 * + col2 AS col1 FROM tab0
----
1155
2870
35

query I rowsort
SELECT + 69 + col1 * + cor0.col1 FROM tab2 AS cor0
----
1030
3550
358

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

query I rowsort
SELECT - 78 * + col1 FROM tab2
----
-1326
-2418
-4602

query I rowsort
SELECT DISTINCT ( - col1 + - tab2.col0 ) * col1 AS col1 FROM tab2
----
-1178
-1632
-8083

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 * - col1 col0 FROM tab2 AS cor0
----
-1156
-2108
-4012

onlyif mysql # use DIV operator for integer division
query I rowsort label-1488
SELECT ALL col0 * - col2 * + col1 + col0 DIV 72 + + col0 FROM tab1 cor0
----
-36416
-4209
-99759

skipif mysql # not compatible
query I rowsort label-1488
SELECT ALL col0 * - col2 * + col1 + col0 / 72 + + col0 FROM tab1 cor0
----
-36416
-4209
-99759

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1492
SELECT ALL + + cor0.col0 * col1 * - col2 + + CAST( + col1 * - col0 AS SIGNED ) FROM tab1 AS cor0
----
-100880
-37120
-4290

skipif mysql # not compatible
query I rowsort label-1492
SELECT ALL + + cor0.col0 * col1 * - col2 + + CAST ( + col1 * - col0 AS INTEGER ) FROM tab1 AS cor0
----
-100880
-37120
-4290

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

query I rowsort
SELECT ALL - - 80 + + 79 AS col2 FROM tab2 AS cor0
----
159
159
159

query I rowsort
SELECT DISTINCT + + 41 + + cor0.col2 FROM tab2 AS cor0
----
67
68
79

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( - col0 AS REAL ) + col1 * 91 AS col0 FROM tab2 cor0
----
1468
2814
5291

query I rowsort
SELECT DISTINCT + cor0.col1 * 87 FROM tab2 AS cor0
----
1479
2697
5133

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

query I rowsort
SELECT - col2 * - 14 + + tab1.col0 AS col0 FROM tab1
----
1424
759
862

query I rowsort
SELECT ALL 47 * 58 FROM tab0, tab1 AS cor0
----
9 values hashing to ed7566e127e49d26a05c6e4b3e55f92d

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1504
SELECT + CAST( col2 AS SIGNED ) + col1 col1 FROM tab2
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1504
SELECT + CAST ( col2 AS INTEGER ) + col1 col1 FROM tab2
----
55
58
85

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

query I rowsort
SELECT col2 + 21 FROM tab2 AS cor0
----
47
48
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-1507
SELECT ALL + 45 DIV 84 - col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-1507
SELECT ALL + 45 / 84 - col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - 42 * cor0.col0 + - col2 FROM tab2 cor0
----
-321
-3302
-3356

onlyif mysql # use DIV operator for integer division
query I rowsort label-1509
SELECT ALL col0 DIV - col2 + + col2 DIV + 9 AS col0 FROM tab1 AS cor0
----
10
5
6

skipif mysql # not compatible
query I rowsort label-1509
SELECT ALL col0 / - col2 + + col2 / + 9 AS col0 FROM tab1 AS cor0
----
10
5
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - col0 col1 FROM tab1
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 72 * col1 col0 FROM tab1
----
-1872
-720
-936

onlyif mysql # use DIV operator for integer division
query I rowsort label-1512
SELECT - 11 DIV col1 + - ( + col0 ) + col2 AS col0 FROM tab1 AS cor0
----
-8
16
51

skipif mysql # not compatible
query I rowsort label-1512
SELECT - 11 / col1 + - ( + col0 ) + col2 AS col0 FROM tab1 AS cor0
----
-8
16
51

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

query I rowsort
SELECT ALL - - col1 + + ( - col0 ) * col0 * + cor0.col0 FROM tab1 cor0
----
-1
-262134
-511987

query I rowsort
SELECT DISTINCT + + col0 + - col2 * - col0 + col0 * - ( col1 ) FROM tab1 AS cor0
----
3072
6720
87

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

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

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

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

query I rowsort
SELECT ALL + 3 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to 3e22859a313d85a6146c6df5f23d77cf

query I rowsort
SELECT col0 * + 68 + 4 AS col1 FROM tab1 AS cor0
----
208
4356
5444

query I rowsort
SELECT DISTINCT + col1 * col2 * col0 + col0 AS col2 FROM tab2 AS cor0
----
119730
51113
5866

query I rowsort
SELECT - col2 * cor0.col1 + - col1 * + col2 + + col1 AS col1 FROM tab1 AS cor0
----
-1130
-2483
-2782

query I rowsort
SELECT ALL col0 * + 56 + - col0 FROM tab1 AS cor0
----
165
3520
4400

onlyif mysql # use DIV operator for integer division
query I rowsort label-1524
SELECT DISTINCT - col0 DIV 71 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-1524
SELECT DISTINCT - col0 / 71 FROM tab1 AS cor0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1525
SELECT - col0 DIV col1 + col0 * + col0 - 81 FROM tab0 AS cor0
----
1144
495
7840

skipif mysql # not compatible
query I rowsort label-1525
SELECT - col0 / col1 + col0 * + col0 - 81 FROM tab0 AS cor0
----
1144
495
7840

query I rowsort
SELECT + col0 + + 37 * - col0 + cor0.col0 * col2 FROM tab1 AS cor0
----
1344
4800
54

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

query I rowsort
SELECT ALL 63 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

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

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

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

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

query I rowsort
SELECT col2 * - cor0.col0 + - col2 * - ( - cor0.col0 ) FROM tab1 AS cor0
----
-15360
-324
-7296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 + + col1 * + 24 col1 FROM tab0 AS cor0
----
2138
2258
2402

query I rowsort
SELECT - col0 + col1 * ( tab2.col2 + - col0 ) AS col0 FROM tab2
----
-3146
-776
613

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

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

query I rowsort
SELECT DISTINCT - col0 * col2 * 55 FROM tab1
----
-200640
-422400
-8910

query I rowsort
SELECT tab0.col0 * tab0.col2 + 16 AS col0 FROM tab0
----
51
7314
808

query I rowsort
SELECT ALL 94 * col2 + - 64 * + ( col0 + - col2 ) FROM tab1
----
10048
4910
8340

query I rowsort
SELECT - 75 * col2 + 81 FROM tab0 AS cor0
----
-2394
-6069
6

query I rowsort
SELECT + 52 + col1 * + col2 AS col1 FROM tab1 AS cor0
----
1300
1456
622

query I rowsort
SELECT col2 * + ( 21 ) FROM tab2 AS cor0
----
546
567
798

query I rowsort
SELECT + 17 FROM tab2, tab0 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT ALL - - 59 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT ALL + col2 + 7 - 91 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-603
-7065
-7144

query I rowsort
SELECT DISTINCT - col1 + - 49 AS col1 FROM tab2 AS cor0
----
-108
-66
-80

query I rowsort
SELECT - 47 * col0 + - col0 * col0 AS col0 FROM tab1 AS cor0
----
-10160
-150
-7104

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

skipif mysql # not compatible
query I rowsort label-1548
SELECT - + ( - col1 ) + + col1 / - 53 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + + 45 * col1 + col0 * col1 FROM tab0 AS cor0
----
12194
5934
7760

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

query I rowsort
SELECT - 13 * 77 FROM tab0, tab0 AS cor0
----
9 values hashing to 69a97c31ac9ad924dfe52c67248b538b

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

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

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

query I rowsort
SELECT col2 + - col2 + - col0 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT - cor0.col0 * - col0 * 42 FROM tab0 AS cor0
----
24192
332682
51450

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1558
SELECT DISTINCT - ( + ( col0 ) ) - CAST( - col0 AS SIGNED ) * + tab0.col1 FROM tab0
----
2040
3360
8010

skipif mysql # not compatible
query I rowsort label-1558
SELECT DISTINCT - ( + ( col0 ) ) - CAST ( - col0 AS INTEGER ) * + tab0.col1 FROM tab0
----
2040
3360
8010

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

query I rowsort
SELECT col0 + + col0 * col2 * cor0.col1 FROM tab2 cor0
----
119730
51113
5866

query I rowsort
SELECT ALL - + 69 * cor0.col1 FROM tab1 AS cor0
----
-1794
-690
-897

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

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

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

query I rowsort
SELECT - col0 + col0 * + 13 AS col2 FROM tab0 AS cor0
----
1068
288
420

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

query I rowsort
SELECT - - 76 * col1 FROM tab0 AS cor0
----
6536
6916
7372

query I rowsort
SELECT ALL - 45 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 63e2b488a204f83ec8c063dafdfd4371

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

skipif mysql # not compatible
query I rowsort label-1568
SELECT ALL + CAST ( + col0 AS INTEGER ) - + col0 AS col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1569
SELECT ( col1 ) DIV col0 AS col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-1569
SELECT ( col1 ) / col0 AS col0 FROM tab0
----
1
2
3

query I rowsort
SELECT ALL 22 + col2 * col0 * 66 + - col0 FROM tab2
----
12489
133792
198075

query I rowsort
SELECT - 67 - col1 FROM tab0
----
-153
-158
-164

query I rowsort
SELECT ALL col1 * col2 * + 80 + ( col0 * + col2 ) FROM tab0
----
227832
604258
7795

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

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

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

query I rowsort
SELECT - - 59 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT - 54 * + col1 * - tab2.col1 - + col0 * - col1 AS col0 FROM tab2
----
16949
192576
52111

query I rowsort
SELECT ALL - 68 + - col2 AS col2 FROM tab0
----
-101
-150
-69

query I rowsort
SELECT DISTINCT - 61 * + col1 + col2 * col0 AS col1 FROM tab2
----
-1571
-1702
1965

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 - 84 col0 FROM tab2 cor0
----
-110
-111
-122

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

query I rowsort
SELECT + - cor0.col0 + + 86 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 3f8da8bbe66fb8809d64bb3d728b5521

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

query I rowsort
SELECT ALL 22 * - cor0.col0 AS col0 FROM tab2 AS cor0
----
-154
-1716
-1738

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1586
SELECT ALL ( - col2 ) * cor0.col1 + - CAST( - col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

skipif mysql # not compatible
query I rowsort label-1586
SELECT ALL ( - col2 ) * cor0.col1 + - CAST ( - col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

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

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

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

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

query I rowsort
SELECT ALL 92 + cor0.col2 * + col1 FROM tab2 AS cor0
----
1626
738
929

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

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

query I rowsort
SELECT ALL + col0 * + col1 + col2 * - col1 FROM tab2 AS cor0
----
-620
3068
697

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

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

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

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE NOT + col1 <> + col0
----

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1599
SELECT col1 DIV - col1 + + col0 AS col0 FROM tab2
----
6
77
78

skipif mysql # not compatible
query I rowsort label-1599
SELECT col1 / - col1 + + col0 AS col0 FROM tab2
----
6
77
78

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 + tab0.col1 col1 FROM tab0
----
1322
662
8012

query I rowsort
SELECT - col0 * tab2.col0 - - col0 * + col2 FROM tab2
----
-3239
-4056
140

onlyif mysql # use DIV operator for integer division
query I rowsort label-1603
SELECT + cor0.col2 + col0 DIV + col0 col2 FROM tab1 AS cor0
----
55
58
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1603
SELECT + cor0.col2 + col0 / + col0 col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT + col2 + col0 * - col2 + + col2 * - col1 * + col2 FROM tab0 AS cor0
----
-131
-619100
-94413

query I rowsort
SELECT DISTINCT + col1 + - col2 + col1 * - tab0.col0 AS col1 FROM tab0
----
-2011
-3299
-8090

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

query I rowsort
SELECT DISTINCT - col2 * + tab2.col1 FROM tab2 WHERE NULL >= ( col2 - - col0 )
----

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

query I rowsort
SELECT ALL - tab1.col0 * - col2 * + col2 AS col0 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT ALL col0 * col0 + tab1.col2 FROM tab1
----
4153
63
6496

query I rowsort
SELECT col1 * + col1 + - col2 * - col2 FROM tab2
----
1690
1733
4157

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1616
SELECT - tab0.col1 + col0 DIV - col0 + col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1616
SELECT - tab0.col1 + col0 / - col0 + col1 FROM tab0
----
-1
-1
-1

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

query I rowsort
SELECT col1 + - col1 * col1 * - col2 FROM tab0 AS cor0
----
244154
679133
9506

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

skipif mysql # not compatible
query I rowsort label-1619
SELECT ALL - col1 + + col2 * cor0.col0 / col2 AS col2 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL col1 * - col0 + + col1 * + col1 + + col1 AS col0 FROM tab1 AS cor0
----
-530
-858
624

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1625
SELECT DISTINCT cor0.col1 DIV cor0.col2 + - cor0.col0 * col2 AS col2 FROM tab0 AS cor0
----
-7297
-790
62

skipif mysql # not compatible
query I rowsort label-1625
SELECT DISTINCT cor0.col1 / cor0.col2 + - cor0.col0 * col2 AS col2 FROM tab0 AS cor0
----
-7297
-790
62

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

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

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

skipif mysql # not compatible
query I rowsort label-1628
SELECT DISTINCT col1 / col0 + col2 AS col2 FROM tab1 AS cor0
----
57
62
96

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

query I rowsort
SELECT ALL + col2 * - col0 * col0 + col1 + col1 FROM tab0
----
-1031
-18836
-649340

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1633
SELECT + col1 DIV 23 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-1633
SELECT + col1 / 23 FROM tab2
----
0
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-1634
SELECT col2 * 7 DIV 59 FROM tab0
----
0
3
9

skipif mysql # not compatible
query I rowsort label-1634
SELECT col2 * 7 / 59 FROM tab0
----
0
3
9

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

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

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

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

query I rowsort
SELECT - col2 + 67 FROM tab1 AS cor0
----
-29
10
13

query I rowsort
SELECT ALL - cor0.col0 + + col2 + - cor0.col0 FROM tab0 AS cor0
----
-15
-69
-96

query I rowsort
SELECT DISTINCT + cor0.col2 * 81 AS col1 FROM tab1 AS cor0
----
4374
4617
7776

query I rowsort
SELECT - + col2 * col0 - ( + col2 ) * + cor0.col1 AS col2 FROM tab0 AS cor0
----
-132
-14760
-3630

query I rowsort
SELECT ALL - + col1 * 49 + col1 * col1 AS col2 FROM tab2 AS cor0
----
-544
-558
590

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

query I rowsort
SELECT ALL tab1.col1 FROM tab1 WHERE - col0 > ( col2 * col2 + col1 * - col0 * + col0 + - col1 )
----
10
13

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

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

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

query III rowsort
SELECT * FROM tab1 WHERE NULL IN ( - tab1.col1 / tab1.col1 )
----

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1652
SELECT DISTINCT - col2 DIV - col0 + tab1.col1 AS col2 FROM tab1
----
10
14
44

skipif mysql # not compatible
query I rowsort label-1652
SELECT DISTINCT - col2 / - col0 + tab1.col1 AS col2 FROM tab1
----
10
14
44

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

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

query I rowsort
SELECT DISTINCT cor0.col1 * 53 FROM tab0, tab2 AS cor0
----
1643
3127
901

query I rowsort
SELECT DISTINCT - cor0.col2 + 7 FROM tab2, tab0 AS cor0
----
-26
-75
6

query I rowsort
SELECT - col2 + - 34 FROM tab1 cor0
----
-130
-88
-91

query I rowsort
SELECT + 74 * col1 AS col2 FROM tab0 AS cor0
----
6364
6734
7178

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

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

query I rowsort
SELECT ALL - col0 * 76 - - col0 AS col1 FROM tab1 AS cor0
----
-225
-4800
-6000

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1661
SELECT ALL - CAST( - 3 AS SIGNED ) * cor0.col1 FROM tab1 AS cor0
----
30
39
78

skipif mysql # not compatible
query I rowsort label-1661
SELECT ALL - CAST ( - 3 AS INTEGER ) * cor0.col1 FROM tab1 AS cor0
----
30
39
78

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

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

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

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

query I rowsort
SELECT ALL + 87 AS col1 FROM tab0 AS cor0
----
87
87
87

query I rowsort
SELECT ALL 59 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1670
SELECT DISTINCT col1 DIV - col2 + 63 AS col2 FROM tab0
----
-34
61
62

skipif mysql # not compatible
query I rowsort label-1670
SELECT DISTINCT col1 / - col2 + 63 AS col2 FROM tab0
----
-34
61
62

query I rowsort
SELECT DISTINCT 27 + + col0 AS col1 FROM tab2
----
105
106
34

query I rowsort
SELECT col0 + + col0 * + 33 + col1 AS col2 FROM tab0
----
1287
3117
902

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

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

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

query I rowsort
SELECT ALL tab0.col1 + 32 AS col0 FROM tab0
----
118
123
129

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

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

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

skipif mysql # not compatible
query I rowsort label-1677
SELECT col1 * CAST ( col1 AS INTEGER ) + col0 FROM tab2 AS cor0
----
3559
368
968

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

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

query I rowsort
SELECT 97 + - 83 AS col1 FROM tab0 AS cor0
----
14
14
14

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1682
SELECT DISTINCT cor0.col2 DIV - 4 col2 FROM tab2 AS cor0
----
-6
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1682
SELECT DISTINCT cor0.col2 / - 4 col2 FROM tab2 AS cor0
----
-6
-9

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

query I rowsort
SELECT col0 + col2 - 38 * tab1.col0 FROM tab1
----
-2311
-2864
-57

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1686
SELECT col1 + ( tab0.col1 ) DIV + col1 - col2 AS col0 FROM tab0
----
10
54
97

skipif mysql # not compatible
query I rowsort label-1686
SELECT col1 + ( tab0.col1 ) / + col1 - col2 AS col0 FROM tab0
----
10
54
97

query I rowsort
SELECT DISTINCT 87 * + 96 FROM tab2, tab1, tab0 AS cor0
----
8352

query I rowsort
SELECT ALL - 20 - - col2 AS col0 FROM tab2 AS cor0
----
18
6
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1689
SELECT ALL - col1 + + col1 * col1 DIV - 31 + col1 AS col0 FROM tab0 AS cor0
----
-238
-267
-303

skipif mysql # not compatible
query I rowsort label-1689
SELECT ALL - col1 + + col1 * col1 / - 31 + col1 AS col0 FROM tab0 AS cor0
----
-238
-267
-303

query I rowsort
SELECT DISTINCT + 23 - + cor0.col2 AS col0 FROM tab1 AS cor0
----
-31
-34
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-1691
SELECT + col1 + - col1 DIV - col0 FROM tab2 AS cor0
----
17
35
59

skipif mysql # not compatible
query I rowsort label-1691
SELECT + col1 + - col1 / - col0 FROM tab2 AS cor0
----
17
35
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 45 + - cor0.col0 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 46c90db218e149a663e55a318940ed73

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

query I rowsort
SELECT + col1 + 50 FROM tab2
----
109
67
81

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

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

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

skipif mysql # not compatible
query I rowsort label-1697
SELECT DISTINCT 91 / - col2 FROM tab1
----
-1
0

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

query I rowsort
SELECT 91 - + 81 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

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

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

query I rowsort
SELECT + 21 + - 87 + + col1 * - col1 FROM tab1
----
-166
-235
-742

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

query I rowsort
SELECT 91 + - tab2.col1 + col2 FROM tab2
----
112
58
87

query I rowsort
SELECT ALL - col0 * + 84 FROM tab2 cor0
----
-588
-6552
-6636

query I rowsort
SELECT - col2 + - ( col1 ) * cor0.col1 FROM tab1 cor0
----
-157
-265
-730

query I rowsort
SELECT DISTINCT + - 67 * + col1 FROM tab1 AS cor0
----
-1742
-670
-871

query I rowsort
SELECT ALL 99 * - col1 + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-15733
-9603
-9604

query I rowsort
SELECT 47 + cor0.col1 * col1 FROM tab0 AS cor0
----
7443
8328
9456

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

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

query I rowsort
SELECT DISTINCT - + cor0.col2 * col2 + - 10 + - ( col0 ) AS col2 FROM tab0 AS cor0
----
-1123
-46
-6823

onlyif mysql # use DIV operator for integer division
query I rowsort label-1712
SELECT - + col0 + - col2 DIV 61 + 54 AS col1 FROM tab1 AS cor0
----
-10
-27
51

skipif mysql # not compatible
query I rowsort label-1712
SELECT - + col0 + - col2 / 61 + 54 AS col1 FROM tab1 AS cor0
----
-10
-27
51

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

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

query I rowsort
SELECT DISTINCT - 96 * cor0.col1 FROM tab2 cor0
----
-1632
-2976
-5664

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

query I rowsort
SELECT 10 + - col0 FROM tab1
----
-54
-70
7

query I rowsort
SELECT - 14 + cor0.col1 AS col2 FROM tab2 AS cor0
----
17
3
45

query I rowsort
SELECT ALL 79 * + col2 AS col2 FROM tab1 cor0
----
4266
4503
7584

query I rowsort
SELECT DISTINCT - cor0.col2 * col1 + 70 FROM tab1 AS cor0
----
-1178
-1334
-500

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

query I rowsort
SELECT + - 11 - col2 AS col0 FROM tab1 AS cor0
----
-107
-65
-68

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * - col0 * 83 col0 FROM tab1 AS cor0
----
53120
6474
86320

skipif mysql # not compatible
query I rowsort
SELECT - col0 + - CAST ( col2 AS REAL ) * col0 FROM tab0 AS cor0
----
-70
-7387
-816

onlyif mysql # use DIV operator for integer division
query I rowsort label-1726
SELECT DISTINCT + col2 * col2 + cor0.col1 * + col0 * - cor0.col2 + - col0 DIV - col1 AS col1 FROM tab2 AS cor0
----
-118975
-49586
-5130

skipif mysql # not compatible
query I rowsort label-1726
SELECT DISTINCT + col2 * col2 + cor0.col1 * + col0 * - cor0.col2 + - col0 / - col1 AS col1 FROM tab2 AS cor0
----
-118975
-49586
-5130

query I rowsort
SELECT ALL col1 * 53 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
11501
243906
71179

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

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

query I rowsort
SELECT DISTINCT col1 + - col2 + 30 * - col2 FROM tab0 AS cor0
----
-2451
-937
66

query I rowsort
SELECT DISTINCT + + cor0.col2 * 51 FROM tab1 AS cor0
----
2754
2907
4896

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

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

query I rowsort
SELECT - + cor0.col0 * - 14 AS col1 FROM tab1 cor0
----
1120
42
896

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

query I rowsort
SELECT ALL - + col1 + - 95 AS col1 FROM tab0 AS cor0
----
-181
-186
-192

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

skipif mysql # not compatible
query I rowsort label-1736
SELECT + CAST ( - 92 AS INTEGER ) * col2 FROM tab0 AS cor0
----
-3036
-7544
-92

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

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

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

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

query I rowsort
SELECT tab1.col0 + + 93 AS col0 FROM tab1
----
157
173
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1741
SELECT + - 95 * col0 DIV - col2 FROM tab1 AS cor0
----
106
5
79

skipif mysql # not compatible
query I rowsort label-1741
SELECT + - 95 * col0 / - col2 FROM tab1 AS cor0
----
106
5
79

query I rowsort
SELECT + 18 * col0 AS col1 FROM tab2 AS cor0
----
126
1404
1422

query I rowsort
SELECT ALL - col2 * - cor0.col2 + - col1 * 7 FROM tab0 cor0
----
-678
487
6087

query I rowsort
SELECT DISTINCT + 33 * - col1 FROM tab0 AS cor0
----
-2838
-3003
-3201

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

query I rowsort
SELECT - + cor0.col0 * + col2 + + col1 + 61 * col1 AS col0 FROM tab0 AS cor0
----
-1656
4540
5979

query I rowsort
SELECT - - ( + col0 ) + - cor0.col1 FROM tab0 AS cor0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 48 * + 31 col0 FROM tab2 AS cor0
----
1488
1488
1488

query I rowsort
SELECT + 73 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 54 * ( tab0.col1 ) col1 FROM tab0
----
-4644
-4914
-5238

query I rowsort
SELECT ALL + ( + 2 ) AS col2 FROM tab0
----
2
2
2

query I rowsort
SELECT ALL + + 66 FROM tab2 AS cor0
----
66
66
66

query I rowsort
SELECT ALL - 30 + col2 FROM tab2 AS cor0
----
-3
-4
8

query I rowsort
SELECT col1 + + cor0.col1 * + col2 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT col1 + - 45 FROM tab0 AS cor0
----
41
46
52

query I rowsort
SELECT DISTINCT col0 * 14 AS col2 FROM tab1
----
1120
42
896

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1757
SELECT col1 + - CAST( NULL AS DECIMAL ) / col1 col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1757
SELECT col1 + - CAST ( NULL AS REAL ) / col1 col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * + 95 + col2 FROM tab1 AS cor0
----
1007
1331
2524

query I rowsort
SELECT ALL + + cor0.col1 * - 69 + col0 AS col0 FROM tab0 cor0
----
-5910
-6190
-6658

query I rowsort
SELECT + col2 + 73 AS col1 FROM tab0 AS cor0
----
106
155
74

query I rowsort
SELECT DISTINCT + col0 * + col0 + 68 AS col0 FROM tab2 AS cor0
----
117
6152
6309

query I rowsort
SELECT + col2 * cor0.col2 + 93 FROM tab1 AS cor0
----
3009
3342
9309

query I rowsort
SELECT ALL + col1 * col1 + 25 FROM tab0 AS cor0
----
7421
8306
9434

query I rowsort
SELECT - cor0.col1 - col0 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT col0 * col0 + ( + col1 ) * + col1 AS col1 FROM tab1 AS cor0
----
4196
6569
685

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 57 col0 FROM tab0 AS cor0
----
57
57
57

query I rowsort
SELECT - + ( - col0 ) * col0 + + cor0.col0 * + col0 - col0 FROM tab2 AS cor0
----
12090
12403
91

query I rowsort
SELECT - + 61 + - col1 FROM tab1 cor0
----
-71
-74
-87

query I rowsort
SELECT col0 * - ( col2 + - col1 ) FROM tab1
----
-3008
-6640
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-1770
SELECT - col0 + + cor0.col1 DIV + 65 AS col1 FROM tab1 cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-1770
SELECT - col0 + + cor0.col1 / + 65 AS col1 FROM tab1 cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1771
SELECT 27 DIV + col1 + + 1 AS col2 FROM tab1 AS cor0
----
2
3
3

skipif mysql # not compatible
query I rowsort label-1771
SELECT 27 / + col1 + + 1 AS col2 FROM tab1 AS cor0
----
2
3
3

query I rowsort
SELECT DISTINCT - - 10 * col0 FROM tab0 AS cor0
----
240
350
890

query I rowsort
SELECT ALL - 75 * - col1 FROM tab2
----
1275
2325
4425

onlyif mysql # use DIV operator for integer division
query I rowsort label-1774
SELECT 73 DIV - 84 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-1774
SELECT 73 / - 84 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

onlyif mysql # use DIV operator for integer division
query I rowsort label-1775
SELECT DISTINCT - col2 DIV tab0.col0 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-1775
SELECT DISTINCT - col2 / tab0.col0 FROM tab0
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1776
SELECT + col2 + col0 - - CAST( NULL AS SIGNED ) * - 57 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1776
SELECT + col2 + col0 - - CAST ( NULL AS INTEGER ) * - 57 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 59 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
59

query I rowsort
SELECT + col1 + col0 * col2 AS col0 FROM tab1
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-1779
SELECT + col1 DIV - col1 - + col2 * col2 * col2 FROM tab0
----
-2
-35938
-551369

skipif mysql # not compatible
query I rowsort label-1779
SELECT + col1 / - col1 - + col2 * col2 * col2 FROM tab0
----
-2
-35938
-551369

query I rowsort
SELECT DISTINCT - cor1.col1 * - cor1.col2 + cor1.col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-1781
SELECT cor0.col2 DIV col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1781
SELECT cor0.col2 / col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 * cor0.col1 col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + 53 * - col1 - cor0.col1 AS col0 FROM tab2 cor0
----
-1674
-3186
-918

query I rowsort
SELECT ALL - 46 * - col2 FROM tab2 cor0
----
1196
1242
1748

onlyif mysql # use DIV operator for integer division
query I rowsort label-1785
SELECT DISTINCT + 48 * col1 DIV - col1 col0 FROM tab1 AS cor0
----
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1785
SELECT DISTINCT + 48 * col1 / - col1 col0 FROM tab1 AS cor0
----
-48

query I rowsort
SELECT 99 + col2 * col0 FROM tab2 AS cor0
----
2127
288
3101

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - ( col1 ) ) col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL cor0.col0 + col0 * col0 AS col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT ALL + 17 + + col2 + col1 AS col2 FROM tab0 AS cor0
----
115
136
190

query I rowsort
SELECT - - 95 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query I rowsort
SELECT ALL 50 * + col2 - 8 FROM tab0 AS cor0
----
1642
4092
42

query I rowsort
SELECT - - 43 AS col0 FROM tab0 AS cor0
----
43
43
43

query I rowsort
SELECT DISTINCT + col0 * col1 * 50 FROM tab0 AS cor0
----
103200
169750
404950

query I rowsort
SELECT - + col1 + ( - col0 * + col1 ) FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT col2 + - cor0.col2 * - 87 AS col1 FROM tab0 AS cor0
----
2904
7216
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * cor0.col2 * col1 col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT 78 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT + - cor0.col1 + col0 * col2 AS col2 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT DISTINCT - col1 * - 48 AS col1 FROM tab1 AS cor0
----
1248
480
624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * 77 + - col2 * + col0 col0 FROM tab2 AS cor0
----
3081
350
3978

onlyif mysql # use DIV operator for integer division
query I rowsort label-1802
SELECT - - col1 DIV col1 + + 43 col0 FROM tab1 AS cor0
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1802
SELECT - - col1 / col1 + + 43 col0 FROM tab1 AS cor0
----
44
44
44

query I rowsort
SELECT DISTINCT - - cor0.col0 * - 99 AS col0 FROM tab1 AS cor0
----
-297
-6336
-7920

query I rowsort
SELECT ALL - - col1 * ( - cor0.col2 ) AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + 35 * cor1.col2 * ( cor0.col0 ) FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to c51ac1e9e5e527b9327893e1406b093b

query I rowsort
SELECT - 27 * ( col1 * ( 72 ) ) FROM tab2 AS cor0
----
-114696
-33048
-60264

query I rowsort
SELECT ALL col1 * - col2 - + col0 * ( col2 * cor0.col0 + - 57 ) AS col2 FROM tab1 AS cor0
----
-1719
-230394
-611088

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + 15 + - col2 col1 FROM tab1 AS cor0
----
-52
-65
-94

query I rowsort
SELECT + + ( + col0 ) AS col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT ALL 81 * + col0 AS col1 FROM tab2 AS cor0
----
567
6318
6399

query I rowsort
SELECT DISTINCT + col1 + ( - cor0.col1 ) * - 24 FROM tab1 AS cor0
----
250
325
650

query I rowsort
SELECT ALL - ( 27 ) AS col1 FROM tab2 AS cor0
----
-27
-27
-27

query I rowsort
SELECT DISTINCT - - 18 * col2 FROM tab2 AS cor0
----
468
486
684

query I rowsort
SELECT - col1 + 61 * 1 FROM tab2
----
2
30
44

query I rowsort
SELECT - cor0.col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT + + col0 * + col0 + + 98 FROM tab0 AS cor0
----
1323
674
8019

query I rowsort
SELECT + 0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT + - 55 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT 67 + + col0 AS col0 FROM tab2
----
145
146
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col2 * + col1 col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT + col2 * + 37 * 44 AS col0 FROM tab0
----
133496
1628
53724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + 15 col2 FROM tab1
----
25
28
41

query I rowsort
SELECT ALL + col2 + col0 * + col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL - + col2 * - col2 + ( - col1 ) * 3 FROM tab2 AS cor0
----
1393
499
636

skipif mysql # not compatible
query I rowsort
SELECT + - col2 * CAST ( + col2 AS REAL ) AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT - cor0.col0 * 35 FROM tab0 AS cor0
----
-1225
-3115
-840

onlyif mysql # use DIV operator for integer division
query I rowsort label-1827
SELECT + col2 * col1 DIV + col2 AS col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1827
SELECT + col2 * col1 / + col2 AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL ( col0 ) + - col1 AS col0 FROM tab0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) + tab0.col2 col2 FROM tab0
----
164
2
66

query I rowsort
SELECT ( + ( - col0 ) ) + col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT ( col0 ) + col0 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT - cor0.col2 * 20 AS col2 FROM tab2, tab1, tab2 AS cor0
----
-520
-540
-760

query I rowsort
SELECT ALL + 96 * + col0 * - col0 + + col2 AS col1 FROM tab1 AS cor0
----
-393159
-614304
-810

query I rowsort
SELECT ALL + ( col0 ) * + ( - 49 ) AS col0 FROM tab0 AS cor0
----
-1176
-1715
-4361

query I rowsort
SELECT DISTINCT cor0.col2 * + col2 + ( + 47 * col2 ) + col0 FROM tab0 cor0
----
10667
2664
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT 15 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col1 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1839
SELECT - - col2 DIV col1 + - 93 * + col0 FROM tab1 AS cor0
----
-277
-5947
-7433

skipif mysql # not compatible
query I rowsort label-1839
SELECT - - col2 / col1 + - 93 * + col0 FROM tab1 AS cor0
----
-277
-5947
-7433

query I rowsort
SELECT DISTINCT col2 + col0 * cor0.col0 FROM tab2 cor0
----
6110
6279
76

query I rowsort
SELECT 2 * - col2 + - cor0.col1 AS col0 FROM tab1 cor0
----
-124
-134
-205

query I rowsort
SELECT DISTINCT 72 + col1 * col0 * ( col1 * 82 + col2 ) AS col1 FROM tab0 AS cor0
----
14623512
27007297
61098928

onlyif mysql # use DIV operator for integer division
query I rowsort label-1843
SELECT ALL + col2 + + col2 + col1 DIV + col0 FROM tab2 cor0
----
52
58
76

skipif mysql # not compatible
query I rowsort label-1843
SELECT ALL + col2 + + col2 + col1 / + col0 FROM tab2 cor0
----
52
58
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - 67 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * cor0.col0 col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + 34 + col1 FROM tab2 AS cor0
----
51
65
93

query I rowsort
SELECT - col0 * 14 AS col2 FROM tab0 AS cor0
----
-1246
-336
-490

query I rowsort
SELECT - col1 + - 73 AS col1 FROM tab2 AS cor0
----
-104
-132
-90

query I rowsort
SELECT + cor0.col2 + + col1 * - cor0.col0 * col2 AS col1 FROM tab2 AS cor0
----
-119626
-50996
-5832

query I rowsort
SELECT - 80 * col2 + - col1 - col1 * + 22 AS col2 FROM tab2 AS cor0
----
-2873
-3431
-3437

query I rowsort
SELECT ALL - col2 * + 97 FROM tab2 AS cor0
----
-2522
-2619
-3686

query I rowsort
SELECT col2 * + 27 FROM tab2 AS cor0
----
1026
702
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + 94 + col2 col0 FROM tab1 AS cor0
----
161
174
203

query I rowsort
SELECT ALL - + 19 FROM tab1 cor0
----
-19
-19
-19

query I rowsort
SELECT ALL + tab1.col2 * - 64 FROM tab1
----
-3456
-3648
-6144

query I rowsort
SELECT + - col1 + + col2 - cor0.col1 FROM tab2 AS cor0
----
-35
-92
4

query I rowsort
SELECT col1 + - col1 * + col2 AS col1 FROM tab1 cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - col2 + 92 col0 FROM tab1 cor0
----
-1156
-1312
-478

query I rowsort
SELECT - 70 + ( - col1 * - ( 5 ) ) + col0 FROM tab1
----
44
63
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-1861
SELECT DISTINCT 12 DIV + 92 + - col0 * + col1 FROM tab0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-1861
SELECT DISTINCT 12 / + 92 + - col0 * + col1 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-1862
SELECT col1 DIV - tab1.col2 col2 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1862
SELECT col1 / - tab1.col2 col2 FROM tab1
----
0
0
0

query I rowsort
SELECT - col1 + - ( - col2 ) FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1864
SELECT + col0 + + CAST( col2 AS SIGNED ) FROM tab1
----
121
176
57

skipif mysql # not compatible
query I rowsort label-1864
SELECT + col0 + + CAST ( col2 AS INTEGER ) FROM tab1
----
121
176
57

query I rowsort
SELECT - - cor0.col1 * - cor0.col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - col1 * 56 * + col0 FROM tab0 AS cor0
----
-115584
-190120
-453544

query I rowsort
SELECT DISTINCT - - col2 * - 48 AS col2 FROM tab0 AS cor0
----
-1584
-3936
-48

query I rowsort
SELECT col1 + + ( col2 ) AS col2 FROM tab1 cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab2, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL - + 30 AS col0 FROM tab1 AS cor0
----
-30
-30
-30

query I rowsort
SELECT ALL + cor1.col1 AS col1 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - col2 * - col2 + col1 + + col0 FROM tab1 AS cor0
----
2945
3323
9309

query I rowsort
SELECT ( + col2 ) * - col0 * col1 FROM tab0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-1874
SELECT DISTINCT + cor0.col2 + col2 DIV + 11 + + col0 DIV - col1 AS col2 FROM tab1 AS cor0
----
56
58
98

skipif mysql # not compatible
query I rowsort label-1874
SELECT DISTINCT + cor0.col2 + col2 / + 11 + + col0 / - col1 AS col2 FROM tab1 AS cor0
----
56
58
98

query I rowsort
SELECT col1 + cor0.col2 AS col1 FROM tab0 cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1876
SELECT DISTINCT tab1.col0 DIV + 25 FROM tab1
----
0
2
3

skipif mysql # not compatible
query I rowsort label-1876
SELECT DISTINCT tab1.col0 / + 25 FROM tab1
----
0
2
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1877
SELECT ALL CAST( + col0 + + col1 AS SIGNED ) FROM tab0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-1877
SELECT ALL CAST ( + col0 + + col1 AS INTEGER ) FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-1878
SELECT ALL 45 DIV col2 AS col1 FROM tab0
----
0
1
45

skipif mysql # not compatible
query I rowsort label-1878
SELECT ALL 45 / col2 AS col1 FROM tab0
----
0
1
45

query I rowsort
SELECT DISTINCT 96 AS col0 FROM tab2
----
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col2 ) col0 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL + col1 * col1 + - col0 FROM tab2
----
210
3403
954

query I rowsort
SELECT + col1 * + cor0.col2 + + col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL + + col0 * col1 - col1 AS col2 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT ALL + 80 + + col1 * + col1 AS col0 FROM tab2
----
1041
3561
369

query I rowsort
SELECT - col1 * col0 + col2 AS col2 FROM tab0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-1886
SELECT ALL tab1.col2 DIV + col0 AS col1 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-1886
SELECT ALL tab1.col2 / + col0 AS col1 FROM tab1
----
0
1
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * - col0 col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - + col2 * col2 * + col1 + col2 FROM tab2 AS cor0
----
-22572
-24510
-39858

onlyif mysql # use DIV operator for integer division
query I rowsort label-1889
SELECT ALL - cor0.col2 + cor0.col1 DIV col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-1889
SELECT ALL - cor0.col2 + cor0.col1 / col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL cor0.col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL col2 + - cor0.col1 AS col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT - col2 * col1 + - col0 * col0 FROM tab0 cor0
----
-1322
-15383
-3414

query I rowsort
SELECT 78 - col2 FROM tab1
----
-18
21
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 92 - 9 col1 FROM tab1
----
83
83
83

query I rowsort
SELECT DISTINCT - col0 + 67 FROM tab2
----
-11
-12
60

query I rowsort
SELECT DISTINCT col0 + col0 * + col0 * col0 AS col0 FROM tab0
----
13848
42910
705058

query I rowsort
SELECT - col0 + tab1.col1 + - col2 FROM tab1
----
-111
-163
-31

onlyif mysql # use DIV operator for integer division
query I rowsort label-1898
SELECT DISTINCT 52 + - col0 * col2 - - col1 DIV col2 AS col1 FROM tab0
----
-7245
-738
114

skipif mysql # not compatible
query I rowsort label-1898
SELECT DISTINCT 52 + - col0 * col2 - - col1 / col2 AS col1 FROM tab0
----
-7245
-738
114

query I rowsort
SELECT DISTINCT - 46 - col1 AS col0 FROM tab0
----
-132
-137
-143

onlyif mysql # use DIV operator for integer division
query I rowsort label-1900
SELECT + 92 * col0 + - col1 DIV + col0 FROM tab2 AS cor0
----
640
7176
7268

skipif mysql # not compatible
query I rowsort label-1900
SELECT + 92 * col0 + - col1 / + col0 FROM tab2 AS cor0
----
640
7176
7268

query I rowsort
SELECT DISTINCT + + col0 + + col0 * - col1 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT - col1 * + col0 + + col0 * col1 * col2 FROM tab0 cor0
----
0
656019
66048

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + cor0.col0 col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL 79 + + col2 FROM tab0 AS cor0
----
112
161
80

query I rowsort
SELECT + - col1 * col2 + - col0 * - col2 AS col0 FROM tab0 cor0
----
-164
-2046
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( col2 ) + cor0.col2 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL ( + col2 ) * + col0 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT + + ( + cor0.col1 ) * col1 * col2 + + col2 AS col2 FROM tab1 AS cor0
----
16320
36558
5757

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 95 * col1 + col1 + col0 col1 FROM tab2 AS cor0
----
-1519
-2907
-5468

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * + col1 - col0 col1 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT - col1 + col1 * + col2 AS col0 FROM tab1 AS cor0
----
1235
1378
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1912
SELECT - CAST( - 5 AS SIGNED ) * - col0 AS col1 FROM tab1 AS cor0
----
-15
-320
-400

skipif mysql # not compatible
query I rowsort label-1912
SELECT - CAST ( - 5 AS INTEGER ) * - col0 AS col1 FROM tab1 AS cor0
----
-15
-320
-400

query I rowsort
SELECT ALL + ( + col2 ) + cor0.col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1914
SELECT col2 DIV - 7 AS col2 FROM tab2 AS cor0
----
-3
-3
-5

skipif mysql # not compatible
query I rowsort label-1914
SELECT col2 / - 7 AS col2 FROM tab2 AS cor0
----
-3
-3
-5

query I rowsort
SELECT ALL col2 + cor0.col2 * col0 AS col1 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-1916
SELECT DISTINCT col2 DIV col2 + col2 * col0 FROM tab0 AS cor0
----
36
7299
793

skipif mysql # not compatible
query I rowsort label-1916
SELECT DISTINCT col2 / col2 + col2 * col0 FROM tab0 AS cor0
----
36
7299
793

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) * + col2 col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT col2 * - cor0.col0 + - col0 * ( 39 * - cor0.col1 ) AS col2 FROM tab1 AS cor0
----
21312
2880
32880

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1919
SELECT DISTINCT CAST( - col0 AS SIGNED ) * cor0.col2 FROM tab1 cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-1919
SELECT DISTINCT CAST ( - col0 AS INTEGER ) * cor0.col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT col1 + - col1 * - col0 + + col2 * col1 * - col2 FROM tab1 AS cor0
----
-118755
-31840
-75712

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 * - col1 col1 FROM tab1 cor0
----
-1120
-704
-81

query I rowsort
SELECT + 14 * - cor0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to ce98250d1b0154ccf3ae511f9289907d

query I rowsort
SELECT ALL 46 * - ( tab2.col1 + - 55 ) * + ( - col0 ) AS col2 FROM tab2
----
-138092
-7728
14352

query I rowsort
SELECT ALL cor0.col2 + - col1 * + col0 FROM tab0 cor0
----
-2031
-3394
-8017

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 cor0, tab1 AS cor1, tab0 cor2
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT ALL col0 * - col1 * - col2 AS col1 FROM tab1
----
36480
4212
99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 * + col2 + + col0 col1 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT - col1 + col1 - - 9 FROM tab0
----
9
9
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1929
SELECT ALL + tab0.col1 DIV - col2 - + col2 FROM tab0
----
-35
-83
-98

skipif mysql # not compatible
query I rowsort label-1929
SELECT ALL + tab0.col1 / - col2 - + col2 FROM tab0
----
-35
-83
-98

query I rowsort
SELECT DISTINCT + col1 + col0 - col0 * - tab1.col0 AS col2 FROM tab1
----
38
4170
6493

query I rowsort
SELECT ALL - col2 - 58 FROM tab0 AS cor0
----
-140
-59
-91

query I rowsort
SELECT DISTINCT - col1 * col0 * col0 + + col0 FROM tab1 cor0
----
-231
-40896
-83120

onlyif mysql # use DIV operator for integer division
query I rowsort label-1933
SELECT DISTINCT + + col1 + 32 DIV - col0 AS col0 FROM tab1 AS cor0
----
10
13
16

skipif mysql # not compatible
query I rowsort label-1933
SELECT DISTINCT + + col1 + 32 / - col0 AS col0 FROM tab1 AS cor0
----
10
13
16

query I rowsort
SELECT + 2 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

query I rowsort
SELECT ALL - col1 * + col2 + - ( - 58 ) AS col0 FROM tab2
----
-1476
-588
-779

query I rowsort
SELECT DISTINCT col2 + - tab1.col1 * ( col1 ) AS col1 FROM tab1
----
-43
-622
-73

query I rowsort
SELECT tab1.col0 + col1 + - col2 FROM tab1
----
-25
-3
17

query I rowsort
SELECT col2 + ( col2 ) * tab1.col0 AS col0 FROM tab1
----
216
3705
7776

query I rowsort
SELECT + col0 - cor0.col0 * col2 AS col0 FROM tab0 AS cor0
----
-7209
-768
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1940
SELECT ALL col0 DIV + col0 + 21 AS col0 FROM tab1 AS cor0
----
22
22
22

skipif mysql # not compatible
query I rowsort label-1940
SELECT ALL col0 / + col0 + 21 AS col0 FROM tab1 AS cor0
----
22
22
22

query I rowsort
SELECT ALL + col1 + 76 * + col0 AS col0 FROM tab2 cor0
----
563
5987
6021

onlyif mysql # use DIV operator for integer division
query I rowsort label-1942
SELECT ALL - cor0.col2 + + col2 DIV - 53 col1 FROM tab0 AS cor0
----
-1
-33
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1942
SELECT ALL - cor0.col2 + + col2 / - 53 col1 FROM tab0 AS cor0
----
-1
-33
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * + ( 62 ) + + col0 * col2 col2 FROM tab0 AS cor0
----
12382
2838
97

query I rowsort
SELECT - - col1 - col1 * - col2 * cor0.col1 FROM tab0 AS cor0
----
244154
679133
9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * 66 + cor0.col0 col2 FROM tab1 AS cor0
----
1719
724
938

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1946
SELECT - col0 + + CAST( NULL AS SIGNED ) + + col1 / + cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1946
SELECT - col0 + + CAST ( NULL AS INTEGER ) + + col1 / + cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + 41 col2 FROM tab0 AS cor0
----
130
65
76

query I rowsort
SELECT ALL - 84 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

query I rowsort
SELECT DISTINCT + tab0.col2 + - 12 FROM tab0
----
-11
21
70

query I rowsort
SELECT DISTINCT col1 + - ( col2 ) * + tab1.col1 AS col0 FROM tab1
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-1951
SELECT + tab0.col0 DIV + tab0.col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1951
SELECT + tab0.col0 / + tab0.col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - col1 * 86 - - col1 AS col1 FROM tab0 AS cor0
----
-7310
-7735
-8245

query I rowsort
SELECT ALL 5 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 6797d40099023779b89feb627d94a3e7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - 79 - + col0 * col1 col1 FROM tab0 AS cor0
----
-2119
-3439
-8089

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col0 ) * + col0 col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - col1 - + col2 * col1 AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT 10 * - col1 + + col1 AS col2 FROM tab2 AS cor0
----
-153
-279
-531

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1958
SELECT + CAST( - col0 AS SIGNED ) + + col0 * 23 AS col1 FROM tab0 AS cor0
----
1958
528
770

skipif mysql # not compatible
query I rowsort label-1958
SELECT + CAST ( - col0 AS INTEGER ) + + col0 * 23 AS col1 FROM tab0 AS cor0
----
1958
528
770

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1959
SELECT - - CAST( NULL AS SIGNED ) + + 91 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1959
SELECT - - CAST ( NULL AS INTEGER ) + + 91 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col2 * col0 + + col0 AS col0 FROM tab1 cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-1961
SELECT DISTINCT + col2 DIV col1 + CAST( 64 + cor0.col2 AS SIGNED ) FROM tab2 cor0
----
104
90
91

skipif mysql # not compatible
query I rowsort label-1961
SELECT DISTINCT + col2 / col1 + CAST ( 64 + cor0.col2 AS INTEGER ) FROM tab2 cor0
----
104
90
91

query I rowsort
SELECT 93 * + col0 FROM tab1 cor0
----
279
5952
7440

query I rowsort
SELECT - + col1 * cor0.col2 * 17 FROM tab2 AS cor0
----
-10982
-14229
-26078

onlyif mysql # use DIV operator for integer division
query I rowsort label-1964
SELECT DISTINCT - - col1 - col0 DIV + 96 AS col1 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-1964
SELECT DISTINCT - - col1 - col0 / + 96 AS col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + ( - col2 ) * col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT - 16 AS col1 FROM tab2 cor0
----
-16

query I rowsort
SELECT DISTINCT 38 * col1 AS col1 FROM tab0 AS cor0
----
3268
3458
3686

query I rowsort
SELECT col1 * col0 + ( cor0.col1 ) + - 0 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT col1 * + col0 * cor0.col2 AS col1 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1970
SELECT - cor0.col1 * + col0 - + ( col0 ) * + CAST( col0 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-4736
-7440
-87

skipif mysql # not compatible
query I rowsort label-1970
SELECT - cor0.col1 * + col0 - + ( col0 ) * + CAST ( col0 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-4736
-7440
-87

query I rowsort
SELECT ALL + 59 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT tab1.col2 * + col0 - - tab1.col0 * - col1 FROM tab1
----
3008
6640
84

query I rowsort
SELECT + col0 * col0 + - ( col2 + - col0 ) FROM tab0
----
1259
567
7928

query I rowsort
SELECT - col0 * col1 - - 77 FROM tab0
----
-1987
-3318
-8022

query I rowsort
SELECT DISTINCT - 24 * col1 + ( col1 ) * - col2 AS col0 FROM tab0
----
-2425
-4902
-9646

query I rowsort
SELECT DISTINCT - + ( - tab2.col2 ) + + 2 AS col0 FROM tab2, tab1, tab1 AS cor0
----
28
29
40

query I rowsort
SELECT - 46 + cor0.col0 FROM tab0 AS cor0
----
-11
-22
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-1978
SELECT DISTINCT 56 DIV cor0.col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
0
18

skipif mysql # not compatible
query I rowsort label-1978
SELECT DISTINCT 56 / cor0.col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
0
18

query I rowsort
SELECT DISTINCT 51 + col2 FROM tab1
----
105
108
147

query I rowsort
SELECT + ( col1 ) - 20 AS col1 FROM tab1
----
-10
-7
6

query I rowsort
SELECT - col2 + 30 * cor0.col0 FROM tab1 AS cor0
----
1863
2304
36

query I rowsort
SELECT cor0.col0 * ( col0 ) AS col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - - cor0.col0 * 34 AS col1 FROM tab1 AS cor0
----
102
2176
2720

onlyif mysql # use DIV operator for integer division
query I rowsort label-1984
SELECT DISTINCT col1 DIV 88 + 38 AS col2 FROM tab0 AS cor0
----
38
39

skipif mysql # not compatible
query I rowsort label-1984
SELECT DISTINCT col1 / 88 + 38 AS col2 FROM tab0 AS cor0
----
38
39

query I rowsort
SELECT DISTINCT cor0.col2 * col1 + col1 AS col2 FROM tab1 cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT - + col0 + 80 FROM tab1 AS cor0
----
0
16
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + 90 col1 FROM tab1 AS cor0
----
144
147
186

onlyif mysql # use DIV operator for integer division
query I rowsort label-1988
SELECT DISTINCT col0 + + 20 DIV + col2 col2 FROM tab0 AS cor0
----
24
55
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1988
SELECT DISTINCT col0 + + 20 / + col2 col2 FROM tab0 AS cor0
----
24
55
89

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 * - ( - col0 ) + cor0.col0 FROM tab1 AS cor0
----
233536
489
614480

skipif mysql # not compatible
query I rowsort
SELECT + col2 + - CAST ( ( col0 ) AS REAL ) FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - ( + cor0.col0 ) * - col1 + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + ( col1 ) + col0 - ( col0 ) * - col1 AS col2 FROM tab2 AS cor0
----
1439
255
4739

onlyif mysql # use DIV operator for integer division
query I rowsort label-1993
SELECT + 57 * - 6 + col2 DIV 18 col1 FROM tab2 AS cor0
----
-340
-341
-341

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1993
SELECT + 57 * - 6 + col2 / 18 col1 FROM tab2 AS cor0
----
-340
-341
-341

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1994
SELECT + CAST( + ( col2 ) AS SIGNED ) + + col1 AS col0 FROM tab2 AS cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-1994
SELECT + CAST ( + ( col2 ) AS INTEGER ) + + col1 AS col0 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-1995
SELECT col1 * + ( - col2 ) + cor0.col2 DIV cor0.col0 FROM tab0 AS cor0
----
-2837
-7462
-97

skipif mysql # not compatible
query I rowsort label-1995
SELECT col1 * + ( - col2 ) + cor0.col2 / cor0.col0 FROM tab0 AS cor0
----
-2837
-7462
-97

query I rowsort
SELECT - col1 + - 14 FROM tab0 AS cor0
----
-100
-105
-111

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1997
SELECT + 64 * + cor0.col0 - col0 * - CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
6399
665
9594

skipif mysql # not compatible
query I rowsort label-1997
SELECT + 64 * + cor0.col0 - col0 * - CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
6399
665
9594

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col0 * col0 col1 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT 52 * col0 - + col2 AS col0 FROM tab0 cor0
----
1215
1819
4546

query I rowsort
SELECT - - cor0.col2 + + col0 AS col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT + col1 * col1 + - 1 AS col0 FROM tab0 AS cor0
----
7395
8280
9408

query I rowsort
SELECT DISTINCT + 57 AS col2 FROM tab0 cor0
----
57

query I rowsort
SELECT + col2 + - col1 * + 26 * - 2 FROM tab2 cor0
----
1639
3094
922

query I rowsort
SELECT ( col0 + + col1 ) * - tab0.col1 * - tab0.col2 FROM tab0
----
12804
1343160
312180

query I rowsort
SELECT 32 * - col0 * col2 FROM tab1
----
-116736
-245760
-5184

onlyif mysql # use DIV operator for integer division
query I rowsort label-2006
SELECT 50 DIV + col2 col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2006
SELECT 50 / + col2 col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2007
SELECT DISTINCT + 19 DIV col1 FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-2007
SELECT DISTINCT + 19 / col1 FROM tab2 AS cor0
----
0
1

query I rowsort
SELECT col2 + col2 - col1 FROM tab2 cor0
----
-7
23
59

query I rowsort
SELECT DISTINCT col0 * col1 + - ( col1 ) FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT 61 * col2 + 41 * col1 AS col0 FROM tab2 AS cor0
----
2918
3015
4005

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 + cor0.col2 col1 FROM tab1 AS cor0
----
106
64
67

query I rowsort
SELECT ALL + col0 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 + - col1 * + col1 * + ( + col1 * - 65 ) AS col1 FROM tab0 AS cor0
----
41343616
48982026
59323710

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col0 + - col0 * - ( - col1 ) col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - 1 + col1 FROM tab2
----
16
30
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2016
SELECT ( col1 ) * CAST( + col0 AS SIGNED ) * - col0 AS col2 FROM tab0 AS cor0
----
-118825
-49536
-720811

skipif mysql # not compatible
query I rowsort label-2016
SELECT ( col1 ) * CAST ( + col0 AS INTEGER ) * - col0 AS col2 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT 34 - - col0 FROM tab2 AS cor0
----
112
113
41

query I rowsort
SELECT 36 * col2 + 91 FROM tab1 AS cor0
----
2035
2143
3547

query I rowsort
SELECT col1 * col1 * col1 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT ALL + + 57 + col0 FROM tab2 AS cor0
----
135
136
64

query I rowsort
SELECT + + col2 + - col2 * - cor0.col2 FROM tab2 AS cor0
----
1482
702
756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 30 col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 56fa25f9fb8040460fe3c894000ea8fb

query I rowsort
SELECT - col2 + col0 * - 94 AS col2 FROM tab2
----
-685
-7358
-7464

query I rowsort
SELECT ALL tab2.col1 + + tab2.col2 FROM tab2
----
55
58
85

query I rowsort
SELECT cor1.col2 AS col2 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT - + 42 * 88 AS col1 FROM tab0 AS cor0
----
-3696

query I rowsort
SELECT DISTINCT + 3 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
3

query I rowsort
SELECT - 45 AS col0 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 63e2b488a204f83ec8c063dafdfd4371

onlyif mysql # use DIV operator for integer division
query I rowsort label-2029
SELECT tab0.col2 DIV col1 + + col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2029
SELECT tab0.col2 / col1 + + col1 FROM tab0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2030
SELECT DISTINCT CAST( col0 AS SIGNED ) + tab2.col1 AS col2 FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-2030
SELECT DISTINCT CAST ( col0 AS INTEGER ) + tab2.col1 AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT - col0 + + 85 AS col1 FROM tab0
----
-4
50
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-2032
SELECT + col2 DIV - col2 + - col2 * - col2 + 54 * col0 * 59 FROM tab0
----
111510
290277
77552

skipif mysql # not compatible
query I rowsort label-2032
SELECT + col2 / - col2 + - col2 * - col2 + 54 * col0 * 59 FROM tab0
----
111510
290277
77552

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2033
SELECT ALL + CAST( 8 AS SIGNED ) + col2 FROM tab1
----
104
62
65

skipif mysql # not compatible
query I rowsort label-2033
SELECT ALL + CAST ( 8 AS INTEGER ) + col2 FROM tab1
----
104
62
65

query I rowsort
SELECT DISTINCT col1 - ( - col1 ) FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT 55 * + col0 FROM tab1 AS cor0
----
165
3520
4400

skipif mysql # not compatible
query I rowsort
SELECT ALL + + CAST ( cor0.col2 AS REAL ) AS col1 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT + 35 * col0 + + col0 - + 17 FROM tab1 cor0
----
2287
2863
91

query I rowsort
SELECT ALL - - col2 * - col1 AS col0 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT - tab1.col0 + 51 + tab1.col0 AS col2 FROM tab1
----
51
51
51

query I rowsort
SELECT DISTINCT ( + 44 ) + + col1 FROM tab0 cor0
----
130
135
141

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2041
SELECT - CAST( col2 AS SIGNED ) * col1 + col2 * col2 * col2 - col2 FROM tab1 AS cor0
----
156006
184566
883392

skipif mysql # not compatible
query I rowsort label-2041
SELECT - CAST ( col2 AS INTEGER ) * col1 + col2 * col2 * col2 - col2 FROM tab1 AS cor0
----
156006
184566
883392

onlyif mysql # use DIV operator for integer division
query I rowsort label-2042
SELECT - tab0.col2 DIV CAST( - col0 AS SIGNED ) FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2042
SELECT - tab0.col2 / CAST ( - col0 AS INTEGER ) FROM tab0
----
0
0
1

query I rowsort
SELECT ALL - col0 + + 14 * + 50 FROM tab1
----
620
636
697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2044
SELECT ALL + col2 + - CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-2044
SELECT ALL + col2 + - CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - cor0.col1 + + 84 FROM tab1 AS cor0
----
58
71
74

query I rowsort
SELECT ALL + - cor0.col1 * ( - col2 ) - col2 FROM tab0 AS cor0
----
2805
7380
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2047
SELECT ALL + col0 - + CAST( - col1 AS SIGNED ) AS col2 FROM tab1 cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-2047
SELECT ALL + col0 - + CAST ( - col1 AS INTEGER ) AS col2 FROM tab1 cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2048
SELECT + col0 + - CAST( NULL AS SIGNED ) * + col0 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2048
SELECT + col0 + - CAST ( NULL AS INTEGER ) * + col0 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 + 78 + + 80 AS col1 FROM tab0 AS cor0
----
61
67
72

query I rowsort
SELECT - + col2 + + 46 FROM tab1 AS cor0
----
-11
-50
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + col0 col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT - + cor0.col1 * - col2 + - col0 + col1 AS col0 FROM tab0 AS cor0
----
159
2900
7464

query I rowsort
SELECT ( - ( col0 ) ) + + col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2054
SELECT + - CAST( NULL AS DECIMAL ) + cor0.col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2054
SELECT + - CAST ( NULL AS REAL ) + cor0.col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2055
SELECT ALL + + CAST( NULL AS SIGNED ) * + 27 + - col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2055
SELECT ALL + + CAST ( NULL AS INTEGER ) * + 27 + - col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( 68 ) FROM tab1 AS cor0
----
68
68
68

query I rowsort
SELECT + + 80 + col1 AS col0 FROM tab1 AS cor0
----
106
90
93

query I rowsort
SELECT + - 40 * col0 AS col2 FROM tab2 cor0
----
-280
-3120
-3160

query I rowsort
SELECT DISTINCT - ( + col1 ) * - col2 - - ( col2 ) AS col1 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-2060
SELECT ALL col0 + col0 DIV 94 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2060
SELECT ALL col0 + col0 / 94 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - - col1 * - 79 + col0 + + col0 AS col2 FROM tab0 AS cor0
----
-6746
-7011
-7593

query I rowsort
SELECT DISTINCT col1 + + tab1.col1 - + ( + tab1.col2 * col0 ) FROM tab1
----
-110
-3628
-7654

query I rowsort
SELECT - cor0.col0 - col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT - - col1 - 70 AS col2 FROM tab2 AS cor0
----
-11
-39
-53

query I rowsort
SELECT col1 * + 42 FROM tab2 cor0
----
1302
2478
714

query I rowsort
SELECT - ( + 85 ) AS col0 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to 91e44ead5e72fa22f87a57243e232ede

query I rowsort
SELECT ALL 87 * tab1.col2 FROM tab1
----
4698
4959
8352

query I rowsort
SELECT 39 * 25 + - cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 2603b5489aabdda4425721d447c38cb8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2069
SELECT DISTINCT + CAST( NULL AS SIGNED ) + cor0.col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2069
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + cor0.col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL cor0.col1 * cor0.col0 * + col1 FROM tab1 cor0
----
13520
2028
6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - 55 col2 FROM tab2
----
-385
-4290
-4345

query I rowsort
SELECT 10 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT 9 + + col2 AS col1 FROM tab1 AS cor0
----
105
63
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2074
SELECT - col2 + + col2 * - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2074
SELECT - col2 + + col2 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2075
SELECT + CAST( col0 AS SIGNED ) * col1 AS col1 FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-2075
SELECT + CAST ( col0 AS INTEGER ) * col1 AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT 61 - + tab0.col2 FROM tab0, tab1, tab1 cor0, tab2
----
81 values hashing to 7053e55ca2faf3b01c7fb72adb1a5dc7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2077
SELECT DISTINCT - cor0.col2 + cor0.col1 DIV - col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-2077
SELECT DISTINCT - cor0.col2 + cor0.col1 / - col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - 58 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to de0811e670e75d2aeeb657e32bddb0c0

query I rowsort
SELECT - - 82 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT cor0.col1 + col0 * col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT cor1.col1 FROM tab2, tab1 AS cor0, tab0 cor1
----
86
91
97

query I rowsort
SELECT col0 * tab0.col1 * - col1 AS col0 FROM tab0
----
-177504
-329315
-737009

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2083
SELECT + CAST( - 87 AS SIGNED ) FROM tab0, tab2 AS cor0
----
9 values hashing to 84bcab58a965cc8ae97b39d2d01b3d23

skipif mysql # not compatible
query I rowsort label-2083
SELECT + CAST ( - 87 AS INTEGER ) FROM tab0, tab2 AS cor0
----
9 values hashing to 84bcab58a965cc8ae97b39d2d01b3d23

query I rowsort
SELECT - 0 + 25 FROM tab1 AS cor0
----
25
25
25

query I rowsort
SELECT DISTINCT - ( - 98 ) FROM tab0 AS cor0
----
98

query I rowsort
SELECT DISTINCT - + 8 * col2 + col2 + + col2 AS col2 FROM tab1 cor0
----
-324
-342
-576

query I rowsort
SELECT 35 * + 35 + - col2 FROM tab0 cor0
----
1143
1192
1224

query I rowsort
SELECT DISTINCT + - 78 * col1 + col0 + col2 FROM tab2 AS cor0
----
-1209
-2384
-4498

query I rowsort
SELECT - - 86 * - 42 + col0 FROM tab1 AS cor0
----
-3532
-3548
-3609

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * + col2 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col2 - - tab2.col2 * col2 * col1 AS col0 FROM tab2
----
22626
24586
39910

query I rowsort
SELECT + col1 + - tab2.col1 * + 54 - - col1 * + 94 FROM tab2
----
1271
2419
697

query I rowsort
SELECT + 37 FROM tab0, tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT + cor0.col2 * - col2 * col0 AS col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT 4 + col0 * col2 FROM tab0 AS cor0
----
39
7302
796

onlyif mysql # use DIV operator for integer division
query I rowsort label-2096
SELECT ALL + col2 * col1 + - col0 DIV + cor0.col0 + col0 AS col2 FROM tab0 AS cor0
----
131
2861
7550

skipif mysql # not compatible
query I rowsort label-2096
SELECT ALL + col2 * col1 + - col0 / + cor0.col0 + col0 AS col2 FROM tab0 AS cor0
----
131
2861
7550

query I rowsort
SELECT ALL - 86 * + col0 + + col1 + col2 FROM tab2 AS cor0
----
-544
-6623
-6739

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2098
SELECT ALL CAST( + 57 AS SIGNED ) FROM tab1 cor0
----
57
57
57

skipif mysql # not compatible
query I rowsort label-2098
SELECT ALL CAST ( + 57 AS INTEGER ) FROM tab1 cor0
----
57
57
57

query I rowsort
SELECT - ( - col2 ) + + col0 AS col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT + col1 + + col1 + - col2 AS col1 FROM tab1 AS cor0
----
-2
-37
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2101
SELECT - col1 DIV - 71 + + col2 + + ( 48 * + col2 ) FROM tab2 AS cor0
----
1274
1323
1862

skipif mysql # not compatible
query I rowsort label-2101
SELECT - col1 / - 71 + + col2 + + ( 48 * + col2 ) FROM tab2 AS cor0
----
1274
1323
1862

query I rowsort
SELECT + ( + col2 ) * - col1 + + ( + 90 ) * col1 + col1 FROM tab1 AS cor0
----
-65
340
962

query I rowsort
SELECT + 7 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT DISTINCT + 80 * col1 FROM tab1
----
1040
2080
800

onlyif mysql # use DIV operator for integer division
query I rowsort label-2105
SELECT DISTINCT - col2 + col2 + ( cor0.col2 ) DIV cor0.col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2105
SELECT DISTINCT - col2 + col2 + ( cor0.col2 ) / cor0.col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT 73 AS col0 FROM tab1 cor0 CROSS JOIN tab0 cor1
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT ALL col0 + + 72 AS col2 FROM tab2 AS cor0
----
150
151
79

query I rowsort
SELECT - col0 * - col0 + - 14 + col1 FROM tab1 AS cor0
----
21
4092
6399

query I rowsort
SELECT col1 - ( + col0 ) * col1 * + col1 AS col2 FROM tab1 cor0
----
-13507
-2002
-6390

query I rowsort
SELECT ALL + + col2 + + ( + 3 ) AS col0 FROM tab2 cor0
----
29
30
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 + - 24 col2 FROM tab2 AS cor0
----
-7
35
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2112
SELECT DISTINCT col2 + + ( col2 ) DIV + col0 FROM tab2 AS cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-2112
SELECT DISTINCT col2 + + ( col2 ) / + col0 FROM tab2 AS cor0
----
26
30
38

query I rowsort
SELECT + col1 * cor0.col2 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT ALL + cor0.col1 + 41 + 50 AS col0 FROM tab1 AS cor0
----
101
104
117

query I rowsort
SELECT DISTINCT + + col1 - + col1 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT col1 * 99 FROM tab1 AS cor0
----
1287
2574
990

query I rowsort
SELECT + col1 * + col1 * col2 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT - col0 + - col0 + - cor0.col1 AS col0 FROM tab2 AS cor0
----
-175
-215
-45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2119
SELECT DISTINCT + CAST( col2 AS SIGNED ) * + cor0.col2 FROM tab2 AS cor0
----
1444
676
729

skipif mysql # not compatible
query I rowsort label-2119
SELECT DISTINCT + CAST ( col2 AS INTEGER ) * + cor0.col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL + col1 * - ( col2 ) + + col0 AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL 82 + col1 * - cor0.col2 FROM tab2 AS cor0
----
-1452
-564
-755

query I rowsort
SELECT ALL - 56 * col1 AS col2 FROM tab0 AS cor0
----
-4816
-5096
-5432

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2123
SELECT DISTINCT col0 - - CAST( NULL AS SIGNED ) AS col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-2123
SELECT DISTINCT col0 - - CAST ( NULL AS INTEGER ) AS col0 FROM tab2
----
NULL

query I rowsort
SELECT - col2 + - ( + 76 ) + col1 AS col2 FROM tab2
----
-43
-72
-97

query I rowsort
SELECT DISTINCT + - col0 + - col1 * + col1 * + col1 FROM tab2 AS cor0
----
-205457
-29798
-4992

query I rowsort
SELECT - ( 77 ) FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to c7e5f48ecd3843d54a76808ed1f43ff6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2127
SELECT ALL cor0.col1 DIV - col2 + + col0 * 78 * - col0 col2 FROM tab1 cor0
----
-319488
-499200
-702

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2127
SELECT ALL cor0.col1 / - col2 + + col0 * 78 * - col0 col2 FROM tab1 cor0
----
-319488
-499200
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-2128
SELECT DISTINCT + - col2 DIV col2 AS col1 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-2128
SELECT DISTINCT + - col2 / col2 AS col1 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT + ( - col0 ) * + 90 AS col0 FROM tab0 AS cor0
----
-2160
-3150
-8010

query I rowsort
SELECT DISTINCT ( - col2 ) + - col2 AS col1 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT + col0 * - col0 * col1 FROM tab1 cor0
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT + + 42 * + col1 FROM tab1 AS cor0
----
1092
420
546

query I rowsort
SELECT DISTINCT - 79 + cor0.col2 FROM tab0 cor0
----
-46
-78
3

query I rowsort
SELECT ALL + 81 * cor0.col0 FROM tab1 AS cor0
----
243
5184
6480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2135
SELECT - ( tab2.col1 * CAST( NULL AS DECIMAL ) ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2135
SELECT - ( tab2.col1 * CAST ( NULL AS REAL ) ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ( col1 ) * ( col0 ) * col1 - - 69 * col2 AS col1 FROM tab1
----
10333
20144
5754

query I rowsort
SELECT DISTINCT - 40 * col1 FROM tab0
----
-3440
-3640
-3880

query I rowsort
SELECT col2 * - col0 + 36 FROM tab0 cor0
----
-7262
-756
1

query I rowsort
SELECT DISTINCT ( 29 ) * + col1 + col0 * + 9 AS col2 FROM tab0 AS cor0
----
2710
3128
3440

query I rowsort
SELECT ALL + ( 62 ) FROM tab0 AS cor0
----
62
62
62

query I rowsort
SELECT ALL - + cor0.col1 - col0 AS col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT - 12 - + col2 FROM tab2 cor0
----
-38
-39
-50

query I rowsort
SELECT 85 AS col2 FROM tab2, tab0, tab0 cor0
----
27 values hashing to e4cf94cf0cc632acff30ad1dac617cb7

query I rowsort
SELECT DISTINCT 73 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
73

query I rowsort
SELECT - 83 AS col1 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 77a48ad722db122f51d5ef36604ad843

query I rowsort
SELECT - 58 + col2 FROM tab2 AS cor0
----
-20
-31
-32

query I rowsort
SELECT ALL - col1 * tab0.col0 * tab0.col0 AS col2 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT tab2.col2 + + 6 FROM tab2
----
32
33
44

query I rowsort
SELECT ALL - - col0 + 2 + - col2 AS col2 FROM tab2 AS cor0
----
-18
43
54

query I rowsort
SELECT DISTINCT col0 - - 27 * 76 FROM tab2 cor0
----
2059
2130
2131

query I rowsort
SELECT + col1 * + 47 + - col2 FROM tab0 cor0
----
4009
4195
4558

query I rowsort
SELECT DISTINCT col1 + + col0 * 22 + col1 FROM tab0 AS cor0
----
2140
700
964

query I rowsort
SELECT ALL + col2 + - ( - 56 ) FROM tab0 AS cor0
----
138
57
89

query I rowsort
SELECT + ( + ( + col2 ) ) AS col2 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2155
SELECT - - CAST( NULL AS SIGNED ) * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2155
SELECT - - CAST ( NULL AS INTEGER ) * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 23 FROM tab0 cor0
----
23
23
23

query I rowsort
SELECT + 78 + col1 FROM tab0 cor0
----
164
169
175

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 54 + col1 col0 FROM tab2 AS cor0
----
113
71
85

query I rowsort
SELECT DISTINCT col1 - + 7 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-156
-60
-78

query I rowsort
SELECT ALL - col0 * col1 + cor0.col2 - 15 AS col2 FROM tab0 AS cor0
----
-2046
-3409
-8032

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 16 col0 FROM tab0 AS cor0
----
-16

query I rowsort
SELECT DISTINCT + col1 + - 67 AS col2 FROM tab0 AS cor0
----
19
24
30

query I rowsort
SELECT DISTINCT + + col2 * - col1 * col2 + 7 * col1 FROM tab2 AS cor0
----
-22382
-24429
-39471

query I rowsort
SELECT ALL - ( + cor0.col1 ) * cor0.col1 + + 0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL + tab2.col2 * + 38 * col2 AS col1 FROM tab2
----
25688
27702
54872

query I rowsort
SELECT - col2 + cor0.col0 * - col2 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT + - ( + 63 ) + + col0 + + col0 * - 51 * + col0 FROM tab1 AS cor0
----
-208895
-326383
-519

query I rowsort
SELECT DISTINCT - tab1.col0 AS col1 FROM tab1, tab0, tab0 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2169
SELECT col1 + - CAST( NULL AS SIGNED ) + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2169
SELECT col1 + - CAST ( NULL AS INTEGER ) + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col2 + 76 FROM tab1 AS cor0
----
-20
19
22

query I rowsort
SELECT col2 * ( col2 ) + col1 FROM tab0 cor0
----
1175
6815
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2172
SELECT + col2 + col1 + col0 DIV - tab2.col0 AS col0 FROM tab2
----
54
57
84

skipif mysql # not compatible
query I rowsort label-2172
SELECT + col2 + col1 + col0 / - tab2.col0 AS col0 FROM tab2
----
54
57
84

query I rowsort
SELECT ALL - 80 + + col0 + + tab1.col2 AS col0 FROM tab1
----
-23
41
96

query I rowsort
SELECT DISTINCT - - 11 FROM tab1, tab0, tab0 AS cor0
----
11

query I rowsort
SELECT DISTINCT - col1 * col1 + + col2 * + col2 + col0 FROM tab0
----
-1468
-6283
-9373

query I rowsort
SELECT ALL + - cor0.col2 + + 12 FROM tab2 AS cor0
----
-14
-15
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2177
SELECT ALL - cor0.col1 DIV - ( + col0 ) FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-2177
SELECT ALL - cor0.col1 / - ( + col0 ) FROM tab1 AS cor0
----
0
0
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2178
SELECT DISTINCT + col0 + - CAST( - cor0.col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort label-2178
SELECT DISTINCT + col0 + - CAST ( - cor0.col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT col0 + 25 + col0 FROM tab0 cor0
----
203
73
95

query I rowsort
SELECT + cor0.col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ( + col1 ) * + col2 + - col1 + + col2 AS col2 FROM tab0
----
1
2785
7453

query I rowsort
SELECT - col0 - col2 * ( 92 ) FROM tab1 cor0
----
-4971
-5308
-8912

query I rowsort
SELECT ALL 67 FROM tab1, tab1 cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT + col1 + col1 + + col2 AS col0 FROM tab0 AS cor0
----
195
205
264

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 + - col0 col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT + col0 * - ( - col2 ) + cor0.col1 - col1 * col2 AS col2 FROM tab0 AS cor0
----
-1960
-73
35

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col1 * CAST ( - 81 + col2 AS REAL ) FROM tab2 AS cor0
----
-1674
-3245
-731

query I rowsort
SELECT + cor1.col2 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT col2 - + col2 * 75 FROM tab0
----
-2442
-6068
-74

query I rowsort
SELECT ALL + - col0 + col0 + - col1 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2191
SELECT DISTINCT - col1 * CAST( + col0 AS SIGNED ) + + cor0.col1 FROM tab1 AS cor0
----
-1027
-52
-630

skipif mysql # not compatible
query I rowsort label-2191
SELECT DISTINCT - col1 * CAST ( + col0 AS INTEGER ) + + cor0.col1 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-2192
SELECT DISTINCT - col2 DIV - ( + 93 ) AS col2 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-2192
SELECT DISTINCT - col2 / - ( + 93 ) AS col2 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT col1 * + tab1.col0 - - 55 FROM tab1
----
1095
133
695

query I rowsort
SELECT - tab0.col0 + col2 + + 75 FROM tab0
----
41
68
84

query I rowsort
SELECT - ( col1 ) * + 58 FROM tab2
----
-1798
-3422
-986

query I rowsort
SELECT DISTINCT - col1 * col2 * + ( - col1 ) + col0 AS col1 FROM tab2
----
11061
25954
90584

query I rowsort
SELECT ALL + col1 - - col2 * 39 * col1 FROM tab1
----
22240
48685
54782

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab2, tab1, tab2 AS cor0
----
82

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + CAST ( col1 AS REAL ) + + col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL + ( - 11 ) + col1 * 14 FROM tab1 AS cor0
----
129
171
353

query I rowsort
SELECT DISTINCT 0 * - col1 + col2 * col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + - ( 98 ) + cor0.col1 AS col0 FROM tab2 AS cor0
----
-39
-67
-81

query I rowsort
SELECT - cor0.col2 * col0 * col0 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT ALL + cor0.col2 * 87 FROM tab0 cor0
----
2871
7134
87

query I rowsort
SELECT + cor1.col2 AS col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # use DIV operator for integer division
query I rowsort label-2206
SELECT ALL ( + col1 ) DIV + col2 AS col1 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2206
SELECT ALL ( + col1 ) / + col2 AS col1 FROM tab0
----
1
2
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2207
SELECT + col1 DIV + 99 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2207
SELECT + col1 / + 99 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - col2 * + col2 * + col2 FROM tab0 AS cor0
----
-1
-35937
-551368

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2209
SELECT CAST( + col0 AS SIGNED ) - - col0 AS col0 FROM tab2
----
14
156
158

skipif mysql # not compatible
query I rowsort label-2209
SELECT CAST ( + col0 AS INTEGER ) - - col0 AS col0 FROM tab2
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 10 col2 FROM tab2
----
-10

query I rowsort
SELECT DISTINCT tab1.col2 * + cor0.col1 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 6b6947fcb54b3e9529d0c75cfb5b2d32

query I rowsort
SELECT DISTINCT - col0 + + cor0.col2 * + col1 + - cor0.col2 FROM tab1 AS cor0
----
1072
1347
449

query I rowsort
SELECT 39 + col2 FROM tab2 cor0
----
65
66
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * col1 + + cor0.col0 + + col0 col1 FROM tab2 AS cor0
----
-1185
-203
-4446

query I rowsort
SELECT DISTINCT + cor0.col1 + tab2.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 842626f118cf89b4c73f66c187067e39

onlyif mysql # use DIV operator for integer division
query I rowsort label-2216
SELECT + col0 + col2 DIV + col1 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-2216
SELECT + col0 + col2 / + col1 FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT DISTINCT - ( + col0 ) * + cor0.col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2218
SELECT - - ( col1 ) DIV col0 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-2218
SELECT - - ( col1 ) / col0 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT ALL 15 * + col0 FROM tab1 cor0
----
1200
45
960

query I rowsort
SELECT ALL + 53 + col0 * + col0 FROM tab2 AS cor0
----
102
6137
6294

query I rowsort
SELECT ALL + cor0.col0 - cor0.col0 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 84 + col1 FROM tab1 cor0
----
110
94
97

query I rowsort
SELECT ALL - + cor0.col2 * - col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + col0 * + col2 * + col0 + - col0 * col2 FROM tab2
----
1134
156156
234156

query I rowsort
SELECT col1 + - col2 * col0 * col2 FROM tab1 AS cor0
----
-207926
-737267
-8722

onlyif mysql # use DIV operator for integer division
query I rowsort label-2226
SELECT DISTINCT - - col0 * col1 + - col0 * cor0.col0 DIV - cor0.col0 FROM tab0 AS cor0
----
2088
3430
8188

skipif mysql # not compatible
query I rowsort label-2226
SELECT DISTINCT - - col0 * col1 + - col0 * cor0.col0 / - cor0.col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT col2 * + 86 * - ( + col0 ) - cor0.col0 FROM tab0 AS cor0
----
-3045
-627717
-68136

query I rowsort
SELECT DISTINCT + col2 + ( - ( cor0.col0 ) ) FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - - col2 + - 75 AS col1 FROM tab2 cor0
----
-37
-48
-49

query I rowsort
SELECT cor0.col1 * ( + 38 ) FROM tab1 AS cor0
----
380
494
988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2231
SELECT DISTINCT + - cor0.col1 - + CAST( + col0 * col1 AS SIGNED ) FROM tab0 AS cor0
----
-2150
-3492
-8190

skipif mysql # not compatible
query I rowsort label-2231
SELECT DISTINCT + - cor0.col1 - + CAST ( + col0 * col1 AS INTEGER ) FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL col0 + ( - col0 + + col0 * col0 ) FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-2233
SELECT DISTINCT - col0 DIV - col0 + + 85 FROM tab1 AS cor0
----
86

skipif mysql # not compatible
query I rowsort label-2233
SELECT DISTINCT - col0 / - col0 + + 85 FROM tab1 AS cor0
----
86

query I rowsort
SELECT - col0 + ( col0 ) FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 88 * col2 + + col0 FROM tab1 AS cor0
----
4755
5080
8528

query I rowsort
SELECT + ( + 82 ) FROM tab0 AS cor0
----
82
82
82

query I rowsort
SELECT DISTINCT - 57 - - 11 FROM tab2 AS cor0
----
-46

query I rowsort
SELECT ALL - - col2 * - cor0.col1 + + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL + col2 + - col2 * col1 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT 32 + 38 + col1 FROM tab0 AS cor0
----
156
161
167

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2241
SELECT + - CAST( - 92 AS SIGNED ) + - col1 AS col0 FROM tab0 AS cor0
----
-5
1
6

skipif mysql # not compatible
query I rowsort label-2241
SELECT + - CAST ( - 92 AS INTEGER ) + - col1 AS col0 FROM tab0 AS cor0
----
-5
1
6

query I rowsort
SELECT ALL + - cor0.col0 + + col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2243
SELECT ALL + CAST( NULL AS SIGNED ) + cor0.col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2243
SELECT ALL + CAST ( NULL AS INTEGER ) + cor0.col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 + + ( tab0.col2 + - col2 ) FROM tab0
----
1
33
82

query I rowsort
SELECT ALL + ( + 2 ) * - cor0.col0 - col1 AS col2 FROM tab1 AS cor0
----
-138
-173
-32

query I rowsort
SELECT - + 63 + + 9 FROM tab0 cor0
----
-54
-54
-54

query I rowsort
SELECT ALL - col2 * + ( - col2 + col1 ) * + col1 FROM tab2 AS cor0
----
-3348
-50622
13566

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 97 + 50 * - col1 col2 FROM tab1 AS cor0
----
-1203
-403
-553

query I rowsort
SELECT - col1 + col0 * + 92 AS col1 FROM tab1 AS cor0
----
250
5878
7347

query I rowsort
SELECT ALL + 80 * + col1 * + col0 FROM tab0
----
165120
271600
647920

query I rowsort
SELECT 24 * col1 + + tab1.col2 AS col1 FROM tab1
----
297
408
678

query I rowsort
SELECT 4 + 20 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

query I rowsort
SELECT ALL - col2 * 8 AS col1 FROM tab2
----
-208
-216
-304

query I rowsort
SELECT ALL col0 + - ( ( - col1 ) ) AS col2 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT + col1 * + ( col0 ) FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL + col0 * - ( - ( col1 ) ) FROM tab0
----
2064
3395
8099

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 CROSS JOIN tab2, tab0, tab0 AS cor1
----
3645 values hashing to a5677c50b23f70287df35c2388a1c9bf

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 9 + - col0 * col1 + + col1 col1 FROM tab2 cor0
----
-1317
-177
-4534

onlyif mysql # use DIV operator for integer division
query I rowsort label-2259
SELECT + col2 * col1 DIV ( - col0 ) + col0 FROM tab2 cor0
----
-112
59
71

skipif mysql # not compatible
query I rowsort label-2259
SELECT + col2 * col1 / ( - col0 ) + col0 FROM tab2 cor0
----
-112
59
71

query I rowsort
SELECT + + col1 + + col1 + 24 AS col1 FROM tab0 AS cor0
----
196
206
218

query I rowsort
SELECT 14 * col1 + col0 FROM tab2 AS cor0
----
317
441
904

query I rowsort
SELECT ( - ( - tab1.col0 ) ) FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2263
SELECT + col2 + col0 + tab1.col2 DIV CAST( ( - col1 ) AS SIGNED ) col0 FROM tab1
----
116
169
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2263
SELECT + col2 + col0 + tab1.col2 / CAST ( ( - col1 ) AS INTEGER ) col0 FROM tab1
----
116
169
55

query I rowsort
SELECT ALL 3 * + col2 FROM tab0
----
246
3
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-2265
SELECT ALL - tab0.col1 * col2 DIV - col0 col1 FROM tab0
----
118
2
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2265
SELECT ALL - tab0.col1 * col2 / - col0 col1 FROM tab0
----
118
2
83

query I rowsort
SELECT ALL + 50 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2267
SELECT cor0.col0 DIV + 32 FROM tab0, tab2 AS cor0
----
9 values hashing to dcf0bdb0a33a97c73a81c5b823899d40

skipif mysql # not compatible
query I rowsort label-2267
SELECT cor0.col0 / + 32 FROM tab0, tab2 AS cor0
----
9 values hashing to dcf0bdb0a33a97c73a81c5b823899d40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 19 col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0fbbff28a7b63c37b01cf369f9325662

query I rowsort
SELECT 21 * tab0.col1 FROM tab0
----
1806
1911
2037

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + cor0.col2 + col1 * + col0 col0 FROM tab0 AS cor0
----
2073
3361
8092

query I rowsort
SELECT ALL + col2 * + col2 + + col1 AS col1 FROM tab2 cor0
----
1461
735
760

query I rowsort
SELECT DISTINCT - 68 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 88 * - col1 col1 FROM tab1 AS cor0
----
-1144
-2288
-880

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2274
SELECT CAST( NULL AS SIGNED ) + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2274
SELECT CAST ( NULL AS INTEGER ) + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + - col2 + - 94 * + col2 * col0 + - 62 AS col2 FROM tab2 AS cor0
----
-17855
-190720
-282288

query I rowsort
SELECT ALL - col1 + 16 + 74 AS col2 FROM tab1 AS cor0
----
64
77
80

query I rowsort
SELECT - + cor0.col1 * + ( col2 ) FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-2278
SELECT - + cor0.col0 * + cor0.col2 + + col2 DIV + col1 + + 58 * + col1 col1 FROM tab1 AS cor0
----
-3063
-6919
1348

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2278
SELECT - + cor0.col0 * + cor0.col2 + + col2 / + col1 + + 58 * + col1 col1 FROM tab1 AS cor0
----
-3063
-6919
1348

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2279
SELECT - CAST( 27 AS SIGNED ) * - col1 FROM tab0 AS cor0
----
2322
2457
2619

skipif mysql # not compatible
query I rowsort label-2279
SELECT - CAST ( 27 AS INTEGER ) * - col1 FROM tab0 AS cor0
----
2322
2457
2619

query I rowsort
SELECT + + 82 * col1 AS col2 FROM tab1 cor0
----
1066
2132
820

query I rowsort
SELECT - - col2 + 3 * col2 FROM tab2 AS cor0
----
104
108
152

query I rowsort
SELECT - + col2 * col0 * - 34 + ( col1 ) AS col0 FROM tab0 AS cor0
----
1287
248223
27014

query I rowsort
SELECT - cor0.col1 + - col0 AS col0 FROM tab1 cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-2284
SELECT - col1 + col1 DIV 7 col1 FROM tab0 AS cor0
----
-74
-78
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2284
SELECT - col1 + col1 / 7 col1 FROM tab0 AS cor0
----
-74
-78
-84

query I rowsort
SELECT - col0 * + col2 - + cor0.col0 * col1 * - col0 AS col2 FROM tab1 cor0
----
37312
72
75520

query I rowsort
SELECT + + 79 * + col1 AS col0 FROM tab1 AS cor0
----
1027
2054
790

query I rowsort
SELECT DISTINCT - 98 + - tab1.col2 AS col1 FROM tab1, tab1 AS cor0
----
-152
-155
-194

query I rowsort
SELECT DISTINCT - - col2 + col2 AS col2 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT + cor0.col2 + col0 * col2 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT col2 + col2 * + col2 * + tab2.col2 FROM tab2
----
17602
19710
54910

query I rowsort
SELECT 6 + col1 + col0 AS col2 FROM tab1
----
35
80
99

query I rowsort
SELECT ( - col1 * - col2 + - 48 ) FROM tab2
----
1486
598
789

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2293
SELECT ALL + CAST( ( col1 ) AS DECIMAL ) * + CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2293
SELECT ALL + CAST ( ( col1 ) AS REAL ) * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 - - col1 * col0 AS col0 FROM tab2
----
1381
244
4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2295
SELECT + CAST( NULL AS DECIMAL ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2295
SELECT + CAST ( NULL AS REAL ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT col1 * ( + col1 + - ( + col1 ) ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 35 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT ALL + - col2 - + 83 FROM tab0 AS cor0
----
-116
-165
-84

query I rowsort
SELECT 48 * col0 AS col2 FROM tab0 AS cor0
----
1152
1680
4272

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2300
SELECT DISTINCT + col0 + 42 / col1 - + CAST( ( - cor0.col0 ) * CAST( NULL AS DECIMAL ) AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2300
SELECT DISTINCT + col0 + 42 / col1 - + CAST ( ( - cor0.col0 ) * CAST ( NULL AS REAL ) AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + + 15 - + col0 FROM tab0 cor0
----
-20
-74
-9

query I rowsort
SELECT - col2 + + col2 * - 9 * + col2 + col0 AS col2 FROM tab0 AS cor0
----
-60509
-9810
25

query I rowsort
SELECT DISTINCT + col1 * col2 + ( col1 ) + - col2 * - cor0.col2 * - col2 AS col1 FROM tab1 AS cor0
----
-156034
-184613
-883475

query I rowsort
SELECT DISTINCT + + col1 + + col1 * - col2 * col1 AS col0 FROM tab2 AS cor0
----
-10965
-25916
-90447

query I rowsort
SELECT 68 * - col2 AS col1 FROM tab1 AS cor0
----
-3672
-3876
-6528

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 - cor0.col0 * col1 col0 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT + 38 + + col2 FROM tab0 AS cor0
----
120
39
71

query I rowsort
SELECT DISTINCT - 41 * - col2 + 5 FROM tab0 AS cor0
----
1358
3367
46

query I rowsort
SELECT DISTINCT + 63 * col0 + ( col2 ) AS col2 FROM tab1 AS cor0
----
243
4089
5136

query I rowsort
SELECT DISTINCT - cor0.col2 * - col0 - 65 FROM tab1 AS cor0
----
3583
7615
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2311
SELECT + 69 + - cor0.col2 DIV + 34 AS col0 FROM tab0 AS cor0
----
67
69
69

skipif mysql # not compatible
query I rowsort label-2311
SELECT + 69 + - cor0.col2 / + 34 AS col0 FROM tab0 AS cor0
----
67
69
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2312
SELECT - - 1 * col0 - + CAST( + col0 AS SIGNED ) * - cor0.col0 AS col2 FROM tab0 cor0
----
1260
600
8010

skipif mysql # not compatible
query I rowsort label-2312
SELECT - - 1 * col0 - + CAST ( + col0 AS INTEGER ) * - cor0.col0 AS col2 FROM tab0 cor0
----
1260
600
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col1 col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - - 52 * cor0.col0 + col2 FROM tab1 AS cor0
----
210
3385
4256

query I rowsort
SELECT ALL 52 * + 55 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 1cdfd8f808c06faad9e38a0ae790a8a2

query I rowsort
SELECT ALL ( 82 ) AS col2 FROM tab1
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * 35 col2 FROM tab2 AS cor0
----
1330
910
945

query I rowsort
SELECT + + col2 * col0 * col1 FROM tab0 AS cor0
----
3395
664118
68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col1 col1 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2320
SELECT ALL col1 DIV ( + ( col2 ) ) FROM tab0 cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2320
SELECT ALL col1 / ( + ( col2 ) ) FROM tab0 cor0
----
1
2
97

query I rowsort
SELECT + col1 * 67 AS col0 FROM tab0 AS cor0
----
5762
6097
6499

query I rowsort
SELECT tab1.col2 * - ( - 81 ) AS col1 FROM tab1, tab0 cor0
----
9 values hashing to b03a487d842d1b1b52d4eddc48b27ad7

query I rowsort
SELECT ALL + cor0.col0 + col2 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT col0 * 17 FROM tab0 cor0
----
1513
408
595

query I rowsort
SELECT + col1 * - ( cor0.col0 ) * col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT - 22 FROM tab2, tab0 cor0
----
-22

query I rowsort
SELECT ALL + col1 * + 78 FROM tab0
----
6708
7098
7566

onlyif mysql # use DIV operator for integer division
query I rowsort label-2328
SELECT DISTINCT - col0 + - col1 DIV cor0.col2 FROM tab0 AS cor0
----
-132
-26
-90

skipif mysql # not compatible
query I rowsort label-2328
SELECT DISTINCT - col0 + - col1 / cor0.col2 FROM tab0 AS cor0
----
-132
-26
-90

query I rowsort
SELECT ALL - 44 * + 62 FROM tab0, tab2 AS cor0
----
9 values hashing to 796a772236b65899f9df3e855aea387f

query I rowsort
SELECT - col2 + tab2.col1 AS col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL - col1 * + 29 + + cor0.col2 * 11 + ( - col2 ) AS col2 FROM tab2 AS cor0
----
-113
-1451
-629

query I rowsort
SELECT ALL + cor0.col2 + - col2 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + ( col0 ) + col2 * ( + col2 * + col1 ) AS col1 FROM tab2 AS cor0
----
22606
24627
39962

query I rowsort
SELECT - 83 * cor0.col1 FROM tab2 cor0
----
-1411
-2573
-4897

query I rowsort
SELECT ALL + ( - 93 ) + col0 AS col1 FROM tab1 AS cor0
----
-13
-29
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2336
SELECT DISTINCT - CAST( + 75 AS SIGNED ) FROM tab1 AS cor0
----
-75

skipif mysql # not compatible
query I rowsort label-2336
SELECT DISTINCT - CAST ( + 75 AS INTEGER ) FROM tab1 AS cor0
----
-75

query I rowsort
SELECT DISTINCT - col2 * + col1 + - col2 + ( 86 ) AS col0 FROM tab0 AS cor0
----
-12
-2785
-7458

query I rowsort
SELECT DISTINCT + + ( ( col0 ) ) AS col0 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2339
SELECT col0 * CAST( NULL AS SIGNED ) + - col2 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2339
SELECT col0 * CAST ( NULL AS INTEGER ) + - col2 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 * 13 + + col2 * col0 AS col2 FROM tab1
----
201
4480
8720

onlyif mysql # use DIV operator for integer division
query I rowsort label-2341
SELECT - 65 DIV + 87 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-2341
SELECT - 65 / + 87 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT - tab2.col1 * col0 + + 2 * col0 + 57 FROM tab2
----
-1128
-146
-4389

query I rowsort
SELECT DISTINCT + col1 + 20 FROM tab0
----
106
111
117

onlyif mysql # use DIV operator for integer division
query I rowsort label-2344
SELECT col1 * col2 DIV col0 - col0 AS col0 FROM tab1
----
-56
-65
465

skipif mysql # not compatible
query I rowsort label-2344
SELECT col1 * col2 / col0 - col0 AS col0 FROM tab1
----
-56
-65
465

query I rowsort
SELECT DISTINCT col2 * - 25 AS col2 FROM tab1
----
-1350
-1425
-2400

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2
----
3645 values hashing to 1e12915106866c102f2d9f96f9233144

onlyif mysql # use DIV operator for integer division
query I rowsort label-2347
SELECT DISTINCT - ( col0 ) + - col2 DIV + col0 FROM tab2 AS cor0
----
-10
-78
-79

skipif mysql # not compatible
query I rowsort label-2347
SELECT DISTINCT - ( col0 ) + - col2 / + col0 FROM tab2 AS cor0
----
-10
-78
-79

query I rowsort
SELECT DISTINCT 87 * - col1 AS col0 FROM tab0 AS cor0
----
-7482
-7917
-8439

query I rowsort
SELECT DISTINCT - 26 * + cor0.col1 FROM tab0, tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-2236
-2366
-2522

query I rowsort
SELECT + tab1.col2 FROM tab1, tab0 AS cor0, tab2, tab1 cor1
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

query I rowsort
SELECT ALL - col2 * col1 * - col0 - - col0 AS col2 FROM tab0
----
3430
664207
68136

query I rowsort
SELECT + col1 * - col0 - + ( + tab2.col1 + - col2 ) FROM tab2
----
-1322
-221
-4635

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2353
SELECT ALL + + col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2353
SELECT ALL + + col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 79 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

query I rowsort
SELECT 73 * col1 AS col1 FROM tab1 AS cor0
----
1898
730
949

onlyif mysql # use DIV operator for integer division
query I rowsort label-2356
SELECT cor0.col1 DIV cor0.col2 - ( - 67 * col1 + col2 ) AS col1 FROM tab0 cor0
----
5731
6016
6595

skipif mysql # not compatible
query I rowsort label-2356
SELECT cor0.col1 / cor0.col2 - ( - 67 * col1 + col2 ) AS col1 FROM tab0 cor0
----
5731
6016
6595

query I rowsort
SELECT ALL + col2 * + col0 + + col1 * - col1 FROM tab1
----
-514
3548
7511

query I rowsort
SELECT DISTINCT - col0 * ( - col1 ) FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2359
SELECT ALL col0 + col1 DIV + 71 AS col1 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2359
SELECT ALL col0 + col1 / + 71 AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT col1 * col2 * tab0.col1 + col1 AS col0 FROM tab0
----
244154
679133
9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + ( - cor0.col2 ) + col1 col0 FROM tab1 AS cor0
----
-111
-163
-31

query I rowsort
SELECT DISTINCT + col2 * col1 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
2814
62
7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-2363
SELECT ALL + col1 DIV + col2 + col2 + col1 * + 99 FROM tab0 AS cor0
----
8549
9092
9701

skipif mysql # not compatible
query I rowsort label-2363
SELECT ALL + col1 / + col2 + col2 + col1 * + 99 FROM tab0 AS cor0
----
8549
9092
9701

query I rowsort
SELECT DISTINCT col1 * + ( 65 + col0 ) FROM tab1 AS cor0
----
1290
1768
1885

query I rowsort
SELECT + col0 + - ( col2 ) + col2 AS col1 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT cor0.col0 * + col0 + col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT + col0 * - col1 + - col0 AS col2 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT col0 * + cor0.col0 + col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT + col0 + - col0 * + col1 AS col1 FROM tab2 cor0
----
-1264
-210
-4524

query I rowsort
SELECT ALL - col2 + - col0 + - cor0.col1 FROM tab2 AS cor0 WHERE NOT - col0 * - cor0.col0 NOT BETWEEN NULL AND + col1 + - col1 + - col2
----

query I rowsort
SELECT + cor0.col1 + - col2 AS col2 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT col2 AS col2 FROM tab0 WHERE NOT NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT col2 * - col1 + + col2 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT col0 + tab0.col2 FROM tab0 WHERE NOT NULL < NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2375
SELECT + + col1 * col0 DIV col2 AS col1 FROM tab0 AS cor0
----
3395
62
98

skipif mysql # not compatible
query I rowsort label-2375
SELECT + + col1 * col0 / col2 AS col1 FROM tab0 AS cor0
----
3395
62
98

query I rowsort
SELECT DISTINCT tab1.col2 + - tab1.col2 * + tab1.col0 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT ALL - col1 + + tab2.col0 FROM tab2
----
-24
19
62

query I rowsort
SELECT DISTINCT - col0 + - col2 + col2 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT + col0 * + col1 * col1 AS col1 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT - col2 * - col2 + + col1 FROM tab1
----
2942
3259
9229

query I rowsort
SELECT ALL + 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 ALL + cor0.col0 col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + col2 * col1 + col0 * + col1 AS col0 FROM tab1 AS cor0
----
1210
1482
2288

query I rowsort
SELECT ALL + col0 * + col0 * tab0.col0 + col1 FROM tab0
----
13910
42972
705060

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab1 WHERE NOT col2 IN ( col2 + col2 )
----
54
57
96

query I rowsort
SELECT + col2 + + col1 * - col2 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT ALL col1 AS col0 FROM tab2 WHERE ( - col2 ) IN ( col0 )
----

query I rowsort
SELECT col2 * col1 - - col0 * col0 FROM tab0
----
1322
15383
3414

query I rowsort
SELECT DISTINCT - tab0.col0 + col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT col2 FROM tab0 WHERE NOT ( NULL ) > NULL
----

query I rowsort
SELECT ALL + col2 + col1 * + col2 AS col0 FROM tab1
----
1344
1458
627

query I rowsort
SELECT col2 + tab0.col2 AS col2 FROM tab0 WHERE ( + col0 / col2 ) NOT IN ( col2 )
----
164
2
66

query I rowsort
SELECT 60 * + tab1.col2 FROM tab1
----
3240
3420
5760

query I rowsort
SELECT DISTINCT cor0.col1 + - 54 + cor1.col0 AS col2 FROM tab2, tab0 AS cor0, tab2 cor1
----
9 values hashing to 4d71b9578cccdd9b0d2f0eb3a4343c59

query I rowsort
SELECT - 20 * col2 FROM tab2 AS cor0
----
-520
-540
-760

query I rowsort
SELECT ALL col2 - col0 * col2 AS col1 FROM tab1
----
-108
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-2397
SELECT ALL col1 DIV col1 - tab2.col1 FROM tab2
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-2397
SELECT ALL col1 / col1 - tab2.col1 FROM tab2
----
-16
-30
-58

query III rowsort
SELECT * FROM tab1 WHERE NOT + col1 = - col2 + col0
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query III rowsort
SELECT * FROM tab1 WHERE ( col1 ) IN ( - col2 * + col0 * col1 )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL NOT BETWEEN col1 AND - col0 + col0 * col1
----

query I rowsort
SELECT ALL + col0 / cor0.col1 AS col1 FROM tab0 AS cor0 WHERE NULL NOT BETWEEN col0 * + col0 + col0 * cor0.col0 * col2 + col2 AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2402
SELECT ALL col0 * - cor0.col0 + col0 DIV col2 + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-1191
-14644
-1665

skipif mysql # not compatible
query I rowsort label-2402
SELECT ALL col0 * - cor0.col0 + col0 / col2 + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-1191
-14644
-1665

query I rowsort
SELECT ALL - col0 - + col2 * col1 FROM tab2
----
-1612
-725
-844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + tab2.col2 * - col0 * col2 + col2 col1 FROM tab2
----
-114000
-5049
-52676

onlyif mysql # use DIV operator for integer division
query I rowsort label-2405
SELECT DISTINCT - col0 * col0 + col2 DIV + col0 FROM tab1
----
-4096
-6399
9

skipif mysql # not compatible
query I rowsort label-2405
SELECT DISTINCT - col0 * col0 + col2 / + col0 FROM tab1
----
-4096
-6399
9

query I rowsort
SELECT ALL tab2.col1 + col0 - tab2.col0 * col0 FROM tab2
----
-11
-5947
-6145

onlyif mysql # use DIV operator for integer division
query I rowsort label-2407
SELECT ALL col0 * col0 + col1 DIV col1 + + col2 AS col2 FROM tab2
----
6111
6280
77

skipif mysql # not compatible
query I rowsort label-2407
SELECT ALL col0 * col0 + col1 / col1 + + col2 AS col2 FROM tab2
----
6111
6280
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-2408
SELECT col2 DIV col1 + - tab0.col0 * - tab0.col0 AS col0 FROM tab0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-2408
SELECT col2 / col1 + - tab0.col0 * - tab0.col0 AS col0 FROM tab0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-2409
SELECT col2 DIV - col1 + col1 * + tab2.col1 * + col1 - col0 AS col0 FROM tab2
----
205301
29784
4832

skipif mysql # not compatible
query I rowsort label-2409
SELECT col2 / - col1 + col1 * + tab2.col1 * + col1 - col0 AS col0 FROM tab2
----
205301
29784
4832

query I rowsort
SELECT - tab0.col2 + tab0.col1 * col1 * col0 AS col1 FROM tab0
----
177471
329314
736927

query I rowsort
SELECT DISTINCT col0 * + col0 + + col1 FROM tab0
----
1322
662
8012

query I rowsort
SELECT ALL + col0 * tab1.col0 * col1 + + col1 * col0 FROM tab1
----
312
41600
84240

query I rowsort
SELECT DISTINCT col0 + - 13 FROM tab2 AS cor0
----
-6
65
66

query I rowsort
SELECT - + cor0.col1 + col0 + col2 FROM tab0 AS cor0
----
-29
-61
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2415
SELECT DISTINCT - col1 DIV + col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-2415
SELECT DISTINCT - col1 / + col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT ( + col0 ) + - ( 76 * - col0 ) AS col0 FROM tab2
----
539
6006
6083

query I rowsort
SELECT DISTINCT + tab2.col2 * 24 FROM tab2
----
624
648
912

query I rowsort
SELECT ALL cor0.col2 * + col0 * col2 FROM tab0 cor0
----
26136
35
598436

query I rowsort
SELECT - col0 * ( 10 * + col0 ) FROM tab0 AS cor0
----
-12250
-5760
-79210

query I rowsort
SELECT ALL - - col0 * - col0 + - col1 FROM tab0 cor0
----
-1322
-662
-8012

query I rowsort
SELECT ALL + + col1 + + ( col1 ) * col1 AS col0 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT ALL + + col1 + + 1 * - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 + - 56 AS col1 FROM tab2 AS cor0
----
-82
-83
-94

query I rowsort
SELECT DISTINCT col2 * - col2 + - tab0.col2 AS col1 FROM tab0
----
-1122
-2
-6806

query I rowsort
SELECT - col1 * col0 - col0 * + 25 FROM tab1
----
-153
-2240
-3040

query I rowsort
SELECT DISTINCT + 86 + + col0 * col2 FROM tab0
----
121
7384
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * + 26 col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 3c6e3f54f13e877b191e4d4cba2e59af

onlyif mysql # use DIV operator for integer division
query I rowsort label-2428
SELECT - col1 DIV + 80 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2428
SELECT - col1 / + 80 AS col0 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2429
SELECT ALL CAST( - col2 AS SIGNED ) - - col2 * col0 AS col1 FROM tab2
----
162
2002
2964

skipif mysql # not compatible
query I rowsort label-2429
SELECT ALL CAST ( - col2 AS INTEGER ) - - col2 * col0 AS col1 FROM tab2
----
162
2002
2964

query I rowsort
SELECT DISTINCT + - 30 + - col0 * - col1 AS col1 FROM tab2 AS cor0
----
1313
187
4572

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2431
SELECT ALL + col0 + 67 * - col2 + + CAST( 79 AS SIGNED ) FROM tab2 AS cor0
----
-1585
-1723
-2388

skipif mysql # not compatible
query I rowsort label-2431
SELECT ALL + col0 + 67 * - col2 + + CAST ( 79 AS INTEGER ) FROM tab2 AS cor0
----
-1585
-1723
-2388

onlyif mysql # use DIV operator for integer division
query I rowsort label-2432
SELECT DISTINCT - col1 + - 63 DIV + col1 FROM tab1
----
-16
-17
-28

skipif mysql # not compatible
query I rowsort label-2432
SELECT DISTINCT - col1 + - 63 / + col1 FROM tab1
----
-16
-17
-28

query I rowsort
SELECT ALL + - ( + col2 ) + - col2 * + col2 + + col1 FROM tab0 AS cor0
----
-1036
-6715
95

query I rowsort
SELECT - col0 + cor0.col2 * 93 FROM tab2 AS cor0
----
2340
2504
3455

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2435
SELECT DISTINCT - 2 + col1 * CAST( NULL AS SIGNED ) + ( - col2 ) * cor0.col1 col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2435
SELECT DISTINCT - 2 + col1 * CAST ( NULL AS INTEGER ) + ( - col2 ) * cor0.col1 col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col1 + col1 col0 FROM tab2 cor0
----
-1475
-629
-806

query I rowsort
SELECT - - ( - col2 ) * + col2 + + 5 FROM tab1 AS cor0
----
-2911
-3244
-9211

query I rowsort
SELECT ALL + ( col1 ) + + 55 * 57 FROM tab0 AS cor0
----
3221
3226
3232

query I rowsort
SELECT 5 + col0 AS col1 FROM tab1 AS cor0
----
69
8
85

query I rowsort
SELECT col2 * + col1 + + ( - 75 ) * - col0 * col2 AS col0 FROM tab2 AS cor0
----
15012
153634
225796

onlyif mysql # use DIV operator for integer division
query I rowsort label-2441
SELECT + ( col1 ) DIV col1 + 10 * + col2 FROM tab1 AS cor0
----
541
571
961

skipif mysql # not compatible
query I rowsort label-2441
SELECT + ( col1 ) / col1 + 10 * + col2 FROM tab1 AS cor0
----
541
571
961

query I rowsort
SELECT DISTINCT - col2 * col2 + + cor0.col2 * 13 AS col2 FROM tab2 cor0
----
-338
-378
-950

query I rowsort
SELECT ALL - 70 * + col2 + - 71 FROM tab2 AS cor0
----
-1891
-1961
-2731

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * cor0.col0 + 87 * + cor0.col1 + col2 col2 FROM tab0 AS cor0
----
6939
7215
78

query I rowsort
SELECT + cor0.col0 * cor0.col0 + col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT ALL + 54 + cor0.col1 * - col0 AS col1 FROM tab1 AS cor0
----
-24
-586
-986

query I rowsort
SELECT - ( col1 ) + ( + col0 * - col0 ) AS col0 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT DISTINCT - + col1 + + col0 AS col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + 81 + + col2 * col2 FROM tab1 AS cor0
----
2997
3330
9297

query I rowsort
SELECT col2 * - cor0.col2 + + 49 AS col0 FROM tab0 AS cor0
----
-1040
-6675
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col2 ) + col0 col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + + 28 + - col1 AS col2 FROM tab1 AS cor0
----
15
18
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + - ( + 46 ) col1 FROM tab1 AS cor0
----
-110
-126
-49

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + col2 * - CAST ( col1 AS REAL ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT col1 * 3 * 77 + + col1 FROM tab2 AS cor0
----
13688
3944
7192

query I rowsort
SELECT DISTINCT + 14 * col1 + - 19 * 24 FROM tab0
----
748
818
902

query I rowsort
SELECT ALL + ( col1 ) + 7 AS col1 FROM tab1
----
17
20
33

query I rowsort
SELECT ALL col0 * col1 * + col2 + tab1.col2 FROM tab1
----
36537
4266
99936

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2459
SELECT ( + tab1.col2 ) * - CAST( - 67 * + col1 AS SIGNED ) + CAST( NULL AS SIGNED ) + col2 / - tab1.col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2459
SELECT ( + tab1.col2 ) * - CAST ( - 67 * + col1 AS INTEGER ) + CAST ( NULL AS INTEGER ) + col2 / - tab1.col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2460
SELECT DISTINCT col2 DIV col2 + col1 * 10 FROM tab0
----
861
911
971

skipif mysql # not compatible
query I rowsort label-2460
SELECT DISTINCT col2 / col2 + col1 * 10 FROM tab0
----
861
911
971

query I rowsort
SELECT DISTINCT - + col0 * + col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2462
SELECT - + 64 * col0 DIV col1 AS col0 FROM tab0 AS cor0
----
-17
-23
-62

skipif mysql # not compatible
query I rowsort label-2462
SELECT - + 64 * col0 / col1 AS col0 FROM tab0 AS cor0
----
-17
-23
-62

query I rowsort
SELECT ALL - - 51 AS col1 FROM tab2 AS cor0
----
51
51
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 82 * + 15 col0 FROM tab2 AS cor0
----
1230
1230
1230

query I rowsort
SELECT DISTINCT 21 * - col2 FROM tab1 AS cor0
----
-1134
-1197
-2016

query I rowsort
SELECT ALL - 78 * col0 AS col0 FROM tab1 AS cor0
----
-234
-4992
-6240

query I rowsort
SELECT - + col2 * + 15 * - col0 AS col0 FROM tab1 AS cor0
----
115200
2430
54720

query I rowsort
SELECT ALL + - 69 + - ( col0 ) AS col2 FROM tab0 AS cor0
----
-104
-158
-93

query I rowsort
SELECT ALL - 11 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 05cc989122d7724c7abefaba9625ef3d

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 CROSS JOIN tab2 cor1
----
243 values hashing to d489341cd587fd6eb0b972c5464c6ddc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col1 * col0 col1 FROM tab0 cor0
----
118825
49536
720811

query I rowsort
SELECT - 95 * col1 AS col0 FROM tab0 AS cor0
----
-8170
-8645
-9215

query I rowsort
SELECT DISTINCT - ( 88 ) * col0 AS col2 FROM tab2 AS cor0
----
-616
-6864
-6952

query I rowsort
SELECT ALL ( 87 ) * col1 + col0 + - tab0.col1 * col2 FROM tab0
----
4668
544
8377

query I rowsort
SELECT - col0 * - ( col2 ) AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT + tab1.col0 * + 59 FROM tab1, tab0, tab0 AS cor0
----
177
3776
4720

query I rowsort
SELECT - ( - col2 ) * col1 + ( 40 ) FROM tab0 AS cor0
----
137
2878
7502

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - 47 + tab1.col0 col2 FROM tab1
----
1225
534
691

query I rowsort
SELECT ALL col1 * - ( tab0.col1 ) FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT col2 * + cor0.col0 * + col0 AS col2 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT - cor0.col1 * 53 AS col1 FROM tab2 cor0
----
-1643
-3127
-901

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2482
SELECT - CAST( NULL AS DECIMAL ) + col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2482
SELECT - CAST ( NULL AS REAL ) + col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( col2 ) + - col2 * + 98 FROM tab0 AS cor0
----
-3201
-7954
-97

query I rowsort
SELECT + - col0 - + col0 AS col1 FROM tab2 AS cor0
----
-14
-156
-158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2485
SELECT - - CAST( NULL AS SIGNED ) + + 31 * - col2 * + 76 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2485
SELECT - - CAST ( NULL AS INTEGER ) + + 31 * - col2 * + 76 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + - col2 * + ( - 97 ) col2 FROM tab0 AS cor0
----
194
3287
8045

query I rowsort
SELECT 50 * col0 FROM tab1 AS cor0
----
150
3200
4000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col1 col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT + 87 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT ALL - col1 + col2 - cor0.col0 FROM tab1 AS cor0
----
-17
25
3

query I rowsort
SELECT ALL col1 + col1 * col1 AS col2 FROM tab1 AS cor0
----
110
182
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-2492
SELECT ALL - col1 DIV - 11 FROM tab1 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2492
SELECT ALL - col1 / - 11 FROM tab1 AS cor0
----
0
1
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2493
SELECT DISTINCT - - col0 * + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2493
SELECT DISTINCT - - col0 * + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL

query I rowsort
SELECT + - 64 * - 83 FROM tab1 AS cor0
----
5312
5312
5312

query I rowsort
SELECT - cor0.col2 + - 67 * + col1 AS col1 FROM tab1 cor0
----
-1796
-727
-967

onlyif mysql # use DIV operator for integer division
query I rowsort label-2496
SELECT + col0 DIV - 54 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2496
SELECT + col0 / - 54 FROM tab1
----
-1
-1
0

query I rowsort
SELECT ALL col1 * 35 FROM tab1
----
350
455
910

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT DISTINCT col1 + 41 + - cor0.col1 * cor0.col2 FROM tab1 AS cor0
----
-1194
-1337
-519

onlyif mysql # use DIV operator for integer division
query I rowsort label-2500
SELECT - tab0.col2 * - 69 - col2 * - col0 DIV + col0 FROM tab0
----
2310
5740
70

skipif mysql # not compatible
query I rowsort label-2500
SELECT - tab0.col2 * - 69 - col2 * - col0 / + col0 FROM tab0
----
2310
5740
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - tab1.col1 col2 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + ( cor1.col2 ) AS col0 FROM tab0, tab1 cor0, tab0 AS cor1
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2503
SELECT - col2 DIV CAST( + col2 AS SIGNED ) AS col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2503
SELECT - col2 / CAST ( + col2 AS INTEGER ) AS col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL cor0.col0 + col1 * 30 * + col0 FROM tab2 cor0
----
138138
40369
6517

query I rowsort
SELECT - - ( - col1 ) * + cor0.col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT 2 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

query I rowsort
SELECT + cor0.col1 * 12 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 37d90fb20125253d4858765c80772e4e

query I rowsort
SELECT - col0 + col1 + + col1 AS col1 FROM tab0 AS cor0
----
148
159
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 + - tab0.col0 * - col2 col0 FROM tab0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-2510
SELECT DISTINCT - 74 DIV - col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-2510
SELECT DISTINCT - 74 / - col1 FROM tab0
----
0

query I rowsort
SELECT ALL - col1 + - cor0.col0 FROM tab2 AS cor0
----
-137
-38
-96

skipif mysql # not compatible
query I rowsort
SELECT ( + col1 ) * + col0 + + CAST ( col0 AS REAL ) FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2513
SELECT ALL - + CAST( - col0 AS SIGNED ) * cor0.col2 + col1 AS col2 FROM tab1 AS cor0
----
188
3658
7693

skipif mysql # not compatible
query I rowsort label-2513
SELECT ALL - + CAST ( - col0 AS INTEGER ) * cor0.col2 + col1 AS col2 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-2514
SELECT + + col1 DIV - col1 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2514
SELECT + + col1 / - col1 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col0 * cor0.col1 + col0 * col1 FROM tab0 AS cor0
----
16198
4128
6790

query I rowsort
SELECT DISTINCT 40 * + col2 AS col2 FROM tab0 AS cor0
----
1320
3280
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-2517
SELECT ALL + cor2.col0 DIV - cor0.col0 FROM tab2 cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2, tab2 AS cor3
----
243 values hashing to 14173909dfdb17ae29365a0b8e179cdb

skipif mysql # not compatible
query I rowsort label-2517
SELECT ALL + cor2.col0 / - cor0.col0 FROM tab2 cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2, tab2 AS cor3
----
243 values hashing to 14173909dfdb17ae29365a0b8e179cdb

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + tab1.col2 - - 4 col0 FROM tab1
----
1252
1408
574

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 73edaf471aef3f42e9a0b0be98b79374

query I rowsort
SELECT ( 56 ) + col2 FROM tab0
----
138
57
89

query I rowsort
SELECT DISTINCT ( + 4 ) + + col0 FROM tab1
----
68
7
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - tab0.col2 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT 17 + 60 AS col2 FROM tab2
----
77
77
77

query I rowsort
SELECT col0 - 61 AS col2 FROM tab1
----
-58
19
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-2525
SELECT + ( col1 ) - col2 DIV + col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2525
SELECT + ( col1 ) - col2 / + col1 FROM tab0
----
86
91
97

query I rowsort
SELECT col2 + + 93 FROM tab2
----
119
120
131

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 53 col2 FROM tab1, tab2 AS cor0, tab2 cor1, tab1 AS cor2
----
81 values hashing to 63949b5362442f48bd29195397a57dad

query I rowsort
SELECT col2 * tab0.col2 * - col0 + ( 59 ) * + col1 FROM tab0
----
-21062
-593067
5688

query I rowsort
SELECT ALL + ( - col1 ) + col1 + + 84 AS col1 FROM tab2
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 + - ( tab2.col2 ) col0 FROM tab2
----
22
6058
6203

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2531
SELECT + - col0 - + CAST( col2 AS SIGNED ) * col2 FROM tab0 cor0
----
-1113
-36
-6813

skipif mysql # not compatible
query I rowsort label-2531
SELECT + - col0 - + CAST ( col2 AS INTEGER ) * col2 FROM tab0 cor0
----
-1113
-36
-6813

query I rowsort
SELECT ALL - col1 + col0 + - 44 AS col0 FROM tab2
----
-25
-68
18

query I rowsort
SELECT col2 + 89 - 36 * col2 * - ( - 79 ) AS col2 FROM tab2 AS cor0
----
-107945
-73829
-76672

query I rowsort
SELECT ALL - + col1 * ( - col2 ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + col1 + 65 FROM tab0 AS cor0
----
151
156
162

query I rowsort
SELECT + col1 + 27 - - col2 * col1 FROM tab0 AS cor0
----
221
2951
7580

onlyif mysql # use DIV operator for integer division
query I rowsort label-2537
SELECT DISTINCT col0 DIV 62 AS col1 FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-2537
SELECT DISTINCT col0 / 62 AS col1 FROM tab2 AS cor0
----
0
1

query I rowsort
SELECT DISTINCT col1 * + 88 + 53 AS col0 FROM tab1 AS cor0
----
1197
2341
933

query I rowsort
SELECT col2 + col1 * ( col1 * - col1 ) AS col2 FROM tab2 AS cor0
----
-205353
-29764
-4875

query I rowsort
SELECT col1 + cor0.col2 * - col2 - + col0 AS col2 FROM tab2 AS cor0
----
-1506
-695
-705

query I rowsort
SELECT - col1 * - 14 - col1 * + col1 FROM tab2 AS cor0
----
-2655
-51
-527

onlyif mysql # use DIV operator for integer division
query I rowsort label-2542
SELECT col2 DIV col2 + + ( - col1 + + ( col0 ) ) AS col2 FROM tab0 cor0
----
-1
-61
-61

skipif mysql # not compatible
query I rowsort label-2542
SELECT col2 / col2 + + ( - col1 + + ( col0 ) ) AS col2 FROM tab0 cor0
----
-1
-61
-61

onlyif mysql # use DIV operator for integer division
query I rowsort label-2543
SELECT col0 + - ( - col1 ) * col0 DIV - 37 FROM tab0 AS cor0
----
-129
-31
-56

skipif mysql # not compatible
query I rowsort label-2543
SELECT col0 + - ( - col1 ) * col0 / - 37 FROM tab0 AS cor0
----
-129
-31
-56

query I rowsort
SELECT ALL + col0 + 26 AS col0 FROM tab2 AS cor0
----
104
105
33

query I rowsort
SELECT tab2.col2 * - ( - col2 * + col1 ) FROM tab2
----
22599
24548
39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 80 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

query I rowsort
SELECT ALL + tab2.col2 * 90 + - tab2.col0 AS col0 FROM tab2
----
2262
2423
3341

query I rowsort
SELECT DISTINCT col0 + 85 AS col1 FROM tab0
----
109
120
174

query I rowsort
SELECT - col1 * ( + 41 ) AS col2 FROM tab1 AS cor0
----
-1066
-410
-533

query I rowsort
SELECT DISTINCT + col1 + 21 * + 9 FROM tab0 AS cor0
----
275
280
286

query I rowsort
SELECT - - col2 + 56 AS col2 FROM tab1 AS cor0
----
110
113
152

query I rowsort
SELECT DISTINCT col0 * - 19 - col2 AS col1 FROM tab1 AS cor0
----
-111
-1273
-1616

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab0 AS cor1, tab0, tab1 cor2
----
3645 values hashing to e5255b2277726ba4514ff55622dec830

query I rowsort
SELECT DISTINCT 31 + cor0.col0 AS col0 FROM tab0, tab0 AS cor0, tab1 cor1
----
120
55
66

query I rowsort
SELECT - cor0.col2 * 57 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 8b57ec4b7abd816eb44bb5e567daae92

query I rowsort
SELECT + + col2 * + col1 * - 99 FROM tab2 AS cor0
----
-151866
-63954
-82863

query I rowsort
SELECT DISTINCT cor0.col0 * - col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2558
SELECT DISTINCT - ( col1 ) + - col0 + + ( col2 ) DIV + col2 FROM tab1 AS cor0
----
-28
-73
-92

skipif mysql # not compatible
query I rowsort label-2558
SELECT DISTINCT - ( col1 ) + - col0 + + ( col2 ) / + col2 FROM tab1 AS cor0
----
-28
-73
-92

query I rowsort
SELECT ALL - ( col2 ) + cor0.col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + - col1 + 32 FROM tab2 AS cor0
----
-27
1
15

query I rowsort
SELECT - 25 AS col2 FROM tab1 cor0
----
-25
-25
-25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2562
SELECT DISTINCT + CAST( 64 AS SIGNED ) FROM tab2 AS cor0
----
64

skipif mysql # not compatible
query I rowsort label-2562
SELECT DISTINCT + CAST ( 64 AS INTEGER ) FROM tab2 AS cor0
----
64

query I rowsort
SELECT DISTINCT col2 * 58 FROM tab1 AS cor0
----
3132
3306
5568

query I rowsort
SELECT DISTINCT - 46 + + 91 AS col1 FROM tab2 AS cor0
----
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + 11 * - col2 col1 FROM tab1 AS cor0
----
-1069
-620
-637

query I rowsort
SELECT DISTINCT - col1 * + col0 + - col2 * - col0 AS col1 FROM tab1 AS cor0
----
3008
6640
84

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( 94 AS REAL ) + - col2 * - col2 * + 87 FROM tab2 AS cor0
----
125722
58906
63517

onlyif mysql # use DIV operator for integer division
query I rowsort label-2568
SELECT ALL + col2 DIV ( col1 ) - - col0 FROM tab1
----
5
69
87

skipif mysql # not compatible
query I rowsort label-2568
SELECT ALL + col2 / ( col1 ) - - col0 FROM tab1
----
5
69
87

query I rowsort
SELECT + col1 * - col2 + col0 * col0 AS col2 FROM tab1 cor0
----
-1395
3526
5152

query I rowsort
SELECT + cor0.col0 * + 4 AS col0 FROM tab1 AS cor0
----
12
256
320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2571
SELECT - CAST( NULL AS DECIMAL ) + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2571
SELECT - CAST ( NULL AS REAL ) + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 61 col1 FROM tab1 AS cor0
----
-61
-61
-61

query I rowsort
SELECT ALL + col1 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort
SELECT ALL - 39 * col2 + - CAST ( col2 AS REAL ) * col2 - - 23 / cor0.col0 AS col1 FROM tab0 AS cor0
----
-2376
-40
-9922

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2575
SELECT + col1 * col2 + - CAST( col0 AS SIGNED ) * + col2 col1 FROM tab0 AS cor0
----
164
2046
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2575
SELECT + col1 * col2 + - CAST ( col0 AS INTEGER ) * + col2 col1 FROM tab0 AS cor0
----
164
2046
62

query I rowsort
SELECT ALL + + cor0.col0 + + col1 + 11 AS col2 FROM tab2 AS cor0
----
107
148
49

query I rowsort
SELECT + - col2 * col1 + + cor0.col1 FROM tab2 cor0
----
-1475
-629
-806

query I rowsort
SELECT ALL - cor0.col2 + - cor0.col2 FROM tab0 cor0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT - 74 + col2 * + ( + 31 ) AS col1 FROM tab1 AS cor0
----
1600
1693
2902

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2581
SELECT DISTINCT + col2 DIV - col0 + + col0 AS col2 FROM tab1 AS cor0
----
-15
64
79

skipif mysql # not compatible
query I rowsort label-2581
SELECT DISTINCT + col2 / - col0 + + col0 AS col2 FROM tab1 AS cor0
----
-15
64
79

query I rowsort
SELECT - ( 11 ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 05cc989122d7724c7abefaba9625ef3d

query I rowsort
SELECT ALL - col1 + - 67 * + col2 AS col1 FROM tab1 AS cor0
----
-3644
-3829
-6445

query I rowsort
SELECT - col2 + - col0 * - ( + 41 ) AS col2 FROM tab1
----
2567
3184
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col1 + - tab0.col2 ) col1 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT 18 AS col1 FROM tab1, tab1 AS cor0
----
18

query I rowsort
SELECT + 53 * col1 AS col1 FROM tab1 AS cor0
----
1378
530
689

query I rowsort
SELECT DISTINCT - 98 * + 88 * col0 AS col2 FROM tab2
----
-60368
-672672
-681296

onlyif mysql # use DIV operator for integer division
query I rowsort label-2589
SELECT DISTINCT ( - col0 ) DIV col0 AS col1 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-2589
SELECT DISTINCT ( - col0 ) / col0 AS col1 FROM tab0
----
-1

query I rowsort
SELECT ALL + + tab2.col1 AS col2 FROM tab2, tab0, tab1 cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ( - tab2.col2 ) AS col2 FROM tab2
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-2592
SELECT + col1 * col2 DIV col0 col0 FROM tab0
----
118
2
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2592
SELECT + col1 * col2 / col0 col0 FROM tab0
----
118
2
83

query I rowsort
SELECT - col0 * - cor0.col2 + + col0 * - col1 AS col1 FROM tab1 AS cor0
----
3008
6640
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-2594
SELECT col0 + col2 - col2 DIV - col0 FROM tab2 cor0
----
104
117
37

skipif mysql # not compatible
query I rowsort label-2594
SELECT col0 + col2 - col2 / - col0 FROM tab2 cor0
----
104
117
37

query I rowsort
SELECT - col0 * col2 + + 49 AS col1 FROM tab0 AS cor0
----
-7249
-743
14

query I rowsort
SELECT ALL ( cor0.col2 ) + col1 + - col2 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + + col0 * - cor0.col1 + - ( cor0.col0 + + col2 * ( cor0.col2 ) ) AS col2 FROM tab1 AS cor0
----
-10336
-2997
-3953

onlyif mysql # use DIV operator for integer division
query I rowsort label-2598
SELECT col2 + col2 DIV col0 FROM tab0 AS cor0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-2598
SELECT col2 + col2 / col0 FROM tab0 AS cor0
----
1
34
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 50 col1 FROM tab0, tab0 AS cor0
----
50

query I rowsort
SELECT ALL + - cor0.col0 * - ( col1 ) * + col2 AS col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT + col0 * + cor0.col1 + col1 AS col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT col1 + + ( 27 ) FROM tab2 AS cor0
----
44
58
86

query I rowsort
SELECT ALL - col0 * + col0 * col1 AS col1 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT col0 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL col0 * - 28 + col0 FROM tab2 AS cor0
----
-189
-2106
-2133

query I rowsort
SELECT DISTINCT + - cor0.col0 AS col1 FROM tab2, tab2 AS cor0, tab0, tab1 cor1
----
-7
-78
-79

query I rowsort
SELECT DISTINCT 84 * col2 + col0 FROM tab0 AS cor0
----
119
2796
6977

query I rowsort
SELECT + + col1 * + 88 FROM tab1 cor0
----
1144
2288
880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col0 * + col2 * - col0 col2 FROM tab1
----
-233472
-486
-614400

query I rowsort
SELECT ALL 35 * 57 + + col1 AS col2 FROM tab1 AS cor0
----
2005
2008
2021

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 98 col2 FROM tab0, tab2 AS cor0
----
98

query I rowsort
SELECT DISTINCT + cor0.col1 + + 89 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
106
120
148

query I rowsort
SELECT tab0.col1 * - ( col2 * 43 ) + - col0 AS col2 FROM tab0
----
-122058
-320955
-4206

query I rowsort
SELECT DISTINCT + 9 AS col1 FROM tab0
----
9

query I rowsort
SELECT - ( cor0.col2 ) + + col2 * 51 FROM tab0 AS cor0
----
1650
4100
50

query I rowsort
SELECT 78 * ( col1 ) FROM tab0 AS cor0
----
6708
7098
7566

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2617
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2617
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 34 col2 FROM tab2
----
34
34
34

query I rowsort
SELECT ALL - + 83 * col2 FROM tab0 AS cor0
----
-2739
-6806
-83

query I rowsort
SELECT DISTINCT - col1 - cor0.col1 AS col2 FROM tab0 cor0
----
-172
-182
-194

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 * - ( col1 + col1 * + col2 ) FROM tab1 AS cor0
----
-16380
-37154
-5790

query I rowsort
SELECT DISTINCT + col0 * - 97 + - 52 FROM tab0
----
-2380
-3447
-8685

query I rowsort
SELECT - - col2 * - col2 + + 97 AS col0 FROM tab0 AS cor0
----
-6627
-992
96

query I rowsort
SELECT ALL col1 * - 8 AS col2 FROM tab1
----
-104
-208
-80

query I rowsort
SELECT + cor1.col0 AS col1 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT - ( col0 ) * col1 AS col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col2 * - cor0.col2 * col1 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT + col0 * - 60 + col1 FROM tab1 AS cor0
----
-154
-3830
-4787

query I rowsort
SELECT DISTINCT - col2 + 62 FROM tab2
----
24
35
36

query I rowsort
SELECT ALL - tab2.col0 + - col0 FROM tab2
----
-14
-156
-158

query I rowsort
SELECT ALL + cor0.col2 + 31 FROM tab2 cor0
----
57
58
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-2632
SELECT ALL - col1 + col2 DIV + cor0.col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-2632
SELECT ALL - col1 + col2 / + cor0.col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + + col1 * col0 - col2 * - col0 FROM tab1 AS cor0
----
240
4288
8720

query I rowsort
SELECT ALL col0 * - col2 - col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT col0 * cor0.col2 * 46 FROM tab2 AS cor0
----
138092
8694
93288

query I rowsort
SELECT + col0 - 31 AS col2 FROM tab0 AS cor0
----
-7
4
58

query I rowsort
SELECT + - cor0.col0 - + col0 AS col1 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT DISTINCT + + 26 * col1 + col0 + - ( - 20 ) FROM tab2 AS cor0
----
1632
541
833

query I rowsort
SELECT DISTINCT + 15 * + col1 AS col1 FROM tab2 cor0
----
255
465
885

query I rowsort
SELECT 71 * 65 + + col1 AS col0 FROM tab0 AS cor0
----
4701
4706
4712

query I rowsort
SELECT ALL - + col2 + - 19 * col0 FROM tab2 AS cor0
----
-1508
-1539
-160

query I rowsort
SELECT DISTINCT + + cor0.col0 FROM tab1, tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT col1 * - 98 + + col0 AS col1 FROM tab0 AS cor0
----
-8404
-8829
-9471

query I rowsort
SELECT - col2 + ( + tab0.col1 ) + + col2 AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT + col2 + - col1 - 71 * col2 FROM tab0
----
-167
-2396
-5831

onlyif mysql # use DIV operator for integer division
query I rowsort label-2646
SELECT DISTINCT col1 + col2 DIV 32 FROM tab1 AS cor0
----
11
16
27

skipif mysql # not compatible
query I rowsort label-2646
SELECT DISTINCT col1 + col2 / 32 FROM tab1 AS cor0
----
11
16
27

query I rowsort
SELECT + + col0 * col2 + col2 * col1 FROM tab2 AS cor0
----
1026
3562
3648

query I rowsort
SELECT DISTINCT 49 * col0 * + ( - 11 + + cor0.col0 ) FROM tab2 cor0
----
-1372
256074
263228

query I rowsort
SELECT ALL + - 14 + - col1 AS col2 FROM tab1 AS cor0
----
-24
-27
-40

query I rowsort
SELECT DISTINCT col1 * col2 + col2 + tab1.col0 * col1 / col1 AS col1 FROM tab1 WHERE NULL <= col1
----

query I rowsort
SELECT ALL - col0 AS col2 FROM tab0 WHERE col1 NOT IN ( + tab0.col2 * - col0 )
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2652
SELECT DISTINCT - col1 + col0 DIV col1 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-2652
SELECT DISTINCT - col1 + col0 / col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT - - col1 * - col1 * col2 AS col1 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT DISTINCT - ( + col2 ) + cor0.col1 * 63 + + col2 FROM tab0 AS cor0
----
5418
5733
6111

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col2 - col0 * - 22 col1 FROM tab0
----
1617
771
8682

query I rowsort
SELECT ALL 40 * 51 * + cor0.col2 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to dfe65dc092bf2b1b2c93dc411b60e49f

query I rowsort
SELECT DISTINCT + + 19 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
19

query I rowsort
SELECT + ( - 95 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

query I rowsort
SELECT ALL + 1 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2660
SELECT ALL ( cor0.col0 ) / + CAST( NULL AS SIGNED ) FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2660
SELECT ALL ( cor0.col0 ) / + CAST ( NULL AS INTEGER ) FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL + cor0.col0 * 85 - - col2 FROM tab0 cor0
----
2073
2976
7647

query I rowsort
SELECT cor0.col0 * 53 FROM tab2 AS cor0
----
371
4134
4187

query I rowsort
SELECT ALL + col0 * ( + 62 ) AS col2 FROM tab2 AS cor0
----
434
4836
4898

query I rowsort
SELECT DISTINCT - - col1 * + ( - 63 ) FROM tab0 AS cor0
----
-5418
-5733
-6111

onlyif mysql # use DIV operator for integer division
query I rowsort label-2665
SELECT - tab1.col1 DIV 85 AS col1 FROM tab2, tab0, tab0 AS cor0, tab1
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

skipif mysql # not compatible
query I rowsort label-2665
SELECT - tab1.col1 / 85 AS col1 FROM tab2, tab0, tab0 AS cor0, tab1
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

query I rowsort
SELECT - col1 * - 63 AS col0 FROM tab1 AS cor0
----
1638
630
819

query I rowsort
SELECT DISTINCT cor0.col2 + col1 * - col2 * + cor0.col1 FROM tab0 AS cor0
----
-244035
-678960
-9408

query I rowsort
SELECT - ( + col0 ) * col2 AS col0 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - tab2.col1 col0 FROM tab2
----
-24
19
62

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( + 65 * col1 AS REAL ) + + CAST ( col2 AS INTEGER ) * - col0 + - 34 * + 31 FROM tab1
----
-4052
-7889
474

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + - ( - col1 ) col2 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL col2 * - 51 FROM tab0 AS cor0
----
-1683
-4182
-51

query I rowsort
SELECT - ( - col1 ) + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ( + col1 ) * - col1 * - col2 AS col2 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT col1 * tab1.col2 + col2 FROM tab1
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-2677
SELECT - ( 68 * tab2.col0 ) + + 50 DIV - col1 AS col2 FROM tab2
----
-477
-5304
-5374

skipif mysql # not compatible
query I rowsort label-2677
SELECT - ( 68 * tab2.col0 ) + + 50 / - col1 AS col2 FROM tab2
----
-477
-5304
-5374

onlyif mysql # use DIV operator for integer division
query I rowsort label-2678
SELECT ALL 27 + + col2 DIV 78 AS col0 FROM tab0 AS cor0
----
27
27
28

skipif mysql # not compatible
query I rowsort label-2678
SELECT ALL 27 + + col2 / 78 AS col0 FROM tab0 AS cor0
----
27
27
28

query I rowsort
SELECT ALL - 46 * + col0 AS col2 FROM tab1 AS cor0
----
-138
-2944
-3680

query I rowsort
SELECT DISTINCT - 46 + - col0 AS col1 FROM tab1 AS cor0
----
-110
-126
-49

query I rowsort
SELECT ALL - 85 * + col2 + - col1 AS col2 FROM tab0 AS cor0
----
-182
-2891
-7061

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 20 + cor0.col2 col0 FROM tab0 AS cor0
----
-19
13
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * + tab2.col0 + 50 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 53c148a04ea17d4e7b9b3ff5eeb304d6

query I rowsort
SELECT ALL - col0 * col0 * - 7 + + col0 * - cor0.col0 FROM tab1 cor0
----
24576
38400
54

query I rowsort
SELECT ALL - - 69 + + col1 * ( col1 + - col1 ) AS col2 FROM tab0 AS cor0
----
69
69
69

query I rowsort
SELECT DISTINCT + ( col0 ) * - 96 AS col2 FROM tab0 AS cor0
----
-2304
-3360
-8544

query I rowsort
SELECT DISTINCT ( col0 ) * 14 AS col0 FROM tab2 cor0
----
1092
1106
98

query I rowsort
SELECT - col1 * + col1 + 46 * col2 AS col0 FROM tab0 AS cor0
----
-4509
-5878
-9363

query I rowsort
SELECT ALL + col2 * col1 + - col0 * col2 AS col2 FROM tab1 AS cor0
----
-3078
-6432
1242

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col1 col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - col2 * col2 * col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT + - ( col1 ) + - col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT + col0 + 37 + + col0 AS col0 FROM tab0
----
107
215
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-2694
SELECT + col0 DIV 27 AS col0 FROM tab1
----
0
2
2

skipif mysql # not compatible
query I rowsort label-2694
SELECT + col0 / 27 AS col0 FROM tab1
----
0
2
2

query I rowsort
SELECT - 2 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to ec11209ab257030053484fc13a1f6d17

query I rowsort
SELECT ALL - 63 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2697
SELECT col2 DIV ( col1 + tab1.col2 ) FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2697
SELECT col2 / ( col1 + tab1.col2 ) FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2698
SELECT DISTINCT 9 DIV col1 + col0 + - col1 * - col2 AS col1 FROM tab0
----
132
2862
7551

skipif mysql # not compatible
query I rowsort label-2698
SELECT DISTINCT 9 / col1 + col0 + - col1 * - col2 AS col1 FROM tab0
----
132
2862
7551

query I rowsort
SELECT 90 * - ( - col0 ) + col0 * col0 FROM tab1
----
13600
279
9856

query I rowsort
SELECT DISTINCT tab2.col2 + - col0 AS col1 FROM tab2
----
-41
-52
20

query I rowsort
SELECT col0 * - col0 + + col2 AS col1 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT + + 64 + col0 * - cor0.col0 FROM tab1 cor0
----
-4032
-6336
55

query I rowsort
SELECT DISTINCT - - col1 * + col2 - col0 AS col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT ALL + col1 + col0 * - col2 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT - ( - col0 ) + + col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - 96 AS col1 FROM tab1
----
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col1 col0 FROM tab2
----
0

query I rowsort
SELECT + tab1.col2 + tab1.col1 * + tab1.col2 FROM tab1
----
1344
1458
627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col2 * - col0 col1 FROM tab2
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col0 FROM tab2 WHERE - col2 * col1 NOT IN ( col1 + col0 * col1 )
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-2711
SELECT ALL - col2 + + tab2.col1 DIV + col1 FROM tab2
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-2711
SELECT ALL - col2 + + tab2.col1 / + col1 FROM tab2
----
-25
-26
-37

onlyif mysql # use DIV operator for integer division
query I rowsort label-2712
SELECT DISTINCT tab0.col2 * + col1 + col1 DIV col1 - col1 AS col1 FROM tab0
----
1
2753
7372

skipif mysql # not compatible
query I rowsort label-2712
SELECT DISTINCT tab0.col2 * + col1 + col1 / col1 - col1 AS col1 FROM tab0
----
1
2753
7372

onlyif mysql # use DIV operator for integer division
query I rowsort label-2713
SELECT + tab2.col1 + + col1 DIV col0 AS col1 FROM tab2
----
17
35
59

skipif mysql # not compatible
query I rowsort label-2713
SELECT + tab2.col1 + + col1 / col0 AS col1 FROM tab2
----
17
35
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col2 * col1 col0 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT col0 + col1 + tab2.col2 AS col2 FROM tab2
----
134
163
65

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) BETWEEN ( NULL ) AND col2
----

query III rowsort
SELECT * FROM tab2 WHERE NOT - col1 * col1 + - tab2.col1 = NULL
----

query I rowsort
SELECT DISTINCT + col0 FROM tab2 WHERE NULL IN ( col1 / col2 )
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL NOT BETWEEN NULL AND col1 + - col1 + - col0 * - col0
----

query I rowsort
SELECT + col0 * col0 * col2 - col0 FROM tab0
----
1190
18984
649433

query I rowsort
SELECT DISTINCT + col0 + - tab2.col1 * col1 - - tab2.col1 FROM tab2
----
-193
-3344
-923

onlyif mysql # use DIV operator for integer division
query I rowsort label-2722
SELECT ALL - col0 + + col2 DIV col0 + - col1 FROM tab1
----
-11
-74
-92

skipif mysql # not compatible
query I rowsort label-2722
SELECT ALL - col0 + + col2 / col0 + - col1 FROM tab1
----
-11
-74
-92

query III rowsort
SELECT * FROM tab0 WHERE NULL IN ( tab0.col0 / col0 )
----

query I rowsort
SELECT col1 * + col1 + tab2.col1 * col1 FROM tab2
----
1922
578
6962

query III rowsort
SELECT * FROM tab2 WHERE NOT - col2 + - col2 = NULL
----

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab0 WHERE col2 + - col2 = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2727
SELECT DISTINCT col2 + + col0 DIV col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2727
SELECT DISTINCT col2 + + col0 / col1 FROM tab0
----
1
33
82

query I rowsort
SELECT - col0 * col1 * col2 + col0 * col0 + col0 AS col0 FROM tab0 WHERE NOT NULL <> ( col2 )
----

query I rowsort
SELECT ALL col2 * - col2 * + col1 AS col2 FROM tab1
----
-119808
-32490
-75816

query III rowsort
SELECT * FROM tab0 WHERE + col0 * - tab0.col2 + col0 NOT IN ( col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( NULL ) <= - col0
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL BETWEEN NULL AND + col0
----

query I rowsort
SELECT tab0.col2 + tab0.col1 + tab0.col1 FROM tab0
----
195
205
264

query I rowsort
SELECT tab2.col1 * - tab2.col0 * - col0 + col0 * col0 FROM tab2
----
112338
1568
365040

query I rowsort
SELECT ALL col0 + col2 * - col1 AS col1 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT cor0.col0 * tab1.col0 AS col0 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to e129c9542667cbb8c5055c93f97048ef

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 - - col2 col1 FROM tab0
----
0

query I rowsort
SELECT - col0 + col1 + tab0.col2 AS col0 FROM tab0
----
63
84
95

query I rowsort
SELECT col1 + + tab0.col0 AS col1 FROM tab0 WHERE NOT col0 * - col1 NOT BETWEEN ( + col0 ) AND NULL
----

query I rowsort
SELECT col0 + - cor0.col0 + col2 * col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col1 FROM tab2 cor0 WHERE NOT NULL BETWEEN col2 AND col1 + + col2
----

query I rowsort
SELECT ALL + col1 * col0 + col2 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE ( col1 ) NOT BETWEEN NULL AND col1 * col0
----

query I rowsort
SELECT DISTINCT col2 + - col2 * + col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-2745
SELECT col1 + + 26 DIV col1 AS col2 FROM tab1 AS cor0
----
12
15
27

skipif mysql # not compatible
query I rowsort label-2745
SELECT col1 + + 26 / col1 AS col2 FROM tab1 AS cor0
----
12
15
27

query I rowsort
SELECT DISTINCT - col0 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2747
SELECT DISTINCT + - col0 DIV - ( - col1 ) FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-2747
SELECT DISTINCT + - col0 / - ( - col1 ) FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT ALL + - 15 + - col2 AS col1 FROM tab2 AS cor0
----
-41
-42
-53

query I rowsort
SELECT ALL + ( - 97 ) AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to e4a6bd848a69226cbb7ad3d154be321b

query I rowsort
SELECT ALL + col0 * + 3 + - col0 AS col1 FROM tab0
----
178
48
70

query I rowsort
SELECT col0 + + col1 * + 3 FROM tab2 AS cor0
----
100
130
255

query I rowsort
SELECT + col1 + 63 AS col0 FROM tab1 cor0
----
73
76
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * col0 + - ( - col1 ) * - col1 col1 FROM tab2 AS cor0
----
-744
1054
1121

query I rowsort
SELECT DISTINCT + + col1 * col0 + 54 * + col0 * col0 FROM tab1 AS cor0
----
221824
346640
564

query I rowsort
SELECT - + col1 + + 38 FROM tab0 AS cor0
----
-48
-53
-59

query I rowsort
SELECT ALL + + col2 + - cor0.col0 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - - col1 * + 18 - col1 AS col1 FROM tab2 AS cor0
----
1003
289
527

query I rowsort
SELECT - - 35 AS col0 FROM tab0 AS cor0
----
35
35
35

query I rowsort
SELECT ALL - 14 + + col2 * - col1 AS col0 FROM tab2 cor0
----
-1548
-660
-851

query I rowsort
SELECT - ( ( - cor0.col0 ) ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + + ( col2 ) * - col1 * + col1 - - col2 FROM tab2 AS cor0
----
-10944
-25920
-90480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col0 + cor0.col1 col2 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT - 99 * - col0 AS col1 FROM tab2 AS cor0
----
693
7722
7821

query I rowsort
SELECT ALL - ( + col1 ) + - cor0.col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL col1 * - 90 + + col2 FROM tab2 cor0
----
-1492
-2763
-5284

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2766
SELECT DISTINCT - CAST( col2 AS SIGNED ) col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2766
SELECT DISTINCT - CAST ( col2 AS INTEGER ) col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT col1 * - col0 + - 42 AS col1 FROM tab1
----
-1082
-120
-682

query I rowsort
SELECT ALL + cor0.col2 * 4 AS col1 FROM tab1 AS cor0
----
216
228
384

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - 18 + - col2 AS col2 FROM tab0 AS cor0
----
-100
-19
-51

query I rowsort
SELECT DISTINCT - 67 * cor0.col1 + - col1 AS col0 FROM tab0 AS cor0
----
-5848
-6188
-6596

query I rowsort
SELECT + 26 * col2 AS col2 FROM tab2 AS cor0
----
676
702
988

query I rowsort
SELECT DISTINCT + + ( - col1 ) + + col0 * + 91 AS col0 FROM tab1 AS cor0
----
247
5814
7267

query I rowsort
SELECT ALL - col1 * col0 + cor0.col2 AS col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT - 77 * cor0.col2 FROM tab1 AS cor0
----
-4158
-4389
-7392

onlyif mysql # use DIV operator for integer division
query I rowsort label-2776
SELECT DISTINCT cor0.col1 DIV 13 AS col0 FROM tab0 AS cor0
----
6
7

skipif mysql # not compatible
query I rowsort label-2776
SELECT DISTINCT cor0.col1 / 13 AS col0 FROM tab0 AS cor0
----
6
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 4 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

onlyif mysql # use DIV operator for integer division
query I rowsort label-2778
SELECT ( - col2 ) * col0 + col2 DIV col0 FROM tab1 AS cor0
----
-144
-3648
-7679

skipif mysql # not compatible
query I rowsort label-2778
SELECT ( - col2 ) * col0 + col2 / col0 FROM tab1 AS cor0
----
-144
-3648
-7679

query I rowsort
SELECT ALL + ( - 51 ) FROM tab2
----
-51
-51
-51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2780
SELECT ALL CAST( - 60 AS SIGNED ) * col2 * + col2 AS col1 FROM tab0
----
-403440
-60
-65340

skipif mysql # not compatible
query I rowsort label-2780
SELECT ALL CAST ( - 60 AS INTEGER ) * col2 * + col2 AS col1 FROM tab0
----
-403440
-60
-65340

query I rowsort
SELECT ALL + col1 * - tab1.col0 * col0 AS col1 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT ALL 11 * + col0 - 8 FROM tab1
----
25
696
872

query I rowsort
SELECT ALL + col1 + 8 * + 23 AS col1 FROM tab1 AS cor0
----
194
197
210

query I rowsort
SELECT - col2 * - 67 * 33 + col2 AS col2 FROM tab1 AS cor0
----
119448
126084
212352

query I rowsort
SELECT + cor0.col2 + + cor0.col0 * + 3 FROM tab0 cor0
----
105
106
349

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col1 col2 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2787
SELECT + col1 DIV ( col0 + col1 * - 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-2787
SELECT + col1 / ( col0 + col1 * - col1 ) col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 + + col2 + col2 * + col2 FROM tab0
----
1146
37
6895

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 cor2, tab1 AS cor3
----
3645 values hashing to 25b043ae64f25e8f205735b09d2d3d6a

query I rowsort
SELECT DISTINCT - tab2.col0 * col2 + ( - col0 ) FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT DISTINCT - col0 * - 1 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL col1 * - 54 AS col2 FROM tab0 AS cor0
----
-4644
-4914
-5238

query I rowsort
SELECT - + cor0.col1 - col1 FROM tab1 cor0
----
-20
-26
-52

query I rowsort
SELECT + col2 + - 6 AS col1 FROM tab2 cor0
----
20
21
32

query I rowsort
SELECT + - col1 * col1 + col1 AS col2 FROM tab1 cor0
----
-156
-650
-90

query I rowsort
SELECT DISTINCT - col1 + - cor0.col2 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT col0 * col2 + col0 * + col2 AS col2 FROM tab0 AS cor0
----
14596
1584
70

query I rowsort
SELECT + col1 + 44 AS col2 FROM tab1 AS cor0
----
54
57
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2799
SELECT ALL + + col2 + + col1 DIV cor0.col0 col2 FROM tab0 AS cor0
----
3
36
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2799
SELECT ALL + + col2 + + col1 / cor0.col0 col2 FROM tab0 AS cor0
----
3
36
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 69 col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
69

query I rowsort
SELECT ALL - ( col1 * 10 ) FROM tab2
----
-170
-310
-590

query I rowsort
SELECT - ( col1 ) * cor0.col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - - col2 + - cor0.col0 * - cor0.col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - + 17 * col1 + + 16 * + ( + cor0.col0 ) FROM tab2 AS cor0
----
-415
245
975

query I rowsort
SELECT + + col2 + cor0.col2 AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + + cor0.col0 + - col2 * - cor0.col2 FROM tab0 cor0
----
1113
36
6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-2807
SELECT + col1 DIV - col0 AS col0 FROM tab2 cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-2807
SELECT + col1 / - col0 AS col0 FROM tab2 cor0
----
-4
0
0

query I rowsort
SELECT col2 + 82 AS col2 FROM tab2 AS cor0
----
108
109
120

query I rowsort
SELECT - col2 * + ( - col1 ) AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - - col2 * col0 + col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT + 58 - + col1 AS col0 FROM tab2 AS cor0
----
-1
27
41

query I rowsort
SELECT - 41 * - 80 + cor0.col0 - - col0 AS col0 FROM tab1 AS cor0
----
3286
3408
3440

query I rowsort
SELECT col2 * col1 + - cor0.col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ALL + col1 * - col2 + cor0.col0 - - col0 * cor0.col0 FROM tab1 AS cor0
----
-1392
3590
5232

query I rowsort
SELECT ALL + 83 + - col2 AS col1 FROM tab2 cor0
----
45
56
57

query I rowsort
SELECT + 88 - col1 FROM tab0 AS cor0
----
-3
-9
2

query I rowsort
SELECT + col2 - 87 AS col0 FROM tab1 AS cor0
----
-30
-33
9

query I rowsort
SELECT DISTINCT - + col1 * col2 - + col1 * ( col1 ) FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT ( 30 ) + - col2 FROM tab1 AS cor0
----
-24
-27
-66

query I rowsort
SELECT + col2 * - col1 + col2 + + col0 AS col1 FROM tab2 AS cor0
----
-1430
-529
-803

query I rowsort
SELECT 24 + col2 * 69 - ( + col0 ) FROM tab1 AS cor0
----
3747
3893
6568

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + col0 * 25 col1 FROM tab1 AS cor0
----
1664
2080
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2823
SELECT 27 + - col2 - + CAST( NULL AS DECIMAL ) * 47 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2823
SELECT 27 + - col2 - + CAST ( NULL AS REAL ) * 47 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 25 + - col1 col1 FROM tab2 AS cor0
----
-42
-56
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2825
SELECT + col1 + - cor0.col0 - - CAST( - col1 AS SIGNED ) AS col0 FROM tab1 cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-2825
SELECT + col1 + - cor0.col0 - - CAST ( - col1 AS INTEGER ) AS col0 FROM tab1 cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2826
SELECT DISTINCT - col2 DIV cor0.col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-2826
SELECT DISTINCT - col2 / cor0.col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT ALL 47 AS col0 FROM tab1
----
47
47
47

query I rowsort
SELECT DISTINCT + col0 * - 67 * - tab2.col1 FROM tab2
----
14539
308334
89981

query I rowsort
SELECT - col1 * col0 + + 56 * + ( col1 ) + col0 AS col0 FROM tab1 AS cor0
----
-16
-232
1381

query I rowsort
SELECT DISTINCT + 23 AS col2 FROM tab0, tab2 cor0
----
23

query I rowsort
SELECT DISTINCT - tab0.col1 + col1 * col1 FROM tab0
----
7310
8190
9312

query I rowsort
SELECT ALL col2 + - ( + col0 ) * - col0 * col0 - + col0 * + col0 AS col2 FROM tab2 AS cor0
----
321
468494
486836

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - cor0.col1 * - col0 col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT - 58 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to de0811e670e75d2aeeb657e32bddb0c0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2835
SELECT CAST( 48 AS SIGNED ) * col0 * cor0.col1 AS col2 FROM tab0 AS cor0
----
162960
388752
99072

skipif mysql # not compatible
query I rowsort label-2835
SELECT CAST ( 48 AS INTEGER ) * col0 * cor0.col1 AS col2 FROM tab0 AS cor0
----
162960
388752
99072

query I rowsort
SELECT + 33 * + col0 FROM tab2 AS cor0
----
231
2574
2607

query I rowsort
SELECT ALL - cor0.col1 + 13 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 70380385c1d6ec17502bb75dd12eb259

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 * col0 col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT - 1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2840
SELECT ALL 77 DIV col0 AS col1 FROM tab1
----
0
1
25

skipif mysql # not compatible
query I rowsort label-2840
SELECT ALL 77 / col0 AS col1 FROM tab1
----
0
1
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-2841
SELECT col2 + + ( col2 ) DIV cor0.col2 AS col2 FROM tab0 cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-2841
SELECT col2 + + ( col2 ) / cor0.col2 AS col2 FROM tab0 cor0
----
2
34
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2842
SELECT CAST( ( col1 ) AS SIGNED ) col1 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2842
SELECT CAST ( ( col1 ) AS INTEGER ) col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT 0 FROM tab1, tab0, tab0 AS cor0
----
0

query I rowsort
SELECT - col0 * - 74 FROM tab2 AS cor0
----
518
5772
5846

query I rowsort
SELECT DISTINCT + - col2 + + 94 * col0 FROM tab2 AS cor0
----
631
7306
7388

query I rowsort
SELECT - col2 + ( 14 ) * - col0 * - col2 FROM tab1 AS cor0
----
107424
2214
51015

query I rowsort
SELECT DISTINCT col0 + - 78 FROM tab2 AS cor0
----
-71
0
1

query I rowsort
SELECT DISTINCT - - cor0.col2 * - 70 FROM tab0 AS cor0
----
-2310
-5740
-70

query I rowsort
SELECT ALL - + col0 + 82 AS col1 FROM tab1 AS cor0
----
18
2
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2850
SELECT ALL col2 * - col0 DIV + col0 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-2850
SELECT ALL col2 * - col0 / + col0 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-2851
SELECT DISTINCT + tab1.col2 + + col2 DIV col1 AS col0 FROM tab1
----
103
56
62

skipif mysql # not compatible
query I rowsort label-2851
SELECT DISTINCT + tab1.col2 + + col2 / col1 AS col0 FROM tab1
----
103
56
62

query I rowsort
SELECT col0 * - col0 + ( 94 ) FROM tab2
----
-5990
-6147
45

query I rowsort
SELECT DISTINCT col0 * + col0 * + 70 + - col0 + tab0.col1 * + col1 FROM tab0
----
47692
562662
95124

query I rowsort
SELECT DISTINCT - 86 * col0 + col0 * col2 * + col2 FROM tab0
----
-2975
24072
590782

query I rowsort
SELECT ( tab1.col2 ) * ( col0 ) + col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT + col1 * + tab2.col0 + tab2.col2 AS col0 FROM tab2
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-2857
SELECT DISTINCT col2 + col0 DIV - col2 FROM tab0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-2857
SELECT DISTINCT col2 + col0 / - col2 FROM tab0
----
-34
33
81

query I rowsort
SELECT DISTINCT + cor0.col2 + + ( + 6 ) FROM tab0 cor0
----
39
7
88

query I rowsort
SELECT DISTINCT - col1 + - 17 - + 52 FROM tab0 AS cor0
----
-155
-160
-166

query I rowsort
SELECT col1 + - 87 * col2 * col1 FROM tab2
----
-133399
-56185
-72788

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2861
SELECT DISTINCT - col1 * - col2 + tab0.col0 - CAST( - col1 AS SIGNED ) FROM tab0
----
229
2948
7642

skipif mysql # not compatible
query I rowsort label-2861
SELECT DISTINCT - col1 * - col2 + tab0.col0 - CAST ( - col1 AS INTEGER ) FROM tab0
----
229
2948
7642

query I rowsort
SELECT - 75 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 258bc565c64924d905a55eaaa6e57547

query I rowsort
SELECT ALL ( ( col0 ) * + col2 ) + - 22 + - col2 * + 68 FROM tab1
----
-250
-3532
1130

query I rowsort
SELECT DISTINCT + + ( - 53 ) + col1 * col2 FROM tab0 AS cor0
----
2785
44
7409

query I rowsort
SELECT + + 81 * - cor0.col1 - col1 * col0 FROM tab1 AS cor0
----
-1450
-2093
-2184

query I rowsort
SELECT ( col1 ) * + ( - col0 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - + col0 + + cor0.col2 * - col0 AS col2 FROM tab2 cor0
----
-196
-2106
-3081

query I rowsort
SELECT ALL 87 AS col1 FROM tab2, tab0 AS cor0, tab2 cor1
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

query I rowsort
SELECT ALL - col2 + cor0.col2 * col0 AS col2 FROM tab2 AS cor0
----
162
2002
2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-2870
SELECT + 20 DIV col2 + + 22 * + col1 FROM tab1 AS cor0
----
220
286
572

skipif mysql # not compatible
query I rowsort label-2870
SELECT + 20 / col2 + + 22 * + col1 FROM tab1 AS cor0
----
220
286
572

query I rowsort
SELECT DISTINCT 64 + col1 * col0 * col2 FROM tab0 cor0
----
3459
664182
68176

query I rowsort
SELECT ALL 91 * col0 AS col2 FROM tab2 AS cor0
----
637
7098
7189

query I rowsort
SELECT ALL + col2 + - cor0.col1 * ( - cor0.col2 ) AS col0 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT cor0.col0 + + col2 * - 98 AS col1 FROM tab0 AS cor0
----
-3210
-63
-7947

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col1 + - cor0.col0 col1 FROM tab1 AS cor0
----
-164
-249
-679

query I rowsort
SELECT + 81 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

query I rowsort
SELECT + 14 + col2 AS col2 FROM tab1 AS cor0
----
110
68
71

query I rowsort
SELECT ALL + - col0 + - col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT + - ( + col0 ) * ( + col0 ) - + col2 AS col0 FROM tab1 cor0
----
-4153
-63
-6496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2880
SELECT DISTINCT - col1 * - col0 + - CAST( + col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
1978
3298
8008

skipif mysql # not compatible
query I rowsort label-2880
SELECT DISTINCT - col1 * - col0 + - CAST ( + col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT + - 60 FROM tab0 cor0
----
-60
-60
-60

query I rowsort
SELECT ALL col0 * - col1 + + col1 * col2 AS col1 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT DISTINCT col0 * + col1 - 41 * ( col2 * + col1 ) FROM tab2 AS cor0
----
-25143
-34100
-58292

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 + - col0 col1 FROM tab0 AS cor0
----
-178
-48
-70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2885
SELECT ALL - col0 + cor0.col2 * + CAST( + col2 * - col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-26160
-598525
-70

skipif mysql # not compatible
query I rowsort label-2885
SELECT ALL - col0 + cor0.col2 * + CAST ( + col2 * - col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-26160
-598525
-70

query I rowsort
SELECT col0 * col0 - ( - 74 + + col1 ) FROM tab0 AS cor0
----
1202
564
7904

query I rowsort
SELECT ALL - col2 + cor0.col2 * ( cor0.col1 ) + - col2 * + col2 FROM tab2 AS cor0
----
-836
81
832

query I rowsort
SELECT DISTINCT + 29 FROM tab1, tab0 AS cor0
----
29

query I rowsort
SELECT ALL col1 * 92 AS col0 FROM tab1 AS cor0
----
1196
2392
920

query I rowsort
SELECT + col1 + + 66 + - 51 AS col2 FROM tab1 AS cor0
----
25
28
41

query I rowsort
SELECT - - col0 * 67 + 41 + cor0.col1 * + 21 AS col0 FROM tab2 AS cor0
----
1161
5691
6506

query I rowsort
SELECT cor0.col2 * + ( + col0 ) + + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - - col0 + + 20 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-1691
-456
-665

query I rowsort
SELECT + col2 + - cor0.col2 * - 79 FROM tab1 AS cor0
----
4320
4560
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2895
SELECT ALL + CAST( col2 AS SIGNED ) - col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2895
SELECT ALL + CAST ( col2 AS INTEGER ) - col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 + + cor0.col2 * col0 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT ALL cor0.col0 - ( + col0 ) AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * 55 FROM tab2 AS cor0
----
1705
3245
935

query I rowsort
SELECT - 85 FROM tab0, tab2 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) + col1 * - col2 * + cor0.col2 FROM tab0 cor0
----
-611795
-62
-93630

query I rowsort
SELECT + + col2 * col0 + + cor0.col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - - 11 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

query I rowsort
SELECT + tab2.col1 + col1 + col0 FROM tab2
----
113
196
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - col2 col2 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT + - 33 - - col1 * 98 * 90 FROM tab1 AS cor0
----
114627
229287
88167

query I rowsort
SELECT + col0 + col2 * - 37 FROM tab0 AS cor0
----
-1197
-2
-2945

query I rowsort
SELECT tab2.col1 * col0 + tab2.col0 AS col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT + 63 * tab2.col0 * col1 AS col1 FROM tab2
----
13671
289926
84609

query I rowsort
SELECT - 90 + 12 * - col1 FROM tab2
----
-294
-462
-798

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2910
SELECT CAST( NULL AS SIGNED ) col1 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2910
SELECT CAST ( NULL AS INTEGER ) col1 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2911
SELECT - CAST( NULL AS DECIMAL ) * col2 + tab2.col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2911
SELECT - CAST ( NULL AS REAL ) * col2 + tab2.col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( col2 ) * col1 + col0 FROM tab0
----
132
2862
7551

query I rowsort
SELECT ALL + ( + col2 ) + tab1.col2 AS col0 FROM tab1
----
108
114
192

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2, tab1 cor0, tab2 AS cor1
----
54
57
96

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( 42 AS REAL ) FROM tab1 AS cor0
----
-42
-42
-42

query I rowsort
SELECT + 29 * col0 + col1 FROM tab2 AS cor0
----
2308
2321
234

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2917
SELECT ALL - - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2917
SELECT ALL - - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1, tab0 cor2
----
3645 values hashing to 1260d4dbe7a8d809e8010586a3c398c5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2919
SELECT DISTINCT - col2 DIV - tab2.col0 AS col2 FROM tab2
----
0
3

skipif mysql # not compatible
query I rowsort label-2919
SELECT DISTINCT - col2 / - tab2.col0 AS col2 FROM tab2
----
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-2920
SELECT ALL - col2 + + ( col1 ) + col2 DIV 67 FROM tab2
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-2920
SELECT ALL - col2 + + ( col1 ) + col2 / 67 FROM tab2
----
-21
33
4

query I rowsort
SELECT - 92 + 4 * + col0 AS col2 FROM tab1
----
-80
164
228

query I rowsort
SELECT DISTINCT + col1 + 75 * + col2 FROM tab1
----
4076
4285
7213

onlyif mysql # use DIV operator for integer division
query I rowsort label-2923
SELECT + col1 * + col1 + + col0 DIV + 11 FROM tab1 AS cor0
----
105
176
676

skipif mysql # not compatible
query I rowsort label-2923
SELECT + col1 * + col1 + + col0 / + 11 FROM tab1 AS cor0
----
105
176
676

query I rowsort
SELECT tab1.col1 + + col2 + - col1 * + col1 FROM tab1
----
-33
-596
-60

query I rowsort
SELECT + col1 * - 67 FROM tab2 AS cor0
----
-1139
-2077
-3953

query I rowsort
SELECT DISTINCT - tab0.col0 * + col1 * - col0 AS col0 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT - ( + col2 ) * + ( + 75 ) * + col0 AS col2 FROM tab2
----
-14175
-152100
-225150

query I rowsort
SELECT - 96 * + col0 AS col2 FROM tab2 AS cor0
----
-672
-7488
-7584

query I rowsort
SELECT - ( 1 ) FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

query I rowsort
SELECT ALL - col1 * cor0.col2 + - col1 AS col0 FROM tab1 cor0
----
-1261
-1430
-580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - 75 ) col0 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to c0722b1d77ac0ed13c0f2691a5751c59

query I rowsort
SELECT - + cor0.col0 * + col2 + col2 - col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + - col1 + ( + 3 ) * + col2 - 97 FROM tab0 AS cor0
----
-191
-84
58

query I rowsort
SELECT + col2 * col0 + ( col1 * col2 ) FROM tab2
----
1026
3562
3648

query I rowsort
SELECT DISTINCT 20 AS col2 FROM tab1, tab1 AS cor0
----
20

query I rowsort
SELECT DISTINCT col2 + 53 * cor0.col0 FROM tab2 cor0
----
398
4160
4225

query I rowsort
SELECT ALL + - ( col1 ) + col1 + cor0.col2 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2938
SELECT - CAST( 5 AS SIGNED ) + col1 FROM tab2 AS cor0
----
12
26
54

skipif mysql # not compatible
query I rowsort label-2938
SELECT - CAST ( 5 AS INTEGER ) + col1 FROM tab2 AS cor0
----
12
26
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * cor0.col2 + + col1 col1 FROM tab2 cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT - + 38 FROM tab1 cor0
----
-38

query I rowsort
SELECT + ( + col2 ) - - col0 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2942
SELECT DISTINCT - CAST( NULL AS SIGNED ) + - col2 / - col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2942
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + - col2 / - col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + - cor0.col1 AS col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT + 72 + col0 * col1 FROM tab0 cor0
----
2136
3467
8171

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2945
SELECT CAST( NULL AS SIGNED ) + - cor0.col1 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2945
SELECT CAST ( NULL AS INTEGER ) + - cor0.col1 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + 4 col0 FROM tab0 AS cor0
----
101
90
95

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-2948
SELECT + 3 DIV + col0 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2948
SELECT + 3 / + col0 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2949
SELECT ALL - - col0 + + 90 DIV - cor0.col0 col2 FROM tab2 AS cor0
----
-5
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2949
SELECT ALL - - col0 + + 90 / - cor0.col0 col2 FROM tab2 AS cor0
----
-5
77
78

query I rowsort
SELECT ALL 22 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT DISTINCT + - cor0.col1 + cor0.col0 - - col1 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 94 col1 FROM tab2 AS cor0
----
94
94
94

query I rowsort
SELECT - - 9 + + col0 AS col2 FROM tab2 AS cor0
----
16
87
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 56 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 3d3dab400eef93c098acbbba3fc9bdc6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 21 col2 FROM tab1, tab0 cor0
----
21

query I rowsort
SELECT ( - tab2.col0 ) * col2 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT + col2 * - cor0.col1 + - col2 * - cor0.col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + 67 * - col2 + ( + 35 ) * cor0.col1 FROM tab2 AS cor0
----
-1951
-724
323

query I rowsort
SELECT col0 + col0 * ( col1 ) FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2960
SELECT + + col2 * - CAST( + cor0.col2 AS SIGNED ) FROM tab2 AS cor0
----
-1444
-676
-729

skipif mysql # not compatible
query I rowsort label-2960
SELECT + + col2 * - CAST ( + cor0.col2 AS INTEGER ) FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL - col1 + col1 * - 29 FROM tab0 AS cor0
----
-2580
-2730
-2910

onlyif mysql # use DIV operator for integer division
query I rowsort label-2962
SELECT DISTINCT - col2 DIV - col0 - - col1 * + col2 AS col0 FROM tab2 AS cor0
----
1534
646
840

skipif mysql # not compatible
query I rowsort label-2962
SELECT DISTINCT - col2 / - col0 - - col1 * + col2 AS col0 FROM tab2 AS cor0
----
1534
646
840

query I rowsort
SELECT - + col0 * - 71 AS col0 FROM tab2 AS cor0
----
497
5538
5609

query I rowsort
SELECT ALL col2 + 58 FROM tab2 cor0
----
84
85
96

query I rowsort
SELECT + - ( + col1 ) + + col0 AS col2 FROM tab1 AS cor0
----
-23
54
67

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) + + col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
306
3540
992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2967
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col2 * col2 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2967
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col2 * col2 AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - ( + ( col2 ) ) * + ( + col1 ) AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + - 32 + 35 AS col2 FROM tab0 AS cor0
----
3
3
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2970
SELECT ALL - - CAST( 95 AS SIGNED ) - + col1 * + 70 AS col0 FROM tab0 AS cor0
----
-5925
-6275
-6695

skipif mysql # not compatible
query I rowsort label-2970
SELECT ALL - - CAST ( 95 AS INTEGER ) - + col1 * + 70 AS col0 FROM tab0 AS cor0
----
-5925
-6275
-6695

query I rowsort
SELECT ALL - - 93 + + 14 * + col0 * - ( col1 ) FROM tab1 AS cor0
----
-14467
-8867
-999

query I rowsort
SELECT - ( + 39 ) FROM tab1 AS cor0
----
-39
-39
-39

query I rowsort
SELECT ALL 59 * col2 - + cor0.col2 AS col1 FROM tab2 AS cor0
----
1508
1566
2204

query I rowsort
SELECT DISTINCT - + col1 * cor0.col1 + col1 AS col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT col0 * - 3 * col1 + - 44 FROM tab2 AS cor0
----
-13850
-4073
-695

query I rowsort
SELECT ALL 83 + - col2 * cor0.col2 FROM tab1 AS cor0
----
-2833
-3166
-9133

query I rowsort
SELECT + 10 + + 4 FROM tab2 AS cor0
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 col1 FROM tab1 AS cor0
----
10

query I rowsort
SELECT DISTINCT + 80 * + col1 + - col0 FROM tab1 AS cor0
----
2077
736
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col1 - - col0 col2 FROM tab0
----
110
132
180

query I rowsort
SELECT - 75 * col1 + - col2 FROM tab2 AS cor0
----
-1313
-2352
-4451

query I rowsort
SELECT ALL ( + cor0.col2 ) FROM tab1 cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 78 ) col1 FROM tab0 AS cor0
----
-78
-78
-78

query I rowsort
SELECT ALL - - ( col2 ) * - col2 AS col0 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT 60 + - col2 FROM tab1 AS cor0
----
-36
3
6

query I rowsort
SELECT ALL col0 * 42 * col0 + - col1 FROM tab2
----
2027
255469
262105

query I rowsort
SELECT ALL - + 60 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

query I rowsort
SELECT DISTINCT + - col2 * col1 AS col0 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT 69 FROM tab0, tab1 cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT ALL cor0.col2 + - cor0.col0 * + 5 FROM tab2 AS cor0
----
-357
-364
-8

query I rowsort
SELECT 5 + col2 FROM tab1
----
101
59
62

query I rowsort
SELECT DISTINCT + 71 AS col2 FROM tab0
----
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2993
SELECT ALL - col1 + CAST( col1 AS SIGNED ) * col2 FROM tab2
----
1475
629
806

skipif mysql # not compatible
query I rowsort label-2993
SELECT ALL - col1 + CAST ( col1 AS INTEGER ) * col2 FROM tab2
----
1475
629
806

query I rowsort
SELECT DISTINCT col1 + col1 + 43 AS col1 FROM tab0
----
215
225
237

query I rowsort
SELECT + col2 + + col2 + 95 FROM tab2
----
147
149
171

query I rowsort
SELECT col2 * - ( col2 ) * col2 AS col0 FROM tab1
----
-157464
-185193
-884736

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2997
SELECT + col0 + ( + ( col2 ) ) + + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2997
SELECT + col0 + ( + ( col2 ) ) + + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2998
SELECT DISTINCT - col0 + - CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-14
-156
-158

skipif mysql # not compatible
query I rowsort label-2998
SELECT DISTINCT - col0 + - CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT - - col0 - 59 AS col2 FROM tab1 AS cor0
----
-56
21
5

query I rowsort
SELECT - cor0.col0 + + col1 * cor0.col2 AS col1 FROM tab2 AS cor0
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 * + tab2.col2 * col0 col0 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT col0 + - col0 * + tab2.col1 AS col1 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT - col0 * - ( - col0 ) AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL col0 * + col1 + 73 + - col2 * - col0 AS col2 FROM tab0
----
15470
2929
3503

query I rowsort
SELECT - col2 + 61 FROM tab1 AS cor0
----
-35
4
7

query I rowsort
SELECT col0 * - 1 AS col0 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT ALL - col2 * 87 FROM tab1 AS cor0
----
-4698
-4959
-8352

query I rowsort
SELECT - col1 * - ( + col0 ) * col0 FROM tab0 cor0
----
118825
49536
720811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * + 61 col0 FROM tab0 AS cor0
----
-5246
-5551
-5917

query I rowsort
SELECT ALL 59 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT DISTINCT + 55 AS col0 FROM tab1, tab1 AS cor0
----
55

query I rowsort
SELECT DISTINCT - col1 * - cor0.col0 * - col0 AS col2 FROM tab1 AS cor0
----
-234
-40960
-83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-3013
SELECT + ( - col1 ) DIV col0 AS col1 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3013
SELECT + ( - col1 ) / col0 AS col1 FROM tab0 AS cor0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( - col1 ) col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT - col1 * + cor0.col2 + - cor0.col1 - + col1 * - cor0.col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + 8 * - col0 + - col1 * col2 + col1 * - col1 AS col2 FROM tab0 AS cor0
----
-10426
-16455
-9786

query I rowsort
SELECT DISTINCT + ( 92 + - col2 ) AS col2 FROM tab0
----
10
59
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-3018
SELECT ALL + col2 DIV + ( tab2.col1 + + col0 ) FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3018
SELECT ALL + col2 / + ( tab2.col1 + + col0 ) FROM tab2
----
0
0
0

query I rowsort
SELECT - cor0.col0 * + 33 + col2 AS col0 FROM tab1 AS cor0
----
-2055
-2544
-45

onlyif mysql # use DIV operator for integer division
query I rowsort label-3020
SELECT - + ( - col0 ) + col1 DIV - col1 FROM tab0 AS cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-3020
SELECT - + ( - col0 ) + col1 / - col1 FROM tab0 AS cor0
----
23
34
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 + cor0.col2 col0 FROM tab1 AS cor0
----
57
60
99

query I rowsort
SELECT ALL - 63 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to fc0b533c2773a0a802e1fc8317dcebf2

query I rowsort
SELECT DISTINCT + 10 - cor0.col1 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
-2828
-7452
-87

query I rowsort
SELECT ALL - 42 AS col2 FROM tab0
----
-42
-42
-42

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 ALL - col0 + + col1 * - 12 AS col1 FROM tab0 cor0
----
-1056
-1181
-1199

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + cor0.col0 col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + - cor0.col2 * col0 + 71 + col1 FROM tab1 AS cor0
----
-3567
-65
-7596

query I rowsort
SELECT ALL + col2 + - col2 + cor0.col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + col1 * - 2 FROM tab2 cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT + col1 * - ( col0 ) AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3032
SELECT + col1 * + CAST( col2 AS SIGNED ) * - col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

skipif mysql # not compatible
query I rowsort label-3032
SELECT + col1 * + CAST ( col2 AS INTEGER ) * - col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT - 57 FROM tab0, tab2, tab1 cor0
----
27 values hashing to 0b74bbd7631afe9b2eeb9f18b9dc6505

onlyif mysql # use DIV operator for integer division
query I rowsort label-3034
SELECT + tab0.col2 DIV col1 + 58 FROM tab0
----
58
58
58

skipif mysql # not compatible
query I rowsort label-3034
SELECT + tab0.col2 / col1 + 58 FROM tab0
----
58
58
58

query I rowsort
SELECT ( - col2 ) * + col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - + col2 + - col2 * 5 AS col2 FROM tab2 AS cor0
----
-156
-162
-228

query I rowsort
SELECT - col1 * + col2 * - ( - col0 * col1 ) FROM tab0 AS cor0
----
-329315
-5857632
-60434738

query I rowsort
SELECT ALL + 74 * + col1 FROM tab2 AS cor0
----
1258
2294
4366

query I rowsort
SELECT ALL col2 * + col1 * + ( - col0 ) AS col1 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - col1 * + 73 - 59 * - col1 AS col2 FROM tab0 AS cor0
----
-1204
-1274
-1358

query I rowsort
SELECT ALL - cor0.col1 + 86 FROM tab0 AS cor0
----
-11
-5
0

query I rowsort
SELECT col1 * - cor0.col2 * + col0 - col0 AS col0 FROM tab2 AS cor0
----
-119730
-51113
-5866

query I rowsort
SELECT ALL - col2 + ( - 89 ) AS col2 FROM tab1 AS cor0
----
-143
-146
-185

onlyif mysql # use DIV operator for integer division
query I rowsort label-3044
SELECT - 24 DIV - col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3044
SELECT - 24 / - col1 AS col1 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3045
SELECT col0 * - col2 - - CAST( - 23 AS SIGNED ) FROM tab1 cor0
----
-185
-3671
-7703

skipif mysql # not compatible
query I rowsort label-3045
SELECT col0 * - col2 - - CAST ( - 23 AS INTEGER ) FROM tab1 cor0
----
-185
-3671
-7703

query I rowsort
SELECT DISTINCT - 20 - cor0.col2 FROM tab1, tab1 AS cor0
----
-116
-74
-77

query I rowsort
SELECT - + ( - cor0.col1 ) * col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - + ( 18 ) AS col0 FROM tab1 AS cor0
----
-18
-18
-18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3049
SELECT - CAST( NULL AS SIGNED ) + - col1 + + col2 / - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3049
SELECT - CAST ( NULL AS INTEGER ) + - col1 + + col2 / - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * - ( col1 ) FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT + ( - 32 ) FROM tab0, tab1, tab1 AS cor0, tab2
----
-32

query I rowsort
SELECT ALL 97 * - col0 FROM tab1
----
-291
-6208
-7760

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 CROSS JOIN tab2, tab0 cor1, tab0 AS cor2
----
3645 values hashing to b223aa53e3aafe0f3f3f59048cc7a0d2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3054
SELECT col2 + col0 * col0 * CAST( NULL AS DECIMAL ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3054
SELECT col2 + col0 * col0 * CAST ( NULL AS REAL ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 93 + + col2 FROM tab2 AS cor0
----
119
120
131

query I rowsort
SELECT ( - 95 ) * - col2 * cor0.col0 AS col1 FROM tab2 AS cor0
----
17955
192660
285190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3057
SELECT + CAST( NULL AS SIGNED ) / - col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3057
SELECT + CAST ( NULL AS INTEGER ) / - col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + 88 AS REAL ) + + col0 FROM tab0
----
112
123
177

query I rowsort
SELECT ( - tab1.col1 ) - col1 AS col0 FROM tab1
----
-20
-26
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-3060
SELECT + tab0.col1 + col2 DIV + col0 AS col1 FROM tab0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-3060
SELECT + tab0.col1 + col2 / + col0 AS col1 FROM tab0
----
87
91
97

query I rowsort
SELECT - ( + ( col2 ) * - col0 + - tab2.col0 * col2 ) AS col1 FROM tab2
----
378
4056
6004

query I rowsort
SELECT DISTINCT tab2.col0 * + 15 * col0 FROM tab2
----
735
91260
93615

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col1 ) * col2 + + col1 col2 FROM tab2
----
1593
663
868

query I rowsort
SELECT DISTINCT - ( - col1 ) + ( + 30 ) AS col2 FROM tab0 AS cor0
----
116
121
127

onlyif mysql # use DIV operator for integer division
query I rowsort label-3065
SELECT ALL + col1 DIV + col0 + col0 col1 FROM tab1 AS cor0
----
11
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3065
SELECT ALL + col1 / + col0 + col0 col1 FROM tab1 AS cor0
----
11
64
80

query I rowsort
SELECT ALL - 18 + + col1 * 45 AS col2 FROM tab1 AS cor0
----
1152
432
567

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3067
SELECT - CAST( NULL AS SIGNED ) + 53 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3067
SELECT - CAST ( NULL AS INTEGER ) + 53 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - 64 + + col1 * - col0 FROM tab1 AS cor0
----
-1104
-142
-704

query I rowsort
SELECT ALL 56 * + col1 + + col2 AS col0 FROM tab0 AS cor0
----
4849
5178
5433

query I rowsort
SELECT ALL cor0.col2 * col0 * + col2 AS col1 FROM tab1 cor0
----
207936
737280
8748

query I rowsort
SELECT DISTINCT - + 63 + - col1 FROM tab0 AS cor0
----
-149
-154
-160

onlyif mysql # use DIV operator for integer division
query I rowsort label-3072
SELECT DISTINCT - - col1 + + col1 DIV - col0 AS col1 FROM tab0 AS cor0
----
83
90
95

skipif mysql # not compatible
query I rowsort label-3072
SELECT DISTINCT - - col1 + + col1 / - col0 AS col1 FROM tab0 AS cor0
----
83
90
95

query I rowsort
SELECT + + 51 * + col2 + - col0 FROM tab1 AS cor0
----
2751
2843
4816

query I rowsort
SELECT DISTINCT + col2 + + col2 * + 84 AS col1 FROM tab2 AS cor0
----
2210
2295
3230

query I rowsort
SELECT + - col1 + ( 0 ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3076
SELECT + + col0 + CAST( col1 AS SIGNED ) + + cor0.col0 FROM tab2 AS cor0
----
175
215
45

skipif mysql # not compatible
query I rowsort label-3076
SELECT + + col0 + CAST ( col1 AS INTEGER ) + + cor0.col0 FROM tab2 AS cor0
----
175
215
45

query I rowsort
SELECT ALL col1 + col1 + - 76 FROM tab2 AS cor0
----
-14
-42
42

query I rowsort
SELECT ALL + col2 + 3 AS col2 FROM tab2 AS cor0
----
29
30
41

query I rowsort
SELECT col2 * + 85 + cor0.col0 - col0 AS col2 FROM tab0 AS cor0
----
2805
6970
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3080
SELECT DISTINCT - - col1 * + 99 + - col1 + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3080
SELECT DISTINCT - - col1 * + 99 + - col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col1 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3082
SELECT DISTINCT col2 + 10 * - cor0.col0 + - CAST( cor0.col0 + - col2 AS SIGNED ) * col2 AS col1 FROM tab1 AS cor0
----
-982
2778
832

skipif mysql # not compatible
query I rowsort label-3082
SELECT DISTINCT col2 + 10 * - cor0.col0 + - CAST ( cor0.col0 + - col2 AS INTEGER ) * col2 AS col1 FROM tab1 AS cor0
----
-982
2778
832

skipif mysql # not compatible
query I rowsort
SELECT ALL - 93 / + col1 + + col2 + CAST ( + 38 AS REAL ) AS col0 FROM tab0 AS cor0
----
119
39
70

query I rowsort
SELECT 77 + col2 AS col0 FROM tab2 AS cor0
----
103
104
115

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3085
SELECT DISTINCT CAST( NULL AS SIGNED ) + + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-3085
SELECT DISTINCT CAST ( NULL AS INTEGER ) + + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT col1 + + 45 FROM tab2
----
104
62
76

query I rowsort
SELECT + tab2.col2 * 49 AS col0 FROM tab2
----
1274
1323
1862

onlyif mysql # use DIV operator for integer division
query I rowsort label-3088
SELECT + tab1.col0 DIV tab1.col1 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-3088
SELECT + tab1.col0 / tab1.col1 FROM tab1
----
0
6
6

query I rowsort
SELECT ALL + col1 * col2 + col1 + - col0 AS col1 FROM tab1
----
1181
1427
516

query I rowsort
SELECT DISTINCT - col0 * + 59 + + col2 * col0 FROM tab0
----
-2030
-624
2047

query I rowsort
SELECT ALL + col0 * cor0.col1 + 27 FROM tab0 cor0
----
2091
3422
8126

query I rowsort
SELECT - 42 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to 56f86ff01cd96a3511acd46e0e811e27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + cor0.col1 - + cor0.col1 col2 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3094
SELECT DISTINCT col2 * + 21 + + ( col2 ) DIV + col1 AS col2 FROM tab0
----
1722
21
693

skipif mysql # not compatible
query I rowsort label-3094
SELECT DISTINCT col2 * + 21 + + ( col2 ) / + col1 AS col2 FROM tab0
----
1722
21
693

query I rowsort
SELECT ALL - col2 + - ( - col0 ) * - col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab1 cor1, tab0, tab0 cor2
----
3645 values hashing to 78077727601c056ad0d4f4c11c8daffb

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col1 col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3098
SELECT col0 * 2 DIV col1 FROM tab2 AS cor0
----
0
2
9

skipif mysql # not compatible
query I rowsort label-3098
SELECT col0 * 2 / col1 FROM tab2 AS cor0
----
0
2
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3099
SELECT ALL - CAST( NULL AS SIGNED ) + 43 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3099
SELECT ALL - CAST ( NULL AS INTEGER ) + 43 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col2 * col0 + col0 - + 83 AS col2 FROM tab1 AS cor0
----
-242
-3667
-7683

query I rowsort
SELECT DISTINCT 89 * col2 AS col1 FROM tab2 AS cor0
----
2314
2403
3382

query I rowsort
SELECT + 75 + cor0.col0 * - cor0.col0 FROM tab2 cor0
----
-6009
-6166
26

query I rowsort
SELECT DISTINCT - 5 * 84 AS col2 FROM tab0 AS cor0
----
-420

query I rowsort
SELECT + ( - col2 ) * col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL col1 - col0 * - 15 * col1 FROM tab2
----
20162
3286
69089

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3106
SELECT ALL - col2 * + CAST( NULL AS SIGNED ) - + col1 * + col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3106
SELECT ALL - col2 * + CAST ( NULL AS INTEGER ) - + col1 * + col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - 66 + - 6 * - col0 FROM tab2 AS cor0
----
-24
402
408

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3108
SELECT - - CAST( ( col1 ) AS SIGNED ) * col0 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-3108
SELECT - - CAST ( ( col1 ) AS INTEGER ) * col0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3109
SELECT - 53 DIV col1 - col0 * - col1 FROM tab1 AS cor0
----
1036
635
76

skipif mysql # not compatible
query I rowsort label-3109
SELECT - 53 / col1 - col0 * - col1 FROM tab1 AS cor0
----
1036
635
76

query I rowsort
SELECT - - 73 + cor0.col0 AS col0 FROM tab2 AS cor0
----
151
152
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 65 + - col2 col0 FROM tab1 AS cor0
----
-119
-122
-161

query I rowsort
SELECT ALL - 79 * col2 + - col1 + + 65 AS col0 FROM tab0 AS cor0
----
-111
-2628
-6504

query I rowsort
SELECT - + col2 * - col1 + col1 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-3114
SELECT DISTINCT - 89 * + col0 + - col2 DIV col2 FROM tab1 AS cor0
----
-268
-5697
-7121

skipif mysql # not compatible
query I rowsort label-3114
SELECT DISTINCT - 89 * + col0 + - col2 / col2 FROM tab1 AS cor0
----
-268
-5697
-7121

query I rowsort
SELECT ALL + + 39 * + col0 AS col0 FROM tab1 AS cor0
----
117
2496
3120

query I rowsort
SELECT DISTINCT + 83 + + col2 FROM tab1 AS cor0
----
137
140
179

query I rowsort
SELECT 39 * cor0.col0 + - 17 AS col1 FROM tab0 AS cor0
----
1348
3454
919

query I rowsort
SELECT ALL 48 + col2 FROM tab1 AS cor0
----
102
105
144

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + + col2 * ( + col2 ) col1 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT DISTINCT + + col2 - + col0 FROM tab0 cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3121
SELECT ALL + ( + cor0.col1 ) - - 16 DIV col0 AS col1 FROM tab1 AS cor0
----
10
13
31

skipif mysql # not compatible
query I rowsort label-3121
SELECT ALL + ( + cor0.col1 ) - - 16 / col0 AS col1 FROM tab1 AS cor0
----
10
13
31

query I rowsort
SELECT DISTINCT col0 * col0 + col1 FROM tab0 cor0
----
1322
662
8012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor1.col1 col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
17
31
59

query I rowsort
SELECT - 19 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3125
SELECT col2 * + tab1.col1 + - CAST( + col0 AS SIGNED ) AS col1 FROM tab1
----
1168
1401
506

skipif mysql # not compatible
query I rowsort label-3125
SELECT col2 * + tab1.col1 + - CAST ( + col0 AS INTEGER ) AS col1 FROM tab1
----
1168
1401
506

query I rowsort
SELECT ALL - col2 + col1 * ( - col2 ) AS col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL + 52 * col1 * col0 FROM tab2
----
11284
239304
69836

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 68 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT 18 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT ALL col1 + 74 AS col2 FROM tab1
----
100
84
87

query I rowsort
SELECT col1 + + cor0.col1 * + col1 FROM tab2 AS cor0
----
306
3540
992

query IIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 3a953203ced079e372111d61dbd9e35f

onlyif mysql # use DIV operator for integer division
query I rowsort label-3133
SELECT col0 * col0 + - tab2.col0 DIV + ( + col1 ) FROM tab2
----
49
6083
6237

skipif mysql # not compatible
query I rowsort label-3133
SELECT col0 * col0 + - tab2.col0 / + ( + col1 ) FROM tab2
----
49
6083
6237

query I rowsort
SELECT DISTINCT - 55 * col2 * - ( 97 ) FROM tab0
----
176055
437470
5335

query I rowsort
SELECT DISTINCT - 15 AS col1 FROM tab0, tab1, tab1 AS cor0
----
-15

query I rowsort
SELECT ALL - 4 * col2 AS col1 FROM tab2
----
-104
-108
-152

query I rowsort
SELECT DISTINCT - ( 18 ) FROM tab2, tab0 cor0, tab0 AS cor1
----
-18

query I rowsort
SELECT + col2 * cor0.col2 + ( - ( col2 ) ) + + 83 FROM tab2 AS cor0
----
1489
733
785

onlyif mysql # use DIV operator for integer division
query I rowsort label-3139
SELECT ( - col1 ) DIV - col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3139
SELECT ( - col1 ) / - col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - + col2 * col1 + col2 + ( + col0 ) AS col1 FROM tab0 AS cor0
----
-2781
-61
-7291

query I rowsort
SELECT ALL - + 10 * col2 FROM tab2 AS cor0
----
-260
-270
-380

onlyif mysql # use DIV operator for integer division
query I rowsort label-3142
SELECT DISTINCT + 49 DIV + cor0.col2 AS col0 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-3142
SELECT DISTINCT + 49 / + cor0.col2 AS col0 FROM tab1 cor0
----
0

query I rowsort
SELECT ALL col1 * + col2 * col0 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT - + 53 + - 62 AS col1 FROM tab1 cor0
----
-115
-115
-115

query I rowsort
SELECT 41 * col0 FROM tab1 AS cor0
----
123
2624
3280

query I rowsort
SELECT DISTINCT - col2 * col0 * + col1 + cor0.col2 FROM tab0 cor0
----
-3394
-664036
-68079

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 45 col2 FROM tab1 AS cor0
----
-45
-45
-45

query I rowsort
SELECT + - 46 + col2 AS col2 FROM tab2 AS cor0
----
-19
-20
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + - col0 col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL 30 * col0 AS col2 FROM tab1 AS cor0
----
1920
2400
90

query I rowsort
SELECT + col1 * 50 + col2 AS col2 FROM tab0 AS cor0
----
4333
4632
4851

query I rowsort
SELECT ALL + 62 * col2 FROM tab0
----
2046
5084
62

query I rowsort
SELECT + ( - 79 ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( + 8 AS REAL ) * - col2 AS col2 FROM tab1 AS cor0
----
432
456
768

query I rowsort
SELECT DISTINCT 62 * col1 * - col0 AS col1 FROM tab1 AS cor0
----
-39680
-4836
-64480

query I rowsort
SELECT col2 + + 49 * col2 + - cor0.col1 FROM tab2 AS cor0
----
1241
1319
1883

onlyif mysql # use DIV operator for integer division
query I rowsort label-3157
SELECT + + col2 DIV - 6 AS col2 FROM tab0 AS cor0
----
-13
-5
0

skipif mysql # not compatible
query I rowsort label-3157
SELECT + + col2 / - 6 AS col2 FROM tab0 AS cor0
----
-13
-5
0

query I rowsort
SELECT ALL + + ( - ( - col1 ) ) AS col0 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3159
SELECT ALL col2 + col0 DIV + col2 AS col0 FROM tab0 AS cor0
----
33
36
83

skipif mysql # not compatible
query I rowsort label-3159
SELECT ALL col2 + col0 / + col2 AS col0 FROM tab0 AS cor0
----
33
36
83

query I rowsort
SELECT col0 * 86 * - col2 + col1 * col1 FROM tab2 AS cor0
----
-15293
-170927
-257883

query I rowsort
SELECT + col2 * - ( col2 ) AS col1 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT ALL col0 + + col1 * col1 AS col2 FROM tab0 cor0
----
7420
8370
9444

query I rowsort
SELECT ALL - + col0 - - col1 * - col0 * + col1 AS col1 FROM tab0 cor0
----
-177528
-329350
-737098

query I rowsort
SELECT ALL + - col0 * - cor0.col0 + col2 AS col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT + - cor0.col2 + + col1 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3166
SELECT - CAST( col0 AS SIGNED ) * - col1 + 99 FROM tab2 AS cor0
----
1442
316
4701

skipif mysql # not compatible
query I rowsort label-3166
SELECT - CAST ( col0 AS INTEGER ) * - col1 + 99 FROM tab2 AS cor0
----
1442
316
4701

query I rowsort
SELECT DISTINCT 58 * col0 + col0 + 94 FROM tab2 AS cor0
----
4696
4755
507

query I rowsort
SELECT + col2 * col0 + 94 AS col2 FROM tab2
----
2122
283
3096

query I rowsort
SELECT - ( + col1 ) * + col2 + + ( col1 ) FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT 57 + + col1 FROM tab1
----
67
70
83

query I rowsort
SELECT + col0 * - tab2.col0 + - col1 FROM tab2
----
-6143
-6258
-80

query I rowsort
SELECT col2 * 90 + col0 FROM tab0
----
125
2994
7469

onlyif mysql # use DIV operator for integer division
query I rowsort label-3173
SELECT DISTINCT col1 + + col2 DIV - col2 AS col1 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-3173
SELECT DISTINCT col1 + + col2 / - col2 AS col1 FROM tab0
----
85
90
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3174
SELECT DISTINCT CAST( + col1 * + col0 AS SIGNED ) + col1 AS col2 FROM tab1
----
104
1053
650

skipif mysql # not compatible
query I rowsort label-3174
SELECT DISTINCT CAST ( + col1 * + col0 AS INTEGER ) + col1 AS col2 FROM tab1
----
104
1053
650

query I rowsort
SELECT DISTINCT - col2 * ( col1 ) + - 17 FROM tab1
----
-1265
-1421
-587

query I rowsort
SELECT + col2 * + col0 - - col2 FROM tab0
----
36
7380
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-3177
SELECT col1 * col2 DIV col0 + CAST( ( col1 ) + col0 AS SIGNED ) AS col2 FROM tab1
----
108
497
82

skipif mysql # not compatible
query I rowsort label-3177
SELECT col1 * col2 / col0 + CAST ( ( col1 ) + col0 AS INTEGER ) AS col2 FROM tab1
----
108
497
82

query I rowsort
SELECT - 80 FROM tab2, tab2 cor0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3179
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + col1 AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-3179
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + col1 AS col2 FROM tab2
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3180
SELECT - 34 * col1 DIV tab1.col2 FROM tab1
----
-16
-4
-5

skipif mysql # not compatible
query I rowsort label-3180
SELECT - 34 * col1 / tab1.col2 FROM tab1
----
-16
-4
-5

query I rowsort
SELECT 34 * + col1 AS col1 FROM tab0
----
2924
3094
3298

query I rowsort
SELECT ALL + col0 * ( col0 ) AS col2 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3183
SELECT ALL + - col0 * col0 DIV + col1 FROM tab2 AS cor0
----
-1
-103
-367

skipif mysql # not compatible
query I rowsort label-3183
SELECT ALL + - col0 * col0 / + col1 FROM tab2 AS cor0
----
-1
-103
-367

query I rowsort
SELECT - 46 * + col2 + col0 * - ( col0 + - col1 ) FROM tab2
----
-1074
-2678
-6646

query I rowsort
SELECT - ( 60 ) AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

query I rowsort
SELECT ALL + - cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT + - col2 * col2 * - col1 + + col1 AS col0 FROM tab0 AS cor0
----
194
611975
93740

query I rowsort
SELECT - - cor0.col1 * ( + col1 ) + cor0.col0 FROM tab2 AS cor0
----
3559
368
968

onlyif mysql # use DIV operator for integer division
query I rowsort label-3189
SELECT DISTINCT col2 + 53 DIV col1 AS col1 FROM tab2 AS cor0
----
26
28
41

skipif mysql # not compatible
query I rowsort label-3189
SELECT DISTINCT col2 + 53 / col1 AS col1 FROM tab2 AS cor0
----
26
28
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-3190
SELECT ALL - col2 DIV - col0 + - 51 + - col2 FROM tab0 AS cor0
----
-133
-52
-83

skipif mysql # not compatible
query I rowsort label-3190
SELECT ALL - col2 / - col0 + - 51 + - col2 FROM tab0 AS cor0
----
-133
-52
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col2 * col1 col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + + cor0.col0 * 76 + col2 - col0 FROM tab1 AS cor0
----
279
4857
6096

query I rowsort
SELECT DISTINCT col0 * + ( col1 ) AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + col1 * - 12 AS col0 FROM tab0 cor0
----
-1032
-1092
-1164

onlyif mysql # use DIV operator for integer division
query I rowsort label-3195
SELECT ALL col0 DIV 79 AS col0 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3195
SELECT ALL col0 / 79 AS col0 FROM tab2 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - 22 col0 FROM tab2
----
-15
56
57

query I rowsort
SELECT ALL col1 * - 66 AS col2 FROM tab0
----
-5676
-6006
-6402

query I rowsort
SELECT 84 + col2 * + col0 FROM tab1
----
246
3732
7764

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + ( - col1 ) ) col1 FROM tab1
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3200
SELECT ALL + tab2.col0 DIV + col1 col2 FROM tab2
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3200
SELECT ALL + tab2.col0 / + col1 col2 FROM tab2
----
0
1
4

query I rowsort
SELECT - cor0.col2 * + col1 * ( ( - col1 ) ) FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT col0 * col0 + + ( col1 ) AS col0 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT ALL ( - col0 ) * col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + cor0.col0 * col0 * 10 AS col2 FROM tab1 AS cor0
----
40960
64000
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-3205
SELECT + + 98 DIV - col0 FROM tab2 AS cor0
----
-1
-1
-14

skipif mysql # not compatible
query I rowsort label-3205
SELECT + + 98 / - col0 FROM tab2 AS cor0
----
-1
-1
-14

query I rowsort
SELECT ALL + + 83 AS col1 FROM tab2 AS cor0
----
83
83
83

query I rowsort
SELECT 90 * col0 AS col2 FROM tab1 AS cor0
----
270
5760
7200

query I rowsort
SELECT col1 + + 36 AS col0 FROM tab2 AS cor0
----
53
67
95

query I rowsort
SELECT DISTINCT - col2 + - cor0.col0 + 55 * + col1 FROM tab0 AS cor0
----
4673
4834
5299

query I rowsort
SELECT DISTINCT + + col1 - - col0 AS col0 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 + - col1 col1 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT col0 + 64 FROM tab0 AS cor0
----
153
88
99

query I rowsort
SELECT + col1 * col0 + 37 + - cor0.col1 * ( 14 ) * col1 AS col2 FROM tab0 AS cor0
----
-101443
-107798
-128294

query I rowsort
SELECT + + col2 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL + - col0 * + col2 + - col1 * col2 FROM tab0 AS cor0
----
-132
-14760
-3630

query I rowsort
SELECT ALL - col0 + 7 AS col0 FROM tab2 AS cor0
----
-71
-72
0

query I rowsort
SELECT col0 * ( - col0 ) + col1 AS col2 FROM tab2 AS cor0
----
-18
-6025
-6224

onlyif mysql # use DIV operator for integer division
query I rowsort label-3218
SELECT ALL cor0.col0 DIV 59 + + 57 AS col0 FROM tab1 AS cor0
----
57
58
58

skipif mysql # not compatible
query I rowsort label-3218
SELECT ALL cor0.col0 / 59 + + 57 AS col0 FROM tab1 AS cor0
----
57
58
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3219
SELECT ALL CAST( NULL AS SIGNED ) * - col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3219
SELECT ALL CAST ( NULL AS INTEGER ) * - col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( 85 ) * - col2 AS col2 FROM tab1 AS cor0
----
4590
4845
8160

query I rowsort
SELECT DISTINCT + col2 + - col2 * + col1 AS col1 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL - - col0 + col1 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - 4 * + 82 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab0 cor2
----
81 values hashing to ba28242434d4a95fde522a45e32d847d

query I rowsort
SELECT ( - 48 ) AS col0 FROM tab2, tab1 AS cor0, tab0 cor1, tab1 AS cor2
----
81 values hashing to 70b0cff913cec85654af0aaf3f5f6d85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 55 * col1 * cor0.col2 col1 FROM tab1 AS cor0
----
-31350
-68640
-77220

query I rowsort
SELECT + col0 + + col0 + - col2 FROM tab0 cor0
----
15
69
96

query I rowsort
SELECT ALL + 58 * + cor0.col2 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 9117a0eb56a263e5626b04f49219b146

onlyif mysql # use DIV operator for integer division
query I rowsort label-3228
SELECT ALL col0 DIV - 55 AS col1 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3228
SELECT ALL col0 / - 55 AS col1 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT - + cor0.col1 * col2 + + col2 AS col0 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT - col2 - + 31 AS col0 FROM tab1 cor0
----
-127
-85
-88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3231
SELECT DISTINCT - CAST( + col0 AS SIGNED ) + col0 * col2 * + col2 AS col2 FROM tab2 AS cor0
----
113997
5096
52650

skipif mysql # not compatible
query I rowsort label-3231
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) + col0 * col2 * + col2 AS col2 FROM tab2 AS cor0
----
113997
5096
52650

query I rowsort
SELECT DISTINCT 76 + + col0 FROM tab0 cor0
----
100
111
165

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3233
SELECT CAST( NULL AS SIGNED ) * + col0 + + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3233
SELECT CAST ( NULL AS INTEGER ) * + col0 + + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3234
SELECT ALL 71 DIV + col0 + - col0 FROM tab0 AS cor0
----
-22
-33
-89

skipif mysql # not compatible
query I rowsort label-3234
SELECT ALL 71 / + col0 + - col0 FROM tab0 AS cor0
----
-22
-33
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + cor0.col2 col1 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3236
SELECT ( cor0.col0 ) DIV col1 + + col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3236
SELECT ( cor0.col0 ) / col1 + + col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3237
SELECT DISTINCT - ( - 69 ) - col0 DIV + col1 AS col2 FROM tab1 AS cor0
----
63
69

skipif mysql # not compatible
query I rowsort label-3237
SELECT DISTINCT - ( - 69 ) - col0 / + col1 AS col2 FROM tab1 AS cor0
----
63
69

query I rowsort
SELECT + ( - 19 ) * cor0.col2 FROM tab2 AS cor0
----
-494
-513
-722

query I rowsort
SELECT - col2 * - ( + col0 + 92 ) FROM tab0 AS cor0
----
127
14842
3828

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3240
SELECT - CAST( - 48 AS SIGNED ) FROM tab1 cor0
----
48
48
48

skipif mysql # not compatible
query I rowsort label-3240
SELECT - CAST ( - 48 AS INTEGER ) FROM tab1 cor0
----
48
48
48

query I rowsort
SELECT - 37 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to a283a98d14c34636d74b0e0b57633585

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 84 col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
84

query I rowsort
SELECT DISTINCT + col0 + - ( 27 ) FROM tab1 AS cor0
----
-24
37
53

query I rowsort
SELECT col2 + - col2 + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT col0 * 45 + 70 FROM tab2 AS cor0
----
3580
3625
385

onlyif mysql # use DIV operator for integer division
query I rowsort label-3246
SELECT DISTINCT 85 DIV - col0 - - CAST( col1 AS SIGNED ) * + col1 FROM tab1
----
168
648
99

skipif mysql # not compatible
query I rowsort label-3246
SELECT DISTINCT 85 / - col0 - - CAST ( col1 AS INTEGER ) * + col1 FROM tab1
----
168
648
99

query I rowsort
SELECT col1 + tab0.col2 + - 47 * - col2 FROM tab0
----
145
1670
4027

query I rowsort
SELECT DISTINCT - ( - cor0.col0 ) + tab2.col1 + + 55 FROM tab2, tab1 AS cor0
----
9 values hashing to 0822c603cf6c90cd63e657923847a24c

query I rowsort
SELECT DISTINCT col2 * - col0 + + col0 AS col1 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT - col1 + + 93 FROM tab2 AS cor0
----
34
62
76

query I rowsort
SELECT - col2 * col0 + - col1 * col2 FROM tab2 AS cor0
----
-1026
-3562
-3648

query I rowsort
SELECT col2 * col1 * col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT col2 + + ( + 59 ) FROM tab2
----
85
86
97

query I rowsort
SELECT col1 * ( tab2.col0 ) FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3255
SELECT tab0.col0 DIV - tab0.col0 col0 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3255
SELECT tab0.col0 / - tab0.col0 col0 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT ALL tab2.col1 FROM tab2, tab0 AS cor0, tab1, tab1 AS cor1
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT - - 83 * - cor0.col0 + - 96 FROM tab1 AS cor0
----
-345
-5408
-6736

query I rowsort
SELECT + 40 * + cor0.col0 + cor0.col1 FROM tab1 cor0
----
146
2570
3213

query I rowsort
SELECT ALL tab1.col2 + - col0 * ( + 64 ) FROM tab1
----
-138
-4039
-5024

query I rowsort
SELECT - col1 * + col1 - + col0 FROM tab1
----
-164
-249
-679

query I rowsort
SELECT col0 * - ( - 64 * col1 ) + - col0 AS col1 FROM tab2 cor0
----
13881
294450
85873

query I rowsort
SELECT + + cor0.col2 * 16 + + col2 FROM tab1 cor0
----
1632
918
969

query I rowsort
SELECT DISTINCT + 4 AS col1 FROM tab0, tab2 cor0, tab0 AS cor1
----
4

query I rowsort
SELECT DISTINCT col0 + - 4 + col1 AS col0 FROM tab1 AS cor0
----
25
70
89

query I rowsort
SELECT + col0 + 78 * 32 AS col2 FROM tab1 AS cor0
----
2499
2560
2576

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + ( col1 ) AS REAL ) col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT 42 + col2 * - col2 + col2 AS col0 FROM tab1 AS cor0
----
-2820
-3150
-9078

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3268
SELECT + - ( cor0.col0 ) + CAST( 68 AS SIGNED ) FROM tab1 AS cor0
----
-12
4
65

skipif mysql # not compatible
query I rowsort label-3268
SELECT + - ( cor0.col0 ) + CAST ( 68 AS INTEGER ) FROM tab1 AS cor0
----
-12
4
65

query I rowsort
SELECT - ( + col1 ) + col2 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT col2 + - col1 + - col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 49 * - col1 * - col2 col1 FROM tab2
----
31654
41013
75166

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( tab1.col2 ) * + tab1.col1 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 16ae0e1090cb09b93854a4788f17716b

onlyif mysql # use DIV operator for integer division
query I rowsort label-3273
SELECT - 38 DIV col1 FROM tab1
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3273
SELECT - 38 / col1 FROM tab1
----
-1
-2
-3

query I rowsort
SELECT ALL 29 + col2 FROM tab1 AS cor0
----
125
83
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 2 col0 FROM tab0
----
2

query I rowsort
SELECT DISTINCT + 54 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
54

query I rowsort
SELECT - - 7 - + col2 AS col2 FROM tab0 AS cor0
----
-26
-75
6

query I rowsort
SELECT ALL + ( col2 ) * col0 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT - 79 * col2 + col2 * - col0 FROM tab0 AS cor0
----
-114
-13776
-3399

query I rowsort
SELECT col0 + col0 * - col0 * - col1 AS col1 FROM tab1 AS cor0
----
237
41024
83280

query I rowsort
SELECT DISTINCT 53 + col0 * + 95 FROM tab2 AS cor0
----
718
7463
7558

query I rowsort
SELECT - col1 + 22 AS col2 FROM tab2 AS cor0
----
-37
-9
5

query I rowsort
SELECT DISTINCT cor0.col1 + col0 * + col2 + - col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT + col1 + col0 * - col2 * - col1 AS col1 FROM tab0 AS cor0
----
3492
664209
68198

query I rowsort
SELECT ALL - + col1 + 24 * - col2 AS col2 FROM tab2 cor0
----
-679
-683
-929

onlyif mysql # use DIV operator for integer division
query I rowsort label-3286
SELECT DISTINCT col1 + + cor0.col2 DIV col1 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3286
SELECT DISTINCT col1 + + cor0.col2 / col1 AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + + col2 * ( col1 * col0 ) + - col1 * col0 FROM tab0 AS cor0
----
0
656019
66048

onlyif mysql # use DIV operator for integer division
query I rowsort label-3288
SELECT + 79 DIV col0 FROM tab2
----
1
1
11

skipif mysql # not compatible
query I rowsort label-3288
SELECT + 79 / col0 FROM tab2
----
1
1
11

query I rowsort
SELECT col0 + col0 * col2 + + col1 * - col1 AS col1 FROM tab0
----
-6580
-894
-9339

query I rowsort
SELECT ALL + ( col1 ) + col1 * col0 AS col0 FROM tab1
----
104
1053
650

query I rowsort
SELECT DISTINCT + 60 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
60

query I rowsort
SELECT + col1 * tab0.col2 + ( col1 ) FROM tab0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-3293
SELECT ALL + - 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-3293
SELECT ALL + - col0 / + col1 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col1 + 20 FROM tab0 AS cor0
----
106
111
117

query I rowsort
SELECT DISTINCT + + col1 - col1 AS col0 FROM tab1 cor0
----
0

query I rowsort
SELECT + ( + col0 ) - + col1 AS col0 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT - - 86 AS col1 FROM tab0 AS cor0
----
86
86
86

query I rowsort
SELECT + col0 * - 19 FROM tab2 AS cor0
----
-133
-1482
-1501

query I rowsort
SELECT - + col2 * + 70 + + col1 AS col1 FROM tab1 AS cor0
----
-3754
-3980
-6707

query I rowsort
SELECT ALL col1 + - 71 AS col0 FROM tab0 AS cor0
----
15
20
26

query I rowsort
SELECT col2 + - 35 AS col1 FROM tab1 AS cor0
----
19
22
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + cor0.col0 * cor0.col1 col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT - + ( - col0 ) * + col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - - col1 * - col1 * ( + 80 ) - - col0 FROM tab0 AS cor0
----
-591656
-662391
-752685

query I rowsort
SELECT - 59 - + 28 AS col1 FROM tab2
----
-87
-87
-87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3306
SELECT ALL - CAST( + 28 AS SIGNED ) + tab0.col2 * ( + col0 ) AS col2 FROM tab0
----
7
7270
764

skipif mysql # not compatible
query I rowsort label-3306
SELECT ALL - CAST ( + 28 AS INTEGER ) + tab0.col2 * ( + col0 ) AS col2 FROM tab0
----
7
7270
764

query I rowsort
SELECT + + col2 + cor0.col2 - col0 FROM tab1 AS cor0
----
105
112
50

query I rowsort
SELECT + 67 * - col2 AS col0 FROM tab2 AS cor0
----
-1742
-1809
-2546

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 + + ( col1 ) + CAST ( 50 AS REAL ) * col2 FROM tab1
----
2729
2924
4893

query I rowsort
SELECT ALL 51 + 90 AS col2 FROM tab1
----
141
141
141

query I rowsort
SELECT - col1 * 57 + col1 + col2 AS col1 FROM tab0
----
-4783
-5014
-5431

query I rowsort
SELECT tab2.col2 + - col2 + + col1 FROM tab2
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col1 + tab2.col0 col2 FROM tab2
----
175
215
45

query I rowsort
SELECT - - col1 * + col0 + 78 FROM tab2 AS cor0
----
1421
295
4680

query I rowsort
SELECT col2 + + cor0.col1 * - 48 FROM tab1 AS cor0
----
-1194
-423
-528

query I rowsort
SELECT ALL + 36 * + col0 FROM tab0 AS cor0
----
1260
3204
864

query I rowsort
SELECT + + col1 + cor0.col1 * - 26 * - col0 FROM tab1 AS cor0
----
16650
2054
27053

query I rowsort
SELECT DISTINCT - 40 * col2 AS col1 FROM tab2 cor0
----
-1040
-1080
-1520

query I rowsort
SELECT - 31 * - col1 AS col1 FROM tab1 cor0
----
310
403
806

query I rowsort
SELECT ALL col2 + col1 * - col0 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 1 * + col1 col1 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL - 27 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 0259a67676b131a4843853be4811b775

query I rowsort
SELECT DISTINCT 98 * col1 FROM tab1
----
1274
2548
980

query I rowsort
SELECT tab1.col1 * + col2 * col0 + col0 + - col1 FROM tab1
----
36534
4189
99907

query I rowsort
SELECT tab0.col2 * + tab0.col1 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3326
SELECT DISTINCT ( col2 ) DIV 70 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3326
SELECT DISTINCT ( col2 ) / 70 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - tab2.col0 * tab2.col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT + cor1.col0 AS col2 FROM tab2, tab1 AS cor0, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT 55 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT - col1 + ( + col0 ) AS col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT cor0.col0 * + ( col0 ) + - col2 * cor0.col2 FROM tab1 AS cor0
----
-2816
-2907
847

query I rowsort
SELECT - cor0.col0 * ( + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT + + col1 * - col1 + col1 AS col2 FROM tab1 AS cor0
----
-156
-650
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 40 col1 FROM tab1 AS cor0
----
-40

query I rowsort
SELECT + cor0.col2 * col0 + - col1 FROM tab0 AS cor0
----
-62
706
7207

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3336
SELECT - CAST( cor0.col2 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-3336
SELECT - CAST ( cor0.col2 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3337
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-3337
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col1 ) * cor0.col1 col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - + ( 32 ) FROM tab1 AS cor0
----
-32
-32
-32

query I rowsort
SELECT 33 * col0 AS col1 FROM tab2 AS cor0
----
231
2574
2607

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( + 33 ) + col2 col2 FROM tab0 cor0
----
-32
0
49

query I rowsort
SELECT DISTINCT + + 83 * 82 AS col2 FROM tab2 cor0
----
6806

query I rowsort
SELECT ( - col2 * - col1 ) FROM tab0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3344
SELECT ALL + - CAST( col0 AS SIGNED ) col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3344
SELECT ALL + - CAST ( col0 AS INTEGER ) col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - col2 + + col1 * + col2 AS col1 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT ALL + + col0 + - col0 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3347
SELECT - + col2 + ( - cor0.col2 ) DIV 41 FROM tab1 AS cor0
----
-55
-58
-98

skipif mysql # not compatible
query I rowsort label-3347
SELECT - + col2 + ( - cor0.col2 ) / 41 FROM tab1 AS cor0
----
-55
-58
-98

query I rowsort
SELECT + col2 * col0 + col0 * + cor0.col2 AS col1 FROM tab0 cor0
----
14596
1584
70

query I rowsort
SELECT + - ( - col0 ) * + col2 - + col2 * col2 FROM tab0 AS cor0
----
-297
34
574

onlyif mysql # use DIV operator for integer division
query I rowsort label-3350
SELECT + ( - 47 ) * - col2 + - ( + col0 ) DIV + col1 FROM tab1 AS cor0
----
2538
2673
4506

skipif mysql # not compatible
query I rowsort label-3350
SELECT + ( - 47 ) * - col2 + - ( + col0 ) / + col1 FROM tab1 AS cor0
----
2538
2673
4506

query I rowsort
SELECT ALL - - col1 + 38 FROM tab2 cor0
----
55
69
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3352
SELECT ALL - col1 * CAST( NULL AS SIGNED ) * col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3352
SELECT ALL - col1 * CAST ( NULL AS INTEGER ) * col1 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - tab0.col0 * + 96 AS col2 FROM tab0
----
-2304
-3360
-8544

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3354
SELECT ALL + - CAST( col0 AS SIGNED ) * cor0.col2 - - col0 FROM tab0 AS cor0
----
-7209
-768
0

skipif mysql # not compatible
query I rowsort label-3354
SELECT ALL + - CAST ( col0 AS INTEGER ) * cor0.col2 - - col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT col1 * + col0 + - col2 * col0 * cor0.col1 FROM tab1 AS cor0
----
-35840
-4134
-98800

query I rowsort
SELECT DISTINCT - ( + ( + col0 ) ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col2 * col2 * + col1 AS col0 FROM tab1
----
119808
32490
75816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3358
SELECT DISTINCT ( + 22 ) + col0 * + CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-3358
SELECT DISTINCT ( + 22 ) + col0 * + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT + ( + cor0.col2 ) - col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + + col2 - + 62 AS col0 FROM tab2 AS cor0
----
-24
-35
-36

query I rowsort
SELECT - - ( col0 ) + col2 AS col0 FROM tab1 cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3362
SELECT + col1 * col0 DIV - col0 col2 FROM tab2 AS cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3362
SELECT + col1 * col0 / - col0 col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT col0 * - ( + cor0.col1 ) AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3364
SELECT + 63 DIV 60 + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a4eb83f40d87ef4bb021bb35a3b03309

skipif mysql # not compatible
query I rowsort label-3364
SELECT + 63 / 60 + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a4eb83f40d87ef4bb021bb35a3b03309

query I rowsort
SELECT ALL - ( - col1 ) * - col1 AS col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - cor1.col2 * + 45 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 2f0ff29bd8e7e5dc132cdf49fffe4886

query I rowsort
SELECT + cor0.col2 * + 98 + 71 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 81e9062ecc2ea0bc50dbb0fd126357d8

query I rowsort
SELECT col2 - 29 AS col0 FROM tab2
----
-2
-3
9

query I rowsort
SELECT ALL - tab1.col0 * ( + col0 ) - col0 AS col0 FROM tab1
----
-12
-4160
-6480

query I rowsort
SELECT - + cor0.col0 * - col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 90 col0 FROM tab1, tab1 AS cor0
----
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-3372
SELECT ALL col0 * col0 + 56 DIV col1 AS col2 FROM tab1 AS cor0
----
11
4101
6404

skipif mysql # not compatible
query I rowsort label-3372
SELECT ALL col0 * col0 + 56 / col1 AS col2 FROM tab1 AS cor0
----
11
4101
6404

query I rowsort
SELECT ALL - - col2 + + 20 AS col1 FROM tab0 AS cor0
----
102
21
53

query I rowsort
SELECT DISTINCT + col0 + 30 AS col1 FROM tab1 AS cor0
----
110
33
94

query I rowsort
SELECT DISTINCT - col1 + - col1 * - 55 AS col0 FROM tab0 AS cor0
----
4644
4914
5238

query I rowsort
SELECT - col1 + + 86 FROM tab0
----
-11
-5
0

query I rowsort
SELECT ALL 98 + 5 FROM tab2 cor0 CROSS JOIN tab2, tab2 cor1, tab0 AS cor2
----
81 values hashing to ecf8639d8d45f60ceb1f0b2da4453a21

onlyif mysql # use DIV operator for integer division
query I rowsort label-3378
SELECT ALL col1 + - 84 DIV col0 AS col2 FROM tab2 cor0
----
16
19
58

skipif mysql # not compatible
query I rowsort label-3378
SELECT ALL col1 + - 84 / col0 AS col2 FROM tab2 cor0
----
16
19
58

query I rowsort
SELECT ALL + ( 58 ) + col0 FROM tab1 AS cor0
----
122
138
61

query I rowsort
SELECT ALL ( - 10 ) * - col1 AS col2 FROM tab0 AS cor0
----
860
910
970

onlyif mysql # use DIV operator for integer division
query I rowsort label-3381
SELECT + 98 DIV col1 + - tab0.col2 + col2 * - 15 FROM tab0
----
-1311
-15
-527

skipif mysql # not compatible
query I rowsort label-3381
SELECT + 98 / col1 + - tab0.col2 + col2 * - 15 FROM tab0
----
-1311
-15
-527

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3382
SELECT DISTINCT - 18 + - ( tab2.col2 ) / CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-3382
SELECT DISTINCT - 18 + - ( tab2.col2 ) / CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3383
SELECT ALL - col2 DIV + cor0.col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3383
SELECT ALL - col2 / + cor0.col2 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3384
SELECT CAST( NULL AS SIGNED ) * - 85 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3384
SELECT CAST ( NULL AS INTEGER ) * - 85 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 73 * col1 col2 FROM tab2 AS cor0
----
1241
2263
4307

query I rowsort
SELECT - 11 * - col1 * col0 AS col1 FROM tab1 AS cor0
----
11440
7040
858

query I rowsort
SELECT ALL - col0 + 70 FROM tab1 AS cor0
----
-10
6
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 15 col1 FROM tab1, tab0 AS cor0, tab1 cor1
----
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3389
SELECT + col1 * col1 + CAST( NULL AS SIGNED ) * 94 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3389
SELECT + col1 * col1 + CAST ( NULL AS INTEGER ) * 94 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 + col0 + + 90 * col2 AS col2 FROM tab2 AS cor0
----
2340
2430
3420

query I rowsort
SELECT DISTINCT + cor0.col2 * col0 * - ( col1 ) - col2 FROM tab1 AS cor0
----
-36537
-4266
-99936

query I rowsort
SELECT - 95 + - col2 AS col2 FROM tab1 AS cor0
----
-149
-152
-191

query I rowsort
SELECT ALL 18 + col0 * + 98 AS col1 FROM tab1 AS cor0
----
312
6290
7858

query I rowsort
SELECT DISTINCT + 67 + cor0.col0 * cor0.col1 AS col2 FROM tab2 AS cor0
----
1410
284
4669

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + ( - 92 ) * cor0.col1 + 71 col0 FROM tab1 AS cor0
----
-15477
-62121
-9129

query I rowsort
SELECT ALL - - col0 * 14 FROM tab2 cor0
----
1092
1106
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3397
SELECT ALL cor0.col1 DIV + 98 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3397
SELECT ALL cor0.col1 / + 98 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - cor0.col2 * col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL col0 * 58 AS col0 FROM tab2 AS cor0
----
406
4524
4582

query I rowsort
SELECT + col0 * + tab1.col1 - 20 FROM tab1
----
1020
58
620

query I rowsort
SELECT DISTINCT - 40 + col2 FROM tab0
----
-39
-7
42

query I rowsort
SELECT ALL col1 * - col0 * - col1 AS col1 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT ALL cor0.col2 * col1 * col0 + cor0.col1 * cor0.col2 + col2 FROM tab1 AS cor0
----
101184
37107
5670

query I rowsort
SELECT - 75 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c0722b1d77ac0ed13c0f2691a5751c59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3405
SELECT col1 + + col2 DIV + col1 AS col0 FROM tab1 AS cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-3405
SELECT col1 + + col2 / + col1 AS col0 FROM tab1 AS cor0
----
15
20
28

query I rowsort
SELECT + col0 * + cor0.col1 + col2 FROM tab0 AS cor0
----
2097
3396
8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 1 * col2 col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL 18 + - col0 * col1 FROM tab1 AS cor0
----
-1022
-60
-622

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 37 + cor0.col0 + + col2 col2 FROM tab2 AS cor0
----
-225
-2782
-2806

query I rowsort
SELECT DISTINCT col0 * + 71 AS col0 FROM tab0 AS cor0
----
1704
2485
6319

query I rowsort
SELECT DISTINCT - - cor0.col0 * col1 * - ( + col0 * 64 ) + cor0.col1 FROM tab0 AS cor0
----
-3170218
-46131813
-7604703

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 + 24 col2 FROM tab1 AS cor0
----
-2
11
14

query I rowsort
SELECT DISTINCT + col0 + - col0 * + col2 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT + 41 - tab2.col1 * - ( col0 ) AS col1 FROM tab2
----
1384
258
4643

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col1 + + col0 * + 37 col0 FROM tab2
----
290
2940
2945

query I rowsort
SELECT ALL + col2 * col2 + - col1 FROM tab1
----
2890
3239
9203

query I rowsort
SELECT ALL col0 + col2 * - col0 AS col0 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT - tab1.col0 * - col1 + + col0 * + col2 FROM tab1
----
240
4288
8720

query I rowsort
SELECT ALL col2 * + col2 + - col1 * col1 FROM tab2
----
-232
-2805
1155

onlyif mysql # use DIV operator for integer division
query I rowsort label-3420
SELECT + tab2.col1 DIV tab2.col0 AS col2 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-3420
SELECT + tab2.col1 / tab2.col0 AS col2 FROM tab2
----
0
0
4

query I rowsort
SELECT col0 - tab0.col2 AS col2 FROM tab0 WHERE NULL IN ( - col1 + col0 )
----

query I rowsort
SELECT ALL col1 + col2 + col1 AS col2 FROM tab0
----
195
205
264

onlyif mysql # use DIV operator for integer division
query I rowsort label-3423
SELECT tab1.col0 DIV + tab1.col2 + - col2 FROM tab1
----
-54
-56
-96

skipif mysql # not compatible
query I rowsort label-3423
SELECT tab1.col0 / + tab1.col2 + - col2 FROM tab1
----
-54
-56
-96

query I rowsort
SELECT ALL + tab2.col2 * col0 AS col2 FROM tab2
----
189
2028
3002

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT IN ( col2 / col1 + - tab0.col2 )
----

query I rowsort
SELECT - col0 * tab2.col1 + col2 + + col1 * - col2 FROM tab2
----
-1027
-1951
-6110

onlyif mysql # use DIV operator for integer division
query I rowsort label-3427
SELECT ALL - col2 DIV - col1 + col1 + - col1 * + tab1.col2 FROM tab1
----
-1228
-1376
-555

skipif mysql # not compatible
query I rowsort label-3427
SELECT ALL - col2 / - col1 + col1 + - col1 * + tab1.col2 FROM tab1
----
-1228
-1376
-555

query I rowsort
SELECT DISTINCT + tab1.col2 * col0 * - col1 AS col2 FROM tab1
----
-36480
-4212
-99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col1 * - col0 col1 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT col0 * - col1 * + tab0.col0 + col0 FROM tab0
----
-118790
-49512
-720722

query I rowsort
SELECT col2 - + tab2.col2 * col2 AS col0 FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT col2 * col0 * col2 AS col0 FROM tab2
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-3433
SELECT DISTINCT col2 + + col0 DIV + col2 + - col1 AS col0 FROM tab0
----
-53
-61
-8

skipif mysql # not compatible
query I rowsort label-3433
SELECT DISTINCT col2 + + col0 / + col2 + - col1 AS col0 FROM tab0
----
-53
-61
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-3434
SELECT col0 DIV col0 + col0 * col0 AS col1 FROM tab2
----
50
6085
6242

skipif mysql # not compatible
query I rowsort label-3434
SELECT col0 / col0 + col0 * col0 AS col1 FROM tab2
----
50
6085
6242

onlyif mysql # use DIV operator for integer division
query I rowsort label-3435
SELECT DISTINCT col0 DIV - tab1.col1 + col0 FROM tab1
----
3
58
74

skipif mysql # not compatible
query I rowsort label-3435
SELECT DISTINCT col0 / - tab1.col1 + col0 FROM tab1
----
3
58
74

query I rowsort
SELECT ALL + ( - 78 ) FROM tab2
----
-78
-78
-78

query I rowsort
SELECT + + col2 + cor0.col1 * + 90 AS col2 FROM tab2 AS cor0
----
1568
2817
5336

query I rowsort
SELECT - - col1 - + cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
-2752
-7371
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - 91 AS REAL ) col0 FROM tab2, tab0, tab2 AS cor0
----
-91

query I rowsort
SELECT DISTINCT + col1 * - 83 AS col2 FROM tab1
----
-1079
-2158
-830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3441
SELECT + CAST( ( col2 ) * col2 AS SIGNED ) AS col0 FROM tab0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-3441
SELECT + CAST ( ( col2 ) * col2 AS INTEGER ) AS col0 FROM tab0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - + col0 col2 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT - col0 * col2 + + col2 + - 4 * col0 AS col0 FROM tab1 AS cor0
----
-120
-3847
-7904

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3444
SELECT - + 12 - cor0.col0 * + CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3444
SELECT - + 12 - cor0.col0 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3445
SELECT DISTINCT + col1 + + cor0.col2 DIV col1 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3445
SELECT DISTINCT + col1 + + cor0.col2 / col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT - + 78 AS col2 FROM tab0 AS cor0
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 + col0 col1 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT col2 + col0 AS col1 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + col0 * cor0.col2 + 42 FROM tab1 AS cor0
----
204
3690
7722

onlyif mysql # use DIV operator for integer division
query I rowsort label-3450
SELECT ALL col0 DIV + 51 AS col2 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3450
SELECT ALL col0 / + 51 AS col2 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT - + col1 * - col2 + ( col0 + col0 ) * col2 * + col0 FROM tab1 AS cor0
----
1230048
2376
467514

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 * col2 col2 FROM tab0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3453
SELECT - CAST( NULL AS SIGNED ) * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3453
SELECT - CAST ( NULL AS INTEGER ) * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 9 * + col1 FROM tab2 AS cor0
----
-153
-279
-531

query I rowsort
SELECT DISTINCT + 91 FROM tab0, tab2 AS cor0
----
91

query I rowsort
SELECT DISTINCT + cor0.col2 * - col0 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT - 35 AS col2 FROM tab2 cor0
----
-35
-35
-35

query I rowsort
SELECT - + col1 * - col2 * col0 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT + 26 AS col0 FROM tab2, tab2 AS cor0
----
26

query I rowsort
SELECT col2 * col0 * + col2 AS col1 FROM tab0 AS cor0
----
26136
35
598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-3461
SELECT DISTINCT 11 DIV - col1 - col1 * col0 * col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

skipif mysql # not compatible
query I rowsort label-3461
SELECT DISTINCT 11 / - col1 - col1 * col0 * col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT + ( col0 ) * + col2 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT ALL ( 17 ) AS col2 FROM tab1
----
17
17
17

query I rowsort
SELECT DISTINCT - - 62 + col1 FROM tab0 cor0
----
148
153
159

query I rowsort
SELECT DISTINCT - col2 * + col2 - col0 * col0 AS col1 FROM tab2 AS cor0
----
-6760
-7685
-778

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 + - col2 + col1 col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + 66 AS col0 FROM tab1
----
66
66
66

query I rowsort
SELECT DISTINCT + 74 * 72 - + cor0.col2 AS col1 FROM tab0 AS cor0
----
5246
5295
5327

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col0 col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
24
35
89

query I rowsort
SELECT DISTINCT - ( - 1 ) FROM tab0 AS cor0
----
1

query I rowsort
SELECT + - ( col1 ) + + col2 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - 26 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 47d0574274146de273829785364ada39

query I rowsort
SELECT + col1 * 78 AS col0 FROM tab0 AS cor0
----
6708
7098
7566

query I rowsort
SELECT - cor0.col0 FROM tab2, tab0 AS cor0 WHERE NOT ( NULL ) <> NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3475
SELECT + 22 DIV - col2 + col0 AS col1 FROM tab0
----
13
24
89

skipif mysql # not compatible
query I rowsort label-3475
SELECT + 22 / - col2 + col0 AS col1 FROM tab0
----
13
24
89

query I rowsort
SELECT 16 FROM tab1, tab2 cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT ALL col2 + + col0 * col1 FROM tab2
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-3478
SELECT col0 + col2 DIV + tab1.col2 AS col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-3478
SELECT col0 + col2 / + tab1.col2 AS col0 FROM tab1
----
4
65
81

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE col2 NOT BETWEEN ( + col1 + - col1 * col0 * + col2 ) AND NULL
----

query I rowsort
SELECT - col0 * + col1 + - col0 AS col1 FROM tab1
----
-1120
-704
-81

query I rowsort
SELECT ALL + col2 + + col0 * - tab2.col2 AS col0 FROM tab2
----
-162
-2002
-2964

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE + col0 BETWEEN - col2 + + col1 - col2 AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3483
SELECT ALL col1 - + tab1.col0 DIV + col0 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-3483
SELECT ALL col1 - + tab1.col0 / + col0 FROM tab1
----
12
25
9

query I rowsort
SELECT DISTINCT col2 + - col1 * col0 * col0 AS col2 FROM tab2 WHERE NOT NULL NOT IN ( col1 - col2 * col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3485
SELECT + col2 + col0 DIV col1 AS col2 FROM tab2
----
27
27
42

skipif mysql # not compatible
query I rowsort label-3485
SELECT + col2 + col0 / col1 AS col2 FROM tab2
----
27
27
42

query I rowsort
SELECT col2 FROM tab0 WHERE NULL IN ( + col2 )
----

query I rowsort
SELECT ALL + col2 + col1 * cor0.col2 AS col0 FROM tab2 cor0 WHERE NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT col0 * - col1 * + col0 AS col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT cor0.col0 * cor0.col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col1 col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - col2 + col2 + - col1 FROM tab2
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3492
SELECT ALL - col1 + col2 DIV + col1 FROM tab2
----
-15
-31
-59

skipif mysql # not compatible
query I rowsort label-3492
SELECT ALL - col1 + col2 / + col1 FROM tab2
----
-15
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3493
SELECT DISTINCT col2 DIV col1 + col1 AS col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3493
SELECT DISTINCT col2 / col1 + col1 AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT col2 + tab1.col1 * + tab1.col2 + col2 FROM tab1
----
1440
1512
684

query I rowsort
SELECT DISTINCT + col2 * col2 * + col2 + + tab2.col2 + col1 AS col0 FROM tab2
----
17661
19741
54927

query I rowsort
SELECT col0 + + col2 - tab2.col2 FROM tab2
----
7
78
79

query I rowsort
SELECT + + col2 + + col1 * - col1 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT col1 * - col1 + - col1 AS col0 FROM tab1 cor0
----
-110
-182
-702

query I rowsort
SELECT ALL - col2 * col2 * col2 AS col0 FROM tab0 AS cor0
----
-1
-35937
-551368

onlyif mysql # use DIV operator for integer division
query I rowsort label-3500
SELECT DISTINCT - col0 + col1 DIV + col1 AS col1 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-3500
SELECT DISTINCT - col0 + col1 / + col1 AS col1 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT - + col0 * col1 * - col1 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT ALL + - col0 + + col2 * cor0.col1 AS col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL col0 + - cor0.col0 * col2 * - col2 AS col1 FROM tab0 AS cor0
----
26160
598525
70

query I rowsort
SELECT - cor0.col1 + col0 * - col1 FROM tab2 cor0
----
-1360
-248
-4661

query I rowsort
SELECT + col1 + + col1 * - cor0.col0 + cor0.col2 FROM tab1 AS cor0
----
-573
-931
2

query I rowsort
SELECT - - col2 * - cor0.col2 + col0 AS col2 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT DISTINCT - - col1 * col2 + col2 AS col0 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3508
SELECT - 46 + col1 * col1 - - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3508
SELECT - 46 + col1 * col1 - - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 34 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-34

query I rowsort
SELECT + 19 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3511
SELECT ALL - CAST( NULL AS SIGNED ) + - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3511
SELECT ALL - CAST ( NULL AS INTEGER ) + - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3512
SELECT - 80 + col1 + + cor0.col2 DIV col0 AS col1 FROM tab1 AS cor0
----
-36
-66
-70

skipif mysql # not compatible
query I rowsort label-3512
SELECT - 80 + col1 + + cor0.col2 / col0 AS col1 FROM tab1 AS cor0
----
-36
-66
-70

query I rowsort
SELECT DISTINCT + 1 * + col0 + + ( - cor0.col0 ) FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL + col1 * + col2 * + 77 + col1 AS col0 FROM tab0 AS cor0
----
218612
574665
7566

query I rowsort
SELECT DISTINCT - + 24 + col2 FROM tab0 AS cor0
----
-23
58
9

query I rowsort
SELECT DISTINCT - col2 + col2 * - 13 * + col2 FROM tab2 AS cor0
----
-18810
-8814
-9504

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 21 * - col1 + ( col1 ) col2 FROM tab0 AS cor0
----
-1720
-1820
-1940

query I rowsort
SELECT + 16 * col1 AS col2 FROM tab2 AS cor0
----
272
496
944

query I rowsort
SELECT ALL - 73 + col0 * col0 AS col0 FROM tab0 AS cor0
----
1152
503
7848

query I rowsort
SELECT DISTINCT + - col0 * 35 FROM tab1 AS cor0
----
-105
-2240
-2800

onlyif mysql # use DIV operator for integer division
query I rowsort label-3521
SELECT + col0 * col0 DIV 90 AS col0 FROM tab2 AS cor0
----
0
67
69

skipif mysql # not compatible
query I rowsort label-3521
SELECT + col0 * col0 / 90 AS col0 FROM tab2 AS cor0
----
0
67
69

query I rowsort
SELECT - + col2 * col0 + - col0 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT + 54 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + col0 + + 20 FROM tab1 AS cor0
----
100
23
84

query I rowsort
SELECT ALL + 57 * - 96 FROM tab2 AS cor0
----
-5472
-5472
-5472

query I rowsort
SELECT ALL - - 35 * - 1 AS col1 FROM tab0 AS cor0
----
-35
-35
-35

onlyif mysql # use DIV operator for integer division
query I rowsort label-3528
SELECT DISTINCT ( + col1 ) * col1 + cor0.col0 DIV + col2 AS col0 FROM tab0 AS cor0
----
7396
8282
9444

skipif mysql # not compatible
query I rowsort label-3528
SELECT DISTINCT ( + col1 ) * col1 + cor0.col0 / + col2 AS col0 FROM tab0 AS cor0
----
7396
8282
9444

query I rowsort
SELECT + - col2 * 4 FROM tab0 cor0
----
-132
-328
-4

query I rowsort
SELECT - col0 * 28 AS col0 FROM tab2 AS cor0
----
-196
-2184
-2212

query I rowsort
SELECT - cor0.col0 + cor0.col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ( + col2 ) * col1 + + 17 FROM tab1 AS cor0
----
1265
1421
587

query I rowsort
SELECT - + 11 + col2 AS col2 FROM tab0 AS cor0
----
-10
22
71

query I rowsort
SELECT DISTINCT 81 * 0 AS col2 FROM tab0
----
0

query I rowsort
SELECT + ( col1 ) * col0 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT 15 * - 0 FROM tab2
----
0
0
0

query I rowsort
SELECT - tab0.col0 * - 95 + col0 FROM tab0
----
2304
3360
8544

query I rowsort
SELECT ALL + 17 FROM tab0, tab2 cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT ALL 38 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT ALL col0 - cor0.col1 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + - 87 * + col2 + - col1 AS col1 FROM tab2 AS cor0
----
-2321
-2380
-3323

query I rowsort
SELECT ( - col1 ) * col1 + 48 FROM tab0
----
-7348
-8233
-9361

query I rowsort
SELECT + col2 - + ( + col1 ) AS col2 FROM tab0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + col2 + + tab2.col1 ) * + col0 * 11 col2 FROM tab2
----
-4466
-47795
-72930

query I rowsort
SELECT DISTINCT 37 AS col2 FROM tab2
----
37

query I rowsort
SELECT ALL - 21 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 631fbd1fd929405aba54a22c2a06c757

query I rowsort
SELECT - + col2 + col1 + - col2 AS col2 FROM tab1 AS cor0
----
-104
-179
-82

query I rowsort
SELECT + ( 83 ) + tab0.col1 FROM tab0
----
169
174
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3549
SELECT DISTINCT col0 * + tab1.col2 DIV - col2 col0 FROM tab1
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3549
SELECT DISTINCT col0 * + tab1.col2 / - col2 col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col2 * + col2 * - 11 + + col1 + - col2 * - col0 AS col1 FROM tab1 AS cor0
----
-31888
-32081
-93683

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3551
SELECT DISTINCT 38 * + col1 - CAST( NULL AS SIGNED ) * col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3551
SELECT DISTINCT 38 * + col1 - CAST ( NULL AS INTEGER ) * col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - - 24 AS col2 FROM tab0 AS cor0
----
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 * - col1 + - col2 * 35 col2 FROM tab1
----
-1214
-1895
-3191

query I rowsort
SELECT - col2 * col0 * - ( 89 ) FROM tab1 AS cor0
----
14418
324672
683520

query I rowsort
SELECT DISTINCT + col1 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + 8 + col2 AS col0 FROM tab2 AS cor0
----
34
35
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col0 * + ( - 19 ) col1 FROM tab0 AS cor0
----
-10944
-150499
-23275

query I rowsort
SELECT ALL col2 + col0 * cor0.col1 AS col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT - 9 * cor0.col0 FROM tab2 AS cor0
----
-63
-702
-711

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 36 + col0 * + col0 col1 FROM tab2 AS cor0
----
6120
6277
85

query I rowsort
SELECT DISTINCT - 38 + col0 * 29 * col0 FROM tab0 AS cor0
----
16666
229671
35487

query I rowsort
SELECT + col2 + col0 * - cor0.col0 AS col0 FROM tab1 AS cor0
----
-4039
-6304
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 84 col0 FROM tab0 AS cor0
----
-84
-84
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-3564
SELECT DISTINCT 4 DIV cor0.col0 AS col0 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-3564
SELECT DISTINCT 4 / cor0.col0 AS col0 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT + col2 * + 14 * col0 AS col2 FROM tab2 AS cor0
----
2646
28392
42028

query I rowsort
SELECT + + col1 + col1 + col0 FROM tab0 AS cor0
----
196
229
271

query I rowsort
SELECT ALL + col1 + - 4 AS col2 FROM tab1
----
22
6
9

query I rowsort
SELECT tab2.col2 - + 94 FROM tab2
----
-56
-67
-68

query I rowsort
SELECT DISTINCT - cor0.col1 * 68 + + col0 FROM tab0 AS cor0
----
-5824
-6099
-6561

onlyif mysql # use DIV operator for integer division
query I rowsort label-3570
SELECT - col2 DIV - col0 + - col0 FROM tab0 AS cor0
----
-23
-35
-89

skipif mysql # not compatible
query I rowsort label-3570
SELECT - col2 / - col0 + - col0 FROM tab0 AS cor0
----
-23
-35
-89

query I rowsort
SELECT DISTINCT + + col2 * - col1 + - col2 * + col2 FROM tab2 AS cor0
----
-1566
-2090
-2210

query I rowsort
SELECT - - col0 + cor0.col1 * + col2 AS col2 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-3573
SELECT ALL + + ( col0 ) DIV col1 AS col2 FROM tab2 cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-3573
SELECT ALL + + ( col0 ) / col1 AS col2 FROM tab2 cor0
----
0
1
4

query I rowsort
SELECT + 35 * col1 FROM tab0 cor0
----
3010
3185
3395

query I rowsort
SELECT - col2 + + 71 FROM tab0 AS cor0
----
-11
38
70

query I rowsort
SELECT ALL - col2 + - 8 + col1 FROM tab0 AS cor0
----
1
45
88

query I rowsort
SELECT ALL + - 6 + col1 * col2 + col0 FROM tab1 cor0
----
1322
1401
628

query I rowsort
SELECT + 4 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT + 76 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 7b2b08dd3f1adef028d3f40ef7c716da

query I rowsort
SELECT ( + ( - col2 ) ) + 58 FROM tab2 AS cor0
----
20
31
32

query I rowsort
SELECT DISTINCT - col1 * col1 * cor0.col0 FROM tab1 AS cor0
----
-13520
-2028
-6400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3582
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * 44 + + col0 + cor0.col0 * + col1 * + col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3582
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * 44 + + col0 + cor0.col0 * + col1 * + col1 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 19 + + col2 + + col2 * col1 col0 FROM tab2 AS cor0
----
1541
665
845

query I rowsort
SELECT ALL col1 + + 78 * cor0.col2 FROM tab2 cor0
----
2087
2137
2981

query I rowsort
SELECT ALL - 91 AS col2 FROM tab2 AS cor0
----
-91
-91
-91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3586
SELECT DISTINCT - - CAST( + col0 AS SIGNED ) FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3586
SELECT DISTINCT - - CAST ( + col0 AS INTEGER ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - 66 * - col0 + col2 * col1 FROM tab0 AS cor0
----
13336
2407
4422

query I rowsort
SELECT + 57 * + col2 + - tab0.col2 AS col1 FROM tab0
----
1848
4592
56

query I rowsort
SELECT ALL + col2 * col2 * - cor0.col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col1 ) * col1 + - 91 col2 FROM tab0 AS cor0
----
-7487
-8372
-9500

query I rowsort
SELECT ALL + col0 + col0 - + col2 AS col0 FROM tab1 AS cor0
----
-48
64
71

query I rowsort
SELECT ( 16 ) AS col2 FROM tab2 AS cor0
----
16
16
16

query I rowsort
SELECT ALL - - cor0.col2 + + col2 + - col2 AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - ( - col0 ) * col0 + - col1 FROM tab1 cor0
----
-17
4086
6387

query I rowsort
SELECT ALL 33 + col1 + - col2 AS col0 FROM tab0 AS cor0
----
129
42
86

query I rowsort
SELECT ALL ( - col2 ) - col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT - ( 12 ) * col1 FROM tab2 AS cor0
----
-204
-372
-708

query I rowsort
SELECT ALL 89 + col2 FROM tab2 AS cor0
----
115
116
127

query I rowsort
SELECT ALL + tab0.col2 + cor1.col1 + 81 FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
81 values hashing to f1f23ae34c3e83623747ba52cf43f50b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col0 + 46 col0 FROM tab2 AS cor0
----
-1297
-171
-4556

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0, tab2, tab2 cor1
----
972 values hashing to a698694a7dac245e42212ff0316bdf45

query I rowsort
SELECT DISTINCT col0 + - 30 * - col0 * + col2 AS col1 FROM tab0 AS cor0
----
1085
219029
23784

query I rowsort
SELECT + col2 + 83 AS col0 FROM tab2 AS cor0
----
109
110
121

query I rowsort
SELECT ALL - col0 + ( col1 ) * + cor0.col0 FROM tab1 AS cor0
----
576
75
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col1 * ( + col1 ) + - cor0.col0 * - cor0.col0 col2 FROM tab1 AS cor0
----
4186
6556
659

query I rowsort
SELECT DISTINCT cor0.col2 * col2 * - 65 AS col2 FROM tab2 AS cor0
----
-43940
-47385
-93860

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 22 col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
22

query I rowsort
SELECT ALL - tab1.col2 + - col0 AS col0 FROM tab1
----
-121
-176
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * 61 col1 FROM tab1 cor0
----
-183
-3904
-4880

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab0 cor1, tab1, tab2 AS cor2
----
3645 values hashing to 47906197307eee6829150d762058792a

query I rowsort
SELECT DISTINCT - - col1 * + 70 FROM tab1 AS cor0
----
1820
700
910

query I rowsort
SELECT + col2 + + 39 + + col2 FROM tab1
----
147
153
231

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * tab1.col1 col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT ( - 34 ) + col2 FROM tab0
----
-1
-33
48

query I rowsort
SELECT ALL 62 + col0 AS col0 FROM tab2
----
140
141
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-3616
SELECT ALL - 19 DIV col0 + + col2 FROM tab2
----
25
26
38

skipif mysql # not compatible
query I rowsort label-3616
SELECT ALL - 19 / col0 + + col2 FROM tab2
----
25
26
38

query I rowsort
SELECT ALL 31 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c3c6f92f0ca72d71793339f88a57e336

query I rowsort
SELECT DISTINCT + + cor0.col2 * - col2 AS col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3619
SELECT - tab0.col0 + CAST( + col1 AS SIGNED ) AS col0 FROM tab0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-3619
SELECT - tab0.col0 + CAST ( + col1 AS INTEGER ) AS col0 FROM tab0
----
2
62
62

query I rowsort
SELECT DISTINCT col0 + + 20 AS col0 FROM tab2
----
27
98
99

query I rowsort
SELECT DISTINCT + col1 * - 44 * col1 FROM tab2
----
-12716
-153164
-42284

query I rowsort
SELECT - col2 * 47 FROM tab1 AS cor0
----
-2538
-2679
-4512

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3623
SELECT tab2.col1 / CAST( - col0 AS SIGNED ) - tab2.col1 * - CAST( NULL AS SIGNED ) col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3623
SELECT tab2.col1 / CAST ( - col0 AS INTEGER ) - tab2.col1 * - CAST ( NULL AS INTEGER ) col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 + + 31 FROM tab0
----
117
122
128

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * + col0 col0 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3626
SELECT DISTINCT - col2 DIV + col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-3626
SELECT DISTINCT - col2 / + col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT - col2 * + 40 + + 7 AS col0 FROM tab0 AS cor0
----
-1313
-3273
-33

onlyif mysql # use DIV operator for integer division
query I rowsort label-3628
SELECT col0 DIV 70 + col0 + col0 FROM tab0
----
179
48
70

skipif mysql # not compatible
query I rowsort label-3628
SELECT col0 / 70 + col0 + col0 FROM tab0
----
179
48
70

query I rowsort
SELECT - 80 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 26dbcc98d4b4e864ffa31be685a5dfbd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + 47 - + col1 col2 FROM tab0 AS cor0
----
1042
1548
4092

query I rowsort
SELECT DISTINCT + + 93 FROM tab0 AS cor0
----
93

query I rowsort
SELECT + 32 AS col0 FROM tab1, tab2 cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT DISTINCT - cor0.col1 + + col1 * col1 AS col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT - ( + col2 ) * cor0.col0 * - col2 AS col1 FROM tab0 cor0
----
26136
35
598436

query I rowsort
SELECT - 82 + + cor0.col2 + cor0.col0 AS col0 FROM tab2 AS cor0
----
-48
22
35

query I rowsort
SELECT + 20 * - 64 FROM tab2 AS cor0
----
-1280
-1280
-1280

query I rowsort
SELECT + col2 + col1 * + col0 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - 58 AS col0 FROM tab2 cor0
----
-58

query I rowsort
SELECT - - 60 * 0 AS col0 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3640
SELECT DISTINCT + 12 DIV col2 AS col2 FROM tab0 AS cor0
----
0
12

skipif mysql # not compatible
query I rowsort label-3640
SELECT DISTINCT + 12 / col2 AS col2 FROM tab0 AS cor0
----
0
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + + col1 + - col1 * 21 col1 FROM tab2 AS cor0
----
-1206
-378
-647

query I rowsort
SELECT ALL - 12 * - col2 AS col0 FROM tab0 AS cor0
----
12
396
984

query I rowsort
SELECT - col2 + - 42 AS col2 FROM tab0 AS cor0
----
-124
-43
-75

query I rowsort
SELECT ALL 57 * + 17 AS col0 FROM tab0
----
969
969
969

query I rowsort
SELECT + col0 + 7 FROM tab2 AS cor0
----
14
85
86

query I rowsort
SELECT col1 * col2 * - tab0.col2 FROM tab0
----
-611884
-93654
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT 46 * cor0.col0 FROM tab0 AS cor0
----
1104
1610
4094

query I rowsort
SELECT ALL ( 53 + col2 ) FROM tab2
----
79
80
91

query I rowsort
SELECT + ( + col1 + col2 * col1 ) FROM tab0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-3651
SELECT + 7 + + cor0.col0 DIV - cor0.col1 + col2 FROM tab2 AS cor0
----
32
34
41

skipif mysql # not compatible
query I rowsort label-3651
SELECT + 7 + + cor0.col0 / - cor0.col1 + col2 FROM tab2 AS cor0
----
32
34
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-3652
SELECT - ( col2 ) DIV - col1 AS col2 FROM tab1 cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-3652
SELECT - ( col2 ) / - col1 AS col2 FROM tab1 cor0
----
2
5
7

query I rowsort
SELECT DISTINCT 72 * + col2 AS col2 FROM tab2 cor0
----
1872
1944
2736

onlyif mysql # use DIV operator for integer division
query I rowsort label-3654
SELECT - + cor0.col2 + cor0.col0 DIV col2 FROM tab1 AS cor0
----
-54
-56
-96

skipif mysql # not compatible
query I rowsort label-3654
SELECT - + cor0.col2 + cor0.col0 / col2 FROM tab1 AS cor0
----
-54
-56
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3655
SELECT + col2 + - CAST( + col1 AS SIGNED ) * - col1 FROM tab2 AS cor0
----
327
3507
988

skipif mysql # not compatible
query I rowsort label-3655
SELECT + col2 + - CAST ( + col1 AS INTEGER ) * - col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT + - col1 + - 20 AS col0 FROM tab1 AS cor0
----
-30
-33
-46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + ( 94 ) col0 FROM tab2 AS cor0
----
101
172
173

query I rowsort
SELECT ALL + + col0 * - cor0.col2 - cor0.col2 * col2 * col2 AS col1 FROM tab2 AS cor0
----
-19604
-19872
-57874

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + - 56 * ( + col2 ) + 96 col1 FROM tab2 AS cor0
----
-1334
-1389
-1994

query I rowsort
SELECT + col1 - cor0.col1 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col1 * - col2 + ( col2 ) AS col2 FROM tab1
----
-1152
-1350
-513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + col0 - + 64 col1 FROM tab2 AS cor0
----
-1407
-281
-4666

query I rowsort
SELECT 5 + ( col2 ) + col1 * col1 AS col0 FROM tab0 AS cor0
----
7434
8368
9415

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 ) * - cor0.col0 + ( - col2 ) col2 FROM tab0 cor0
----
-2097
-3396
-8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + ( col2 ) + + 55 col1 FROM tab2 AS cor0
----
159
172
89

query I rowsort
SELECT DISTINCT 70 AS col2 FROM tab2, tab1 AS cor0
----
70

query I rowsort
SELECT ALL - col1 * 63 AS col1 FROM tab1 AS cor0
----
-1638
-630
-819

query I rowsort
SELECT + - col1 * - col0 + + col2 FROM tab0 cor0
----
2097
3396
8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3669
SELECT DISTINCT + + col1 * CAST( - col1 * + col0 AS SIGNED ) FROM tab1 AS cor0
----
-13520
-2028
-6400

skipif mysql # not compatible
query I rowsort label-3669
SELECT DISTINCT + + col1 * CAST ( - col1 * + col0 AS INTEGER ) FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT ALL - col1 + 87 AS col1 FROM tab1 AS cor0
----
61
74
77

query I rowsort
SELECT col0 * + col1 + col1 * - tab0.col1 AS col2 FROM tab0
----
-182
-5332
-6014

query I rowsort
SELECT DISTINCT col0 * + col0 + + col2 FROM tab2
----
6110
6279
76

query I rowsort
SELECT + 93 - col2 FROM tab0
----
11
60
92

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 cor2, tab1 AS cor3
----
3645 values hashing to b8435223668db186a5012e4112253f28

query I rowsort
SELECT DISTINCT col1 * 90 AS col0 FROM tab2 AS cor0
----
1530
2790
5310

query I rowsort
SELECT - col0 * ( + col1 ) AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + + cor0.col1 * - ( col0 ) FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3678
SELECT - col2 * 26 DIV col1 AS col0 FROM tab2
----
-11
-22
-58

skipif mysql # not compatible
query I rowsort label-3678
SELECT - col2 * 26 / col1 AS col0 FROM tab2
----
-11
-22
-58

query I rowsort
SELECT ALL cor0.col2 + - tab0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 7496b8a48c0f7a3c9ef4a8d8a4843fb8

query I rowsort
SELECT + cor0.col2 + + 38 + + col2 * col0 AS col0 FROM tab2 AS cor0
----
2092
254
3078

query I rowsort
SELECT - 98 + col0 FROM tab0 cor0
----
-63
-74
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3682
SELECT DISTINCT + col1 DIV + col0 - col0 * 10 FROM tab1
----
-22
-640
-800

skipif mysql # not compatible
query I rowsort label-3682
SELECT DISTINCT + col1 / + col0 - col0 * 10 FROM tab1
----
-22
-640
-800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col0 * - col0 * + 45 col2 FROM tab0 AS cor0
----
-25896
-356356
-55090

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col2 + + col0 col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + - col1 * - col0 + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - col2 * - col0 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-3687
SELECT cor0.col1 + col1 * 33 DIV col2 FROM tab0 AS cor0
----
127
172
3298

skipif mysql # not compatible
query I rowsort label-3687
SELECT cor0.col1 + col1 * 33 / col2 FROM tab0 AS cor0
----
127
172
3298

query I rowsort
SELECT + col1 + - col0 - col1 AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + - 19 AS col1 FROM tab1 AS cor0
----
-19
-19
-19

onlyif mysql # use DIV operator for integer division
query I rowsort label-3690
SELECT col0 * + col0 DIV - ( ( cor0.col0 ) ) FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-3690
SELECT col0 * + col0 / - ( ( cor0.col0 ) ) FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + col2 * - col2 + - col0 AS col0 FROM tab2 AS cor0
----
-1523
-736
-754

query I rowsort
SELECT DISTINCT 61 + col2 * - col2 FROM tab2 AS cor0
----
-1383
-615
-668

query I rowsort
SELECT DISTINCT - col2 + + col2 * + col0 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 * - 55 FROM tab1 AS cor0
----
37180
5500
9295

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3695
SELECT ALL 80 + - col0 * - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3695
SELECT ALL 80 + - col0 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 31 + - cor0.col2 FROM tab2 cor0
----
-7
4
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3697
SELECT DISTINCT + col1 * col0 + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3697
SELECT DISTINCT + col1 * col0 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - col0 * + col1 + - ( col2 ) * - col1 * col2 FROM tab0 AS cor0
----
-3298
603785
91590

query I rowsort
SELECT ALL - + col1 * - col2 AS col0 FROM tab2 cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3700
SELECT 19 DIV - col1 - 83 AS col0 FROM tab1 AS cor0
----
-83
-84
-84

skipif mysql # not compatible
query I rowsort label-3700
SELECT 19 / - col1 - 83 AS col0 FROM tab1 AS cor0
----
-83
-84
-84

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) * cor0.col1 + col0 AS col2 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL + 72 + col2 FROM tab1 AS cor0
----
126
129
168

query I rowsort
SELECT ALL 50 * - col1 FROM tab0 AS cor0
----
-4300
-4550
-4850

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab0 AS cor1, tab0, tab1 cor2
----
3645 values hashing to ea1a922b7fccb9d184b31eb4689e063b

query I rowsort
SELECT DISTINCT col1 + - ( col0 ) FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT + col1 * + 66 AS col0 FROM tab1 AS cor0
----
1716
660
858

query I rowsort
SELECT ALL - col2 + cor0.col2 + - col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort
SELECT + col2 + + CAST ( + col1 AS REAL ) * col2 AS col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL + col0 + col1 * ( - col0 * col0 ) FROM tab2
----
-106018
-1512
-358878

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3710
SELECT col0 + col0 + + CAST( - col2 AS SIGNED ) FROM tab2
----
-13
120
130

skipif mysql # not compatible
query I rowsort label-3710
SELECT col0 + col0 + + CAST ( - col2 AS INTEGER ) FROM tab2
----
-13
120
130

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3711
SELECT ALL + + CAST( NULL AS DECIMAL ) / + col2 + col2 * - col2 * col2 + - col0 * - 83 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3711
SELECT ALL + + CAST ( NULL AS REAL ) / + col2 + col2 * - col2 * col2 + - col0 * - 83 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * col0 + + col1 - col2 * col1 AS col2 FROM tab0 cor0
----
-688
3395
728

query I rowsort
SELECT + col2 * + 49 AS col0 FROM tab1 AS cor0
----
2646
2793
4704

query I rowsort
SELECT DISTINCT + col0 - + 57 FROM tab1 AS cor0
----
-54
23
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3715
SELECT ALL - - ( + 96 ) - cor0.col0 * CAST( cor0.col1 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-121
-1247
-4506

skipif mysql # not compatible
query I rowsort label-3715
SELECT ALL - - ( + 96 ) - cor0.col0 * CAST ( cor0.col1 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-121
-1247
-4506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 95 col2 FROM tab2
----
-95
-95
-95

query I rowsort
SELECT ALL - cor0.col1 - col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT - - 46 * col1 FROM tab1 AS cor0
----
1196
460
598

onlyif mysql # use DIV operator for integer division
query I rowsort label-3719
SELECT ALL cor0.col1 + col0 DIV cor0.col0 FROM tab1 cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-3719
SELECT ALL cor0.col1 + col0 / cor0.col0 FROM tab1 cor0
----
11
14
27

query I rowsort
SELECT + 7 AS col1 FROM tab2
----
7
7
7

query I rowsort
SELECT DISTINCT + ( col1 ) - col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3722
SELECT col0 - - 42 DIV col0 FROM tab2
----
13
78
79

skipif mysql # not compatible
query I rowsort label-3722
SELECT col0 - - 42 / col0 FROM tab2
----
13
78
79

query I rowsort
SELECT ALL ( - col1 * + col2 + - 86 ) FROM tab1
----
-1334
-1490
-656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col0 * col1 col0 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT ALL - tab1.col1 * - tab1.col0 + + col1 FROM tab1
----
104
1053
650

query I rowsort
SELECT col1 + - col0 AS col2 FROM tab2 WHERE NULL >= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col2 * - col2 col0 FROM tab2
----
-1427
-617
-698

query III rowsort
SELECT * FROM tab2 WHERE NOT col1 * col1 + + col2 + - col2 * col1 NOT IN ( + col2 * col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col1 FROM tab2 WHERE NOT ( NULL ) BETWEEN NULL AND col0
----

query I rowsort
SELECT DISTINCT + col2 * - tab1.col2 + - col2 * col0 FROM tab1
----
-16896
-3078
-6897

query I rowsort
SELECT + col2 * col1 * + tab1.col0 + col1 * - col0 FROM tab1
----
35840
4134
98800

query I rowsort
SELECT ALL col2 + - col1 * col1 FROM tab2
----
-251
-3455
-934

query I rowsort
SELECT - col1 + - col2 * col2 AS col2 FROM tab0
----
-1175
-6815
-98

query I rowsort
SELECT ALL + col2 * col2 - - col1 AS col0 FROM tab2
----
1461
735
760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + tab1.col2 * - col1 col2 FROM tab1 WHERE NOT ( + col0 + col2 ) >= NULL
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col0 + col2 NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL IN ( + col1 * col2 + + col1 + col1 )
----

query I rowsort
SELECT DISTINCT tab2.col0 * + col1 * - col1 - tab2.col2 * + col2 FROM tab2
----
-24275
-272194
-7456

onlyif mysql # use DIV operator for integer division
query I rowsort label-3739
SELECT tab0.col0 DIV tab0.col0 col0 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3739
SELECT tab0.col0 / tab0.col0 col0 FROM tab0
----
1
1
1

query I rowsort
SELECT - col1 * col2 * - col0 AS col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT - col1 - + col2 AS col1 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT ALL + col1 * col0 + - col1 * - col1 AS col0 FROM tab1
----
1209
740
754

query I rowsort
SELECT ALL + col1 + - tab0.col0 AS col2 FROM tab0 WHERE NOT col0 NOT IN ( col2 + + col1 + col0 )
----

query I rowsort
SELECT DISTINCT col1 + col2 * col2 * col2 FROM tab0
----
36023
551459
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3745
SELECT DISTINCT col1 + cor0.col2 DIV col1 FROM tab1 AS cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-3745
SELECT DISTINCT col1 + cor0.col2 / col1 FROM tab1 AS cor0
----
15
20
28

query I rowsort
SELECT - col2 + col2 * + col1 + - tab2.col2 AS col1 FROM tab2
----
1482
570
783

query I rowsort
SELECT ALL + col0 + - col1 AS col1 FROM tab1
----
-23
54
67

query III rowsort
SELECT * FROM tab1 cor0 WHERE ( NULL ) NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT DISTINCT col1 * col1 + - col0 AS col1 FROM tab1
----
36
673
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col2 * - col0 col2 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT tab2.col1 * col2 + + col1 + col0 FROM tab2
----
1671
742
875

query I rowsort
SELECT col1 FROM tab1 WHERE ( NULL ) = NULL
----

query I rowsort
SELECT ALL - col2 * col0 + - col0 AS col2 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT - tab0.col0 FROM tab0 WHERE NOT ( NULL ) NOT IN ( - col1 )
----

query I rowsort
SELECT DISTINCT col2 * col0 * - col1 + - col1 AS col0 FROM tab1
----
-36490
-4238
-99853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col1 + - col1 col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT ALL + col1 * - tab2.col1 AS col0 FROM tab2
----
-289
-3481
-961

query III rowsort
SELECT * FROM tab2 WHERE NOT ( NULL ) NOT IN ( tab2.col1 / - col2 )
----

query I rowsort
SELECT - tab2.col1 * - col2 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL + col1 * col1 - col0 FROM tab1
----
36
673
89

query I rowsort
SELECT - col1 * col2 / col0 AS col1 FROM tab1 cor0 WHERE + cor0.col0 * col2 + - cor0.col1 + col2 < col2 / - cor0.col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3762
SELECT DISTINCT col0 + col2 + cor0.col1 DIV + col1 AS col1 FROM tab1 cor0
----
122
177
58

skipif mysql # not compatible
query I rowsort label-3762
SELECT DISTINCT col0 + col2 + cor0.col1 / + col1 AS col1 FROM tab1 cor0
----
122
177
58

query III rowsort
SELECT ALL * FROM tab0 WHERE - col2 NOT IN ( col2 + col1 * - col0 + col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL ( - 34 ) * + col0 AS col1 FROM tab1 AS cor0
----
-102
-2176
-2720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3765
SELECT DISTINCT + + CAST( NULL AS SIGNED ) + - 16 * col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3765
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) + - 16 * col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + cor0.col2 + 53 * col0 AS col2 FROM tab2 AS cor0
----
398
4160
4225

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3767
SELECT - - CAST( NULL AS SIGNED ) * + ( + col2 ) + + ( 59 ) * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3767
SELECT - - CAST ( NULL AS INTEGER ) * + ( + col2 ) + + ( 59 ) * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 94 + + col2 * col1 FROM tab2 AS cor0
----
1440
552
743

onlyif mysql # use DIV operator for integer division
query I rowsort label-3769
SELECT col2 DIV + 22 FROM tab0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-3769
SELECT col2 / + 22 FROM tab0
----
0
1
3

query I rowsort
SELECT + cor0.col2 * - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 99e52647357b835698a6730896ff820d

query I rowsort
SELECT tab1.col0 - - 54 * col1 FROM tab1
----
1407
604
782

query I rowsort
SELECT ALL + 77 * col0 * col1 AS col1 FROM tab1
----
49280
6006
80080

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3773
SELECT cor1.col2 + + CAST( cor0.col1 AS SIGNED ) FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 4adc79da53b2973c695f7891ad1fab50

skipif mysql # not compatible
query I rowsort label-3773
SELECT cor1.col2 + + CAST ( cor0.col1 AS INTEGER ) FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 4adc79da53b2973c695f7891ad1fab50

query I rowsort
SELECT - cor0.col1 + 84 FROM tab0 AS cor0
----
-13
-2
-7

query I rowsort
SELECT - + 30 * + col1 + + col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-702
340
650

query I rowsort
SELECT cor0.col0 * cor0.col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 41d4c126bfd4bfab59ba5e83427c98e0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3777
SELECT ALL + ( + col1 ) DIV col1 AS col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3777
SELECT ALL + ( + col1 ) / col1 AS col0 FROM tab2
----
1
1
1

query I rowsort
SELECT + cor0.col0 + + col0 * 86 AS col1 FROM tab1 AS cor0
----
261
5568
6960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 66 col1 FROM tab1
----
66
66
66

query I rowsort
SELECT + - col1 * col1 + ( col0 ) + col0 * + col0 FROM tab1 AS cor0
----
-664
4060
6311

query I rowsort
SELECT - col2 * - col2 - - col0 FROM tab1 cor0
----
2919
3313
9296

query I rowsort
SELECT - col2 + 39 FROM tab1 AS cor0
----
-15
-18
-57

query I rowsort
SELECT + + col2 * - col0 + + col1 AS col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT + col0 * 53 + + col2 * - col2 FROM tab1 AS cor0
----
-2757
-4976
143

query I rowsort
SELECT ALL - + 48 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 2558735eaa258a08592aef9d33020c18

onlyif mysql # use DIV operator for integer division
query I rowsort label-3786
SELECT col1 * col1 + - col1 * cor0.col2 DIV ( cor0.col2 * + cor0.col2 + - col0 * col0 ) AS col0 FROM tab1 AS cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort label-3786
SELECT col1 * col1 + - col1 * cor0.col2 / ( cor0.col2 * + cor0.col2 + - col0 * col0 ) AS col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL + + ( col1 ) * col1 + col2 FROM tab0 cor0
----
7429
8363
9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-3788
SELECT col2 DIV + cor0.col1 AS col0 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-3788
SELECT col2 / + cor0.col1 AS col0 FROM tab1 AS cor0
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3789
SELECT + - cor0.col0 * 14 + - col1 * col0 + col2 DIV - col1 AS col0 FROM tab0 cor0
----
-2400
-3885
-9345

skipif mysql # not compatible
query I rowsort label-3789
SELECT + - cor0.col0 * 14 + - col1 * col0 + col2 / - col1 AS col0 FROM tab0 cor0
----
-2400
-3885
-9345

query I rowsort
SELECT DISTINCT col2 * + col1 + col1 AS col0 FROM tab2
----
1593
663
868

query I rowsort
SELECT - col0 * + 95 - - col1 FROM tab1 cor0
----
-259
-6070
-7587

query I rowsort
SELECT + ( - 17 ) FROM tab0 AS cor0
----
-17
-17
-17

query I rowsort
SELECT - + 3 * col0 + - col2 FROM tab0 AS cor0
----
-105
-106
-349

query I rowsort
SELECT ALL - 32 + + cor0.col0 * col0 FROM tab1 AS cor0
----
-23
4064
6368

query I rowsort
SELECT DISTINCT + col0 * cor0.col2 + - col2 AS col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT col0 + + 81 * + col0 FROM tab0
----
1968
2870
7298

query I rowsort
SELECT DISTINCT 4 + + col1 * - col1 * col1 FROM tab0 AS cor0
----
-636052
-753567
-912669

query I rowsort
SELECT - 96 AS col0 FROM tab1 cor0
----
-96
-96
-96

query I rowsort
SELECT - - col2 + - col1 * - col1 AS col0 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT ALL - + col2 * col1 + col1 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 * - col0 col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-3802
SELECT ALL col2 + col0 * col1 DIV col0 + + cor0.col0 FROM tab0 AS cor0
----
133
143
262

skipif mysql # not compatible
query I rowsort label-3802
SELECT ALL col2 + col0 * col1 / col0 + + cor0.col0 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT + col2 * + 16 + - col0 * - col1 + col1 FROM tab0
----
2678
3508
9502

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - tab0.col0 * col2 col2 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT ALL 94 * + col0 + col2 * col1 + tab0.col1 * col1 FROM tab0
----
12490
12796
24109

query I rowsort
SELECT DISTINCT - ( col1 ) * col1 + - tab2.col0 + + tab2.col2 FROM tab2
----
-330
-3533
-941

query I rowsort
SELECT ( - col1 ) + - col2 * col0 + - col1 FROM tab2
----
-2146
-251
-3036

query I rowsort
SELECT ALL - col1 * - 93 * col1 + col2 AS col1 FROM tab2 AS cor0
----
26915
323759
89400

query I rowsort
SELECT DISTINCT + + col1 + col0 AS col2 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT + - cor0.col1 * 93 FROM tab2 AS cor0
----
-1581
-2883
-5487

query I rowsort
SELECT ALL col0 - ( col1 ) FROM tab0 AS cor0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + ( + 98 ) col0 FROM tab0 AS cor0
----
-3234
-8036
-98

query I rowsort
SELECT cor0.col1 * 78 FROM tab2 AS cor0
----
1326
2418
4602

query I rowsort
SELECT col1 * col2 - - col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT - col0 - 57 AS col1 FROM tab2
----
-135
-136
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 42 + + tab2.col1 + col2 col1 FROM tab2
----
3361
3373
352

query I rowsort
SELECT + col0 + col1 - ( - col0 ) * + col0 FROM tab2
----
6221
6337
87

query I rowsort
SELECT ALL + col0 * - ( + 9 ) - - col1 FROM tab2 AS cor0
----
-32
-643
-694

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
-7
-78
-79

query I rowsort
SELECT + tab2.col2 * + col2 + tab2.col0 FROM tab2
----
1523
736
754

query I rowsort
SELECT - col0 + col2 * cor0.col2 AS col2 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT ALL - - col0 - col2 AS col2 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-3823
SELECT ALL + col2 + col0 DIV + col1 + tab1.col1 FROM tab1
----
115
73
80

skipif mysql # not compatible
query I rowsort label-3823
SELECT ALL + col2 + col0 / + col1 + tab1.col1 FROM tab1
----
115
73
80

query I rowsort
SELECT ALL + + col2 * col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - - col1 * + col2 * + cor0.col1 FROM tab0 cor0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-3826
SELECT ALL - + col0 DIV - col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3826
SELECT ALL - + col0 / - col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT + col1 * col2 NOT IN ( cor0.col1 * - col1 / + cor0.col0 ) OR NOT NULL NOT IN ( col2 )
----

query I rowsort
SELECT ALL - col2 + - col2 * col1 * col0 AS col0 FROM tab1 cor0
----
-36537
-4266
-99936

query I rowsort
SELECT ALL - + col0 - col2 AS col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT - - col2 * col1 * + col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT ALL col0 + - col1 * - col1 * + col1 FROM tab1 cor0
----
1064
17579
2277

query I rowsort
SELECT DISTINCT + col2 * + col1 - col2 * + col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + col0 * col0 + col0 + cor0.col1 FROM tab1 AS cor0
----
38
4170
6493

query I rowsort
SELECT DISTINCT + - 6 + - col2 AS col2 FROM tab0 AS cor0
----
-39
-7
-88

query I rowsort
SELECT ALL - cor0.col2 + + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 col2 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT col2 * + col1 + + cor0.col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT - + 16 * + col2 AS col2 FROM tab0 AS cor0
----
-1312
-16
-528

query I rowsort
SELECT ALL 62 * + cor0.col1 FROM tab1 cor0
----
1612
620
806

query I rowsort
SELECT DISTINCT + 61 + - col0 AS col2 FROM tab0 AS cor0
----
-28
26
37

query I rowsort
SELECT - 47 + + col2 AS col1 FROM tab1 AS cor0
----
10
49
7

query I rowsort
SELECT ALL - 22 + cor0.col0 * + col1 FROM tab0 AS cor0
----
2042
3373
8077

onlyif mysql # use DIV operator for integer division
query I rowsort label-3844
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-3844
SELECT col1 / - cor0.col2 col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3845
SELECT ALL + col1 * col0 - + col0 DIV + col1 FROM tab2 AS cor0
----
1339
217
4601

skipif mysql # not compatible
query I rowsort label-3845
SELECT ALL + col1 * col0 - + col0 / + col1 FROM tab2 AS cor0
----
1339
217
4601

query I rowsort
SELECT DISTINCT + - col2 * - col2 + + col0 AS col0 FROM tab1 AS cor0
----
2919
3313
9296

query IIIIII rowsort
SELECT * FROM tab0, tab0 cor0 WHERE NOT ( NULL ) >= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3848
SELECT ALL + col2 + col0 DIV tab0.col1 AS col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3848
SELECT ALL + col2 + col0 / tab0.col1 AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT - col0 + cor0.col0 * col2 * col1 AS col0 FROM tab2 cor0
----
119574
50955
5852

query I rowsort
SELECT + col1 * - col0 + + col0 AS col1 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + + 30 + col0 * - col1 AS col0 FROM tab1 AS cor0
----
-1010
-48
-610

query I rowsort
SELECT - - col2 * cor0.col0 + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + 11 + col2 * col1 * 21 AS col1 FROM tab1 AS cor0
----
11981
26219
29495

query I rowsort
SELECT ALL - + 80 * col1 FROM tab0 AS cor0
----
-6880
-7280
-7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3855
SELECT col2 * col0 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3855
SELECT col2 * col0 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * - 90 AS col0 FROM tab2 AS cor0
----
-630
-7020
-7110

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3857
SELECT - - col2 + CAST( 40 AS SIGNED ) + col1 AS col2 FROM tab0 AS cor0
----
138
159
213

skipif mysql # not compatible
query I rowsort label-3857
SELECT - - col2 + CAST ( 40 AS INTEGER ) + col1 AS col2 FROM tab0 AS cor0
----
138
159
213

onlyif mysql # use DIV operator for integer division
query I rowsort label-3858
SELECT - col0 DIV - col1 + + col0 col2 FROM tab1 AS cor0
----
3
70
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3858
SELECT - col0 / - col1 + + col0 col2 FROM tab1 AS cor0
----
3
70
86

query I rowsort
SELECT + col1 * cor0.col0 * col0 + - cor0.col0 FROM tab1 AS cor0
----
231
40896
83120

query I rowsort
SELECT - cor0.col1 + - col2 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + col0 + + col2 + + col1 AS col0 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT ALL ( + cor0.col2 * - 65 ) FROM tab2, tab0 AS cor0
----
9 values hashing to 9e3b6d280c4f16ade677101863c06a28

onlyif mysql # use DIV operator for integer division
query I rowsort label-3863
SELECT ( + cor0.col1 ) DIV col2 AS col1 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-3863
SELECT ( + cor0.col1 ) / col2 AS col1 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT ALL 54 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT DISTINCT + 69 + - 46 - - cor0.col0 AS col2 FROM tab0 AS cor0
----
112
47
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3866
SELECT + CAST( + 24 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
24
24
24

skipif mysql # not compatible
query I rowsort label-3866
SELECT + CAST ( + 24 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - cor0.col0 col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ( tab2.col1 ) * + col0 AS col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT ( col0 * tab1.col0 ) + col1 FROM tab1
----
35
4106
6413

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 50 col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
50

query I rowsort
SELECT ALL 94 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3873
SELECT ALL col0 - + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3873
SELECT ALL col0 - + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col1 + cor0.col2 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT - cor0.col2 * + ( col1 + cor0.col2 ) FROM tab0 AS cor0
----
-14186
-3927
-98

query I rowsort
SELECT DISTINCT - + col2 + - col0 + + col1 FROM tab0 cor0
----
-80
29
61

query I rowsort
SELECT DISTINCT - col2 * tab1.col0 * - 81 FROM tab1
----
13122
295488
622080

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3878
SELECT ALL col2 * tab1.col0 - - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3878
SELECT ALL col2 * tab1.col0 - - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * cor1.col1 col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 3e351fdfa2fd88779f2d7b6136dc00d1

query I rowsort
SELECT ALL 73 FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
81 values hashing to 9f0f371d979e70a792c8597c6559f0e2

query I rowsort
SELECT - + 71 * 48 AS col2 FROM tab1 AS cor0
----
-3408
-3408
-3408

query I rowsort
SELECT + 48 + cor0.col1 * col2 FROM tab1 AS cor0
----
1296
1452
618

query I rowsort
SELECT - col1 * + 41 FROM tab0 AS cor0
----
-3526
-3731
-3977

query I rowsort
SELECT + col2 * ( - col2 ) + col1 FROM tab0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3885
SELECT col0 DIV - ( + col2 ) AS col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3885
SELECT col0 / - ( + col2 ) AS col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT cor0.col1 + + ( - col2 + cor0.col0 * + col1 ) FROM tab1 AS cor0
----
50
593
957

onlyif mysql # use DIV operator for integer division
query I rowsort label-3887
SELECT + col1 DIV + col1 col1 FROM tab0 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3887
SELECT + col1 / + col1 col1 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT ( - cor0.col0 ) AS col1 FROM tab1, tab1 cor0, tab2 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT col1 * - col0 * col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * col1 + + col2 - + 45 AS col0 FROM tab0 AS cor0
----
-141
-2850
-7425

onlyif mysql # use DIV operator for integer division
query I rowsort label-3892
SELECT DISTINCT - col1 * col2 DIV col1 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-3892
SELECT DISTINCT - col1 * col2 / col1 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + + col0 + - col0 - + col0 * + col2 FROM tab2 cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3894
SELECT - + cor0.col0 DIV + col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3894
SELECT - + cor0.col0 / + col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT + - ( + col0 ) * col0 + col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT - col1 * + col1 + col1 * + ( - col1 ) * col2 FROM tab0 AS cor0
----
-18818
-251464
-687323

query I rowsort
SELECT + col0 * 98 + ( + col0 ) - + 84 AS col1 FROM tab0
----
2292
3381
8727

query I rowsort
SELECT DISTINCT col0 * col0 + col1 - + col0 * col0 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT - col2 * + ( + col1 + tab2.col1 ) AS col0 FROM tab2
----
-1292
-1674
-3068

query I rowsort
SELECT col1 * + 56 + cor0.col0 - 19 AS col0 FROM tab2 AS cor0
----
1012
1724
3363

onlyif mysql # use DIV operator for integer division
query I rowsort label-3901
SELECT DISTINCT 3 + + col0 DIV - col0 AS col1 FROM tab0 AS cor0
----
2

skipif mysql # not compatible
query I rowsort label-3901
SELECT DISTINCT 3 + + col0 / - col0 AS col1 FROM tab0 AS cor0
----
2

query I rowsort
SELECT + col0 * - ( - col0 ) + + ( 44 ) FROM tab0 cor0
----
1269
620
7965

query I rowsort
SELECT + 0 + col0 - + col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - col0 * + col1 + col2 * 12 AS col0 FROM tab0 cor0
----
-1668
-3383
-7115

query I rowsort
SELECT ALL - 21 + cor0.col1 FROM tab0 AS cor0
----
65
70
76

query I rowsort
SELECT + - col1 + + col0 * - 6 FROM tab0 AS cor0
----
-230
-307
-625

query I rowsort
SELECT DISTINCT col0 + col1 * + 3 * col0 FROM tab0 cor0
----
10220
24386
6216

query I rowsort
SELECT 75 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT ALL + 96 AS col0 FROM tab2
----
96
96
96

query I rowsort
SELECT DISTINCT 38 * - col0 * col0 + col2 FROM tab2 AS cor0
----
-1835
-231166
-237120

query I rowsort
SELECT ALL 38 + - col2 FROM tab1 AS cor0
----
-16
-19
-58

query I rowsort
SELECT ALL col0 + col0 * + 18 FROM tab0 AS cor0
----
1691
456
665

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( col2 ) col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - col0 + col2 * + ( col1 ) FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL - 14 * col0 - 83 AS col0 FROM tab0 AS cor0
----
-1329
-419
-573

query I rowsort
SELECT DISTINCT col1 * - col0 * - 77 FROM tab2
----
103411
16709
354354

query I rowsort
SELECT DISTINCT + col2 * - col0 + col0 AS col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL - col2 + - ( 17 ) FROM tab2 AS cor0
----
-43
-44
-55

query I rowsort
SELECT + + col1 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3920
SELECT col0 * col2 DIV col1 + - col2 FROM tab0
----
-1
-2
-24

skipif mysql # not compatible
query I rowsort label-3920
SELECT col0 * col2 / col1 + - col2 FROM tab0
----
-1
-2
-24

query I rowsort
SELECT ALL col1 + - 69 FROM tab2 AS cor0
----
-10
-38
-52

query I rowsort
SELECT - cor0.col1 * + col1 + + col1 AS col0 FROM tab1 AS cor0
----
-156
-650
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3923
SELECT DISTINCT - - col1 + CAST( - 44 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-13
-27
15

skipif mysql # not compatible
query I rowsort label-3923
SELECT DISTINCT - - col1 + CAST ( - 44 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-13
-27
15

query I rowsort
SELECT + tab1.col2 * - col0 AS col2 FROM tab1
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 11 * - col2 col1 FROM tab0
----
-11
-363
-902

query I rowsort
SELECT + 18 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT DISTINCT - 66 * + col2 * col2 + col2 * + col0 * + ( + col1 ) AS col0 FROM tab2
----
-42255
-44270
75036

query I rowsort
SELECT ALL 73 + - 22 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 cor1, tab2, tab1 AS cor2
----
3645 values hashing to 1e12915106866c102f2d9f96f9233144

query I rowsort
SELECT DISTINCT - col2 + col1 * 58 FROM tab0 AS cor0
----
4955
5196
5625

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + 91 col2 FROM tab2 AS cor0
----
117
118
129

query I rowsort
SELECT ALL - col0 - col1 * col1 * col0 FROM tab2 AS cor0
----
-22910
-271596
-6734

query I rowsort
SELECT ALL + col0 * + cor0.col0 + - cor0.col2 * - col2 AS col2 FROM tab1 AS cor0
----
15616
2925
7345

query I rowsort
SELECT col2 * + ( col0 ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - + cor0.col1 - 73 AS col2 FROM tab1 AS cor0
----
-83
-86
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-3936
SELECT - - 39 DIV - col1 + - col2 * + col1 FROM tab2 AS cor0
----
-1534
-648
-838

skipif mysql # not compatible
query I rowsort label-3936
SELECT - - 39 / - col1 + - col2 * + col1 FROM tab2 AS cor0
----
-1534
-648
-838

query I rowsort
SELECT col1 + col0 + tab1.col1 FROM tab1
----
106
55
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-3938
SELECT col2 * 93 DIV col1 AS col2 FROM tab2 cor0
----
207
40
81

skipif mysql # not compatible
query I rowsort label-3938
SELECT col2 * 93 / col1 AS col2 FROM tab2 cor0
----
207
40
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3939
SELECT ALL + CAST( + col2 AS SIGNED ) + - col0 AS col0 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-3939
SELECT ALL + CAST ( + col2 AS INTEGER ) + - col0 AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - ( - tab1.col2 ) * + col2 + + col0 AS col1 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT DISTINCT - col0 * + col1 + col2 AS col2 FROM tab2
----
-1305
-190
-4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 74 col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 5a567947d14593676e3825756f8e6130

onlyif mysql # use DIV operator for integer division
query I rowsort label-3943
SELECT ALL + col2 DIV - col2 + - col0 * col0 + + col2 * col1 AS col2 FROM tab1 AS cor0
----
-3527
-5153
1394

skipif mysql # not compatible
query I rowsort label-3943
SELECT ALL + col2 / - col2 + - col0 * col0 + + col2 * col1 AS col2 FROM tab1 AS cor0
----
-3527
-5153
1394

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + - col2 col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ( + col2 ) * col0 + col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL - - 47 FROM tab2 AS cor0
----
47
47
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3947
SELECT DISTINCT + - ( - col0 ) + CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3947
SELECT DISTINCT + - ( - col0 ) + CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + 76 * - 58 AS col0 FROM tab0 AS cor0
----
-4408
-4408
-4408

query I rowsort
SELECT + 95 + col2 * col2 * + col2 AS col1 FROM tab1 AS cor0
----
157559
185288
884831

query I rowsort
SELECT + 5 + - col2 * + col2 AS col1 FROM tab0 AS cor0
----
-1084
-6719
4

query I rowsort
SELECT col2 + col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL + col2 * ( col2 ) FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL - 72 * cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to b794b19789bc36fb9566ff64f85baea1

query I rowsort
SELECT col1 + 39 * 19 * col1 AS col1 FROM tab2
----
12614
23002
43778

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3955
SELECT DISTINCT CAST( NULL AS SIGNED ) * - 78 * - tab0.col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-3955
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - 78 * - tab0.col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3956
SELECT DISTINCT CAST( 97 AS SIGNED ) FROM tab1
----
97

skipif mysql # not compatible
query I rowsort label-3956
SELECT DISTINCT CAST ( 97 AS INTEGER ) FROM tab1
----
97

query I rowsort
SELECT + 14 + col1 * - col0 AS col2 FROM tab0 AS cor0
----
-2050
-3381
-8085

onlyif mysql # use DIV operator for integer division
query I rowsort label-3958
SELECT ( + col0 ) - col1 DIV + 16 FROM tab1 cor0
----
2
64
80

skipif mysql # not compatible
query I rowsort label-3958
SELECT ( + col0 ) - col1 / + 16 FROM tab1 cor0
----
2
64
80

query I rowsort
SELECT 56 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-26
23
55

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT - cor0.col1 + + ( col1 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col0 * + col2 + col1 + col1 AS col0 FROM tab0 AS cor0
----
229
7480
964

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL + - 36 AS col2 FROM tab2 AS cor0
----
-36
-36
-36

query I rowsort
SELECT ALL + 36 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT col1 + - col0 * + ( + cor0.col0 ) FROM tab1 cor0
----
-4086
-6387
17

query I rowsort
SELECT 17 FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT DISTINCT - col1 * 65 * ( + col2 ) FROM tab1
----
-37050
-81120
-91260

query I rowsort
SELECT DISTINCT + col1 * 80 AS col0 FROM tab2 AS cor0
----
1360
2480
4720

query I rowsort
SELECT - cor1.col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 71 col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3972
SELECT - + col2 * CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3972
SELECT - + col2 * CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + - 69 * + 92 FROM tab0 AS cor0
----
-6372
-6383
-6437

query I rowsort
SELECT + col1 + col1 + - 86 * cor0.col2 FROM tab1 AS cor0
----
-4592
-4882
-8230

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - 32 * 96 col2 FROM tab1 AS cor0
----
-3075
-3136
-3152

query I rowsort
SELECT - col2 * ( + col1 * + col2 ) FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT ALL - 0 + + col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + 14 AS col0 FROM tab2 cor0
----
14

query I rowsort
SELECT - col2 * + 92 AS col1 FROM tab1 cor0
----
-4968
-5244
-8832

query I rowsort
SELECT DISTINCT + + 84 * + col1 + - col2 FROM tab1 AS cor0
----
2130
783
996

query I rowsort
SELECT ALL - 13 + col1 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
1521
633
824

query I rowsort
SELECT DISTINCT + col0 * + col0 * + col0 AS col1 FROM tab0
----
13824
42875
704969

query I rowsort
SELECT + col1 * + 55 * - col2 FROM tab2 cor0
----
-35530
-46035
-84370

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) * + cor0.col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col2 * cor0.col2 * ( ( col1 ) ) col2 FROM tab1 AS cor0
----
119728
32426
75813

onlyif mysql # use DIV operator for integer division
query I rowsort label-3986
SELECT 3 * col2 + 79 DIV + col2 FROM tab0 AS cor0
----
101
246
82

skipif mysql # not compatible
query I rowsort label-3986
SELECT 3 * col2 + 79 / + col2 FROM tab0 AS cor0
----
101
246
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3987
SELECT + + 22 * col1 * - 6 + cor0.col0 DIV col0 AS col1 FROM tab1 AS cor0
----
-1319
-1715
-3431

skipif mysql # not compatible
query I rowsort label-3987
SELECT + + 22 * col1 * - 6 + cor0.col0 / col0 AS col1 FROM tab1 AS cor0
----
-1319
-1715
-3431

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3988
SELECT ALL - col0 + - CAST( - col2 AS SIGNED ) FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-3988
SELECT ALL - col0 + - CAST ( - col2 AS INTEGER ) FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT - col0 * + col0 + + col0 FROM tab2 AS cor0
----
-42
-6006
-6162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + 64 * + col1 * - col0 col2 FROM tab0 cor0
----
-132182
-217377
-518427

onlyif mysql # use DIV operator for integer division
query I rowsort label-3991
SELECT DISTINCT col1 * CAST( + col2 AS SIGNED ) DIV col0 FROM tab1 AS cor0
----
15
468
8

skipif mysql # not compatible
query I rowsort label-3991
SELECT DISTINCT col1 * CAST ( + col2 AS INTEGER ) / col0 FROM tab1 AS cor0
----
15
468
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-3992
SELECT ALL - col1 DIV + col2 + 75 DIV - col0 + + col0 * - col0 col1 FROM tab1 AS cor0
----
-34
-4097
-6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3992
SELECT ALL - col1 / + col2 + 75 / - col0 + + col0 * - col0 col1 FROM tab1 AS cor0
----
-34
-4097
-6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 * - col0 col0 FROM tab1
----
-1152
-1440
-54

query I rowsort
SELECT + - 79 AS col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab0, tab2 cor1
----
243 values hashing to 7afc0dfcd65d937c1cf3f6d78a7fd244

query I rowsort
SELECT ALL + col2 + cor0.col1 - ( - 44 ) FROM tab1 AS cor0
----
111
124
153

query I rowsort
SELECT DISTINCT + + cor0.col0 + + col1 * ( ( cor0.col1 ) ) FROM tab2 AS cor0
----
3559
368
968

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab1 cor1, tab1 AS cor2
----
3645 values hashing to d10b928ceb6690f7c98bfe77a5adfcac

query I rowsort
SELECT ALL - ( + col2 + - col2 ) FROM tab2
----
0
0
0

query I rowsort
SELECT 84 FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
81 values hashing to 3c092ed1a99ddb5afc7049fd2b9427f9

query I rowsort
SELECT ALL - 91 * + col2 FROM tab2
----
-2366
-2457
-3458

query I rowsort
SELECT DISTINCT + ( col0 ) + cor0.col0 + - col1 AS col2 FROM tab0 AS cor0
----
-27
-38
87

query I rowsort
SELECT ALL + + col0 - col2 * col1 AS col0 FROM tab0 cor0
----
-2814
-62
-7373

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4003
SELECT ALL + + col1 * cor0.col1 + + CAST( NULL AS SIGNED ) + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4003
SELECT ALL + + col1 * cor0.col1 + + CAST ( NULL AS INTEGER ) + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4004
SELECT DISTINCT - - ( col2 ) * 46 + ( - col1 ) DIV col1 + + col0 AS col2 FROM tab1 AS cor0
----
2486
2685
4495

skipif mysql # not compatible
query I rowsort label-4004
SELECT DISTINCT - - ( col2 ) * 46 + ( - col1 ) / col1 + + col0 AS col2 FROM tab1 AS cor0
----
2486
2685
4495

query I rowsort
SELECT + 62 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query I rowsort
SELECT DISTINCT - col0 * 67 * 51 + col1 FROM tab0
----
-119498
-304022
-81922

query I rowsort
SELECT cor0.col2 - tab0.col0 FROM tab0, tab0 cor0
----
9 values hashing to 3bc06ccf3237ffb250bf4a21d366c466

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0, tab1, tab1 cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL col2 + 21 * - col0 FROM tab2
----
-120
-1612
-1621

query I rowsort
SELECT - tab2.col0 + col0 * - col0 + col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT ALL + 91 * 62 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to c47f9e33eca8eb84acd7c50b9d3e6e68

query I rowsort
SELECT ALL cor0.col1 + 3 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to ca1aad34ef894de7ffe30a95f0eabb52

query I rowsort
SELECT ALL + col2 + ( col0 ) * col1 AS col0 FROM tab2
----
1381
244
4628

query I rowsort
SELECT - col2 + 70 - + col0 AS col2 FROM tab1
----
-106
-51
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * + 66 col1 FROM tab0, tab2 AS cor0
----
-462
-5148
-5214

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - tab2.col1 + - ( - tab2.col0 + col2 ) col1 FROM tab2
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4017
SELECT + col0 * 51 DIV - 91 AS col0 FROM tab1 cor0
----
-1
-35
-44

skipif mysql # not compatible
query I rowsort label-4017
SELECT + col0 * 51 / - 91 AS col0 FROM tab1 cor0
----
-1
-35
-44

query I rowsort
SELECT + cor0.col0 * col2 + cor0.col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - col0 + - 5 + col1 * col2 FROM tab1
----
1163
1396
501

query I rowsort
SELECT DISTINCT + col1 + + col2 * col0 FROM tab0
----
132
7389
878

query I rowsort
SELECT + ( col2 ) + col1 + - col0 AS col1 FROM tab2 AS cor0
----
-24
51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4022
SELECT DISTINCT 79 DIV 95 AS col0 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4022
SELECT DISTINCT 79 / 95 AS col0 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 64 + col0 col1 FROM tab0 AS cor0
----
-29
-40
25

query I rowsort
SELECT DISTINCT 29 + ( col1 ) FROM tab2 AS cor0
----
46
60
88

query I rowsort
SELECT DISTINCT - cor0.col2 - + col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - col1 * cor0.col1 + col1 * - col1 FROM tab0 AS cor0
----
-14792
-16562
-18818

query I rowsort
SELECT - ( 50 ) FROM tab0 AS cor0
----
-50
-50
-50

query I rowsort
SELECT - 83 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-581
-6474
-6557

query I rowsort
SELECT DISTINCT 10 AS col2 FROM tab1 AS cor0
----
10

query I rowsort
SELECT ALL + + 85 + + 94 * + col1 FROM tab2 AS cor0
----
1683
2999
5631

query I rowsort
SELECT ALL - + ( 34 ) AS col2 FROM tab2 AS cor0
----
-34
-34
-34

query I rowsort
SELECT - col2 * + 12 + col2 AS col2 FROM tab2 cor0
----
-286
-297
-418

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( - col1 AS REAL ) + col1 AS col2 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4034
SELECT ( - cor0.col1 ) + col2 DIV + ( 36 + + cor0.col0 ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-4034
SELECT ( - cor0.col1 ) + col2 / + ( 36 + + cor0.col0 ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4035
SELECT + + col1 DIV col0 + - cor0.col0 AS col0 FROM tab2 cor0
----
-3
-78
-79

skipif mysql # not compatible
query I rowsort label-4035
SELECT + + col1 / col0 + - cor0.col0 AS col0 FROM tab2 cor0
----
-3
-78
-79

query I rowsort
SELECT ALL - col1 + + col1 * + col0 AS col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT ALL + col2 * cor0.col2 + - col0 FROM tab2 AS cor0
----
1365
598
722

onlyif mysql # use DIV operator for integer division
query I rowsort label-4038
SELECT DISTINCT col2 DIV + 97 AS col0 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-4038
SELECT DISTINCT col2 / + 97 AS col0 FROM tab0 cor0
----
0

query I rowsort
SELECT ALL + + col2 * col0 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT ( - col2 + - col1 ) FROM tab2
----
-55
-58
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4041
SELECT - - CAST( NULL AS SIGNED ) + col2 + cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4041
SELECT - - CAST ( NULL AS INTEGER ) + col2 + cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4042
SELECT - + CAST( NULL AS SIGNED ) + + ( col0 ) * + 68 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4042
SELECT - + CAST ( NULL AS INTEGER ) + + ( col0 ) * + 68 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col2 * col2 col1 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT ALL 18 + + col0 * - col1 AS col0 FROM tab1 AS cor0
----
-1022
-60
-622

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 col1 FROM tab2, tab2 cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to 180f983bbf84f38a53d5012e5c10c628

query I rowsort
SELECT + 82 * cor0.col0 AS col1 FROM tab2 AS cor0
----
574
6396
6478

onlyif mysql # use DIV operator for integer division
query I rowsort label-4047
SELECT + col0 + - col0 DIV - col1 AS col1 FROM tab1 AS cor0
----
3
70
86

skipif mysql # not compatible
query I rowsort label-4047
SELECT + col0 + - col0 / - col1 AS col1 FROM tab1 AS cor0
----
3
70
86

query I rowsort
SELECT + - col2 * + col1 * + col1 AS col0 FROM tab1 AS cor0
----
-16224
-36504
-5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 21 col1 FROM tab0 AS cor0
----
-21
-21
-21

query I rowsort
SELECT + col0 * ( - col1 ) * 64 FROM tab1
----
-40960
-4992
-66560

query I rowsort
SELECT + 13 + + 33 * - tab2.col2 AS col1 FROM tab2
----
-1241
-845
-878

query I rowsort
SELECT + 16 * col0 + col2 AS col2 FROM tab1
----
102
1081
1376

query I rowsort
SELECT DISTINCT col0 * + col2 * col0 AS col0 FROM tab2
----
1323
158184
237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 62 * col0 * + tab0.col2 col0 FROM tab0
----
2170
452476
49104

query I rowsort
SELECT ALL - 94 + tab1.col1 AS col2 FROM tab1
----
-68
-81
-84

query I rowsort
SELECT DISTINCT - ( + col0 ) * + col2 + col2 * + col0 AS col1 FROM tab2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 21 + col2 col1 FROM tab0
----
-20
12
61

query I rowsort
SELECT DISTINCT + - col0 * - col1 - col2 AS col1 FROM tab1 AS cor0
----
24
583
944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + ( + col2 ) col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT - - cor0.col2 + 22 FROM tab0 cor0
----
104
23
55

query I rowsort
SELECT ALL - col0 * + col1 + col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL + - col2 * col2 - col1 FROM tab0 cor0
----
-1175
-6815
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + ( col2 ) col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL + col0 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL + + col2 + - ( + cor0.col2 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 * - ( + cor0.col0 ) + + col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT - col2 * - ( col2 + col2 ) FROM tab1 AS cor0
----
18432
5832
6498

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 27bcc31433ce90833ed76619cbd8d6a4

query I rowsort
SELECT ALL - col0 + - ( + col2 ) AS col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT - col0 * + 45 FROM tab0 AS cor0
----
-1080
-1575
-4005

query I rowsort
SELECT + + col2 * + 83 FROM tab1 cor0
----
4482
4731
7968

onlyif mysql # use DIV operator for integer division
query I rowsort label-4072
SELECT - col2 DIV 49 AS col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4072
SELECT - col2 / 49 AS col2 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL + col0 * col0 + + ( - col0 + + col2 * - col0 ) AS col2 FROM tab2
----
-147
3160
3978

onlyif mysql # use DIV operator for integer division
query I rowsort label-4074
SELECT DISTINCT tab0.col2 DIV + 44 FROM tab0, tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-4074
SELECT DISTINCT tab0.col2 / + 44 FROM tab0, tab2 AS cor0
----
0
1

query I rowsort
SELECT DISTINCT - + col0 + - 51 AS col0 FROM tab2 AS cor0
----
-129
-130
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-4076
SELECT ALL + - cor0.col1 DIV col2 + + 76 * - col1 AS col2 FROM tab1 AS cor0
----
-1976
-760
-988

skipif mysql # not compatible
query I rowsort label-4076
SELECT ALL + - cor0.col1 / col2 + + 76 * - col1 AS col2 FROM tab1 AS cor0
----
-1976
-760
-988

query I rowsort
SELECT - 45 AS col2 FROM tab1, tab1 AS cor0, tab0, tab1 AS cor1
----
81 values hashing to 1f0df66b2151954f18c5f227a321bf0c

query I rowsort
SELECT - 65 AS col0 FROM tab2 cor0
----
-65
-65
-65

query I rowsort
SELECT + col0 * 95 AS col1 FROM tab0 AS cor0
----
2280
3325
8455

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4080
SELECT CAST( cor0.col1 AS SIGNED ) + - cor0.col0 FROM tab2 AS cor0
----
-19
-62
24

skipif mysql # not compatible
query I rowsort label-4080
SELECT CAST ( cor0.col1 AS INTEGER ) + - cor0.col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ( - ( - col0 ) ) FROM tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4082
SELECT - CAST( + col1 AS SIGNED ) * col2 + ( - col2 ) FROM tab2 AS cor0
----
-1560
-684
-864

skipif mysql # not compatible
query I rowsort label-4082
SELECT - CAST ( + col1 AS INTEGER ) * col2 + ( - col2 ) FROM tab2 AS cor0
----
-1560
-684
-864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col0 + + col1 * col2 col1 FROM tab1 cor0
----
1413
4666
7648

query I rowsort
SELECT 42 * cor1.col1 * 93 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d57570eaa19f4e2247c92e95732960e7

query I rowsort
SELECT ALL ( tab0.col2 ) FROM tab0, tab1 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL + 43 * col1 AS col2 FROM tab0
----
3698
3913
4171

query I rowsort
SELECT + 41 FROM tab0, tab1 cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

onlyif mysql # use DIV operator for integer division
query I rowsort label-4088
SELECT - cor0.col2 DIV cor1.col1 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-4088
SELECT - cor0.col2 / cor1.col1 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT + col0 * 85 * col1 + - col2 * - col0 AS col0 FROM tab1 AS cor0
----
58048
6792
96080

query I rowsort
SELECT DISTINCT + 1 + + 99 FROM tab2 AS cor0
----
100

query I rowsort
SELECT DISTINCT - cor0.col0 * - col2 + col2 AS col1 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT + cor1.col0 * cor0.col1 AS col0 FROM tab2, tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
27 values hashing to b6acab70a8764f2ad4b9f9f8e9265ffe

query I rowsort
SELECT DISTINCT - ( - 59 ) FROM tab0
----
59

query I rowsort
SELECT + + col1 + 94 * col1 FROM tab1 AS cor0
----
1235
2470
950

query I rowsort
SELECT - col2 * - 93 * + col0 AS col2 FROM tab0 AS cor0
----
3255
678714
73656

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) / - col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 30 * - col2 * - tab0.col0 + - tab0.col0 AS col1 FROM tab0
----
1015
218851
23736

query I rowsort
SELECT col1 + col0 * ( - col2 ) AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT 34 * - col1 AS col2 FROM tab2
----
-1054
-2006
-578

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col0 * + col1 * + col0 col0 FROM tab0
----
118826
49569
720893

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 53 col0 FROM tab0 AS cor0
----
-53
-53
-53

query I rowsort
SELECT ALL + 87 * - 6 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 6f5c72cba455010cd419a2b13826bbb9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col0 col0 FROM tab1 cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4104
SELECT + + col0 DIV + col1 + - cor0.col1 - - col0 FROM tab0 cor0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-4104
SELECT + + col0 / + col1 + - cor0.col1 - - col0 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT col1 + - 48 FROM tab2 AS cor0
----
-17
-31
11

query I rowsort
SELECT col2 * - col1 + col1 * + col1 AS col0 FROM tab0 AS cor0
----
4558
819
9312

query I rowsort
SELECT + + cor0.col1 * + col2 * + col1 FROM tab0 cor0
----
244068
679042
9409

query I rowsort
SELECT 39 * + col0 + + col1 FROM tab1 cor0
----
143
2506
3133

query I rowsort
SELECT - 51 * col1 AS col0 FROM tab0 AS cor0
----
-4386
-4641
-4947

query I rowsort
SELECT + col2 * + col2 + + col2 * 39 * - cor0.col2 AS col1 FROM tab1 cor0
----
-110808
-123462
-350208

onlyif mysql # use DIV operator for integer division
query I rowsort label-4111
SELECT ALL - - col1 DIV - 94 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4111
SELECT ALL - - col1 / - 94 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + + ( - col2 ) + col1 AS col1 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4113
SELECT DISTINCT - col2 DIV 88 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-4113
SELECT DISTINCT - col2 / 88 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 63 col2 FROM tab1 AS cor0
----
-63
-63
-63

query I rowsort
SELECT - cor0.col0 * + ( cor0.col1 ) FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + + col1 + 68 AS col1 FROM tab0 AS cor0
----
154
159
165

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 8 col2 FROM tab2, tab1 cor0
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

onlyif mysql # use DIV operator for integer division
query I rowsort label-4118
SELECT DISTINCT - col1 DIV 31 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-2
31
80

skipif mysql # not compatible
query I rowsort label-4118
SELECT DISTINCT - col1 / 31 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-2
31
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4119
SELECT DISTINCT col2 DIV + col1 + - col2 DIV + col2 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4119
SELECT DISTINCT col2 / + col1 + - col2 / + col2 FROM tab0 AS cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4120
SELECT tab2.col0 DIV - col0 - - 49 AS col0 FROM tab2
----
48
48
48

skipif mysql # not compatible
query I rowsort label-4120
SELECT tab2.col0 / - col0 - - 49 AS col0 FROM tab2
----
48
48
48

query I rowsort
SELECT DISTINCT + col0 + tab0.col0 AS col0 FROM tab0
----
178
48
70

query I rowsort
SELECT - col0 + 47 FROM tab2 cor0
----
-31
-32
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-4123
SELECT col0 DIV tab0.col0 - col2 * col1 * col1 AS col0 FROM tab0
----
-244067
-679041
-9408

skipif mysql # not compatible
query I rowsort label-4123
SELECT col0 / tab0.col0 - col2 * col1 * col1 AS col0 FROM tab0
----
-244067
-679041
-9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-4124
SELECT + col2 DIV col2 + 51 * - col1 FROM tab0
----
-4385
-4640
-4946

skipif mysql # not compatible
query I rowsort label-4124
SELECT + col2 / col2 + 51 * - col1 FROM tab0
----
-4385
-4640
-4946

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 + col2 col2 FROM tab2
----
52
54
76

query I rowsort
SELECT col2 + - ( - col1 * - col2 ) AS col0 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT ALL col2 * ( tab1.col0 ) + tab1.col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT - col0 - ( col2 ) FROM tab0
----
-171
-36
-57

query I rowsort
SELECT - col2 * col1 + + tab1.col1 * col0 FROM tab1
----
-1326
-208
70

query I rowsort
SELECT - tab0.col1 * ( - 88 + tab0.col1 ) FROM tab0
----
-273
-873
172

query I rowsort
SELECT ALL col2 + ( + 55 ) FROM tab2 AS cor0
----
81
82
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4132
SELECT DISTINCT + cor0.col1 * CAST( NULL AS SIGNED ) - col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4132
SELECT DISTINCT + cor0.col1 * CAST ( NULL AS INTEGER ) - col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + ( + ( col1 ) ) * ( - col0 ) * col1 AS col1 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT - col2 * 26 FROM tab0
----
-2132
-26
-858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 * 61 * tab0.col2 col1 FROM tab0
----
130052
1586
52338

onlyif mysql # use DIV operator for integer division
query I rowsort label-4136
SELECT + col0 + cor0.col0 - col2 * + col1 DIV + cor0.col1 FROM tab0 AS cor0
----
15
69
96

skipif mysql # not compatible
query I rowsort label-4136
SELECT + col0 + cor0.col0 - col2 * + col1 / + cor0.col1 FROM tab0 AS cor0
----
15
69
96

query I rowsort
SELECT DISTINCT 8 * col1 FROM tab2 AS cor0
----
136
248
472

query I rowsort
SELECT DISTINCT - col1 * col0 + col0 * + ( col2 ) FROM tab2 AS cor0
----
-2574
-28
1659

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) AS col0 FROM tab2, tab1, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT 67 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to eea8a0738728ea55e4e7ba1506c9905a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col0 + + col0 ) * col2 col2 FROM tab2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 6 col2 FROM tab0, tab2 cor0
----
-6

query I rowsort
SELECT ( + col2 + + col2 ) FROM tab2
----
52
54
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4144
SELECT ALL ( col2 ) * CAST( col0 AS SIGNED ) + + col0 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4144
SELECT ALL ( col2 ) * CAST ( col0 AS INTEGER ) + + col0 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4145
SELECT DISTINCT - ( col1 ) + + 29 DIV col1 - + cor0.col0 AS col2 FROM tab1 AS cor0
----
-28
-72
-91

skipif mysql # not compatible
query I rowsort label-4145
SELECT DISTINCT - ( col1 ) + + 29 / col1 - + cor0.col0 AS col2 FROM tab1 AS cor0
----
-28
-72
-91

query I rowsort
SELECT DISTINCT - 97 + + col2 AS col2 FROM tab1 AS cor0
----
-1
-40
-43

query I rowsort
SELECT + 78 * col0 + 7 * col1 FROM tab1 AS cor0
----
416
5062
6331

query I rowsort
SELECT ALL 48 * - col0 AS col1 FROM tab2 AS cor0
----
-336
-3744
-3792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 36 col1 FROM tab2 AS cor0
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 9 + cor0.col1 - col1 col2 FROM tab2 AS cor0
----
-9
-9
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 5 * col2 col1 FROM tab2 AS cor0
----
-130
-135
-190

query I rowsort
SELECT ALL - 90 + col1 FROM tab0 AS cor0
----
-4
1
7

query I rowsort
SELECT DISTINCT - + 77 AS col1 FROM tab2 AS cor0
----
-77

query I rowsort
SELECT DISTINCT - - col0 + col1 * + 36 * 32 AS col1 FROM tab2 AS cor0
----
19663
35719
68046

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col0 + - col2 col0 FROM tab2
----
7
78
79

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2, tab0 AS cor0 WHERE NULL = NULL
----

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2, tab1, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col0 * col0 * + ( col0 + - col2 ) FROM tab2
----
-980
255881
316368

query I rowsort
SELECT + - 29 AS col0 FROM tab0 AS cor0
----
-29
-29
-29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + col2 col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - - 60 * col0 AS col1 FROM tab1 AS cor0
----
180
3840
4800

query I rowsort
SELECT col0 + + col1 * 62 FROM tab0 cor0
----
5356
5731
6049

query I rowsort
SELECT DISTINCT + 56 * + 15 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
840

query I rowsort
SELECT DISTINCT + ( + col2 ) * - col1 + ( col1 ) * - col0 FROM tab1 AS cor0
----
-1210
-1482
-2288

query I rowsort
SELECT + col0 + cor0.col2 * + ( - col2 ) * col1 FROM tab1 AS cor0
----
-119728
-32426
-75813

query I rowsort
SELECT - cor0.col0 + - 84 FROM tab2 AS cor0
----
-162
-163
-91

query I rowsort
SELECT DISTINCT + col0 * 70 AS col0 FROM tab0 AS cor0
----
1680
2450
6230

onlyif mysql # use DIV operator for integer division
query I rowsort label-4168
SELECT DISTINCT + col1 DIV + 49 + - cor0.col2 * + cor0.col0 - - ( - 34 * - cor0.col0 ) FROM tab0 AS cor0
----
-4271
1156
25

skipif mysql # not compatible
query I rowsort label-4168
SELECT DISTINCT + col1 / + 49 + - cor0.col2 * + cor0.col0 - - ( - 34 * - cor0.col0 ) FROM tab0 AS cor0
----
-4271
1156
25

query I rowsort
SELECT - cor0.col1 * + col2 - + col2 AS col1 FROM tab2 cor0
----
-1560
-684
-864

query I rowsort
SELECT DISTINCT + cor0.col1 + 59 FROM tab1 AS cor0
----
69
72
85

query I rowsort
SELECT 64 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT col1 + + 96 FROM tab1 AS cor0
----
106
109
122

query I rowsort
SELECT col1 * - ( col0 ) + + col2 * col2 AS col2 FROM tab2 AS cor0
----
-3926
101
512

query I rowsort
SELECT ALL + 80 + col0 AS col2 FROM tab2
----
158
159
87

query I rowsort
SELECT + col1 * + 10 + col1 AS col1 FROM tab1 AS cor0
----
110
143
286

query I rowsort
SELECT - col1 + + col0 * - col2 * + col2 FROM tab2 cor0
----
-114093
-5134
-52787

query I rowsort
SELECT + - col2 + ( - col1 ) AS col0 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4178
SELECT ALL ( + 14 ) DIV col0 - 21 FROM tab0 AS cor0
----
-21
-21
-21

skipif mysql # not compatible
query I rowsort label-4178
SELECT ALL ( + 14 ) / col0 - 21 FROM tab0 AS cor0
----
-21
-21
-21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4179
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * cor0.col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4179
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * cor0.col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - col1 * - 59 FROM tab1 AS cor0
----
1534
590
767

query I rowsort
SELECT DISTINCT + ( col1 ) + - col1 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT cor0.col2 * 34 * cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 11feb04b1e49d2e3f4634f44f09b48fd

query I rowsort
SELECT DISTINCT - col0 + col1 * col0 AS col2 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT + 49 AS col0 FROM tab1 cor0
----
49
49
49

query I rowsort
SELECT ALL + 0 * - col0 + - col2 * + 26 * + col1 FROM tab0 cor0
----
-194012
-2522
-73788

onlyif mysql # use DIV operator for integer division
query I rowsort label-4186
SELECT ALL 23 DIV 81 + - col0 AS col2 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-4186
SELECT ALL 23 / 81 + - col0 AS col2 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4187
SELECT - CAST( col1 AS SIGNED ) * + col2 + col1 AS col1 FROM tab1 cor0
----
-1235
-1378
-560

skipif mysql # not compatible
query I rowsort label-4187
SELECT - CAST ( col1 AS INTEGER ) * + col2 + col1 AS col1 FROM tab1 cor0
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-4188
SELECT + - ( - 18 ) DIV + cor0.col0 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4188
SELECT + - ( - 18 ) / + cor0.col0 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4189
SELECT - - 84 DIV col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4189
SELECT - - 84 / col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - 83 + col2 FROM tab2 AS cor0
----
-45
-56
-57

query I rowsort
SELECT ALL - col1 * 45 * cor0.col1 FROM tab2 AS cor0
----
-13005
-156645
-43245

query I rowsort
SELECT DISTINCT - 36 * + col1 FROM tab0 AS cor0
----
-3096
-3276
-3492

query I rowsort
SELECT ALL + + 97 * col1 FROM tab0 AS cor0
----
8342
8827
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-4194
SELECT ALL tab1.col2 DIV - tab1.col0 FROM tab1, tab0 cor0
----
9 values hashing to 14c7df8a3f9c602e7f96d58d7cbe0e39

skipif mysql # not compatible
query I rowsort label-4194
SELECT ALL tab1.col2 / - tab1.col0 FROM tab1, tab0 cor0
----
9 values hashing to 14c7df8a3f9c602e7f96d58d7cbe0e39

onlyif mysql # use DIV operator for integer division
query I rowsort label-4195
SELECT ALL CAST( col1 AS SIGNED ) DIV - col2 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4195
SELECT ALL CAST ( col1 AS INTEGER ) / - col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT + col0 * col2 + - col1 + - 50 * col0 AS col2 FROM tab2 AS cor0
----
-192
-1931
-965

query I rowsort
SELECT - col0 * 50 AS col1 FROM tab0 cor0
----
-1200
-1750
-4450

query I rowsort
SELECT ALL 50 + 57 FROM tab0
----
107
107
107

query I rowsort
SELECT + 16 * - col2 + + col0 AS col2 FROM tab0
----
-1223
-504
19

query I rowsort
SELECT col0 + col2 * col0 AS col1 FROM tab0
----
70
7387
816

query I rowsort
SELECT ALL - cor0.col0 * - col0 + col0 AS col1 FROM tab0 cor0
----
1260
600
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-4202
SELECT DISTINCT 56 DIV + col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4202
SELECT DISTINCT 56 / + col1 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4203
SELECT ALL 26 DIV col1 + col2 * col1 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-4203
SELECT ALL 26 / col1 + col2 * col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col2 + 0 AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT col0 * 42 - - col0 AS col0 FROM tab1 AS cor0
----
129
2752
3440

query I rowsort
SELECT ALL ( 39 ) AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + - col2 * + 93 AS col0 FROM tab1 AS cor0
----
-5022
-5301
-8928

onlyif mysql # use DIV operator for integer division
query I rowsort label-4209
SELECT + col0 DIV col0 - 12 * col1 DIV - col0 AS col0 FROM tab1 AS cor0
----
105
2
2

skipif mysql # not compatible
query I rowsort label-4209
SELECT + col0 / col0 - 12 * col1 / - col0 AS col0 FROM tab1 AS cor0
----
105
2
2

query I rowsort
SELECT DISTINCT col1 + + col2 * + col2 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT + cor0.col0 + - col2 * - 9 AS col2 FROM tab1 cor0
----
489
577
944

query I rowsort
SELECT col0 * - 28 + 24 * col2 AS col1 FROM tab2 AS cor0
----
-1300
-1560
452

query I rowsort
SELECT - col1 - - ( - col2 ) AS col1 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-4214
SELECT col1 * - ( col0 ) + - col0 DIV + col0 FROM tab1 AS cor0
----
-1041
-641
-79

skipif mysql # not compatible
query I rowsort label-4214
SELECT col1 * - ( col0 ) + - col0 / + col0 FROM tab1 AS cor0
----
-1041
-641
-79

query I rowsort
SELECT col1 + 14 * + col0 * + col1 AS col1 FROM tab2 AS cor0
----
18819
3069
64487

onlyif mysql # use DIV operator for integer division
query I rowsort label-4216
SELECT + + col2 + - 93 * col0 DIV 79 FROM tab1 AS cor0
----
-18
2
51

skipif mysql # not compatible
query I rowsort label-4216
SELECT + + col2 + - 93 * col0 / 79 FROM tab1 AS cor0
----
-18
2
51

query I rowsort
SELECT - 39 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

query I rowsort
SELECT + 73 + cor0.col1 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to bb55bb7a7028c5833a465ed3eb1d8971

onlyif mysql # use DIV operator for integer division
query I rowsort label-4219
SELECT ALL - col1 DIV + col1 + - col2 AS col1 FROM tab1 cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-4219
SELECT ALL - col1 / + col1 + - col2 AS col1 FROM tab1 cor0
----
-55
-58
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4220
SELECT col0 * 80 * col1 - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4220
SELECT col0 * 80 * col1 - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - 35 + + ( + col2 ) AS col1 FROM tab0 AS cor0
----
117
36
68

query I rowsort
SELECT DISTINCT col0 * - col1 - - col2 AS col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL 34 * col0 AS col2 FROM tab1 AS cor0
----
102
2176
2720

query I rowsort
SELECT - + cor0.col0 - ( cor0.col1 ) * cor0.col0 AS col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT + - col0 + col1 + col2 FROM tab1 cor0
----
29
3
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-4226
SELECT ALL + - col2 DIV ( + col0 ) - col1 FROM tab2 cor0
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort label-4226
SELECT ALL + - col2 / ( + col0 ) - col1 FROM tab2 cor0
----
-17
-34
-59

query I rowsort
SELECT + col2 + + col1 * col2 AS col1 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-4228
SELECT - col1 DIV ( col0 * col1 ) FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4228
SELECT - col1 / ( col0 * col1 ) FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4229
SELECT col2 DIV ( col2 ) + col0 DIV + col0 + - col0 * col2 AS col2 FROM tab0 AS cor0
----
-33
-7296
-790

skipif mysql # not compatible
query I rowsort label-4229
SELECT col2 / ( col2 ) + col0 / + col0 + - col0 * col2 AS col2 FROM tab0 AS cor0
----
-33
-7296
-790

query I rowsort
SELECT ALL - 89 + col2 AS col1 FROM tab1 AS cor0
----
-32
-35
7

query I rowsort
SELECT ALL + - 41 + 80 FROM tab0 AS cor0
----
39
39
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-4232
SELECT + col2 DIV - 15 FROM tab2
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-4232
SELECT + col2 / - 15 FROM tab2
----
-1
-1
-2

query I rowsort
SELECT DISTINCT - ( ( - col0 ) + + col2 ) AS col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT cor1.col0 + 5 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
69
8
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4235
SELECT ALL CAST( NULL AS SIGNED ) + + col2 * col1 * 39 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4235
SELECT ALL CAST ( NULL AS INTEGER ) + + col2 * col1 * 39 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 44 + 74 AS col0 FROM tab2 AS cor0
----
118
118
118

query I rowsort
SELECT - col0 * ( - col0 ) + + ( col0 ) FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT DISTINCT - 36 + col2 AS col1 FROM tab2
----
-10
-9
2

query I rowsort
SELECT + 8 + 30 FROM tab2
----
38
38
38

query I rowsort
SELECT ALL + cor0.col2 * + ( col2 * col0 ) AS col1 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT DISTINCT col1 + + col1 * - col2 AS col0 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT + col0 + col2 * col1 AS col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT - - col2 * + ( col0 ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - col0 - 17 FROM tab2
----
-24
-95
-96

query I rowsort
SELECT ALL tab0.col2 - 3 * col1 * col2 FROM tab0
----
-22304
-290
-8481

query I rowsort
SELECT col2 * + cor0.col1 - col1 AS col0 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 - + col0 * + tab0.col1 col2 FROM tab0
----
-1978
-3298
-8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 10 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT + col1 * col2 - col2 FROM tab1
----
1152
1350
513

query I rowsort
SELECT DISTINCT + cor1.col2 FROM tab1, tab1 cor0, tab1 AS cor1, tab0, tab2 cor2
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4252
SELECT DISTINCT + 74 * col2 * - CAST( NULL AS SIGNED ) + - col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4252
SELECT DISTINCT + 74 * col2 * - CAST ( NULL AS INTEGER ) + - col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT 16 * - col2 + 73 FROM tab1 AS cor0
----
-1463
-791
-839

query I rowsort
SELECT + col0 + cor0.col0 * - 13 AS col1 FROM tab0 AS cor0
----
-1068
-288
-420

query I rowsort
SELECT ALL - - 38 * - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to eace425ba2b76abb8f0af969af56031e

query I rowsort
SELECT + col0 + + col1 * ( - col2 ) AS col1 FROM tab1 cor0
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-4257
SELECT DISTINCT - - ( - col2 ) * col1 + cor0.col0 + cor0.col1 DIV + col0 FROM tab1 AS cor0
----
-1168
-1393
-506

skipif mysql # not compatible
query I rowsort label-4257
SELECT DISTINCT - - ( - col2 ) * col1 + cor0.col0 + cor0.col1 / + col0 FROM tab1 AS cor0
----
-1168
-1393
-506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 * + col1 - col1 * 98 col1 FROM tab2 AS cor0
----
-1395
-2655
-765

onlyif mysql # use DIV operator for integer division
query I rowsort label-4259
SELECT ALL - + col2 DIV col0 AS col2 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-4259
SELECT ALL - + col2 / col0 AS col2 FROM tab2 AS cor0
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + + col2 * col0 col0 FROM tab1 cor0
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-4261
SELECT - col2 * - col1 * + col2 + + cor0.col1 * col2 DIV col1 FROM tab0 AS cor0
----
611966
93687
98

skipif mysql # not compatible
query I rowsort label-4261
SELECT - col2 * - col1 * + col2 + + cor0.col1 * col2 / col1 FROM tab0 AS cor0
----
611966
93687
98

query I rowsort
SELECT ALL - col1 + - col0 * + col2 * + col0 AS col2 FROM tab0 AS cor0
----
-1322
-19094
-649613

query I rowsort
SELECT DISTINCT cor0.col0 * 34 FROM tab0 AS cor0
----
1190
3026
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-4264
SELECT + + col0 DIV col1 + - col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-4264
SELECT + + col0 / col1 + - col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - col0 + - ( - cor0.col0 ) AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - col1 * 80 FROM tab1 AS cor0
----
-1040
-2080
-800

query I rowsort
SELECT + 53 FROM tab0 cor0
----
53
53
53

query I rowsort
SELECT ALL - - 23 - 47 FROM tab2 AS cor0
----
-24
-24
-24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 38 col0 FROM tab1 cor0
----
38
38
38

query I rowsort
SELECT ( col1 ) * + col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - 41 * + 12 FROM tab0 AS cor0
----
-492

query I rowsort
SELECT - + 90 + - 82 * cor0.col2 FROM tab1 AS cor0
----
-4518
-4764
-7962

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * ( + col0 ) col1 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT 1 AS col0 FROM tab1, tab1 AS cor0
----
1

query I rowsort
SELECT - col0 * - 61 FROM tab2 AS cor0
----
427
4758
4819

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4276
SELECT ALL + CAST( 20 AS SIGNED ) + col2 AS col2 FROM tab1 AS cor0
----
116
74
77

skipif mysql # not compatible
query I rowsort label-4276
SELECT ALL + CAST ( 20 AS INTEGER ) + col2 AS col2 FROM tab1 AS cor0
----
116
74
77

query I rowsort
SELECT DISTINCT - + cor0.col1 * ( col2 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT col0 * col2 * + col1 + ( col1 * - col0 ) AS col2 FROM tab1
----
35840
4134
98800

onlyif mysql # use DIV operator for integer division
query I rowsort label-4279
SELECT - col1 DIV + col0 AS col0 FROM tab0 cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-4279
SELECT - col1 / + col0 AS col0 FROM tab0 cor0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT - - col0 * col0 + + col1 AS col1 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT + 27 + col2 - col2 AS col1 FROM tab2 AS cor0
----
27
27
27

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab0 cor1, tab1, tab1 cor2
----
3645 values hashing to 90e25bbdedfdeba1119139dab203aeea

query I rowsort
SELECT DISTINCT - ( - 49 + - col2 ) AS col0 FROM tab2
----
75
76
87

query I rowsort
SELECT DISTINCT ( tab0.col1 * + 98 ) FROM tab0
----
8428
8918
9506

query I rowsort
SELECT ALL - 72 AS col0 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to b7689a8218ac9df1cca20d2ba5c53888

query I rowsort
SELECT DISTINCT - col0 * + tab2.col2 + col0 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT ALL ( col0 ) + + col0 AS col1 FROM tab2
----
14
156
158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4288
SELECT DISTINCT col0 * - col2 + - CAST( + col1 AS SIGNED ) * + tab0.col2 * 55 col1 FROM tab0
----
-156882
-417708
-5370

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4288
SELECT DISTINCT col0 * - col2 + - CAST ( + col1 AS INTEGER ) * + tab0.col2 * 55 col1 FROM tab0
----
-156882
-417708
-5370

query I rowsort
SELECT DISTINCT 26 FROM tab2, tab0 AS cor0, tab2 cor1, tab1 AS cor2
----
26

query I rowsort
SELECT ALL + 20 + col1 + + col0 AS col1 FROM tab1 AS cor0
----
113
49
94

query I rowsort
SELECT col1 * + col1 + - col1 AS col2 FROM tab0
----
7310
8190
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - ( ( + col0 ) + + tab2.col2 ) col1 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT + + tab2.col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + col1 * - col1 + - col0 AS col0 FROM tab2 AS cor0
----
-3559
-368
-968

query I rowsort
SELECT DISTINCT + col2 + - 59 AS col2 FROM tab1 AS cor0
----
-2
-5
37

query I rowsort
SELECT ( 50 ) FROM tab0, tab0 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT DISTINCT - col0 * - ( + col0 ) FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT 55 + + col1 * col2 AS col2 FROM tab0 AS cor0
----
152
2893
7517

query I rowsort
SELECT col1 * + ( col0 ) FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col2 * - 15 * + cor0.col2 AS col0 FROM tab1 cor0
----
-138240
-43740
-48735

query I rowsort
SELECT + 47 * + col2 AS col1 FROM tab1 AS cor0
----
2538
2679
4512

query I rowsort
SELECT - 71 * - col1 + - col0 FROM tab2 AS cor0
----
1128
2194
4111

query I rowsort
SELECT cor0.col2 * 18 AS col2 FROM tab0 cor0
----
1476
18
594

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 75 + + col2 * - col0 + - col2 col1 FROM tab1 AS cor0
----
-141
-3630
-7701

onlyif mysql # use DIV operator for integer division
query I rowsort label-4305
SELECT DISTINCT + col2 + + col2 DIV - col1 col1 FROM tab1 AS cor0
----
52
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4305
SELECT DISTINCT + col2 + + col2 / - col1 col1 FROM tab1 AS cor0
----
52
89

query I rowsort
SELECT - 93 + + 64 AS col0 FROM tab1 AS cor0
----
-29
-29
-29

query I rowsort
SELECT 13 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT + - col0 * + ( ( - cor0.col2 ) * 14 ) FROM tab1 cor0
----
107520
2268
51072

onlyif mysql # use DIV operator for integer division
query I rowsort label-4309
SELECT + cor0.col0 DIV - 14 + + col1 AS col1 FROM tab0 AS cor0
----
85
85
95

skipif mysql # not compatible
query I rowsort label-4309
SELECT + cor0.col0 / - 14 + + col1 AS col1 FROM tab0 AS cor0
----
85
85
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col0 * + 3 col1 FROM tab2 AS cor0
----
28
312
316

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + col0 col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + 82 * col1 FROM tab0
----
7052
7462
7954

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 cor1, tab1 AS cor2
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab2, tab2 cor1, tab2 AS cor2, tab1 AS cor3
----
3645 values hashing to 97b2ae21242e1e40418ee2ad06544f7a

query I rowsort
SELECT + col2 * 11 AS col2 FROM tab1 AS cor0
----
1056
594
627

query I rowsort
SELECT - cor0.col1 * ( - col2 ) * cor0.col2 + col0 AS col2 FROM tab2 AS cor0
----
22606
24627
39962

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4317
SELECT - + CAST( - ( + col2 ) AS SIGNED ) * - col2 FROM tab2 AS cor0
----
-1444
-676
-729

skipif mysql # not compatible
query I rowsort label-4317
SELECT - + CAST ( - ( + col2 ) AS INTEGER ) * - col2 FROM tab2 AS cor0
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 66 + + 1 col1 FROM tab2 cor0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT ( tab0.col0 ) * col2 * - 63 AS col0 FROM tab0
----
-2205
-459774
-49896

query I rowsort
SELECT - - cor0.col1 * - 15 AS col0 FROM tab2 AS cor0
----
-255
-465
-885

query I rowsort
SELECT 92 * col0 * - col2 AS col0 FROM tab2 AS cor0
----
-17388
-186576
-276184

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4322
SELECT - CAST( - col0 AS SIGNED ) * cor0.col1 FROM tab1 cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-4322
SELECT - CAST ( - col0 AS INTEGER ) * cor0.col1 FROM tab1 cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + 89 col0 FROM tab2 AS cor0
----
2314
2403
3382

query I rowsort
SELECT - + 10 + 90 * - cor0.col2 * - 70 FROM tab1 AS cor0
----
340190
359090
604790

query I rowsort
SELECT + cor0.col0 * - col2 + + 88 * col2 AS col0 FROM tab0 AS cor0
----
-82
2112
53

query I rowsort
SELECT - ( col0 ) * + 4 + - cor0.col1 FROM tab2 AS cor0
----
-333
-371
-59

query I rowsort
SELECT DISTINCT - - cor0.col2 + col0 + + col1 FROM tab1 cor0
----
131
189
83

query I rowsort
SELECT - + 78 + - col2 AS col0 FROM tab1 AS cor0
----
-132
-135
-174

query I rowsort
SELECT ALL + col2 * - col2 + 53 AS col0 FROM tab0 cor0
----
-1036
-6671
52

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( + 58 AS REAL ) FROM tab0
----
-58
-58
-58

query I rowsort
SELECT 60 * cor0.col1 AS col0 FROM tab1 AS cor0
----
1560
600
780

query I rowsort
SELECT - - ( - col0 ) * col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - - col2 + - ( 62 * cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-407
-4810
-4860

query I rowsort
SELECT ALL - + cor0.col2 * + col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT tab0.col2 * col0 - + col0 * - 61 AS col2 FROM tab0
----
12727
2170
2256

query I rowsort
SELECT DISTINCT 64 * col0 FROM tab2
----
448
4992
5056

query I rowsort
SELECT ALL col1 + ( - cor0.col2 ) AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - - col1 * 70 + col2 FROM tab2 cor0
----
1228
2197
4156

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4340
SELECT CAST( NULL AS SIGNED ) + + tab0.col1 * col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4340
SELECT CAST ( NULL AS INTEGER ) + + tab0.col1 * col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - col0 * col2 ) AS col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + ( - col2 * col0 ) FROM tab2
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + 38 AS REAL ) AS col1 FROM tab0
----
38
38
38

query I rowsort
SELECT + 96 * + col0 AS col1 FROM tab1 AS cor0
----
288
6144
7680

query I rowsort
SELECT 30 * - col0 + + tab2.col2 AS col1 FROM tab2
----
-183
-2314
-2332

query I rowsort
SELECT - cor1.col2 * + 8 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to b13c865cece75fac2e79147f6827d2ef

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 * 80 col0 FROM tab2
----
122720
51680
66960

query I rowsort
SELECT ALL col1 * - ( - 74 ) AS col2 FROM tab2 AS cor0
----
1258
2294
4366

query I rowsort
SELECT ALL - col0 + 6 * 34 * + cor0.col0 FROM tab0 AS cor0
----
18067
4872
7105

query I rowsort
SELECT + col1 * - 49 FROM tab1 cor0
----
-1274
-490
-637

query I rowsort
SELECT - 65 + ( col1 ) AS col2 FROM tab0 AS cor0
----
21
26
32

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 cor0, tab1 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 4037d65571c1bbf6e0e7d759f858120e

query I rowsort
SELECT + ( + col0 ) * col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + 65 + col0 FROM tab0
----
100
154
89

query I rowsort
SELECT DISTINCT 56 + col1 AS col2 FROM tab2
----
115
73
87

query I rowsort
SELECT ( + col2 ) * + col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL - cor0.col2 + - 30 AS col1 FROM tab2 cor0
----
-56
-57
-68

query I rowsort
SELECT DISTINCT - 21 * + 37 * col1 FROM tab2 AS cor0
----
-13209
-24087
-45843

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4359
SELECT ALL - CAST( NULL AS SIGNED ) * col0 + - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4359
SELECT ALL - CAST ( NULL AS INTEGER ) * col0 + - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + + col0 * + 1 AS col1 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4362
SELECT DISTINCT + CAST( col1 AS SIGNED ) + + col1 * 8 AS col1 FROM tab2 AS cor0
----
153
279
531

skipif mysql # not compatible
query I rowsort label-4362
SELECT DISTINCT + CAST ( col1 AS INTEGER ) + + col1 * 8 AS col1 FROM tab2 AS cor0
----
153
279
531

query I rowsort
SELECT ALL + ( + col2 ) * col0 + ( ( - col1 ) ) FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT + + 87 AS col2 FROM tab1 AS cor0
----
87
87
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-4365
SELECT tab2.col2 DIV + tab2.col1 + ( + col2 ) * col1 FROM tab2
----
1534
648
837

skipif mysql # not compatible
query I rowsort label-4365
SELECT tab2.col2 / + tab2.col1 + ( + col2 ) * col1 FROM tab2
----
1534
648
837

query I rowsort
SELECT DISTINCT + col2 * - col1 + col0 * - col1 FROM tab0 AS cor0
----
-15561
-3492
-4902

query I rowsort
SELECT - 9 + + col2 + 60 AS col1 FROM tab1 cor0
----
105
108
147

onlyif mysql # use DIV operator for integer division
query I rowsort label-4368
SELECT DISTINCT + - col2 DIV - col0 AS col2 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-4368
SELECT DISTINCT + - col2 / - col0 AS col2 FROM tab0 AS cor0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4369
SELECT col0 * 46 DIV + 96 FROM tab0 cor0
----
11
16
42

skipif mysql # not compatible
query I rowsort label-4369
SELECT col0 * 46 / + 96 FROM tab0 cor0
----
11
16
42

query I rowsort
SELECT DISTINCT + + col0 * 30 AS col0 FROM tab2 AS cor0
----
210
2340
2370

query I rowsort
SELECT DISTINCT - - col1 * + 56 AS col0 FROM tab2 cor0
----
1736
3304
952

query I rowsort
SELECT ALL cor0.col2 * col1 + - 67 FROM tab0 AS cor0
----
2771
30
7395

query I rowsort
SELECT ALL - - col0 * ( col0 ) FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + col1 * + col1 + + col2 AS col2 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT ALL - tab2.col2 * tab2.col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 34c958561bd6b2ab014ab6e0643406fa

query I rowsort
SELECT 4 + + col1 AS col2 FROM tab2
----
21
35
63

query I rowsort
SELECT ALL - 87 * tab0.col2 FROM tab0
----
-2871
-7134
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col2 col1 FROM tab0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4379
SELECT + col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4379
SELECT + col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 + - col2 * + 81 AS col1 FROM tab1 AS cor0
----
-4348
-4607
-7763

query I rowsort
SELECT DISTINCT col2 + 23 AS col1 FROM tab0 AS cor0
----
105
24
56

query I rowsort
SELECT DISTINCT + col2 + - 21 FROM tab1 AS cor0
----
33
36
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4383
SELECT DISTINCT - cor0.col2 * - CAST( NULL AS SIGNED ) + - 83 AS col1 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4383
SELECT DISTINCT - cor0.col2 * - CAST ( NULL AS INTEGER ) + - 83 AS col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL + - col2 * col2 + + ( + col1 ) FROM tab0 AS cor0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4385
SELECT 74 DIV col0 FROM tab0 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-4385
SELECT 74 / col0 FROM tab0 AS cor0
----
0
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col0 FROM tab2 AS cor0
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col2 col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT - ( + 25 ) AS col0 FROM tab0 AS cor0
----
-25
-25
-25

query I rowsort
SELECT col1 + - 16 AS col0 FROM tab2
----
1
15
43

query I rowsort
SELECT ALL tab0.col1 * - col0 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + 64 * - col1 - + 63 AS col1 FROM tab0 AS cor0
----
-5567
-5887
-6271

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4392
SELECT DISTINCT - col1 + - col0 + - CAST( - col1 AS SIGNED ) FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4392
SELECT DISTINCT - col1 + - col0 + - CAST ( - col1 AS INTEGER ) FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4393
SELECT ALL - - 50 + col1 - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4393
SELECT ALL - - 50 + col1 - CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - cor0.col1 + cor0.col2 * col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT tab2.col0 * 14 AS col1 FROM tab2
----
1092
1106
98

query I rowsort
SELECT ALL - - cor0.col2 * col2 + - ( + cor0.col1 ) + cor0.col1 FROM tab0 cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-4397
SELECT 48 * col0 + col2 DIV 55 FROM tab1 cor0
----
144
3073
3841

skipif mysql # not compatible
query I rowsort label-4397
SELECT 48 * col0 + col2 / 55 FROM tab1 cor0
----
144
3073
3841

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 38 col2 FROM tab0 AS cor0
----
38
38
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4399
SELECT DISTINCT - - col1 / + col0 + + CAST( NULL AS SIGNED ) - + col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4399
SELECT DISTINCT - - col1 / + col0 + + CAST ( NULL AS INTEGER ) - + col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - 4 + col2 AS col2 FROM tab0 cor0
----
-3
29
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4401
SELECT ALL 99 + col0 DIV - ( + col2 ) col0 FROM tab0 AS cor0
----
64
98
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4401
SELECT ALL 99 + col0 / - ( + col2 ) col0 FROM tab0 AS cor0
----
64
98
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + col1 col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + - ( - col0 ) * - col1 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4404
SELECT DISTINCT - + cor0.col1 * - CAST( 99 AS SIGNED ) FROM tab1, tab2 AS cor0
----
1683
3069
5841

skipif mysql # not compatible
query I rowsort label-4404
SELECT DISTINCT - + cor0.col1 * - CAST ( 99 AS INTEGER ) FROM tab1, tab2 AS cor0
----
1683
3069
5841

query I rowsort
SELECT - + cor0.col1 * + 58 AS col1 FROM tab2 cor0
----
-1798
-3422
-986

query I rowsort
SELECT DISTINCT - - col2 + - 6 AS col1 FROM tab1 cor0
----
48
51
90

query I rowsort
SELECT DISTINCT - tab1.col2 * - 27 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
1458
1539
2592

query I rowsort
SELECT - ( - col1 ) * col0 * col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT - 20 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
-1280
-1600
-60

query I rowsort
SELECT DISTINCT ( + col0 ) + col2 * - 12 AS col1 FROM tab0 AS cor0
----
-372
-895
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 * 39 col0 FROM tab2 AS cor0
----
1040
1080
1520

query I rowsort
SELECT 54 * - tab0.col0 AS col0 FROM tab0
----
-1296
-1890
-4806

query I rowsort
SELECT - 45 * + ( col2 + col2 ) AS col0 FROM tab2
----
-2340
-2430
-3420

onlyif mysql # use DIV operator for integer division
query I rowsort label-4414
SELECT + col1 DIV 56 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4414
SELECT + col1 / 56 FROM tab0
----
1
1
1

query I rowsort
SELECT 10 * + ( col1 * col2 ) FROM tab2
----
15340
6460
8370

query I rowsort
SELECT DISTINCT - ( + ( tab1.col0 ) ) * + col0 AS col1 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - tab2.col2 + + col1 * - col0 - - tab2.col2 FROM tab2
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4418
SELECT - col1 * col0 + - col1 DIV col2 FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-4418
SELECT - col1 * col0 + - col1 / col2 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4419
SELECT ALL ( - col2 ) * tab2.col0 - - CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4419
SELECT ALL ( - col2 ) * tab2.col0 - - CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 - - 95 AS col2 FROM tab2
----
121
122
133

query I rowsort
SELECT + + col2 + - ( col0 ) FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - col2 * col1 - col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT ALL 1 AS col0 FROM tab1
----
1
1
1

query I rowsort
SELECT DISTINCT - 74 * + col1 FROM tab0
----
-6364
-6734
-7178

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab0, tab0 cor1, tab0 AS cor2
----
972 values hashing to 3406497351e4789c89a295ee9b64b201

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - cor0.col2 ) col1 FROM tab0, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4427
SELECT - col1 + - CAST( - 86 AS SIGNED ) FROM tab1 AS cor0
----
60
73
76

skipif mysql # not compatible
query I rowsort label-4427
SELECT - col1 + - CAST ( - 86 AS INTEGER ) FROM tab1 AS cor0
----
60
73
76

query I rowsort
SELECT - 86 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

skipif mysql # not compatible
query I rowsort
SELECT cor0.col1 + + CAST ( col2 AS REAL ) * cor0.col2 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT - col1 + - col1 * col1 FROM tab1 AS cor0
----
-110
-182
-702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * 10 * + col0 col0 FROM tab2
----
13430
2170
46020

query I rowsort
SELECT DISTINCT - col2 * 27 * col1 FROM tab1
----
-15390
-33696
-37908

onlyif mysql # use DIV operator for integer division
query I rowsort label-4433
SELECT + col0 DIV col0 + - col1 AS col2 FROM tab1
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-4433
SELECT + col0 / col0 + - col1 AS col2 FROM tab1
----
-12
-25
-9

query I rowsort
SELECT + ( 62 ) * + col0 AS col1 FROM tab2 AS cor0
----
434
4836
4898

query I rowsort
SELECT - - col0 * cor0.col2 FROM tab0 cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4436
SELECT ALL + CAST( + col2 AS SIGNED ) * col2 FROM tab0 AS cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-4436
SELECT ALL + CAST ( + col2 AS INTEGER ) * col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT 23 * 39 AS col0 FROM tab2 AS cor0
----
897
897
897

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + cor0.col0 col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL - - 99 AS col0 FROM tab1 cor0
----
99
99
99

query I rowsort
SELECT ALL 43 + col1 FROM tab2 AS cor0
----
102
60
74

query I rowsort
SELECT + + 52 * - col0 FROM tab1 AS cor0
----
-156
-3328
-4160

query I rowsort
SELECT ALL + - col1 + + 69 FROM tab0 AS cor0
----
-17
-22
-28

query I rowsort
SELECT DISTINCT - col0 * ( col0 ) + col2 AS col0 FROM tab1 AS cor0
----
-4039
-6304
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-4444
SELECT + ( + col1 ) * 79 - + col0 DIV + col1 FROM tab0
----
6794
7189
7663

skipif mysql # not compatible
query I rowsort label-4444
SELECT + ( + col1 ) * 79 - + col0 / + col1 FROM tab0
----
6794
7189
7663

query I rowsort
SELECT 41 * col1 * + col0 + - col0 FROM tab0 AS cor0
----
139160
331970
84600

query I rowsort
SELECT + 33 * col2 + - col1 AS col0 FROM tab0 AS cor0
----
-64
1003
2615

query I rowsort
SELECT + 57 * col1 + + col1 FROM tab2 AS cor0
----
1798
3422
986

query I rowsort
SELECT + cor0.col1 + - col1 + + col2 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + 25 col0 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT + cor0.col1 + + col2 + col1 * + col0 AS col0 FROM tab0 AS cor0
----
2183
3493
8272

query I rowsort
SELECT DISTINCT + + col2 + 65 * col2 AS col0 FROM tab0 AS cor0
----
2178
5412
66

query I rowsort
SELECT ALL + col1 * col2 AS col0 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - - col1 * 26 AS col2 FROM tab1 AS cor0
----
260
338
676

query I rowsort
SELECT + tab0.col2 - + tab0.col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT - - 58 * col0 AS col1 FROM tab2 AS cor0
----
406
4524
4582

query I rowsort
SELECT DISTINCT 30 * col2 + + 64 FROM tab2 cor0
----
1204
844
874

query I rowsort
SELECT ALL col2 + - col0 * + cor0.col0 FROM tab0 AS cor0
----
-1224
-543
-7839

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * col2 * + ( + ( + cor0.col2 ) ) col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT DISTINCT 84 + + col2 AS col2 FROM tab2 AS cor0
----
110
111
122

query I rowsort
SELECT - ( tab2.col2 * col1 ) + + col2 FROM tab2
----
-1508
-608
-810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * 22 col1 FROM tab1
----
1408
1760
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4462
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + col1 AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4462
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + col1 AS col1 FROM tab0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4463
SELECT - col0 * - ( tab1.col2 ) * - CAST( NULL AS SIGNED ) + ( col0 * ( + tab1.col1 ) + col2 ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4463
SELECT - col0 * - ( tab1.col2 ) * - CAST ( NULL AS INTEGER ) + ( col0 * ( + tab1.col1 ) + col2 ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + ( col1 ) * + col0 + col1 AS col0 FROM tab2
----
1360
248
4661

query I rowsort
SELECT ALL 53 * - col1 AS col1 FROM tab2 AS cor0
----
-1643
-3127
-901

query I rowsort
SELECT ALL ( col0 ) * + 93 + col1 AS col1 FROM tab2 AS cor0
----
682
7313
7364

query I rowsort
SELECT DISTINCT + cor0.col1 + - col1 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT col1 - - 25 * + cor0.col0 FROM tab0 AS cor0
----
2316
686
972

query I rowsort
SELECT 99 + - col2 FROM tab2 cor0
----
61
72
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-4470
SELECT DISTINCT - col0 DIV + col1 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4470
SELECT DISTINCT - col0 / + col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + col0 + + 43 AS col2 FROM tab0 AS cor0
----
132
67
78

query I rowsort
SELECT ALL - 62 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d2579f9395350eda865ff3a2d38a74f6

query I rowsort
SELECT 97 FROM tab2, tab0 cor0, tab2 cor1, tab2 AS cor2
----
81 values hashing to f1d3319b9491f64621f2dbb0808458ca

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4474
SELECT DISTINCT + + CAST( NULL AS SIGNED ) + + cor0.col1 * - col2 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4474
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) + + cor0.col1 * - col2 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + cor1.col2 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
26
27
38

query I rowsort
SELECT ALL ( + 6 ) * - cor0.col1 + + col2 FROM tab1 AS cor0
----
-102
-3
18

query I rowsort
SELECT DISTINCT - + 88 + - col0 AS col1 FROM tab1 cor0
----
-152
-168
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-4478
SELECT ALL + - col0 + col0 DIV col1 FROM tab2 AS cor0
----
-7
-75
-77

skipif mysql # not compatible
query I rowsort label-4478
SELECT ALL + - col0 + col0 / col1 FROM tab2 AS cor0
----
-7
-75
-77

query I rowsort
SELECT ALL ( col1 ) * + col1 + - col2 AS col1 FROM tab1 AS cor0
----
43
622
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4480
SELECT + CAST( NULL AS SIGNED ) * + col2 + + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4480
SELECT + CAST ( NULL AS INTEGER ) * + col2 + + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 30 * col1 AS col0 FROM tab0 AS cor0
----
-2580
-2730
-2910

query I rowsort
SELECT DISTINCT - col0 + ( - col1 ) FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT - + cor0.col2 + - ( col2 ) FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT + col2 * + col2 + col0 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
14022
1881
36

query I rowsort
SELECT ALL + 27 * + 22 AS col2 FROM tab1 AS cor0
----
594
594
594

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4486
SELECT + - CAST( NULL AS SIGNED ) * + cor0.col0 + col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4486
SELECT + - CAST ( NULL AS INTEGER ) * + cor0.col0 + col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 26 - - col2 FROM tab1 AS cor0
----
28
31
70

query I rowsort
SELECT ALL - 83 * - 78 - - col0 * col1 AS col1 FROM tab0 AS cor0
----
14573
8538
9869

query I rowsort
SELECT - - 28 * + col1 FROM tab0 AS cor0
----
2408
2548
2716

query I rowsort
SELECT - - col2 + - cor0.col0 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT ( col0 ) * 65 + - col0 FROM tab1 AS cor0
----
192
4096
5120

query I rowsort
SELECT - col1 * - col0 + ( col2 ) FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-4493
SELECT ALL + - col0 DIV + col0 col2 FROM tab2 cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4493
SELECT ALL + - col0 / + col0 col2 FROM tab2 cor0
----
-1
-1
-1

query I rowsort
SELECT - 53 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 2876418587c77a182d88db2907b0a51a

query I rowsort
SELECT ALL + tab1.col0 * + 33 - tab1.col2 AS col2 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 901b09c3547f636eededaaadadce61df

query I rowsort
SELECT + col0 * - ( col2 ) FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT - + col1 * cor0.col2 AS col2 FROM tab0 cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - ( - col1 ) + + ( + col2 ) - cor0.col0 col2 FROM tab2 AS cor0
----
-330
-3533
-941

query I rowsort
SELECT ALL col2 * col1 + - col2 + col2 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + + cor0.col0 - + col2 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4501
SELECT + + CAST( NULL AS SIGNED ) * + col2 * - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4501
SELECT + + CAST ( NULL AS INTEGER ) * + col2 * - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 95 * col2 col1 FROM tab0 AS cor0
----
3135
7790
95

query I rowsort
SELECT cor0.col0 + cor0.col0 - + col1 FROM tab2 AS cor0
----
-17
141
97

query I rowsort
SELECT DISTINCT - 26 FROM tab1, tab2 AS cor0
----
-26

query I rowsort
SELECT ALL + col0 * col0 + col0 * + col2 FROM tab0
----
1260
1368
15219

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0, tab0 AS cor0 WHERE NULL <> + cor0.col1
----

query I rowsort
SELECT ALL col2 + - col2 * col0 AS col0 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT - col0 * + cor0.col1 * + col0 AS col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT - col1 AS col2 FROM tab0 AS cor0 WHERE NOT col0 * + col2 = NULL
----

query I rowsort
SELECT col0 AS col2 FROM tab2 AS cor0 WHERE col0 + + col2 IN ( + col0 )
----

query I rowsort
SELECT DISTINCT + col2 + - col1 * + col1 * col1 FROM tab0
----
-636023
-753489
-912672

query I rowsort
SELECT DISTINCT col2 * col1 + + col2 - tab1.col1 AS col2 FROM tab1
----
1331
1432
617

query I rowsort
SELECT DISTINCT + tab0.col0 + + col0 AS col0 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL - col2 FROM tab0 WHERE NOT col0 IN ( + col2 / + col2 )
----
-1
-33
-82

query I rowsort
SELECT ALL tab1.col0 FROM tab1 WHERE NULL NOT BETWEEN - col1 * + col0 + col0 AND ( - col0 * col2 * + tab1.col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col2 * tab2.col0 col2 FROM tab2
----
-162
-2002
-2964

query III rowsort
SELECT * FROM tab2 WHERE NULL = - col1 + + col1
----

query I rowsort
SELECT ALL + col1 AS col2 FROM tab0 WHERE NOT NULL > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4519
SELECT + - col1 * + col1 DIV + col1 + + col2 FROM tab0 AS cor0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-4519
SELECT + - col1 * + col1 / + col1 + + col2 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col0 col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL col0 FROM tab0 AS cor0 WHERE ( NULL ) >= - col0 * col0 OR NOT NULL = ( NULL )
----

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT col0 > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4523
SELECT ALL col0 DIV - col1 AS col0 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-4523
SELECT ALL col0 / - col1 AS col0 FROM tab2 cor0
----
-1
-4
0

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab2 WHERE NOT col2 + - col2 BETWEEN NULL AND ( - col1 )
----
7
78
79

query I rowsort
SELECT DISTINCT - col1 - + ( + col2 ) * + col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT ALL col2 + + ( - col2 ) * cor0.col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT + col1 + cor0.col1 * + col1 * col2 AS col1 FROM tab1 AS cor0
----
16237
36530
5710

query I rowsort
SELECT 0 * - col2 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4529
SELECT + col0 + - CAST( + col1 + col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-148
-159
-93

skipif mysql # not compatible
query I rowsort label-4529
SELECT + col0 + - CAST ( + col1 + col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-148
-159
-93

query I rowsort
SELECT ALL + + col2 + + col1 * - col1 FROM tab1 cor0
----
-43
-622
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-4531
SELECT - cor0.col1 * - col1 + col1 DIV - col2 AS col2 FROM tab1 AS cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort label-4531
SELECT - cor0.col1 * - col1 + col1 / - col2 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT - col1 * ( + cor0.col2 ) - - col1 * + col0 AS col1 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT - + cor0.col2 * ( col0 ) + col1 * cor0.col2 * + 16 FROM tab0 AS cor0
----
112094
1517
44616

query I rowsort
SELECT ALL + col1 * col0 + + 4 FROM tab1 cor0
----
1044
644
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4535
SELECT + ( - col1 ) * - ( + tab0.col2 * col1 ) - CAST( NULL AS DECIMAL ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4535
SELECT + ( - col1 ) * - ( + tab0.col2 * col1 ) - CAST ( NULL AS REAL ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 61 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

query I rowsort
SELECT DISTINCT + - 42 - 6 AS col1 FROM tab1, tab2 AS cor0, tab2, tab0 AS cor1
----
-48

onlyif mysql # use DIV operator for integer division
query I rowsort label-4538
SELECT DISTINCT + + col1 + - ( cor0.col2 ) DIV + col1 + + col1 FROM tab0 AS cor0
----
172
182
194

skipif mysql # not compatible
query I rowsort label-4538
SELECT DISTINCT + + col1 + - ( cor0.col2 ) / + col1 + + col1 FROM tab0 AS cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + 55 col2 FROM tab1 AS cor0
----
-2
-41
1

query I rowsort
SELECT - - col0 * - 31 FROM tab1 AS cor0
----
-1984
-2480
-93

query I rowsort
SELECT ALL col1 + + cor0.col1 * col0 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT + + col1 * 79 FROM tab2 AS cor0
----
1343
2449
4661

query I rowsort
SELECT DISTINCT col1 * col1 * + tab1.col0 + + col1 AS col1 FROM tab1
----
13533
2054
6410

query I rowsort
SELECT + col0 + col2 * + col2 - + col2 AS col0 FROM tab1
----
2865
3256
9200

query I rowsort
SELECT DISTINCT tab0.col0 + + col1 * + col1 + - col0 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT tab1.col2 + col1 * + col2 AS col2 FROM tab1
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-4547
SELECT DISTINCT + col0 + col1 DIV col1 AS col0 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-4547
SELECT DISTINCT + col0 + col1 / col1 AS col0 FROM tab0
----
25
36
90

query I rowsort
SELECT DISTINCT + col0 + tab0.col1 + col1 FROM tab0
----
196
229
271

query I rowsort
SELECT + col1 * col1 + + col2 AS col0 FROM tab2
----
327
3507
988

query I rowsort
SELECT DISTINCT col1 - col1 AS col0 FROM tab2 WHERE NOT col2 - + col0 * + col1 BETWEEN col1 * col0 * - col0 AND col1
----

query I rowsort
SELECT DISTINCT + col2 * col2 * col2 FROM tab2
----
17576
19683
54872

query I rowsort
SELECT ALL col2 + col0 + col1 FROM tab0
----
133
143
262

onlyif mysql # use DIV operator for integer division
query I rowsort label-4553
SELECT col1 * + tab1.col2 DIV col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4553
SELECT col1 * + tab1.col2 / col2 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL - col0 + col1 + - col1 AS col1 FROM tab0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4555
SELECT DISTINCT + col2 DIV col1 col1 FROM tab2
----
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4555
SELECT DISTINCT + col2 / col1 col1 FROM tab2
----
0
2

query I rowsort
SELECT DISTINCT col2 + col1 + - col1 * + col2 FROM tab0
----
-2719
-7289
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4557
SELECT - col0 * col2 DIV - tab0.col2 AS col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4557
SELECT - col0 * col2 / - tab0.col2 AS col2 FROM tab0
----
24
35
89

query I rowsort
SELECT + + ( col0 ) + - col2 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - 15 + + col1 AS col0 FROM tab1 AS cor0
----
-2
-5
11

query I rowsort
SELECT ALL col2 - - cor0.col1 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT col2 * col2 + + 2 AS col0 FROM tab0 cor0
----
1091
3
6726

query I rowsort
SELECT col2 * - col1 + + col1 FROM tab2
----
-1475
-629
-806

onlyif mysql # use DIV operator for integer division
query I rowsort label-4563
SELECT DISTINCT col0 DIV col1 + - ( - 35 ) FROM tab1 AS cor0
----
35
41

skipif mysql # not compatible
query I rowsort label-4563
SELECT DISTINCT col0 / col1 + - ( - 35 ) FROM tab1 AS cor0
----
35
41

query I rowsort
SELECT ALL + + col0 + col2 + - col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + col2 * - 30 + - col2 FROM tab1 AS cor0
----
-1674
-1767
-2976

query I rowsort
SELECT ALL - + col0 * + ( - col0 ) + - col0 * + col2 + col1 * col1 FROM tab2 AS cor0
----
3528
7537
821

query I rowsort
SELECT + + col2 + 2 AS col0 FROM tab1 AS cor0
----
56
59
98

query I rowsort
SELECT - - col0 + - ( + col0 ) AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + cor0.col2 * col0 AS col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - col0 + + 68 AS col2 FROM tab1 AS cor0
----
-12
4
65

query I rowsort
SELECT - + col1 + - 94 AS col1 FROM tab2 AS cor0
----
-111
-125
-153

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4572
SELECT ALL - col0 * CAST( NULL AS SIGNED ) + - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4572
SELECT ALL - col0 * CAST ( NULL AS INTEGER ) + - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4573
SELECT + col0 DIV + 13 + - 0 FROM tab1 AS cor0
----
0
4
6

skipif mysql # not compatible
query I rowsort label-4573
SELECT + col0 / + 13 + - 0 FROM tab1 AS cor0
----
0
4
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4574
SELECT ALL - col1 DIV ( - col0 ) + col1 col1 FROM tab2 AS cor0
----
17
35
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4574
SELECT ALL - col1 / ( - col0 ) + col1 col1 FROM tab2 AS cor0
----
17
35
59

query I rowsort
SELECT DISTINCT + col0 * + ( col0 ) FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT col2 - + 77 AS col2 FROM tab0 AS cor0
----
-44
-76
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4577
SELECT ALL - col1 * - CAST( - col2 AS SIGNED ) + col1 FROM tab2 AS cor0
----
-1475
-629
-806

skipif mysql # not compatible
query I rowsort label-4577
SELECT ALL - col1 * - CAST ( - col2 AS INTEGER ) + col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT ALL - col0 * 24 * + col0 AS col0 FROM tab0 AS cor0
----
-13824
-190104
-29400

onlyif mysql # use DIV operator for integer division
query I rowsort label-4579
SELECT ALL col1 DIV tab2.col0 + + 71 * col0 DIV + col1 col1 FROM tab2
----
20
329
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4579
SELECT ALL col1 / tab2.col0 + + 71 * col0 / + col1 col1 FROM tab2
----
20
329
93

skipif mysql # not compatible
query I rowsort
SELECT - + CAST ( + 11 AS REAL ) + col2 * - cor0.col2 * col1 FROM tab0 cor0
----
-108
-611895
-93665

onlyif mysql # use DIV operator for integer division
query I rowsort label-4581
SELECT 83 DIV 85 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-4581
SELECT 83 / 85 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL - col2 * col2 + col1 + + col0 FROM tab2 AS cor0
----
-1348
-539
-691

query I rowsort
SELECT ALL - 7 + - cor0.col0 * - col0 AS col0 FROM tab1 AS cor0
----
2
4089
6393

query I rowsort
SELECT + - col0 * col1 + col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL + col2 * + cor0.col2 + ( - col2 ) FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT 39 - cor0.col0 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 976605ed97ed8986a426a05eb32f6e0d

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 * ( - col1 + col2 ) FROM tab1 cor0
----
-14027
-18928
-4700

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 * 96 AS col2 FROM tab1 AS cor0
----
-119808
-134784
-54720

query I rowsort
SELECT + 98 + + col1 AS col0 FROM tab0 AS cor0
----
184
189
195

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4590
SELECT DISTINCT CAST( col1 + + col1 AS SIGNED ) FROM tab2
----
118
34
62

skipif mysql # not compatible
query I rowsort label-4590
SELECT DISTINCT CAST ( col1 + + col1 AS INTEGER ) FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT + + 85 AS col1 FROM tab2, tab0, tab1 cor0
----
85

query I rowsort
SELECT ALL - 17 + - col0 FROM tab2
----
-24
-95
-96

query I rowsort
SELECT tab1.col0 + - col2 + col0 FROM tab1
----
-48
64
71

query I rowsort
SELECT - col0 + + col2 * col1 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT ALL 32 + + col0 * - col0 AS col2 FROM tab0 AS cor0
----
-1193
-544
-7889

query I rowsort
SELECT ALL ( - col0 ) * 72 * + col1 FROM tab2 cor0
----
-15624
-331344
-96696

onlyif mysql # use DIV operator for integer division
query I rowsort label-4597
SELECT DISTINCT - + col0 + + col0 DIV - cor0.col1 + - col1 FROM tab1 AS cor0
----
-29
-80
-99

skipif mysql # not compatible
query I rowsort label-4597
SELECT DISTINCT - + col0 + + col0 / - cor0.col1 + - col1 FROM tab1 AS cor0
----
-29
-80
-99

query I rowsort
SELECT DISTINCT + 4 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
4

query I rowsort
SELECT 78 - 93 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 91b10a00c89b36b5bf0bed723e656ccc

query I rowsort
SELECT ALL + col2 + col2 + - col1 * - tab1.col2 AS col0 FROM tab1
----
1440
1512
684

query I rowsort
SELECT - col0 + + col2 + col2 * tab1.col0 * col1 AS col1 FROM tab1
----
36473
4263
99856

query I rowsort
SELECT + col0 * + col2 + - cor0.col1 FROM tab0 cor0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-4603
SELECT 62 DIV - col0 AS col2 FROM tab0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-4603
SELECT 62 / - col0 AS col2 FROM tab0
----
-1
-2
0

query I rowsort
SELECT DISTINCT + - cor0.col1 - - col0 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT - - cor0.col0 * + col2 + - col0 AS col1 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT col1 * + col0 * - col0 AS col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT - 17 + col2 * + cor0.col1 FROM tab0 AS cor0
----
2821
7445
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4608
SELECT DISTINCT - CAST( NULL AS SIGNED ) + col0 * - col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4608
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + col0 * - col0 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 92 * col2 col1 FROM tab2 AS cor0
----
2392
2484
3496

query I rowsort
SELECT DISTINCT - cor0.col2 + + col2 * + col1 AS col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT DISTINCT - ( - 98 ) * col2 + + cor0.col1 FROM tab2 AS cor0
----
2607
2677
3741

query I rowsort
SELECT ALL col2 + - ( + col0 ) AS col1 FROM tab2 AS cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * - col1 col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT cor0.col1 * col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT + ( - 32 ) * tab1.col1 AS col2 FROM tab1
----
-320
-416
-832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4616
SELECT - CAST( 66 AS SIGNED ) AS col2 FROM tab2
----
-66
-66
-66

skipif mysql # not compatible
query I rowsort label-4616
SELECT - CAST ( 66 AS INTEGER ) AS col2 FROM tab2
----
-66
-66
-66

query I rowsort
SELECT ( + col2 ) * cor0.col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - - 53 * col2 AS col2 FROM tab1 AS cor0
----
2862
3021
5088

query I rowsort
SELECT DISTINCT 42 AS col0 FROM tab2, tab1 AS cor0
----
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 40 col0 FROM tab2 cor0
----
40
40
40

query I rowsort
SELECT DISTINCT + 81 * - 28 + col0 * + ( 97 ) AS col0 FROM tab0
----
1127
60
6365

query I rowsort
SELECT ALL + + 16 * + col2 AS col0 FROM tab2 AS cor0
----
416
432
608

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col1 + col1 * ( col1 ) col2 FROM tab2 AS cor0
----
1922
578
6962

query I rowsort
SELECT ALL - col0 + + col0 * - ( - 95 ) AS col0 FROM tab1 cor0
----
282
6016
7520

query I rowsort
SELECT - col2 + + 21 * - ( col0 ) * col1 FROM tab0
----
-170161
-43377
-71296

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4626
SELECT + col1 + CAST( NULL AS SIGNED ) * 49 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4626
SELECT + col1 + CAST ( NULL AS INTEGER ) * 49 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * ( + tab1.col1 * col0 ) col1 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT 58 * cor0.col0 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to da6e9e31125edfaa01597c20a1ea2a10

onlyif mysql # use DIV operator for integer division
query I rowsort label-4629
SELECT col1 DIV - ( tab1.col1 ) col2 FROM tab1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4629
SELECT col1 / - ( tab1.col1 ) col2 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT + col0 + - 2 FROM tab2 AS cor0
----
5
76
77

query I rowsort
SELECT + cor0.col0 + - 2 AS col1 FROM tab1 cor0
----
1
62
78

query I rowsort
SELECT - - col0 * - col1 + + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL ( - col1 ) + + col1 * + col0 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT DISTINCT + 58 + col0 * cor0.col1 FROM tab0 AS cor0
----
2122
3453
8157

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 col1 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT + + col1 * 67 + + col1 * cor0.col1 FROM tab0 AS cor0
----
13158
14378
15908

query I rowsort
SELECT ALL + 17 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT ALL + 63 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

onlyif mysql # use DIV operator for integer division
query I rowsort label-4639
SELECT DISTINCT - col2 DIV 86 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-4639
SELECT DISTINCT - col2 / 86 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT ALL ( col0 ) + + col1 * + 36 AS col0 FROM tab1 AS cor0
----
424
548
939

query I rowsort
SELECT col0 * - cor0.col0 + - col0 FROM tab1 AS cor0
----
-12
-4160
-6480

query I rowsort
SELECT ALL - + 31 AS col0 FROM tab2 AS cor0
----
-31
-31
-31

query I rowsort
SELECT 28 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT ALL cor0.col0 * - col0 * col0 FROM tab1 AS cor0
----
-262144
-27
-512000

query I rowsort
SELECT - - 82 * cor0.col0 + col1 AS col0 FROM tab1 AS cor0
----
272
5258
6573

query I rowsort
SELECT DISTINCT col0 * + 90 AS col1 FROM tab2 AS cor0
----
630
7020
7110

query I rowsort
SELECT - 32 * - col0 FROM tab2 AS cor0
----
224
2496
2528

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4648
SELECT CAST( col1 AS SIGNED ) + col0 * - 43 FROM tab0 AS cor0
----
-1408
-3736
-946

skipif mysql # not compatible
query I rowsort label-4648
SELECT CAST ( col1 AS INTEGER ) + col0 * - 43 FROM tab0 AS cor0
----
-1408
-3736
-946

query I rowsort
SELECT + cor0.col1 + + ( col0 ) AS col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4650
SELECT 19 + - col1 * + col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4650
SELECT 19 + - 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-4651
SELECT DISTINCT 8 DIV 67 AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4651
SELECT DISTINCT 8 / 67 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + ( + cor0.col2 ) + col0 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - - 32 + 81 AS col0 FROM tab1 cor0
----
113

query I rowsort
SELECT + ( col0 ) * + 71 + col1 * col2 AS col0 FROM tab0 AS cor0
----
13781
2582
4542

onlyif mysql # use DIV operator for integer division
query I rowsort label-4655
SELECT - col1 DIV tab1.col0 + col1 FROM tab1
----
10
13
18

skipif mysql # not compatible
query I rowsort label-4655
SELECT - col1 / tab1.col0 + col1 FROM tab1
----
10
13
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col0 col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - ( - col0 ) + - col2 * col2 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT DISTINCT col1 * cor0.col2 + col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT + - 17 + col2 * col2 AS col2 FROM tab1 AS cor0
----
2899
3232
9199

onlyif mysql # use DIV operator for integer division
query I rowsort label-4660
SELECT ALL - + col1 DIV cor0.col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4660
SELECT ALL - + col1 / cor0.col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * col1 + col1 * cor0.col1 col2 FROM tab1 AS cor0
----
-540
-871
598

onlyif mysql # use DIV operator for integer division
query I rowsort label-4662
SELECT ALL 24 + + col1 DIV + tab0.col2 + col2 * 1 AS col2 FROM tab0
----
107
122
59

skipif mysql # not compatible
query I rowsort label-4662
SELECT ALL 24 + + col1 / + tab0.col2 + col2 * 1 AS col2 FROM tab0
----
107
122
59

query I rowsort
SELECT DISTINCT - col1 + - 96 FROM tab1
----
-106
-109
-122

query I rowsort
SELECT ALL ( + col1 ) + - col1 AS col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4665
SELECT ALL + col1 DIV col0 + - 91 * - col1 - + col1 FROM tab2 AS cor0
----
1530
2794
5310

skipif mysql # not compatible
query I rowsort label-4665
SELECT ALL + col1 / col0 + - 91 * - col1 - + col1 FROM tab2 AS cor0
----
1530
2794
5310

query I rowsort
SELECT + col0 * - 34 AS col1 FROM tab1 AS cor0
----
-102
-2176
-2720

query I rowsort
SELECT DISTINCT + - col1 + - cor0.col1 + 22 FROM tab0 AS cor0
----
-150
-160
-172

query I rowsort
SELECT DISTINCT col0 * cor0.col2 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL + cor0.col0 + cor0.col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ALL - + col2 * ( - 53 ) + col2 AS col2 FROM tab0 AS cor0
----
1782
4428
54

query I rowsort
SELECT DISTINCT + col2 * col1 + col0 + col2 AS col0 FROM tab2 AS cor0
----
1638
763
871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col1 + - 91 + - tab2.col0 col1 FROM tab2
----
-1513
-315
-4771

query I rowsort
SELECT ALL col0 - + col0 * col1 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT col0 * ( 68 ) * col0 FROM tab2 AS cor0
----
3332
413712
424388

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4675
SELECT ALL + col0 + - CAST( NULL AS SIGNED ) + col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4675
SELECT ALL + col0 + - CAST ( NULL AS INTEGER ) + col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 + + 45 AS col1 FROM tab2 AS cor0
----
104
62
76

query I rowsort
SELECT DISTINCT - cor0.col0 + + 76 FROM tab1 cor0
----
-4
12
73

query I rowsort
SELECT ALL 68 + cor0.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 724fcb50819193f20c1af3b1d513b127

onlyif mysql # use DIV operator for integer division
query I rowsort label-4679
SELECT ALL col2 + col1 DIV ( - col1 ) AS col2 FROM tab1
----
53
56
95

skipif mysql # not compatible
query I rowsort label-4679
SELECT ALL col2 + col1 / ( - col1 ) AS col2 FROM tab1
----
53
56
95

query I rowsort
SELECT DISTINCT + col2 * tab2.col1 * + ( - col0 ) + col2 AS col1 FROM tab2
----
-119626
-50996
-5832

query I rowsort
SELECT + col2 - + cor0.col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col1 * - col2 + + cor0.col0 AS col1 FROM tab1 cor0
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT + col2 + 11 AS col2 FROM tab2 AS cor0
----
37
38
49

query I rowsort
SELECT - col0 + - cor0.col0 * + col1 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT ALL - cor0.col2 + + ( + 51 ) AS col1 FROM tab1 AS cor0
----
-3
-45
-6

query I rowsort
SELECT ALL + + col1 + + cor0.col2 - + col0 FROM tab1 AS cor0
----
29
3
77

query I rowsort
SELECT + col2 * ( 46 ) AS col2 FROM tab1 AS cor0
----
2484
2622
4416

skipif mysql # not compatible
query I rowsort
SELECT ALL col2 * CAST ( + col1 AS REAL ) - col0 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # use DIV operator for integer division
query I rowsort label-4689
SELECT - col1 + - CAST( + ( - col2 ) AS SIGNED ) DIV - col1 AS col2 FROM tab1 AS cor0
----
-15
-20
-28

skipif mysql # not compatible
query I rowsort label-4689
SELECT - col1 + - CAST ( + ( - col2 ) AS INTEGER ) / - col1 AS col2 FROM tab1 AS cor0
----
-15
-20
-28

query I rowsort
SELECT DISTINCT - col2 * col0 + - 55 + col0 FROM tab1 cor0
----
-214
-3639
-7655

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 28 + col2 col1 FROM tab2
----
54
55
66

query I rowsort
SELECT - col2 + + 48 * - col1 AS col2 FROM tab1 AS cor0
----
-1302
-537
-720

query I rowsort
SELECT col0 + + ( 19 * - col0 ) AS col1 FROM tab2 AS cor0
----
-126
-1404
-1422

query I rowsort
SELECT + col2 + 49 - + 67 FROM tab2 AS cor0
----
20
8
9

query I rowsort
SELECT 44 * + col0 AS col2 FROM tab2 AS cor0
----
308
3432
3476

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4696
SELECT ALL CAST( - col2 AS SIGNED ) AS col1 FROM tab1 cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-4696
SELECT ALL CAST ( - col2 AS INTEGER ) AS col1 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT col2 * - 85 FROM tab0 AS cor0
----
-2805
-6970
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-4698
SELECT - 63 DIV + 25 FROM tab1 AS cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-4698
SELECT - 63 / + 25 FROM tab1 AS cor0
----
-2
-2
-2

query I rowsort
SELECT DISTINCT - 27 + + 8 FROM tab0 cor0
----
-19

query I rowsort
SELECT cor0.col1 * - col1 * col2 AS col1 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT ALL - cor0.col1 + - col1 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT ALL + ( - 49 ) AS col1 FROM tab1 AS cor0
----
-49
-49
-49

query I rowsort
SELECT - 65 AS col0 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 4ca93c42a91c7dff917e7b7090ba9e57

query I rowsort
SELECT - - ( 96 ) + col1 AS col2 FROM tab1 AS cor0
----
106
109
122

query I rowsort
SELECT ALL - ( + 92 ) AS col0 FROM tab0 AS cor0
----
-92
-92
-92

query I rowsort
SELECT DISTINCT + - 79 + 95 * - col1 FROM tab0 cor0
----
-8249
-8724
-9294

query I rowsort
SELECT ALL + col1 * + col1 * + col0 AS col0 FROM tab0 AS cor0
----
177504
329315
737009

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4708
SELECT + CAST( NULL AS SIGNED ) + col0 * + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4708
SELECT + CAST ( NULL AS INTEGER ) + col0 * + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + 33 col2 FROM tab2 AS cor0
----
-1023
-1947
-561

query I rowsort
SELECT DISTINCT 9 * col0 FROM tab1 AS cor0
----
27
576
720

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 + + col1 AS col0 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT + 44 FROM tab0, tab2 AS cor0, tab2 cor1
----
44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4713
SELECT cor0.col1 + CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4713
SELECT cor0.col1 + CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL - - col1 * cor0.col0 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT 20 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4716
SELECT + - 43 * col0 * CAST( col0 + + col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-332992
-605440
-7353

skipif mysql # not compatible
query I rowsort label-4716
SELECT + - 43 * col0 * CAST ( col0 + + col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-332992
-605440
-7353

onlyif mysql # use DIV operator for integer division
query I rowsort label-4717
SELECT + col2 DIV - col1 + - col2 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4717
SELECT + col2 / - col1 + - col2 FROM tab0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col1 ) + - ( 96 ) col0 FROM tab0 AS cor0
----
-10
-5
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4719
SELECT cor0.col1 + CAST( NULL AS SIGNED ) * + 4 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4719
SELECT cor0.col1 + CAST ( NULL AS INTEGER ) * + 4 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + 64 * + col0 col0 FROM tab2 AS cor0
----
421
4966
5018

query I rowsort
SELECT + col1 + col2 - + 73 AS col1 FROM tab1 AS cor0
----
-6
36
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - 77 + - tab0.col1 col2 FROM tab0
----
1762
2598
6762

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col2 col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
-26
-27
-38

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT cor0.col2 + 43 FROM tab0 AS cor0
----
125
44
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4726
SELECT tab2.col0 * 94 DIV col0 + tab2.col1 AS col2 FROM tab2
----
111
125
153

skipif mysql # not compatible
query I rowsort label-4726
SELECT tab2.col0 * 94 / col0 + tab2.col1 AS col2 FROM tab2
----
111
125
153

query I rowsort
SELECT ( col0 + - tab1.col0 ) AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + 90 * + col1 AS col0 FROM tab1
----
1170
2340
900

query I rowsort
SELECT + 67 + - col1 AS col0 FROM tab2 AS cor0
----
36
50
8

query I rowsort
SELECT DISTINCT + col1 * + col1 + col2 AS col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT + ( + 78 ) * col0 * - 57 + 17 FROM tab2 AS cor0
----
-31105
-346771
-351217

query I rowsort
SELECT ALL + col0 + + col1 * + col1 FROM tab1 cor0
----
164
249
679

query I rowsort
SELECT ALL + + cor0.col0 + col0 + - col1 FROM tab0 cor0
----
-27
-38
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4734
SELECT ALL - col0 * col1 * CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4734
SELECT ALL - col0 * col1 * CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col2 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col2 + 59 AS col2 FROM tab2 AS cor0
----
85
86
97

query I rowsort
SELECT - + cor0.col0 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab1, tab0 AS cor2
----
243 values hashing to 68438270ef4dcbfd48dcdbe0b98336f5

query I rowsort
SELECT DISTINCT ( + col0 ) - + col2 * 72 FROM tab0
----
-2352
-37
-5815

query I rowsort
SELECT col0 + col0 + col1 AS col1 FROM tab1
----
138
173
32

query I rowsort
SELECT ALL col0 + ( tab2.col2 ) AS col1 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT + - cor0.col1 FROM tab0, tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col0 col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT col1 * 83 AS col2 FROM tab2
----
1411
2573
4897

query I rowsort
SELECT col2 + 55 FROM tab1 AS cor0
----
109
112
151

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - col1 AS REAL ) FROM tab1
----
10
13
26

query I rowsort
SELECT ( col2 * + col2 ) FROM tab0
----
1
1089
6724

query I rowsort
SELECT - cor0.col2 * col2 + 47 FROM tab2 AS cor0
----
-1397
-629
-682

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col2 - - ( + col1 ) col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + + 97 - col1 FROM tab1 AS cor0
----
71
84
87

query I rowsort
SELECT ALL 72 * col0 * + ( col2 ) FROM tab1 AS cor0
----
11664
262656
552960

query I rowsort
SELECT - col0 - cor0.col1 * col2 FROM tab2 cor0
----
-1612
-725
-844

query I rowsort
SELECT DISTINCT - 33 * cor0.col0 + - col0 * cor0.col1 + col2 FROM tab1 AS cor0
----
-123
-2695
-3584

onlyif mysql # use DIV operator for integer division
query I rowsort label-4753
SELECT DISTINCT - 51 - col1 * 61 DIV col1 FROM tab1 cor0
----
-112

skipif mysql # not compatible
query I rowsort label-4753
SELECT DISTINCT - 51 - col1 * 61 / col1 FROM tab1 cor0
----
-112

query I rowsort
SELECT 43 * - col2 + cor0.col2 + + 24 AS col0 FROM tab2 AS cor0
----
-1068
-1110
-1572

query I rowsort
SELECT DISTINCT 58 AS col2 FROM tab1, tab0 cor0, tab2 AS cor1
----
58

query I rowsort
SELECT ALL ( 74 ) FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

query I rowsort
SELECT DISTINCT + - 1 + cor0.col1 AS col1 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT + col2 + + 76 FROM tab1 AS cor0
----
130
133
172

query I rowsort
SELECT DISTINCT - cor0.col1 + + 32 FROM tab1 AS cor0
----
19
22
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * + ( 26 ) + + col0 - + col0 col1 FROM tab1 AS cor0
----
-1664
-2080
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4761
SELECT ALL col2 * CAST( NULL AS DECIMAL ) * col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4761
SELECT ALL col2 * CAST ( NULL AS REAL ) * col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + ( col1 ) AS col1 FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 + 6 col1 FROM tab1 cor0
----
16
19
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-4764
SELECT DISTINCT + + col2 + - col0 DIV col2 - col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-4764
SELECT DISTINCT + + col2 + - col0 / col2 - col2 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT col1 * + col0 + - col0 AS col2 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT col0 - - cor0.col1 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - + col1 * 56 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
31920
69888
78624

onlyif mysql # use DIV operator for integer division
query I rowsort label-4768
SELECT ALL - col1 DIV + col2 col2 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4768
SELECT ALL - col1 / + col2 col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 * - col0 - - tab2.col0 AS col2 FROM tab2
----
56
6162
6320

query I rowsort
SELECT col2 * col2 - + col2 AS col1 FROM tab0
----
0
1056
6642

query I rowsort
SELECT - col2 * + col2 * col1 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT ALL 96 - tab2.col0 * - 57 FROM tab2
----
4542
4599
495

onlyif mysql # use DIV operator for integer division
query I rowsort label-4773
SELECT ALL cor0.col0 + - col2 DIV - col2 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-4773
SELECT ALL cor0.col0 + - col2 / - col2 FROM tab1 AS cor0
----
4
65
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4774
SELECT ALL cor0.col1 * - col1 + col2 - col1 DIV col2 FROM tab1 AS cor0
----
-43
-622
-73

skipif mysql # not compatible
query I rowsort label-4774
SELECT ALL cor0.col1 * - col1 + col2 - col1 / col2 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT 61 + col2 FROM tab2 cor0
----
87
88
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-4776
SELECT DISTINCT ( + cor0.col2 ) DIV + col0 AS col2 FROM tab1 cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-4776
SELECT DISTINCT ( + cor0.col2 ) / + col0 AS col2 FROM tab1 cor0
----
0
1
18

query I rowsort
SELECT ( col1 ) + - col0 * - 94 * - 12 AS col1 FROM tab0 AS cor0
----
-100301
-26986
-39383

onlyif mysql # use DIV operator for integer division
query I rowsort label-4778
SELECT ALL col1 DIV + col1 + - col0 AS col1 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-4778
SELECT ALL col1 / + col1 + - col0 AS col1 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT 43 * 13 AS col2 FROM tab2 AS cor0
----
559
559
559

onlyif mysql # use DIV operator for integer division
query I rowsort label-4780
SELECT DISTINCT - 90 DIV col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-90

skipif mysql # not compatible
query I rowsort label-4780
SELECT DISTINCT - 90 / col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-90

query I rowsort
SELECT DISTINCT + col1 * ( col1 ) + col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT - 12 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-11
21
70

query I rowsort
SELECT DISTINCT - - col2 * + 3 FROM tab1 cor0
----
162
171
288

onlyif mysql # use DIV operator for integer division
query I rowsort label-4784
SELECT 10 DIV col1 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4784
SELECT 10 / col1 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - ( cor0.col0 ) + + col2 AS col1 FROM tab2 AS cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + 42 + + col1 col2 FROM tab2 AS cor0
----
138
179
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4787
SELECT ALL - CAST( + col2 AS SIGNED ) AS col1 FROM tab2 cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-4787
SELECT ALL - CAST ( + col2 AS INTEGER ) AS col1 FROM tab2 cor0
----
-26
-27
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4788
SELECT DISTINCT - + ( col2 ) + col1 * CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4788
SELECT DISTINCT - + ( col2 ) + col1 * CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * col0 col2 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 2 * - col2 col0 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4791
SELECT - cor0.col1 DIV cor0.col0 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to ab2a707b9c937c7ffb5bac28e19acedb

skipif mysql # not compatible
query I rowsort label-4791
SELECT - cor0.col1 / cor0.col0 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to ab2a707b9c937c7ffb5bac28e19acedb

query I rowsort
SELECT - + 77 AS col2 FROM tab2 cor0
----
-77
-77
-77

query I rowsort
SELECT - col1 + - ( col1 ) AS col1 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT DISTINCT 76 AS col0 FROM tab1, tab0 AS cor0
----
76

query I rowsort
SELECT ALL - ( - col1 * col0 ) AS col1 FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-4796
SELECT - col1 DIV cor0.col0 + col0 * ( - col0 ) col2 FROM tab2 AS cor0
----
-53
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4796
SELECT - col1 / cor0.col0 + col0 * ( - col0 ) col2 FROM tab2 AS cor0
----
-53
-6084
-6241

query I rowsort
SELECT - 8 * - 57 - - col2 FROM tab2 cor0
----
482
483
494

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( 41 AS REAL ) + tab2.col1 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 4bb2ad76728efe97b6ea1ccdb5bdda95

query I rowsort
SELECT - 37 + - cor0.col0 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 6574bcc18fd9e6d99f7021ee51eb472a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4800
SELECT DISTINCT + CAST( col1 AS SIGNED ) AS col0 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4800
SELECT DISTINCT + CAST ( col1 AS INTEGER ) AS col0 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4801
SELECT DISTINCT - ( col2 ) DIV col0 + cor0.col2 * col0 AS col0 FROM tab1 cor0
----
144
3648
7679

skipif mysql # not compatible
query I rowsort label-4801
SELECT DISTINCT - ( col2 ) / col0 + cor0.col2 * col0 AS col0 FROM tab1 cor0
----
144
3648
7679

query I rowsort
SELECT ALL + 63 + col0 AS col2 FROM tab2 AS cor0
----
141
142
70

query I rowsort
SELECT DISTINCT + col0 * + 55 + col0 + + col0 AS col0 FROM tab2 AS cor0
----
399
4446
4503

query I rowsort
SELECT DISTINCT 5 - - cor0.col1 AS col0 FROM tab2 AS cor0
----
22
36
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 - col0 col0 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4806
SELECT ( + ( cor0.col1 ) ) * CAST( NULL AS SIGNED ) + cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4806
SELECT ( + ( cor0.col1 ) ) * CAST ( NULL AS INTEGER ) + cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4807
SELECT DISTINCT col1 * col1 DIV + col0 FROM tab1 AS cor0
----
1
2
225

skipif mysql # not compatible
query I rowsort label-4807
SELECT DISTINCT col1 * col1 / + col0 FROM tab1 AS cor0
----
1
2
225

onlyif mysql # use DIV operator for integer division
query I rowsort label-4808
SELECT + 62 + + col0 DIV + ( 53 + - col2 ) FROM tab0 AS cor0
----
59
62
63

skipif mysql # not compatible
query I rowsort label-4808
SELECT + 62 + + col0 / + ( 53 + - col2 ) FROM tab0 AS cor0
----
59
62
63

query I rowsort
SELECT DISTINCT + col1 * col1 - col1 * col1 AS col1 FROM tab1 cor0
----
0

query I rowsort
SELECT ALL - - col1 + col1 * col0 AS col1 FROM tab2 AS cor0
----
1360
248
4661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( col0 ) * - 80 * + col1 col1 FROM tab0 AS cor0
----
165120
271600
647920

query I rowsort
SELECT DISTINCT + - 89 + - col2 AS col1 FROM tab0 cor0
----
-122
-171
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4813
SELECT ALL + col2 + - col2 DIV + 33 FROM tab1 AS cor0
----
53
56
94

skipif mysql # not compatible
query I rowsort label-4813
SELECT ALL + col2 + - col2 / + 33 FROM tab1 AS cor0
----
53
56
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-4814
SELECT DISTINCT + + col0 + col2 DIV cor0.col0 AS col1 FROM tab0 AS cor0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-4814
SELECT DISTINCT + + col0 + col2 / cor0.col0 AS col1 FROM tab0 AS cor0
----
25
35
89

query I rowsort
SELECT col0 * + 87 FROM tab1 AS cor0
----
261
5568
6960

onlyif mysql # use DIV operator for integer division
query I rowsort label-4816
SELECT ALL - cor0.col2 + + cor0.col0 DIV 38 FROM tab2 AS cor0
----
-24
-27
-36

skipif mysql # not compatible
query I rowsort label-4816
SELECT ALL - cor0.col2 + + cor0.col0 / 38 FROM tab2 AS cor0
----
-24
-27
-36

onlyif mysql # use DIV operator for integer division
query I rowsort label-4817
SELECT - 9 * + col2 - + col2 * 78 DIV col1 AS col0 FROM tab1
----
-1440
-648
-957

skipif mysql # not compatible
query I rowsort label-4817
SELECT - 9 * + col2 - + col2 * 78 / col1 AS col0 FROM tab1
----
-1440
-648
-957

onlyif mysql # use DIV operator for integer division
query I rowsort label-4818
SELECT cor0.col0 + + cor0.col1 DIV 25 FROM tab0 AS cor0
----
27
38
92

skipif mysql # not compatible
query I rowsort label-4818
SELECT cor0.col0 + + cor0.col1 / 25 FROM tab0 AS cor0
----
27
38
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col2 + + col2 col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - col1 + 97 + ( + col2 ) FROM tab0 AS cor0
----
1
44
88

query I rowsort
SELECT - + col2 * + col2 + 18 + + col2 * col0 AS col1 FROM tab1 AS cor0
----
-1518
-2736
417

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4822
SELECT - - cor0.col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4822
SELECT - - cor0.col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + ( cor0.col1 ) + col2 * - 4 AS col0 FROM tab0 AS cor0
----
-319
-79
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col1 + col2 * col1 col1 FROM tab2 AS cor0
----
-124
-1947
357

query I rowsort
SELECT + 1 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT - col0 * - 73 * + col0 AS col1 FROM tab1 cor0
----
299008
467200
657

query I rowsort
SELECT ( - col2 ) * col2 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
1
35937
551368

query I rowsort
SELECT DISTINCT 68 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
68

query I rowsort
SELECT 61 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT + 8 * cor0.col2 + + cor0.col2 * + col1 AS col0 FROM tab2 AS cor0
----
1053
1742
950

query I rowsort
SELECT 37 * cor0.col1 AS col1 FROM tab0 AS cor0
----
3182
3367
3589

onlyif mysql # use DIV operator for integer division
query I rowsort label-4832
SELECT + 17 DIV - col1 col2 FROM tab2
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4832
SELECT + 17 / - col1 col2 FROM tab2
----
-1
0
0

query I rowsort
SELECT DISTINCT - ( col2 ) + col1 + + col2 AS col1 FROM tab0
----
86
91
97

query I rowsort
SELECT col1 * - col0 + 34 AS col0 FROM tab2
----
-1309
-183
-4568

query I rowsort
SELECT + col1 * + 56 * 10 FROM tab2 AS cor0
----
17360
33040
9520

query I rowsort
SELECT DISTINCT 24 * - col0 FROM tab1 AS cor0
----
-1536
-1920
-72

query I rowsort
SELECT - col0 * - col2 + col1 + col2 AS col2 FROM tab2 AS cor0
----
2113
247
3057

query I rowsort
SELECT - col0 * + tab1.col2 AS col1 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT ( + col0 + + ( 10 ) ) AS col2 FROM tab0
----
34
45
99

query I rowsort
SELECT ALL + col0 * + col1 * - col0 AS col2 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT - col0 + cor0.col1 * col2 AS col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT - + col0 * cor0.col0 * col0 + col1 + + col2 FROM tab2 AS cor0
----
-285
-474467
-492984

query I rowsort
SELECT cor0.col0 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4844
SELECT - col2 - tab0.col0 DIV + col0 AS col0 FROM tab0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-4844
SELECT - col2 - tab0.col0 / + col0 AS col0 FROM tab0
----
-2
-34
-83

query I rowsort
SELECT tab0.col2 + - col2 + - col0 * col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT tab2.col0 - + col0 * col1 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT - - col0 + col2 - cor0.col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT col2 * col1 * col2 + col2 + col0 FROM tab1 AS cor0
----
119984
32611
75873

query I rowsort
SELECT DISTINCT - col1 + col2 * + col1 FROM tab2 AS cor0
----
1475
629
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - col2 * col0 * tab1.col1 - col1 col2 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT + col0 * col0 * col2 AS col0 FROM tab0 cor0
----
1225
19008
649522

query I rowsort
SELECT ALL + col0 * - col1 * col0 FROM tab2
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-4853
SELECT + col2 DIV col1 - + col0 * - col1 AS col2 FROM tab2
----
1345
217
4602

skipif mysql # not compatible
query I rowsort label-4853
SELECT + col2 / col1 - + col0 * - col1 AS col2 FROM tab2
----
1345
217
4602

query I rowsort
SELECT ALL + col0 * col2 * + col2 AS col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT + col2 + + col2 * - col0 AS col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT - tab2.col1 * - col2 + - col1 * + col2 AS col2 FROM tab2
----
0

query I rowsort
SELECT col0 * col2 + col2 - col0 FROM tab2
----
1976
209
2961

query I rowsort
SELECT DISTINCT - 45 * + col1 + col1 AS col2 FROM tab0 cor0
----
-3784
-4004
-4268

query I rowsort
SELECT - + 10 + + col1 AS col2 FROM tab2 AS cor0
----
21
49
7

query I rowsort
SELECT DISTINCT - 59 + + cor0.col1 FROM tab0 AS cor0
----
27
32
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 60 col2 FROM tab2 AS cor0
----
60

query I rowsort
SELECT ALL col1 + - col1 * - col2 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL col1 + - tab1.col0 AS col2 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT + tab2.col1 * col2 + col0 FROM tab2
----
1612
725
844

query I rowsort
SELECT ALL + col1 FROM tab1 WHERE NULL = NULL
----

query I rowsort
SELECT col0 * col2 + + col0 + col0 * + col2 AS col2 FROM tab0
----
105
14685
1608

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL NOT IN ( - col2 * + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4868
SELECT ALL + col0 * col0 + + col0 DIV - tab0.col0 AS col2 FROM tab0
----
1224
575
7920

skipif mysql # not compatible
query I rowsort label-4868
SELECT ALL + col0 * col0 + + col0 / - tab0.col0 AS col2 FROM tab0
----
1224
575
7920

query I rowsort
SELECT DISTINCT - tab2.col1 FROM tab2 WHERE NOT NULL BETWEEN - col0 AND ( NULL )
----

query I rowsort
SELECT DISTINCT - 91 + - col1 * 9 FROM tab1 AS cor0
----
-181
-208
-325

query I rowsort
SELECT DISTINCT cor0.col2 * col1 - + ( col1 + - col0 ) AS col1 FROM tab0 AS cor0
----
2776
35
7460

onlyif mysql # use DIV operator for integer division
query I rowsort label-4872
SELECT ALL ( col2 ) DIV - 42 - + col2 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-4872
SELECT ALL ( col2 ) / - 42 - + col2 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT col0 * + col1 + - col1 * + col2 AS col0 FROM tab0
----
-774
3298
637

query I rowsort
SELECT col2 + - tab2.col2 + col0 AS col0 FROM tab2 WHERE NOT + col0 / col0 + - col1 > NULL
----

query I rowsort
SELECT col0 * + col2 * col1 AS col0 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT - col1 + - col1 + - col1 AS col1 FROM tab1
----
-30
-39
-78

query III rowsort
SELECT * FROM tab0 WHERE - col2 + + col2 * + col1 < col2 / + col1
----

query I rowsort
SELECT col2 AS col2 FROM tab2 WHERE NOT NULL NOT IN ( col1 * col2 )
----

query I rowsort
SELECT ALL col1 + col1 + col0 AS col0 FROM tab2
----
113
196
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab0 WHERE NULL IN ( - col2 * col1 + col1 * - col1 )
----

query I rowsort
SELECT col2 FROM tab1 WHERE col2 + - col2 < col2
----
54
57
96

query I rowsort
SELECT + col2 + - col2 * col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-4883
SELECT DISTINCT col2 DIV col0 + - col1 * col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-834

skipif mysql # not compatible
query I rowsort label-4883
SELECT DISTINCT col2 / col0 + - col1 * col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-834

query I rowsort
SELECT ALL cor0.col0 * col0 + + cor0.col1 AS col2 FROM tab1 cor0
----
35
4106
6413

query I rowsort
SELECT tab2.col1 * tab2.col0 + - tab2.col0 FROM tab2
----
1264
210
4524

query III rowsort
SELECT ALL * FROM tab2 WHERE ( NULL ) IN ( col1 + - col0 / col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + tab1.col1 col0 FROM tab1
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 + tab0.col1 col2 FROM tab0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + col1 - col2 col1 FROM tab1
----
-1136
-132
-697

query I rowsort
SELECT ALL col1 FROM tab0 WHERE - col2 > NULL
----

query I rowsort
SELECT ALL - tab0.col2 * - tab0.col1 + col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT ALL col0 - col1 AS col1 FROM tab0 WHERE NOT col1 < + col1 / col0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT tab1.col0 + col0 * col0 * col1 FROM tab1
----
237
41024
83280

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT - col1 IN ( col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-4895
SELECT DISTINCT tab1.col2 DIV + col0 + - col0 FROM tab1
----
-64
-79
15

skipif mysql # not compatible
query I rowsort label-4895
SELECT DISTINCT tab1.col2 / + col0 + - col0 FROM tab1
----
-64
-79
15

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT - col0 NOT IN ( + col2 * + col0 )
----

query I rowsort
SELECT DISTINCT - col2 + col2 * - col1 * - col1 FROM tab0
----
244035
678960
9408

query I rowsort
SELECT tab1.col1 * col1 + + col2 AS col2 FROM tab1
----
157
265
730

query III rowsort
SELECT * FROM tab2 WHERE NULL BETWEEN col2 + col2 AND col0
----

query I rowsort
SELECT col0 * col1 - + col1 FROM tab0
----
1978
3298
8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-4901
SELECT ( col2 ) DIV - 93 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4901
SELECT ( col2 ) / - 93 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 87 + - cor1.col0 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 0fd504633c337f8984ee7d72a886453d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 39 col1 FROM tab0
----
-39
-39
-39

query I rowsort
SELECT + col1 + col1 * col2 + - col2 AS col2 FROM tab0 AS cor0
----
193
2891
7471

query I rowsort
SELECT - + 12 * col0 + 71 FROM tab0 AS cor0
----
-217
-349
-997

onlyif mysql # use DIV operator for integer division
query I rowsort label-4906
SELECT 84 DIV col0 + 60 FROM tab1
----
61
61
88

skipif mysql # not compatible
query I rowsort label-4906
SELECT 84 / col0 + 60 FROM tab1
----
61
61
88

query I rowsort
SELECT col0 + + tab2.col0 * ( ( - tab2.col2 ) * - col0 ) FROM tab2
----
1330
158262
237237

query I rowsort
SELECT ALL 19 * - tab1.col2 AS col1 FROM tab1
----
-1026
-1083
-1824

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + 9 col2 FROM tab2 AS cor0
----
234
243
342

query I rowsort
SELECT col1 + + col2 * + ( + col1 ) FROM tab1 AS cor0
----
1261
1430
580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col0 * cor0.col2 col1 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT DISTINCT + tab0.col1 * cor0.col1 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 73681df8216070e2d6c1ade2e7109825

query I rowsort
SELECT 67 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT ALL - - 39 + - 37 AS col2 FROM tab0 cor0
----
2
2
2

query I rowsort
SELECT - cor0.col1 + + col0 * + col2 + cor0.col2 AS col1 FROM tab2 AS cor0
----
185
1995
3023

query I rowsort
SELECT DISTINCT + ( - 41 ) * col2 + col1 AS col2 FROM tab0 AS cor0
----
-1267
-3271
56

query I rowsort
SELECT + ( + cor0.col0 ) * col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - col1 + col2 + + col2 * col1 * - col2 AS col1 FROM tab0 AS cor0
----
-193
-611893
-93707

query I rowsort
SELECT ( - 98 ) FROM tab1 AS cor0
----
-98
-98
-98

query I rowsort
SELECT - + col2 * + col2 + - col1 AS col2 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT ALL col0 * ( col2 ) + col2 AS col2 FROM tab0
----
36
7380
825

query I rowsort
SELECT ALL + 21 FROM tab1, tab0 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

query I rowsort
SELECT + + col2 + 36 * - col0 AS col1 FROM tab1 AS cor0
----
-2247
-2784
-54

query I rowsort
SELECT DISTINCT - cor0.col0 + + col2 + - col1 AS col1 FROM tab0 AS cor0
----
-131
-77
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4925
SELECT CAST( NULL AS DECIMAL ) + - 96 + + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4925
SELECT CAST ( NULL AS REAL ) + - 96 + + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4926
SELECT DISTINCT + ( col2 ) + cor0.col2 DIV - cor0.col2 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-4926
SELECT DISTINCT + ( col2 ) + cor0.col2 / - cor0.col2 FROM tab1 AS cor0
----
53
56
95

query I rowsort
SELECT col2 * col2 + - col0 + + ( - 26 ) AS col2 FROM tab0 AS cor0
----
-60
1039
6609

query I rowsort
SELECT DISTINCT + 96 + - 85 AS col0 FROM tab0 AS cor0
----
11

query I rowsort
SELECT DISTINCT + 99 + + 26 FROM tab1 cor0
----
125

query I rowsort
SELECT ALL - col2 * + 52 + cor0.col0 * - col2 * + col1 - col2 FROM tab0 AS cor0
----
-3448
-668464
-69861

query I rowsort
SELECT - col1 * + 78 FROM tab2
----
-1326
-2418
-4602

query I rowsort
SELECT + tab1.col0 AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 * - col1 * col2 col1 FROM tab0
----
-1261
-36894
-97006

query I rowsort
SELECT ALL 51 * tab1.col0 FROM tab1
----
153
3264
4080

query I rowsort
SELECT DISTINCT + ( col2 ) * col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT + cor1.col2 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT - 24 * - tab2.col0 * col1 FROM tab2
----
110448
32232
5208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 col2 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

onlyif mysql # use DIV operator for integer division
query I rowsort label-4939
SELECT ALL - 63 DIV cor0.col2 FROM tab1, tab0 cor0
----
9 values hashing to 42fd97f96d2312d873b9d54898ab25d4

skipif mysql # not compatible
query I rowsort label-4939
SELECT ALL - 63 / cor0.col2 FROM tab1, tab0 cor0
----
9 values hashing to 42fd97f96d2312d873b9d54898ab25d4

query I rowsort
SELECT - 0 * cor0.col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT tab0.col2 - col0 * tab0.col0 FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT cor0.col0 * col1 + - cor0.col1 * + cor0.col2 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT - col2 + - col2 * - col1 AS col2 FROM tab1 cor0
----
1152
1350
513

onlyif mysql # use DIV operator for integer division
query I rowsort label-4944
SELECT - - col0 + + col0 DIV col2 FROM tab0 AS cor0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-4944
SELECT - - col0 + + col0 / col2 FROM tab0 AS cor0
----
24
70
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4945
SELECT - col2 DIV - ( - col0 ) FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-4945
SELECT - col2 / - ( - col0 ) FROM tab2
----
-3
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4946
SELECT - + col1 DIV - ( col1 ) col2 FROM tab1 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4946
SELECT - + col1 / - ( col1 ) col2 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4947
SELECT col1 DIV 99 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4947
SELECT col1 / 99 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL 46 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT - + cor0.col2 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

onlyif mysql # use DIV operator for integer division
query I rowsort label-4950
SELECT cor0.col2 DIV col1 + cor0.col1 * col0 + col1 AS col2 FROM tab2 AS cor0
----
1362
248
4661

skipif mysql # not compatible
query I rowsort label-4950
SELECT cor0.col2 / col1 + cor0.col1 * col0 + col1 AS col2 FROM tab2 AS cor0
----
1362
248
4661

query I rowsort
SELECT col1 + col1 + - col0 * tab2.col1 AS col2 FROM tab2
----
-1309
-155
-4484

onlyif mysql # use DIV operator for integer division
query I rowsort label-4952
SELECT DISTINCT - col2 + 20 DIV + col0 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4952
SELECT DISTINCT - col2 + 20 / + col0 FROM tab0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 col2 FROM tab0, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL col0 * ( col2 + - col2 * - 9 ) FROM tab1
----
1620
36480
76800

query I rowsort
SELECT + - cor0.col2 * ( col2 ) AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - - col1 + 5 * 30 AS col2 FROM tab1 AS cor0
----
160
163
176

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - 90 col2 FROM tab1 AS cor0
----
-1170
-2340
-900

query I rowsort
SELECT DISTINCT - col1 - + 3 FROM tab2 AS cor0
----
-20
-34
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( ( col0 ) ) + col1 * - 45 col1 FROM tab1 AS cor0
----
-1173
-514
-665

query I rowsort
SELECT ALL 32 * - col1 FROM tab2 AS cor0
----
-1888
-544
-992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 col2 FROM tab2 AS cor0
----
38
38
38

query I rowsort
SELECT DISTINCT - + col0 * - ( + col2 ) * col1 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-4963
SELECT ALL ( 91 ) * - cor0.col1 DIV - col1 AS col1 FROM tab1 AS cor0
----
91
91
91

skipif mysql # not compatible
query I rowsort label-4963
SELECT ALL ( 91 ) * - cor0.col1 / - col1 AS col1 FROM tab1 AS cor0
----
91
91
91

query I rowsort
SELECT ALL ( - cor0.col0 ) * - col2 + cor0.col2 * - col1 AS col1 FROM tab2 AS cor0
----
-648
2356
494

query I rowsort
SELECT ALL - - col2 * - col1 + cor0.col1 AS col0 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT col1 * col0 + - 11 + 70 AS col0 FROM tab0 AS cor0
----
2123
3454
8158

query I rowsort
SELECT DISTINCT - tab0.col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
-1
-33
-82

query I rowsort
SELECT + + 69 + col0 FROM tab2 AS cor0
----
147
148
76

query I rowsort
SELECT - 87 * - col0 + col2 FROM tab2 cor0
----
636
6812
6911

query I rowsort
SELECT col2 + ( col0 ) * - col1 + - 8 * 72 * + col1 FROM tab2 AS cor0
----
-11097
-18046
-38560

query I rowsort
SELECT ALL + + col1 + ( col1 ) FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT cor0.col1 + 97 * - col2 * + col0 AS col2 FROM tab1 AS cor0
----
-15688
-353846
-744947

query I rowsort
SELECT ALL col1 * - ( + col1 ) * col0 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL + - cor0.col0 * + ( col1 ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col1 * - ( col2 ) AS col1 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 + + tab0.col1 col0 FROM tab0
----
194
2924
7553

query I rowsort
SELECT DISTINCT - ( + col0 ) + ( + col2 + + col1 * 2 ) AS col2 FROM tab1
----
103
13
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-4978
SELECT ALL + tab1.col0 DIV col2 AS col0 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4978
SELECT ALL + tab1.col0 / col2 AS col0 FROM tab1
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * + ( col0 ) * col1 + - 60 * + cor0.col1 + col2 col0 FROM tab1 AS cor0
----
-14204
-3534
-6943

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4980
SELECT + + col1 + CAST( + 90 AS SIGNED ) * col2 FROM tab0 AS cor0
----
187
3056
7471

skipif mysql # not compatible
query I rowsort label-4980
SELECT + + col1 + CAST ( + 90 AS INTEGER ) * col2 FROM tab0 AS cor0
----
187
3056
7471

query I rowsort
SELECT ALL - col1 + 45 * 34 + col1 FROM tab0 AS cor0
----
1530
1530
1530

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4982
SELECT DISTINCT cor0.col2 * - CAST( + col1 AS SIGNED ) FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-4982
SELECT DISTINCT cor0.col2 * - CAST ( + col1 AS INTEGER ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT col1 * - col2 * + col1 AS col0 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT - + col0 + ( - col2 ) + col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + col0 * - 2 AS col2 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT + col2 + ( - col0 ) AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - tab0.col2 * col2 - + col0 FROM tab0
----
-1113
-36
-6813

query I rowsort
SELECT - col2 * - col0 * + col0 + col0 AS col0 FROM tab0
----
1260
19032
649611

query I rowsort
SELECT - 7 FROM tab1, tab2 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

query I rowsort
SELECT ALL col1 * - 51 AS col2 FROM tab0
----
-4386
-4641
-4947

query I rowsort
SELECT - col2 * - col0 * tab1.col1 FROM tab1
----
36480
4212
99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4992
SELECT DISTINCT + cor0.col0 * - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4992
SELECT DISTINCT + cor0.col0 * - CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + col0 + - col1 * col0 * - col1 + + 1 AS col2 FROM tab1 AS cor0
----
13601
2032
6465

query I rowsort
SELECT + col1 + + 95 * + col2 AS col2 FROM tab0
----
192
3221
7881

query I rowsort
SELECT + 89 * col2 * + col2 AS col1 FROM tab2
----
128516
60164
64881

query I rowsort
SELECT DISTINCT - ( - col2 ) - - tab0.col1 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT tab0.col1 * tab0.col2 + col0 AS col0 FROM tab0
----
132
2862
7551

query I rowsort
SELECT + 34 * 67 + - col1 FROM tab2
----
2219
2247
2261

query I rowsort
SELECT DISTINCT + + col1 + col0 * + 22 + + col0 FROM tab0 cor0
----
2138
638
902

query I rowsort
SELECT ALL - ( col0 ) * col2 * ( - col1 ) + + 30 AS col2 FROM tab1 AS cor0
----
36510
4242
99870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 62 + + cor0.col0 col0 FROM tab2 AS cor0
----
140
141
69

query I rowsort
SELECT ALL - - col2 - + cor0.col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 15 * col2 AS col0 FROM tab2
----
390
405
570

query I rowsort
SELECT DISTINCT tab2.col0 - - col1 * - col1 AS col2 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT ALL - tab0.col2 - - col2 * + col2 AS col2 FROM tab0
----
0
1056
6642

query I rowsort
SELECT DISTINCT + tab1.col0 - - col0 AS col2 FROM tab1
----
128
160
6

query I rowsort
SELECT ALL cor1.col2 AS col2 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT 15 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

query I rowsort
SELECT col1 + tab2.col0 + + col0 * + tab2.col1 AS col0 FROM tab2
----
1439
255
4739

query I rowsort
SELECT - col1 * - col2 * - col0 AS col2 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT - col1 * - col1 + ( 42 * col0 ) AS col0 FROM tab2 AS cor0
----
1255
3607
6757

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5012
SELECT ALL - col0 + tab1.col0 / + CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5012
SELECT ALL - col0 + tab1.col0 / + CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col2 * - col2 + 93 AS col1 FROM tab2 AS cor0
----
1537
769
822

query I rowsort
SELECT DISTINCT - - cor0.col2 + + cor0.col1 * col1 AS col0 FROM tab0 cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT - + 31 + col2 AS col2 FROM tab1 AS cor0
----
23
26
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-5016
SELECT + col2 DIV cor0.col1 - + CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5016
SELECT + col2 / cor0.col1 - + CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5017
SELECT DISTINCT 65 + col2 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5017
SELECT DISTINCT 65 + col2 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - 50 + + col1 AS col0 FROM tab2 AS cor0
----
-19
-33
9

query I rowsort
SELECT ALL + cor0.col1 * col1 * + 10 + + col0 * cor0.col2 FROM tab0 AS cor0
----
74752
90108
94125

query I rowsort
SELECT DISTINCT - cor0.col2 + col1 + - col0 AS col0 FROM tab1 AS cor0
----
-111
-163
-31

query I rowsort
SELECT DISTINCT - col2 + - col1 - - col1 * cor0.col1 * col1 AS col2 FROM tab2 AS cor0
----
205294
29733
4858

query I rowsort
SELECT DISTINCT 10 * col1 FROM tab1 AS cor0
----
100
130
260

query I rowsort
SELECT + col1 * 53 * + col2 + + col0 AS col1 FROM tab0
----
150438
395575
5176

onlyif mysql # use DIV operator for integer division
query I rowsort label-5024
SELECT + - 90 DIV + cor0.col1 + col2 AS col1 FROM tab1 AS cor0
----
48
51
90

skipif mysql # not compatible
query I rowsort label-5024
SELECT + - 90 / + cor0.col1 + col2 AS col1 FROM tab1 AS cor0
----
48
51
90

query I rowsort
SELECT DISTINCT - - 28 * + col2 FROM tab0 cor0
----
2296
28
924

query I rowsort
SELECT ( col2 ) * - col0 * col0 + col0 + col1 * ( 63 * col1 ) AS col2 FROM tab1 cor0
----
-227108
-603673
42105

query I rowsort
SELECT DISTINCT - 61 AS col1 FROM tab2, tab0 AS cor0
----
-61

query I rowsort
SELECT - - col1 + col0 * col0 * - col0 AS col2 FROM tab0 AS cor0
----
-13738
-42778
-704878

query I rowsort
SELECT + ( col0 ) * + cor0.col2 + col1 * col0 * - ( + ( - cor0.col2 ) * - col2 ) AS col2 FROM tab1 cor0
----
-2075712
-227286
-9576960

query I rowsort
SELECT - ( - col0 ) * + 25 + col1 * col0 AS col1 FROM tab2 AS cor0
----
3318
392
6552

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5031
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5031
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + + col1 + 42 - col1 * col2 FROM tab1 AS cor0
----
-1193
-1336
-518

query I rowsort
SELECT - col0 * - col1 - 35 * col1 FROM tab1 AS cor0
----
-832
290
585

query I rowsort
SELECT col0 + - col0 * col2 - col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col1 + ( 83 * col2 + + 15 * - ( col2 ) ) FROM tab2 AS cor0
----
1827
1867
2601

query I rowsort
SELECT DISTINCT - cor0.col1 * - 15 FROM tab2 AS cor0
----
255
465
885

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * cor0.col2 col0 FROM tab0 cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + - 50 col0 FROM tab2 AS cor0
----
-19
-33
9

query I rowsort
SELECT 77 + - col2 AS col1 FROM tab0
----
-5
44
76

query I rowsort
SELECT - col0 + 62 * col2 AS col2 FROM tab0 AS cor0
----
2022
27
4995

query I rowsort
SELECT col2 + col0 + col2 AS col2 FROM tab0
----
253
37
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5042
SELECT ALL - + col1 * CAST( cor0.col2 AS SIGNED ) + + col0 AS col2 FROM tab0 AS cor0
----
-2814
-62
-7373

skipif mysql # not compatible
query I rowsort label-5042
SELECT ALL - + col1 * CAST ( cor0.col2 AS INTEGER ) + + col0 AS col2 FROM tab0 AS cor0
----
-2814
-62
-7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + 45 col2 FROM tab1 AS cor0
----
102
141
99

query I rowsort
SELECT + col2 * 53 - - col2 AS col1 FROM tab2 AS cor0
----
1404
1458
2052

query I rowsort
SELECT - - col1 + - 60 + col1 AS col1 FROM tab1 AS cor0
----
-34
-40
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-5046
SELECT DISTINCT col2 DIV ( 17 ) FROM tab1
----
3
5

skipif mysql # not compatible
query I rowsort label-5046
SELECT DISTINCT col2 / ( 17 ) FROM tab1
----
3
5

query I rowsort
SELECT DISTINCT + 7 FROM tab0, tab0 AS cor0
----
7

query I rowsort
SELECT 19 AS col1 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 86c53e8567a17c8d91fc5aff119e0498

query I rowsort
SELECT + 73 AS col2 FROM tab0, tab0 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 9f0f371d979e70a792c8597c6559f0e2

query I rowsort
SELECT ALL ( 41 * col1 ) FROM tab2
----
1271
2419
697

query I rowsort
SELECT tab1.col0 * + tab1.col1 FROM tab1, tab0 cor0
----
9 values hashing to 815fccd4c3d372b28d3f3fb103025775

query I rowsort
SELECT + - col2 * + col0 - - col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + cor0.col0 * + 4 + col1 * 43 FROM tab1 AS cor0
----
1130
686
879

query I rowsort
SELECT + col1 * + col2 + - col1 AS col2 FROM tab0 AS cor0
----
0
2752
7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-5055
SELECT ( col1 ) DIV + col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-5055
SELECT ( col1 ) / + col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT col1 + 29 FROM tab0 AS cor0
----
115
120
126

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5057
SELECT DISTINCT + CAST( NULL AS SIGNED ) - cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-5057
SELECT DISTINCT + CAST ( NULL AS INTEGER ) - cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5058
SELECT DISTINCT - col0 * cor0.col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5058
SELECT DISTINCT - col0 * cor0.col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - 28 + col0 AS col2 FROM tab1 cor0
----
-25
36
52

query I rowsort
SELECT DISTINCT col1 * 96 + col2 AS col1 FROM tab2 AS cor0
----
1670
3003
5690

query I rowsort
SELECT + 53 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT + col0 + 4 * + col0 FROM tab2 AS cor0
----
35
390
395

query I rowsort
SELECT 15 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5064
SELECT - - col2 + - CAST( NULL AS SIGNED ) * - 31 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5064
SELECT - - col2 + - CAST ( NULL AS INTEGER ) * - 31 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT - + 53 * cor0.col0 AS col0 FROM tab2 cor0
----
-371
-4134
-4187

query I rowsort
SELECT DISTINCT - ( col2 ) + + col0 AS col2 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5068
SELECT ALL col0 * - col0 + + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5068
SELECT ALL col0 * - col0 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( col0 ) * + ( col1 ) AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL col2 * + col0 + + col2 * col1 AS col0 FROM tab0
----
132
14760
3630

query I rowsort
SELECT ALL + 37 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT DISTINCT - ( cor1.col2 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + 82 * - col1 + col1 FROM tab1 AS cor0
----
-1053
-2106
-810

onlyif mysql # use DIV operator for integer division
query I rowsort label-5074
SELECT DISTINCT - 47 DIV - cor0.col2 FROM tab0 cor0
----
0
1
47

skipif mysql # not compatible
query I rowsort label-5074
SELECT DISTINCT - 47 / - cor0.col2 FROM tab0 cor0
----
0
1
47

query I rowsort
SELECT DISTINCT 49 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
49

query I rowsort
SELECT DISTINCT 30 * 1 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
30

query I rowsort
SELECT DISTINCT - col1 - 62 AS col0 FROM tab0
----
-148
-153
-159

query I rowsort
SELECT + cor0.col1 * 67 + 19 + col0 AS col2 FROM tab2 AS cor0
----
1237
2103
4050

query I rowsort
SELECT - col0 + + 84 * - cor0.col1 FROM tab0 cor0
----
-7248
-7733
-8183

query I rowsort
SELECT + col1 - 90 * col2 FROM tab0 AS cor0
----
-2884
-7289
7

query I rowsort
SELECT + col0 * cor0.col1 - - col0 * + col1 FROM tab0 AS cor0
----
16198
4128
6790

query I rowsort
SELECT 74 + 99 AS col2 FROM tab0 AS cor0
----
173
173
173

query I rowsort
SELECT ALL + 19 * + col0 + + col0 FROM tab0 AS cor0
----
1780
480
700

query I rowsort
SELECT 52 + col1 FROM tab2
----
111
69
83

query I rowsort
SELECT ALL tab0.col2 + + col2 * - col2 * - ( - col2 ) + col1 FROM tab0
----
-35818
-551195
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5086
SELECT ALL CAST( col0 AS SIGNED ) + - col1 DIV + CAST( - tab1.col2 + + col2 * + col0 AS SIGNED ) FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-5086
SELECT ALL CAST ( col0 AS INTEGER ) + - col1 / + CAST ( - tab1.col2 + + col2 * + col0 AS INTEGER ) FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5087
SELECT DISTINCT + ( col2 ) DIV - cor0.col0 + 13 DIV col2 col2 FROM tab0 AS cor0
----
-1
0
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5087
SELECT DISTINCT + ( col2 ) / - cor0.col0 + 13 / col2 col2 FROM tab0 AS cor0
----
-1
0
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-5088
SELECT ALL - 32 * + col2 - cor0.col2 DIV col2 FROM tab0 AS cor0
----
-1057
-2625
-33

skipif mysql # not compatible
query I rowsort label-5088
SELECT ALL - 32 * + col2 - cor0.col2 / col2 FROM tab0 AS cor0
----
-1057
-2625
-33

query I rowsort
SELECT + cor0.col1 * col0 + - col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT - 66 * col0 AS col0 FROM tab1 cor0
----
-198
-4224
-5280

onlyif mysql # use DIV operator for integer division
query I rowsort label-5091
SELECT ALL - + ( 55 ) + + col1 DIV - ( - col1 * - col0 ) FROM tab1 AS cor0
----
-55
-55
-55

skipif mysql # not compatible
query I rowsort label-5091
SELECT ALL - + ( 55 ) + + col1 / - ( - col1 * - col0 ) FROM tab1 AS cor0
----
-55
-55
-55

query I rowsort
SELECT + col2 * ( col2 ) + + col1 AS col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT - + ( - col2 ) + + col2 * - 34 AS col0 FROM tab0 cor0
----
-1089
-2706
-33

query I rowsort
SELECT DISTINCT + ( + col2 ) + - col2 - ( col0 ) AS col1 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col0 * cor0.col2 * col1 FROM tab2 cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-5096
SELECT ALL + - ( - 67 ) + - col1 DIV cor0.col0 AS col1 FROM tab2 AS cor0
----
63
67
67

skipif mysql # not compatible
query I rowsort label-5096
SELECT ALL + - ( - 67 ) + - col1 / cor0.col0 AS col1 FROM tab2 AS cor0
----
63
67
67

query I rowsort
SELECT + col0 * + ( + cor0.col2 ) + - 12 AS col2 FROM tab0 AS cor0
----
23
7286
780

onlyif mysql # use DIV operator for integer division
query I rowsort label-5098
SELECT DISTINCT - + 8 DIV - col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5098
SELECT DISTINCT - + 8 / - col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + 37 * col0 AS col0 FROM tab0 AS cor0
----
1295
3293
888

query I rowsort
SELECT DISTINCT + 88 - + col1 * - col2 FROM tab2 AS cor0
----
1622
734
925

query I rowsort
SELECT DISTINCT + + col2 * + cor0.col0 - cor0.col2 AS col2 FROM tab0 AS cor0
----
34
7216
759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5102
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + cor0.col2 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5102
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + cor0.col2 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT col0 + 54 - col2 FROM tab2 AS cor0
----
106
34
95

query I rowsort
SELECT ALL - ( - col2 ) * - cor0.col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + col2 * - ( - col2 ) AS col1 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT - col0 + col2 - col0 FROM tab1 cor0
----
-64
-71
48

query I rowsort
SELECT ( col1 ) + + col2 + col1 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT ALL + col2 * - col1 - + 0 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT + 63 * + col1 + cor0.col2 * - ( col0 * + col2 ) FROM tab1 AS cor0
----
-207306
-7110
-736461

query I rowsort
SELECT ( cor1.col0 ) FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

onlyif mysql # use DIV operator for integer division
query I rowsort label-5111
SELECT DISTINCT col2 DIV col1 + col0 AS col2 FROM tab2 AS cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-5111
SELECT DISTINCT col2 / col1 + col0 AS col2 FROM tab2 AS cor0
----
7
78
81

query I rowsort
SELECT - 26 * + col2 + - col1 FROM tab0 AS cor0
----
-123
-2223
-944

query I rowsort
SELECT 12 AS col2 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

query I rowsort
SELECT + col0 + tab0.col2 + - col1 AS col2 FROM tab0
----
-29
-61
80

query I rowsort
SELECT ( + col0 ) * col0 + - col0 AS col1 FROM tab1
----
4032
6
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( tab0.col1 ) col2 FROM tab0
----
86
91
97

query I rowsort
SELECT ( col1 ) * tab0.col0 AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + col2 * + 69 AS col2 FROM tab2 AS cor0
----
1794
1863
2622

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5119
SELECT col0 * + CAST( col2 AS SIGNED ) * col1 AS col2 FROM tab2 AS cor0
----
119652
51034
5859

skipif mysql # not compatible
query I rowsort label-5119
SELECT col0 * + CAST ( col2 AS INTEGER ) * col1 AS col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT + 70 AS col2 FROM tab1
----
70
70
70

query I rowsort
SELECT DISTINCT col0 - ( + 8 ) * col1 * col2 AS col0 FROM tab2
----
-12194
-5089
-6689

query I rowsort
SELECT col1 + ( col2 ) * tab2.col2 + col1 FROM tab2
----
1478
791
794

query I rowsort
SELECT DISTINCT col1 + + 69 - col2 FROM tab0
----
122
165
78

query I rowsort
SELECT DISTINCT col2 - 55 FROM tab0
----
-22
-54
27

query I rowsort
SELECT ALL col2 * 81 * - tab1.col1 - + col0 AS col0 FROM tab1
----
-101168
-113727
-46234

onlyif mysql # use DIV operator for integer division
query I rowsort label-5126
SELECT + 45 DIV - col0 - col1 * 85 FROM tab2 AS cor0
----
-1445
-2641
-5015

skipif mysql # not compatible
query I rowsort label-5126
SELECT + 45 / - col0 - col1 * 85 FROM tab2 AS cor0
----
-1445
-2641
-5015

query I rowsort
SELECT - - col2 - + 73 FROM tab0 AS cor0
----
-40
-72
9

query I rowsort
SELECT + 94 + + col1 - - cor0.col2 AS col1 FROM tab2 AS cor0
----
149
152
179

query I rowsort
SELECT DISTINCT col1 * - 5 * col0 - tab0.col2 AS col0 FROM tab0
----
-10353
-16976
-40577

query I rowsort
SELECT col1 * - col1 * col0 + - col1 AS col2 FROM tab2 AS cor0
----
-22848
-271577
-6758

onlyif mysql # use DIV operator for integer division
query I rowsort label-5131
SELECT ALL col1 DIV 17 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5131
SELECT ALL col1 / 17 FROM tab1
----
0
0
1

query I rowsort
SELECT col1 + 70 FROM tab0
----
156
161
167

query I rowsort
SELECT ALL - tab1.col0 * - 24 FROM tab1
----
1536
1920
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-5134
SELECT DISTINCT col2 DIV + col2 col0 FROM tab1
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5134
SELECT DISTINCT col2 / + col2 col0 FROM tab1
----
1

query I rowsort
SELECT DISTINCT - col0 + - col1 * tab2.col1 FROM tab2
----
-3559
-368
-968

onlyif mysql # use DIV operator for integer division
query I rowsort label-5136
SELECT + col1 DIV - tab0.col0 col0 FROM tab0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5136
SELECT + col1 / - tab0.col0 col0 FROM tab0
----
-1
-2
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-5137
SELECT - tab0.col0 DIV - col2 AS col0 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-5137
SELECT - tab0.col0 / - col2 AS col0 FROM tab0
----
0
1
35

query I rowsort
SELECT - + col0 * col0 + col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT col2 + 80 + - col1 FROM tab1 AS cor0
----
108
127
163

onlyif mysql # use DIV operator for integer division
query I rowsort label-5140
SELECT tab1.col0 DIV - col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5140
SELECT tab1.col0 / - col0 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + cor0.col0 * - 65 FROM tab0, tab1 AS cor0
----
-195
-4160
-5200

query I rowsort
SELECT - col0 + col0 * - 41 FROM tab0 AS cor0
----
-1008
-1470
-3738

query I rowsort
SELECT - 88 FROM tab1, tab0 cor0
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

query I rowsort
SELECT ALL + 45 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT - - col1 + col2 * + col1 FROM tab1 AS cor0
----
1261
1430
580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 18 col0 FROM tab0, tab2 AS cor0
----
-18

query I rowsort
SELECT ALL cor1.col2 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL + col1 * 29 AS col0 FROM tab2 AS cor0
----
1711
493
899

query I rowsort
SELECT - col1 * - cor0.col2 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT - 88 + col1 * + col1 AS col2 FROM tab0 AS cor0
----
7308
8193
9321

query I rowsort
SELECT ALL - - col1 + - col2 FROM tab0 cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5152
SELECT + - 25 DIV - cor0.col2 + ( 77 ) FROM tab1 AS cor0
----
77
77
77

skipif mysql # not compatible
query I rowsort label-5152
SELECT + - 25 / - cor0.col2 + ( 77 ) FROM tab1 AS cor0
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col0 + 93 * - col2 col1 FROM tab1 AS cor0
----
-16608
-5184
-8949

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 20 * - col2 col1 FROM tab0 cor0
----
1640
20
660

query I rowsort
SELECT 37 + - col2 AS col2 FROM tab0 AS cor0
----
-45
36
4

query I rowsort
SELECT - col1 * + col1 + 19 FROM tab2
----
-270
-3462
-942

query I rowsort
SELECT + col2 + - tab1.col0 AS col0 FROM tab1
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-5158
SELECT - 57 DIV + col1 FROM tab2 cor0
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-5158
SELECT - 57 / + col1 FROM tab2 cor0
----
-1
-3
0

query I rowsort
SELECT + 2 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab1, tab2 cor2
----
243 values hashing to 6f66d58666af00861848807040f38da2

query I rowsort
SELECT 86 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ed1a39c2752ca3723602e4a92c54bbc4

query I rowsort
SELECT ALL col1 * col2 + - col2 + - col2 FROM tab2 AS cor0
----
1482
570
783

query I rowsort
SELECT ALL + - col2 - + ( + col2 ) AS col1 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT - - col1 * - col2 + col0 * col2 AS col1 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT col1 + - 58 * + 96 * col2 FROM tab1 AS cor0
----
-300646
-317366
-534515

query I rowsort
SELECT - - col0 - col0 * 52 AS col1 FROM tab0 AS cor0
----
-1224
-1785
-4539

onlyif mysql # use DIV operator for integer division
query I rowsort label-5166
SELECT + - col2 * 22 + ( col2 + 7 ) DIV col0 AS col0 FROM tab1 AS cor0
----
-1168
-1253
-2111

skipif mysql # not compatible
query I rowsort label-5166
SELECT + - col2 * 22 + ( col2 + 7 ) / col0 AS col0 FROM tab1 AS cor0
----
-1168
-1253
-2111

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5167
SELECT 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-5167
SELECT CAST ( NULL AS INTEGER ) / ( + col2 ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5168
SELECT - - 60 + 6 * - col1 + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5168
SELECT - - 60 + 6 * - col1 + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5169
SELECT + + CAST( - col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5169
SELECT + + CAST ( - col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT col0 * 54 AS col0 FROM tab2 AS cor0
----
378
4212
4266

query I rowsort
SELECT + ( + ( cor0.col2 ) ) AS col1 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL - - tab2.col0 AS col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT col2 + + col0 + + col2 FROM tab1 AS cor0
----
111
178
272

query I rowsort
SELECT col1 * - ( - col1 ) + - col1 + - col0 FROM tab1 AS cor0
----
26
647
76

query I rowsort
SELECT DISTINCT col2 * + tab1.col0 + + col1 AS col1 FROM tab1
----
188
3658
7693

query I rowsort
SELECT + col0 + 24 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-2047
-552
-805

query I rowsort
SELECT - 96 + tab1.col2 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to 99c80c5146df146c4d8f594df381c6bb

query I rowsort
SELECT + 98 - + tab2.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to f26cbbc387ba5d2cb792017efbdb6bda

query I rowsort
SELECT ALL col2 + + 91 * col1 FROM tab1 AS cor0
----
1279
2420
967

query I rowsort
SELECT ALL col2 * 13 * cor0.col2 FROM tab0 AS cor0
----
13
14157
87412

query I rowsort
SELECT + + col2 * col1 - - col0 FROM tab1 cor0
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col0 + + col2 col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT col1 + + 59 FROM tab1 AS cor0
----
69
72
85

query I rowsort
SELECT DISTINCT - cor0.col1 + - col2 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5185
SELECT - col2 DIV col2 + + col0 AS col2 FROM tab0 AS cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-5185
SELECT - col2 / col2 + + col0 AS col2 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT + cor0.col2 + col1 * - cor0.col2 + col0 FROM tab1 cor0
----
-1072
-1347
-449

query I rowsort
SELECT - - col0 * + ( + col1 ) FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * 73 col2 FROM tab1 AS cor0
----
1898
730
949

query I rowsort
SELECT - col1 * + col0 - + col0 AS col2 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT + 85 FROM tab0, tab2, tab2 AS cor0
----
85

query I rowsort
SELECT DISTINCT - + cor0.col0 + - col1 * col0 AS col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL + cor0.col2 * 4 AS col2 FROM tab0 AS cor0
----
132
328
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col1 col1 FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT + col0 * col1 * col2 AS col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL - ( col1 ) + 25 FROM tab0 AS cor0
----
-61
-66
-72

query I rowsort
SELECT DISTINCT + 85 AS col2 FROM tab1, tab1 cor0 CROSS JOIN tab0
----
85

query I rowsort
SELECT ALL ( col0 ) - ( + col2 ) AS col0 FROM tab0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5198
SELECT DISTINCT ( - col2 ) + col0 * col2 - col2 * - CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5198
SELECT DISTINCT ( - col2 ) + col0 * col2 - col2 * - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT 85 + col1 - col2 AS col2 FROM tab1
----
2
38
57

query I rowsort
SELECT col0 * col1 + 30 * col2 AS col2 FROM tab0
----
10559
3054
3425

query I rowsort
SELECT DISTINCT - tab0.col1 * col1 - + ( col0 ) AS col1 FROM tab0
----
-7420
-8370
-9444

query I rowsort
SELECT DISTINCT - 89 FROM tab0 cor0
----
-89

query I rowsort
SELECT - ( col2 ) * - ( cor0.col1 ) AS col1 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5204
SELECT col0 DIV - cor0.col1 + col1 * - col2 FROM tab1 AS cor0
----
-1254
-1404
-576

skipif mysql # not compatible
query I rowsort label-5204
SELECT col0 / - cor0.col1 + col1 * - col2 FROM tab1 AS cor0
----
-1254
-1404
-576

query I rowsort
SELECT ALL - 27 * col2 AS col0 FROM tab0
----
-2214
-27
-891

query I rowsort
SELECT cor0.col0 * 63 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to ba45810a663baade9fea50f5266ad33e

query I rowsort
SELECT DISTINCT 35 * col0 * col1 AS col1 FROM tab0 AS cor0
----
118825
283465
72240

query I rowsort
SELECT DISTINCT - 73 * + col0 + col2 FROM tab0 AS cor0
----
-1719
-2554
-6415

query I rowsort
SELECT + + 11 * col0 AS col1 FROM tab2 AS cor0
----
77
858
869

query I rowsort
SELECT ALL - col1 - cor0.col0 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
-132
-7389
-878

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5211
SELECT DISTINCT col1 * col1 + - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5211
SELECT DISTINCT col1 * col1 + - CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL ( col2 ) * + 88 AS col2 FROM tab2 AS cor0
----
2288
2376
3344

query I rowsort
SELECT DISTINCT - + col2 * cor0.col0 + + col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT 11 + 6 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - cor0.col2 col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - col0 * + 48 + 72 AS col0 FROM tab0 AS cor0
----
-1080
-1608
-4200

query I rowsort
SELECT DISTINCT - + 3 AS col0 FROM tab1, tab2 AS cor0
----
-3

query I rowsort
SELECT ALL - 17 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 490d008f3fb5b70d3971cfc6d84503f4

query I rowsort
SELECT ALL - col2 + + cor0.col0 * + col0 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT DISTINCT + + col2 * - col0 + 17 + col1 FROM tab0 AS cor0
----
-689
-7190
79

query I rowsort
SELECT DISTINCT ( - 35 ) AS col1 FROM tab0
----
-35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5222
SELECT + CAST( NULL AS SIGNED ) * + col0 + - col2 * - col2 + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5222
SELECT + CAST ( NULL AS INTEGER ) * + col0 + - col2 * - col2 + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - ( ( cor0.col2 ) ) * col2 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT DISTINCT - + col2 * 94 FROM tab2 cor0
----
-2444
-2538
-3572

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5225
SELECT CAST( - col0 AS SIGNED ) + - col1 AS col1 FROM tab1
----
-29
-74
-93

skipif mysql # not compatible
query I rowsort label-5225
SELECT CAST ( - col0 AS INTEGER ) + - col1 AS col1 FROM tab1
----
-29
-74
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5226
SELECT CAST( col0 AS SIGNED ) * col2 + + col0 AS col0 FROM tab2
----
196
2106
3081

skipif mysql # not compatible
query I rowsort label-5226
SELECT CAST ( col0 AS INTEGER ) * col2 + + col0 AS col0 FROM tab2
----
196
2106
3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 43 * - col1 col0 FROM tab2
----
1333
2537
731

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5228
SELECT ( col0 ) * - col2 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5228
SELECT ( col0 ) * - col2 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 71 FROM tab1, tab2, tab0 AS cor0
----
-71

query I rowsort
SELECT + col0 + - 50 AS col0 FROM tab1
----
-47
14
30

query I rowsort
SELECT ( 81 ) FROM tab0
----
81
81
81

query I rowsort
SELECT ALL - col0 + ( col2 ) AS col0 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-5233
SELECT ALL + col2 DIV + ( + col1 ) AS col0 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5233
SELECT ALL + col2 / + ( + col1 ) AS col0 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT ALL + - 47 AS col0 FROM tab1 AS cor0
----
-47
-47
-47

query I rowsort
SELECT ALL + 54 * 57 * - col1 AS col1 FROM tab2 AS cor0
----
-181602
-52326
-95418

query I rowsort
SELECT DISTINCT + col0 + - 91 AS col1 FROM tab2 AS cor0
----
-12
-13
-84

query I rowsort
SELECT ALL col2 + - col0 * cor0.col0 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT 42 * + col1 FROM tab0 AS cor0
----
3612
3822
4074

query I rowsort
SELECT DISTINCT + col0 * col1 + - col2 AS col1 FROM tab1 cor0
----
24
583
944

query I rowsort
SELECT - - 73 * col2 FROM tab0 AS cor0
----
2409
5986
73

query I rowsort
SELECT ALL col2 - + cor0.col1 * col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL + cor0.col2 * + col0 + col1 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + - ( - col0 ) + - 78 * 26 AS col0 FROM tab0 cor0
----
-1939
-1993
-2004

query I rowsort
SELECT ALL ( - 37 ) AS col2 FROM tab2
----
-37
-37
-37

query I rowsort
SELECT ALL 21 * col2 * - col2 AS col2 FROM tab0
----
-141204
-21
-22869

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col1 col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5247
SELECT - col2 * col0 DIV + col2 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-5247
SELECT - col2 * col0 / + col2 FROM tab0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5248
SELECT + CAST( NULL AS SIGNED ) - 14 / - cor0.col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5248
SELECT + CAST ( NULL AS INTEGER ) - 14 / - cor0.col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + 26 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT - cor0.col2 + - cor0.col1 AS col0 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + 31 AS col0 FROM tab2
----
31
31
31

query I rowsort
SELECT 82 AS col1 FROM tab1 cor0
----
82
82
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5253
SELECT - ( - col1 ) + - col1 DIV col0 AS col2 FROM tab0
----
83
90
95

skipif mysql # not compatible
query I rowsort label-5253
SELECT - ( - col1 ) + - col1 / col0 AS col2 FROM tab0
----
83
90
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 6 col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 8be8910507908e6353d02a545b748252

query I rowsort
SELECT + 16 * - col0 FROM tab2 AS cor0
----
-112
-1248
-1264

query I rowsort
SELECT DISTINCT - + 56 AS col1 FROM tab1 AS cor0
----
-56

query I rowsort
SELECT + + col1 + - col2 * - col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL - cor0.col0 * - col0 + col1 * + col2 AS col1 FROM tab2 AS cor0
----
6887
7618
886

query I rowsort
SELECT 21 + col0 AS col1 FROM tab1
----
101
24
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-5260
SELECT DISTINCT - col1 + cor0.col0 DIV col2 col2 FROM tab0 AS cor0
----
-62
-86
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5260
SELECT DISTINCT - col1 + cor0.col0 / col2 col2 FROM tab0 AS cor0
----
-62
-86
-90

query I rowsort
SELECT col0 + 15 AS col0 FROM tab1 AS cor0
----
18
79
95

query I rowsort
SELECT ALL - - col0 * col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + col2 * ( 34 ) FROM tab0 AS cor0
----
1122
2788
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5264
SELECT ALL + col2 DIV CAST( col1 * - col1 AS SIGNED ) + col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5264
SELECT ALL + col2 / CAST ( col1 * - col1 AS INTEGER ) + col1 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col1 + col1 col0 FROM tab0 AS cor0
----
7482
8372
9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-5266
SELECT DISTINCT - col2 DIV + 98 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-5266
SELECT DISTINCT - col2 / + 98 FROM tab2
----
0

query I rowsort
SELECT ALL + col1 + + ( - 85 * col1 ) + + ( ( col0 ) ) FROM tab2 AS cor0
----
-1349
-2597
-4878

query I rowsort
SELECT ALL tab0.col0 * 97 AS col1 FROM tab0
----
2328
3395
8633

query I rowsort
SELECT - col1 * 53 AS col2 FROM tab1
----
-1378
-530
-689

onlyif mysql # use DIV operator for integer division
query I rowsort label-5270
SELECT DISTINCT 46 DIV 45 FROM tab1, tab1 cor0
----
1

skipif mysql # not compatible
query I rowsort label-5270
SELECT DISTINCT 46 / 45 FROM tab1, tab1 cor0
----
1

query I rowsort
SELECT - - cor0.col2 + - 65 FROM tab0 cor0
----
-32
-64
17

query I rowsort
SELECT ALL col2 * 90 * col0 + + col2 + + col1 FROM tab0
----
3248
656993
71399

query I rowsort
SELECT DISTINCT col0 * + col2 * col2 AS col2 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5275
SELECT ALL - - 58 - ( cor0.col1 + - CAST( NULL AS SIGNED ) ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5275
SELECT ALL - - 58 - ( cor0.col1 + - CAST ( NULL AS INTEGER ) ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( 72 ) FROM tab0 cor0
----
72
72
72

query I rowsort
SELECT cor0.col0 * + 89 FROM tab2 AS cor0
----
623
6942
7031

query I rowsort
SELECT DISTINCT + col1 * + 0 + - col0 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + ( + col1 ) + + cor0.col2 * - col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT + ( col2 ) * col0 * + 28 FROM tab2 AS cor0
----
5292
56784
84056

onlyif mysql # use DIV operator for integer division
query I rowsort label-5281
SELECT ALL 85 DIV - 69 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5281
SELECT ALL 85 / - 69 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + - 50 + col0 FROM tab1 AS cor0
----
-47
14
30

query I rowsort
SELECT - col1 * cor0.col2 + + cor0.col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT - 34 + cor0.col1 * ( + cor0.col0 + col1 * - col2 ) FROM tab0 AS cor0
----
-242038
-6048
-670977

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5285
SELECT - 98 * - col0 + CAST( NULL AS SIGNED ) * + 12 * col0 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5285
SELECT - 98 * - col0 + CAST ( NULL AS INTEGER ) * + 12 * col0 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 21 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 48 col2 FROM tab0 AS cor0
----
48
48
48

query I rowsort
SELECT 47 - col2 FROM tab0 AS cor0
----
-35
14
46

query I rowsort
SELECT DISTINCT + 54 * 71 + + col1 AS col2 FROM tab0
----
3920
3925
3931

onlyif mysql # use DIV operator for integer division
query I rowsort label-5290
SELECT - - col0 DIV cor0.col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5290
SELECT - - col0 / cor0.col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT + 15 + col0 FROM tab1 cor0
----
18
79
95

query I rowsort
SELECT - + col0 + - cor0.col0 * col1 AS col2 FROM tab0 AS cor0
----
-2088
-3430
-8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5293
SELECT col0 + col2 + - CAST( - col2 * col2 + + ( - col0 ) AS SIGNED ) FROM tab2
----
1640
770
858

skipif mysql # not compatible
query I rowsort label-5293
SELECT col0 + col2 + - CAST ( - col2 * col2 + + ( - col0 ) AS INTEGER ) FROM tab2
----
1640
770
858

onlyif mysql # use DIV operator for integer division
query I rowsort label-5294
SELECT ALL col1 * col0 DIV + 35 - ( col0 ) AS col2 FROM tab0
----
142
34
62

skipif mysql # not compatible
query I rowsort label-5294
SELECT ALL col1 * col0 / + 35 - ( col0 ) AS col2 FROM tab0
----
142
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5295
SELECT ALL col0 + col0 DIV col2 AS col2 FROM tab1
----
3
65
80

skipif mysql # not compatible
query I rowsort label-5295
SELECT ALL col0 + col0 / col2 AS col2 FROM tab1
----
3
65
80

query I rowsort
SELECT 78 + + tab0.col1 FROM tab0
----
164
169
175

query I rowsort
SELECT col1 + - col1 - + col0 * + col0 AS col1 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT - col2 + + col0 + + col2 FROM tab1
----
3
64
80

query I rowsort
SELECT 94 * col1 + col1 * 25 FROM tab0
----
10234
10829
11543

query I rowsort
SELECT DISTINCT 94 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
5
59
70

query I rowsort
SELECT - + ( col2 ) * + col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - + col0 + + cor0.col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT - 4 + col0 * col1 FROM tab0 AS cor0
----
2060
3391
8095

query I rowsort
SELECT ALL - + col0 + col0 AS col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - - col2 + - ( cor0.col0 ) FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + + cor0.col2 + ( + col0 ) FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - - col1 + + 1 + ( col1 ) FROM tab1 AS cor0
----
21
27
53

query I rowsort
SELECT ALL + col0 * - 13 FROM tab1 cor0
----
-1040
-39
-832

query I rowsort
SELECT + col1 + 32 * - col2 AS col1 FROM tab0 AS cor0
----
-2533
-970
65

query I rowsort
SELECT DISTINCT - + cor0.col0 * 58 * - 75 + cor0.col2 AS col0 FROM tab0 cor0
----
104433
152251
387232

onlyif mysql # use DIV operator for integer division
query I rowsort label-5311
SELECT - col2 DIV ( 65 ) + col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-5311
SELECT - col2 / ( 65 ) + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - cor0.col2 + - col1 * + col0 * col0 FROM tab1 cor0
----
-288
-41017
-83296

query I rowsort
SELECT ALL col1 * + ( col2 ) + + col2 * + col2 AS col2 FROM tab0 AS cor0
----
14186
3927
98

query I rowsort
SELECT + col0 + col1 - col1 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT + - col1 + 71 AS col0 FROM tab0 AS cor0
----
-15
-20
-26

query I rowsort
SELECT DISTINCT - + 10 AS col0 FROM tab2 AS cor0
----
-10

query I rowsort
SELECT ( col1 ) + - col0 + col2 FROM tab2 AS cor0
----
-24
51
7

query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) * + col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - ( 23 ) + + col1 * - 97 FROM tab0 AS cor0
----
-8365
-8850
-9432

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 86 + - col2 col1 FROM tab2 cor0
----
48
59
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-5321
SELECT ALL + - ( - 7 ) DIV col0 col0 FROM tab1 cor0
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5321
SELECT ALL + - ( - 7 ) / col0 col0 FROM tab1 cor0
----
0
0
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5322
SELECT DISTINCT - CAST( + 40 AS SIGNED ) + col2 FROM tab0 cor0
----
-39
-7
42

skipif mysql # not compatible
query I rowsort label-5322
SELECT DISTINCT - CAST ( + 40 AS INTEGER ) + col2 FROM tab0 cor0
----
-39
-7
42

query I rowsort
SELECT - col2 * + 87 AS col0 FROM tab2
----
-2262
-2349
-3306

onlyif mysql # use DIV operator for integer division
query I rowsort label-5324
SELECT ALL ( + col2 ) DIV col0 AS col1 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-5324
SELECT ALL ( + col2 ) / col0 AS col1 FROM tab2 AS cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 80 col2 FROM tab2 cor0
----
-80
-80
-80

query I rowsort
SELECT + - 34 * - ( + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
1190
3026
816

query I rowsort
SELECT DISTINCT + 6 + + col0 * + col1 FROM tab2 AS cor0
----
1349
223
4608

query I rowsort
SELECT + + ( 84 ) AS col1 FROM tab2 cor0
----
84
84
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-5329
SELECT ALL CAST( - col2 AS SIGNED ) DIV + col1 + col2 FROM tab2 AS cor0
----
26
27
36

skipif mysql # not compatible
query I rowsort label-5329
SELECT ALL CAST ( - col2 AS INTEGER ) / + col1 + col2 FROM tab2 AS cor0
----
26
27
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - cor0.col1 * - col0 col2 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-5331
SELECT DISTINCT - cor0.col2 DIV cor0.col1 + col1 DIV - col1 + - col0 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-5331
SELECT DISTINCT - cor0.col2 / cor0.col1 + col1 / - col1 + - col0 FROM tab0 AS cor0
----
-25
-36
-90

query I rowsort
SELECT + + 35 * - col0 FROM tab2 AS cor0
----
-245
-2730
-2765

query I rowsort
SELECT DISTINCT + cor0.col1 + + col2 * 57 FROM tab1 AS cor0
----
3104
3259
5485

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - tab0.col2 col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL - + 75 * - col1 AS col1 FROM tab1 AS cor0
----
1950
750
975

onlyif mysql # use DIV operator for integer division
query I rowsort label-5336
SELECT DISTINCT - col0 + col2 DIV 56 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-5336
SELECT DISTINCT - col0 + col2 / 56 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ( + 43 ) FROM tab1
----
43
43
43

query I rowsort
SELECT + col1 + - ( col1 + col1 ) FROM tab1
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col1 ) + col0 * col0 col0 FROM tab2
----
6143
6258
80

query I rowsort
SELECT - + ( col2 ) + + col1 * + col0 AS col1 FROM tab2 cor0
----
1305
190
4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) * 26 + ( - col0 ) * 77 col1 FROM tab2 AS cor0
----
-357
-3978
-4029

query I rowsort
SELECT ALL - - col0 * cor0.col1 + ( + col1 ) * + col2 * + col1 AS col0 FROM tab1 AS cor0
----
17264
36582
6340

query I rowsort
SELECT ALL 36 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5344
SELECT ALL - + cor0.col1 * + CAST( col0 AS SIGNED ) - col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

skipif mysql # not compatible
query I rowsort label-5344
SELECT ALL - + cor0.col1 * + CAST ( col0 AS INTEGER ) - col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-5345
SELECT DISTINCT ( col2 ) DIV col0 col0 FROM tab2
----
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5345
SELECT DISTINCT ( col2 ) / col0 col0 FROM tab2
----
0
3

query I rowsort
SELECT + ( - col2 + + col1 ) * 58 FROM tab1
----
-1624
-2726
-4814

query I rowsort
SELECT ALL + ( col0 ) + col0 * - 75 * + col1 - + cor0.col0 FROM tab2 AS cor0
----
-100725
-16275
-345150

onlyif mysql # use DIV operator for integer division
query I rowsort label-5348
SELECT - + col0 + + 61 DIV col1 AS col2 FROM tab1 AS cor0
----
-1
-58
-76

skipif mysql # not compatible
query I rowsort label-5348
SELECT - + col0 + + 61 / col1 AS col2 FROM tab1 AS cor0
----
-1
-58
-76

query I rowsort
SELECT DISTINCT 15 * col0 + - col2 AS col0 FROM tab2 AS cor0
----
1144
1147
78

query I rowsort
SELECT ALL cor0.col1 - 63 * - col1 AS col0 FROM tab2 AS cor0
----
1088
1984
3776

query I rowsort
SELECT ALL + ( - col2 ) * - col1 + - 30 FROM tab0 AS cor0
----
2808
67
7432

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT + 76 + col1 * col0 + col0 AS col2 FROM tab2 AS cor0
----
1498
300
4756

onlyif mysql # use DIV operator for integer division
query I rowsort label-5354
SELECT + + col1 DIV + 96 + - col2 AS col0 FROM tab0 AS cor0
----
-33
-82
0

skipif mysql # not compatible
query I rowsort label-5354
SELECT + + col1 / + 96 + - col2 AS col0 FROM tab0 AS cor0
----
-33
-82
0

query I rowsort
SELECT ALL + col1 + + 41 FROM tab1 AS cor0
----
51
54
67

query I rowsort
SELECT cor0.col1 + - col1 * col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT + + col1 + cor0.col0 AS col0 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5358
SELECT + col0 + col2 DIV col1 AS col2 FROM tab2 AS cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-5358
SELECT + col0 + col2 / col1 AS col2 FROM tab2 AS cor0
----
7
78
81

query I rowsort
SELECT - col1 * + ( col2 + col1 ) AS col1 FROM tab0 AS cor0
----
-10234
-15743
-9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5360
SELECT CAST( col1 AS SIGNED ) * - col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-5360
SELECT CAST ( col1 AS INTEGER ) * - col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 62 * + col0 col2 FROM tab1 AS cor0
----
-186
-3968
-4960

query I rowsort
SELECT DISTINCT + + col1 + 31 * - col0 AS col0 FROM tab0 AS cor0
----
-2668
-658
-988

onlyif mysql # use DIV operator for integer division
query I rowsort label-5363
SELECT + - col0 DIV - col2 + ( - col2 ) DIV - col0 FROM tab1 AS cor0
----
1
1
18

skipif mysql # not compatible
query I rowsort label-5363
SELECT + - col0 / - col2 + ( - col2 ) / - col0 FROM tab1 AS cor0
----
1
1
18

query I rowsort
SELECT + 63 * - col0 + col0 * ( col1 ) AS col2 FROM tab0 AS cor0
----
1190
2492
552

query I rowsort
SELECT ALL col0 * - col0 + col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT - tab0.col0 * tab0.col2 + - col1 FROM tab0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT - col1 + - col2 * - col1 FROM tab2
----
1475
629
806

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL <> ( col0 * col0 + + col2 )
----

query I rowsort
SELECT + col1 * - 94 FROM tab2 AS cor0
----
-1598
-2914
-5546

query I rowsort
SELECT ALL + 0 * col0 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5371
SELECT ALL + col0 + col0 DIV col1 AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5371
SELECT ALL + col0 + col0 / col1 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL 82 AS col2 FROM tab1, tab0, tab1 cor0
----
27 values hashing to 99920d9f7cd9cdccef99cfa459ae6944

query I rowsort
SELECT + 30 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

query I rowsort
SELECT - - col1 + + 13 * col0 FROM tab2 AS cor0
----
1044
1073
122

query I rowsort
SELECT cor0.col1 + col0 + - 81 FROM tab1 cor0
----
-52
-7
12

query I rowsort
SELECT - 19 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

query I rowsort
SELECT ALL col1 * col1 * 3 + + col1 * - 31 AS col1 FROM tab1
----
-10
104
1222

query I rowsort
SELECT col2 + - ( - col2 + tab2.col0 ) * tab2.col0 FROM tab2
----
-3201
-4030
167

query I rowsort
SELECT ALL - tab2.col1 * 3 FROM tab2
----
-177
-51
-93

query I rowsort
SELECT + col2 + + col2 * + 36 FROM tab0
----
1221
3034
37

query I rowsort
SELECT ALL col1 + 9 FROM tab2
----
26
40
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-5382
SELECT DISTINCT col2 + + ( col1 ) DIV + tab1.col0 + CAST( + col2 AS SIGNED ) * col0 DIV col1 AS col0 FROM tab1
----
421
68
686

skipif mysql # not compatible
query I rowsort label-5382
SELECT DISTINCT col2 + + ( col1 ) / + tab1.col0 + CAST ( + col2 AS INTEGER ) * col0 / col1 AS col0 FROM tab1
----
421
68
686

query I rowsort
SELECT + cor0.col2 * - col1 * + 97 AS col1 FROM tab1 AS cor0
----
-121056
-136188
-55290

query I rowsort
SELECT ALL - 68 AS col0 FROM tab2
----
-68
-68
-68

query I rowsort
SELECT ALL + cor0.col2 * cor1.col2 AS col1 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 1a327f2a52a0a35b577f58109ee147a4

query I rowsort
SELECT - col0 * - 81 AS col1 FROM tab1 AS cor0
----
243
5184
6480

query I rowsort
SELECT 6 * ( col1 ) FROM tab2 AS cor0
----
102
186
354

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5388
SELECT CAST( NULL AS SIGNED ) * - col2 + col1 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5388
SELECT CAST ( NULL AS INTEGER ) * - col2 + col1 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - - col2 * - col0 - ( col1 ) * cor0.col1 FROM tab0 cor0
----
-15579
-8188
-9444

query I rowsort
SELECT + 17 * col2 * col2 AS col1 FROM tab0 cor0
----
114308
17
18513

query I rowsort
SELECT ALL - col0 + col0 * + col0 AS col1 FROM tab1 cor0
----
4032
6
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - - col1 col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL 98 + cor0.col1 * + col0 * col2 FROM tab2 AS cor0
----
119750
51132
5957

query I rowsort
SELECT DISTINCT - col1 + - col1 * - col0 - - col2 AS col0 FROM tab0 AS cor0
----
2011
3299
8090

query I rowsort
SELECT + ( - col0 ) * 97 + - col1 AS col2 FROM tab0 cor0
----
-2414
-3492
-8724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5396
SELECT col0 + + CAST( col2 AS SIGNED ) col1 FROM tab0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5396
SELECT col0 + + CAST ( col2 AS INTEGER ) col1 FROM tab0
----
171
36
57

query I rowsort
SELECT - col2 * + 36 + col0 FROM tab0
----
-1
-1164
-2863

query I rowsort
SELECT DISTINCT - tab1.col0 + + cor0.col1 AS col0 FROM tab1, tab2, tab1 AS cor0
----
-38
-51
-54
-67
-70
10
23
7

query I rowsort
SELECT - - col0 * + 15 AS col2 FROM tab0 AS cor0
----
1335
360
525

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5400
SELECT DISTINCT + CAST( NULL AS DECIMAL ) AS col2 FROM tab2, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5400
SELECT DISTINCT + CAST ( NULL AS REAL ) AS col2 FROM tab2, tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5401
SELECT ALL cor1.col1 DIV tab0.col0 + - 33 AS col0 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to 79302f8a7f8c06fc82e5691460f29c57

skipif mysql # not compatible
query I rowsort label-5401
SELECT ALL cor1.col1 / tab0.col0 + - 33 AS col0 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to 79302f8a7f8c06fc82e5691460f29c57

query I rowsort
SELECT col0 * tab1.col2 + - col0 FROM tab1
----
159
3584
7600

query I rowsort
SELECT DISTINCT col2 * col0 AS col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - 45 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
-12
-44
37

query I rowsort
SELECT ALL + - col2 * cor0.col2 + col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 80 * - col1 + col2 * - 63 + col1 col2 FROM tab1 AS cor0
----
-1296
-2781
-4995

onlyif mysql # use DIV operator for integer division
query I rowsort label-5407
SELECT DISTINCT 85 * + cor0.col1 + - col2 DIV + 68 FROM tab0 AS cor0
----
7310
7734
8245

skipif mysql # not compatible
query I rowsort label-5407
SELECT DISTINCT 85 * + cor0.col1 + - col2 / + 68 FROM tab0 AS cor0
----
7310
7734
8245

query I rowsort
SELECT ALL + + col2 + ( - col1 ) FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5409
SELECT DISTINCT - 66 DIV col0 FROM tab1 AS cor0
----
-1
-22
0

skipif mysql # not compatible
query I rowsort label-5409
SELECT DISTINCT - 66 / col0 FROM tab1 AS cor0
----
-1
-22
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + - 26 col2 FROM tab1 cor0
----
-13
-16
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5411
SELECT DISTINCT + - col2 * cor0.col1 DIV col1 + + ( + col0 ) - col1 AS col0 FROM tab1 AS cor0
----
-29
-3
-77

skipif mysql # not compatible
query I rowsort label-5411
SELECT DISTINCT + - col2 * cor0.col1 / col1 + + ( + col0 ) - col1 AS col0 FROM tab1 AS cor0
----
-29
-3
-77

query I rowsort
SELECT ALL + 20 + - col1 AS col1 FROM tab1 AS cor0
----
-6
10
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 50 col1 FROM tab0 AS cor0
----
50
50
50

query I rowsort
SELECT DISTINCT col1 + col1 * - cor0.col0 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-5415
SELECT ALL + ( - cor0.col0 ) * cor0.col1 DIV 12 FROM tab2 AS cor0
----
-111
-18
-383

skipif mysql # not compatible
query I rowsort label-5415
SELECT ALL + ( - cor0.col0 ) * cor0.col1 / 12 FROM tab2 AS cor0
----
-111
-18
-383

query I rowsort
SELECT ALL - - cor0.col2 * 13 * col2 + + 12 + - col1 AS col1 FROM tab0 AS cor0
----
-72
14083
87333

query I rowsort
SELECT ALL + col2 * - col1 + cor0.col2 FROM tab1 cor0
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-5418
SELECT col1 DIV col2 - - 98 FROM tab0
----
100
195
99

skipif mysql # not compatible
query I rowsort label-5418
SELECT col1 / col2 - - 98 FROM tab0
----
100
195
99

query I rowsort
SELECT col0 * col0 + - 34 AS col2 FROM tab0
----
1191
542
7887

onlyif mysql # use DIV operator for integer division
query I rowsort label-5420
SELECT ALL 83 DIV col2 col2 FROM tab1 AS cor0
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5420
SELECT ALL 83 / col2 col2 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT ALL - - col1 + col0 * - col0 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT + - 64 + col1 * + ( ( col1 ) ) FROM tab2 AS cor0
----
225
3417
897

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 67 * - cor0.col2 col2 FROM tab2 AS cor0
----
1742
1809
2546

query I rowsort
SELECT ALL - + col0 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL col2 * col2 * col1 - + col0 FROM tab2 AS cor0
----
22592
24469
39806

onlyif mysql # use DIV operator for integer division
query I rowsort label-5426
SELECT ALL - + col0 DIV + 37 + col0 + - col2 AS col2 FROM tab0 AS cor0
----
-9
34
5

skipif mysql # not compatible
query I rowsort label-5426
SELECT ALL - + col0 / + 37 + col0 + - col2 AS col2 FROM tab0 AS cor0
----
-9
34
5

query I rowsort
SELECT - - col2 * - 1 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5428
SELECT ALL + col1 + - 53 DIV + cor0.col0 AS col0 FROM tab1 AS cor0
----
10
13
9

skipif mysql # not compatible
query I rowsort label-5428
SELECT ALL + col1 + - 53 / + cor0.col0 AS col0 FROM tab1 AS cor0
----
10
13
9

query I rowsort
SELECT DISTINCT - col1 * col1 + - cor0.col0 FROM tab0 AS cor0
----
-7420
-8370
-9444

query I rowsort
SELECT ALL 48 - - 46 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT - col2 * tab2.col1 - - col0 FROM tab2
----
-1456
-567
-830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 col1 FROM tab1
----
74
74
74

query I rowsort
SELECT ALL cor0.col2 * - 78 FROM tab0 AS cor0
----
-2574
-6396
-78

query I rowsort
SELECT DISTINCT + col0 * - col1 + - col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT + + col0 + + col0 + 12 AS col0 FROM tab0 cor0
----
190
60
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + col0 col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT col0 * + ( + ( + col2 ) ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - + col2 * + ( col1 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL 17 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT DISTINCT col1 * - 58 AS col1 FROM tab0 AS cor0
----
-4988
-5278
-5626

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5441
SELECT + - col2 * + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5441
SELECT + - col2 * + CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5442
SELECT ALL + cor0.col2 + + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5442
SELECT ALL + cor0.col2 + + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * + 57 FROM tab2 AS cor0
----
1482
1539
2166

query I rowsort
SELECT - + cor0.col0 * + 3 + + cor0.col1 AS col0 FROM tab0 cor0
----
-176
-8
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-5445
SELECT + col0 + - col0 DIV - cor0.col1 FROM tab2 AS cor0
----
7
79
83

skipif mysql # not compatible
query I rowsort label-5445
SELECT + col0 + - col0 / - cor0.col1 FROM tab2 AS cor0
----
7
79
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col1 * + col1 + + 27 * col2 col2 FROM tab1
----
18816
37962
7239

query I rowsort
SELECT ALL - - cor0.col2 + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5448
SELECT + col0 DIV 75 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5448
SELECT + col0 / 75 FROM tab0 cor0
----
0
0
1

query I rowsort
SELECT DISTINCT + col2 * 24 + cor0.col0 * + col2 AS col2 FROM tab1 AS cor0
----
1458
5016
9984

onlyif mysql # use DIV operator for integer division
query I rowsort label-5450
SELECT - col2 DIV 10 AS col1 FROM tab0 AS cor0
----
-3
-8
0

skipif mysql # not compatible
query I rowsort label-5450
SELECT - col2 / 10 AS col1 FROM tab0 AS cor0
----
-3
-8
0

query I rowsort
SELECT - col0 + + 19 AS col0 FROM tab0
----
-16
-5
-70

query I rowsort
SELECT ( - 25 ) AS col1 FROM tab1 cor0
----
-25
-25
-25

query I rowsort
SELECT + - col0 * - ( col0 ) + col2 * col0 AS col1 FROM tab2 AS cor0
----
238
8112
9243

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT - col0 * col0 * - 75 FROM tab2 AS cor0
----
3675
456300
468075

query I rowsort
SELECT DISTINCT + ( col1 ) + + 91 FROM tab2
----
108
122
150

query I rowsort
SELECT 49 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT ALL col2 * col0 + + 83 FROM tab1
----
245
3731
7763

query I rowsort
SELECT ALL + 37 + + col1 + - col0 FROM tab2
----
-25
18
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5460
SELECT ALL + col2 + col1 * - CAST( 97 AS SIGNED ) AS col1 FROM tab0
----
-8309
-8745
-9408

skipif mysql # not compatible
query I rowsort label-5460
SELECT ALL + col2 + col1 * - CAST ( 97 AS INTEGER ) AS col1 FROM tab0
----
-8309
-8745
-9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-5461
SELECT DISTINCT - + ( col0 ) DIV + col1 FROM tab1 AS cor0
----
-6
0

skipif mysql # not compatible
query I rowsort label-5461
SELECT DISTINCT - + ( col0 ) / + col1 FROM tab1 AS cor0
----
-6
0

query I rowsort
SELECT ALL - + ( cor0.col1 ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT 99 * + col0 + 9 AS col2 FROM tab1 AS cor0
----
306
6345
7929

query I rowsort
SELECT + tab1.col2 * - col2 + + ( col1 ) * tab1.col2 FROM tab1
----
-1512
-2679
-7968

query I rowsort
SELECT - 6 * + cor0.col0 FROM tab0, tab1, tab2 cor0
----
27 values hashing to 1ba4e46a1a37d4a35ff8a8e71b0ab001

query I rowsort
SELECT DISTINCT ( - 56 + col1 * 96 ) FROM tab2
----
1576
2920
5608

query I rowsort
SELECT - 80 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
2640
6560
80

query I rowsort
SELECT DISTINCT + 72 * col0 - col1 AS col1 FROM tab2 AS cor0
----
473
5557
5671

query I rowsort
SELECT ALL - ( - col2 ) * col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - + 45 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
-10
-21
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 11 col1 FROM tab2 AS cor0
----
11
11
11

query I rowsort
SELECT + col2 * + col2 + col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT - - cor0.col2 + col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT + - col0 * 22 + + col0 FROM tab0 cor0
----
-1869
-504
-735

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5475
SELECT DISTINCT cor0.col1 * - CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5475
SELECT DISTINCT cor0.col1 * - CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col0 * + 94 FROM tab0
----
2256
3290
8366

query I rowsort
SELECT DISTINCT col2 * + 25 FROM tab0
----
2050
25
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-5478
SELECT - col2 DIV 91 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5478
SELECT - col2 / 91 FROM tab2
----
0
0
0

query I rowsort
SELECT cor0.col1 + + ( - cor0.col2 ) AS col1 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5480
SELECT + ( col2 ) + cor0.col0 DIV cor0.col0 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-5480
SELECT + ( col2 ) + cor0.col0 / cor0.col0 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT col0 + + col0 * ( col2 * col0 ) + - col1 AS col2 FROM tab1
----
233526
463
614467

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab2, tab0 cor0, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT - col2 + - 38 FROM tab2 AS cor0
----
-64
-65
-76

query I rowsort
SELECT - 87 * - col2 + col1 * 95 AS col2 FROM tab0 AS cor0
----
11041
15779
9302

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col1 + col1 * - col2 col1 FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT ALL col0 * + ( col0 + - col1 ) AS col2 FROM tab0
----
-1488
-178
-2170

onlyif mysql # use DIV operator for integer division
query I rowsort label-5487
SELECT ALL + col1 * col1 DIV col1 AS col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5487
SELECT ALL + col1 * col1 / col1 AS col1 FROM tab0
----
86
91
97

query I rowsort
SELECT col2 * - 81 AS col1 FROM tab2
----
-2106
-2187
-3078

query I rowsort
SELECT ALL col0 * + col1 + - 88 + col0 AS col1 FROM tab1
----
-7
1032
616

query I rowsort
SELECT + 76 * + col1 + col0 FROM tab0 AS cor0
----
6560
7005
7407

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5491
SELECT ALL - + CAST( NULL AS SIGNED ) * + col2 col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5491
SELECT ALL - + CAST ( NULL AS INTEGER ) * + col2 col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * 3 AS col2 FROM tab2
----
-114
-78
-81

query I rowsort
SELECT DISTINCT - 80 * col2 AS col2 FROM tab2 AS cor0
----
-2080
-2160
-3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5494
SELECT - col1 * - col2 * - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5494
SELECT - col1 * - col2 * - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 79 - col0 FROM tab2 AS cor0
----
-157
-158
-86

query I rowsort
SELECT ALL + 65 * col2 - col0 FROM tab0 AS cor0
----
2121
30
5241

query I rowsort
SELECT DISTINCT + 83 * col1 FROM tab0 AS cor0
----
7138
7553
8051

query I rowsort
SELECT ALL - 83 + - col2 AS col1 FROM tab1 AS cor0
----
-137
-140
-179

query I rowsort
SELECT DISTINCT col1 + col2 - col0 AS col2 FROM tab1
----
29
3
77

query I rowsort
SELECT DISTINCT + cor0.col0 * - col0 + + col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT ALL - col1 * 36 FROM tab2 AS cor0
----
-1116
-2124
-612

onlyif mysql # use DIV operator for integer division
query I rowsort label-5502
SELECT - cor0.col2 DIV 15 AS col2 FROM tab1 AS cor0
----
-3
-3
-6

skipif mysql # not compatible
query I rowsort label-5502
SELECT - cor0.col2 / 15 AS col2 FROM tab1 AS cor0
----
-3
-3
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5503
SELECT DISTINCT - - col2 + ( col1 ) * col1 DIV + 47 FROM tab1 AS cor0
----
59
68
99

skipif mysql # not compatible
query I rowsort label-5503
SELECT DISTINCT - - col2 + ( col1 ) * col1 / + 47 FROM tab1 AS cor0
----
59
68
99

query I rowsort
SELECT DISTINCT + col2 * - col2 * - col1 FROM tab1
----
119808
32490
75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-5505
SELECT DISTINCT - 52 DIV - col1 AS col0 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5505
SELECT DISTINCT - 52 / - col1 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + - 34 * + col0 * - ( - 46 ) FROM tab2 AS cor0
----
-10948
-121992
-123556

query I rowsort
SELECT - cor0.col0 + - col2 + col0 * + col0 FROM tab1 AS cor0
----
-48
3975
6224

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5508
SELECT DISTINCT col1 + col2 * CAST( NULL AS SIGNED ) col0 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5508
SELECT DISTINCT col1 + col2 * CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + 97 - - col2 FROM tab2
----
123
124
135

query I rowsort
SELECT - col2 + col2 + - 34 AS col1 FROM tab2 cor0
----
-34
-34
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5511
SELECT 91 DIV - col1 + col0 col0 FROM tab1
----
0
55
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5511
SELECT 91 / - col1 + col0 col0 FROM tab1
----
0
55
73

query I rowsort
SELECT - 57 + + col2 AS col0 FROM tab0
----
-24
-56
25

query I rowsort
SELECT col0 * - col2 + - 98 FROM tab2
----
-2126
-287
-3100

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5514
SELECT - col1 + - col0 + + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5514
SELECT - col1 + - col0 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 54 + col0 AS col1 FROM tab1
----
118
134
57

query I rowsort
SELECT col0 + ( col0 ) FROM tab2
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-5517
SELECT - col0 DIV - 2 AS col0 FROM tab1
----
1
32
40

skipif mysql # not compatible
query I rowsort label-5517
SELECT - col0 / - 2 AS col0 FROM tab1
----
1
32
40

query I rowsort
SELECT DISTINCT col1 - - ( - ( + col1 ) * - tab0.col0 ) FROM tab0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT - col2 * 50 AS col0 FROM tab1 AS cor0
----
-2700
-2850
-4800

query I rowsort
SELECT col0 - - col1 * col1 AS col2 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT ALL - - col1 * 20 AS col2 FROM tab2 AS cor0
----
1180
340
620

query I rowsort
SELECT DISTINCT + + ( col2 ) - col2 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + - CAST ( - 57 AS REAL ) FROM tab2 AS cor0
----
57

query I rowsort
SELECT DISTINCT 6 * ( col0 ) AS col0 FROM tab2 AS cor0
----
42
468
474

query I rowsort
SELECT ALL col0 + ( col2 ) AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT + 27 FROM tab2, tab0 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT ALL col2 * col0 - + col0 AS col2 FROM tab2
----
182
1950
2923

query I rowsort
SELECT col2 * - ( + tab1.col1 + - col2 ) FROM tab1
----
1512
2679
7968

query I rowsort
SELECT - ( col2 ) + col1 + col1 * col1 * col0 AS col0 FROM tab2 cor0
----
22810
271551
6731

query I rowsort
SELECT DISTINCT + col2 * cor0.col0 AS col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL - + 4 * col2 + - col2 AS col2 FROM tab0 cor0
----
-165
-410
-5

query I rowsort
SELECT DISTINCT - - 90 * col0 AS col1 FROM tab2 AS cor0
----
630
7020
7110

query I rowsort
SELECT - + 8 * - col1 AS col0 FROM tab0 AS cor0
----
688
728
776

onlyif mysql # use DIV operator for integer division
query I rowsort label-5534
SELECT ALL - col2 DIV + col1 + - col0 FROM tab2 AS cor0
----
-7
-78
-81

skipif mysql # not compatible
query I rowsort label-5534
SELECT ALL - col2 / + col1 + - col0 FROM tab2 AS cor0
----
-7
-78
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5535
SELECT col2 DIV ( + col2 ) + col1 + cor0.col0 * col2 AS col1 FROM tab0 AS cor0
----
133
7390
879

skipif mysql # not compatible
query I rowsort label-5535
SELECT col2 / ( + col2 ) + col1 + cor0.col0 * col2 AS col1 FROM tab0 AS cor0
----
133
7390
879

query I rowsort
SELECT ALL - ( + cor0.col2 ) * - col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT + col2 + - cor0.col0 * - col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL - + 94 * - col0 + col1 AS col2 FROM tab2 AS cor0
----
689
7391
7443

query I rowsort
SELECT - ( 37 ) + + cor0.col2 AS col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 775d64f469627e19a810e210ebe183fb

query I rowsort
SELECT DISTINCT - col1 * + col0 + col0 * 81 FROM tab2
----
1716
350
5056

query I rowsort
SELECT + 25 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 2c77240b60ac01c717a5ed5d0165f450

query I rowsort
SELECT ALL + 34 + - 40 * col0 AS col1 FROM tab2
----
-246
-3086
-3126

query I rowsort
SELECT ALL ( - 28 ) + col2 FROM tab2
----
-1
-2
10

query I rowsort
SELECT DISTINCT ( col2 ) * col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - col0 * 28 AS col1 FROM tab1
----
-1792
-2240
-84

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col0 AS REAL ) FROM tab1
----
3
64
80

query I rowsort
SELECT - + 71 * - col2 FROM tab2 AS cor0
----
1846
1917
2698

query I rowsort
SELECT ALL + 21 + col0 * + 87 FROM tab1 AS cor0
----
282
5589
6981

query I rowsort
SELECT ALL - + cor0.col0 * cor0.col0 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col0 + - col0 col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + col0 * col1 + 74 AS col1 FROM tab0 AS cor0
----
2138
3469
8173

query I rowsort
SELECT - col0 + + 22 AS col0 FROM tab2
----
-56
-57
15

query I rowsort
SELECT + - 4 * col2 + ( - col2 ) AS col2 FROM tab1 AS cor0
----
-270
-285
-480

query I rowsort
SELECT + ( - col0 ) + + col1 AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT + cor0.col0 + col0 AS col2 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT + + cor0.col0 + col2 * col2 * col1 AS col1 FROM tab0 AS cor0
----
132
611973
93678

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ALL - col1 + - ( ( - col1 ) ) * + col0 AS col2 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT - col0 + cor0.col0 * col1 AS col1 FROM tab0 cor0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT + cor0.col0 - + 40 FROM tab1 AS cor0
----
-37
24
40

query I rowsort
SELECT ALL cor0.col2 + + 45 AS col0 FROM tab0 AS cor0
----
127
46
78

query I rowsort
SELECT DISTINCT + col1 * col1 * cor0.col0 FROM tab0 AS cor0
----
177504
329315
737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-5563
SELECT ALL + col0 + - col2 DIV col1 FROM tab1 AS cor0
----
1
59
73

skipif mysql # not compatible
query I rowsort label-5563
SELECT ALL + col0 + - col2 / col1 FROM tab1 AS cor0
----
1
59
73

query I rowsort
SELECT + cor1.col1 AS col1 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-5565
SELECT - col0 * 11 DIV - cor0.col0 FROM tab0 AS cor0
----
11
11
11

skipif mysql # not compatible
query I rowsort label-5565
SELECT - col0 * 11 / - cor0.col0 FROM tab0 AS cor0
----
11
11
11

query I rowsort
SELECT DISTINCT - col0 * - 21 - col1 * + col0 AS col1 FROM tab1 AS cor0
----
-15
640
704

query I rowsort
SELECT DISTINCT - + col0 + + col0 * 34 AS col1 FROM tab0 AS cor0
----
1155
2937
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5568
SELECT ALL col0 * + CAST( NULL AS SIGNED ) * - col1 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-5568
SELECT ALL col0 * + CAST ( NULL AS INTEGER ) * - col1 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 24 + + col0 * cor0.col1 AS col1 FROM tab0 AS cor0
----
2088
3419
8123

onlyif mysql # use DIV operator for integer division
query I rowsort label-5570
SELECT ALL + ( col0 ) DIV - col1 col1 FROM tab1 AS cor0
----
-6
-6
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5570
SELECT ALL + ( col0 ) / - col1 col1 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT + 92 FROM tab1, tab0 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

query I rowsort
SELECT - col2 * ( - col1 + - col1 ) * 32 FROM tab1 AS cor0
----
36480
79872
89856

query I rowsort
SELECT + - col0 * 24 + + 25 * + col1 FROM tab0 AS cor0
----
139
1574
1585

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 76 - tab2.col0 col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 8724334d44e281dced04158cdeecfa33

query I rowsort
SELECT DISTINCT col1 * col0 + ( + col2 ) * col2 * + 95 + col0 * col0 FROM tab2
----
144764
69521
74906

query I rowsort
SELECT - - col2 * - col2 + col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT col2 * col0 - - col2 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5579
SELECT col1 * CAST( NULL AS SIGNED ) * + col1 - + col2 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5579
SELECT col1 * CAST ( NULL AS INTEGER ) * + col1 - + col2 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col0 * 63 + col0 FROM tab0 AS cor0
----
-1488
-2170
-5518

query I rowsort
SELECT + col0 * 99 + col1 * col2 - - col2 AS col1 FROM tab0 AS cor0
----
16355
3563
5247

query I rowsort
SELECT ALL + col2 + + cor0.col1 + col2 AS col2 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT DISTINCT - 28 - + 58 AS col0 FROM tab2 AS cor0
----
-86

query I rowsort
SELECT DISTINCT - 33 * - 99 + - col1 FROM tab0 AS cor0
----
3170
3176
3181

query I rowsort
SELECT ALL 38 * cor0.col0 FROM tab1 AS cor0
----
114
2432
3040

query I rowsort
SELECT cor0.col2 + + cor0.col1 * col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT + - 81 + col0 AS col2 FROM tab2 AS cor0
----
-2
-3
-74

query I rowsort
SELECT ALL 78 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

query I rowsort
SELECT cor0.col2 * - col2 AS col0 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL 71 AS col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT DISTINCT - - ( - col1 ) + - ( + ( - col0 ) ) * 81 FROM tab0 AS cor0
----
1858
2738
7118

query I rowsort
SELECT - col0 + - col0 * + 30 AS col2 FROM tab1
----
-1984
-2480
-93

query I rowsort
SELECT - - 61 + cor0.col2 * + col0 FROM tab1 AS cor0
----
223
3709
7741

query I rowsort
SELECT + - 65 * + col2 FROM tab2 AS cor0
----
-1690
-1755
-2470

query I rowsort
SELECT - 51 * - col2 FROM tab1 AS cor0
----
2754
2907
4896

query I rowsort
SELECT DISTINCT - col1 * col1 + ( - col0 ) AS col2 FROM tab2 AS cor0
----
-3559
-368
-968

query I rowsort
SELECT ALL - + col1 * 93 FROM tab0 cor0
----
-7998
-8463
-9021

query I rowsort
SELECT DISTINCT + cor0.col1 * + col1 + cor0.col0 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT - + col1 + - ( col2 ) AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - col1 * + col2 * - col0 AS col1 FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT col1 + col2 * cor0.col2 + col2 AS col1 FROM tab0 AS cor0
----
1208
6897
99

query I rowsort
SELECT ALL cor1.col2 FROM tab2, tab1 AS cor0, tab1 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL 72 FROM tab0, tab2 cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT DISTINCT - 70 AS col1 FROM tab0 cor0
----
-70

query I rowsort
SELECT ALL + 89 * 79 * + col0 AS col2 FROM tab0 AS cor0
----
168744
246085
625759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col1 ) col0 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT + + col2 + - col2 * - col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT + ( col0 ) + + col2 + - 33 FROM tab1 cor0
----
143
24
88

query I rowsort
SELECT DISTINCT + + col2 + + col0 * 4 AS col1 FROM tab1 AS cor0
----
313
416
66

query I rowsort
SELECT - col2 * col2 * + ( + col0 ) AS col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL col0 * + col0 + col0 * + col0 FROM tab1 AS cor0
----
12800
18
8192

query I rowsort
SELECT + + ( - col1 ) FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL 15 * - col2 + 38 * 15 AS col2 FROM tab1 AS cor0
----
-240
-285
-870

query I rowsort
SELECT 15 + - col0 AS col2 FROM tab1 AS cor0
----
-49
-65
12

query I rowsort
SELECT ALL 32 + cor0.col1 FROM tab2 AS cor0
----
49
63
91

query I rowsort
SELECT DISTINCT 81 + + col2 - col2 AS col1 FROM tab0 AS cor0
----
81

query I rowsort
SELECT ALL - ( + col1 * col0 ) + ( col2 ) FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL - ( + cor0.col1 ) FROM tab0, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT - 76 + - 57 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to d0196da2abaae3f843cb3892c4b57879

query I rowsort
SELECT col0 * + col1 * col2 - - col2 AS col1 FROM tab2
----
119678
51072
5886

query I rowsort
SELECT DISTINCT - 77 + 4 AS col0 FROM tab0, tab1, tab1 AS cor0
----
-73

query I rowsort
SELECT ALL - col2 + - col0 + tab0.col2 FROM tab0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5623
SELECT + tab2.col1 + col0 DIV - col0 AS col0 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-5623
SELECT + tab2.col1 + col0 / - col0 AS col0 FROM tab2
----
16
30
58

query I rowsort
SELECT + + col2 * - col0 + col1 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT + col0 + + col1 * - cor0.col0 - + col1 AS col1 FROM tab0 AS cor0
----
-2126
-3457
-8101

query I rowsort
SELECT DISTINCT - col0 * + col2 + - col0 * + col0 FROM tab0 AS cor0
----
-1260
-1368
-15219

query I rowsort
SELECT col1 + - col1 * - col1 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT DISTINCT + tab0.col0 * - col1 + + tab0.col2 AS col2 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL - col1 + col1 * col1 * + col0 AS col2 FROM tab1
----
13507
2002
6390

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col1 col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT col0 * - col2 * col1 AS col1 FROM tab1 cor0
----
-36480
-4212
-99840

query I rowsort
SELECT cor0.col0 * + col2 * - col1 + cor0.col1 AS col2 FROM tab1 AS cor0
----
-36470
-4186
-99827

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 + col1 col1 FROM tab0 AS cor0
----
1175
6815
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5634
SELECT DISTINCT + col1 * + col2 + - col0 DIV col0 FROM tab2 AS cor0
----
1533
645
836

skipif mysql # not compatible
query I rowsort label-5634
SELECT DISTINCT + col1 * + col2 + - col0 / col0 FROM tab2 AS cor0
----
1533
645
836

onlyif mysql # use DIV operator for integer division
query I rowsort label-5635
SELECT DISTINCT + col0 DIV + col1 - - col0 AS col2 FROM tab1 cor0
----
3
70
86

skipif mysql # not compatible
query I rowsort label-5635
SELECT DISTINCT + col0 / + col1 - - col0 AS col2 FROM tab1 cor0
----
3
70
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * + cor0.col1 * + col2 col1 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT DISTINCT - cor0.col2 + col1 * + cor0.col0 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT DISTINCT + col1 + - tab1.col1 + - col1 FROM tab1
----
-10
-13
-26

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab2 AS cor0 WHERE ( NULL ) NOT IN ( + tab1.col1 * - tab1.col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + + col0 + - col2 col2 FROM tab1
----
-48
64
71

query I rowsort
SELECT ALL col2 + col2 * - col1 AS col0 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT + 73 * - col2 AS col0 FROM tab1 AS cor0
----
-3942
-4161
-7008

query I rowsort
SELECT DISTINCT + 51 * col2 AS col2 FROM tab0 AS cor0
----
1683
4182
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + + col0 * + col1 col1 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT + + col1 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT - - 0 * + col0 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL + 67 * col2 + col2 AS col0 FROM tab0 AS cor0
----
2244
5576
68

query I rowsort
SELECT ALL col1 + col1 * col1 AS col2 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT - col1 * cor0.col1 * col0 FROM tab0 AS cor0
----
-177504
-329315
-737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 21 ) * - col1 + - col0 col1 FROM tab2
----
-1317
-436
-658

query I rowsort
SELECT - ( - col2 ) - + col1 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL 89 * - col1 * + col1 AS col1 FROM tab2
----
-25721
-309809
-85529

query I rowsort
SELECT ALL + ( col1 ) * col1 AS col1 FROM tab0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-5654
SELECT ALL ( + col2 ) DIV col1 AS col0 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5654
SELECT ALL ( + col2 ) / col1 AS col0 FROM tab2
----
0
0
2

query I rowsort
SELECT + tab0.col2 * col1 + + col0 + + col2 AS col0 FROM tab0
----
133
2895
7633

query I rowsort
SELECT col1 + col0 * col0 * cor0.col0 AS col2 FROM tab0 AS cor0
----
13910
42972
705060

query I rowsort
SELECT DISTINCT + col2 * col2 + + col1 * - col2 + cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
1170
3800
81

query I rowsort
SELECT - ( - cor0.col2 ) AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + ( col0 * col2 ) + col2 * + col0 AS col0 FROM tab0
----
14596
1584
70

query I rowsort
SELECT - col0 * + col1 + col2 - col2 AS col0 FROM tab2 cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 * + tab2.col1 col1 FROM tab2
----
-289
-3481
-961

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT ( NULL ) NOT IN ( + col0 + col1 )
----

query I rowsort
SELECT - tab2.col0 * col1 + - col2 * + col0 AS col2 FROM tab2 WHERE col2 * + col2 NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT col0 + - col2 FROM tab2 WHERE NULL = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5665
SELECT ALL + col2 * - col1 + - tab2.col0 DIV + col1 AS col1 FROM tab2
----
-1535
-650
-837

skipif mysql # not compatible
query I rowsort label-5665
SELECT ALL + col2 * - col1 + - tab2.col0 / + col1 AS col1 FROM tab2
----
-1535
-650
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5666
SELECT - col2 + - col1 DIV tab0.col0 AS col1 FROM tab0
----
-3
-36
-83

skipif mysql # not compatible
query I rowsort label-5666
SELECT - col2 + - col1 / tab0.col0 AS col1 FROM tab0
----
-3
-36
-83

query I rowsort
SELECT + col2 + tab0.col1 + col2 FROM tab0
----
152
255
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-5668
SELECT - col1 DIV - col1 col2 FROM tab2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5668
SELECT - col1 / - col1 col2 FROM tab2
----
1
1
1

query I rowsort
SELECT DISTINCT col2 * col2 * + tab2.col1 + - col1 * col0 AS col2 FROM tab2
----
22382
23205
35282

query III rowsort
SELECT ALL * FROM tab1 WHERE ( col2 / col2 ) >= NULL
----

query I rowsort
SELECT - col0 - tab0.col1 * col2 AS col0 FROM tab0
----
-132
-2862
-7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-5672
SELECT ALL col0 DIV col1 + - col2 AS col2 FROM tab2
----
-25
-27
-34

skipif mysql # not compatible
query I rowsort label-5672
SELECT ALL col0 / col1 + - col2 AS col2 FROM tab2
----
-25
-27
-34

query I rowsort
SELECT - tab0.col2 + tab0.col2 * - col0 AS col2 FROM tab0
----
-36
-7380
-825

query I rowsort
SELECT col1 + col0 * + col0 FROM tab2
----
6143
6258
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 - col1 col2 FROM tab2
----
0

query I rowsort
SELECT ALL tab2.col2 + + col1 AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL + tab1.col1 * + col0 + tab1.col2 AS col1 FROM tab1
----
1136
132
697

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT - col0 BETWEEN NULL AND col0
----

query I rowsort
SELECT ALL - col1 * + tab2.col1 * - col2 AS col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT DISTINCT + col0 + col2 * + col2 * col2 FROM tab1
----
157467
185257
884816

query I rowsort
SELECT tab1.col1 + - col0 * + col2 * col2 AS col0 FROM tab1
----
-207926
-737267
-8722

query I rowsort
SELECT col2 * - col0 FROM tab1 WHERE NULL NOT BETWEEN NULL AND col1 * col1
----

query I rowsort
SELECT ALL + col0 + + tab2.col2 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT col0 + col0 + tab1.col2 AS col2 FROM tab1
----
185
256
60

query I rowsort
SELECT - col1 - col2 * tab0.col1 FROM tab0
----
-194
-2924
-7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col0 FROM tab0 WHERE NOT ( NULL ) NOT IN ( tab0.col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5687
SELECT col2 DIV col1 + - col2 col0 FROM tab0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5687
SELECT col2 / col1 + - col2 col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - col1 - + col0 AS col1 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT ALL col0 + tab1.col0 * col1 FROM tab1
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5690
SELECT cor0.col2 * + cor0.col0 + - col2 DIV col2 AS col0 FROM tab0 AS cor0
----
34
7297
791

skipif mysql # not compatible
query I rowsort label-5690
SELECT cor0.col2 * + cor0.col0 + - col2 / col2 AS col0 FROM tab0 AS cor0
----
34
7297
791

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col0 col2 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT + - col0 * - col2 + col0 * col1 FROM tab2 AS cor0
----
406
4345
6630

query I rowsort
SELECT DISTINCT - + cor0.col2 + + col1 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + col0 * cor0.col1 col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL - - col1 * cor0.col2 + col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT - col0 + - cor0.col0 * col0 AS col0 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT DISTINCT cor0.col0 + - col0 + + col1 AS col0 FROM tab2 AS cor0
----
17
31
59

query III rowsort
SELECT DISTINCT * FROM tab2 cor0 WHERE col0 IN ( + col1 )
----

query I rowsort
SELECT ALL col1 * col0 + - col2 + col0 FROM tab0 AS cor0 WHERE NOT col1 NOT IN ( - col1 + + col2 )
----

query I rowsort
SELECT ALL cor0.col0 + col1 AS col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT cor0.col2 + + col1 + col0 * col0 AS col2 FROM tab1 AS cor0
----
4163
6509
89

query I rowsort
SELECT DISTINCT col2 * - col0 + - col1 FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-5703
SELECT col0 DIV + col1 - - col2 FROM tab1
----
102
54
63

skipif mysql # not compatible
query I rowsort label-5703
SELECT col0 / + col1 - - col2 FROM tab1
----
102
54
63

query IIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 WHERE NULL BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT + ( + 53 ) + col2 * - col2 FROM tab0 AS cor0
----
-1036
-6671
52

query I rowsort
SELECT + col0 + + col1 * + col2 * col1 FROM tab0 AS cor0
----
244092
679131
9444

query I rowsort
SELECT + + col1 + 65 * - col2 FROM tab1 AS cor0
----
-3484
-3695
-6227

query I rowsort
SELECT ALL + + cor0.col0 AS col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # use DIV operator for integer division
query I rowsort label-5709
SELECT ALL - col1 DIV + 36 AS col2 FROM tab2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5709
SELECT ALL - col1 / + 36 AS col2 FROM tab2
----
-1
0
0

query I rowsort
SELECT - + ( - col0 ) + col2 * cor0.col2 FROM tab2 AS cor0
----
1523
736
754

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * 16 + - col2 * ( - 21 ) col1 FROM tab2 AS cor0
----
130
135
190

query I rowsort
SELECT 5 * + col2 * col1 AS col0 FROM tab0
----
14190
37310
485

query I rowsort
SELECT + 0 + - col2 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - - col2 * col0 - - col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT - + col1 * col1 + 68 * col0 FROM tab2 AS cor0
----
-485
1823
5083

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 + cor0.col0 * - cor0.col1 FROM tab1 AS cor0
----
-10256
-2994
-3889

query I rowsort
SELECT ALL 14 * 5 FROM tab2
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + tab1.col0 col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL + 22 + - 33 FROM tab2, tab0 AS cor0
----
9 values hashing to 05cc989122d7724c7abefaba9625ef3d

query I rowsort
SELECT ALL + col0 * + ( col0 ) AS col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + 78 FROM tab2, tab1 AS cor0
----
78

query I rowsort
SELECT col0 * - 54 AS col2 FROM tab0 AS cor0
----
-1296
-1890
-4806

onlyif mysql # use DIV operator for integer division
query I rowsort label-5723
SELECT + col0 * - 21 + cor0.col1 DIV col0 AS col2 FROM tab1 AS cor0
----
-1344
-1680
-55

skipif mysql # not compatible
query I rowsort label-5723
SELECT + col0 * - 21 + cor0.col1 / col0 AS col2 FROM tab1 AS cor0
----
-1344
-1680
-55

query I rowsort
SELECT + cor0.col0 FROM tab1 cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT + 27 FROM tab0, tab0 AS cor0
----
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 - col2 * - col1 col1 FROM tab1
----
1210
1482
2288

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 79 * ( tab2.col0 ) col2 FROM tab2
----
553
6162
6241

query I rowsort
SELECT DISTINCT - 52 + cor0.col2 AS col2 FROM tab2 AS cor0
----
-14
-25
-26

query I rowsort
SELECT ALL + + 75 * col0 AS col1 FROM tab1 cor0
----
225
4800
6000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col2 ) col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 55 * col1 - - col0 col1 FROM tab1
----
1433
614
795

query I rowsort
SELECT 2 * + col2 + + ( - col1 ) FROM tab1
----
104
179
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * - col2 * + 49 col1 FROM tab1
----
-142884
-159201
-451584

query I rowsort
SELECT DISTINCT 56 * + tab2.col2 AS col0 FROM tab2
----
1456
1512
2128

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5735
SELECT DISTINCT ( col1 ) - CAST( NULL AS SIGNED ) col2 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5735
SELECT DISTINCT ( col1 ) - CAST ( NULL AS INTEGER ) col2 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col1 col1 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
86
91
97

query I rowsort
SELECT - 50 + col2 * 22 FROM tab2 cor0
----
522
544
786

query I rowsort
SELECT cor0.col1 + + 82 AS col0 FROM tab1 AS cor0
----
108
92
95

query I rowsort
SELECT ALL + col2 + 46 FROM tab1 AS cor0
----
100
103
142

query I rowsort
SELECT - cor0.col1 * + 68 FROM tab1 AS cor0
----
-1768
-680
-884

query I rowsort
SELECT 89 * col2 * col2 AS col0 FROM tab1
----
259524
289161
820224

query I rowsort
SELECT ALL + col2 * - col1 * ( + col0 ) FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT + tab2.col1 * + 76 FROM tab2, tab2 cor0
----
1292
2356
4484

onlyif mysql # use DIV operator for integer division
query I rowsort label-5744
SELECT DISTINCT - col1 DIV + 98 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5744
SELECT DISTINCT - col1 / + 98 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL col0 + + 57 AS col1 FROM tab1 AS cor0
----
121
137
60

query I rowsort
SELECT DISTINCT + col1 - + col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT ALL col1 - col1 * + 85 FROM tab2
----
-1428
-2604
-4956

query I rowsort
SELECT ALL col0 + - col2 + cor0.col1 * - col0 FROM tab2 AS cor0
----
-1302
-237
-4550

query I rowsort
SELECT - + col0 + + col1 * cor0.col1 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT ALL + - col0 * + col1 + col2 * - col2 FROM tab1 AS cor0
----
-10256
-2994
-3889

query I rowsort
SELECT DISTINCT + 21 + col0 FROM tab2 cor0
----
100
28
99

query I rowsort
SELECT DISTINCT + cor0.col2 * + col2 - + ( - col1 ) AS col2 FROM tab2 cor0
----
1461
735
760

query I rowsort
SELECT ALL - - col0 + + col2 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + 10 * tab2.col2 col0 FROM tab2
----
14440
6760
7290

onlyif mysql # use DIV operator for integer division
query I rowsort label-5755
SELECT DISTINCT cor0.col1 + - col2 DIV col0 FROM tab2 AS cor0
----
17
28
59

skipif mysql # not compatible
query I rowsort label-5755
SELECT DISTINCT cor0.col1 + - col2 / col0 FROM tab2 AS cor0
----
17
28
59

query I rowsort
SELECT ALL + + col1 - + col2 AS col0 FROM tab2 cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - 47 * - col1 col0 FROM tab2 AS cor0
----
1488
2832
816

query I rowsort
SELECT DISTINCT + col0 + 10 * - 19 FROM tab0 cor0
----
-101
-155
-166

query I rowsort
SELECT ALL - col2 * + col0 + - col0 AS col2 FROM tab0 AS cor0
----
-70
-7387
-816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5760
SELECT DISTINCT CAST( NULL AS SIGNED ) - - cor0.col2 * - col0 col2 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5760
SELECT DISTINCT CAST ( NULL AS INTEGER ) - - cor0.col2 * - col0 col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5761
SELECT DISTINCT ( + 17 ) + col0 + 60 DIV + 62 FROM tab1 AS cor0
----
20
81
97

skipif mysql # not compatible
query I rowsort label-5761
SELECT DISTINCT ( + 17 ) + col0 + 60 / + 62 FROM tab1 AS cor0
----
20
81
97

query I rowsort
SELECT DISTINCT + 82 * + ( - col1 ) FROM tab0
----
-7052
-7462
-7954

query I rowsort
SELECT ALL 30 AS col0 FROM tab2, tab0, tab0 AS cor0, tab1
----
81 values hashing to 1ae25494a21836bac07879aa19fd4615

query I rowsort
SELECT 20 + + col0 FROM tab1
----
100
23
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 48 * tab0.col1 col0 FROM tab0
----
-4128
-4368
-4656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 26 col2 FROM tab1 AS cor0
----
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 79 * + cor0.col0 + + cor0.col0 col2 FROM tab2 AS cor0
----
-546
-6084
-6162

query I rowsort
SELECT ALL - - ( - 18 ) - col1 AS col2 FROM tab2 AS cor0
----
-35
-49
-77

query I rowsort
SELECT ALL 77 * 53 - col2 AS col2 FROM tab1 AS cor0
----
3985
4024
4027

onlyif mysql # use DIV operator for integer division
query I rowsort label-5770
SELECT - col1 * - col2 + col1 DIV col2 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-5770
SELECT - col1 * - col2 + col1 / col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5771
SELECT ALL + CAST( NULL AS SIGNED ) + col0 + + col2 * + col1 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5771
SELECT ALL + CAST ( NULL AS INTEGER ) + col0 + + col2 * + col1 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col0 * col0 * cor0.col1 + - col0 * col2 FROM tab0 AS cor0
----
-118860
-50328
-728109

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 9 col0 FROM tab1 AS cor0
----
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5774
SELECT DISTINCT - - col0 + - col1 * + CAST( - col1 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
3559
368
968

skipif mysql # not compatible
query I rowsort label-5774
SELECT DISTINCT - - col0 + - col1 * + CAST ( - col1 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
3559
368
968

onlyif mysql # use DIV operator for integer division
query I rowsort label-5775
SELECT DISTINCT + ( col2 ) DIV + 42 + + col1 FROM tab0 AS cor0
----
86
92
97

skipif mysql # not compatible
query I rowsort label-5775
SELECT DISTINCT + ( col2 ) / + 42 + + col1 FROM tab0 AS cor0
----
86
92
97

query I rowsort
SELECT ALL 45 FROM tab0 cor0
----
45
45
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5777
SELECT ALL col0 / col1 + + CAST( NULL AS SIGNED ) * + col1 * + cor0.col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5777
SELECT ALL col0 / col1 + + CAST ( NULL AS INTEGER ) * + col1 * + cor0.col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5778
SELECT DISTINCT - - 6 * col1 + - CAST( NULL AS DECIMAL ) / 72 - - col2 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5778
SELECT DISTINCT - - 6 * col1 + - CAST ( NULL AS REAL ) / 72 - - col2 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT - + col1 * + col0 + + col0 - col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT cor0.col0 * - col0 + cor0.col1 FROM tab2 cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL + col2 - col0 * col0 AS col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT + - col0 + - col2 * + 85 AS col0 FROM tab2 AS cor0
----
-2288
-2302
-3309

query I rowsort
SELECT - cor0.col2 + col1 * + col0 AS col0 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT 78 * col1 + - ( - tab1.col2 ) * - col1 FROM tab1
----
-234
210
624

query I rowsort
SELECT - cor0.col2 * cor0.col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + ( 24 ) * col0 AS col1 FROM tab2 cor0
----
168
1872
1896

query I rowsort
SELECT + ( - col1 ) + + col1 * + col0 AS col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT - - col2 * + col0 + - col1 AS col2 FROM tab2 AS cor0
----
158
1969
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-5789
SELECT col2 DIV col0 + col1 FROM tab0 AS cor0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-5789
SELECT col2 / col0 + col1 FROM tab0 AS cor0
----
87
91
97

query I rowsort
SELECT ALL - col0 + - tab2.col2 + 34 AS col1 FROM tab2
----
-70
-83
0

query I rowsort
SELECT ALL tab0.col1 + col0 * 95 * - col0 AS col0 FROM tab0
----
-116278
-54634
-752404

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5792
SELECT ALL col0 * - CAST( + 36 AS SIGNED ) + col0 AS col0 FROM tab0
----
-1225
-3115
-840

skipif mysql # not compatible
query I rowsort label-5792
SELECT ALL col0 * - CAST ( + 36 AS INTEGER ) + col0 AS col0 FROM tab0
----
-1225
-3115
-840

query I rowsort
SELECT + ( col0 ) * col0 AS col2 FROM tab0
----
1225
576
7921

query I rowsort
SELECT DISTINCT ( + 35 ) AS col0 FROM tab0
----
35

query I rowsort
SELECT ALL - 62 * + col1 AS col1 FROM tab2 AS cor0
----
-1054
-1922
-3658

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) + + cor0.col0 * cor0.col2 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL ( + cor0.col2 ) * cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0
----
1225
19008
649522

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5798
SELECT + col0 + + ( + col0 ) * + CAST( col2 AS SIGNED ) + - col1 FROM tab0 AS cor0
----
-27
7296
730

skipif mysql # not compatible
query I rowsort label-5798
SELECT + col0 + + ( + col0 ) * + CAST ( col2 AS INTEGER ) + - col1 FROM tab0 AS cor0
----
-27
7296
730

query I rowsort
SELECT ALL col0 + 46 * col2 FROM tab1
----
2487
2686
4496

query I rowsort
SELECT + col0 * 22 FROM tab0 AS cor0
----
1958
528
770

onlyif mysql # use DIV operator for integer division
query I rowsort label-5801
SELECT - - ( 15 ) DIV col1 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5801
SELECT - - ( 15 ) / col1 FROM tab1 AS cor0
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 52 * 54 col2 FROM tab0 AS cor0
----
2808
2808
2808

query I rowsort
SELECT ALL 88 AS col2 FROM tab0
----
88
88
88

query I rowsort
SELECT - 66 + + ( col0 ) AS col2 FROM tab1 AS cor0
----
-2
-63
14

query I rowsort
SELECT ALL - col0 * - col0 + col0 AS col2 FROM tab2 cor0
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-5806
SELECT DISTINCT col2 DIV + col1 + col1 col2 FROM tab1 AS cor0
----
15
20
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5806
SELECT DISTINCT col2 / + col1 + col1 col2 FROM tab1 AS cor0
----
15
20
28

query I rowsort
SELECT DISTINCT + + ( + cor0.col2 ) AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL 4 FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

query I rowsort
SELECT - 72 * - col0 AS col1 FROM tab2 AS cor0
----
504
5616
5688

onlyif mysql # use DIV operator for integer division
query I rowsort label-5810
SELECT + col2 * col1 DIV + col1 AS col0 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-5810
SELECT + col2 * col1 / + col1 AS col0 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * - col0 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL col0 + - col1 + col0 * + col0 AS col1 FROM tab2 AS cor0
----
25
6103
6303

query I rowsort
SELECT ALL - col2 * cor0.col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT - - col0 * + col1 + cor0.col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT 9 * - col0 + col2 FROM tab2 AS cor0
----
-36
-673
-676

query I rowsort
SELECT col0 * + cor0.col2 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5817
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5817
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-5818
SELECT - 80 + + cor0.col0 DIV + col0 - 93 FROM tab1 AS cor0
----
-172
-172
-172

skipif mysql # not compatible
query I rowsort label-5818
SELECT - 80 + + cor0.col0 / + col0 - 93 FROM tab1 AS cor0
----
-172
-172
-172

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col0 + col0 col0 FROM tab1 cor0
----
-576
-75
-960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 + col0 col0 FROM tab2 AS cor0
----
130
131
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5821
SELECT 18 + + col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5821
SELECT 18 + + col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col2 + cor0.col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT ALL + cor0.col1 * + 50 + col1 FROM tab2 AS cor0
----
1581
3009
867

query I rowsort
SELECT DISTINCT - col2 - - 47 AS col1 FROM tab2 AS cor0
----
20
21
9

query I rowsort
SELECT DISTINCT + cor0.col0 * ( col2 ) + + col2 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT ALL - - col0 + 35 AS col0 FROM tab1 AS cor0
----
115
38
99

query I rowsort
SELECT + col1 + ( 86 ) * col1 * + 80 FROM tab1 AS cor0
----
178906
68810
89453

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5828
SELECT - - col1 * CAST( + col2 AS SIGNED ) + col2 * + 7 * cor0.col1 AS col2 FROM tab1 cor0
----
11232
4560
9984

skipif mysql # not compatible
query I rowsort label-5828
SELECT - - col1 * CAST ( + col2 AS INTEGER ) + col2 * + 7 * cor0.col1 AS col2 FROM tab1 cor0
----
11232
4560
9984

query I rowsort
SELECT col1 * - col1 + - col0 AS col1 FROM tab1 AS cor0
----
-164
-249
-679

query I rowsort
SELECT ALL - cor0.col2 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5831
SELECT DISTINCT + + col0 + 53 DIV col1 col2 FROM tab2 AS cor0
----
78
8
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5831
SELECT DISTINCT + + col0 + 53 / col1 col2 FROM tab2 AS cor0
----
78
8
82

query I rowsort
SELECT col0 + tab0.col1 + 53 * 27 AS col0 FROM tab0
----
1541
1563
1611

query I rowsort
SELECT ALL + + col2 * 73 AS col2 FROM tab1 AS cor0
----
3942
4161
7008

onlyif mysql # use DIV operator for integer division
query I rowsort label-5834
SELECT ALL col2 DIV tab2.col1 col0 FROM tab2
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5834
SELECT ALL col2 / tab2.col1 col0 FROM tab2
----
0
0
2

query I rowsort
SELECT + + col0 + ( + col2 ) * col2 AS col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT col2 * 13 AS col2 FROM tab2
----
338
351
494

query I rowsort
SELECT ALL - + col1 + col0 * + cor0.col2 AS col2 FROM tab1 cor0
----
136
3638
7667

query I rowsort
SELECT - 93 * - 60 - col1 AS col1 FROM tab1
----
5554
5567
5570

query I rowsort
SELECT + 95 + col2 AS col2 FROM tab2
----
121
122
133

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5840
SELECT ALL tab1.col1 + + tab1.col1 + + CAST( col0 AS SIGNED ) FROM tab1
----
106
55
84

skipif mysql # not compatible
query I rowsort label-5840
SELECT ALL tab1.col1 + + tab1.col1 + + CAST ( col0 AS INTEGER ) FROM tab1
----
106
55
84

query I rowsort
SELECT DISTINCT + col2 + - col2 AS col2 FROM tab2
----
0

query I rowsort
SELECT ALL - col0 + col1 - - ( col0 ) AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT + col1 * + col2 - - ( - col1 ) FROM tab2
----
1475
629
806

query I rowsort
SELECT col2 + tab1.col0 * + ( 4 ) FROM tab1
----
313
416
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-5845
SELECT ALL + + 90 DIV + 55 + + col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-5845
SELECT ALL + + 90 / + 55 + + col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT DISTINCT + 54 * 30 * - col2 FROM tab2 AS cor0
----
-42120
-43740
-61560

query I rowsort
SELECT ALL - col1 * 44 AS col1 FROM tab2
----
-1364
-2596
-748

query I rowsort
SELECT tab0.col1 + - col1 * col1 AS col0 FROM tab0
----
-7310
-8190
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-5849
SELECT DISTINCT - col2 DIV - 30 FROM tab2
----
0
1

skipif mysql # not compatible
query I rowsort label-5849
SELECT DISTINCT - col2 / - 30 FROM tab2
----
0
1

query I rowsort
SELECT DISTINCT ( + col0 ) + - cor0.col1 * + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT ALL - - 0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - tab0.col0 + tab0.col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL - col2 * + tab1.col0 + col0 FROM tab1
----
-159
-3584
-7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-5854
SELECT col2 DIV - col1 + - 75 + 68 * col0 FROM tab2
----
401
5229
5295

skipif mysql # not compatible
query I rowsort label-5854
SELECT col2 / - col1 + - 75 + 68 * col0 FROM tab2
----
401
5229
5295

onlyif mysql # use DIV operator for integer division
query I rowsort label-5855
SELECT ALL - col1 DIV + col0 + col2 * 36 FROM tab2
----
1368
936
968

skipif mysql # not compatible
query I rowsort label-5855
SELECT ALL - col1 / + col0 + col2 * 36 FROM tab2
----
1368
936
968

onlyif mysql # use DIV operator for integer division
query I rowsort label-5856
SELECT DISTINCT - cor0.col1 * + col1 + col0 DIV - col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-5856
SELECT DISTINCT - cor0.col1 * + col1 + col0 / - col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - 2 + - col2 AS col0 FROM tab2 AS cor0
----
-28
-29
-40

query I rowsort
SELECT DISTINCT col2 * + col1 + + 34 FROM tab2 AS cor0
----
1568
680
871

query I rowsort
SELECT ALL cor1.col1 + cor0.col0 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to e8a110a574ce9d6da24c6814b3fe3d2f

query I rowsort
SELECT ALL + tab2.col1 + col2 * + col0 AS col2 FROM tab2
----
2087
220
3019

query I rowsort
SELECT ALL - 8 + + col0 AS col1 FROM tab0
----
16
27
81

query I rowsort
SELECT ALL 24 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

query I rowsort
SELECT ALL + - 35 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

query I rowsort
SELECT ALL cor0.col2 * - col2 * + 43 FROM tab2 AS cor0
----
-29068
-31347
-62092

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5865
SELECT DISTINCT + + col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5865
SELECT DISTINCT + + col2 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - col0 * cor0.col0 + cor0.col2 AS col1 FROM tab0 cor0
----
-1224
-543
-7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-5867
SELECT DISTINCT - col0 DIV - col2 col2 FROM tab1 AS cor0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5867
SELECT DISTINCT - col0 / - col2 col2 FROM tab1 AS cor0
----
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5868
SELECT ALL - col2 - CAST( ( col1 ) + CAST( NULL AS DECIMAL ) AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5868
SELECT ALL - col2 - CAST ( ( col1 ) + CAST ( NULL AS REAL ) AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 * 54 AS col0 FROM tab2 AS cor0
----
-1674
-3186
-918

onlyif mysql # use DIV operator for integer division
query I rowsort label-5870
SELECT DISTINCT + cor0.col0 DIV 35 + - ( col1 + 21 ) AS col1 FROM tab2 AS cor0
----
-36
-52
-78

skipif mysql # not compatible
query I rowsort label-5870
SELECT DISTINCT + cor0.col0 / 35 + - ( col1 + 21 ) AS col1 FROM tab2 AS cor0
----
-36
-52
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5871
SELECT ALL - col0 * + CAST( col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-5871
SELECT ALL - col0 * + CAST ( col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - col0 + - tab2.col1 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT ALL - col2 + - 22 AS col0 FROM tab0 cor0
----
-104
-23
-55

query I rowsort
SELECT DISTINCT + cor0.col1 * + 75 * + col1 FROM tab1 AS cor0
----
12675
50700
7500

onlyif mysql # use DIV operator for integer division
query I rowsort label-5875
SELECT DISTINCT - col1 DIV - 3 FROM tab2 AS cor0
----
10
19
5

skipif mysql # not compatible
query I rowsort label-5875
SELECT DISTINCT - col1 / - 3 FROM tab2 AS cor0
----
10
19
5

query I rowsort
SELECT DISTINCT col2 * + 92 * 62 + col1 FROM tab2 AS cor0
----
148363
154039
216769

query I rowsort
SELECT - col2 + + ( + col0 ) * - col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT ALL - - col1 + + col2 * + col2 FROM tab0 cor0
----
1175
6815
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5879
SELECT DISTINCT + - cor0.col2 + CAST( + cor0.col0 * - col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-216
-3705
-7776

skipif mysql # not compatible
query I rowsort label-5879
SELECT DISTINCT + - cor0.col2 + CAST ( + cor0.col0 * - col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-216
-3705
-7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5880
SELECT DISTINCT - + col1 + CAST( NULL AS DECIMAL ) + cor0.col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5880
SELECT DISTINCT - + col1 + CAST ( NULL AS REAL ) + cor0.col0 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5881
SELECT + col0 DIV + 21 + - col0 AS col2 FROM tab2 AS cor0
----
-7
-75
-76

skipif mysql # not compatible
query I rowsort label-5881
SELECT + col0 / + 21 + - col0 AS col2 FROM tab2 AS cor0
----
-7
-75
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 + 66 * col0 col0 FROM tab0 AS cor0
----
1498
2213
5783

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5883
SELECT ALL col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5883
SELECT ALL col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 47 + + col1 AS col0 FROM tab2 cor0
----
-16
-30
12

query I rowsort
SELECT col2 * + 43 FROM tab2 AS cor0
----
1118
1161
1634

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2, tab1 cor0, tab2 AS cor1
----
972 values hashing to 2507aa9f48c3db94de9fec065edf3731

skipif mysql # not compatible
query I rowsort
SELECT + col2 + + CAST ( col0 AS REAL ) * - col0 * col0 AS col1 FROM tab1
----
-262087
-511904
27

query I rowsort
SELECT cor0.col1 * col1 * 83 + + cor0.col1 AS col2 FROM tab0 AS cor0
----
613954
687414
781044

query I rowsort
SELECT ALL - ( cor0.col1 ) * - 86 + 47 AS col1 FROM tab0 cor0
----
7443
7873
8389

query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col0 * ( col1 ) FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT ALL + - 86 * col1 AS col0 FROM tab1 AS cor0
----
-1118
-2236
-860

query I rowsort
SELECT DISTINCT + ( col2 ) + cor0.col2 FROM tab1 AS cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( - col1 ) col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT col0 - col0 * - 37 AS col1 FROM tab0 cor0
----
1330
3382
912

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5895
SELECT DISTINCT - 35 * - col1 + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5895
SELECT DISTINCT - 35 * - col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col2 * + 7 FROM tab2
----
182
189
266

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5897
SELECT - - col0 + - col2 - CAST( col2 * - col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
69
7305
783

skipif mysql # not compatible
query I rowsort label-5897
SELECT - - col0 + - col2 - CAST ( col2 * - col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
69
7305
783

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col0 * 80 col2 FROM tab1 AS cor0
----
-237
-5056
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-5899
SELECT - col0 + + col2 * + 47 + + col1 * col2 DIV ( col0 ) AS col2 FROM tab1
----
2623
3003
4447

skipif mysql # not compatible
query I rowsort label-5899
SELECT - col0 + + col2 * + 47 + + col1 * col2 / ( col0 ) AS col2 FROM tab1
----
2623
3003
4447

query I rowsort
SELECT col0 * col2 + + col2 * col2 FROM tab1 AS cor0
----
16896
3078
6897

query I rowsort
SELECT - - ( cor1.col0 ) FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT - tab0.col2 + 11 FROM tab0, tab0 cor0
----
9 values hashing to 577f38bdbad56499f0d0f56a458a6c46

query I rowsort
SELECT ALL tab0.col0 + col1 * ( tab0.col0 ) * - col2 FROM tab0
----
-3360
-664029
-68088

query I rowsort
SELECT 49 * - col2 AS col1 FROM tab0 AS cor0
----
-1617
-4018
-49

query I rowsort
SELECT ALL - col1 * - col0 + + col0 + col0 * cor0.col1 AS col2 FROM tab2 cor0
----
2765
441
9282

query I rowsort
SELECT - ( - cor0.col2 ) + col2 AS col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL col0 + col0 * ( - col2 ) AS col1 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL ( + 83 ) * + col0 * - ( col2 ) - col2 FROM tab1
----
-13500
-302841
-637536

query I rowsort
SELECT ALL + ( + 98 * col0 ) - col1 AS col0 FROM tab2
----
655
7585
7725

query I rowsort
SELECT - ( 23 ) + col2 FROM tab2 AS cor0
----
15
3
4

query I rowsort
SELECT col1 + 10 - - col1 AS col0 FROM tab2
----
128
44
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-5912
SELECT DISTINCT col2 DIV 41 FROM tab1
----
1
2

skipif mysql # not compatible
query I rowsort label-5912
SELECT DISTINCT col2 / 41 FROM tab1
----
1
2

query I rowsort
SELECT - col1 * 23 * - col0 FROM tab2
----
105846
30889
4991

onlyif mysql # use DIV operator for integer division
query I rowsort label-5914
SELECT - ( + col0 ) * 85 DIV cor0.col0 FROM tab2 AS cor0
----
-85
-85
-85

skipif mysql # not compatible
query I rowsort label-5914
SELECT - ( + col0 ) * 85 / cor0.col0 FROM tab2 AS cor0
----
-85
-85
-85

query I rowsort
SELECT - + col2 * col0 + 70 * - 83 + col1 AS col0 FROM tab0 AS cor0
----
-13017
-5748
-6516

query I rowsort
SELECT + col0 + col1 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
113
196
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 + col2 col1 FROM tab0 AS cor0
----
246
3
99

query I rowsort
SELECT + col2 + 77 FROM tab0 AS cor0
----
110
159
78

query I rowsort
SELECT - col2 + 48 AS col2 FROM tab1 AS cor0
----
-48
-6
-9

skipif mysql # not compatible
query I rowsort
SELECT ALL col2 + CAST ( col0 AS REAL ) AS col2 FROM tab0
----
171
36
57

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab1, tab0 cor1, tab1 AS cor2
----
972 values hashing to 0a9194f200a4220e419d35c461f9fcfe

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5922
SELECT DISTINCT col2 + CAST( col0 AS SIGNED ) AS col0 FROM tab1
----
121
176
57

skipif mysql # not compatible
query I rowsort label-5922
SELECT DISTINCT col2 + CAST ( col0 AS INTEGER ) AS col0 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5923
SELECT - col2 DIV tab1.col1 AS col2 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-5923
SELECT - col2 / tab1.col1 AS col2 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT - ( + col1 ) * col0 + + col2 * 94 FROM tab2 AS cor0
----
-2158
2229
2321

query I rowsort
SELECT + + 29 * col0 * col1 AS col0 FROM tab2 AS cor0
----
133458
38947
6293

query I rowsort
SELECT ALL + ( col1 ) AS col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT col0 + + ( cor0.col1 ) * + col2 * - col2 FROM tab1 cor0
----
-119728
-32426
-75813

query I rowsort
SELECT DISTINCT + col2 + - col0 * col1 AS col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT - + 39 * col1 - + cor0.col1 AS col0 FROM tab1 AS cor0
----
-1040
-400
-520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( col2 ) + cor0.col2 * ( col2 ) col0 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT - col1 + ( col0 ) AS col0 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT ALL cor0.col1 - + col1 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT ( - 31 ) FROM tab1 cor0
----
-31

query I rowsort
SELECT - 59 * + col2 - col2 * + 5 FROM tab0 AS cor0
----
-2112
-5248
-64

query I rowsort
SELECT DISTINCT - - ( + col1 ) + col2 * + col1 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT + col1 * 36 AS col1 FROM tab1 AS cor0
----
360
468
936

query I rowsort
SELECT ALL 79 * col0 + - 34 AS col1 FROM tab2 AS cor0
----
519
6128
6207

query I rowsort
SELECT ALL - - 98 + col0 * col0 FROM tab1 AS cor0
----
107
4194
6498

query I rowsort
SELECT - - ( col2 ) + - ( + col0 + col0 ) FROM tab1 AS cor0
----
-64
-71
48

query I rowsort
SELECT DISTINCT 93 + col0 FROM tab0 AS cor0
----
117
128
182

query I rowsort
SELECT DISTINCT - 8 - + col1 AS col0 FROM tab2
----
-25
-39
-67

query I rowsort
SELECT - - col2 * - col0 AS col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL col0 * + 71 AS col2 FROM tab2 AS cor0
----
497
5538
5609

onlyif mysql # use DIV operator for integer division
query I rowsort label-5944
SELECT col0 + - 58 * col1 DIV + col0 AS col1 FROM tab0 AS cor0
----
-125
-183
30

skipif mysql # not compatible
query I rowsort label-5944
SELECT col0 + - 58 * col1 / + col0 AS col1 FROM tab0 AS cor0
----
-125
-183
30

query I rowsort
SELECT + col2 * - 58 AS col0 FROM tab0 AS cor0
----
-1914
-4756
-58

query I rowsort
SELECT - - cor0.col0 * ( + col0 ) AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + 91 * - cor0.col1 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 758153d3539e9e15cd3fbcc8dea4823e

query I rowsort
SELECT ALL col2 * - ( + 61 ) FROM tab1
----
-3294
-3477
-5856

query I rowsort
SELECT col2 + - col1 * + tab0.col0 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL 68 * + tab0.col0 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to 2e1c43e247be167a25c8bc6b31017c41

query I rowsort
SELECT - + 42 * - col1 FROM tab2 AS cor0
----
1302
2478
714

query I rowsort
SELECT ALL + col1 - + col1 * col0 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + col0 * + col1 * + col0 + - col1 AS col0 FROM tab2 AS cor0
----
106080
1488
358897

query I rowsort
SELECT ALL ( + col0 ) * + col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT 53 + - col0 * col1 * col0 FROM tab2 AS cor0
----
-106044
-1466
-358903

query I rowsort
SELECT ALL + col2 * col0 AS col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT + - ( col2 ) * col0 + - col2 AS col0 FROM tab1 AS cor0
----
-216
-3705
-7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-5958
SELECT DISTINCT col2 DIV col0 + col1 + - cor0.col0 AS col2 FROM tab2 AS cor0
----
-19
-62
27

skipif mysql # not compatible
query I rowsort label-5958
SELECT DISTINCT col2 / col0 + col1 + - cor0.col0 AS col2 FROM tab2 AS cor0
----
-19
-62
27

query I rowsort
SELECT ALL + 89 + col1 AS col0 FROM tab2 AS cor0
----
106
120
148

query I rowsort
SELECT col0 * col1 + + cor0.col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT + - 81 AS col2 FROM tab0 AS cor0
----
-81
-81
-81

query I rowsort
SELECT - tab2.col1 - + tab2.col0 * + col1 AS col1 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT ALL - col2 * col1 - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT - ( - col1 ) + + tab2.col2 FROM tab2
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 99 col0 FROM tab1
----
-99

query I rowsort
SELECT + col1 * col0 + col1 AS col1 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2, tab0 cor0, tab1 AS cor1
----
1
33
82

query I rowsort
SELECT + col2 * col0 * col1 + - col0 FROM tab2 AS cor0
----
119574
50955
5852

query I rowsort
SELECT + + ( col2 ) * + col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col2 * 26 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
1430
1492
2509

query I rowsort
SELECT ALL ( 13 ) * col1 AS col2 FROM tab1 AS cor0
----
130
169
338

onlyif mysql # use DIV operator for integer division
query I rowsort label-5972
SELECT col2 * ( 91 ) DIV - col0 FROM tab1
----
-109
-1638
-81

skipif mysql # not compatible
query I rowsort label-5972
SELECT col2 * ( 91 ) / - col0 FROM tab1
----
-109
-1638
-81

query I rowsort
SELECT DISTINCT - col1 + - col0 * - col2 + + col2 FROM tab2
----
185
1995
3023

query I rowsort
SELECT ALL col2 + + col1 - - col1 AS col0 FROM tab0
----
195
205
264

query I rowsort
SELECT ALL 52 FROM tab0, tab0 cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT ALL 14 + 48 FROM tab1
----
62
62
62

query I rowsort
SELECT ALL - ( col1 ) * - col1 + - col2 AS col1 FROM tab2
----
251
3455
934

query I rowsort
SELECT ALL 94 * + col1 + col0 + col1 AS col1 FROM tab2
----
1694
2952
5683

query I rowsort
SELECT ALL - col0 * col0 + - col1 * + col0 AS col2 FROM tab1
----
-4736
-7440
-87

query I rowsort
SELECT ALL col2 * col0 + tab2.col2 + - col2 * + col1 FROM tab2
----
-621
2394
520

query I rowsort
SELECT DISTINCT + cor1.col0 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT 14 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT 95 + col1 * col0 FROM tab0 AS cor0
----
2159
3490
8194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + tab1.col0 + - col1 * col1 col2 FROM tab1
----
-619
21
7

query I rowsort
SELECT DISTINCT - col0 + + col2 FROM tab1 WHERE NOT ( NULL ) NOT BETWEEN NULL AND ( col1 * col0 + + col1 * col2 * col2 + col2 )
----

query I rowsort
SELECT col0 + - tab1.col0 + - col1 AS col0 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col0 + - col2 * + col1 + + col1 AS col2 FROM tab0
----
-2728
-7282
35

query I rowsort
SELECT - col2 * - col1 AS col0 FROM tab2 WHERE NULL NOT IN ( col0 )
----

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE NOT ( NULL ) BETWEEN col2 AND ( - col2 )
----

query I rowsort
SELECT + col1 * - col1 FROM tab1 WHERE NOT ( col1 ) IN ( col0 )
----
-100
-169
-676

query I rowsort
SELECT ALL - col2 AS col1 FROM tab2 WHERE NOT - tab2.col0 * col0 NOT IN ( - col2 )
----

query III rowsort
SELECT * FROM tab1 WHERE col0 * - col1 * + col0 NOT IN ( col1 * - col1 + + col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab1, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + col2 * col2 + col2 AS col1 FROM tab2
----
1482
702
756

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE ( NULL ) IN ( - col0 )
----

query I rowsort
SELECT col0 FROM tab1 AS cor0 WHERE NOT ( NULL ) NOT IN ( col2 * col1 * - cor0.col2 - + col2 * col0 )
----

query I rowsort
SELECT col0 * - col1 * + col1 + col1 / col0 AS col1 FROM tab0 AS cor0 WHERE NOT ( NULL ) <= NULL
----

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab0, tab0 AS cor0
----
9 values hashing to e205c60b0806256e15ecb6a115a429b3

query I rowsort
SELECT DISTINCT + col1 + + col1 + + col1 FROM tab0 AS cor0
----
258
273
291

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + col0 - col0 col2 FROM tab2 cor0
----
42
6006
6162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + cor0.col1 + - col0 col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + col2 + cor0.col0 * col0 AS col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL col0 * col1 + col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT + + col1 * col2 - col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT - + cor0.col0 + + col2 * col2 AS col0 FROM tab1 AS cor0
----
2913
3185
9136

onlyif mysql # use DIV operator for integer division
query I rowsort label-6006
SELECT col1 DIV + col2 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-6006
SELECT col1 / + col2 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-22
-88
62

query I rowsort
SELECT tab0.col1 * + col1 + - col1 FROM tab0
----
7310
8190
9312

query I rowsort
SELECT DISTINCT col1 * col2 * 55 FROM tab0
----
156090
410410
5335

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + col1 col0 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT ALL cor0.col0 * col1 - + col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT ALL + - col0 * + ( col2 * col1 ) + col0 * - col0 * col2 FROM tab0 AS cor0
----
-1313640
-4620
-87120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6012
SELECT col1 * CAST( col2 AS SIGNED ) FROM tab0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-6012
SELECT col1 * CAST ( col2 AS INTEGER ) FROM tab0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT - col2 * + 79 AS col0 FROM tab1
----
-4266
-4503
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-6015
SELECT DISTINCT - ( - col0 ) * col0 + + col0 DIV col1 FROM tab2 AS cor0
----
49
6085
6245

skipif mysql # not compatible
query I rowsort label-6015
SELECT DISTINCT - ( - col0 ) * col0 + + col0 / col1 FROM tab2 AS cor0
----
49
6085
6245

query I rowsort
SELECT ALL - - 28 - 5 FROM tab2 cor0
----
23
23
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-6017
SELECT DISTINCT + + cor0.col2 DIV 49 AS col1 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6017
SELECT DISTINCT + + cor0.col2 / 49 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + tab2.col1 * 7 + 30 - col2 FROM tab2
----
111
220
417

query I rowsort
SELECT col2 * col0 + - 55 FROM tab1 AS cor0
----
107
3593
7625

query I rowsort
SELECT DISTINCT col1 * col2 * - 55 - + col2 AS col1 FROM tab1
----
-31407
-68736
-77274

query I rowsort
SELECT DISTINCT + col2 * + col1 - + col2 FROM tab2
----
1508
608
810

query I rowsort
SELECT DISTINCT - col1 - col2 * + col2 AS col2 FROM tab0
----
-1175
-6815
-98

query I rowsort
SELECT 25 + col0 * + col0 FROM tab1
----
34
4121
6425

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6024
SELECT CAST( NULL AS DECIMAL ) * + 55 + + col2 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6024
SELECT CAST ( NULL AS REAL ) * + 55 + + col2 AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * - 56 FROM tab0
----
4816
5096
5432

onlyif mysql # use DIV operator for integer division
query I rowsort label-6026
SELECT - cor0.col1 DIV + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6026
SELECT - cor0.col1 / + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * - col2 AS col1 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT - 27 * + col0 * + 85 FROM tab2 cor0
----
-16065
-179010
-181305

query I rowsort
SELECT DISTINCT + + 23 * - col1 FROM tab0 AS cor0
----
-1978
-2093
-2231

query I rowsort
SELECT ALL - col0 + cor0.col1 * + 86 FROM tab2 AS cor0
----
1383
2659
4996

query I rowsort
SELECT - + ( + col2 ) * col0 * 17 AS col2 FROM tab2 AS cor0
----
-3213
-34476
-51034

query I rowsort
SELECT ALL - col0 + + col2 + - col1 AS col0 FROM tab2 AS cor0
----
-11
-111
-58

query I rowsort
SELECT ALL + - col0 + - col1 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-6034
SELECT ALL col1 DIV + col1 AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6034
SELECT ALL col1 / + col1 AS col0 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT - 76 FROM tab0, tab1, tab0 AS cor0
----
-76

query I rowsort
SELECT + - cor0.col0 * 80 AS col1 FROM tab1 AS cor0
----
-240
-5120
-6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-6037
SELECT ALL col2 + 79 DIV 97 AS col0 FROM tab1 cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6037
SELECT ALL col2 + 79 / 97 AS col0 FROM tab1 cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * 13 col1 FROM tab1 AS cor0
----
1040
39
832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * - cor0.col0 col2 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL col2 * - 66 AS col2 FROM tab1 AS cor0
----
-3564
-3762
-6336

onlyif mysql # use DIV operator for integer division
query I rowsort label-6041
SELECT - col0 + - col2 DIV 67 FROM tab1 AS cor0
----
-3
-64
-81

skipif mysql # not compatible
query I rowsort label-6041
SELECT - col0 + - col2 / 67 FROM tab1 AS cor0
----
-3
-64
-81

query I rowsort
SELECT DISTINCT + col0 * 8 FROM tab0 AS cor0
----
192
280
712

query I rowsort
SELECT DISTINCT + - cor0.col2 * + col0 + col1 FROM tab2 AS cor0
----
-158
-1969
-2985

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + col0 + CAST ( + col1 AS REAL ) * col2 AS col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + col1 + 65 FROM tab1 cor0
----
75
78
91

query I rowsort
SELECT DISTINCT col2 + - col0 + - cor0.col1 * - col2 FROM tab1 AS cor0
----
1264
1455
563

query I rowsort
SELECT + 55 + + col1 * + col2 AS col2 FROM tab1
----
1303
1459
625

query I rowsort
SELECT + 5 * ( + col1 ) + cor0.col1 FROM tab0 AS cor0
----
516
546
582

query I rowsort
SELECT ALL - - cor0.col2 * + col2 + col2 - cor0.col1 * - col2 FROM tab0 AS cor0
----
14268
3960
99

query I rowsort
SELECT 75 + + col0 AS col0 FROM tab2 AS cor0
----
153
154
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6051
SELECT ALL + + 71 + - 30 DIV col2 AS col2 FROM tab0 AS cor0
----
41
71
71

skipif mysql # not compatible
query I rowsort label-6051
SELECT ALL + + 71 + - 30 / col2 AS col2 FROM tab0 AS cor0
----
41
71
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6052
SELECT CAST( NULL AS SIGNED ) + + cor0.col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6052
SELECT CAST ( NULL AS INTEGER ) + + cor0.col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6053
SELECT - CAST( 20 AS SIGNED ) + col1 FROM tab0 AS cor0
----
66
71
77

skipif mysql # not compatible
query I rowsort label-6053
SELECT - CAST ( 20 AS INTEGER ) + col1 FROM tab0 AS cor0
----
66
71
77

query I rowsort
SELECT ALL ( 69 ) AS col0 FROM tab0 AS cor0
----
69
69
69

query I rowsort
SELECT + - 23 + + col0 AS col2 FROM tab2 AS cor0
----
-16
55
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6056
SELECT DISTINCT - - CAST( NULL AS SIGNED ) + 27 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6056
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) + 27 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 23 * col2 FROM tab0 AS cor0
----
1886
23
759

query I rowsort
SELECT DISTINCT + - 57 AS col0 FROM tab1 AS cor0
----
-57

query I rowsort
SELECT DISTINCT + col0 + col1 * - ( - 74 ) FROM tab0 AS cor0
----
6388
6823
7213

query I rowsort
SELECT DISTINCT - 25 FROM tab1, tab0 cor0, tab2 AS cor1
----
-25

query I rowsort
SELECT ALL 30 + col0 AS col0 FROM tab0 AS cor0
----
119
54
65

query I rowsort
SELECT ALL + col0 * - col2 - 8 * col0 FROM tab1 AS cor0
----
-186
-4160
-8320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6063
SELECT + ( 57 ) / - tab0.col2 - CAST( NULL AS SIGNED ) * - tab0.col2 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6063
SELECT + ( 57 ) / - tab0.col2 - CAST ( NULL AS INTEGER ) * - tab0.col2 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 95 * col1 * col2 AS col1 FROM tab0 AS cor0
----
269610
708890
9215

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + tab0.col2 * - col1 col1 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT - col0 * + 86 AS col2 FROM tab2 AS cor0
----
-602
-6708
-6794

query I rowsort
SELECT ALL - ( col2 ) * cor0.col0 + 66 AS col1 FROM tab1 AS cor0
----
-3582
-7614
-96

query I rowsort
SELECT DISTINCT - cor0.col1 - cor0.col2 FROM tab0 AS cor0
----
-119
-173
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - 28 + - col1 col2 FROM tab2 AS cor0
----
-1711
-493
-899

query I rowsort
SELECT ALL col1 * col1 - col2 FROM tab2 AS cor0
----
251
3455
934

onlyif mysql # use DIV operator for integer division
query I rowsort label-6071
SELECT DISTINCT + - ( + col0 ) * col2 + col1 DIV + 15 + col1 FROM tab2 AS cor0
----
-156
-1966
-2984

skipif mysql # not compatible
query I rowsort label-6071
SELECT DISTINCT + - ( + col0 ) * col2 + col1 / + 15 + col1 FROM tab2 AS cor0
----
-156
-1966
-2984

onlyif mysql # use DIV operator for integer division
query I rowsort label-6072
SELECT DISTINCT 68 DIV col0 + - col2 AS col2 FROM tab1 AS cor0
----
-32
-56
-96

skipif mysql # not compatible
query I rowsort label-6072
SELECT DISTINCT 68 / col0 + - col2 AS col2 FROM tab1 AS cor0
----
-32
-56
-96

query I rowsort
SELECT ALL + col1 + + 46 * + col2 FROM tab2 AS cor0
----
1255
1273
1765

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 89 * col2 + cor0.col2 * 39 * cor0.col2 col1 FROM tab2 AS cor0
----
24050
26028
52934

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 - + cor0.col1 col0 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT - col0 * + col1 - - col2 * col2 AS col0 FROM tab0 AS cor0
----
-1375
-3394
-975

query I rowsort
SELECT ALL + ( - 73 ) AS col1 FROM tab2 cor0
----
-73
-73
-73

query I rowsort
SELECT ALL + col0 + - col1 * - col2 + - 21 * + col2 FROM tab0 AS cor0
----
111
2169
5829

query I rowsort
SELECT + ( - col1 ) + + col0 FROM tab2 AS cor0
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 + col2 * ( + col1 ) col0 FROM tab0 AS cor0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + + col0 * + 90 col0 FROM tab1 cor0
----
216
5703
7104

onlyif mysql # use DIV operator for integer division
query I rowsort label-6082
SELECT ALL - col0 DIV col1 + - 97 * col0 AS col0 FROM tab0 AS cor0
----
-2328
-3395
-8633

skipif mysql # not compatible
query I rowsort label-6082
SELECT ALL - col0 / col1 + - 97 * col0 AS col0 FROM tab0 AS cor0
----
-2328
-3395
-8633

onlyif mysql # use DIV operator for integer division
query I rowsort label-6083
SELECT DISTINCT - col0 DIV 94 + col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-6083
SELECT DISTINCT - col0 / 94 + col0 FROM tab1
----
3
64
80

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 AS cor2
----
3645 values hashing to 677ef6b86493a7e48d2f6a3cfd7eea4c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + - col2 col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT DISTINCT col1 - ( + col0 ) FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - - col2 + + 45 FROM tab1 AS cor0
----
102
141
99

query I rowsort
SELECT + - col1 * 46 AS col2 FROM tab1 AS cor0
----
-1196
-460
-598

query I rowsort
SELECT DISTINCT + - 7 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6090
SELECT DISTINCT + ( col1 ) * + CAST( NULL AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6090
SELECT DISTINCT + ( col1 ) * + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col0 + + 5 col2 FROM tab1 AS cor0
----
11
133
165

query I rowsort
SELECT ALL + + cor0.col1 + + 63 AS col2 FROM tab2 cor0
----
122
80
94

query I rowsort
SELECT 51 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

query I rowsort
SELECT tab0.col2 + - col2 - col0 * + col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT - - col2 + col1 * col0 AS col2 FROM tab0 AS cor0
----
2097
3396
8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col0 ) col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT - - 53 * + 57 - col0 AS col0 FROM tab2 AS cor0
----
2942
2943
3014

query I rowsort
SELECT ALL - col2 * ( + col1 ) FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT tab0.col2 - + col2 AS col2 FROM tab0
----
0

query I rowsort
SELECT col1 * col0 * 83 AS col0 FROM tab1
----
53120
6474
86320

query I rowsort
SELECT DISTINCT col1 * col1 + 56 FROM tab1
----
156
225
732

query I rowsort
SELECT DISTINCT 10 FROM tab1, tab2 AS cor0
----
10

query I rowsort
SELECT - - cor0.col1 * cor0.col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + ( 9 ) + - col0 FROM tab0 AS cor0
----
-15
-26
-80

query I rowsort
SELECT - - col0 * - col2 * - col2 FROM tab0 cor0
----
26136
35
598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6106
SELECT - CAST( cor0.col1 AS SIGNED ) col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6106
SELECT - CAST ( cor0.col1 AS INTEGER ) col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL col2 * ( col0 + - col2 ) FROM tab1
----
-1536
-2754
399

query I rowsort
SELECT ALL col2 * - ( tab1.col1 ) FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL - tab0.col0 * 90 FROM tab0
----
-2160
-3150
-8010

query I rowsort
SELECT ALL ( - col0 ) + col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT ALL - 9 * - 33 + - tab2.col1 FROM tab2
----
238
266
280

query I rowsort
SELECT - cor0.col1 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + 6 ) * col1 col1 FROM tab1 AS cor0
----
-156
-60
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6114
SELECT + CAST( - col1 AS SIGNED ) DIV + tab0.col0 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-6114
SELECT + CAST ( - col1 AS INTEGER ) / + tab0.col0 FROM tab0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 32 * col2 col2 FROM tab0
----
1056
2624
32

query I rowsort
SELECT 99 * - col1 + - 28 FROM tab0
----
-8542
-9037
-9631

query I rowsort
SELECT DISTINCT - 55 FROM tab2, tab1, tab2 AS cor0
----
-55

query I rowsort
SELECT 40 + col2 AS col0 FROM tab2
----
66
67
78

query I rowsort
SELECT 4 * + col2 * - col1 - - 90 * col0 FROM tab0
----
-21838
-9192
2762

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-6121
SELECT DISTINCT - col1 DIV + 36 FROM tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6121
SELECT DISTINCT - col1 / + 36 FROM tab2 AS cor0
----
-1
0

query I rowsort
SELECT cor0.col1 * ( - col0 ) * + col0 AS col0 FROM tab1 AS cor0
----
-234
-40960
-83200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * - col0 col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col1 * ( - col0 ) FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + cor0.col0 + + 11 * col1 AS col0 FROM tab0 AS cor0
----
1090
1102
970

query I rowsort
SELECT DISTINCT - col0 + + col1 * ( - cor0.col1 ) FROM tab0 AS cor0
----
-7420
-8370
-9444

query I rowsort
SELECT + - col1 + + col2 * + col2 * - col2 FROM tab0 AS cor0
----
-36023
-551459
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * ( + col2 ) col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + col1 * col0 * ( + cor0.col2 ) AS col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT + 54 - - 76 FROM tab2, tab2 AS cor0
----
9 values hashing to ec85eb0bc5c919183cbcd7ee94cb222b

query I rowsort
SELECT DISTINCT 59 + cor1.col0 AS col1 FROM tab0, tab1 cor0, tab2 AS cor1
----
137
138
66

query I rowsort
SELECT DISTINCT 64 * col1 AS col1 FROM tab0
----
5504
5824
6208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( - cor0.col1 ) col1 FROM tab0 cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6134
SELECT DISTINCT + cor0.col2 + col1 DIV 25 FROM tab1 AS cor0
----
55
57
96

skipif mysql # not compatible
query I rowsort label-6134
SELECT DISTINCT + cor0.col2 + col1 / 25 FROM tab1 AS cor0
----
55
57
96

query I rowsort
SELECT + - col2 + col2 * + col2 AS col1 FROM tab2 AS cor0
----
1406
650
702

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab1 cor1, tab1 cor2
----
972 values hashing to a8481bfbfcb330825976c5896e54bc19

onlyif mysql # use DIV operator for integer division
query I rowsort label-6137
SELECT DISTINCT col1 DIV + cor0.col1 + - col1 FROM tab2 AS cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-6137
SELECT DISTINCT col1 / + cor0.col1 + - col1 FROM tab2 AS cor0
----
-16
-30
-58

query I rowsort
SELECT ALL + cor0.col1 * 19 FROM tab2 AS cor0
----
1121
323
589

query I rowsort
SELECT DISTINCT cor0.col1 + + ( - cor0.col0 ) FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT DISTINCT cor0.col1 * + ( - col0 ) * - col2 FROM tab0 cor0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-6141
SELECT ALL col1 DIV + ( col2 + + col2 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6141
SELECT ALL col1 / + ( col2 + + col2 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * ( 31 ) - col1 FROM tab1 AS cor0
----
-320
-416
-832

query I rowsort
SELECT ALL + col1 * cor0.col1 + + cor0.col2 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT col2 - ( cor0.col2 ) * col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT 35 AS col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * tab0.col2 + col2 * + col2 col2 FROM tab0
----
14186
3927
98

query I rowsort
SELECT col2 + col2 + + col1 AS col0 FROM tab1
----
124
134
205

query I rowsort
SELECT DISTINCT tab0.col2 + tab0.col2 AS col2 FROM tab0
----
164
2
66

query I rowsort
SELECT + col1 AS col2 FROM tab2 WHERE NULL IN ( col1 * - col0 + col1 )
----

query III rowsort
SELECT * FROM tab2 WHERE ( - col1 ) NOT IN ( col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT col0 FROM tab1 WHERE col1 * col0 > NULL
----

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) >= col0 + - col1
----

query I rowsort
SELECT ALL col1 - - col2 * col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT ALL + col0 FROM tab1 WHERE NULL NOT IN ( col2 * + col1 )
----

query I rowsort
SELECT - tab2.col1 FROM tab2 WHERE NOT + col1 * - col2 * col1 NOT BETWEEN NULL AND + col1 + col0
----

query I rowsort
SELECT ALL - col2 + col2 * col0 AS col0 FROM tab0
----
34
7216
759

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL BETWEEN + col1 - col1 AND col2
----

query I rowsort
SELECT col0 - col0 * - col0 AS col2 FROM tab1
----
12
4160
6480

query I rowsort
SELECT DISTINCT col1 + col1 * col1 AS col2 FROM tab1
----
110
182
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-6160
SELECT - col2 + + col2 DIV col0 - - col0 FROM tab1
----
-15
-33
7

skipif mysql # not compatible
query I rowsort label-6160
SELECT - col2 + + col2 / col0 - - col0 FROM tab1
----
-15
-33
7

query I rowsort
SELECT DISTINCT + col2 * + col2 + col2 AS col0 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT ALL - col0 * col0 * col0 + - col2 FROM tab2
----
-370
-474578
-493077

query I rowsort
SELECT - col1 * col1 * col1 + - col2 AS col2 FROM tab0
----
-636089
-753653
-912674

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab2 WHERE - col1 * col1 NOT BETWEEN NULL AND + col0
----

query I rowsort
SELECT col2 * + col0 + ( - col1 ) * + col0 * + ( - ( - cor0.col2 ) ) FROM tab1 AS cor0
----
-32832
-4050
-92160

query I rowsort
SELECT - cor0.col1 + cor0.col2 FROM tab1 cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 77 col1 FROM tab2
----
77

query I rowsort
SELECT DISTINCT + cor0.col0 * + col1 + col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-6169
SELECT DISTINCT - col2 + + col1 DIV CAST( + col0 + - col2 AS SIGNED ) col2 FROM tab1 AS cor0
----
-54
-56
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6169
SELECT DISTINCT - col2 + + col1 / CAST ( + col0 + - col2 AS INTEGER ) col2 FROM tab1 AS cor0
----
-54
-56
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6170
SELECT ALL col1 * col0 * CAST( col1 AS SIGNED ) AS col2 FROM tab1 cor0
----
13520
2028
6400

skipif mysql # not compatible
query I rowsort label-6170
SELECT ALL col1 * col0 * CAST ( col1 AS INTEGER ) AS col2 FROM tab1 cor0
----
13520
2028
6400

query I rowsort
SELECT - col0 * + col2 + col1 + ( col2 ) AS col0 FROM tab1 AS cor0
----
-3581
-7571
-82

query I rowsort
SELECT DISTINCT + col1 * + col0 + ( ( - col0 ) + ( col2 ) ) AS col2 FROM tab2 AS cor0
----
1302
237
4550

query I rowsort
SELECT DISTINCT - 59 * col0 AS col1 FROM tab1 AS cor0
----
-177
-3776
-4720

query I rowsort
SELECT DISTINCT - col1 + + col2 * - 0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + col0 + + ( - col2 ) + - 45 FROM tab2
----
-4
-65
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6176
SELECT CAST( 26 AS SIGNED ) FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

skipif mysql # not compatible
query I rowsort label-6176
SELECT CAST ( 26 AS INTEGER ) FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

query I rowsort
SELECT 76 - col1 FROM tab2
----
17
45
59

query I rowsort
SELECT + + 40 * + col2 + col1 AS col0 FROM tab0 AS cor0
----
137
1406
3371

query I rowsort
SELECT ALL - 24 + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1113
-25
-6748

query I rowsort
SELECT DISTINCT 50 * cor0.col0 * ( 77 * col1 ) FROM tab1 AS cor0
----
2464000
300300
4004000

query I rowsort
SELECT ALL - tab0.col0 * - col2 - col2 FROM tab0
----
34
7216
759

query I rowsort
SELECT - - col0 * col1 * col2 + col1 FROM tab2 AS cor0
----
119711
51051
5890

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab2, tab0 cor1, tab1, tab0 AS cor2
----
3645 values hashing to 2566f3fa788816c8bfc482e730aaed74

query I rowsort
SELECT + col0 + ( 80 ) * - col2 FROM tab0 AS cor0
----
-2616
-45
-6471

query I rowsort
SELECT ALL + - cor0.col2 * 36 FROM tab1 AS cor0
----
-1944
-2052
-3456

query I rowsort
SELECT ALL - 6 * col2 FROM tab0 cor0
----
-198
-492
-6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6187
SELECT col0 * col1 + + cor0.col0 + - CAST( NULL AS SIGNED ) * 54 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6187
SELECT col0 * col1 + + cor0.col0 + - CAST ( NULL AS INTEGER ) * 54 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 11 + tab1.col2 AS col1 FROM tab1
----
43
46
85

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col0 AS REAL ) * + col1 + ( + 22 ) FROM tab1 AS cor0
----
-1018
-56
-618

query I rowsort
SELECT 97 + 94 * col2 AS col2 FROM tab0 cor0
----
191
3199
7805

query I rowsort
SELECT ALL - col2 * - 7 + + col2 FROM tab2 AS cor0
----
208
216
304

onlyif mysql # use DIV operator for integer division
query I rowsort label-6192
SELECT ALL + col0 DIV col0 + col1 + ( + col2 + cor0.col2 ) col2 FROM tab0 AS cor0
----
100
153
256

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6192
SELECT ALL + col0 / col0 + col1 + ( + col2 + cor0.col2 ) col2 FROM tab0 AS cor0
----
100
153
256

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + 82 col1 FROM tab0 AS cor0
----
-7
47
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * - 29 + col0 + - col1 col2 FROM tab0 AS cor0
----
-33
2376
895

query I rowsort
SELECT DISTINCT - 9 * + col2 FROM tab1 AS cor0
----
-486
-513
-864

query I rowsort
SELECT DISTINCT 96 * 40 * - col2 + + col0 FROM tab0 AS cor0
----
-126696
-314791
-3805

query I rowsort
SELECT - 96 + tab1.col0 * - col1 AS col2 FROM tab1
----
-1136
-174
-736

query I rowsort
SELECT - col0 * col1 + + col0 AS col2 FROM tab0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-6199
SELECT ALL cor0.col2 DIV cor0.col1 + CAST( 86 AS SIGNED ) * + cor0.col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 0bce6213406a54c162d0c5b9f6c78ca8

skipif mysql # not compatible
query I rowsort label-6199
SELECT ALL cor0.col2 / cor0.col1 + CAST ( 86 AS INTEGER ) * + cor0.col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 0bce6213406a54c162d0c5b9f6c78ca8

query I rowsort
SELECT DISTINCT tab1.col1 * col2 * - 71 AS col1 FROM tab1
----
-40470
-88608
-99684

query I rowsort
SELECT ALL col1 * + col1 * col1 AS col0 FROM tab0
----
636056
753571
912673

query I rowsort
SELECT DISTINCT + col2 * + 25 + - col2 AS col0 FROM tab1
----
1296
1368
2304

query I rowsort
SELECT ALL ( + 82 ) FROM tab0, tab0 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT cor0.col0 * col2 - 45 FROM tab0 AS cor0
----
-10
7253
747

query I rowsort
SELECT + col0 + - col2 - + col2 FROM tab2 AS cor0
----
-47
26
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6206
SELECT col1 - CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6206
SELECT col1 - CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6207
SELECT DISTINCT - col1 DIV + ( + col2 ) FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-6207
SELECT DISTINCT - col1 / + ( + col2 ) FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT - + col1 + + col0 * - col2 FROM tab2 cor0
----
-2087
-220
-3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 79 col2 FROM tab1 AS cor0
----
79
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col1 col0 FROM tab1 cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-6211
SELECT ALL + 80 DIV - col0 FROM tab2 AS cor0
----
-1
-1
-11

skipif mysql # not compatible
query I rowsort label-6211
SELECT ALL + 80 / - col0 FROM tab2 AS cor0
----
-1
-1
-11

query I rowsort
SELECT ALL cor0.col2 + - 50 AS col1 FROM tab0 AS cor0
----
-17
-49
32

query I rowsort
SELECT DISTINCT - ( col0 ) * - col1 * col0 + + ( + col1 ) FROM tab0 AS cor0
----
118922
49622
720902

query I rowsort
SELECT DISTINCT + 68 + col2 * - col1 FROM tab1 AS cor0
----
-1180
-1336
-502

query I rowsort
SELECT DISTINCT - 85 + 28 FROM tab1 cor0
----
-57

query I rowsort
SELECT 1 * col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + ( col1 ) * col1 + cor0.col1 FROM tab1 cor0
----
110
182
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-6218
SELECT DISTINCT + - 67 + + ( col0 ) DIV + 92 AS col2 FROM tab0 AS cor0
----
-67

skipif mysql # not compatible
query I rowsort label-6218
SELECT DISTINCT + - 67 + + ( col0 ) / + 92 AS col2 FROM tab0 AS cor0
----
-67

query I rowsort
SELECT DISTINCT - + ( 12 ) * col1 AS col2 FROM tab0 AS cor0
----
-1032
-1092
-1164

query I rowsort
SELECT ALL - + col1 + + 85 * col2 FROM tab2 AS cor0
----
2151
2264
3213

query I rowsort
SELECT + - ( + col0 ) + col1 AS col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT + col2 * - col1 + - ( ( col0 ) ) AS col1 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT - 69 + - col2 * - 65 FROM tab0 AS cor0
----
-4
2076
5261

query I rowsort
SELECT ALL - - 24 * col0 + col1 AS col2 FROM tab2 AS cor0
----
1913
1931
199

query I rowsort
SELECT DISTINCT - col0 * cor0.col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL 10 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6227
SELECT - tab2.col2 * 87 + col0 * + CAST( NULL AS DECIMAL ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6227
SELECT - tab2.col2 * 87 + col0 * + CAST ( NULL AS REAL ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 92 * cor0.col0 FROM tab1 AS cor0
----
276
5888
7360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * col1 * 64 col2 FROM tab2 cor0
----
-13888
-294528
-85952

query I rowsort
SELECT - col1 * col1 + 65 AS col1 FROM tab0 AS cor0
----
-7331
-8216
-9344

query I rowsort
SELECT col0 * + ( 47 ) AS col0 FROM tab1 AS cor0
----
141
3008
3760

query IIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 WHERE NOT NULL >= NULL
----

query I rowsort
SELECT ALL - ( cor0.col1 ) + - col1 * + 31 AS col0 FROM tab0 AS cor0
----
-2752
-2912
-3104

query I rowsort
SELECT + col1 * ( col0 ) + - cor0.col1 FROM tab2 cor0
----
1326
186
4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6235
SELECT - cor0.col1 + cor0.col1 + CAST( + 79 AS SIGNED ) col2 FROM tab0, tab2 cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6235
SELECT - cor0.col1 + cor0.col1 + CAST ( + 79 AS INTEGER ) col2 FROM tab0, tab2 cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

onlyif mysql # use DIV operator for integer division
query I rowsort label-6236
SELECT col1 DIV + 44 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6236
SELECT col1 / + 44 FROM tab2
----
0
0
1

query I rowsort
SELECT ALL 50 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT - col1 * col1 + + col0 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT - col1 * + 24 FROM tab0
----
-2064
-2184
-2328

query I rowsort
SELECT - + col2 * col2 * - col2 AS col2 FROM tab2 AS cor0
----
17576
19683
54872

query I rowsort
SELECT + ( + col0 ) * + col2 FROM tab0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * col1 + cor0.col2 col0 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT ( + ( - col1 ) ) * tab0.col0 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + 92 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1, tab2 cor1, tab1 AS cor2
----
81 values hashing to cfcf012ce1a8dd60a7428b4ef6b95843

onlyif mysql # use DIV operator for integer division
query I rowsort label-6245
SELECT DISTINCT - 17 DIV + cor0.col0 AS col1 FROM tab1 AS cor0
----
-5
0

skipif mysql # not compatible
query I rowsort label-6245
SELECT DISTINCT - 17 / + cor0.col0 AS col1 FROM tab1 AS cor0
----
-5
0

query I rowsort
SELECT - 96 * cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 1a15525b37e33e1585641523001851ec

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6247
SELECT DISTINCT + col1 + CAST( + col2 AS SIGNED ) * col2 FROM tab0
----
1175
6815
98

skipif mysql # not compatible
query I rowsort label-6247
SELECT DISTINCT + col1 + CAST ( + col2 AS INTEGER ) * col2 FROM tab0
----
1175
6815
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6248
SELECT CAST( NULL AS SIGNED ) + + col0 * - col1 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6248
SELECT CAST ( NULL AS INTEGER ) + + col0 * - col1 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + 71 * - col1 AS col0 FROM tab1
----
-1820
-700
-910

query I rowsort
SELECT ALL + ( 61 ) FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 9b52d3939da22c8931e3d5a72ddfb1b1

query I rowsort
SELECT - 58 * - col1 FROM tab1 AS cor0
----
1508
580
754

query I rowsort
SELECT 9 + + col0 FROM tab2 AS cor0
----
16
87
88

query I rowsort
SELECT + col0 * 38 AS col1 FROM tab1 AS cor0
----
114
2432
3040

query I rowsort
SELECT ALL + - col0 * - col2 * col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT 28 - + col0 AS col0 FROM tab2
----
-50
-51
21

query I rowsort
SELECT 31 * col0 AS col1 FROM tab0
----
1085
2759
744

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6257
SELECT + col2 * CAST( - col2 AS SIGNED ) + col0 AS col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

skipif mysql # not compatible
query I rowsort label-6257
SELECT + col2 * CAST ( - col2 AS INTEGER ) + col0 AS col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT + col0 * + 27 AS col2 FROM tab1 AS cor0
----
1728
2160
81

query I rowsort
SELECT - col1 + col0 * - cor0.col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT + + col1 + - 41 + col2 * col1 * - ( + col1 + col2 ) FROM tab2 cor0
----
-130372
-35554
-48556

onlyif mysql # use DIV operator for integer division
query I rowsort label-6261
SELECT + col2 + col2 + - col2 DIV + col1 FROM tab2 AS cor0
----
52
54
74

skipif mysql # not compatible
query I rowsort label-6261
SELECT + col2 + col2 + - col2 / + col1 FROM tab2 AS cor0
----
52
54
74

query I rowsort
SELECT DISTINCT cor0.col1 * + col1 FROM tab1 cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-6263
SELECT ALL - col1 DIV ( - col2 * - cor0.col1 ) AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6263
SELECT ALL - col1 / ( - col2 * - cor0.col1 ) AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - cor0.col1 * - 60 FROM tab1 AS cor0
----
-1560
-600
-780

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 + - col0 col0 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT + 95 FROM tab1, tab1 cor0, tab2 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

onlyif mysql # use DIV operator for integer division
query I rowsort label-6267
SELECT col2 DIV + 76 + - col1 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6267
SELECT col2 / + 76 + - col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT ALL - col1 * + 85 + col1 AS col2 FROM tab0 AS cor0
----
-7224
-7644
-8148

query I rowsort
SELECT ALL + col0 * 14 + - 92 * - col0 FROM tab0 AS cor0
----
2544
3710
9434

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6270
SELECT DISTINCT - col1 - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6270
SELECT DISTINCT - col1 - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - col2 * - cor0.col1 * + col0 + + col0 AS col2 FROM tab2 AS cor0
----
119730
51113
5866

onlyif mysql # use DIV operator for integer division
query I rowsort label-6272
SELECT ALL - col1 * 40 + 19 - col0 DIV col1 AS col2 FROM tab2 AS cor0
----
-1221
-2342
-665

skipif mysql # not compatible
query I rowsort label-6272
SELECT ALL - col1 * 40 + 19 - col0 / col1 AS col2 FROM tab2 AS cor0
----
-1221
-2342
-665

query I rowsort
SELECT - col1 + + 81 * col0 * + col2 AS col2 FROM tab0 AS cor0
----
2738
591047
64066

query I rowsort
SELECT DISTINCT col1 + ( - 43 ) AS col2 FROM tab1 AS cor0
----
-17
-30
-33

query I rowsort
SELECT ALL + col0 * col1 + 52 FROM tab0 AS cor0
----
2116
3447
8151

query I rowsort
SELECT DISTINCT + - col0 + - 93 + - col0 FROM tab1 cor0
----
-221
-253
-99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6277
SELECT cor0.col1 * + CAST( NULL AS SIGNED ) + + cor0.col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6277
SELECT cor0.col1 * + CAST ( NULL AS INTEGER ) + + cor0.col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + 14 FROM tab0 AS cor0
----
103
38
49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6279
SELECT ALL + - CAST( col0 AS SIGNED ) * + col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-6279
SELECT ALL + - CAST ( col0 AS INTEGER ) * + col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - cor0.col0 + 58 * col1 FROM tab0 AS cor0
----
4964
5189
5591

onlyif mysql # use DIV operator for integer division
query I rowsort label-6281
SELECT ALL + + col0 * + ( col1 ) * 53 + + col1 DIV + col1 FROM tab1 AS cor0
----
33921
4135
55121

skipif mysql # not compatible
query I rowsort label-6281
SELECT ALL + + col0 * + ( col1 ) * 53 + + col1 / + col1 FROM tab1 AS cor0
----
33921
4135
55121

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 87 * + col2 col2 FROM tab2 AS cor0
----
2262
2349
3306

query I rowsort
SELECT ALL - 45 * col0 AS col2 FROM tab2 AS cor0
----
-315
-3510
-3555

query I rowsort
SELECT DISTINCT - col0 * col2 + + 16 AS col2 FROM tab2 AS cor0
----
-173
-2012
-2986

query I rowsort
SELECT - tab1.col1 AS col0 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT tab2.col2 - col0 * col1 FROM tab2
----
-1305
-190
-4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col0 ) col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ALL - col2 * col1 - ( + 42 ) * + col1 * col1 FROM tab2 AS cor0
----
-12784
-147736
-41199

query I rowsort
SELECT ALL col1 * - 88 AS col0 FROM tab2
----
-1496
-2728
-5192

query I rowsort
SELECT ALL + - 44 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 07457d9e571e036a9a3a0f5a5a2e1ef2

query I rowsort
SELECT + - 55 * col0 * - col1 + ( col0 ) FROM tab2 AS cor0
----
11942
253188
73944

query I rowsort
SELECT - - 88 + - col0 FROM tab0 AS cor0
----
-1
53
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-6293
SELECT - 0 - col1 DIV ( 43 ) FROM tab0 AS cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-6293
SELECT - 0 - col1 / ( 43 ) FROM tab0 AS cor0
----
-2
-2
-2

query I rowsort
SELECT DISTINCT - 39 * cor0.col2 AS col2 FROM tab2 AS cor0
----
-1014
-1053
-1482

onlyif mysql # use DIV operator for integer division
query I rowsort label-6295
SELECT + 50 + - col1 DIV 82 AS col1 FROM tab2 AS cor0
----
50
50
50

skipif mysql # not compatible
query I rowsort label-6295
SELECT + 50 + - col1 / 82 AS col1 FROM tab2 AS cor0
----
50
50
50

query I rowsort
SELECT + + 38 FROM tab0 cor0
----
38
38
38

query I rowsort
SELECT 43 + col1 FROM tab2 cor0
----
102
60
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6298
SELECT - CAST( col1 AS SIGNED ) * col2 * - col0 FROM tab2 AS cor0
----
119652
51034
5859

skipif mysql # not compatible
query I rowsort label-6298
SELECT - CAST ( col1 AS INTEGER ) * col2 * - col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT + - col0 * - col1 * cor0.col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL ( - ( - col1 ) ) + col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT 51 AS col2 FROM tab1 cor0
----
51

query I rowsort
SELECT + + col2 * + 79 FROM tab1 AS cor0
----
4266
4503
7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6303
SELECT ALL - CAST( - col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6303
SELECT ALL - CAST ( - col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - col2 * 7 FROM tab2 AS cor0
----
-182
-189
-266

onlyif mysql # use DIV operator for integer division
query I rowsort label-6305
SELECT DISTINCT + ( - 99 ) DIV - col2 FROM tab0 AS cor0
----
1
3
99

skipif mysql # not compatible
query I rowsort label-6305
SELECT DISTINCT + ( - 99 ) / - col2 FROM tab0 AS cor0
----
1
3
99

query I rowsort
SELECT DISTINCT col1 * + cor0.col0 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL + col1 * 58 AS col1 FROM tab2
----
1798
3422
986

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6308
SELECT CAST( + col1 AS SIGNED ) + col2 * col0 * 61 FROM tab2
----
11560
123767
183139

skipif mysql # not compatible
query I rowsort label-6308
SELECT CAST ( + col1 AS INTEGER ) + col2 * col0 * 61 FROM tab2
----
11560
123767
183139

query I rowsort
SELECT - cor1.col0 * 16 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 2a06b3d206ae403717adb76901344f53

query I rowsort
SELECT + 53 * - col2 + + tab2.col2 AS col2 FROM tab2
----
-1352
-1404
-1976

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6311
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6311
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT - ( + col1 ) + + col2 * - col2 AS col2 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT ALL + ( + 93 ) AS col1 FROM tab1 AS cor0
----
93
93
93

query I rowsort
SELECT ALL col0 * + 94 FROM tab2 AS cor0
----
658
7332
7426

query I rowsort
SELECT DISTINCT + + ( + col0 ) * - col0 + col1 * - col2 AS col0 FROM tab0 AS cor0
----
-1322
-15383
-3414

query I rowsort
SELECT DISTINCT + ( + col1 + col0 ) * col2 AS col0 FROM tab0
----
132
14760
3630

query I rowsort
SELECT col2 + col0 * + tab0.col0 AS col1 FROM tab0
----
1226
609
8003

query I rowsort
SELECT - col2 + 30 AS col2 FROM tab2 AS cor0
----
-8
3
4

query I rowsort
SELECT 2 * col1 * - 75 FROM tab1
----
-1500
-1950
-3900

query I rowsort
SELECT ALL - col0 + - col0 + col1 FROM tab2 AS cor0
----
-141
-97
17

query I rowsort
SELECT + 22 AS col1 FROM tab1 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * 69 col2 FROM tab0
----
-1656
-2415
-6141

query I rowsort
SELECT DISTINCT tab0.col2 AS col2 FROM tab0, tab1, tab0 cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + col2 * + tab2.col1 FROM tab2
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6325
SELECT ALL + col0 * cor0.col2 DIV col1 AS col2 FROM tab1 cor0
----
364
590
6

skipif mysql # not compatible
query I rowsort label-6325
SELECT ALL + col0 * cor0.col2 / col1 AS col2 FROM tab1 cor0
----
364
590
6

query I rowsort
SELECT ALL - cor1.col0 AS col0 FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT col0 * 12 + + col1 * + col0 FROM tab0 AS cor0
----
2352
3815
9167

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6328
SELECT DISTINCT col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6328
SELECT DISTINCT col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col1 + 46 FROM tab2 AS cor0
----
105
63
77

query I rowsort
SELECT + ( - cor3.col1 ) AS col1 FROM tab2 cor0 CROSS JOIN tab0, tab0 cor1, tab2 AS cor2, tab0 AS cor3
----
243 values hashing to 7f0405f8197238fbd342972ef0bcee12

onlyif mysql # use DIV operator for integer division
query I rowsort label-6331
SELECT tab1.col2 DIV 28 FROM tab1, tab1 AS cor0
----
9 values hashing to 245313dc4e9fc19df7ee93651efe9bf2

skipif mysql # not compatible
query I rowsort label-6331
SELECT tab1.col2 / 28 FROM tab1, tab1 AS cor0
----
9 values hashing to 245313dc4e9fc19df7ee93651efe9bf2

query I rowsort
SELECT DISTINCT + cor0.col0 * + col2 + + col2 + - col2 * col2 FROM tab0 cor0
----
-264
35
656

query I rowsort
SELECT + col1 * 24 + - col1 FROM tab0 AS cor0
----
1978
2093
2231

onlyif mysql # use DIV operator for integer division
query I rowsort label-6334
SELECT + col1 DIV col0 + col0 * + col0 AS col0 FROM tab0 AS cor0
----
1227
579
7922

skipif mysql # not compatible
query I rowsort label-6334
SELECT + col1 / col0 + col0 * + col0 AS col0 FROM tab0 AS cor0
----
1227
579
7922

query I rowsort
SELECT col0 + col1 * - col1 * col2 FROM tab1 AS cor0
----
-16144
-36501
-5636

query I rowsort
SELECT + tab1.col0 + col1 AS col2 FROM tab1
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6337
SELECT CAST( - 51 AS SIGNED ) + col2 FROM tab1 AS cor0
----
3
45
6

skipif mysql # not compatible
query I rowsort label-6337
SELECT CAST ( - 51 AS INTEGER ) + col2 FROM tab1 AS cor0
----
3
45
6

query I rowsort
SELECT + 65 + - 31 FROM tab1 AS cor0
----
34
34
34

query I rowsort
SELECT - col1 + - ( + ( col0 ) ) * 51 FROM tab1
----
-179
-3274
-4093

query I rowsort
SELECT - col0 + - 77 AS col0 FROM tab0 AS cor0
----
-101
-112
-166

query I rowsort
SELECT - col1 * col1 + - cor0.col0 * col2 + + 98 AS col2 FROM tab1 AS cor0
----
-3650
-740
-7751

query I rowsort
SELECT ALL col2 * cor0.col2 AS col2 FROM tab0 cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-6343
SELECT ALL + 49 DIV cor0.col0 AS col0 FROM tab2 AS cor0
----
0
0
7

skipif mysql # not compatible
query I rowsort label-6343
SELECT ALL + 49 / cor0.col0 AS col0 FROM tab2 AS cor0
----
0
0
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6344
SELECT 29 DIV col2 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6344
SELECT 29 / col2 AS col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6345
SELECT - 65 DIV tab0.col0 FROM tab0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-6345
SELECT - 65 / tab0.col0 FROM tab0
----
-1
-2
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6346
SELECT + col0 + - col2 * - col0 + col1 DIV - col1 FROM tab0
----
69
7386
815

skipif mysql # not compatible
query I rowsort label-6346
SELECT + col0 + - col2 * - col0 + col1 / - col1 FROM tab0
----
69
7386
815

onlyif mysql # use DIV operator for integer division
query I rowsort label-6347
SELECT - col0 - + 90 DIV col0 AS col0 FROM tab2 AS cor0
----
-19
-79
-80

skipif mysql # not compatible
query I rowsort label-6347
SELECT - col0 - + 90 / col0 AS col0 FROM tab2 AS cor0
----
-19
-79
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6348
SELECT col0 * + CAST( NULL AS SIGNED ) + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6348
SELECT col0 * + CAST ( NULL AS INTEGER ) + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * col2 * + col2 + - 23 * tab2.col2 FROM tab2
----
-23220
-25422
-40482

query I rowsort
SELECT ALL + 31 * - col0 * + col1 + + col2 AS col1 FROM tab2 AS cor0
----
-142636
-41595
-6700

query I rowsort
SELECT + 15 + col2 + + col1 FROM tab2 AS cor0
----
100
70
73

query I rowsort
SELECT DISTINCT 45 * col0 AS col0 FROM tab1 AS cor0
----
135
2880
3600

query I rowsort
SELECT + 30 + + col0 AS col0 FROM tab1 AS cor0
----
110
33
94

query I rowsort
SELECT ALL - tab2.col0 * 27 - - col0 FROM tab2
----
-182
-2028
-2054

query I rowsort
SELECT DISTINCT col1 + - col1 * col2 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT ALL + 47 * tab2.col0 + col0 * + 38 FROM tab2
----
595
6630
6715

query I rowsort
SELECT ALL 36 AS col0 FROM tab1
----
36
36
36

query I rowsort
SELECT - cor0.col0 + 55 + - 12 * + cor0.col1 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 3193dbe3ac24f9465854217ce6d1ca1a

query I rowsort
SELECT + + col1 + col2 * col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL 65 + 37 FROM tab2, tab1 AS cor0
----
9 values hashing to 792cf560743b7eec398ed5c7e48d1343

onlyif mysql # use DIV operator for integer division
query I rowsort label-6361
SELECT ALL tab1.col0 DIV ( col2 ) FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6361
SELECT ALL tab1.col0 / ( col2 ) FROM tab1
----
0
0
1

query I rowsort
SELECT ( - 2 ) * + col2 + col1 AS col0 FROM tab2 cor0
----
-23
-59
7

query I rowsort
SELECT + col1 - - cor0.col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6364
SELECT col2 DIV col2 + col1 AS col0 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-6364
SELECT col2 / col2 + col1 AS col0 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT - 91 - col1 AS col2 FROM tab2
----
-108
-122
-150

query I rowsort
SELECT ALL 1 + - col0 FROM tab2 AS cor0
----
-6
-77
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6367
SELECT ( - col1 ) + - col2 DIV col2 AS col1 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-6367
SELECT ( - col1 ) + - col2 / col2 AS col1 FROM tab1 AS cor0
----
-11
-14
-27

query I rowsort
SELECT DISTINCT cor0.col2 * col0 * - col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT - - col0 * 87 + + col1 * ( 15 ) * col2 - + 38 AS col2 FROM tab2 cor0
----
13126
16525
29758

query I rowsort
SELECT ALL + + ( 76 ) AS col0 FROM tab1 AS cor0
----
76
76
76

query I rowsort
SELECT DISTINCT col1 * col0 + cor0.col0 AS col0 FROM tab1 cor0
----
1120
704
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6372
SELECT - CAST( NULL AS SIGNED ) * col2 / + col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6372
SELECT - CAST ( NULL AS INTEGER ) * col2 / + col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 62 + 24 * - col0 col0 FROM tab1 AS cor0
----
-134
-1598
-1982

query I rowsort
SELECT + ( col0 ) * + cor0.col1 + ( - col2 ) * col2 FROM tab0 AS cor0
----
1375
3394
975

onlyif mysql # use DIV operator for integer division
query I rowsort label-6375
SELECT col1 * 99 DIV + col2 FROM tab1 AS cor0
----
13
17
47

skipif mysql # not compatible
query I rowsort label-6375
SELECT col1 * 99 / + col2 FROM tab1 AS cor0
----
13
17
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-6376
SELECT - col1 DIV + col1 + col1 col1 FROM tab0 AS cor0
----
85
90
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6376
SELECT - col1 / + col1 + col1 col1 FROM tab0 AS cor0
----
85
90
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6377
SELECT - + CAST( - cor0.col1 AS SIGNED ) * col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-6377
SELECT - + CAST ( - cor0.col1 AS INTEGER ) * col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 56 + - col1 col2 FROM tab1
----
-66
-69
-82

query I rowsort
SELECT ALL - col2 + + 40 * + tab0.col1 AS col1 FROM tab0
----
3407
3558
3879

onlyif mysql # use DIV operator for integer division
query I rowsort label-6380
SELECT col2 DIV + col0 + + col2 FROM tab0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-6380
SELECT col2 / + col0 + + col2 FROM tab0
----
1
34
82

query I rowsort
SELECT tab0.col1 + - col2 - + tab0.col1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + + 91 * + col0 * col2 FROM tab1 cor0
----
14742
331968
698880

query I rowsort
SELECT - ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + 4 * 81 + cor0.col1 + col2 AS col0 FROM tab1 AS cor0
----
391
404
433

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6385
SELECT ALL CAST( NULL AS DECIMAL ) * + col0 + - col2 * + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6385
SELECT ALL CAST ( NULL AS REAL ) * + col0 + - col2 * + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * - cor0.col0 + col0 AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT + 24 * col2 AS col0 FROM tab2 AS cor0
----
624
648
912

query I rowsort
SELECT DISTINCT - col0 + + cor0.col2 * col0 AS col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT - cor0.col2 + col2 * cor0.col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT ALL - + 86 * col2 AS col2 FROM tab0 AS cor0
----
-2838
-7052
-86

query I rowsort
SELECT ALL + - cor0.col2 * - col2 AS col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - col0 * col2 + - ( + col2 ) FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT - col0 * col1 + - col1 AS col2 FROM tab1 cor0
----
-104
-1053
-650

query I rowsort
SELECT DISTINCT - ( - col2 ) + 40 * + col0 AS col2 FROM tab0 AS cor0
----
1401
3642
993

onlyif mysql # use DIV operator for integer division
query I rowsort label-6395
SELECT + + col2 DIV col1 + + col0 col1 FROM tab1 AS cor0
----
5
69
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6395
SELECT + + col2 / col1 + + col0 col1 FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT ALL - col2 * - col2 * - ( + col2 + + col1 ) FROM tab1 AS cor0
----
-1004544
-217683
-233280

onlyif mysql # use DIV operator for integer division
query I rowsort label-6397
SELECT tab2.col2 DIV - col1 + tab2.col2 + 61 FROM tab2
----
87
88
97

skipif mysql # not compatible
query I rowsort label-6397
SELECT tab2.col2 / - col1 + tab2.col2 + 61 FROM tab2
----
87
88
97

query I rowsort
SELECT col1 + col2 - + col0 * - col1 AS col2 FROM tab0
----
2183
3493
8272

onlyif mysql # use DIV operator for integer division
query I rowsort label-6399
SELECT DISTINCT ( - col1 ) * col1 - col1 DIV - 59 AS col0 FROM tab2
----
-289
-3480
-961

skipif mysql # not compatible
query I rowsort label-6399
SELECT DISTINCT ( - col1 ) * col1 - col1 / - 59 AS col0 FROM tab2
----
-289
-3480
-961

query I rowsort
SELECT col1 * - 97 * + col1 FROM tab0
----
-717412
-803257
-912673

query I rowsort
SELECT ALL col1 * + cor0.col0 + - col1 FROM tab1 AS cor0
----
1027
52
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-6402
SELECT + col2 DIV col2 - col2 FROM tab0 cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-6402
SELECT + col2 / col2 - col2 FROM tab0 cor0
----
-32
-81
0

query I rowsort
SELECT DISTINCT + - ( + col1 ) * ( - col0 ) FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort
SELECT ALL - col2 * col2 + CAST ( - col0 AS REAL ) * + col1 AS col0 FROM tab1 AS cor0
----
-10256
-2994
-3889

query I rowsort
SELECT DISTINCT 47 * col1 - tab0.col1 AS col2 FROM tab0
----
3956
4186
4462

query I rowsort
SELECT DISTINCT + col0 + + col0 - col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + col1 + col2 + col0 * col2 AS col2 FROM tab0 AS cor0
----
133
7471
911

query I rowsort
SELECT + cor0.col0 + 53 FROM tab1 AS cor0
----
117
133
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6409
SELECT ALL + col1 + + CAST( NULL AS SIGNED ) + + col2 col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6409
SELECT ALL + col1 + + CAST ( NULL AS INTEGER ) + + col2 col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * col1 - col1 * + col1 FROM tab1 AS cor0
----
1079
470
728

onlyif mysql # use DIV operator for integer division
query I rowsort label-6411
SELECT ALL + cor0.col0 DIV col1 + 67 FROM tab0 AS cor0
----
67
67
67

skipif mysql # not compatible
query I rowsort label-6411
SELECT ALL + cor0.col0 / col1 + 67 FROM tab0 AS cor0
----
67
67
67

query I rowsort
SELECT + col2 * + ( - ( col2 ) ) FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - col1 * - tab0.col0 * col1 FROM tab0
----
177504
329315
737009

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6414
SELECT DISTINCT + - col1 + CAST( NULL AS DECIMAL ) col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6414
SELECT DISTINCT + - col1 + CAST ( NULL AS REAL ) col0 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6415
SELECT ALL + col0 * + CAST( col2 AS SIGNED ) - - col0 DIV - col1 AS col0 FROM tab2 cor0
----
189
2027
2998

skipif mysql # not compatible
query I rowsort label-6415
SELECT ALL + col0 * + CAST ( col2 AS INTEGER ) - - col0 / - col1 AS col0 FROM tab2 cor0
----
189
2027
2998

query I rowsort
SELECT DISTINCT col2 + + 30 FROM tab0 AS cor0
----
112
31
63

query I rowsort
SELECT ALL col2 * col2 + col1 - - cor0.col0 FROM tab1 AS cor0
----
2945
3323
9309

query I rowsort
SELECT ALL + col2 * cor0.col1 - col0 FROM tab1 AS cor0
----
1168
1401
506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6419
SELECT ALL - CAST( col1 AS SIGNED ) * col0 + 55 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1470
-3204
-744

skipif mysql # not compatible
query I rowsort label-6419
SELECT ALL - CAST ( col1 AS INTEGER ) * col0 + 55 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1470
-3204
-744

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6420
SELECT ALL - CAST( - col2 AS SIGNED ) * col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-6420
SELECT ALL - CAST ( - col2 AS INTEGER ) * col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + cor0.col1 * 89 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 406dba576f0dadcbb5b781a0dbe7c06b

query I rowsort
SELECT - col1 - - col0 * col0 AS col1 FROM tab2
----
18
6025
6224

query I rowsort
SELECT + 50 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT col2 * - 50 + 72 AS col2 FROM tab1 AS cor0
----
-2628
-2778
-4728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + + cor0.col0 * - 85 col2 FROM tab0 AS cor0
----
-2073
-2976
-7647

query I rowsort
SELECT ALL - col1 * + 2 * + col0 FROM tab2 AS cor0
----
-2686
-434
-9204

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( col1 ) col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - ( col1 ) * + 16 + cor0.col2 + col0 FROM tab0 AS cor0
----
-1285
-1319
-1516

onlyif mysql # use DIV operator for integer division
query I rowsort label-6429
SELECT - col0 DIV + col1 + col1 - col0 * col1 AS col2 FROM tab2 cor0
----
-1330
-186
-4544

skipif mysql # not compatible
query I rowsort label-6429
SELECT - col0 / + col1 + col1 - col0 * col1 AS col2 FROM tab2 cor0
----
-1330
-186
-4544

query I rowsort
SELECT ALL 68 + col2 FROM tab1 AS cor0
----
122
125
164

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6431
SELECT ALL - + 65 - + col0 * - ( - 65 * col0 + CAST( + col0 AS SIGNED ) ) AS col1 FROM tab1 AS cor0
----
-262209
-409665
-641

skipif mysql # not compatible
query I rowsort label-6431
SELECT ALL - + 65 - + col0 * - ( - 65 * col0 + CAST ( + col0 AS INTEGER ) ) AS col1 FROM tab1 AS cor0
----
-262209
-409665
-641

onlyif mysql # use DIV operator for integer division
query I rowsort label-6432
SELECT ALL - 76 + col0 DIV + 6 - + col2 AS col1 FROM tab2 AS cor0
----
-101
-102
-89

skipif mysql # not compatible
query I rowsort label-6432
SELECT ALL - 76 + col0 / + 6 - + col2 AS col1 FROM tab2 AS cor0
----
-101
-102
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 * col1 col1 FROM tab1 cor0
----
36
673
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + cor0.col1 - 69 col1 FROM tab0 AS cor0
----
1995
3326
8030

query I rowsort
SELECT DISTINCT - col0 - - col0 * + 30 AS col0 FROM tab1 AS cor0
----
1856
2320
87

query I rowsort
SELECT DISTINCT - 54 + col2 AS col2 FROM tab1 AS cor0
----
0
3
42

query I rowsort
SELECT DISTINCT + 69 * tab1.col1 - tab1.col0 * col0 FROM tab1
----
-3406
-5503
1785

query I rowsort
SELECT tab0.col0 + - col2 + col2 AS col1 FROM tab0
----
24
35
89

query I rowsort
SELECT 79 + tab0.col2 + + col1 FROM tab0
----
177
198
252

query I rowsort
SELECT ( col0 ) - - ( - ( + col0 ) ) FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6441
SELECT col2 * tab1.col1 DIV + col1 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6441
SELECT col2 * tab1.col1 / + col1 FROM tab1
----
54
57
96

query I rowsort
SELECT 90 * + col0 + + col0 FROM tab1
----
273
5824
7280

query I rowsort
SELECT cor0.col1 * + col2 * cor0.col1 FROM tab2 AS cor0
----
10982
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + 24 col1 FROM tab0 AS cor0
----
110
115
121

query I rowsort
SELECT ALL col0 + + 88 FROM tab0 AS cor0
----
112
123
177

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + ( col1 ) * col1 + + col1 col1 FROM tab1 AS cor0
----
1010
17602
2210

query I rowsort
SELECT ALL col2 + - col0 + col1 FROM tab0
----
63
84
95

query I rowsort
SELECT - col0 * col0 - - col2 * + col0 AS col2 FROM tab2 cor0
----
-3239
-4056
140

query I rowsort
SELECT - col2 + - ( col2 + + col2 ) FROM tab0 AS cor0
----
-246
-3
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + ( - col0 ) col1 FROM tab2 AS cor0
----
-14
-156
-158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 5 col2 FROM tab2 AS cor0
----
5

query I rowsort
SELECT + 21 AS col1 FROM tab1, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6454
SELECT CAST( NULL AS SIGNED ) col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6454
SELECT CAST ( NULL AS INTEGER ) col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6455
SELECT - CAST( NULL AS DECIMAL ) + + 64 AS col0 FROM tab0, tab1 cor0, tab1 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6455
SELECT - CAST ( NULL AS REAL ) + + 64 AS col0 FROM tab0, tab1 cor0, tab1 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 WHERE NOT NULL > ( NULL )
----

query I rowsort
SELECT col2 * - col0 * col1 - + col1 FROM tab2
----
-119711
-51051
-5890

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL NOT IN ( col0 / tab2.col0 + col0 * col1 / tab2.col1 )
----

query I rowsort
SELECT DISTINCT col0 * + tab1.col1 + + col1 AS col2 FROM tab1
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-6460
SELECT + col1 - + col1 * + tab2.col0 DIV col0 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6460
SELECT + col1 - + col1 * + tab2.col0 / col0 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT col0 * col1 * tab1.col0 AS col2 FROM tab1
----
234
40960
83200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col1 FROM tab2 WHERE + tab2.col1 + col0 NOT IN ( col0 * col0 + - col0 )
----
7
78
79

query I rowsort
SELECT col1 FROM tab0 WHERE NOT + col0 * col2 + - col2 IN ( col1 )
----
86
91
97

query I rowsort
SELECT DISTINCT tab1.col2 + - tab1.col2 * - col1 + col2 * col0 * col0 FROM tab1
----
1944
234099
615744

query I rowsort
SELECT - col1 * + col2 * tab0.col1 FROM tab0
----
-244068
-679042
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 + col2 + col0 col2 FROM tab1
----
111
178
272

onlyif mysql # use DIV operator for integer division
query I rowsort label-6467
SELECT col1 DIV col2 + - col2 AS col0 FROM tab0
----
-31
-81
96

skipif mysql # not compatible
query I rowsort label-6467
SELECT col1 / col2 + - col2 AS col0 FROM tab0
----
-31
-81
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6468
SELECT ALL col2 DIV col2 + - col2 * col2 DIV col2 FROM tab0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-6468
SELECT ALL col2 / col2 + - col2 * col2 / col2 FROM tab0
----
-32
-81
0

query I rowsort
SELECT ALL + col0 AS col0 FROM tab1 WHERE NULL <> ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6470
SELECT ALL col1 * col2 * - col1 + col1 DIV tab1.col1 FROM tab1
----
-16223
-36503
-5699

skipif mysql # not compatible
query I rowsort label-6470
SELECT ALL col1 * col2 * - col1 + col1 / tab1.col1 FROM tab1
----
-16223
-36503
-5699

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 - + col0 col2 FROM tab0 WHERE NOT col2 + col0 IN ( + tab0.col2 )
----
-34
-7
9

query I rowsort
SELECT DISTINCT + ( + col2 ) + - col1 + col1 AS col1 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6473
SELECT col1 + + col2 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6473
SELECT col1 + + col2 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 47 + - cor0.col0 FROM tab1 AS cor0
----
-17
-33
44

query I rowsort
SELECT DISTINCT - 68 * - col1 + col2 * + col0 FROM tab2 AS cor0
----
2297
4158
6040

query I rowsort
SELECT ALL 52 + + col0 + + ( col1 ) FROM tab2 AS cor0
----
148
189
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-6477
SELECT DISTINCT - col1 * col1 * col2 + - cor0.col1 DIV + cor0.col1 AS col2 FROM tab1 AS cor0
----
-16225
-36505
-5701

skipif mysql # not compatible
query I rowsort label-6477
SELECT DISTINCT - col1 * col1 * col2 + - cor0.col1 / + cor0.col1 AS col2 FROM tab1 AS cor0
----
-16225
-36505
-5701

query I rowsort
SELECT ALL - 82 + col0 AS col1 FROM tab2 AS cor0
----
-3
-4
-75

query I rowsort
SELECT DISTINCT - ( - cor0.col0 ) * ( 31 ) + + cor0.col0 FROM tab2 AS cor0
----
224
2496
2528

onlyif mysql # use DIV operator for integer division
query I rowsort label-6480
SELECT DISTINCT + col1 DIV + tab0.col2 AS col1 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6480
SELECT DISTINCT + col1 / + tab0.col2 AS col1 FROM tab0
----
1
2
97

query I rowsort
SELECT DISTINCT + col2 * - tab1.col1 + col2 * col1 + + tab1.col2 FROM tab1
----
54
57
96

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT - col0 - col0 < NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT col1 - col1 BETWEEN NULL AND NULL
----

query I rowsort
SELECT - col2 + + col0 * + col0 + col1 AS col1 FROM tab2
----
53
6117
6220

query I rowsort
SELECT ALL col1 FROM tab2 WHERE NOT NULL = NULL
----

query I rowsort
SELECT col0 + + tab0.col1 AS col2 FROM tab0
----
110
132
180

query I rowsort
SELECT ALL tab1.col1 + + col1 * col2 * + col1 + + col2 AS col1 FROM tab1
----
16333
36584
5767

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE + col1 * col1 IN ( + col2 * + col1 )
----

query I rowsort
SELECT DISTINCT - tab1.col1 * tab1.col0 AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL - col0 + cor0.col0 * col2 / col0 FROM tab1 AS cor0 WHERE NOT NULL <= NULL
----

query I rowsort
SELECT - tab1.col2 AS col1 FROM tab1 WHERE - col0 > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6492
SELECT DISTINCT tab0.col1 DIV col0 + col1 col2 FROM tab0
----
89
92
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6492
SELECT DISTINCT tab0.col1 / col0 + col1 col2 FROM tab0
----
89
92
99

query III rowsort
SELECT * FROM tab2 WHERE ( + col0 ) >= NULL
----

query IIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 WHERE NOT ( NULL ) NOT BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6495
SELECT ALL col1 + col2 DIV + col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6495
SELECT ALL col1 + col2 / + col1 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL tab1.col1 * + col2 FROM tab1 WHERE NULL BETWEEN col0 AND NULL
----

query I rowsort
SELECT DISTINCT col0 + + col0 * + col2 FROM tab1
----
165
3712
7760

query I rowsort
SELECT - tab2.col1 * - tab2.col2 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT + ( col1 ) * - col0 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT ALL - + cor0.col1 * + col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + - 73 * col1 FROM tab0 AS cor0
----
-6278
-6643
-7081

query I rowsort
SELECT DISTINCT 42 AS col2 FROM tab2, tab2 AS cor0, tab0 cor1
----
42

query I rowsort
SELECT + 17 + col1 AS col1 FROM tab0
----
103
108
114

query I rowsort
SELECT DISTINCT + 21 AS col2 FROM tab0
----
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6505
SELECT DISTINCT CAST( 30 AS SIGNED ) + - col0 col0 FROM tab1
----
-34
-50
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6505
SELECT DISTINCT CAST ( 30 AS INTEGER ) + - col0 col0 FROM tab1
----
-34
-50
27

query I rowsort
SELECT ALL 34 - - cor0.col0 FROM tab1 AS cor0
----
114
37
98

query I rowsort
SELECT + 90 * + col0 AS col1 FROM tab0 AS cor0
----
2160
3150
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 - 28 * - cor0.col0 col2 FROM tab0 AS cor0
----
2410
639
979

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col0 * - tab2.col0 * col2 col1 FROM tab2
----
-1292
-158125
-237141

onlyif mysql # use DIV operator for integer division
query I rowsort label-6510
SELECT col0 DIV - col2 + + col0 FROM tab0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-6510
SELECT col0 / - col2 + + col0 FROM tab0
----
0
24
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-6511
SELECT ALL 39 DIV cor1.col1 FROM tab0, tab0 AS cor0, tab2 cor1, tab1 AS cor2
----
81 values hashing to 97960889a7c4cb9b4da7149c38b7516a

skipif mysql # not compatible
query I rowsort label-6511
SELECT ALL 39 / cor1.col1 FROM tab0, tab0 AS cor0, tab2 cor1, tab1 AS cor2
----
81 values hashing to 97960889a7c4cb9b4da7149c38b7516a

query I rowsort
SELECT - col2 + - col2 * + ( ( col1 ) ) * + col1 AS col1 FROM tab1 AS cor0
----
-16320
-36558
-5757

query I rowsort
SELECT ALL + 21 + col1 FROM tab2
----
38
52
80

query I rowsort
SELECT 56 * - col0 * + 97 FROM tab1
----
-16296
-347648
-434560

query I rowsort
SELECT - col0 * col1 + col2 * col0 + cor0.col1 AS col2 FROM tab1 AS cor0
----
110
3018
6653

query I rowsort
SELECT DISTINCT - col1 * + tab0.col2 + 54 AS col0 FROM tab0
----
-2784
-43
-7408

query I rowsort
SELECT DISTINCT col1 + + 25 FROM tab2 AS cor0
----
42
56
84

query I rowsort
SELECT + col2 * ( col1 ) * + col2 FROM tab0 AS cor0
----
611884
93654
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6519
SELECT ALL col2 DIV 72 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6519
SELECT ALL col2 / 72 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col0 * ( 88 ) AS col0 FROM tab2 AS cor0
----
-616
-6864
-6952

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * ( + 30 ) col2 FROM tab1 cor0
----
300
390
780

query I rowsort
SELECT DISTINCT col0 + col2 + + col0 FROM tab1
----
185
256
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-6523
SELECT DISTINCT col1 DIV col2 + 77 col2 FROM tab1
----
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6523
SELECT DISTINCT col1 / col2 + 77 col2 FROM tab1
----
77

query I rowsort
SELECT ALL - + col0 + + ( col2 ) FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6525
SELECT ALL cor0.col2 / - CAST( NULL AS SIGNED ) + 37 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6525
SELECT ALL cor0.col2 / - CAST ( NULL AS INTEGER ) + 37 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col1 col0 FROM tab0 cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6527
SELECT + col2 DIV - ( + col1 ) + col0 * cor0.col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-6527
SELECT + col2 / - ( + col1 ) + col0 * cor0.col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - 72 col1 FROM tab2
----
-150
-151
-79

query I rowsort
SELECT 82 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

onlyif mysql # use DIV operator for integer division
query I rowsort label-6530
SELECT - col0 DIV + tab1.col2 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6530
SELECT - col0 / + tab1.col2 FROM tab1
----
-1
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6531
SELECT CAST( NULL AS SIGNED ) / + col1 + tab2.col0 * + 38 + col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6531
SELECT CAST ( NULL AS INTEGER ) / + col1 + tab2.col0 * + 38 + col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 * - 75 FROM tab1 AS cor0
----
4050
4275
7200

onlyif mysql # use DIV operator for integer division
query I rowsort label-6533
SELECT + 96 * ( - cor0.col1 ) DIV - col0 FROM tab1 AS cor0
----
15
15
832

skipif mysql # not compatible
query I rowsort label-6533
SELECT + 96 * ( - cor0.col1 ) / - col0 FROM tab1 AS cor0
----
15
15
832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6534
SELECT ALL + - CAST( - 32 AS SIGNED ) * col2 FROM tab1 cor0
----
1728
1824
3072

skipif mysql # not compatible
query I rowsort label-6534
SELECT ALL + - CAST ( - 32 AS INTEGER ) * col2 FROM tab1 cor0
----
1728
1824
3072

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col0 * col0 col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT + + col2 + + col2 + + ( col2 ) FROM tab2 AS cor0
----
114
78
81

query I rowsort
SELECT - 52 + + col2 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-31
-56
-85

query I rowsort
SELECT - 46 * col2 AS col0 FROM tab2 AS cor0
----
-1196
-1242
-1748

query I rowsort
SELECT ALL 13 * - col2 + - tab1.col1 + + ( 28 ) AS col2 FROM tab1
----
-1233
-700
-723

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6540
SELECT DISTINCT CAST( - col0 AS SIGNED ) * col0 + CAST( col2 + - col2 AS SIGNED ) FROM tab1
----
-4096
-6400
-9

skipif mysql # not compatible
query I rowsort label-6540
SELECT DISTINCT CAST ( - col0 AS INTEGER ) * col0 + CAST ( col2 + - col2 AS INTEGER ) FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT col1 + col2 * ( + col2 ) AS col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT + cor0.col2 + + col0 + - col1 FROM tab2 AS cor0
----
100
3
45

query I rowsort
SELECT col0 + - col2 * col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT cor0.col2 + col2 * + col2 AS col1 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT - col0 * - ( - 65 ) + + col0 AS col1 FROM tab0 AS cor0
----
-1536
-2240
-5696

query I rowsort
SELECT ALL - col0 + + 45 * - col2 FROM tab1 AS cor0
----
-2433
-2629
-4400

onlyif mysql # use DIV operator for integer division
query I rowsort label-6547
SELECT ALL + - col1 * - col1 * cor0.col0 + + col0 DIV col2 FROM tab0 AS cor0
----
177504
329350
737010

skipif mysql # not compatible
query I rowsort label-6547
SELECT ALL + - col1 * - col1 * cor0.col0 + + col0 / col2 FROM tab0 AS cor0
----
177504
329350
737010

query I rowsort
SELECT ALL - - col2 + 35 FROM tab0 AS cor0
----
117
36
68

query I rowsort
SELECT ALL col2 * - 20 AS col1 FROM tab1 AS cor0
----
-1080
-1140
-1920

query I rowsort
SELECT DISTINCT + col1 + - 85 FROM tab0 AS cor0
----
1
12
6

query I rowsort
SELECT cor0.col1 + 0 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6552
SELECT ALL - cor0.col0 DIV + col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6552
SELECT ALL - cor0.col0 / + col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6553
SELECT ALL + + col2 DIV col0 + + col2 * + col1 AS col2 FROM tab0 AS cor0
----
2839
7462
97

skipif mysql # not compatible
query I rowsort label-6553
SELECT ALL + + col2 / col0 + + col2 * + col1 AS col2 FROM tab0 AS cor0
----
2839
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6554
SELECT col1 + - cor0.col0 DIV col1 AS col0 FROM tab2 AS cor0
----
13
31
58

skipif mysql # not compatible
query I rowsort label-6554
SELECT col1 + - cor0.col0 / col1 AS col0 FROM tab2 AS cor0
----
13
31
58

query I rowsort
SELECT - + ( + 65 ) * - col1 + col1 AS col0 FROM tab1 AS cor0
----
1716
660
858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + col1 col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col0 * - 2 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL + col1 * + 79 - col1 FROM tab0 AS cor0
----
6708
7098
7566

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 22 col1 FROM tab2 AS cor0
----
22
22
22

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - 20 * - 87 AS col2 FROM tab2 AS cor0
----
1740
1740
1740

query I rowsort
SELECT - tab0.col0 + 43 FROM tab0
----
-46
19
8

query I rowsort
SELECT + - 77 * 23 AS col0 FROM tab0 AS cor0
----
-1771
-1771
-1771

query I rowsort
SELECT ALL + + col2 + col0 * - ( + col1 ) FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL + + col2 + col0 + + col0 AS col2 FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT DISTINCT + - 47 - - col0 * - col2 FROM tab0 cor0
----
-7345
-82
-839

query I rowsort
SELECT + col0 * + col1 - + cor0.col1 FROM tab1 AS cor0
----
1027
52
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-6568
SELECT ALL 49 + col0 DIV + ( + ( - col0 ) ) FROM tab0 AS cor0
----
48
48
48

skipif mysql # not compatible
query I rowsort label-6568
SELECT ALL 49 + col0 / + ( + ( - col0 ) ) FROM tab0 AS cor0
----
48
48
48

query I rowsort
SELECT - cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT - col1 * 61 * - col0 FROM tab2 AS cor0
----
13237
280722
81923

onlyif mysql # use DIV operator for integer division
query I rowsort label-6571
SELECT - + col1 * + col1 DIV - col1 FROM tab2 cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6571
SELECT - + col1 * + col1 / - col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL 88 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6573
SELECT + col1 + - col2 * - CAST( 40 AS SIGNED ) FROM tab2
----
1099
1111
1537

skipif mysql # not compatible
query I rowsort label-6573
SELECT + col1 + - col2 * - CAST ( 40 AS INTEGER ) FROM tab2
----
1099
1111
1537

query I rowsort
SELECT ALL + tab0.col1 AS col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT - 78 AS col2 FROM tab0, tab1 cor0
----
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * 37 col0 FROM tab1
----
370
481
962

query I rowsort
SELECT + col2 + - 65 * - 22 + col2 AS col0 FROM tab0 AS cor0
----
1432
1496
1594

query I rowsort
SELECT + col1 * - ( - cor0.col1 ) AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + + cor0.col2 + - ( col2 ) FROM tab1 cor0
----
0

query I rowsort
SELECT DISTINCT + col1 * + col0 * + ( + col1 ) + - col1 FROM tab1 cor0
----
13507
2002
6390

query I rowsort
SELECT + + 11 * - cor0.col1 FROM tab1 AS cor0
----
-110
-143
-286

onlyif mysql # use DIV operator for integer division
query I rowsort label-6582
SELECT - cor0.col1 DIV col0 + cor0.col2 AS col2 FROM tab2 AS cor0
----
23
26
38

skipif mysql # not compatible
query I rowsort label-6582
SELECT - cor0.col1 / col0 + cor0.col2 AS col2 FROM tab2 AS cor0
----
23
26
38

query I rowsort
SELECT DISTINCT + col0 + col2 * col0 AS col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL + - col2 + ( col2 + + cor0.col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - 73 AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2931474b870c05694e446771031a6949

query I rowsort
SELECT - + ( col0 ) + col2 AS col0 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6587
SELECT ALL - col1 + tab1.col1 DIV col1 AS col2 FROM tab1
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-6587
SELECT ALL - col1 + tab1.col1 / col1 AS col2 FROM tab1
----
-12
-25
-9

query I rowsort
SELECT ALL + col1 * - col0 + col2 * 7 AS col0 FROM tab0
----
-1833
-3388
-7525

query I rowsort
SELECT DISTINCT - - 73 - - cor0.col0 AS col1 FROM tab2 AS cor0
----
151
152
80

query I rowsort
SELECT + cor0.col0 * - col0 * + cor0.col0 + col2 AS col1 FROM tab1 AS cor0
----
-262087
-511904
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-6591
SELECT + col2 DIV col2 + col1 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-6591
SELECT + col2 / col2 + col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT 27 + col0 * - col2 * + col2 AS col0 FROM tab0 AS cor0
----
-26109
-598409
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-6593
SELECT DISTINCT 90 * - 19 - col2 DIV 90 AS col1 FROM tab2 AS cor0
----
-1710

skipif mysql # not compatible
query I rowsort label-6593
SELECT DISTINCT 90 * - 19 - col2 / 90 AS col1 FROM tab2 AS cor0
----
-1710

query I rowsort
SELECT ALL ( - col0 ) - cor0.col2 AS col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT + col1 * - col2 + - col1 AS col0 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT ALL col0 * + col0 + 17 * - col0 FROM tab2 AS cor0
----
-70
4758
4898

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + cor0.col1 col0 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6598
SELECT ALL + 81 + col0 DIV 4 AS col1 FROM tab2 AS cor0
----
100
100
82

skipif mysql # not compatible
query I rowsort label-6598
SELECT ALL + 81 + col0 / 4 AS col1 FROM tab2 AS cor0
----
100
100
82

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
24
35
89

query I rowsort
SELECT 71 - - col1 FROM tab2
----
102
130
88

query I rowsort
SELECT ALL - 63 + 33 FROM tab0
----
-30
-30
-30

query I rowsort
SELECT ALL + col0 + cor0.col0 * col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT - - 77 * + col0 FROM tab2 AS cor0
----
539
6006
6083

query I rowsort
SELECT DISTINCT - col0 * - col0 + - cor0.col1 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT 44 * + col2 AS col1 FROM tab1 cor0
----
2376
2508
4224

onlyif mysql # use DIV operator for integer division
query I rowsort label-6606
SELECT DISTINCT 43 * col2 DIV + col2 FROM tab0 cor0
----
43

skipif mysql # not compatible
query I rowsort label-6606
SELECT DISTINCT 43 * col2 / + col2 FROM tab0 cor0
----
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-6607
SELECT + col2 DIV col2 + + 4 * - col0 + col2 FROM tab0 AS cor0
----
-138
-273
-62

skipif mysql # not compatible
query I rowsort label-6607
SELECT + col2 / col2 + + 4 * - col0 + col2 FROM tab0 AS cor0
----
-138
-273
-62

query I rowsort
SELECT ALL - col2 + - col0 * tab0.col1 FROM tab0
----
-2097
-3396
-8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 42 col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
-42

onlyif mysql # use DIV operator for integer division
query I rowsort label-6610
SELECT ALL col0 DIV - col0 - col0 AS col0 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-6610
SELECT ALL col0 / - col0 - col0 AS col0 FROM tab0 AS cor0
----
-25
-36
-90

query I rowsort
SELECT ALL ( + col1 ) * tab0.col2 * + ( 51 ) + + col1 AS col2 FROM tab0
----
144824
380653
5044

query I rowsort
SELECT ALL + col2 * col2 * + col1 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT DISTINCT 70 * + col0 FROM tab1
----
210
4480
5600

query I rowsort
SELECT DISTINCT 81 FROM tab1, tab2, tab0 AS cor0
----
81

query I rowsort
SELECT 9 AS col0 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to ebef7303942834ca1e6ca8604ec18a07

query I rowsort
SELECT ALL + col1 + cor0.col2 - - 75 FROM tab2 AS cor0
----
130
133
160

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6617
SELECT + 65 + + col1 * CAST( col1 AS SIGNED ) AS col2 FROM tab0
----
7461
8346
9474

skipif mysql # not compatible
query I rowsort label-6617
SELECT + 65 + + col1 * CAST ( col1 AS INTEGER ) AS col2 FROM tab0
----
7461
8346
9474

query I rowsort
SELECT DISTINCT - tab0.col2 * - ( - col2 * col0 ) FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT - col2 * + ( - tab1.col0 ) + col1 - + col0 FROM tab1
----
185
3594
7613

query I rowsort
SELECT + col1 - - 12 FROM tab1
----
22
25
38

query I rowsort
SELECT - ( - col1 ) * - col1 - - ( + col0 ) AS col2 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT DISTINCT + 18 * col0 AS col2 FROM tab1 AS cor0
----
1152
1440
54

query I rowsort
SELECT - - 69 + + col0 FROM tab2 AS cor0
----
147
148
76

query I rowsort
SELECT ALL col0 + - cor0.col0 * col2 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT col2 + 47 FROM tab0
----
129
48
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6626
SELECT col1 * - CAST( col0 AS SIGNED ) * col0 + 25 - + col1 AS col0 FROM tab2 cor0
----
-106089
-1525
-358990

skipif mysql # not compatible
query I rowsort label-6626
SELECT col1 * - CAST ( col0 AS INTEGER ) * col0 + 25 - + col1 AS col0 FROM tab2 cor0
----
-106089
-1525
-358990

query I rowsort
SELECT ALL col2 * + 61 + col2 * + col0 AS col0 FROM tab1
----
13536
3456
7125

query I rowsort
SELECT ALL + col0 * col2 + - cor0.col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT col2 * + 46 AS col1 FROM tab2 AS cor0
----
1196
1242
1748

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6630
SELECT + CAST( NULL AS SIGNED ) col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6630
SELECT + CAST ( NULL AS INTEGER ) col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 38 * - cor0.col0 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to c3091de57d953fb36f88bd4f42a32935

onlyif mysql # use DIV operator for integer division
query I rowsort label-6632
SELECT DISTINCT ( + tab1.col2 ) DIV - col0 + - 49 FROM tab1
----
-49
-50
-67

skipif mysql # not compatible
query I rowsort label-6632
SELECT DISTINCT ( + tab1.col2 ) / - col0 + - 49 FROM tab1
----
-49
-50
-67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6633
SELECT CAST( col2 AS SIGNED ) * - col0 + - ( - col0 ) AS col2 FROM tab0 AS cor0
----
-7209
-768
0

skipif mysql # not compatible
query I rowsort label-6633
SELECT CAST ( col2 AS INTEGER ) * - col0 + - ( - col0 ) AS col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL + ( + ( col1 ) ) + + 45 FROM tab0 AS cor0
----
131
136
142

query I rowsort
SELECT DISTINCT col2 + - ( col2 ) AS col1 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 71 + cor0.col0 col2 FROM tab2 AS cor0
----
-1768
-1910
-2619

query I rowsort
SELECT - - ( col1 ) + - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6638
SELECT DISTINCT - col0 DIV - cor0.col2 + - col2 FROM tab0 AS cor0
----
-33
-81
34

skipif mysql # not compatible
query I rowsort label-6638
SELECT DISTINCT - col0 / - cor0.col2 + - col2 FROM tab0 AS cor0
----
-33
-81
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6639
SELECT ALL + CAST( NULL AS SIGNED ) * + col1 - - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6639
SELECT ALL + CAST ( NULL AS INTEGER ) * + col1 - - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 7 * col0 * col0 FROM tab0 AS cor0
----
-4032
-55447
-8575

query I rowsort
SELECT - + col0 * 29 FROM tab2 AS cor0
----
-203
-2262
-2291

query I rowsort
SELECT ALL - 95 AS col2 FROM tab0 cor0
----
-95
-95
-95

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 3ef3d333138b2b558b77004bad9bdabc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6644
SELECT - - col1 * + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6644
SELECT - - col1 * + 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 - ( - col0 ) * 80 col2 FROM tab1
----
240
5120
6400

query I rowsort
SELECT + col1 * col1 * + col0 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT DISTINCT + col0 * + col1 + col0 AS col0 FROM tab0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-6648
SELECT + col0 DIV - 96 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6648
SELECT + col0 / - 96 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT 54 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6650
SELECT ALL + CAST( NULL AS SIGNED ) / - col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6650
SELECT ALL + CAST ( NULL AS INTEGER ) / - col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 19 * col0 AS col1 FROM tab0 AS cor0
----
1691
456
665

query I rowsort
SELECT ALL - 75 * + 92 FROM tab2
----
-6900
-6900
-6900

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col0 col1 FROM tab1
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6654
SELECT CAST( + 52 AS SIGNED ) * col0 AS col2 FROM tab0
----
1248
1820
4628

skipif mysql # not compatible
query I rowsort label-6654
SELECT CAST ( + 52 AS INTEGER ) * col0 AS col2 FROM tab0
----
1248
1820
4628

query I rowsort
SELECT ALL 47 * cor0.col0 FROM tab1 AS cor0
----
141
3008
3760

query I rowsort
SELECT + - 40 * col1 FROM tab1 cor0
----
-1040
-400
-520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col1 ) * - cor0.col2 col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT 2 + col1 AS col1 FROM tab0 AS cor0
----
88
93
99

query I rowsort
SELECT - col1 * col1 * cor0.col1 + + 8 AS col1 FROM tab2 AS cor0
----
-205371
-29783
-4905

query I rowsort
SELECT + col1 + - 53 FROM tab0
----
33
38
44

query I rowsort
SELECT ALL col1 * col0 * - col0 AS col1 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT col1 + 61 AS col2 FROM tab2 AS cor0
----
120
78
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * ( col1 ) + - col1 col2 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT ALL + col2 + - 2 FROM tab1 AS cor0
----
52
55
94

query I rowsort
SELECT DISTINCT - cor0.col0 + 15 AS col2 FROM tab2 AS cor0
----
-63
-64
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6666
SELECT ( 55 ) + + cor0.col2 / CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6666
SELECT ( 55 ) + + cor0.col2 / CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 86 + cor0.col0 FROM tab2 AS cor0
----
164
165
93

query I rowsort
SELECT + - 15 + cor0.col2 AS col2 FROM tab1 cor0
----
39
42
81

query I rowsort
SELECT ALL ( ( - tab1.col1 ) ) FROM tab1
----
-10
-13
-26

query I rowsort
SELECT - + col0 * 15 + col0 AS col2 FROM tab2 AS cor0
----
-1092
-1106
-98

query I rowsort
SELECT - 52 * col0 + + col1 AS col1 FROM tab2 AS cor0
----
-333
-3997
-4091

query I rowsort
SELECT + col0 * 57 + - col0 AS col2 FROM tab1 AS cor0
----
168
3584
4480

query I rowsort
SELECT 83 * col2 + + col2 AS col2 FROM tab2 AS cor0
----
2184
2268
3192

query I rowsort
SELECT + ( col1 ) + cor0.col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + cor0.col2 + 52 AS col2 FROM tab1 AS cor0
----
106
109
148

query I rowsort
SELECT DISTINCT col2 + + col1 * + col1 + - 14 * col2 FROM tab2 cor0
----
-205
3143
610

onlyif mysql # use DIV operator for integer division
query I rowsort label-6677
SELECT - - col2 + - col1 DIV - 31 FROM tab2 AS cor0
----
27
28
38

skipif mysql # not compatible
query I rowsort label-6677
SELECT - - col2 + - col1 / - 31 FROM tab2 AS cor0
----
27
28
38

query I rowsort
SELECT ALL + col1 * - col0 * + col1 AS col0 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT - 88 * + cor0.col2 * - col0 AS col1 FROM tab1 AS cor0
----
14256
321024
675840

onlyif mysql # use DIV operator for integer division
query I rowsort label-6680
SELECT + col0 + - col0 DIV + col0 FROM tab0 AS cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-6680
SELECT + col0 + - col0 / + col0 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT ALL 84 AS col1 FROM tab1 AS cor0
----
84
84
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6682
SELECT + CAST( NULL AS SIGNED ) * ( - col1 + ( + col0 ) ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6682
SELECT + CAST ( NULL AS INTEGER ) * ( - col1 + ( + col0 ) ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * + 31 + 99 FROM tab0
----
2765
2920
3106

query I rowsort
SELECT ALL tab1.col1 * 97 * - tab1.col0 + + col1 AS col2 FROM tab1
----
-100867
-62070
-7540

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6685
SELECT - CAST( NULL AS SIGNED ) * - 87 + cor0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6685
SELECT - CAST ( NULL AS INTEGER ) * - 87 + cor0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6686
SELECT DISTINCT col0 + CAST( + 12 AS SIGNED ) * - col1 AS col1 FROM tab2
----
-125
-365
-630

skipif mysql # not compatible
query I rowsort label-6686
SELECT DISTINCT col0 + CAST ( + 12 AS INTEGER ) * - col1 AS col1 FROM tab2
----
-125
-365
-630

query I rowsort
SELECT tab1.col2 - + col0 * 73 AS col1 FROM tab1
----
-165
-4615
-5744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 63 col1 FROM tab1, tab0 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 29cdb8d01f1c3eb072511674b1c6d5fd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 72 col0 FROM tab1
----
-8
69
8

query I rowsort
SELECT - tab2.col2 + - col2 * - col2 AS col1 FROM tab2
----
1406
650
702

query I rowsort
SELECT + 25 FROM tab0, tab2 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT ALL - 10 * + col0 * col1 + - col0 AS col1 FROM tab0 AS cor0
----
-20664
-33985
-81079

query I rowsort
SELECT ALL cor0.col2 + 45 - col1 FROM tab1 AS cor0
----
128
73
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-6694
SELECT DISTINCT 26 DIV col0 FROM tab1 AS cor0
----
0
8

skipif mysql # not compatible
query I rowsort label-6694
SELECT DISTINCT 26 / col0 FROM tab1 AS cor0
----
0
8

query I rowsort
SELECT DISTINCT - - col0 * + 61 + col2 * col0 FROM tab1 AS cor0
----
12560
345
7552

query I rowsort
SELECT - - 57 * col1 AS col0 FROM tab1 cor0
----
1482
570
741

query I rowsort
SELECT ALL 36 + + col1 FROM tab0 AS cor0
----
122
127
133

query I rowsort
SELECT ALL + - col1 - col2 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + ( cor0.col1 ) AS col1 FROM tab0, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT - col2 * - ( - col0 * - 64 ) AS col0 FROM tab1 AS cor0
----
10368
233472
491520

onlyif mysql # use DIV operator for integer division
query I rowsort label-6701
SELECT ALL tab0.col1 * - col2 - col1 DIV - col0 FROM tab0
----
-2835
-7461
-95

skipif mysql # not compatible
query I rowsort label-6701
SELECT ALL tab0.col1 * - col2 - col1 / - col0 FROM tab0
----
-2835
-7461
-95

query I rowsort
SELECT ALL ( - col2 * col0 + + col1 * - col1 ) FROM tab0
----
-15579
-8188
-9444

query I rowsort
SELECT + + cor0.col1 * col1 * col2 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT DISTINCT + 68 FROM tab2 cor0 CROSS JOIN tab2 cor1
----
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 32 * 36 col1 FROM tab0 AS cor0
----
1063
1117
1128

query I rowsort
SELECT ALL + 5 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT DISTINCT col1 * 22 AS col1 FROM tab1 cor0
----
220
286
572

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6708
SELECT ALL + - col0 * CAST( NULL AS SIGNED ) + - col2 * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6708
SELECT ALL + - col0 * CAST ( NULL AS INTEGER ) + - col2 * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 10 * 96 FROM tab1, tab1 AS cor0
----
9 values hashing to 5070c83d98d67b72ba3e706a72e08b7b

query I rowsort
SELECT + col2 * - 4 AS col2 FROM tab0 AS cor0
----
-132
-328
-4

query I rowsort
SELECT DISTINCT 25 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
25

query I rowsort
SELECT 93 FROM tab0, tab0 cor0, tab1 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT + col1 + - ( col2 ) * - col2 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) * cor0.col2 AS col1 FROM tab0, tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - + col2 * + col0 + - cor0.col1 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT ALL - col0 * + col1 + ( - col2 ) FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT col2 + 17 AS col1 FROM tab0
----
18
50
99

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
-1
-33
-82

query I rowsort
SELECT DISTINCT col1 + col2 * col1 AS col0 FROM tab1
----
1261
1430
580

query I rowsort
SELECT 9 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT ALL + + col2 + 24 FROM tab2 AS cor0
----
50
51
62

query I rowsort
SELECT DISTINCT - col0 * ( - col2 ) FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - 51 col2 FROM tab2 AS cor0
----
-1326
-1377
-1938

query I rowsort
SELECT ALL + col0 + - 87 AS col0 FROM tab0 AS cor0
----
-52
-63
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + 29 col2 FROM tab0 AS cor0
----
-6
-60
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-6726
SELECT + + col2 * col2 + - col2 DIV col0 AS col1 FROM tab1 AS cor0
----
2898
3249
9215

skipif mysql # not compatible
query I rowsort label-6726
SELECT + + col2 * col2 + - col2 / col0 AS col1 FROM tab1 AS cor0
----
2898
3249
9215

query I rowsort
SELECT ALL - col1 + col1 * + 33 AS col2 FROM tab0 AS cor0
----
2752
2912
3104

query I rowsort
SELECT - col1 * col1 * + ( + col2 ) + - col1 + - col0 * - col0 AS col1 FROM tab0 AS cor0
----
-243578
-671212
-8281

query I rowsort
SELECT DISTINCT + 58 * - col0 + col0 AS col0 FROM tab0 AS cor0
----
-1368
-1995
-5073

query I rowsort
SELECT - 64 + - 97 + - cor0.col0 * - cor0.col2 FROM tab1 cor0
----
1
3487
7519

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + col1 col2 FROM tab0 AS cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col2 + cor0.col2 * col1 + 48 col2 FROM tab0 AS cor0
----
14972
242
5724

query I rowsort
SELECT ALL + - col1 * ( cor0.col1 ) FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + 35 + 49 + - cor0.col1 FROM tab1 AS cor0
----
58
71
74

query I rowsort
SELECT ALL - col1 + 44 + + col0 AS col1 FROM tab0
----
-18
-18
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-6736
SELECT - tab2.col1 DIV CAST( - 66 AS SIGNED ) + - col1 - - col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6736
SELECT - tab2.col1 / CAST ( - 66 AS INTEGER ) + - col1 - - col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6737
SELECT DISTINCT + 28 * col0 DIV col2 + cor0.col0 AS col0 FROM tab0 AS cor0
----
1015
119
44

skipif mysql # not compatible
query I rowsort label-6737
SELECT DISTINCT + 28 * col0 / col2 + cor0.col0 AS col0 FROM tab0 AS cor0
----
1015
119
44

query I rowsort
SELECT DISTINCT col0 * col2 - - ( + col2 ) FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL 39 * col1 FROM tab2 cor0
----
1209
2301
663

query I rowsort
SELECT + + cor0.col0 + - cor0.col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL + - col2 + - col0 * 62 FROM tab2 AS cor0
----
-461
-4862
-4936

query I rowsort
SELECT DISTINCT - + 82 * + col0 FROM tab1 AS cor0
----
-246
-5248
-6560

query I rowsort
SELECT ALL - col2 + - cor0.col2 FROM tab2 cor0
----
-52
-54
-76

query I rowsort
SELECT ALL + - cor0.col0 + 72 AS col2 FROM tab0 AS cor0
----
-17
37
48

query I rowsort
SELECT DISTINCT - - cor0.col1 * col1 AS col2 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6746
SELECT + - col2 - - 65 * ( col2 * + 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-6746
SELECT + - col2 - - 65 * ( col2 * + CAST ( NULL AS INTEGER ) ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6747
SELECT + + col1 * - CAST( col2 * col0 AS SIGNED ) + - col2 FROM tab2 AS cor0
----
-119678
-51072
-5886

skipif mysql # not compatible
query I rowsort label-6747
SELECT + + col1 * - CAST ( col2 * col0 AS INTEGER ) + - col2 FROM tab2 AS cor0
----
-119678
-51072
-5886

query I rowsort
SELECT - tab0.col2 - 64 FROM tab2, tab1, tab2 AS cor0, tab0
----
81 values hashing to c1f631fa392b050c4bfb092d36e24667

query I rowsort
SELECT 58 * col1 AS col0 FROM tab2
----
1798
3422
986

query I rowsort
SELECT 64 * + col2 - col0 AS col2 FROM tab1
----
3453
3584
6064

query I rowsort
SELECT DISTINCT + tab0.col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT - col2 * + col0 * - 84 FROM tab2
----
15876
170352
252168

onlyif mysql # use DIV operator for integer division
query I rowsort label-6753
SELECT DISTINCT 42 DIV tab0.col1 + ( 27 ) * col2 FROM tab0
----
2214
27
891

skipif mysql # not compatible
query I rowsort label-6753
SELECT DISTINCT 42 / tab0.col1 + ( 27 ) * col2 FROM tab0
----
2214
27
891

query I rowsort
SELECT DISTINCT 14 AS col2 FROM tab2, tab1, tab1 AS cor0
----
14

query I rowsort
SELECT - + 47 AS col1 FROM tab0 AS cor0
----
-47
-47
-47

query I rowsort
SELECT 52 * col0 FROM tab1 AS cor0
----
156
3328
4160

query I rowsort
SELECT ALL - ( + ( + col1 ) * + tab2.col2 ) AS col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ALL ( - cor0.col2 ) + + col2 - col0 * col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + 61 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT ( + col0 + + col0 ) FROM tab1
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) * - col1 col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ( ( + col1 ) ) FROM tab2
----
17
31
59

query I rowsort
SELECT + 71 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT - col1 * 89 * - col2 AS col2 FROM tab0 AS cor0
----
252582
664118
8633

query I rowsort
SELECT - + col1 * - col2 + 81 AS col2 FROM tab2 AS cor0
----
1615
727
918

onlyif mysql # use DIV operator for integer division
query I rowsort label-6767
SELECT + col2 + - ( + 16 ) DIV - col2 FROM tab0 AS cor0
----
17
33
82

skipif mysql # not compatible
query I rowsort label-6767
SELECT + col2 + - ( + 16 ) / - col2 FROM tab0 AS cor0
----
17
33
82

query I rowsort
SELECT col2 * - ( col1 ) FROM tab2 cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 32 + + 24 col0 FROM tab2, tab0 cor0, tab1 cor1
----
27 values hashing to 852581644118629bf652b1aa4b8f4363

query I rowsort
SELECT ALL + ( col2 * col1 ) + 74 FROM tab1
----
1322
1478
644

query I rowsort
SELECT ALL + 56 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

query I rowsort
SELECT DISTINCT col0 + col2 + - col0 * col2 * - col2 AS col0 FROM tab0
----
26193
598607
71

query I rowsort
SELECT col2 * + tab0.col2 AS col1 FROM tab0
----
1
1089
6724

query I rowsort
SELECT ALL - 79 FROM tab2, tab0 cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

query I rowsort
SELECT ALL + col2 + + 98 FROM tab2 AS cor0
----
124
125
136

query I rowsort
SELECT DISTINCT + - col1 - - col1 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 * - col2 FROM tab0 cor0
----
-244068
-679042
-9409

query I rowsort
SELECT ALL + col2 * 13 + + cor0.col1 AS col2 FROM tab2 AS cor0
----
382
397
511

query I rowsort
SELECT ALL + - col1 * - 15 + cor0.col0 + + cor0.col2 FROM tab1 AS cor0
----
271
371
447

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6780
SELECT - col1 + CAST( col2 AS SIGNED ) * cor0.col1 AS col1 FROM tab2 AS cor0
----
1475
629
806

skipif mysql # not compatible
query I rowsort label-6780
SELECT - col1 + CAST ( col2 AS INTEGER ) * cor0.col1 AS col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT - col2 * col1 - cor0.col1 * - col0 AS col0 FROM tab1 AS cor0
----
-1326
-208
70

query I rowsort
SELECT + - 27 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

query I rowsort
SELECT ALL col0 + - col2 + - col2 AS col2 FROM tab2 AS cor0
----
-47
26
3

query I rowsort
SELECT col2 * tab0.col2 * - col0 FROM tab0
----
-26136
-35
-598436

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + col1 + cor0.col2 col0 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT tab2.col0 * + col2 * + col2 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT DISTINCT + col0 + + tab0.col0 * tab0.col1 * col0 FROM tab0
----
118860
49560
720900

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0, tab2, tab2 cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + col2 col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT + col0 AS col1 FROM tab2 WHERE col1 < ( NULL ) AND NULL >= NULL
----

query I rowsort
SELECT - col0 + + tab2.col1 * col0 FROM tab2
----
1264
210
4524

query I rowsort
SELECT ALL col1 * col0 * col0 AS col1 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT + + 6 FROM tab1 AS cor0
----
6
6
6

query I rowsort
SELECT DISTINCT - - 59 - col2 * cor0.col1 AS col2 FROM tab2 AS cor0
----
-1475
-587
-778

query I rowsort
SELECT ( col2 ) * col1 - - col2 AS col1 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT col2 * col1 + col1 * + col2 FROM tab2 cor0
----
1292
1674
3068

query I rowsort
SELECT col0 * + col0 + + col0 * - col0 + + col2 AS col0 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6799
SELECT - ( col0 ) DIV col1 AS col2 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-6799
SELECT - ( col0 ) / col1 AS col2 FROM tab2
----
-1
-4
0

query I rowsort
SELECT ALL + 67 * col0 + col1 + col2 FROM tab2
----
527
5311
5348

query I rowsort
SELECT + col1 + - col0 * + 43 AS col2 FROM tab1 cor0
----
-103
-2742
-3427

onlyif mysql # use DIV operator for integer division
query I rowsort label-6802
SELECT DISTINCT + 46 DIV col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6802
SELECT DISTINCT + 46 / col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - + col1 + + col1 * + cor0.col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT - 70 * cor0.col2 * ( + col2 ) FROM tab1 AS cor0
----
-204120
-227430
-645120

query I rowsort
SELECT - ( - col1 ) + col1 AS col1 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - col0 + + col1 AS col1 FROM tab0 cor0
----
2
62

query I rowsort
SELECT ALL - + 91 + col0 AS col0 FROM tab1 AS cor0
----
-11
-27
-88

query I rowsort
SELECT ALL - + col0 - - col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT - col1 * col0 * col1 AS col0 FROM tab2 cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col1 + 98 * - 47 AS col2 FROM tab0 AS cor0
----
-1768
-4509
2856

query I rowsort
SELECT - col2 * + ( col0 ) AS col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL + ( - col1 * + col2 + col0 ) FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT - - 68 AS col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT + col1 * col2 + - cor0.col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT DISTINCT - + 77 * - col0 FROM tab2 cor0
----
539
6006
6083

query I rowsort
SELECT + - col1 * col2 + - 58 FROM tab1 AS cor0
----
-1306
-1462
-628

query I rowsort
SELECT DISTINCT - col0 - + col1 * + ( - cor0.col2 ) AS col2 FROM tab0 cor0
----
2814
62
7373

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2, tab0 AS cor3
----
3645 values hashing to ced36882687f040e969c817b62d2e456

query I rowsort
SELECT - 24 * cor0.col1 + + col0 * + col2 FROM tab0 AS cor0
----
-1272
-2293
5114

query I rowsort
SELECT DISTINCT + 29 AS col1 FROM tab1 AS cor0
----
29

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6821
SELECT ALL 36 * ( + col1 * CAST( NULL AS SIGNED ) ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6821
SELECT ALL 36 * ( + col1 * CAST ( NULL AS INTEGER ) ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( 21 ) FROM tab2 AS cor0
----
21
21
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6823
SELECT ALL - CAST( NULL AS SIGNED ) * - ( col2 + ( ( col1 ) ) ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6823
SELECT ALL - CAST ( NULL AS INTEGER ) * - ( col2 + ( ( col1 ) ) ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( - cor0.col0 ) FROM tab2, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) + + col1 * - 63 col1 FROM tab1
----
-1664
-640
-832

query I rowsort
SELECT + 61 + 3 * col0 * - col2 + - ( col1 ) AS col0 FROM tab2
----
-537
-6082
-8962

query I rowsort
SELECT col0 + - col0 * - col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT ALL + 92 + tab2.col2 AS col0 FROM tab2
----
118
119
130

query I rowsort
SELECT ALL + 41 + - col2 * col2 AS col2 FROM tab0
----
-1048
-6683
40

query I rowsort
SELECT ALL + ( tab1.col0 ) - + col2 * tab1.col0 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT - col2 * - col1 - col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT DISTINCT - col2 * - ( tab0.col1 ) * ( 15 ) - tab0.col2 AS col0 FROM tab0
----
111848
1454
42537

query I rowsort
SELECT DISTINCT + 26 + col1 FROM tab2
----
43
57
85

query I rowsort
SELECT DISTINCT + 99 + + cor0.col1 FROM tab0 cor0
----
185
190
196

query I rowsort
SELECT ALL - - col0 + - 8 FROM tab0 cor0
----
16
27
81

query I rowsort
SELECT 6 * 91 AS col2 FROM tab1 AS cor0
----
546
546
546

query I rowsort
SELECT ( - 39 ) FROM tab0 AS cor0
----
-39
-39
-39

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0 CROSS JOIN tab2 AS cor1
----
243 values hashing to 042fa16c43ab365359ee93c064e44127

query I rowsort
SELECT ALL - 71 * col1 FROM tab2 AS cor0
----
-1207
-2201
-4189

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - - col1 * col1 + - cor0.col0 + CAST ( - col0 AS REAL ) * col0 FROM tab0 AS cor0
----
271
6796
8149

onlyif mysql # use DIV operator for integer division
query I rowsort label-6841
SELECT col0 + - col0 DIV + col0 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-6841
SELECT col0 + - col0 / + col0 FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT DISTINCT + + 96 * + cor0.col0 FROM tab1 AS cor0
----
288
6144
7680

query I rowsort
SELECT DISTINCT - ( - tab1.col2 + col0 ) AS col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT + - 11 + cor0.col1 * - 42 AS col2 FROM tab0 AS cor0
----
-3623
-3833
-4085

onlyif mysql # use DIV operator for integer division
query I rowsort label-6845
SELECT 43 DIV + cor0.col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6845
SELECT 43 / + cor0.col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL 39 * col1 FROM tab0
----
3354
3549
3783

query I rowsort
SELECT - cor0.col0 * - 11 * - tab0.col1 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 63643d98917a06a0d9efb0e9ca45a27d

query I rowsort
SELECT ( col1 ) - - ( - 25 ) * - col2 FROM tab0 AS cor0
----
122
2141
911

query I rowsort
SELECT + col2 * col1 + + col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL + - 22 AS col0 FROM tab2 AS cor0
----
-22
-22
-22

query I rowsort
SELECT + col2 + + ( + 86 ) FROM tab2 AS cor0
----
112
113
124

onlyif mysql # use DIV operator for integer division
query I rowsort label-6852
SELECT ALL col1 + ( cor0.col2 ) + + col0 DIV + 96 FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-6852
SELECT ALL col1 + ( cor0.col2 ) + + col0 / + 96 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - col1 * cor0.col1 * col2 + col1 FROM tab2 AS cor0
----
-10965
-25916
-90447

query I rowsort
SELECT col1 * ( tab2.col0 ) + + col0 FROM tab2
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6855
SELECT - - col1 + CAST( + col1 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
20
26
52

skipif mysql # not compatible
query I rowsort label-6855
SELECT - - col1 + CAST ( + col1 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT + col2 * - 94 + + col0 FROM tab2 AS cor0
----
-2366
-2531
-3493

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6857
SELECT cor0.col2 * + CAST( col2 AS SIGNED ) + cor0.col0 AS col0 FROM tab1 cor0
----
2919
3313
9296

skipif mysql # not compatible
query I rowsort label-6857
SELECT cor0.col2 * + CAST ( col2 AS INTEGER ) + cor0.col0 AS col0 FROM tab1 cor0
----
2919
3313
9296

query I rowsort
SELECT + col1 * - 23 FROM tab2 AS cor0
----
-1357
-391
-713

query I rowsort
SELECT DISTINCT + - col2 - + 56 AS col1 FROM tab1 AS cor0
----
-110
-113
-152

query I rowsort
SELECT col0 * + col0 + ( col2 ) AS col0 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT ALL - col2 + 0 + - col2 FROM tab0 AS cor0
----
-164
-2
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 63 col1 FROM tab0 AS cor0
----
63

query I rowsort
SELECT ALL + - col1 + + 1 AS col1 FROM tab2 cor0
----
-16
-30
-58

query I rowsort
SELECT DISTINCT - + 43 * 16 FROM tab2 AS cor0
----
-688

query I rowsort
SELECT ALL ( col0 ) * col0 + 2 * - col0 AS col0 FROM tab0 cor0
----
1155
528
7743

onlyif mysql # use DIV operator for integer division
query I rowsort label-6866
SELECT - + col0 DIV cor0.col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-6866
SELECT - + col0 / cor0.col2 FROM tab0 AS cor0
----
-1
-35
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 99 col1 FROM tab1 AS cor0
----
99

query I rowsort
SELECT ALL - 84 * 96 + col2 FROM tab0 AS cor0
----
-7982
-8031
-8063

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6869
SELECT CAST( NULL AS SIGNED ) * col0 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6869
SELECT CAST ( NULL AS INTEGER ) * col0 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 + 47 * - col2 + ( col1 + col1 ) FROM tab2 AS cor0
----
-1045
-1176
-1735

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6871
SELECT col1 - CAST( - col1 * - col2 AS SIGNED ) FROM tab2
----
-1475
-629
-806

skipif mysql # not compatible
query I rowsort label-6871
SELECT col1 - CAST ( - col1 * - col2 AS INTEGER ) FROM tab2
----
-1475
-629
-806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6872
SELECT ALL + col1 * - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6872
SELECT ALL + col1 * - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6873
SELECT - + cor0.col2 DIV ( col0 ) + col1 FROM tab1 AS cor0
----
10
12
8

skipif mysql # not compatible
query I rowsort label-6873
SELECT - + cor0.col2 / ( col0 ) + col1 FROM tab1 AS cor0
----
10
12
8

query I rowsort
SELECT DISTINCT - + cor0.col1 + col1 + 6 AS col1 FROM tab2 AS cor0
----
6

query I rowsort
SELECT ALL col1 * - col2 * - col0 AS col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT - col1 * + col1 + - col1 AS col1 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT ( + tab0.col1 ) * - tab0.col1 AS col2 FROM tab0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + col1 col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT + col0 * 16 + col0 + - col0 FROM tab0 AS cor0
----
1424
384
560

query I rowsort
SELECT + col2 * 29 * - 4 + col0 AS col0 FROM tab0 cor0
----
-3804
-81
-9423

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6881
SELECT - - col0 + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6881
SELECT - - col0 + CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 48 * - cor0.col0 + 68 * - cor0.col2 FROM tab2, tab1, tab2 AS cor0
----
-2172
-5512
-6376

onlyif mysql # use DIV operator for integer division
query I rowsort label-6883
SELECT - col0 DIV ( - col0 ) + - col0 AS col2 FROM tab0 cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-6883
SELECT - col0 / ( - col0 ) + - col0 AS col2 FROM tab0 cor0
----
-23
-34
-88

query I rowsort
SELECT - col1 * + col0 * - col1 + col1 FROM tab0
----
177590
329412
737100

query I rowsort
SELECT ALL col1 * col0 * + 5 + + 86 AS col2 FROM tab0
----
10406
17061
40581

query I rowsort
SELECT ALL + 62 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query I rowsort
SELECT ALL + ( - cor0.col0 ) AS col1 FROM tab0, tab1, tab1 cor0
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT DISTINCT 57 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
57

query I rowsort
SELECT DISTINCT - cor0.col2 * - ( col0 ) + - cor0.col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT DISTINCT - 15 AS col1 FROM tab1, tab1 AS cor0
----
-15

query I rowsort
SELECT DISTINCT col2 + - 21 FROM tab2 AS cor0
----
17
5
6

query I rowsort
SELECT ALL - - col0 + - col2 * - 63 - + col0 FROM tab2 AS cor0
----
1638
1701
2394

query I rowsort
SELECT ALL + col0 * + ( - col0 ) FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT col2 + cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL + 40 + + col1 AS col0 FROM tab2 AS cor0
----
57
71
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6896
SELECT ALL 51 + col0 * + cor0.col1 * CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
285
41011
83251

skipif mysql # not compatible
query I rowsort label-6896
SELECT ALL 51 + col0 * + cor0.col1 * CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
285
41011
83251

query I rowsort
SELECT DISTINCT - - 61 + col2 FROM tab0 AS cor0
----
143
62
94

query I rowsort
SELECT - - col1 * + 19 FROM tab2 AS cor0
----
1121
323
589

query I rowsort
SELECT DISTINCT - col0 * + tab2.col0 + col2 AS col2 FROM tab2
----
-22
-6058
-6203

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6900
SELECT col2 + CAST( NULL AS SIGNED ) * - col1 col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6900
SELECT col2 + CAST ( NULL AS INTEGER ) * - col1 col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * ( - col2 ) + tab2.col0 * col1 + + 62 FROM tab2
----
-39
-450
3988

query I rowsort
SELECT col1 + - 5 * + col0 - - col0 AS col2 FROM tab0
----
-10
-265
-43

query I rowsort
SELECT - col0 - 41 * + col1 * - col2 FROM tab2
----
26407
34310
62816

query I rowsort
SELECT DISTINCT col1 * 13 + col1 AS col1 FROM tab0
----
1204
1274
1358

query I rowsort
SELECT ALL + col2 + col0 * col2 + + ( - col0 ) AS col0 FROM tab2
----
1976
209
2961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col1 + col0 col2 FROM tab2
----
-17
141
97

query I rowsort
SELECT 69 * tab0.col1 FROM tab0
----
5934
6279
6693

onlyif mysql # use DIV operator for integer division
query I rowsort label-6908
SELECT + col0 DIV + col0 + + col1 AS col2 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-6908
SELECT + col0 / + col0 + + col1 AS col2 FROM tab0
----
87
92
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6909
SELECT CAST( col1 AS SIGNED ) * + col2 * + col0 + + col0 FROM tab1
----
36544
4215
99920

skipif mysql # not compatible
query I rowsort label-6909
SELECT CAST ( col1 AS INTEGER ) * + col2 * + col0 + + col0 FROM tab1
----
36544
4215
99920

query I rowsort
SELECT - 20 + 77 * col0 + + col1 * col0 FROM tab0
----
14932
3892
6070

query I rowsort
SELECT DISTINCT tab2.col1 * col2 * col1 + tab2.col0 * + col1 FROM tab2
----
12325
26164
95108

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6912
SELECT ALL CAST( cor0.col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6912
SELECT ALL CAST ( cor0.col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL + col2 + - 8 AS col2 FROM tab0 AS cor0
----
-7
25
74

query I rowsort
SELECT ALL ( 85 ) * - col2 AS col2 FROM tab1 AS cor0
----
-4590
-4845
-8160

query I rowsort
SELECT + 2 * col2 + - col1 AS col1 FROM tab1 AS cor0
----
104
179
82

query I rowsort
SELECT cor0.col1 * + col0 * cor0.col0 + col0 FROM tab2 cor0
----
106176
1526
359034

query I rowsort
SELECT DISTINCT - - 79 * + col0 FROM tab0 AS cor0
----
1896
2765
7031

query I rowsort
SELECT ALL - - ( - cor0.col0 ) + - col1 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * col1 + 30 * - col0 * + col1 col2 FROM tab1 AS cor0
----
-19770
-32448
-3744

onlyif mysql # use DIV operator for integer division
query I rowsort label-6920
SELECT DISTINCT col2 DIV col1 col2 FROM tab1 cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6920
SELECT DISTINCT col2 / col1 col2 FROM tab1 cor0
----
2
5
7

query I rowsort
SELECT DISTINCT - 68 * col1 FROM tab0 AS cor0
----
-5848
-6188
-6596

query I rowsort
SELECT col0 * - col0 * - 95 + col2 FROM tab1 cor0
----
389177
608096
909

query I rowsort
SELECT 21 * col1 + col1 AS col0 FROM tab2 AS cor0
----
1298
374
682

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6924
SELECT + col2 * - col0 + - ( + col0 ) * + col2 + - CAST( 66 AS SIGNED ) FROM tab0 cor0
----
-136
-14662
-1650

skipif mysql # not compatible
query I rowsort label-6924
SELECT + col2 * - col0 + - ( + col0 ) * + col2 + - CAST ( 66 AS INTEGER ) FROM tab0 cor0
----
-136
-14662
-1650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col1 * col2 + - col1 * 72 * col0 col1 FROM tab1
----
-4186
-45500
-73619

query I rowsort
SELECT ALL tab0.col0 * - ( col2 * + col0 ) - + col1 * + col2 AS col2 FROM tab0
----
-1322
-21846
-656984

query I rowsort
SELECT - 13 + + col0 - - tab1.col1 FROM tab1
----
16
61
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6928
SELECT - CAST( - cor0.col0 AS SIGNED ) + tab0.col0 AS col0 FROM tab0, tab2, tab0 cor0
----
27 values hashing to a4274ec98729e5e1706fd0cd4a9d2c3d

skipif mysql # not compatible
query I rowsort label-6928
SELECT - CAST ( - cor0.col0 AS INTEGER ) + tab0.col0 AS col0 FROM tab0, tab2, tab0 cor0
----
27 values hashing to a4274ec98729e5e1706fd0cd4a9d2c3d

query I rowsort
SELECT DISTINCT + 88 - + col2 AS col0 FROM tab1
----
-8
31
34

query I rowsort
SELECT DISTINCT - - 89 + col1 FROM tab2 AS cor0
----
106
120
148

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col2 * col1 col1 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT ALL - col2 * - col1 * ( + col1 ) + - col0 FROM tab0 AS cor0
----
244044
678953
9374

query I rowsort
SELECT DISTINCT + col2 * - col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col2 + - col2 * col0 * ( col0 ) AS col1 FROM tab0 AS cor0
----
-1226
-19041
-649604

query I rowsort
SELECT ALL + col1 + col0 * cor0.col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL + - col2 + - 30 * 88 + cor0.col1 FROM tab0 AS cor0
----
-2544
-2587
-2631

query I rowsort
SELECT ALL + col0 + - col0 * - col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT - cor0.col2 * + ( - col0 ) AS col0 FROM tab0 cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6939
SELECT ALL - col1 + CAST( - col0 AS SIGNED ) FROM tab1 cor0
----
-29
-74
-93

skipif mysql # not compatible
query I rowsort label-6939
SELECT ALL - col1 + CAST ( - col0 AS INTEGER ) FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + col0 * ( - cor0.col0 ) - - col1 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT - - col0 * ( cor0.col1 ) FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - col1 + + 96 * - col2 FROM tab2 AS cor0
----
-2555
-2623
-3665

query I rowsort
SELECT ALL col0 - col0 * col2 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-6944
SELECT ALL - 50 + - col2 DIV + col1 FROM tab0 AS cor0
----
-50
-50
-50

skipif mysql # not compatible
query I rowsort label-6944
SELECT ALL - 50 + - col2 / + col1 FROM tab0 AS cor0
----
-50
-50
-50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6945
SELECT - col2 - CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6945
SELECT - col2 - CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 87 * - 56 AS col0 FROM tab2 AS cor0
----
4872
4872
4872

query I rowsort
SELECT ALL 52 * 56 FROM tab0 AS cor0
----
2912
2912
2912

query I rowsort
SELECT DISTINCT + + ( - 53 ) FROM tab2 AS cor0
----
-53

onlyif mysql # use DIV operator for integer division
query I rowsort label-6949
SELECT ALL - col0 DIV + 72 FROM tab2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-6949
SELECT ALL - col0 / + 72 FROM tab2
----
-1
-1
0

query I rowsort
SELECT col1 * + ( col2 ) + + col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT DISTINCT col2 * - ( + col0 ) * - col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT - ( + 69 ) FROM tab2 AS cor0
----
-69
-69
-69

query I rowsort
SELECT DISTINCT + 12 + col0 * col0 FROM tab1 AS cor0
----
21
4108
6412

onlyif mysql # use DIV operator for integer division
query I rowsort label-6954
SELECT DISTINCT - col0 DIV col0 + - cor0.col0 FROM tab2 AS cor0
----
-79
-8
-80

skipif mysql # not compatible
query I rowsort label-6954
SELECT DISTINCT - col0 / col0 + - cor0.col0 FROM tab2 AS cor0
----
-79
-8
-80

query I rowsort
SELECT ALL + col0 + 84 FROM tab2 AS cor0
----
162
163
91

query I rowsort
SELECT - + col1 + 11 * col1 FROM tab2 AS cor0
----
170
310
590

onlyif mysql # use DIV operator for integer division
query I rowsort label-6957
SELECT ALL + col2 * col0 DIV col1 + + col1 FROM tab1 AS cor0
----
32
374
603

skipif mysql # not compatible
query I rowsort label-6957
SELECT ALL + col2 * col0 / col1 + + col1 FROM tab1 AS cor0
----
32
374
603

query I rowsort
SELECT ALL + ( + 0 ) + - col1 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + col1 * + col0 + - col1 AS col2 FROM tab1
----
1027
52
630

query I rowsort
SELECT + - col0 * cor0.col0 + - ( - col1 ) AS col2 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT - 58 * col1 FROM tab2
----
-1798
-3422
-986

query I rowsort
SELECT + ( 65 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT DISTINCT 6 * - 83 FROM tab0, tab1 AS cor0
----
-498

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-6965
SELECT ALL - col2 DIV + 16 + 45 * - cor0.col1 - 1 * ( + col0 + + ( - 48 ) ) * col1 AS col1 FROM tab2 AS cor0
----
-125
-1294
-4426

skipif mysql # not compatible
query I rowsort label-6965
SELECT ALL - col2 / + 16 + 45 * - cor0.col1 - 1 * ( + col0 + + ( - 48 ) ) * col1 AS col1 FROM tab2 AS cor0
----
-125
-1294
-4426

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 + + cor0.col0 * - col1 col2 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT + cor0.col0 * - 67 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to f9099e0e25118f937f18c88831137830

query I rowsort
SELECT DISTINCT + col1 + + 11 FROM tab2 AS cor0
----
28
42
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-6969
SELECT ALL + col1 DIV + 45 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-6969
SELECT ALL + col1 / + 45 col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col1 + col1 + col1 AS col2 FROM tab1 AS cor0
----
30
39
78

query I rowsort
SELECT 46 + col1 * - col1 AS col2 FROM tab0
----
-7350
-8235
-9363

query I rowsort
SELECT + col1 * - col1 * + ( ( + col0 ) ) + col1 * - ( - col2 ) AS col1 FROM tab0 AS cor0
----
-174666
-329218
-729547

onlyif mysql # use DIV operator for integer division
query I rowsort label-6973
SELECT 36 DIV col2 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6973
SELECT 36 / col2 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - ( + col1 ) * 27 AS col2 FROM tab2
----
-1593
-459
-837

query I rowsort
SELECT DISTINCT + tab2.col0 * tab2.col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - 4 * + col0 FROM tab1
----
-12
-256
-320

query I rowsort
SELECT cor0.col0 + 44 FROM tab0, tab2 AS cor0
----
9 values hashing to b9b3415b6fb7f3b7692482ec0ad29697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col0 * col1 col1 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT ALL + 15 * - cor1.col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c133cb6e4ee51af508f710aaf71cdf6c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6980
SELECT - tab0.col0 + + CAST( col2 * col1 + - ( col0 ) AS SIGNED ) FROM tab0
----
27
2790
7284

skipif mysql # not compatible
query I rowsort label-6980
SELECT - tab0.col0 + + CAST ( col2 * col1 + - ( col0 ) AS INTEGER ) FROM tab0
----
27
2790
7284

query I rowsort
SELECT DISTINCT col2 + col1 + - col1 FROM tab1 cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6982
SELECT + cor0.col2 DIV + cor0.col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6982
SELECT + cor0.col2 / + cor0.col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT - col2 + col1 - + col2 AS col2 FROM tab0 AS cor0
----
-73
20
95

query I rowsort
SELECT + + ( - col0 ) + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-6985
SELECT + col2 DIV + 88 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6985
SELECT + col2 / + 88 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + 82 * col2 AS col1 FROM tab0 AS cor0
----
-2706
-6724
-82

query I rowsort
SELECT - - col2 + col0 * col0 FROM tab1 cor0
----
4153
63
6496

query I rowsort
SELECT + col0 + + col0 * ( + col2 ) FROM tab2
----
196
2106
3081

query I rowsort
SELECT DISTINCT 18 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-6990
SELECT 48 + + col2 DIV col2 - + 67 col0 FROM tab0 AS cor0
----
-18
-18
-18

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6990
SELECT 48 + + col2 / col2 - + 67 col0 FROM tab0 AS cor0
----
-18
-18
-18

query I rowsort
SELECT ( - 5 ) AS col1 FROM tab1 AS cor0
----
-5
-5
-5

query I rowsort
SELECT + ( ( col2 ) ) AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + ( - 9 ) AS col2 FROM tab0
----
-9
-9
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6994
SELECT - CAST( NULL AS SIGNED ) + col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6994
SELECT - CAST ( NULL AS INTEGER ) + col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - - ( ( col0 ) ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col2 + ( - tab2.col0 ) FROM tab2
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-6997
SELECT col2 DIV col1 col0 FROM tab2 cor0
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6997
SELECT col2 / col1 col0 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort
SELECT - + CAST ( - col2 AS REAL ) + col0 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 + col2 col0 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT + - 37 + col2 FROM tab2 cor0
----
-10
-11
1

query I rowsort
SELECT DISTINCT - + 73 + col1 * + 98 FROM tab2 AS cor0
----
1593
2965
5709

query I rowsort
SELECT ALL - col1 * col0 + + ( col1 ) AS col0 FROM tab2 cor0
----
-1326
-186
-4543

query I rowsort
SELECT + + col1 * cor0.col1 + 35 FROM tab1 AS cor0
----
135
204
711

onlyif mysql # use DIV operator for integer division
query I rowsort label-7004
SELECT - - col0 DIV col1 - + col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-7004
SELECT - - col0 / col1 - + col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - + col1 * col1 * col0 + + col0 AS col1 FROM tab2 AS cor0
----
-22752
-271440
-6720

onlyif mysql # use DIV operator for integer division
query I rowsort label-7006
SELECT + + col0 + col1 DIV + 55 AS col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-7006
SELECT + + col0 + col1 / + 55 AS col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT ALL 10 + cor0.col0 * - col1 FROM tab0 AS cor0
----
-2054
-3385
-8089

query I rowsort
SELECT ALL 46 * 61 FROM tab2
----
2806
2806
2806

query I rowsort
SELECT + col1 * 1 AS col1 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 97 col2 FROM tab1
----
97
97
97

query I rowsort
SELECT - cor0.col1 + - 78 FROM tab1 AS cor0
----
-104
-88
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-7012
SELECT ALL - col1 DIV - ( cor0.col1 * col0 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7012
SELECT ALL - col1 / - ( cor0.col1 * col0 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 58 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 12 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

query I rowsort
SELECT - + cor0.col2 * 23 AS col1 FROM tab2 AS cor0
----
-598
-621
-874

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col1 + + ( tab0.col2 ) col1 FROM tab0, tab2 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + col1 * col0 * ( col2 ) AS col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT 23 * + col1 AS col0 FROM tab1
----
230
299
598

query I rowsort
SELECT DISTINCT + + col1 + cor0.col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1128
-490
-7830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7020
SELECT + col1 * + CAST( NULL AS SIGNED ) * col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7020
SELECT + col1 * + CAST ( NULL AS INTEGER ) * col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 + + col1 * - col0 AS col0 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT col0 - + ( + 19 ) FROM tab1 AS cor0
----
-16
45
61

query I rowsort
SELECT - col1 * - col0 * 27 AS col2 FROM tab0 AS cor0
----
218673
55728
91665

query I rowsort
SELECT DISTINCT + - col0 * ( col2 ) AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + - col2 * 41 AS col0 FROM tab1 cor0
----
-2214
-2337
-3936

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + ( cor0.col2 ) * col0 col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT col2 * - 87 AS col2 FROM tab1 cor0
----
-4698
-4959
-8352

onlyif mysql # use DIV operator for integer division
query I rowsort label-7028
SELECT + cor0.col0 DIV cor0.col2 AS col0 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7028
SELECT + cor0.col0 / cor0.col2 AS col0 FROM tab1 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7029
SELECT + - cor0.col1 DIV + col0 AS col0 FROM tab0 cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-7029
SELECT + - cor0.col1 / + col0 AS col0 FROM tab0 cor0
----
-1
-2
-3

query I rowsort
SELECT ALL cor0.col1 * col1 * + 78 AS col0 FROM tab0 AS cor0
----
576888
645918
733902

query I rowsort
SELECT ALL + - col0 * 95 + cor0.col2 * + col1 * + col0 + - col0 * col0 AS col2 FROM tab0 cor0
----
-1155
647742
65256

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * col1 - col1 * col2 col1 FROM tab2 AS cor0
----
-357
124
1947

query I rowsort
SELECT - + col0 * - col0 + + col0 AS col1 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT col0 - - ( col2 * col0 ) FROM tab0
----
70
7387
816

query I rowsort
SELECT DISTINCT + col1 * 38 AS col1 FROM tab0 AS cor0
----
3268
3458
3686

query I rowsort
SELECT 39 * ( + col2 ) FROM tab0 AS cor0
----
1287
3198
39

query I rowsort
SELECT - 56 + - col0 * + col2 FROM tab2 AS cor0
----
-2084
-245
-3058

query I rowsort
SELECT 21 * cor0.col1 + col2 FROM tab2 AS cor0
----
1265
395
678

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7039
SELECT ALL + CAST( NULL AS S