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 # support for MySQL specific system types and syntax
query I rowsort label-0
SELECT - col1 * col2 / + CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

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

query I rowsort
SELECT + + col1 + + col1 * - col0 + - 55 AS col0 FROM tab0 AS cor0
----
-2033
-3353
-8063

query I rowsort
SELECT DISTINCT + ( + col1 ) * - 65 + - col1 FROM tab1 AS cor0
----
-1716
-660
-858

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-5
SELECT ALL - col2 + col1 DIV col1 col2 FROM tab1
----
-53
-56
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5
SELECT ALL - col2 + col1 / col1 col2 FROM tab1
----
-53
-56
-95

query I rowsort
SELECT + - 3 + col1 AS col0 FROM tab0 AS cor0
----
83
88
94

query I rowsort
SELECT - col2 * cor0.col1 + - 92 FROM tab0 AS cor0
----
-189
-2930
-7554

query I rowsort
SELECT col0 + col2 * 70 AS col0 FROM tab1 AS cor0
----
3783
4054
6800

query I rowsort
SELECT DISTINCT + 68 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
476
5304
5372

query I rowsort
SELECT 43 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

query I rowsort
SELECT + + 18 * + col2 FROM tab0 AS cor0
----
1476
18
594

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * - col1 + - col1 * 9 col1 FROM tab0 AS cor0
----
6622
7462
8536

query I rowsort
SELECT DISTINCT 54 + cor0.col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
64
67
80

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-16
SELECT col2 DIV - col1 + 14 FROM tab2 AS cor0
----
12
14
14

skipif mysql # not compatible
query I rowsort label-16
SELECT col2 / - col1 + 14 FROM tab2 AS cor0
----
12
14
14

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

query I rowsort
SELECT DISTINCT 44 * col2 FROM tab1
----
2376
2508
4224

query I rowsort
SELECT col1 + col0 * col0 * + 4 AS col2 FROM tab0
----
2390
31775
4997

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

query I rowsort
SELECT ALL 54 * col1 FROM tab1 cor0
----
1404
540
702

query I rowsort
SELECT - 86 * + col0 * col0 + - ( 22 ) FROM tab2 AS cor0
----
-4236
-523246
-536748

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-26
SELECT ALL + 78 * - col2 - col2 DIV 63 FROM tab1 cor0
----
-4212
-4446
-7489

skipif mysql # not compatible
query I rowsort label-26
SELECT ALL + 78 * - col2 - col2 / 63 FROM tab1 cor0
----
-4212
-4446
-7489

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-28
SELECT DISTINCT - ( + col0 ) DIV col0 + + 96 + col1 * + col0 FROM tab0 AS cor0
----
2159
3490
8194

skipif mysql # not compatible
query I rowsort label-28
SELECT DISTINCT - ( + col0 ) / col0 + + 96 + col1 * + col0 FROM tab0 AS cor0
----
2159
3490
8194

onlyif mysql # use DIV operator for integer division
query I rowsort label-29
SELECT DISTINCT tab1.col1 - + 47 DIV + col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-29
SELECT DISTINCT tab1.col1 - + 47 / + col2 FROM tab1
----
10
13
26

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

query I rowsort
SELECT - col1 + col1 + col0 AS col2 FROM tab2
----
7
78
79

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + 61 col0 FROM tab2
----
139
140
68

query I rowsort
SELECT DISTINCT - col2 * 0 - tab1.col1 * - col1 FROM tab1
----
100
169
676

query I rowsort
SELECT + - col0 + - col1 * - col0 * - 34 AS col1 FROM tab1 AS cor0
----
-21824
-2655
-35440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 - - 71 * col1 * - col0 col1 FROM tab2
----
-15414
-326820
-95432

query I rowsort
SELECT - tab0.col2 - - ( col2 * - col2 + 6 ) FROM tab0
----
-1116
-6800
4

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-39
SELECT + ( col0 ) + col0 DIV - col1 AS col1 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-39
SELECT + ( col0 ) + col0 / - col1 AS col1 FROM tab2 AS cor0
----
7
75
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-40
SELECT ALL col1 + + ( + col2 ) * + 19 * + col2 + - col2 DIV + 43 FROM tab2 AS cor0
----
12903
13882
27453

skipif mysql # not compatible
query I rowsort label-40
SELECT ALL col1 + + ( + col2 ) * + 19 * + col2 + - col2 / + 43 FROM tab2 AS cor0
----
12903
13882
27453

onlyif mysql # use DIV operator for integer division
query I rowsort label-41
SELECT DISTINCT - cor0.col1 * + col0 + col1 DIV cor0.col0 FROM tab2 AS cor0
----
-1343
-213
-4602

skipif mysql # not compatible
query I rowsort label-41
SELECT DISTINCT - cor0.col1 * + col0 + col1 / cor0.col0 FROM tab2 AS cor0
----
-1343
-213
-4602

query I rowsort
SELECT 71 * cor0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to f5a86f1c31aa425cec3174d68a2ecc19

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

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

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

query I rowsort
SELECT DISTINCT + 30 * + col2 * col0 + - cor0.col2 FROM tab1 AS cor0
----
109383
230304
4806

query I rowsort
SELECT - col0 * cor0.col0 + col2 * col0 * + 71 - cor0.col0 * - col1 AS col1 FROM tab0 AS cor0
----
4655
518336
57720

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

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

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

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

query I rowsort
SELECT cor0.col2 * + col2 + - col2 - col2 * + 58 FROM tab1 AS cor0
----
-114
-270
3552

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-53
SELECT ALL + + 85 DIV - tab1.col2 FROM tab0, tab2, tab1 AS cor0, tab1
----
81 values hashing to 5126313d4765c5364287d9d255e52040

skipif mysql # not compatible
query I rowsort label-53
SELECT ALL + + 85 / - tab1.col2 FROM tab0, tab2, tab1 AS cor0, tab1
----
81 values hashing to 5126313d4765c5364287d9d255e52040

query I rowsort
SELECT - 14 * col1 FROM tab2
----
-238
-434
-826

query I rowsort
SELECT DISTINCT 82 AS col0 FROM tab0
----
82

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

query I rowsort
SELECT ALL + col0 * ( 87 ) * col0 + + col2 FROM tab0 cor0
----
106576
50145
689209

query I rowsort
SELECT ALL + col2 * cor0.col0 - + 90 FROM tab0 AS cor0
----
-55
702
7208

query I rowsort
SELECT ALL col1 * 52 + col1 FROM tab2 AS cor0
----
1643
3127
901

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

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

query I rowsort
SELECT + 29 - col0 AS col0 FROM tab1
----
-35
-51
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-62
SELECT ALL + col1 + col0 DIV + col2 col2 FROM tab0
----
132
86
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-62
SELECT ALL + col1 + col0 / + col2 col2 FROM tab0
----
132
86
92

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

query I rowsort
SELECT ALL - 69 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 3bd7460efa48c66c072ad5f3c2def7e9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + - col0 col2 FROM tab1 AS cor0
----
-7
16
51

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

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

query I rowsort
SELECT ALL + - col1 * col2 + 11 - col0 AS col2 FROM tab2 AS cor0
----
-1601
-714
-833

query I rowsort
SELECT - col2 * 85 AS col1 FROM tab0 AS cor0
----
-2805
-6970
-85

query I rowsort
SELECT DISTINCT + col1 + - col2 * + col2 - + col0 AS col0 FROM tab0
----
-1027
-6722
61

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

query I rowsort
SELECT col1 * - col2 * - col2 + col2 FROM tab0 AS cor0
----
611966
93687
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-72
SELECT CAST( - ( col2 ) AS SIGNED ) * - ( - 77 ) + col0 AS col2 FROM tab2 AS cor0
----
-1924
-2072
-2847

skipif mysql # not compatible
query I rowsort label-72
SELECT CAST ( - ( col2 ) AS INTEGER ) * - ( - 77 ) + col0 AS col2 FROM tab2 AS cor0
----
-1924
-2072
-2847

query I rowsort
SELECT 6 * ( col2 ) * col2 + + 23 * - col2 AS col0 FROM tab2 AS cor0
----
3458
3753
7790

onlyif mysql # use DIV operator for integer division
query I rowsort label-74
SELECT 83 DIV col2 + + col0 col0 FROM tab0 AS cor0
----
118
26
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-74
SELECT 83 / col2 + + col0 col0 FROM tab0 AS cor0
----
118
26
90

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 20 * - col0 + col0 + - 94 col2 FROM tab1 AS cor0
----
-31
1250
1586

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

query I rowsort
SELECT DISTINCT - + 94 + + col1 * + 51 AS col1 FROM tab2 AS cor0
----
1487
2915
773

query I rowsort
SELECT DISTINCT col0 * + tab1.col0 + + col1 FROM tab1
----
35
4106
6413

query I rowsort
SELECT ALL - 50 * - 67 AS col1 FROM tab2
----
3350
3350
3350

query I rowsort
SELECT 45 * col0 FROM tab0
----
1080
1575
4005

onlyif mysql # use DIV operator for integer division
query I rowsort label-82
SELECT - col2 * col2 + + col1 + col1 DIV - col1 FROM tab2 AS cor0
----
-1428
-618
-699

skipif mysql # not compatible
query I rowsort label-82
SELECT - col2 * col2 + + col1 + col1 / - col1 FROM tab2 AS cor0
----
-1428
-618
-699

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-84
SELECT cor0.col0 DIV col0 + col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-84
SELECT cor0.col0 / col0 + col0 FROM tab1 AS cor0
----
4
65
81

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

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

skipif mysql # not compatible
query I rowsort label-86
SELECT DISTINCT col2 / - col1 FROM tab0 cor0
----
0

query I rowsort
SELECT ALL 6 * col2 * cor0.col0 + col1 FROM tab1 AS cor0
----
21898
46093
998

query I rowsort
SELECT ALL - 39 * col1 + - cor0.col1 FROM tab2 AS cor0
----
-1240
-2360
-680

query I rowsort
SELECT + 70 + 67 * - col2 AS col0 FROM tab0 AS cor0
----
-2141
-5424
3

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

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

query I rowsort
SELECT + col0 + ( col2 ) * col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT col2 + + col0 * - 81 * col0 FROM tab1
----
-331719
-518304
-675

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

query I rowsort
SELECT + ( + 97 ) + col1 AS col2 FROM tab0 cor0
----
183
188
194

query I rowsort
SELECT DISTINCT 97 - - 55 AS col0 FROM tab1 AS cor0
----
152

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

query I rowsort
SELECT - 8 * 54 FROM tab0 AS cor0
----
-432
-432
-432

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

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

skipif mysql # not compatible
query I rowsort label-100
SELECT ALL CAST ( NULL AS REAL ) * col1 FROM tab1
----
NULL
NULL
NULL

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-102
SELECT DISTINCT col2 + + 48 DIV - 23 col1 FROM tab0 AS cor0
----
-1
31
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-102
SELECT DISTINCT col2 + + 48 / - 23 col1 FROM tab0 AS cor0
----
-1
31
80

query I rowsort
SELECT + cor0.col1 * - cor0.col1 * col2 + cor0.col1 FROM tab0 AS cor0
----
-243982
-678951
-9312

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

query I rowsort
SELECT DISTINCT + + col2 + 24 FROM tab0 AS cor0
----
106
25
57

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

query I rowsort
SELECT + col0 * 76 + - 24 FROM tab0 AS cor0
----
1800
2636
6740

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - col0 col1 FROM tab1
----
-7
16
51

query I rowsort
SELECT ALL - col2 * 64 + + tab0.col2 FROM tab0
----
-2079
-5166
-63

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

query I rowsort
SELECT cor0.col0 * + 30 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 2ffe9792cd89b46c1761ee9ceb5c7dd0

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-115
SELECT ALL col0 DIV - 88 + col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-115
SELECT ALL col0 / - 88 + col1 FROM tab2
----
17
31
59

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

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

query I rowsort
SELECT + - 4 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

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

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

query I rowsort
SELECT + tab2.col0 * - 36 FROM tab2
----
-252
-2808
-2844

onlyif mysql # use DIV operator for integer division
query I rowsort label-121
SELECT DISTINCT - tab2.col1 * - col1 + - 96 * col1 + 98 DIV + col0 col2 FROM tab2
----
-1342
-2001
-2182

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-121
SELECT DISTINCT - tab2.col1 * - col1 + - 96 * col1 + 98 / + col0 col2 FROM tab2
----
-1342
-2001
-2182

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

skipif mysql # not compatible
query I rowsort label-122
SELECT col0 / ( - tab0.col0 ) FROM tab0
----
-1
-1
-1

query I rowsort
SELECT - cor1.col1 * cor1.col1 AS col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 38f503ad6f93db2d1a70a8c95bb8c2c2

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-125
SELECT DISTINCT + col1 DIV + 18 AS col0 FROM tab0 cor0
----
4
5

skipif mysql # not compatible
query I rowsort label-125
SELECT DISTINCT + col1 / + 18 AS col0 FROM tab0 cor0
----
4
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - 9 col1 FROM tab2 AS cor0
----
234
243
342

query I rowsort
SELECT - + 55 AS col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to b90e74bece5521b514096c5b6e105fde

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 57 * - col1 * ( col1 ) col1 FROM tab2
----
-16473
-198417
-54777

query I rowsort
SELECT DISTINCT + + 46 FROM tab1 cor0
----
46

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

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

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

query I rowsort
SELECT + - col1 * 23 + 21 AS col1 FROM tab1 AS cor0
----
-209
-278
-577

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

query I rowsort
SELECT DISTINCT - - col1 + + 33 AS col0 FROM tab1 AS cor0
----
43
46
59

query I rowsort
SELECT + - col2 * + col2 - col0 * - col0 * - col2 AS col2 FROM tab2 AS cor0
----
-158860
-2052
-238602

query I rowsort
SELECT col1 + - 62 * cor0.col0 - col2 FROM tab1 AS cor0
----
-214
-4015
-5043

skipif mysql # not compatible
query I rowsort
SELECT col1 + CAST ( + col2 AS REAL ) - col0 / + ( + 93 ) FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + 77 col0 FROM tab0 AS cor0
----
101
112
166

query I rowsort
SELECT - col0 * + col2 * 79 + ( - col0 ) AS col2 FROM tab2
----
-14938
-160290
-237237

query I rowsort
SELECT 62 * col0 + col1 * col0 AS col0 FROM tab1
----
264
4608
6000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 ) + - 31 * 25 col0 FROM tab2
----
-716
-744
-758

query I rowsort
SELECT - col1 * 82 + + col0 * col0 FROM tab2 AS cor0
----
-2493
1246
4847

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

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

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

query I rowsort
SELECT DISTINCT 22 * - col0 FROM tab2
----
-154
-1716
-1738

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

query I rowsort
SELECT + 50 * + col1 + ( 64 ) AS col1 FROM tab1 AS cor0
----
1364
564
714

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-151
SELECT - - col2 / + ( + col2 ) col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT + - col0 * col2 * ( col2 ) FROM tab1 cor0
----
-207936
-737280
-8748

query I rowsort
SELECT - - col1 * ( 36 ) FROM tab2 AS cor0
----
1116
2124
612

onlyif mysql # use DIV operator for integer division
query I rowsort label-154
SELECT col2 + - col1 * col1 DIV col2 FROM tab0 AS cor0
----
-18
-191
-9408

skipif mysql # not compatible
query I rowsort label-154
SELECT col2 + - col1 * col1 / col2 FROM tab0 AS cor0
----
-18
-191
-9408

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-159
SELECT + col0 * - CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
-189
-2028
-3002

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

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL BETWEEN ( tab1.col0 ) AND NULL
----

query I rowsort
SELECT ALL + tab2.col0 + + col1 + + col2 * tab2.col2 * + col2 FROM tab2
----
17713
19721
54968

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

query I rowsort
SELECT ALL + col1 + col2 + - col2 * + tab1.col1 AS col2 FROM tab1
----
-1139
-1324
-503

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL IN ( - col2 / + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col2 * + col1 + - tab1.col2 col2 FROM tab1
----
-119904
-32547
-75870

query I rowsort
SELECT tab2.col0 + col2 + tab2.col1 * col2 FROM tab2
----
1638
763
871

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

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

query I rowsort
SELECT + tab2.col0 * - col0 * tab2.col2 AS col1 FROM tab2
----
-1323
-158184
-237158

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

query I rowsort
SELECT DISTINCT + col2 * - col2 + col0 FROM tab1
----
-2913
-3185
-9136

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

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

query I rowsort
SELECT col0 * col2 * - col0 - + tab2.col1 AS col0 FROM tab2
----
-1354
-158243
-237175

query I rowsort
SELECT ALL - col2 + - col2 + col2 * + col2 FROM tab1
----
2808
3135
9024

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

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

query I rowsort
SELECT ALL - col0 * col2 + col0 * - col2 * col2 AS col1 FROM tab1
----
-211584
-744960
-8910

query I rowsort
SELECT - col2 * col2 * col0 + col0 * - tab2.col1 AS col0 FROM tab2
----
-115419
-5320
-57330

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

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

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

query I rowsort
SELECT col2 AS col0 FROM tab2 WHERE NOT ( col1 * col2 ) <> ( NULL )
----

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

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 WHERE NOT ( col2 ) NOT BETWEEN col1 AND - col0
----

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

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

query I rowsort
SELECT DISTINCT - col0 * + col2 + - 42 FROM tab1 cor0
----
-204
-3690
-7722

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

query I rowsort
SELECT 32 * col2 FROM tab2
----
1216
832
864

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 15 col2 FROM tab1
----
15

onlyif mysql # use DIV operator for integer division
query I rowsort label-193
SELECT - tab0.col1 DIV 45 FROM tab0
----
-1
-2
-2

skipif mysql # not compatible
query I rowsort label-193
SELECT - tab0.col1 / 45 FROM tab0
----
-1
-2
-2

query I rowsort
SELECT ALL 42 FROM tab2 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT + 58 + + cor0.col1 * 84 AS col0 FROM tab2 AS cor0
----
1486
2662
5014

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

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

query I rowsort
SELECT + - 38 + - 96 FROM tab2 cor0
----
-134
-134
-134

query I rowsort
SELECT 89 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 CROSS JOIN tab1, tab2 cor1, tab1 AS cor2
----
972 values hashing to 4c0813b2179303fdf58f082d81d6d03c

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

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

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

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

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

query I rowsort
SELECT + - col2 * 44 + col0 FROM tab1 AS cor0
----
-2373
-2444
-4144

query I rowsort
SELECT + 71 AS col1 FROM tab2, tab1 cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 39b7515708f32e28b7b5a1bfec0df356

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-213
SELECT tab1.col1 + + col1 * col2 DIV col2 + col0 DIV col1 FROM tab1
----
26
32
52

skipif mysql # not compatible
query I rowsort label-213
SELECT tab1.col1 + + col1 * col2 / col2 + col0 / col1 FROM tab1
----
26
32
52

query I rowsort
SELECT DISTINCT + tab2.col2 + col1 * + col1 * col2 FROM tab2
----
11020
25974
90532

query I rowsort
SELECT 48 + col0 * - col2 * - col0 AS col0 FROM tab0 AS cor0
----
1273
19056
649570

query I rowsort
SELECT DISTINCT + 24 + + cor0.col2 * - col0 AS col2 FROM tab0 AS cor0
----
-11
-7274
-768

query I rowsort
SELECT + 95 + col2 + col2 FROM tab1 cor0
----
203
209
287

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col1 - col2 col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - 23 * col0 AS col2 FROM tab2 AS cor0
----
-161
-1794
-1817

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 36 + + cor0.col0 col0 FROM tab2 cor0
----
-29
42
43

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

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

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

query IIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 WHERE NULL NOT BETWEEN NULL AND NULL
----

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-226
SELECT DISTINCT - 39 DIV 49 - cor0.col0 DIV - col0 AS col2 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-226
SELECT DISTINCT - 39 / 49 - cor0.col0 / - col0 AS col2 FROM tab0 AS cor0
----
1

query I rowsort
SELECT ALL 55 * 3 FROM tab0 AS cor0
----
165
165
165

query I rowsort
SELECT ALL + + 56 * + 91 FROM tab2 AS cor0
----
5096
5096
5096

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

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

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

query I rowsort
SELECT + tab2.col1 * + 69 + tab2.col1 + + col1 AS col0 FROM tab2
----
1207
2201
4189

query I rowsort
SELECT - 31 * tab2.col0 + + tab2.col0 FROM tab2
----
-210
-2340
-2370

query I rowsort
SELECT DISTINCT 90 * - 62 - - col2 AS col1 FROM tab1
----
-5484
-5523
-5526

query I rowsort
SELECT DISTINCT - 45 - + 96 * col0 AS col0 FROM tab0
----
-2349
-3405
-8589

query I rowsort
SELECT - ( - col0 ) + + col2 + col0 AS col2 FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT ALL - col2 * + col1 * cor0.col2 + - col0 AS col0 FROM tab0 AS cor0
----
-132
-611973
-93678

query I rowsort
SELECT DISTINCT ( 83 * col2 ) - - col2 * + col0 FROM tab1
----
15648
4644
8379

query I rowsort
SELECT DISTINCT + col1 - 98 AS col1 FROM tab2
----
-39
-67
-81

query I rowsort
SELECT ALL col2 + 46 * col1 AS col1 FROM tab1
----
1250
517
694

query I rowsort
SELECT - 12 * col0 - col1 * col0 FROM tab0 AS cor0
----
-2352
-3815
-9167

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

query I rowsort
SELECT + 20 * - col1 AS col2 FROM tab1
----
-200
-260
-520

onlyif mysql # use DIV operator for integer division
query I rowsort label-243
SELECT CAST( - 87 AS SIGNED ) DIV - col1 FROM tab2
----
1
2
5

skipif mysql # not compatible
query I rowsort label-243
SELECT CAST ( - 87 AS INTEGER ) / - col1 FROM tab2
----
1
2
5

query I rowsort
SELECT DISTINCT col1 * + col2 * col2 + - col0 AS col2 FROM tab2
----
22592
24469
39806

onlyif mysql # use DIV operator for integer division
query I rowsort label-245
SELECT + col2 DIV + col1 - - col1 * - col1 AS col1 FROM tab2
----
-287
-3481
-961

skipif mysql # not compatible
query I rowsort label-245
SELECT + col2 / + col1 - - col1 * - col1 AS col1 FROM tab2
----
-287
-3481
-961

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

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

query I rowsort
SELECT - col2 * - col2 * col1 - - col0 * + col0 FROM tab2
----
22648
30789
45968

onlyif mysql # use DIV operator for integer division
query I rowsort label-249
SELECT + col1 DIV col0 + - col0 FROM tab1
----
-64
-80
5

skipif mysql # not compatible
query I rowsort label-249
SELECT + col1 / col0 + - col0 FROM tab1
----
-64
-80
5

query I rowsort
SELECT + col2 + col1 AS col0 FROM tab0 WHERE NOT NULL >= col1
----

query I rowsort
SELECT DISTINCT col2 * cor0.col2 * col2 + + col1 * - col0 * col0 AS col2 FROM tab1 AS cor0
----
144233
157230
801536

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

query I rowsort
SELECT + col1 * + col0 + col2 * col0 * + col0 AS col0 FROM tab2
----
1540
162786
238501

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-255
SELECT DISTINCT col0 * col1 DIV + col1 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-255
SELECT DISTINCT col0 * col1 / + col1 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT col2 * - col1 * - col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT col1 + + col2 * - col2 FROM tab1 cor0
----
-2890
-3239
-9203

query I rowsort
SELECT + cor0.col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 7786718bd8042022537378d40ec87475

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

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( - cor0.col0 AS REAL ) + - col1 * col1 AS col1 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT - col0 * + 94 * col0 + cor0.col1 * + 75 AS col1 FROM tab2 AS cor0
----
-2281
-567471
-585379

query I rowsort
SELECT ALL - 39 * + col0 + + cor0.col1 AS col1 FROM tab1 AS cor0
----
-2486
-3107
-91

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 61 + col2 col0 FROM tab1 AS cor0
----
115
118
157

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-270
SELECT + col0 DIV col2 + + col2 * col1 FROM tab0
----
132
2838
7463

skipif mysql # not compatible
query I rowsort label-270
SELECT + col0 / col2 + + col2 * col1 FROM tab0
----
132
2838
7463

query I rowsort
SELECT DISTINCT + 24 + - col1 AS col0 FROM tab2
----
-35
-7
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-272
SELECT ALL - col2 + + ( col0 + col2 ) DIV - 50 FROM tab2
----
-27
-28
-40

skipif mysql # not compatible
query I rowsort label-272
SELECT ALL - col2 + + ( col0 + col2 ) / - 50 FROM tab2
----
-27
-28
-40

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

query I rowsort
SELECT + + ( - col1 ) + col0 * - ( + 54 ) FROM tab1 AS cor0
----
-188
-3466
-4333

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

query I rowsort
SELECT ALL + 3 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 3e22859a313d85a6146c6df5f23d77cf

query I rowsort
SELECT + + 77 + - col2 AS col2 FROM tab0 AS cor0
----
-5
44
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col0 + ( - col2 ) * + 49 col2 FROM tab0 AS cor0
----
3346
4081
447

query I rowsort
SELECT - - cor0.col0 * - col1 + + 64 FROM tab2 AS cor0
----
-1279
-153
-4538

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

query I rowsort
SELECT - + col2 + - 57 * + cor0.col2 * - col2 FROM tab0 AS cor0
----
383186
56
62040

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

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

query I rowsort
SELECT - cor0.col2 + + 5 * cor0.col2 FROM tab1 AS cor0
----
216
228
384

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

query I rowsort
SELECT ALL + col1 * - tab2.col2 + + 84 AS col2 FROM tab2
----
-1450
-562
-753

onlyif mysql # use DIV operator for integer division
query I rowsort label-287
SELECT ALL - tab2.col0 DIV + tab2.col1 + - col0 * 24 AS col2 FROM tab2
----
-168
-1873
-1900

skipif mysql # not compatible
query I rowsort label-287
SELECT ALL - tab2.col0 / + tab2.col1 + - col0 * 24 AS col2 FROM tab2
----
-168
-1873
-1900

query I rowsort
SELECT - col1 * 66 FROM tab1 AS cor0
----
-1716
-660
-858

onlyif mysql # use DIV operator for integer division
query I rowsort label-289
SELECT + col2 DIV 95 + + 93 - col1 FROM tab0 AS cor0
----
-4
2
7

skipif mysql # not compatible
query I rowsort label-289
SELECT + col2 / 95 + + 93 - col1 FROM tab0 AS cor0
----
-4
2
7

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

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

query I rowsort
SELECT + + col1 + + col0 * col1 * - col2 FROM tab2 AS cor0
----
-119593
-51017
-5828

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

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

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

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

query I rowsort
SELECT DISTINCT - col2 * ( + 60 ) AS col0 FROM tab2 AS cor0
----
-1560
-1620
-2280

query I rowsort
SELECT + - col2 + - 23 AS col2 FROM tab2 AS cor0
----
-49
-50
-61

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

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

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

query I rowsort
SELECT DISTINCT ( 38 ) FROM tab1 AS cor0
----
38

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

query I rowsort
SELECT - cor0.col0 * 77 + col0 AS col1 FROM tab0 cor0
----
-1824
-2660
-6764

query I rowsort
SELECT DISTINCT - 65 * + 73 AS col0 FROM tab1 AS cor0
----
-4745

query I rowsort
SELECT ALL + 42 AS col1 FROM tab0 AS cor0
----
42
42
42

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

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

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

query I rowsort
SELECT ALL + - 82 + - 10 FROM tab0 AS cor0
----
-92
-92
-92

query I rowsort
SELECT DISTINCT col2 * + 28 * - col2 - + tab0.col1 AS col0 FROM tab0
----
-125
-188363
-30578

onlyif mysql # use DIV operator for integer division
query I rowsort label-310
SELECT + col2 + CAST( 32 AS SIGNED ) * col0 DIV - 29 AS col1 FROM tab0
----
-16
-37
7

skipif mysql # not compatible
query I rowsort label-310
SELECT + col2 + CAST ( 32 AS INTEGER ) * col0 / - 29 AS col1 FROM tab0
----
-16
-37
7

query I rowsort
SELECT DISTINCT - col0 * 14 - col2 AS col0 FROM tab0
----
-1328
-369
-491

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

query I rowsort
SELECT ALL - 53 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 2876418587c77a182d88db2907b0a51a

query I rowsort
SELECT DISTINCT + col2 * - ( - 61 ) - - col1 FROM tab1
----
3320
3487
5869

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

query I rowsort
SELECT DISTINCT - - cor0.col1 * col2 + col2 + col0 * col1 FROM tab1 AS cor0
----
1267
1536
2384

query I rowsort
SELECT - 82 * + col2 FROM tab1 AS cor0
----
-4428
-4674
-7872

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

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

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

query I rowsort
SELECT DISTINCT 56 * col1 * + col2 AS col2 FROM tab0
----
158928
417872
5432

query I rowsort
SELECT ALL + col2 + - col2 * + 92 + cor0.col2 AS col2 FROM tab1 AS cor0
----
-4860
-5130
-8640

query I rowsort
SELECT DISTINCT - 26 * - col2 FROM tab2 AS cor0
----
676
702
988

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-327
SELECT + cor0.col2 / 95 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 * ( 73 ) FROM tab1 AS cor0
----
-1898
-730
-949

onlyif mysql # use DIV operator for integer division
query I rowsort label-329
SELECT ( - col1 ) DIV + tab0.col2 AS col1 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-329
SELECT ( - col1 ) / + tab0.col2 AS col1 FROM tab0
----
-1
-2
-97

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

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

query I rowsort
SELECT tab1.col2 * 64 FROM tab1
----
3456
3648
6144

query I rowsort
SELECT - 22 * col2 + col2 + - col1 FROM tab0
----
-118
-1813
-779

query I rowsort
SELECT DISTINCT - 7 - col0 AS col2 FROM tab2
----
-14
-85
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-334
SELECT DISTINCT + - 50 * ( col0 ) + - CAST( + 68 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1268
-1818
-4518

skipif mysql # not compatible
query I rowsort label-334
SELECT DISTINCT + - 50 * ( col0 ) + - CAST ( + 68 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1268
-1818
-4518

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

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

query I rowsort
SELECT ALL - col2 * col0 + - 57 + - col0 * + col0 FROM tab0 AS cor0
----
-1317
-1425
-15276

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

query I rowsort
SELECT ALL - 93 + col0 FROM tab1 AS cor0
----
-13
-29
-90

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-341
SELECT DISTINCT + col1 * col1 + col1 - col0 DIV col0 col1 FROM tab0 AS cor0
----
7481
8371
9505

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-341
SELECT DISTINCT + col1 * col1 + col1 - col0 / col0 col1 FROM tab0 AS cor0
----
7481
8371
9505

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-343
SELECT + - col1 + - col2 DIV - ( + 86 ) - - col2 AS col2 FROM tab0 cor0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-343
SELECT + - col1 + - col2 / - ( + 86 ) - - col2 AS col2 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + + 16 FROM tab1 cor0
----
16

query I rowsort
SELECT DISTINCT - 81 * col2 * col0 FROM tab1 AS cor0
----
-13122
-295488
-622080

query I rowsort
SELECT - 50 * col1 + - col2 AS col2 FROM tab1 AS cor0
----
-1354
-557
-746

query I rowsort
SELECT tab0.col1 + 43 FROM tab0
----
129
134
140

query I rowsort
SELECT col1 * - 73 AS col2 FROM tab0 AS cor0
----
-6278
-6643
-7081

query I rowsort
SELECT col1 * 25 AS col0 FROM tab1 cor0
----
250
325
650

query I rowsort
SELECT DISTINCT - + col0 * 14 FROM tab2 AS cor0
----
-1092
-1106
-98

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * - 91 * cor0.col1 col2 FROM tab1 AS cor0
----
-113568
-127764
-51870

onlyif mysql # use DIV operator for integer division
query I rowsort label-353
SELECT - cor0.col1 + + 55 DIV - 10 FROM tab0 AS cor0
----
-102
-91
-96

skipif mysql # not compatible
query I rowsort label-353
SELECT - cor0.col1 + + 55 / - 10 FROM tab0 AS cor0
----
-102
-91
-96

query I rowsort
SELECT DISTINCT - + cor0.col2 + - 37 FROM tab0 AS cor0
----
-119
-38
-70

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

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

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

query I rowsort
SELECT DISTINCT + 65 * + cor0.col2 FROM tab0 AS cor0
----
2145
5330
65

query I rowsort
SELECT DISTINCT 4 * 8 - col2 FROM tab1 AS cor0
----
-22
-25
-64

query I rowsort
SELECT ALL - 92 * + col1 - + col0 AS col1 FROM tab0 cor0
----
-7936
-8461
-8959

query I rowsort
SELECT + col2 + - 5 * col1 AS col1 FROM tab0 AS cor0
----
-373
-397
-484

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

skipif mysql # not compatible
query I rowsort label-361
SELECT - - ( cor0.col0 ) / col2 FROM tab0 AS cor0
----
0
1
35

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

query I rowsort
SELECT ALL - 31 * + col2 AS col0 FROM tab2 AS cor0
----
-1178
-806
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-364
SELECT - - CAST( col2 AS SIGNED ) * col2 DIV cor0.col1 AS col0 FROM tab2 AS cor0
----
11
23
84

skipif mysql # not compatible
query I rowsort label-364
SELECT - - CAST ( col2 AS INTEGER ) * col2 / cor0.col1 AS col0 FROM tab2 AS cor0
----
11
23
84

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

query I rowsort
SELECT - 90 * cor0.col2 AS col2 FROM tab1 AS cor0
----
-4860
-5130
-8640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( - 17 ) * - col2 col1 FROM tab2 AS cor0
----
-442
-459
-646

query I rowsort
SELECT - col0 + 38 AS col2 FROM tab2 AS cor0
----
-40
-41
31

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

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col2 * CAST ( col2 AS REAL ) + col1 AS col2 FROM tab2 cor0
----
1461
735
760

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

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

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

query I rowsort
SELECT - 14 * - col1 FROM tab0
----
1204
1274
1358

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

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

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

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

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

query I rowsort
SELECT ALL 21 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

onlyif mysql # use DIV operator for integer division
query I rowsort label-379
SELECT DISTINCT col1 DIV CAST( col1 AS SIGNED ) AS col2 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-379
SELECT DISTINCT col1 / CAST ( col1 AS INTEGER ) AS col2 FROM tab1
----
1

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

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

query I rowsort
SELECT - col1 * - 2 AS col2 FROM tab2
----
118
34
62

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-384
SELECT DISTINCT 9 DIV - tab0.col2 FROM tab0
----
-9
0

skipif mysql # not compatible
query I rowsort label-384
SELECT DISTINCT 9 / - tab0.col2 FROM tab0
----
-9
0

query I rowsort
SELECT 66 * col2 * + col0 AS col2 FROM tab0
----
2310
481668
52272

query I rowsort
SELECT - 57 * col0 FROM tab0
----
-1368
-1995
-5073

query I rowsort
SELECT ALL - col0 - col0 * tab1.col0 AS col0 FROM tab1
----
-12
-4160
-6480

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

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

query I rowsort
SELECT DISTINCT ( col1 ) * + 34 - tab0.col1 * col0 FROM tab0
----
-5005
-97
860

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

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

query I rowsort
SELECT + 27 + 92 * + col2 * 64 AS col1 FROM tab0 AS cor0
----
194331
482843
5915

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 + - tab1.col0 col1 FROM tab1
----
-7
16
51

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-396
SELECT DISTINCT - 17 DIV col2 FROM tab0
----
-17
0

skipif mysql # not compatible
query I rowsort label-396
SELECT DISTINCT - 17 / col2 FROM tab0
----
-17
0

query I rowsort
SELECT ( - 39 ) AS col1 FROM tab2 AS cor0
----
-39
-39
-39

query I rowsort
SELECT + tab2.col1 + + 11 AS col0 FROM tab2
----
28
42
70

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

query I rowsort
SELECT 35 * col0 + col0 FROM tab0 AS cor0
----
1260
3204
864

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

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

skipif mysql # not compatible
query I rowsort label-402
SELECT DISTINCT + - ( col0 ) * CAST ( col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT 43 + col2 FROM tab0
----
125
44
76

query I rowsort
SELECT ALL - + 1 * + col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL + 41 + col2 + cor0.col0 FROM tab0 AS cor0
----
212
77
98

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

query I rowsort
SELECT ALL - 56 + - col2 * col2 AS col2 FROM tab2 AS cor0
----
-1500
-732
-785

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

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

query I rowsort
SELECT ALL + col1 * col1 * - col1 - - col2 AS col2 FROM tab2 AS cor0
----
-205353
-29764
-4875

query I rowsort
SELECT col2 - 23 * + col1 FROM tab0
----
-1945
-2011
-2230

query I rowsort
SELECT + col0 + + 53 FROM tab2
----
131
132
60

query I rowsort
SELECT DISTINCT - col0 + - 17 FROM tab0
----
-106
-41
-52

query I rowsort
SELECT DISTINCT col2 + 69 * col0 FROM tab1 AS cor0
----
261
4473
5616

query I rowsort
SELECT - col0 + - 49 + col0 * col1 AS col2 FROM tab0 AS cor0
----
1991
3311
7961

query I rowsort
SELECT ALL + col0 * 52 AS col2 FROM tab1 AS cor0
----
156
3328
4160

query I rowsort
SELECT - + col0 * + 25 + 42 + col0 AS col2 FROM tab1 AS cor0
----
-1494
-1878
-30

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

query I rowsort
SELECT + col0 + col0 * 87 + col2 * col2 FROM tab0 AS cor0
----
14556
3081
3201

query I rowsort
SELECT ALL col0 + - col1 * col2 * - 37 FROM tab2 AS cor0
----
23981
30976
56836

query I rowsort
SELECT ALL + + 89 AS col2 FROM tab2 AS cor0
----
89
89
89

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

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

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

query I rowsort
SELECT DISTINCT - + col2 * + col0 + 34 * - col0 AS col1 FROM tab2 AS cor0
----
-427
-4680
-5688

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

query I rowsort
SELECT ALL + col0 * - 58 * col2 + col0 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-11151
-119652
-177118

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

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

query I rowsort
SELECT 28 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

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

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

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

query I rowsort
SELECT ALL - col2 * + 78 + col1 * col1 FROM tab1 AS cor0
----
-3536
-4346
-7319

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

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

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

query I rowsort
SELECT DISTINCT - 15 + + col2 FROM tab0
----
-14
18
67

query I rowsort
SELECT 91 * - col2 + col1 * - col1 FROM tab0 AS cor0
----
-10399
-15743
-9500

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + cor0.col1 * - col2 col0 FROM tab2 AS cor0
----
-1456
-567
-830

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

query I rowsort
SELECT ALL - + ( cor0.col1 ) AS col1 FROM tab2, tab2 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to b7a1b38fe8e4f34388e3be1f52601ae5

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

query I rowsort
SELECT DISTINCT - - ( col1 ) + - 61 FROM tab1 AS cor0
----
-35
-48
-51

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

query I rowsort
SELECT ALL - 97 * col0 - + col1 AS col2 FROM tab0 cor0
----
-2414
-3492
-8724

onlyif mysql # use DIV operator for integer division
query I rowsort label-446
SELECT ALL + + 57 * - col0 - + ( + col1 ) DIV - col0 FROM tab2 AS cor0
----
-395
-4446
-4503

skipif mysql # not compatible
query I rowsort label-446
SELECT ALL + + 57 * - col0 - + ( + col1 ) / - col0 FROM tab2 AS cor0
----
-395
-4446
-4503

query IIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 WHERE NOT ( NULL ) <> ( NULL )
----

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

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

query I rowsort
SELECT DISTINCT - col0 * col0 + + ( ( col2 ) ) + - col0 FROM tab2 AS cor0
----
-29
-6136
-6282

query I rowsort
SELECT 76 + col1 + 78 * + 90 FROM tab1 AS cor0
----
7106
7109
7122

query I rowsort
SELECT + col2 * col1 + - col2 * col2 FROM tab0 AS cor0
----
1749
738
96

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

query I rowsort
SELECT - + col0 * - col2 + + col0 * col1 + - col2 * + 6 AS col1 FROM tab2 AS cor0
----
244
4117
6474

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

query I rowsort
SELECT ALL col1 + cor0.col2 * col1 * 70 FROM tab0 AS cor0
----
198746
522431
6887

query I rowsort
SELECT col0 + 47 * col2 + cor0.col0 FROM tab2 AS cor0
----
1283
1378
1944

onlyif mysql # use DIV operator for integer division
query I rowsort label-458
SELECT + col1 + + 48 DIV - 47 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-458
SELECT + col1 + + 48 / - 47 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT 11 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

query I rowsort
SELECT DISTINCT - 21 * cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-1239
-357
-651

onlyif mysql # use DIV operator for integer division
query I rowsort label-461
SELECT - cor0.col1 * + ( col2 * cor0.col1 ) + - col1 DIV + col0 AS col1 FROM tab0 AS cor0
----
-244071
-679043
-9411

skipif mysql # not compatible
query I rowsort label-461
SELECT - cor0.col1 * + ( col2 * cor0.col1 ) + - col1 / + col0 AS col1 FROM tab0 AS cor0
----
-244071
-679043
-9411

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

skipif mysql # not compatible
query I rowsort label-462
SELECT ALL 87 / col0 AS col1 FROM tab2 cor0
----
1
1
12

query I rowsort
SELECT 79 * col1 - col0 FROM tab1 cor0
----
2051
726
947

query I rowsort
SELECT DISTINCT - + col1 * ( - col0 + + col2 * col0 ) AS col0 FROM tab0 cor0
----
-656019
-66048
0

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

query I rowsort
SELECT DISTINCT 17 * col1 AS col0 FROM tab0 AS cor0
----
1462
1547
1649

query I rowsort
SELECT ( + col0 ) + col0 * - col0 * 10 FROM tab1 AS cor0
----
-40896
-63920
-87

query I rowsort
SELECT - 2 + - col1 AS col1 FROM tab2 AS cor0
----
-19
-33
-61

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 + col0 + - col2 col2 FROM tab1
----
-25
-3
17

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

query I rowsort
SELECT ALL col0 * + 11 + col1 FROM tab2
----
108
886
917

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

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

query I rowsort
SELECT - 30 * col1 + col0 + - col2 FROM tab0
----
-2589
-2723
-2876

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

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

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

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

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

query I rowsort
SELECT col0 - - col1 * - col2 * col0 FROM tab1
----
-36416
-4209
-99760

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

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab1 WHERE NOT ( NULL ) < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col1 col2 FROM tab0
----
172
182
194

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

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

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

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

query I rowsort
SELECT DISTINCT 13 * + col0 FROM tab1 AS cor0
----
1040
39
832

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

query IIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 WHERE NOT NULL > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-494
SELECT DISTINCT col0 * col1 + + cor0.col2 DIV cor0.col1 AS col2 FROM tab1 AS cor0
----
1047
645
80

skipif mysql # not compatible
query I rowsort label-494
SELECT DISTINCT col0 * col1 + + cor0.col2 / cor0.col1 AS col2 FROM tab1 AS cor0
----
1047
645
80

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

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

query I rowsort
SELECT col0 - col0 * + tab1.col0 FROM tab1
----
-4032
-6
-6320

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT col0 * col0 - + tab0.col0 * tab0.col1 AS col0 FROM tab0
----
-1488
-178
-2170

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

query I rowsort
SELECT - ( + 16 ) * col2 FROM tab1 AS cor0
----
-1536
-864
-912

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

skipif mysql # not compatible
query I rowsort label-510
SELECT DISTINCT + CAST ( col1 AS INTEGER ) * - col0 + col1 * + col0 AS col1 FROM tab2 cor0
----
0

query I rowsort
SELECT DISTINCT + + col2 * 87 + - col2 AS col1 FROM tab1 AS cor0
----
4644
4902
8256

onlyif mysql # use DIV operator for integer division
query I rowsort label-512
SELECT DISTINCT 50 DIV col0 + cor0.col2 AS col0 FROM tab2 AS cor0
----
26
34
38

skipif mysql # not compatible
query I rowsort label-512
SELECT DISTINCT 50 / col0 + cor0.col2 AS col0 FROM tab2 AS cor0
----
26
34
38

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

query I rowsort
SELECT col2 * col0 - 51 AS col1 FROM tab1
----
111
3597
7629

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

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

query I rowsort
SELECT - ( col2 * col0 + 33 ) AS col2 FROM tab2
----
-2061
-222
-3035

query I rowsort
SELECT ALL - + 47 * + col0 AS col2 FROM tab2 AS cor0
----
-329
-3666
-3713

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

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

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

query I rowsort
SELECT 98 + + ( col0 ) AS col2 FROM tab2
----
105
176
177

query I rowsort
SELECT ALL + col1 + 49 * col2 + 48 AS col2 FROM tab2 AS cor0
----
1381
1402
1927

query I rowsort
SELECT ALL - 59 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 582c5aa5e5b4fc3f2ea27e7637992d1f

query I rowsort
SELECT + ( - col2 ) * 17 AS col2 FROM tab0
----
-1394
-17
-561

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-527
SELECT ALL - col1 * CAST( - col0 AS SIGNED ) + cor0.col0 * 90 * + col2 FROM tab1 cor0
----
14658
328960
692240

skipif mysql # not compatible
query I rowsort label-527
SELECT ALL - col1 * CAST ( - col0 AS INTEGER ) + cor0.col0 * 90 * + col2 FROM tab1 cor0
----
14658
328960
692240

query I rowsort
SELECT DISTINCT col2 + + col0 * + ( + col0 * - cor0.col2 ) AS col0 FROM tab1 AS cor0
----
-233415
-432
-614304

query I rowsort
SELECT 64 * - col2 AS col1 FROM tab0
----
-2112
-5248
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 - cor0.col2 col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + 33 - col2 FROM tab2
----
-5
6
7

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

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

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

query I rowsort
SELECT DISTINCT - col2 + col0 * 15 AS col0 FROM tab1
----
-9
1104
903

query I rowsort
SELECT + col1 + - 34 * col2 FROM tab2
----
-1275
-825
-887

query I rowsort
SELECT ALL - + col0 + - col2 * 44 AS col1 FROM tab1 AS cor0
----
-2379
-2572
-4304

query I rowsort
SELECT col2 * + 46 - - col1 * - col2 FROM tab0 AS cor0
----
-1320
-3690
-51

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

query I rowsort
SELECT DISTINCT + col1 * - 33 FROM tab2 AS cor0
----
-1023
-1947
-561

query I rowsort
SELECT col2 * - 60 FROM tab1 AS cor0
----
-3240
-3420
-5760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-541
SELECT ALL + - cor0.col2 * CAST( + col1 AS SIGNED ) + col0 * + 57 AS col0 FROM tab0 AS cor0
----
-1470
-2389
1898

skipif mysql # not compatible
query I rowsort label-541
SELECT ALL + - cor0.col2 * CAST ( + col1 AS INTEGER ) + col0 * + 57 AS col0 FROM tab0 AS cor0
----
-1470
-2389
1898

query I rowsort
SELECT ALL + col2 * + cor0.col0 + 13 FROM tab1 AS cor0
----
175
3661
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + 67 * 55 * col2 col0 FROM tab2 cor0
----
139992
95784
99468

query I rowsort
SELECT ALL cor0.col1 + ( + col2 * + cor0.col2 ) AS col1 FROM tab1 AS cor0
----
2942
3259
9229

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - cor0.col0 * - CAST ( + col0 AS REAL ) * - cor0.col0 AS col2 FROM tab1 cor0
----
-262144
-27
-512000

query I rowsort
SELECT + - col1 * 6 AS col2 FROM tab1 AS cor0
----
-156
-60
-78

query I rowsort
SELECT DISTINCT - col0 + 37 AS col2 FROM tab0 AS cor0
----
-52
13
2

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

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

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

skipif mysql # not compatible
query I rowsort label-550
SELECT DISTINCT CAST ( NULL AS REAL ) * 45 AS col2 FROM tab2
----
NULL

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

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

query I rowsort
SELECT + 22 + col2 AS col0 FROM tab0 AS cor0
----
104
23
55

query I rowsort
SELECT + cor0.col2 + 78 * col0 + + col1 FROM tab1 AS cor0
----
314
5059
6349

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

skipif mysql # not compatible
query I rowsort label-555
SELECT ALL + + CAST ( - 38 AS INTEGER ) FROM tab2 AS cor0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT + ( 51 ) + cor0.col2 * col0 AS col1 FROM tab0 AS cor0
----
7349
843
86

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

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

query I rowsort
SELECT - 86 + ( + col2 ) AS col0 FROM tab2 AS cor0
----
-48
-59
-60

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

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

query I rowsort
SELECT 3 * - col0 AS col0 FROM tab0
----
-105
-267
-72

query I rowsort
SELECT ALL tab0.col2 * 8 AS col1 FROM tab0
----
264
656
8

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

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

query I rowsort
SELECT DISTINCT - col1 + + 85 * col1 FROM tab2 cor0
----
1428
2604
4956

query I rowsort
SELECT ALL + + col1 * col2 + - 29 FROM tab1 AS cor0
----
1219
1375
541

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

query I rowsort
SELECT + cor0.col2 + col0 + + ( col2 ) FROM tab1 AS cor0
----
111
178
272

query I rowsort
SELECT DISTINCT - 43 * + col0 * - 63 - 56 * + col1 * col2 AS col2 FROM tab1
----
-70497
141456
146832

query I rowsort
SELECT - 81 * col0 AS col2 FROM tab2
----
-567
-6318
-6399

onlyif mysql # use DIV operator for integer division
query I rowsort label-571
SELECT DISTINCT - col2 + + col2 DIV + col0 - - col0 FROM tab0
----
-8
34
7

skipif mysql # not compatible
query I rowsort label-571
SELECT DISTINCT - col2 + + col2 / + col0 - - col0 FROM tab0
----
-8
34
7

query I rowsort
SELECT + ( col1 ) * ( + 92 ) * + col2 FROM tab1
----
114816
129168
52440

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

query I rowsort
SELECT DISTINCT 33 - col2 * - 74 FROM tab0
----
107
2475
6101

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + col0 + col0 + col2 col0 FROM tab2
----
2132
223
3119

query I rowsort
SELECT tab0.col0 + - col0 + col2 AS col2 FROM tab0
----
1
33
82

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

skipif mysql # not compatible
query I rowsort label-577
SELECT DISTINCT - CAST ( NULL AS REAL ) / 61 FROM tab0, tab2 AS cor0
----
NULL

query I rowsort
SELECT col0 + 12 + col0 * col0 AS col0 FROM tab2
----
6174
6332
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * cor0.col2 + 47 + col0 col2 FROM tab2 AS cor0
----
-1318
-551
-675

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

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

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

query I rowsort
SELECT ALL + tab1.col2 * + col0 - col1 AS col1 FROM tab1 WHERE + col2 >= ( col2 )
----
136
3638
7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-584
SELECT ALL + col1 * - col0 DIV + col0 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-584
SELECT ALL + col1 * - col0 / + col0 FROM tab2
----
-17
-31
-59

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-587
SELECT - cor0.col0 * col0 + col1 DIV col1 - col0 FROM tab0 AS cor0
----
-1259
-599
-8009

skipif mysql # not compatible
query I rowsort label-587
SELECT - cor0.col0 * col0 + col1 / col1 - col0 FROM tab0 AS cor0
----
-1259
-599
-8009

query I rowsort
SELECT ALL - col0 AS col0 FROM tab0 AS cor0 WHERE NOT ( NULL ) IN ( col0 ) OR ( NULL ) > NULL
----

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

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

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

query I rowsort
SELECT DISTINCT col0 * col0 - - col2 AS col1 FROM tab2 AS cor0
----
6110
6279
76

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

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

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

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

query I rowsort
SELECT + 74 * col2 + col0 FROM tab2 AS cor0
----
2002
2005
2891

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

query I rowsort
SELECT DISTINCT + + col2 * col1 * - 1 + col0 + - 23 AS col0 FROM tab0 cor0
----
-2837
-7396
-85

query I rowsort
SELECT DISTINCT ( cor0.col2 ) AS col0 FROM tab0, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - col2 - 87 AS col1 FROM tab1 AS cor0
----
-141
-144
-183

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

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

query I rowsort
SELECT ALL - 48 FROM tab0, tab2 cor0
----
9 values hashing to 31c94943c073954e4ca20b170ab61f8c

query I rowsort
SELECT + + col0 * + ( + col0 * + col2 + col1 ) AS col2 FROM tab1 AS cor0
----
234112
564
615440

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-607
SELECT ALL col2 * + col2 * col2 + + CAST( + col1 AS SIGNED ) + col0 AS col0 FROM tab1
----
157493
185267
884829

skipif mysql # not compatible
query I rowsort label-607
SELECT ALL col2 * + col2 * col2 + + CAST ( + col1 AS INTEGER ) + col0 AS col0 FROM tab1
----
157493
185267
884829

query I rowsort
SELECT 48 + + 46 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT DISTINCT + 74 * 35 FROM tab1, tab0, tab0 AS cor0
----
2590

query I rowsort
SELECT + 97 * - 76 AS col1 FROM tab0
----
-7372
-7372
-7372

onlyif mysql # use DIV operator for integer division
query I rowsort label-611
SELECT + + cor0.col1 DIV cor0.col0 + - col0 + + cor0.col1 FROM tab0 AS cor0
----
3
64
65

skipif mysql # not compatible
query I rowsort label-611
SELECT + + cor0.col1 / cor0.col0 + - col0 + + cor0.col1 FROM tab0 AS cor0
----
3
64
65

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

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

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

query I rowsort
SELECT 24 * col0 + + col2 * cor0.col1 + - col2 FROM tab0 AS cor0
----
3381
936
9516

onlyif mysql # use DIV operator for integer division
query I rowsort label-615
SELECT - 26 + col2 DIV ( col2 ) + col0 FROM tab1 AS cor0
----
-22
39
55

skipif mysql # not compatible
query I rowsort label-615
SELECT - 26 + col2 / ( col2 ) + col0 FROM tab1 AS cor0
----
-22
39
55

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

query I rowsort
SELECT + + cor0.col1 * + col1 + - 71 + - col0 FROM tab1 AS cor0
----
-35
18
602

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - 64 AS REAL ) col1 FROM tab1
----
-64

query I rowsort
SELECT - 77 * col0 AS col0 FROM tab0 cor0
----
-1848
-2695
-6853

onlyif mysql # use DIV operator for integer division
query I rowsort label-621
SELECT ALL - ( + col1 ) DIV tab2.col0 AS col1 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-621
SELECT ALL - ( + col1 ) / tab2.col0 AS col1 FROM tab2
----
-4
0
0

query I rowsort
SELECT ALL col2 * - cor0.col2 + + 94 * 13 FROM tab1 AS cor0
----
-1694
-2027
-7994

query I rowsort
SELECT 38 * - col1 * - col1 AS col1 FROM tab2
----
10982
132278
36518

query I rowsort
SELECT + - col0 + + cor0.col1 * - ( col2 ) + - col0 AS col0 FROM tab2 AS cor0
----
-1690
-804
-851

query I rowsort
SELECT ALL - 25 * - col2 FROM tab1 AS cor0
----
1350
1425
2400

query I rowsort
SELECT + cor0.col1 + + col0 * 72 FROM tab1 cor0
----
242
4618
5773

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + + cor2.col0 * 39 col1 FROM tab1, tab2 AS cor0, tab0 cor1, tab1 AS cor2
----
81 values hashing to ec96d4b2b2f2f9d172e096e46218c1ab

query I rowsort
SELECT DISTINCT - 30 + - col0 AS col2 FROM tab0 AS cor0
----
-119
-54
-65

query I rowsort
SELECT ALL 77 * + col1 + col0 + 33 AS col1 FROM tab1
----
1114
2038
867

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

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

query I rowsort
SELECT ALL + col2 + - ( - cor0.col2 ) * - col2 FROM tab2 cor0
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT - - col1 + - 11 * - col2 AS col1 FROM tab1 AS cor0
----
1069
620
637

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

query I rowsort
SELECT DISTINCT col0 + + col2 * ( 66 ) FROM tab0
----
101
2202
5501

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 35 * col1 * - col1 FROM tab2 AS cor0
----
-10115
-121835
-33635

query I rowsort
SELECT + 75 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e61b59795204c348103a58c0a8e4ce16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - ( col0 ) ) * + col0 + - col0 col1 FROM tab0 cor0
----
1190
552
7832

query I rowsort
SELECT ALL - 77 + + col2 FROM tab2 cor0
----
-39
-50
-51

query I rowsort
SELECT DISTINCT - 81 * - cor0.col0 FROM tab1 AS cor0
----
243
5184
6480

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( 89 AS REAL ) * col1 + 20 FROM tab1 AS cor0
----
1177
2334
910

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-646
SELECT DISTINCT 62 + col0 DIV col1 FROM tab2 AS cor0
----
62
63
66

skipif mysql # not compatible
query I rowsort label-646
SELECT DISTINCT 62 + col0 / col1 FROM tab2 AS cor0
----
62
63
66

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

query I rowsort
SELECT + col2 - 24 FROM tab1 AS cor0
----
30
33
72

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

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

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

skipif mysql # not compatible
query I rowsort label-650
SELECT ALL + 75 / col0 FROM tab1 AS cor0
----
0
1
25

query I rowsort
SELECT - - col0 * + 26 + + col2 AS col0 FROM tab0 AS cor0
----
2396
657
911

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

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

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

skipif mysql # not compatible
query I rowsort label-653
SELECT + 49 / - col0 - col2 FROM tab2 AS cor0
----
-26
-34
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-654
SELECT ALL col2 DIV 95 + col0 * + col1 FROM tab2
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-654
SELECT ALL col2 / 95 + col0 * + col1 FROM tab2
----
1343
217
4602

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-656
SELECT ALL - col0 + - col2 * col1 DIV tab0.col2 FROM tab0
----
-110
-132
-180

skipif mysql # not compatible
query I rowsort label-656
SELECT ALL - col0 + - col2 * col1 / tab0.col2 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT ALL col0 + 62 * - ( col2 ) FROM tab1
----
-3345
-3470
-5872

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

query I rowsort
SELECT DISTINCT - col2 + + ( - 50 ) * - col2 AS col2 FROM tab2 AS cor0
----
1274
1323
1862

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-660
SELECT + + col0 / 81 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col0 * + ( + 73 ) AS col0 FROM tab1
----
219
4672
5840

query I rowsort
SELECT + 34 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT - col2 * 41 + col1 FROM tab1 AS cor0
----
-2188
-2327
-3923

onlyif mysql # use DIV operator for integer division
query I rowsort label-664
SELECT ALL - ( - col1 ) * + cor0.col2 + - 86 DIV ( - col2 * + col0 + + cor0.col1 ) col2 FROM tab0 AS cor0
----
2838
7462
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-664
SELECT ALL - ( - col1 ) * + cor0.col2 + - 86 / ( - col2 * + col0 + + cor0.col1 ) col2 FROM tab0 AS cor0
----
2838
7462
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 51 * - col1 - cor0.col1 col2 FROM tab0 AS cor0
----
-4472
-4732
-5044

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

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

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

skipif mysql # not compatible
query I rowsort label-668
SELECT ALL + + CAST ( + col1 AS INTEGER ) * + col1 * col1 AS col1 FROM tab1 AS cor0
----
1000
17576
2197

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

query I rowsort
SELECT DISTINCT + ( 95 ) * col0 AS col2 FROM tab1 cor0
----
285
6080
7600

query I rowsort
SELECT ( col0 ) * col1 + - 37 AS col1 FROM tab1 AS cor0
----
1003
41
603

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

query I rowsort
SELECT ALL - + col0 + col0 + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + 0 AS REAL ) AS col2 FROM tab0 AS cor0
----
0
0
0

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 1 ) col0 FROM tab0, tab2 AS cor0
----
1

query I rowsort
SELECT - col2 * + 18 * col2 AS col1 FROM tab2 cor0
----
-12168
-13122
-25992

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 * col2 col0 FROM tab2 AS cor0
----
1144
1188
1672

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-685
SELECT ALL cor0.col0 * cor0.col0 + - CAST( col1 AS SIGNED ) * - col0 AS col0 FROM tab1 AS cor0
----
4736
7440
87

skipif mysql # not compatible
query I rowsort label-685
SELECT ALL cor0.col0 * cor0.col0 + - CAST ( col1 AS INTEGER ) * - col0 AS col0 FROM tab1 AS cor0
----
4736
7440
87

query I rowsort
SELECT col2 + col0 * + col2 * - col2 FROM tab2 AS cor0
----
-114038
-5076
-52702

query I rowsort
SELECT ALL - ( + cor0.col1 ) + + 11 * + col0 FROM tab0 AS cor0
----
178
288
888

onlyif mysql # use DIV operator for integer division
query I rowsort label-688
SELECT + - 25 * col0 DIV col1 FROM tab0 cor0
----
-24
-6
-9

skipif mysql # not compatible
query I rowsort label-688
SELECT + - 25 * col0 / col1 FROM tab0 cor0
----
-24
-6
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col1 * col2 col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT + + ( col0 ) * + 81 AS col2 FROM tab1 AS cor0
----
243
5184
6480

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

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

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

query I rowsort
SELECT ALL + col1 + + col0 + cor0.col2 AS col1 FROM tab1 cor0
----
131
189
83

query I rowsort
SELECT DISTINCT + 26 * - cor0.col2 FROM tab0 AS cor0
----
-2132
-26
-858

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

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

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

query I rowsort
SELECT + - cor0.col1 + + 81 * col2 AS col0 FROM tab0 AS cor0
----
-16
2587
6551

query I rowsort
SELECT 84 FROM tab2 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT + - cor0.col0 * - 42 FROM tab2 AS cor0
----
294
3276
3318

onlyif mysql # use DIV operator for integer division
query I rowsort label-700
SELECT DISTINCT + + col1 DIV 23 FROM tab0 AS cor0
----
3
4

skipif mysql # not compatible
query I rowsort label-700
SELECT DISTINCT + + col1 / 23 FROM tab0 AS cor0
----
3
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL + col1 * CAST ( - 86 AS REAL ) col2 FROM tab0 AS cor0
----
-7396
-7826
-8342

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-703
SELECT - - col2 + col2 DIV col2 AS col0 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-703
SELECT - - col2 + col2 / col2 AS col0 FROM tab1 AS cor0
----
55
58
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-704
SELECT DISTINCT 31 DIV tab0.col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-704
SELECT DISTINCT 31 / tab0.col1 FROM tab0
----
0

query I rowsort
SELECT + 16 * - 1 FROM tab2, tab0 AS cor0
----
9 values hashing to be22ac76b42c6f7212ecc0ba7c89eb34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-706
SELECT - col1 * - CAST( 40 AS SIGNED ) FROM tab2
----
1240
2360
680

skipif mysql # not compatible
query I rowsort label-706
SELECT - col1 * - CAST ( 40 AS INTEGER ) FROM tab2
----
1240
2360
680

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

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

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

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

query I rowsort
SELECT ALL - 26 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 47d0574274146de273829785364ada39

query I rowsort
SELECT ALL + 29 + tab2.col0 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 3f80ed1b7f1f2a908cbc11228837bedb

query I rowsort
SELECT DISTINCT - col0 * - col0 * col2 + cor0.col1 * col1 FROM tab0 AS cor0
----
10634
26404
657803

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

query I rowsort
SELECT - ( 53 ) FROM tab0 cor0
----
-53
-53
-53

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

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

query I rowsort
SELECT ALL 88 * + col0 FROM tab0 AS cor0
----
2112
3080
7832

query I rowsort
SELECT ALL - - ( + 20 ) + col0 * col0 FROM tab2 AS cor0
----
6104
6261
69

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

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

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

query I rowsort
SELECT ALL - + 62 + 97 * - col1 FROM tab0 AS cor0
----
-8404
-8889
-9471

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-724
SELECT col2 DIV col2 + col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-724
SELECT col2 / col2 + col0 FROM tab1
----
4
65
81

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

query I rowsort
SELECT - + 17 + + col2 FROM tab0 AS cor0
----
-16
16
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-727
SELECT 81 DIV col0 FROM tab0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-727
SELECT 81 / col0 FROM tab0
----
0
2
3

query I rowsort
SELECT + col2 * 73 + ( col0 ) FROM tab0 AS cor0
----
108
2433
6075

query I rowsort
SELECT + - col2 * 13 * - 37 + col1 AS col0 FROM tab2 AS cor0
----
12565
13018
18295

query I rowsort
SELECT - 56 * 62 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to c1ff46a8848643cd6d10809d47e07b88

query I rowsort
SELECT col1 * col0 + + col0 * col2 FROM tab2
----
406
4345
6630

query I rowsort
SELECT - col0 + + 61 + + col2 FROM tab2
----
20
81
9

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

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

query I rowsort
SELECT ALL - col2 * ( 65 + col0 * + col0 ) FROM tab1 cor0
----
-237177
-3996
-620640

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

query I rowsort
SELECT + - col1 * 1 + - col1 FROM tab2 cor0
----
-118
-34
-62

query I rowsort
SELECT ALL + ( 95 ) FROM tab1, tab0 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - ( - col0 ) * col0 col0 FROM tab1 AS cor0
----
-45
4039
6304

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 - + cor0.col1 * - 15 col0 FROM tab1 AS cor0
----
115
387
86

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

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

query I rowsort
SELECT DISTINCT + - col2 * - 70 * + 5 + + cor0.col1 + - cor0.col1 * col1 AS col1 FROM tab0 AS cor0
----
-8962
20510
4240

query I rowsort
SELECT ALL + col0 * col2 * 67 AS col2 FROM tab2 AS cor0
----
12663
135876
201134

query I rowsort
SELECT col0 + + 47 + - col2 AS col2 FROM tab0
----
38
54
81

query I rowsort
SELECT DISTINCT col1 * 9 FROM tab0 cor0
----
774
819
873

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

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

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

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

query I rowsort
SELECT 4 * col1 + col2 FROM tab1 AS cor0
----
148
158
97

query I rowsort
SELECT ALL + 47 * - col2 AS col2 FROM tab2 AS cor0
----
-1222
-1269
-1786

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col0 - col2 col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT - col1 * col1 * col0 + - ( - ( - col1 ) ) FROM tab1 AS cor0
----
-13533
-2054
-6410

query I rowsort
SELECT + col2 + + 32 AS col1 FROM tab2 AS cor0
----
58
59
70

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

query I rowsort
SELECT ALL + + cor0.col1 * - col0 * col2 + 8 * + 1 FROM tab2 AS cor0
----
-119644
-51026
-5851

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-760
SELECT - col0 * col1 + - ( col2 ) DIV col0 AS col2 FROM tab0
----
-2065
-3395
-8099

skipif mysql # not compatible
query I rowsort label-760
SELECT - col0 * col1 + - ( col2 ) / col0 AS col2 FROM tab0
----
-2065
-3395
-8099

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

query I rowsort
SELECT + 93 + col2 FROM tab2 AS cor0
----
119
120
131

query I rowsort
SELECT DISTINCT + + 71 * - col0 FROM tab1 AS cor0
----
-213
-4544
-5680

query I rowsort
SELECT ALL 87 FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

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

query I rowsort
SELECT + 68 * col2 * - col0 AS col2 FROM tab1 AS cor0
----
-11016
-248064
-522240

query I rowsort
SELECT - col2 * - 56 * - col1 AS col0 FROM tab1 AS cor0
----
-31920
-69888
-78624

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

query I rowsort
SELECT ALL col1 - - col1 AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT - col1 * + ( - 30 ) FROM tab1 AS cor0
----
300
390
780

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

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

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

query I rowsort
SELECT DISTINCT - col0 + 45 * - col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
135011
8498
91182

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-776
SELECT col0 * col1 + 2 DIV - 10 AS col0 FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-776
SELECT col0 * col1 + 2 / - 10 AS col0 FROM tab1
----
1040
640
78

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

query I rowsort
SELECT 8 + + cor0.col0 + + col0 AS col1 FROM tab0 AS cor0
----
186
56
78

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

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

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

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

query I rowsort
SELECT tab1.col2 + - col1 + + col2 FROM tab1
----
104
179
82

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-785
SELECT ALL - col1 + col0 DIV + col1 AS col2 FROM tab2 AS cor0
----
-13
-31
-58

skipif mysql # not compatible
query I rowsort label-785
SELECT ALL - col1 + col0 / + col1 AS col2 FROM tab2 AS cor0
----
-13
-31
-58

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

query I rowsort
SELECT col1 + ( + 7 ) FROM tab1
----
17
20
33

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

query I rowsort
SELECT ALL - - cor0.col2 * + 97 + + col0 FROM tab0 AS cor0
----
132
3225
8043

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

query I rowsort
SELECT - 50 * 4 AS col1 FROM tab2 cor0
----
-200
-200
-200

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

skipif mysql # not compatible
query I rowsort label-792
SELECT DISTINCT CAST ( NULL AS INTEGER ) / cor0.col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT + - 53 AS col0 FROM tab1 AS cor0
----
-53
-53
-53

query I rowsort
SELECT ALL - 54 + col0 AS col2 FROM tab2 AS cor0
----
-47
24
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-795
SELECT DISTINCT - + ( col0 ) * col0 - - CAST( col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-22
-6058
-6203

skipif mysql # not compatible
query I rowsort label-795
SELECT DISTINCT - + ( col0 ) * col0 - - CAST ( col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT - ( + col0 ) * - col2 + 8 * cor0.col0 AS col2 FROM tab0 AS cor0
----
315
8010
984

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

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

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

query I rowsort
SELECT ALL col0 * - 17 + col2 FROM tab2 AS cor0
----
-1300
-1305
-92

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 23 * + 57 col2 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 987ce0f0e93c69ea130b5200bdb2a715

query I rowsort
SELECT + col2 + + col0 * 22 AS col2 FROM tab0 AS cor0
----
2040
561
771

query I rowsort
SELECT - 99 * + col1 FROM tab0 AS cor0
----
-8514
-9009
-9603

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

query I rowsort
SELECT cor0.col1 * + 3 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 6b363e8b912031a77db90aba88ad3fb5

query I rowsort
SELECT + - 95 + + col2 AS col0 FROM tab1 AS cor0
----
-38
-41
1

query I rowsort
SELECT ALL - 47 * + col1 * cor0.col1 FROM tab1 AS cor0
----
-31772
-4700
-7943

query I rowsort
SELECT DISTINCT ( col2 ) * - 10 FROM tab2 AS cor0
----
-260
-270
-380

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

query I rowsort
SELECT - col0 * 33 FROM tab2 AS cor0
----
-231
-2574
-2607

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

query I rowsort
SELECT col0 * col0 + 22 * + col1 + - 16 FROM tab0 AS cor0
----
2452
3343
9907

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

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

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

query I rowsort
SELECT ALL + ( + col2 ) * col2 + col2 * + tab0.col2 * col1 AS col2 FROM tab0
----
618608
94743
98

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

query I rowsort
SELECT - + col2 + + col1 + 1 FROM tab1 cor0
----
-27
-46
-82

query I rowsort
SELECT + 13 * + 12 FROM tab2, tab1 AS cor0
----
9 values hashing to 4de85b31fd319b557570fc53828d1dd3

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

query I rowsort
SELECT - col0 * col0 - + 81 AS col2 FROM tab2 AS cor0
----
-130
-6165
-6322

query I rowsort
SELECT + col1 + + col2 * 16 * + col0 AS col2 FROM tab0 AS cor0
----
116859
12758
657

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

skipif mysql # not compatible
query I rowsort label-825
SELECT - col0 / + col1 - ( + col1 ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-827
SELECT DISTINCT - col2 * col2 DIV + ( 27 + - col1 ) AS col2 FROM tab0 AS cor0
----
0
105
18

skipif mysql # not compatible
query I rowsort label-827
SELECT DISTINCT - col2 * col2 / + ( 27 + - col1 ) AS col2 FROM tab0 AS cor0
----
0
105
18

query I rowsort
SELECT 53 + col1 * - col1 FROM tab0 AS cor0
----
-7343
-8228
-9356

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-830
SELECT tab1.col0 DIV - col1 col0 FROM tab1
----
-6
-6
0

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

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

skipif mysql # not compatible
query I rowsort label-831
SELECT ALL - + cor0.col0 + col1 / 96 AS col2 FROM tab1 AS cor0
----
-3
-64
-80

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-834
SELECT DISTINCT - col1 DIV cor0.col0 + + 30 AS col0 FROM tab2 AS cor0
----
26
30

skipif mysql # not compatible
query I rowsort label-834
SELECT DISTINCT - col1 / cor0.col0 + + 30 AS col0 FROM tab2 AS cor0
----
26
30

query I rowsort
SELECT 78 * col0 AS col1 FROM tab1
----
234
4992
6240

query I rowsort
SELECT col1 * - 9 AS col0 FROM tab0 cor0
----
-774
-819
-873

query I rowsort
SELECT ALL + 37 - tab1.col2 AS col0 FROM tab1
----
-17
-20
-59

query I rowsort
SELECT ALL + col2 * + col2 - - col1 AS col0 FROM tab1
----
2942
3259
9229

query I rowsort
SELECT ALL + 81 * - col2 FROM tab0 cor0
----
-2673
-6642
-81

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

query I rowsort
SELECT ALL - col1 * + 34 AS col2 FROM tab2
----
-1054
-2006
-578

onlyif mysql # use DIV operator for integer division
query I rowsort label-842
SELECT ALL - 60 DIV 31 AS col0 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-842
SELECT ALL - 60 / 31 AS col0 FROM tab0
----
-1
-1
-1

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

query I rowsort
SELECT tab2.col0 + 0 AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT col1 - + 3 AS col1 FROM tab0
----
83
88
94

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

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - 77 AS REAL ) + - tab1.col1 AS col0 FROM tab1
----
-103
-87
-90

query I rowsort
SELECT 99 + col0 AS col2 FROM tab2 cor0
----
106
177
178

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

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

query I rowsort
SELECT DISTINCT + 95 * - col2 + col2 FROM tab1 cor0
----
-5076
-5358
-9024

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT 96 + col0 AS col2 FROM tab1 AS cor0
----
160
176
99

query I rowsort
SELECT tab2.col0 + col2 + + col1 * 69 AS col2 FROM tab2
----
1290
2173
4175

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

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

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

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

query I rowsort
SELECT ALL - 95 * cor0.col2 FROM tab2 AS cor0
----
-2470
-2565
-3610

query I rowsort
SELECT ALL + + 91 * + col1 FROM tab2 AS cor0
----
1547
2821
5369

query I rowsort
SELECT ALL + ( col1 ) * - 98 AS col2 FROM tab0 AS cor0
----
-8428
-8918
-9506

query I rowsort
SELECT DISTINCT - ( + col2 ) - 60 FROM tab0 AS cor0
----
-142
-61
-93

query I rowsort
SELECT ALL + ( col1 ) * + ( - 91 ) - col2 AS col1 FROM tab2 AS cor0
----
-1585
-2848
-5395

query I rowsort
SELECT DISTINCT + - 28 * col1 AS col0 FROM tab1 AS cor0
----
-280
-364
-728

query I rowsort
SELECT ALL + col2 + + 68 * col1 AS col0 FROM tab0
----
5881
6270
6597

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - 24 * col1 col0 FROM tab0
----
-179088
-2328
-68112

query I rowsort
SELECT col2 * - 55 * 33 AS col1 FROM tab0 cor0
----
-148830
-1815
-59895

query I rowsort
SELECT - col0 + + 93 FROM tab1 AS cor0
----
13
29
90

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

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

query I rowsort
SELECT DISTINCT - - col2 * - ( + 9 ) AS col2 FROM tab0 AS cor0
----
-297
-738
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * ( col0 ) * tab1.col2 + - col2 col2 FROM tab1
----
207879
737184
8694

query I rowsort
SELECT + - col0 * + 28 FROM tab1 AS cor0
----
-1792
-2240
-84

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 10 ) + col2 col0 FROM tab0 AS cor0
----
11
43
92

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-881
SELECT col0 DIV col1 + - col2 + - 63 FROM tab2 AS cor0
----
-88
-90
-97

skipif mysql # not compatible
query I rowsort label-881
SELECT col0 / col1 + - col2 + - 63 FROM tab2 AS cor0
----
-88
-90
-97

query I rowsort
SELECT ALL + 59 * + col0 + - col0 AS col2 FROM tab2 AS cor0
----
406
4524
4582

query I rowsort
SELECT DISTINCT + + 79 * col2 FROM tab1 AS cor0
----
4266
4503
7584

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

query I rowsort
SELECT DISTINCT - 46 - 86 * + col1 AS col2 FROM tab0 AS cor0
----
-7442
-7872
-8388

query I rowsort
SELECT ALL - - col1 + 27 * col2 FROM tab0 AS cor0
----
124
2305
977

skipif mysql # not compatible
query I rowsort
SELECT ALL + + 30 * ( - col0 ) * CAST ( + cor0.col0 AS REAL ) AS col0 FROM tab1 AS cor0
----
-122880
-192000
-270

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

skipif mysql # not compatible
query I rowsort label-888
SELECT ALL - col0 + CAST ( 96 + + col1 AS INTEGER ) FROM tab0 AS cor0
----
158
158
98

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

skipif mysql # not compatible
query I rowsort label-889
SELECT + col1 / 58 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-890
SELECT ALL + col2 * col1 DIV - 86 AS col0 FROM tab2 AS cor0
----
-17
-7
-9

skipif mysql # not compatible
query I rowsort label-890
SELECT ALL + col2 * col1 / - 86 AS col0 FROM tab2 AS cor0
----
-17
-7
-9

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

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

query I rowsort
SELECT DISTINCT - ( 83 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-83

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

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

query I rowsort
SELECT ( - 67 ) FROM tab0, tab2 cor0
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

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

skipif mysql # not compatible
query I rowsort label-896
SELECT - + col2 / 35 AS col2 FROM tab2 AS cor0
----
-1
0
0

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

skipif mysql # not compatible
query I rowsort label-897
SELECT CAST ( NULL AS REAL ) AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

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

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

query I rowsort
SELECT - - col2 * - col1 + ( col0 + col1 ) * col1 AS col2 FROM tab0 cor0
----
12707
6622
8918

query I rowsort
SELECT + col2 + - col2 * + cor0.col0 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL col0 * - col0 + - col1 FROM tab2
----
-6143
-6258
-80

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

query I rowsort
SELECT 77 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

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

query I rowsort
SELECT DISTINCT - 84 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-84

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

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

query I rowsort
SELECT DISTINCT col1 * + col2 + + 15 FROM tab2 AS cor0
----
1549
661
852

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 97 * col0 col2 FROM tab2 AS cor0
----
679
7566
7663

query I rowsort
SELECT DISTINCT - cor0.col0 * col1 * 75 AS col2 FROM tab2 AS cor0
----
-100725
-16275
-345150

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

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

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

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

query I rowsort
SELECT ALL - 96 * + col1 + + col2 AS col2 FROM tab0 cor0
----
-8223
-8654
-9311

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-917
SELECT DISTINCT - ( col2 ) - CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
-164
-2
-66

skipif mysql # not compatible
query I rowsort label-917
SELECT DISTINCT - ( col2 ) - CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT 35 + tab2.col0 FROM tab2, tab0, tab1 cor0
----
27 values hashing to d4fa85ffdd1ea64f6d4e8f5da1308e24

query I rowsort
SELECT DISTINCT - 23 * col0 FROM tab2
----
-161
-1794
-1817

query I rowsort
SELECT ALL + 14 * tab1.col1 FROM tab1, tab2, tab0 cor0
----
27 values hashing to 81cca8049cc111919bf52b8390e5906f

query I rowsort
SELECT ALL 0 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

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

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

query I rowsort
SELECT DISTINCT col2 * - col0 + + 8 FROM tab1
----
-154
-3640
-7672

query I rowsort
SELECT ALL col0 * - col0 + + ( + col0 * col1 ) FROM tab1 AS cor0
----
-3456
-5360
69

query I rowsort
SELECT - col1 * + 43 AS col0 FROM tab2 AS cor0
----
-1333
-2537
-731

query I rowsort
SELECT DISTINCT - col2 * + col2 + col2 * col1 AS col0 FROM tab1 AS cor0
----
-1512
-2679
-7968

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

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

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

skipif mysql # not compatible
query I rowsort label-929
SELECT ALL CAST ( - col1 AS INTEGER ) AS col2 FROM tab2 cor0
----
-17
-31
-59

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-931
SELECT - - 36 DIV 23 + col1 + - col2 * col0 * + col0 AS col1 FROM tab1 AS cor0
----
-233461
-459
-614386

skipif mysql # not compatible
query I rowsort label-931
SELECT - - 36 / 23 + col1 + - col2 * col0 * + col0 AS col1 FROM tab1 AS cor0
----
-233461
-459
-614386

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-933
SELECT col1 * + col1 DIV col1 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-933
SELECT col1 * + col1 / col1 FROM tab0 cor0
----
86
91
97

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

query I rowsort
SELECT + ( cor0.col0 ) + col2 * + col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT + 26 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

onlyif mysql # use DIV operator for integer division
query I rowsort label-937
SELECT DISTINCT 10 DIV + col0 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-937
SELECT DISTINCT 10 / + col0 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col2 ) * - col0 + + 12 col0 FROM tab1 cor0
----
174
3660
7692

query I rowsort
SELECT ALL - + ( tab0.col1 ) FROM tab1, tab2, tab0 AS cor0, tab0
----
81 values hashing to 786a240f80bef6f9c6a190e92cd4f9e8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * ( col1 ) + - 62 col1 FROM tab1
----
-1102
-140
-702

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

query I rowsort
SELECT ALL col1 * col1 + col1 * col2 AS col1 FROM tab0 AS cor0
----
10234
15743
9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-943
SELECT ALL - 69 + - cor0.col1 DIV col0 FROM tab2 AS cor0
----
-69
-69
-73

skipif mysql # not compatible
query I rowsort label-943
SELECT ALL - 69 + - cor0.col1 / col0 FROM tab2 AS cor0
----
-69
-69
-73

query I rowsort
SELECT ALL + col2 + col1 * col2 * + 19 AS col0 FROM tab2 AS cor0
----
12312
15930
29172

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

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

query I rowsort
SELECT DISTINCT + col0 * cor0.col2 * - 50 AS col2 FROM tab2 AS cor0
----
-101400
-150100
-9450

query I rowsort
SELECT DISTINCT - col2 * col2 + + 46 FROM tab0 cor0
----
-1043
-6678
45

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 6 + cor0.col0 col2 FROM tab0 AS cor0
----
30
41
95

query I rowsort
SELECT DISTINCT - tab0.col0 * 71 FROM tab0, tab2 AS cor0
----
-1704
-2485
-6319

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-952
SELECT ALL 37 DIV - col0 + - col0 * + col0 FROM tab1 AS cor0
----
-21
-4096
-6400

skipif mysql # not compatible
query I rowsort label-952
SELECT ALL 37 / - col0 + - col0 * + col0 FROM tab1 AS cor0
----
-21
-4096
-6400

query I rowsort
SELECT ALL - 75 + + col1 * - 33 AS col0 FROM tab2 AS cor0
----
-1098
-2022
-636

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

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

query I rowsort
SELECT DISTINCT + 48 + - cor0.col2 FROM tab2 AS cor0
----
10
21
22

query I rowsort
SELECT - - 9 * + col0 * col2 + 25 AS col2 FROM tab0 AS cor0
----
340
65707
7153

query I rowsort
SELECT ALL - 47 * - col2 AS col0 FROM tab2 AS cor0
----
1222
1269
1786

query I rowsort
SELECT ALL + col0 * col0 * - 19 FROM tab0 AS cor0
----
-10944
-150499
-23275

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

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

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

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

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

query I rowsort
SELECT + + cor0.col0 * col0 * cor0.col2 + + col2 * ( + col2 * - col0 + 2 * + col1 ) AS col1 FROM tab2 AS cor0
----
-2106
108524
124374

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

skipif mysql # not compatible
query I rowsort label-964
SELECT - + col2 * CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col1 * ( + 62 ) + - col1 FROM tab2
----
1037
1891
3599

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

query I rowsort
SELECT DISTINCT col1 + - ( + ( + col0 ) ) AS col1 FROM tab0
----
2
62

query I rowsort
SELECT - col2 * cor0.col1 * col1 AS col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT - - col1 + 51 FROM tab2 AS cor0
----
110
68
82

query I rowsort
SELECT col1 * + col0 * - 92 AS col1 FROM tab0 AS cor0
----
-189888
-312340
-745108

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

query I rowsort
SELECT DISTINCT col1 + + col1 * - col0 * + col1 AS col2 FROM tab0 AS cor0
----
-177418
-329218
-736918

query I rowsort
SELECT col0 * ( - col0 ) + col2 + col2 FROM tab1 AS cor0
----
-3982
-6208
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-974
SELECT - - col2 DIV - col0 + col0 + col1 FROM tab1 AS cor0
----
11
74
92

skipif mysql # not compatible
query I rowsort label-974
SELECT - - col2 / - col0 + col0 + col1 FROM tab1 AS cor0
----
11
74
92

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

query I rowsort
SELECT - 23 * - cor0.col0 * - col2 AS col2 FROM tab2 AS cor0
----
-4347
-46644
-69046

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - + col1 * col0 * col1 - + col0 FROM tab1 AS cor0
----
-13600
-2031
-6464

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

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

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

query I rowsort
SELECT ALL - 74 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5a567947d14593676e3825756f8e6130

query I rowsort
SELECT + 54 * - cor0.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f457adb194d761141d25bafba909ae1a

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-989
SELECT - col1 + 88 DIV col1 FROM tab0 AS cor0
----
-85
-91
-97

skipif mysql # not compatible
query I rowsort label-989
SELECT - col1 + 88 / col1 FROM tab0 AS cor0
----
-85
-91
-97

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

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

query I rowsort
SELECT DISTINCT + col0 + cor0.col2 * col2 * col0 AS col2 FROM tab2 AS cor0
----
114155
5110
52806

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

skipif mysql # not compatible
query I rowsort label-992
SELECT ALL - CAST ( ( col0 ) AS INTEGER ) + col2 FROM tab2 AS cor0
----
-41
-52
20

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

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

query I rowsort
SELECT DISTINCT - 98 * col2 + col2 * + ( - 68 ) + - col0 FROM tab0 AS cor0
----
-13701
-201
-5502

query I rowsort
SELECT - 12 + 1 * - col0 + col1 FROM tab2 AS cor0
----
-31
-74
12

query I rowsort
SELECT + 26 * col2 AS col0 FROM tab0 AS cor0
----
2132
26
858

query I rowsort
SELECT 81 + ( col2 ) AS col1 FROM tab2 AS cor0
----
107
108
119

query I rowsort
SELECT - 7 + - 76 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d55748f39f403ec273099c0d87b0bfbb

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

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

query I rowsort
SELECT - col0 + - 53 * col2 * col2 + 92 FROM tab0 cor0
----
-356369
-57649
4

query I rowsort
SELECT + col0 + col0 * - col0 + cor0.col2 AS col2 FROM tab1 cor0
----
-3975
-6224
48

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

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

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

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

query I rowsort
SELECT ALL + col0 + tab0.col1 * 50 FROM tab0
----
4324
4639
4885

query I rowsort
SELECT DISTINCT - col1 + - 55 AS col2 FROM tab1 AS cor0
----
-65
-68
-81

query I rowsort
SELECT + col0 * 61 + - 31 FROM tab1 AS cor0
----
152
3873
4849

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

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

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

query I rowsort
SELECT - 57 * col1 + 98 FROM tab1 AS cor0
----
-1384
-472
-643

query I rowsort
SELECT DISTINCT 65 * col2 AS col0 FROM tab0 AS cor0
----
2145
5330
65

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

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

query I rowsort
SELECT 16 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

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

query I rowsort
SELECT DISTINCT 21 * + col0 + + col0 AS col2 FROM tab1 AS cor0
----
1408
1760
66

query I rowsort
SELECT ALL + 50 * - ( col0 ) FROM tab2
----
-350
-3900
-3950

query I rowsort
SELECT + col0 * 98 AS col0 FROM tab1 AS cor0
----
294
6272
7840

onlyif mysql # use DIV operator for integer division
query I rowsort label-1021
SELECT - 17 + + 66 DIV - col2 AS col1 FROM tab1 cor0
----
-17
-18
-18

skipif mysql # not compatible
query I rowsort label-1021
SELECT - 17 + + 66 / - col2 AS col1 FROM tab1 cor0
----
-17
-18
-18

onlyif mysql # use DIV operator for integer division
query I rowsort label-1022
SELECT + 83 DIV col0 + col2 AS col2 FROM tab0 AS cor0
----
3
36
82

skipif mysql # not compatible
query I rowsort label-1022
SELECT + 83 / col0 + col2 AS col2 FROM tab0 AS cor0
----
3
36
82

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

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

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

query I rowsort
SELECT 42 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1028
SELECT - 16 DIV + 38 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1028
SELECT - 16 / + 38 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT + cor0.col2 FROM tab0, tab1, tab1 cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ( col0 ) * + col2 + 20 AS col0 FROM tab0 AS cor0
----
55
7318
812

query I rowsort
SELECT 70 * - cor0.col1 AS col2 FROM tab2 cor0
----
-1190
-2170
-4130

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

query I rowsort
SELECT - col2 + - col2 * ( + 7 ) * col2 FROM tab1 cor0
----
-20466
-22800
-64608

query I rowsort
SELECT col0 * 70 FROM tab0
----
1680
2450
6230

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

query I rowsort
SELECT + 75 + - col2 AS col2 FROM tab1 cor0
----
-21
18
21

query I rowsort
SELECT + cor0.col0 + col1 * + 50 + cor0.col0 FROM tab0 AS cor0
----
4348
4728
4920

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

skipif mysql # not compatible
query I rowsort label-1038
SELECT + - col2 + CAST ( + col0 AS INTEGER ) FROM tab1 AS cor0
----
-16
-51
7

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col0 * + 55 + - 78 col2 FROM tab2
----
10317
111462
165032

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

query I rowsort
SELECT DISTINCT 39 + - col0 * col2 AS col0 FROM tab0
----
-7259
-753
4

query I rowsort
SELECT ALL - tab1.col2 * tab1.col1 + - ( 73 ) FROM tab1
----
-1321
-1477
-643

query I rowsort
SELECT ALL + 71 * 67 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to e6e8141e30ce2b02973f585ff7141e9a

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

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

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

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

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

query I rowsort
SELECT ALL 48 + col1 + col2 FROM tab1 AS cor0
----
115
128
157

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

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

query I rowsort
SELECT ALL - 3 * + ( - col0 ) * + ( - col1 ) AS col0 FROM tab2 AS cor0
----
-13806
-4029
-651

query I rowsort
SELECT DISTINCT - col2 * + col2 * col2 FROM tab2
----
-17576
-19683
-54872

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1054
SELECT + 39 DIV tab1.col2 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1054
SELECT + 39 / tab1.col2 AS col0 FROM tab1
----
0
0
0

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

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

query I rowsort
SELECT - 15 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 91b10a00c89b36b5bf0bed723e656ccc

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

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

skipif mysql # not compatible
query I rowsort label-1059
SELECT ALL - - col0 + CAST ( col2 AS INTEGER ) * + col1 AS col0 FROM tab0 cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT + - col0 + - 74 FROM tab0 AS cor0
----
-109
-163
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + ( col0 ) + - col1 col0 FROM tab2 AS cor0
----
-17
141
97

query I rowsort
SELECT ALL - col1 * ( cor0.col0 + - col2 ) AS col2 FROM tab2 AS cor0
----
-3068
-697
620

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

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

query I rowsort
SELECT ALL - 56 * - col2 + - col2 FROM tab0
----
1815
4510
55

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

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

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

query I rowsort
SELECT DISTINCT - col2 * 62 FROM tab1
----
-3348
-3534
-5952

query I rowsort
SELECT ALL + + col0 + cor0.col0 + 17 * + col1 FROM tab2 AS cor0
----
1159
447
541

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1071
SELECT + col2 * CAST( 2 AS SIGNED ) + col2 AS col2 FROM tab2 AS cor0
----
114
78
81

skipif mysql # not compatible
query I rowsort label-1071
SELECT + col2 * CAST ( 2 AS INTEGER ) + col2 AS col2 FROM tab2 AS cor0
----
114
78
81

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

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

query I rowsort
SELECT ALL - - col2 * + 32 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT ALL - col0 + 0 * + 54 + col1 * + 46 FROM tab0 AS cor0
----
3932
4097
4427

query I rowsort
SELECT ( - 5 ) * col2 AS col1 FROM tab1 AS cor0
----
-270
-285
-480

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

query I rowsort
SELECT DISTINCT + - cor1.col2 * - 5 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
130
135
190

query I rowsort
SELECT + 3 + col1 AS col0 FROM tab1
----
13
16
29

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( + 59 ) * - col1 - col1 col2 FROM tab2 AS cor0
----
-1020
-1860
-3540

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1084
SELECT - ( - col0 ) * + CAST ( - col0 AS INTEGER ) + col2 AS col1 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT ALL 39 * cor0.col2 - cor1.col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to e92c0da1133eda9155904d14a34a46de

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

query I rowsort
SELECT ALL + ( cor1.col1 ) FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

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

skipif mysql # not compatible
query I rowsort label-1088
SELECT col0 / - col0 + col2 FROM tab2 AS cor0
----
25
26
37

query I rowsort
SELECT col2 * - 37 AS col1 FROM tab1
----
-1998
-2109
-3552

query I rowsort
SELECT ALL + 11 * col2 AS col1 FROM tab1 AS cor0
----
1056
594
627

query I rowsort
SELECT DISTINCT + col1 * col1 + 16 AS col1 FROM tab0 cor0
----
7412
8297
9425

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

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

query I rowsort
SELECT - 87 + col1 FROM tab1 AS cor0
----
-61
-74
-77

query I rowsort
SELECT - - cor0.col2 * cor0.col2 * 74 FROM tab1 cor0
----
215784
240426
681984

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

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

query I rowsort
SELECT + - 67 + cor0.col1 + 6 FROM tab2 AS cor0
----
-2
-30
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( - col0 ) col2 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1100
SELECT - + cor0.col2 + + CAST( - col2 + col0 AS SIGNED ) FROM tab0 AS cor0
----
-42
-75
33

skipif mysql # not compatible
query I rowsort label-1100
SELECT - + cor0.col2 + + CAST ( - col2 + col0 AS INTEGER ) FROM tab0 AS cor0
----
-42
-75
33

query I rowsort
SELECT cor1.col1 * ( + cor2.col0 ) AS col0 FROM tab0, tab0 cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 9d0f89f9a455191691f6a03d9b51d17f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * 6 + ( col1 ) * 45 col0 FROM tab0 AS cor0
----
4386
4641
4947

query I rowsort
SELECT ALL + - cor0.col0 + + col2 + - col1 * - col0 FROM tab0 AS cor0
----
2073
3361
8092

query I rowsort
SELECT + 85 * tab1.col1 FROM tab1
----
1105
2210
850

query I rowsort
SELECT cor0.col2 + + col1 + - 25 AS col0 FROM tab1 AS cor0
----
42
55
84

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

query I rowsort
SELECT DISTINCT - 42 + col1 + + ( ( col0 ) ) AS col1 FROM tab0
----
138
68
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-1108
SELECT + 48 + - col0 + - col0 * col1 DIV tab1.col0 FROM tab1
----
-26
-45
19

skipif mysql # not compatible
query I rowsort label-1108
SELECT + 48 + - col0 + - col0 * col1 / tab1.col0 FROM tab1
----
-26
-45
19

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 cor0, tab1 cor1, tab0 AS cor2
----
972 values hashing to 5e655b1287771868a8f868574a94d749

query I rowsort
SELECT DISTINCT + 86 + + cor0.col1 FROM tab1 AS cor0
----
112
96
99

query I rowsort
SELECT + col1 * 83 + col1 AS col0 FROM tab1 AS cor0
----
1092
2184
840

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * + 12 col1 FROM tab0 AS cor0
----
-12
-396
-984

query I rowsort
SELECT - col2 * 90 + col2 - + col1 FROM tab0
----
-186
-3023
-7389

query I rowsort
SELECT 70 * col1 AS col0 FROM tab0
----
6020
6370
6790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 87 * col0 col0 FROM tab1
----
-261
-5568
-6960

query I rowsort
SELECT DISTINCT col0 + - col1 - + col1 AS col0 FROM tab0
----
-148
-159
-93

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

skipif mysql # not compatible
query I rowsort label-1120
SELECT DISTINCT ( - col2 ) - col0 / - col1 AS col2 FROM tab2
----
-25
-27
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 * + 55 col1 FROM tab0 AS cor0
----
406780
455455
517495

query I rowsort
SELECT ALL - 77 - + 39 AS col2 FROM tab2
----
-116
-116
-116

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 9 col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 3dfe689e16ce3a87877d40f349e6c7b5

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + 24 + col0 col0 FROM tab2
----
180
182
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1128
SELECT DISTINCT col1 + + 34 * + col2 + + CAST( col0 * col0 AS SIGNED ) FROM tab0
----
10800
1356
1784

skipif mysql # not compatible
query I rowsort label-1128
SELECT DISTINCT col1 + + 34 * + col2 + + CAST ( col0 * col0 AS INTEGER ) FROM tab0
----
10800
1356
1784

query I rowsort
SELECT ALL ( 36 ) * - tab0.col1 + col2 FROM tab0
----
-3063
-3194
-3491

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab0, tab1 cor1, tab1 AS cor2
----
972 values hashing to 0be13143d898cc667fe1a2dd93b34703

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

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

query I rowsort
SELECT cor0.col0 * 58 + + col0 AS col2 FROM tab1 AS cor0
----
177
3776
4720

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - 47 ) col0 FROM tab0
----
47
47
47

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1137
SELECT ALL - cor0.col1 DIV - cor0.col1 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-1137
SELECT ALL - cor0.col1 / - cor0.col1 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1139
SELECT + CAST ( - col2 AS INTEGER ) + col0 col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + col1 * + tab1.col1 AS col0 FROM tab1
----
100
169
676

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

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

query I rowsort
SELECT - ( 88 ) FROM tab1, tab2 cor0, tab2 AS cor1
----
27 values hashing to eb8cbefa7d831e1a0183e919e2caef32

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

query I rowsort
SELECT DISTINCT 33 * col1 FROM tab1 AS cor0
----
330
429
858

query I rowsort
SELECT DISTINCT + col1 * + col2 * 12 FROM tab0 cor0
----
1164
34056
89544

query I rowsort
SELECT - col2 * cor0.col2 + + col1 AS col0 FROM tab1 AS cor0
----
-2890
-3239
-9203

onlyif mysql # use DIV operator for integer division
query I rowsort label-1147
SELECT DISTINCT - col1 * ( + col1 ) + + col2 DIV ( col2 ) FROM tab1 cor0
----
-168
-675
-99

skipif mysql # not compatible
query I rowsort label-1147
SELECT DISTINCT - col1 * ( + col1 ) + + col2 / ( col2 ) FROM tab1 cor0
----
-168
-675
-99

query I rowsort
SELECT + col2 * 29 + + 40 FROM tab2 AS cor0
----
1142
794
823

query I rowsort
SELECT ALL - col1 + - ( - 49 ) * cor0.col1 AS col2 FROM tab1 AS cor0
----
1248
480
624

query I rowsort
SELECT DISTINCT + col1 * col0 + + col0 + cor0.col0 * + 58 AS col2 FROM tab2 AS cor0
----
6004
630
9204

query I rowsort
SELECT DISTINCT + 79 * tab0.col0 + + col1 FROM tab0
----
1982
2862
7122

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + + ( 93 ) AS col0 FROM tab1 AS cor0
----
93

query I rowsort
SELECT - 93 * - col1 - - col2 FROM tab0 AS cor0
----
8031
8545
9022

query I rowsort
SELECT 97 + - 74 FROM tab2 cor0
----
23
23
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-1160
SELECT cor0.col0 DIV + cor0.col0 + - cor0.col0 * ( + col0 ) DIV cor0.col0 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-1160
SELECT cor0.col0 / + cor0.col0 + - cor0.col0 * ( + col0 ) / cor0.col0 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT DISTINCT + col1 - + col1 * col0 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT + 59 * col0 * + col2 FROM tab1 AS cor0
----
215232
453120
9558

query I rowsort
SELECT + - 32 * 66 - col2 FROM tab0 cor0
----
-2113
-2145
-2194

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1165
SELECT DISTINCT col2 DIV + 19 AS col2 FROM tab1
----
2
3
5

skipif mysql # not compatible
query I rowsort label-1165
SELECT DISTINCT col2 / + 19 AS col2 FROM tab1
----
2
3
5

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

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

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

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

query I rowsort
SELECT 23 FROM tab2, tab2 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

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

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

query I rowsort
SELECT ALL + 86 * - col2 * - 41 AS col0 FROM tab0
----
116358
289132
3526

query I rowsort
SELECT DISTINCT - 23 AS col2 FROM tab2
----
-23

query I rowsort
SELECT ALL - + 88 * 71 FROM tab2 AS cor0
----
-6248
-6248
-6248

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

skipif mysql # not compatible
query I rowsort label-1175
SELECT ALL - + col0 * col1 / + col1 AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - - col1 + + col0 + + col0 AS col0 FROM tab2 AS cor0
----
175
215
45

query I rowsort
SELECT DISTINCT - 74 * + 81 FROM tab0 AS cor0
----
-5994

onlyif mysql # use DIV operator for integer division
query I rowsort label-1178
SELECT ALL - 78 DIV - 92 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1178
SELECT ALL - 78 / - 92 AS col0 FROM tab0
----
0
0
0

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

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

query I rowsort
SELECT DISTINCT - 13 FROM tab0, tab1 cor0
----
-13

query I rowsort
SELECT - col2 * - 32 AS col2 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT ALL col0 * - 35 + + col2 * - col1 FROM tab2 cor0
----
-1082
-3411
-4264

query I rowsort
SELECT DISTINCT - - ( + 51 ) * col0 AS col1 FROM tab0 AS cor0
----
1224
1785
4539

query I rowsort
SELECT col0 + cor0.col1 + + col1 FROM tab2 AS cor0
----
113
196
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1185
SELECT DISTINCT + CAST( cor0.col1 AS SIGNED ) + cor0.col0 * + 38 FROM tab2 AS cor0
----
297
3019
3023

skipif mysql # not compatible
query I rowsort label-1185
SELECT DISTINCT + CAST ( cor0.col1 AS INTEGER ) + cor0.col0 * + 38 FROM tab2 AS cor0
----
297
3019
3023

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

query I rowsort
SELECT DISTINCT + 0 + + 41 AS col0 FROM tab2
----
41

query I rowsort
SELECT + 81 * col2 * - col2 + + col1 * cor0.col1 + - ( - col0 ) FROM tab0 AS cor0
----
-536274
-80789
9363

query I rowsort
SELECT ALL 27 * cor0.col2 - 76 * + col1 AS col1 FROM tab2 AS cor0
----
-1627
-266
-3782

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1191
SELECT ALL - CAST( - col2 AS SIGNED ) + col0 + col0 FROM tab2
----
182
196
41

skipif mysql # not compatible
query I rowsort label-1191
SELECT ALL - CAST ( - col2 AS INTEGER ) + col0 + col0 FROM tab2
----
182
196
41

query I rowsort
SELECT ALL - 78 + + 13 * - col1 FROM tab0
----
-1196
-1261
-1339

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

query I rowsort
SELECT DISTINCT - col0 + ( - col2 ) * + col2 FROM tab1 AS cor0
----
-2919
-3313
-9296

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1196
SELECT DISTINCT - col2 DIV + col0 + - col2 * cor0.col2 FROM tab2 cor0
----
-1444
-676
-732

skipif mysql # not compatible
query I rowsort label-1196
SELECT DISTINCT - col2 / + col0 + - col2 * cor0.col2 FROM tab2 cor0
----
-1444
-676
-732

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

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

skipif mysql # not compatible
query I rowsort label-1198
SELECT - col0 * CAST ( - cor0.col1 AS INTEGER ) - + col1 AS col0 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT ALL + col2 * 9 + - 37 AS col1 FROM tab1 cor0
----
449
476
827

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

query I rowsort
SELECT DISTINCT - col0 * col2 * + col2 + col1 AS col1 FROM tab1 AS cor0
----
-207926
-737267
-8722

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1203
SELECT ALL - col1 + 3 DIV tab2.col0 - col0 FROM tab2
----
-137
-38
-96

skipif mysql # not compatible
query I rowsort label-1203
SELECT ALL - col1 + 3 / tab2.col0 - col0 FROM tab2
----
-137
-38
-96

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

skipif mysql # not compatible
query I rowsort label-1204
SELECT ALL - col2 / - 60 AS col1 FROM tab1 AS cor0
----
0
0
1

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1207
SELECT DISTINCT + col0 / + 1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT col0 + + col2 + tab2.col2 * col2 * + 36 AS col2 FROM tab2
----
24440
26278
52101

query I rowsort
SELECT + col1 * 34 * col1 FROM tab1
----
22984
3400
5746

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

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

query I rowsort
SELECT ALL + col2 + + 4 - - col1 * - tab1.col1 FROM tab1
----
-39
-618
-69

query I rowsort
SELECT ALL + 79 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

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

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

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

query I rowsort
SELECT 9 * col2 + col2 * col1 AS col1 FROM tab1 AS cor0
----
1083
1890
2112

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

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

query I rowsort
SELECT DISTINCT - + 60 * col1 FROM tab0 AS cor0
----
-5160
-5460
-5820

query I rowsort
SELECT DISTINCT + + ( - 23 ) + + col2 AS col0 FROM tab0 AS cor0
----
-22
10
59

query I rowsort
SELECT ALL + ( + col1 ) + + col1 * col0 AS col1 FROM tab1 AS cor0
----
104
1053
650

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

query I rowsort
SELECT DISTINCT + 75 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
75

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

query I rowsort
SELECT cor0.col2 + col0 * - 5 FROM tab2 AS cor0
----
-357
-364
-8

query I rowsort
SELECT - + 52 * col1 + - 20 + 93 AS col0 FROM tab0 AS cor0
----
-4399
-4659
-4971

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 * col2 col1 FROM tab0 cor0
----
1230
15
495

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * - col0 * col0 col0 FROM tab2 AS cor0
----
343
474552
493039

query I rowsort
SELECT - col0 + col1 * 2 - - ( - col2 ) FROM tab0 AS cor0
----
11
115
158

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1236
SELECT DISTINCT col0 DIV + 27 FROM tab1
----
0
2

skipif mysql # not compatible
query I rowsort label-1236
SELECT DISTINCT col0 / + 27 FROM tab1
----
0
2

query I rowsort
SELECT + col1 + col1 * - 7 * + col2 FROM tab1 AS cor0
----
-3980
-8723
-9802

query I rowsort
SELECT + ( - 85 ) FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 91e44ead5e72fa22f87a57243e232ede

query I rowsort
SELECT - 46 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 491ad1fb79fec0b5715ea54949d1aa2d

query I rowsort
SELECT ALL - ( + 4 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1242
SELECT col0 DIV - cor0.col0 + cor0.col1 * - col2 - + col1 FROM tab2 AS cor0
----
-1594
-664
-869

skipif mysql # not compatible
query I rowsort label-1242
SELECT col0 / - cor0.col0 + cor0.col1 * - col2 - + col1 FROM tab2 AS cor0
----
-1594
-664
-869

query I rowsort
SELECT ALL - 1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT + tab2.col2 * - 41 * - col2 + col1 FROM tab2
----
27775
29920
59221

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

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

skipif mysql # not compatible
query I rowsort label-1246
SELECT ALL + + 57 + - cor0.col1 / - col1 AS col2 FROM tab1 AS cor0
----
58
58
58

query I rowsort
SELECT ALL + 78 * + col0 + + cor0.col0 * + 79 AS col1 FROM tab2 AS cor0
----
1099
12246
12403

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col2 AS REAL ) AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - ( ( tab1.col0 ) + tab1.col2 ) FROM tab1
----
-121
-176
-57

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

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

query I rowsort
SELECT + cor0.col1 + - 85 * - col1 AS col0 FROM tab0 cor0
----
7396
7826
8342

query I rowsort
SELECT ( col0 * - col1 ) - tab1.col2 * col0 AS col1 FROM tab1
----
-240
-4288
-8720

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

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

query I rowsort
SELECT - 7 AS col0 FROM tab1
----
-7
-7
-7

query I rowsort
SELECT DISTINCT 90 * col2 + - 63 - - col1 FROM tab1 AS cor0
----
4823
5077
8590

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

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

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

query I rowsort
SELECT col1 + ( + 81 ) FROM tab2 AS cor0
----
112
140
98

query I rowsort
SELECT - col0 * + 40 AS col0 FROM tab0 AS cor0
----
-1400
-3560
-960

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

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

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

query I rowsort
SELECT DISTINCT + - col1 + + 96 AS col2 FROM tab2 AS cor0
----
37
65
79

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

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

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

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

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

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

query I rowsort
SELECT + ( + 80 ) + - col1 * col2 FROM tab0 AS cor0
----
-17
-2758
-7382

query I rowsort
SELECT 59 * - col0 * col1 AS col1 FROM tab0 AS cor0
----
-121776
-200305
-477841

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

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

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

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

query I rowsort
SELECT DISTINCT col0 + - col2 + - col0 * + tab1.col2 * tab1.col0 AS col1 FROM tab1
----
-233465
-537
-614416

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1277
SELECT DISTINCT - tab0.col0 + col1 - - col0 DIV - col1 col1 FROM tab0
----
2
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1277
SELECT DISTINCT - tab0.col0 + col1 - - col0 / - col1 col1 FROM tab0
----
2
62

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

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

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

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT ( + col1 ) <= col1 + + col0
----

query I rowsort
SELECT tab1.col0 FROM tab1 WHERE col1 NOT IN ( - col0 )
----
3
64
80

query I rowsort
SELECT ALL col0 * + col0 + - col1 AS col2 FROM tab1
----
-17
4086
6387

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT - col2 < NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1285
SELECT + col1 * col2 DIV + col1 + col2 FROM tab2
----
52
54
76

skipif mysql # not compatible
query I rowsort label-1285
SELECT + col1 * col2 / + col1 + col2 FROM tab2
----
52
54
76

query I rowsort
SELECT ALL - tab1.col0 + col2 * - col2 AS col0 FROM tab1
----
-2919
-3313
-9296

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1290
SELECT DISTINCT - col0 DIV - col1 + col1 + col1 AS col0 FROM tab2
----
119
38
62

skipif mysql # not compatible
query I rowsort label-1290
SELECT DISTINCT - col0 / - col1 + col1 + col1 AS col0 FROM tab2
----
119
38
62

query I rowsort
SELECT ALL + col0 + + col0 - - col1 AS col1 FROM tab0
----
134
167
269

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1293
SELECT DISTINCT col2 * - col0 + - col2 DIV col0 + col1 * tab2.col1 AS col1 FROM tab2
----
-2713
1453
769

skipif mysql # not compatible
query I rowsort label-1293
SELECT DISTINCT col2 * - col0 + - col2 / col0 + col1 * tab2.col1 AS col1 FROM tab2
----
-2713
1453
769

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

query I rowsort
SELECT col1 AS col0 FROM tab0 WHERE col1 <= + col1 + col0 / col0
----
86
91
97

query I rowsort
SELECT + col2 + col0 FROM tab2 WHERE ( col0 ) NOT IN ( + col2 * col1 )
----
104
117
34

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col0 + - col2 col0 FROM tab0 AS cor0
----
1224
543
7839

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 col2 FROM tab0, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT ( - col0 * - col0 * col0 ) = NULL
----

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

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

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

skipif mysql # not compatible
query I rowsort label-1306
SELECT + col2 * - col1 / col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - col0 * ( 13 ) + + col0 AS col2 FROM tab0 AS cor0
----
-1068
-288
-420

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

query I rowsort
SELECT ALL + col2 * 24 FROM tab0 AS cor0
----
1968
24
792

query I rowsort
SELECT ALL col1 * - col2 * 26 AS col0 FROM tab1
----
-14820
-32448
-36504

query I rowsort
SELECT DISTINCT - col2 * + ( - 34 * col2 ) + col2 * ( - col0 ) FROM tab0 AS cor0
----
-1
221318
36234

query I rowsort
SELECT + col0 + + 51 FROM tab0 AS cor0
----
140
75
86

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

query I rowsort
SELECT DISTINCT col1 + - col0 + - cor0.col2 FROM tab1 AS cor0
----
-111
-163
-31

onlyif mysql # use DIV operator for integer division
query I rowsort label-1315
SELECT ALL tab2.col2 * + col0 DIV col0 AS col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-1315
SELECT ALL tab2.col2 * + col0 / col0 AS col0 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT + col0 * + cor0.col2 + 5 + + cor0.col2 FROM tab0 AS cor0
----
41
7385
830

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

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

query I rowsort
SELECT DISTINCT tab0.col2 * - col1 FROM tab0 WHERE + col1 + + col1 <= + col1 * col2 - col0 * - col2
----
-2838
-7462

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

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

query I rowsort
SELECT DISTINCT col2 * - col2 + + col2 AS col1 FROM tab2
----
-1406
-650
-702

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1330
SELECT DISTINCT - ( col0 ) DIV - 31 FROM tab1 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-1330
SELECT DISTINCT - ( col0 ) / - 31 FROM tab1 AS cor0
----
0
2

query I rowsort
SELECT DISTINCT - col0 * - col0 + col2 * col2 AS col2 FROM tab1 AS cor0
----
15616
2925
7345

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

query I rowsort
SELECT DISTINCT col0 * col1 * 90 AS col2 FROM tab2
----
120870
19530
414180

query I rowsort
SELECT DISTINCT - col1 - + col1 * 61 FROM tab0 AS cor0
----
-5332
-5642
-6014

onlyif mysql # use DIV operator for integer division
query I rowsort label-1335
SELECT + - col2 * + col0 + col1 DIV col2 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-1335
SELECT + - col2 * + col0 + col1 / col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL col1 + col1 + + ( - col0 ) AS col2 FROM tab1 AS cor0
----
-44
-54
49

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

query I rowsort
SELECT DISTINCT - cor0.col1 * - col1 + 94 AS col0 FROM tab1 AS cor0
----
194
263
770

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + 36 col2 FROM tab2 cor0
----
252
2808
2844

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

query I rowsort
SELECT + - col1 * - 73 AS col2 FROM tab2 AS cor0
----
1241
2263
4307

query I rowsort
SELECT col1 * col0 * 23 AS col1 FROM tab1 cor0
----
14720
1794
23920

query I rowsort
SELECT + col2 * 90 AS col1 FROM tab1 AS cor0
----
4860
5130
8640

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

query I rowsort
SELECT - 23 * - col1 AS col1 FROM tab2 AS cor0
----
1357
391
713

query I rowsort
SELECT DISTINCT 63 * + col0 FROM tab0 AS cor0
----
1512
2205
5607

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

query I rowsort
SELECT + ( + col2 ) * + cor0.col0 + - ( col1 ) * col2 AS col1 FROM tab1 AS cor0
----
-1242
3078
6432

query I rowsort
SELECT 15 + col1 * + cor0.col1 + + 25 * cor0.col1 AS col2 FROM tab0 AS cor0
----
10571
11849
9561

query I rowsort
SELECT 35 * col0 AS col2 FROM tab1
----
105
2240
2800

query I rowsort
SELECT DISTINCT - 8 * + col1 FROM tab0
----
-688
-728
-776

query I rowsort
SELECT - + 40 * - col2 AS col0 FROM tab1 cor0
----
2160
2280
3840

query I rowsort
SELECT DISTINCT + 10 FROM tab1, tab2, tab0 cor0
----
10

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

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

skipif mysql # not compatible
query I rowsort label-1355
SELECT DISTINCT 58 / - col1 AS col2 FROM tab0
----
0

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

query I rowsort
SELECT DISTINCT - col2 * - col2 * col1 FROM tab0 AS cor0
----
611884
93654
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1358
SELECT ALL - col1 + + col1 * cor0.col1 DIV - col1 + col2 AS col0 FROM tab1 AS cor0
----
2
37
70

skipif mysql # not compatible
query I rowsort label-1358
SELECT ALL - col1 + + col1 * cor0.col1 / - col1 + col2 AS col0 FROM tab1 AS cor0
----
2
37
70

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

query I rowsort
SELECT ALL col2 + col0 + col0 AS col0 FROM tab1
----
185
256
60

query I rowsort
SELECT ALL col1 + col0 + col2 * + col2 FROM tab1
----
2945
3323
9309

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

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

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

query I rowsort
SELECT ( - 94 + col1 ) * col2 FROM tab0
----
-246
-264
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-1365
SELECT tab2.col0 DIV 35 AS col2 FROM tab2
----
0
2
2

skipif mysql # not compatible
query I rowsort label-1365
SELECT tab2.col0 / 35 AS col2 FROM tab2
----
0
2
2

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

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

query I rowsort
SELECT + - col2 * 7 FROM tab0 AS cor0
----
-231
-574
-7

query I rowsort
SELECT ALL 90 - + 42 * col0 FROM tab0
----
-1380
-3648
-918

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

query I rowsort
SELECT DISTINCT 58 * 76 * - col1 - - col2 AS col1 FROM tab1
----
-114554
-44023
-57208

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

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

query I rowsort
SELECT - + col1 + + cor0.col1 + - col2 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

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

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

query I rowsort
SELECT - + 23 * - col1 - - col1 FROM tab0 AS cor0
----
2064
2184
2328

onlyif mysql # use DIV operator for integer division
query I rowsort label-1378
SELECT DISTINCT col2 + col0 DIV - cor0.col1 AS col1 FROM tab2 cor0
----
25
27
34

skipif mysql # not compatible
query I rowsort label-1378
SELECT DISTINCT col2 + col0 / - cor0.col1 AS col1 FROM tab2 cor0
----
25
27
34

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

query I rowsort
SELECT 34 - - col0 * - col1 AS col1 FROM tab1 AS cor0
----
-1006
-44
-606

onlyif mysql # use DIV operator for integer division
query I rowsort label-1381
SELECT + 52 - + col2 DIV - col1 FROM tab0 AS cor0
----
52
52
52

skipif mysql # not compatible
query I rowsort label-1381
SELECT + 52 - + col2 / - col1 FROM tab0 AS cor0
----
52
52
52

query I rowsort
SELECT - - ( + col2 ) * - col2 + col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

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

query I rowsort
SELECT DISTINCT + + 88 + col2 FROM tab0 AS cor0
----
121
170
89

query I rowsort
SELECT col1 * 30 * + col1 + - col2 * - col1 * - col0 FROM tab0
----
-415688
153768
278875

query I rowsort
SELECT - 28 * - 47 * tab0.col2 + 50 FROM tab0
----
107962
1366
43478

query I rowsort
SELECT DISTINCT + tab1.col1 * ( col1 ) AS col0 FROM tab1
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-1388
SELECT ALL - 9 * - col1 + col2 * 61 DIV col0 FROM tab2
----
182
514
551

skipif mysql # not compatible
query I rowsort label-1388
SELECT ALL - 9 * - col1 + col2 * 61 / col0 FROM tab2
----
182
514
551

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

query I rowsort
SELECT 71 * col2 AS col0 FROM tab1
----
3834
4047
6816

query I rowsort
SELECT DISTINCT - 38 * col1 + + 65 FROM tab1
----
-315
-429
-923

query I rowsort
SELECT DISTINCT col2 + col2 * col2 AS col2 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT DISTINCT 18 * + cor0.col1 + - 25 FROM tab0 cor0
----
1523
1613
1721

query I rowsort
SELECT ALL + col2 + - col2 * 50 AS col1 FROM tab1 AS cor0
----
-2646
-2793
-4704

query I rowsort
SELECT DISTINCT - 23 - + 38 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
-61

query I rowsort
SELECT + ( 47 ) AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT ALL + col1 + 61 * - col1 AS col2 FROM tab2
----
-1020
-1860
-3540

query I rowsort
SELECT ALL - col0 + 59 AS col0 FROM tab0
----
-30
24
35

query I rowsort
SELECT ALL + col2 + ( + 26 ) * - col2 FROM tab1
----
-1350
-1425
-2400

query I rowsort
SELECT DISTINCT col1 * col0 + + 30 FROM tab2
----
1373
247
4632

query I rowsort
SELECT ALL - col1 + col2 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
111
163
31

query I rowsort
SELECT cor0.col1 * col2 * col1 + col0 * + 4 AS col0 FROM tab1 AS cor0
----
16544
36516
5956

query I rowsort
SELECT DISTINCT ( - 54 ) FROM tab2, tab2 AS cor0
----
-54

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col1 + + cor0.col0 * cor0.col1 col0 FROM tab0 AS cor0
----
2011
3299
8090

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

query I rowsort
SELECT DISTINCT - col1 + col2 + + col0 AS col1 FROM tab1 cor0
----
111
163
31

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

query I rowsort
SELECT DISTINCT + 44 + + cor0.col1 FROM tab0 AS cor0
----
130
135
141

query I rowsort
SELECT DISTINCT + - col0 - - 6 FROM tab1 AS cor0
----
-58
-74
3

query I rowsort
SELECT - - col1 * - col1 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT ALL - 15 * col0 - - col0 FROM tab2 AS cor0
----
-1092
-1106
-98

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

query I rowsort
SELECT - col2 + 52 * col1 FROM tab1
----
1298
463
580

query I rowsort
SELECT DISTINCT col1 + 89 FROM tab1 AS cor0
----
102
115
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-1416
SELECT DISTINCT - - col1 + 30 + col2 DIV + col1 FROM tab1 cor0
----
45
50
58

skipif mysql # not compatible
query I rowsort label-1416
SELECT DISTINCT - - col1 + 30 + col2 / + col1 FROM tab1 cor0
----
45
50
58

query I rowsort
SELECT DISTINCT - 15 * 9 AS col2 FROM tab2 AS cor0
----
-135

query I rowsort
SELECT ALL - + 64 * - cor0.col1 + col0 * + 84 + - col1 * + col2 FROM tab0 AS cor0
----
4682
5838
9051

query I rowsort
SELECT ALL + col0 + - ( col2 ) * 87 FROM tab1 cor0
----
-4695
-4895
-8272

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

query I rowsort
SELECT - + 27 + - ( cor0.col0 ) * - col0 FROM tab2 AS cor0
----
22
6057
6214

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

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

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

onlyif mysql # use DIV operator for integer division
query I rowsort label-1425
SELECT DISTINCT - + col0 + - col0 DIV cor0.col0 AS col2 FROM tab1 cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-1425
SELECT DISTINCT - + col0 + - col0 / cor0.col0 AS col2 FROM tab1 cor0
----
-4
-65
-81

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

query I rowsort
SELECT + col1 * + cor0.col0 + 88 FROM tab1 AS cor0
----
1128
166
728

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

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

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

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

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

query I rowsort
SELECT col0 + col0 + + col2 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT + col1 - - cor0.col2 * 97 * + col2 FROM tab2 AS cor0
----
140085
65631
70744

query I rowsort
SELECT - col1 * + 35 - col2 AS col0 FROM tab2 AS cor0
----
-1112
-2091
-633

query I rowsort
SELECT DISTINCT - col2 + - 69 * - col2 AS col1 FROM tab0 cor0
----
2244
5576
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + + 7 * - 65 col0 FROM tab1 AS cor0
----
-429
-442
-445

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

query I rowsort
SELECT col2 - + 47 FROM tab0 cor0
----
-14
-46
35

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

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

query I rowsort
SELECT + ( col0 * - ( + 64 ) ) - tab2.col0 FROM tab2
----
-455
-5070
-5135

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1441
SELECT + col0 + + col0 - CAST( 18 AS SIGNED ) AS col0 FROM tab0
----
160
30
52

skipif mysql # not compatible
query I rowsort label-1441
SELECT + col0 + + col0 - CAST ( 18 AS INTEGER ) AS col0 FROM tab0
----
160
30
52

query I rowsort
SELECT - col1 * col1 + - 99 FROM tab0 AS cor0
----
-7495
-8380
-9508

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col0 * + 7 AS col0 FROM tab2 AS cor0
----
49
546
553

query I rowsort
SELECT DISTINCT - col2 * 23 + - col0 + - col0 AS col0 FROM tab0 AS cor0
----
-2064
-807
-93

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

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

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

query I rowsort
SELECT + 80 - - tab1.col1 FROM tab1
----
106
90
93

query I rowsort
SELECT 89 + col2 + + ( tab2.col2 + + col0 ) FROM tab2
----
150
219
244

query I rowsort
SELECT - col0 * 57 AS col0 FROM tab1 AS cor0
----
-171
-3648
-4560

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

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

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

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

query I rowsort
SELECT ALL col1 * - col2 * ( - cor0.col1 ) - ( ( col0 ) + - cor0.col2 ) AS col2 FROM tab1 cor0
----
16240
36555
5693

query I rowsort
SELECT ALL - - col0 + 60 * ( - col2 ) AS col1 FROM tab1 AS cor0
----
-3237
-3356
-5680

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

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

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

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

query I rowsort
SELECT - ( 61 ) + col2 AS col2 FROM tab0 AS cor0
----
-28
-60
21

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

query I rowsort
SELECT + col0 * col1 - + cor0.col0 * col0 FROM tab0 AS cor0
----
1488
178
2170

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1467
SELECT - - col0 * col2 + - col1 DIV + 73 FROM tab0 AS cor0
----
34
7297
791

skipif mysql # not compatible
query I rowsort label-1467
SELECT - - col0 * col2 + - col1 / + 73 FROM tab0 AS cor0
----
34
7297
791

query I rowsort
SELECT + cor0.col0 * + col0 + ( + col0 ) FROM tab0 AS cor0
----
1260
600
8010

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1471
SELECT - - col0 - col1 DIV col0 FROM tab0 AS cor0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-1471
SELECT - - col0 - col1 / col0 FROM tab0 AS cor0
----
21
33
88

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

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

query I rowsort
SELECT + col1 * col0 * + 81 AS col2 FROM tab0 AS cor0
----
167184
274995
656019

query I rowsort
SELECT DISTINCT - ( - col2 ) + col2 * - col2 AS col1 FROM tab2 AS cor0
----
-1406
-650
-702

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

query I rowsort
SELECT DISTINCT col2 + 32 * col2 * cor0.col1 FROM tab1 cor0
----
18297
40032
44982

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1479
SELECT - 46 DIV - 65 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-1479
SELECT - 46 / - 65 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

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

query I rowsort
SELECT + cor0.col1 + - ( 18 ) * - col0 AS col1 FROM tab0 AS cor0
----
1693
518
727

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1483
SELECT DISTINCT + col1 DIV 3 AS col1 FROM tab0 AS cor0
----
28
30
32

skipif mysql # not compatible
query I rowsort label-1483
SELECT DISTINCT + col1 / 3 AS col1 FROM tab0 AS cor0
----
28
30
32

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

query I rowsort
SELECT col0 * - 78 * 38 + col2 * + col2 * - 85 FROM tab0 cor0
----
-103825
-163701
-835336

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

query I rowsort
SELECT DISTINCT + ( col1 ) * 70 FROM tab0
----
6020
6370
6790

query I rowsort
SELECT ALL + 52 * + 24 + col2 FROM tab0 AS cor0
----
1249
1281
1330

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

skipif mysql # not compatible
query I rowsort label-1489
SELECT ALL + col2 / col2 + - col0 AS col1 FROM tab1 cor0
----
-2
-63
-79

query I rowsort
SELECT ALL 71 * + cor1.col2 FROM tab2, tab2 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 3a42dd13422979b7f821af092a73f732

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

query I rowsort
SELECT col2 * tab2.col2 - - col2 FROM tab2
----
1482
702
756

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

query I rowsort
SELECT - 12 FROM tab1, tab2, tab1 AS cor0, tab0
----
81 values hashing to 60b4654b2477631ac8f4a95ec4a22fd3

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

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

query I rowsort
SELECT ALL ( 40 + - col1 ) AS col0 FROM tab0
----
-46
-51
-57

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

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

query I rowsort
SELECT DISTINCT + cor0.col1 + cor1.col2 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
9 values hashing to b8b62762005dc0d7237145d0538edb34

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1500
SELECT + col1 DIV ( col1 ) + - 44 FROM tab1
----
-43
-43
-43

skipif mysql # not compatible
query I rowsort label-1500
SELECT + col1 / ( col1 ) + - 44 FROM tab1
----
-43
-43
-43

query I rowsort
SELECT col2 * + col0 + + col1 * col1 * + col2 FROM tab2
----
13984
26136
92534

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

skipif mysql # not compatible
query I rowsort label-1502
SELECT ALL - + col0 + + CAST ( col1 * + col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
2040
3360
8010

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

query I rowsort
SELECT DISTINCT + col0 * 25 * + 13 AS col2 FROM tab2 AS cor0
----
2275
25350
25675

query I rowsort
SELECT DISTINCT + cor0.col2 * - 27 AS col0 FROM tab1 AS cor0
----
-1458
-1539
-2592

query I rowsort
SELECT ALL ( - col1 ) + + col0 + + 84 AS col0 FROM tab2
----
103
146
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 15 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT DISTINCT + + col2 + col2 * col2 AS col2 FROM tab1 AS cor0
----
2970
3306
9312

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

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

query I rowsort
SELECT - col1 * - col1 + col0 * col2 AS col0 FROM tab2
----
1150
3291
5509

query I rowsort
SELECT - col1 + + col0 * - col0 FROM tab1
----
-35
-4106
-6413

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

skipif mysql # not compatible
query I rowsort label-1512
SELECT col2 / - 20 + + col2 / col1 FROM tab1
----
0
3
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col0 * col0 col1 FROM tab2
----
343
474552
493039

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

query I rowsort
SELECT + 33 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1516
SELECT - CAST( col1 AS SIGNED ) + + col0 * col0 FROM tab1
----
-17
4086
6387

skipif mysql # not compatible
query I rowsort label-1516
SELECT - CAST ( col1 AS INTEGER ) + + col0 * col0 FROM tab1
----
-17
4086
6387

query I rowsort
SELECT DISTINCT - + 5 * col1 FROM tab2 AS cor0
----
-155
-295
-85

query I rowsort
SELECT 46 + + col2 AS col0 FROM tab0 AS cor0
----
128
47
79

query I rowsort
SELECT ALL - col0 * - col2 + col2 - + col1 AS col2 FROM tab0 AS cor0
----
-61
7289
739

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

skipif mysql # not compatible
query I rowsort label-1520
SELECT CAST ( + col0 AS INTEGER ) * - col0 * col2 AS col1 FROM tab1
----
-233472
-486
-614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 22 + + col2 col1 FROM tab0
----
-21
11
60

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 48 + - 32 + - col2 * col1 col1 FROM tab1
----
-1232
-1388
-554

query I rowsort
SELECT - 30 - + col2 FROM tab1
----
-126
-84
-87

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

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

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

query I rowsort
SELECT DISTINCT 95 + col0 FROM tab1
----
159
175
98

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

skipif mysql # not compatible
query I rowsort label-1528
SELECT - col2 * col2 + CAST ( col0 AS INTEGER ) * col2 FROM tab1 AS cor0
----
-1536
-2754
399

query I rowsort
SELECT DISTINCT - + ( col1 ) * - ( - 50 ) + + col2 FROM tab0 AS cor0
----
-4267
-4468
-4849

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

query I rowsort
SELECT ALL - - cor0.col1 * - col1 * col0 + - ( col2 ) AS col2 FROM tab1 cor0
----
-13616
-2082
-6457

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 38 * - col2 col2 FROM tab2 AS cor0
----
1026
1444
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-1533
SELECT DISTINCT - - col0 DIV - col1 + col0 FROM tab1 AS cor0
----
3
58
74

skipif mysql # not compatible
query I rowsort label-1533
SELECT DISTINCT - - col0 / - col1 + col0 FROM tab1 AS cor0
----
3
58
74

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

query I rowsort
SELECT + 35 + cor0.col0 FROM tab1 AS cor0
----
115
38
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 8 * col1 * - col0 + 75 * + col2 col2 FROM tab2
----
13594
3761
38766

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1537
SELECT - - cor0.col2 * - col0 * - ( + ( + cor0.col2 ) ) + CAST( + 93 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
208029
737373
8841

skipif mysql # not compatible
query I rowsort label-1537
SELECT - - cor0.col2 * - col0 * - ( + ( + cor0.col2 ) ) + CAST ( + 93 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
208029
737373
8841

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

query I rowsort
SELECT DISTINCT + + cor0.col1 * ( cor0.col1 ) + col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT col0 * 57 * + 94 AS col2 FROM tab1 AS cor0
----
16074
342912
428640

query I rowsort
SELECT DISTINCT - col1 * - 61 FROM tab1 cor0
----
1586
610
793

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1543
SELECT + col1 DIV + CAST( col2 AS SIGNED ) + col2 FROM tab0 AS cor0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-1543
SELECT + col1 / + CAST ( col2 AS INTEGER ) + col2 FROM tab0 AS cor0
----
35
83
98

query I rowsort
SELECT ALL - col1 * - col1 + ( - 67 ) * - col0 * - col0 FROM tab0
----
-31196
-522426
-72666

query I rowsort
SELECT col1 * cor0.col0 + - 13 * - col0 FROM tab2 AS cor0
----
2370
308
5616

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1551
SELECT CAST( col0 AS SIGNED ) DIV + col1 AS col2 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-1551
SELECT CAST ( col0 AS INTEGER ) / + col1 AS col2 FROM tab1
----
0
6
6

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

skipif mysql # not compatible
query I rowsort label-1552
SELECT DISTINCT - - 32 + + col0 / cor0.col2 FROM tab0 AS cor0
----
32
33
67

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT col2 * + col0 + ( + 21 ) * cor0.col2 FROM tab0 AS cor0
----
1485
56
9020

query I rowsort
SELECT - 15 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 1172c9a62bdad7db0def9205c06ee1f2

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

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

query I rowsort
SELECT + - col1 + col1 * + cor0.col1 * - 30 AS col2 FROM tab0 AS cor0
----
-221966
-248521
-282367

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

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

skipif mysql # not compatible
query I rowsort label-1567
SELECT - CAST ( col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-1568
SELECT 24 * col1 + cor0.col2 * col0 DIV + cor0.col0 col0 FROM tab1 AS cor0
----
297
408
678

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1568
SELECT 24 * col1 + cor0.col2 * col0 / + cor0.col0 col0 FROM tab1 AS cor0
----
297
408
678

query I rowsort
SELECT col2 * - ( - col0 + 90 ) AS col0 FROM tab1 cor0
----
-1482
-4698
-960

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

query I rowsort
SELECT ALL - tab1.col0 * + ( 33 ) AS col2 FROM tab1
----
-2112
-2640
-99

query I rowsort
SELECT ALL 25 FROM tab2, tab0 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

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

skipif mysql # not compatible
query I rowsort label-1573
SELECT DISTINCT - col1 / - 90 FROM tab1
----
0

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 * - col2 + col0 + 43 col1 FROM tab2 AS cor0
----
-1491
-1624
-2234

query I rowsort
SELECT - 28 - + col2 FROM tab1 AS cor0
----
-124
-82
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-1578
SELECT - col2 * - col2 + + col0 * + 37 * col1 + cor0.col2 DIV + 45 AS col0 FROM tab2 AS cor0
----
170950
51135
8758

skipif mysql # not compatible
query I rowsort label-1578
SELECT - col2 * - col2 + + col0 * + 37 * col1 + cor0.col2 / + 45 AS col0 FROM tab2 AS cor0
----
170950
51135
8758

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

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

skipif mysql # not compatible
query I rowsort label-1580
SELECT DISTINCT 38 / cor0.col1 AS col0 FROM tab2 AS cor0
----
0
1
2

query I rowsort
SELECT ALL - col1 + col0 * 51 * - cor0.col0 FROM tab0 AS cor0
----
-29462
-404062
-62572

query I rowsort
SELECT ALL + ( cor0.col2 ) - ( 75 + col0 ) * + ( - 83 ) FROM tab0 AS cor0
----
13694
8250
9131

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1583
SELECT ALL + col2 - + col0 * - CAST( 65 + col1 AS SIGNED ) col2 FROM tab1 AS cor0
----
327
4857
6336

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1583
SELECT ALL + col2 - + col0 * - CAST ( 65 + col1 AS INTEGER ) col2 FROM tab1 AS cor0
----
327
4857
6336

query I rowsort
SELECT DISTINCT 8 + + col1 FROM tab1 AS cor0
----
18
21
34

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

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

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

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

query I rowsort
SELECT + col0 - - 28 FROM tab2 AS cor0
----
106
107
35

query I rowsort
SELECT col2 * + ( + col0 ) * + tab1.col2 AS col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT + - col2 * ( 94 ) FROM tab2 AS cor0
----
-2444
-2538
-3572

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

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

query I rowsort
SELECT - col2 * col2 * + col2 FROM tab1 AS cor0
----
-157464
-185193
-884736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - 40 col0 FROM tab2 cor0
----
-280
-3120
-3160

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

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

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

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

query I rowsort
SELECT col2 * 28 * col0 AS col0 FROM tab0
----
204344
22176
980

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1601
SELECT ALL - - CAST( - 60 AS SIGNED ) * col0 + + ( ( cor0.col1 ) ) + + col1 FROM tab0 AS cor0
----
-1268
-1906
-5158

skipif mysql # not compatible
query I rowsort label-1601
SELECT ALL - - CAST ( - 60 AS INTEGER ) * col0 + + ( ( cor0.col1 ) ) + + col1 FROM tab0 AS cor0
----
-1268
-1906
-5158

query I rowsort
SELECT - col1 + - col1 * - 66 AS col1 FROM tab0 AS cor0
----
5590
5915
6305

query I rowsort
SELECT - + 17 * col0 AS col0 FROM tab2 AS cor0
----
-119
-1326
-1343

onlyif mysql # use DIV operator for integer division
query I rowsort label-1604
SELECT + col1 * col1 DIV col0 + + col2 * col1 FROM tab0 AS cor0
----
3146
365
7555

skipif mysql # not compatible
query I rowsort label-1604
SELECT + col1 * col1 / col0 + + col2 * col1 FROM tab0 AS cor0
----
3146
365
7555

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1607
SELECT - col1 * CAST( - 20 AS SIGNED ) col1 FROM tab1 AS cor0
----
200
260
520

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1607
SELECT - col1 * CAST ( - 20 AS INTEGER ) col1 FROM tab1 AS cor0
----
200
260
520

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

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

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

query I rowsort
SELECT DISTINCT - + cor0.col2 + + 63 * + 89 AS col0 FROM tab0 AS cor0
----
5525
5574
5606

query I rowsort
SELECT 67 + col1 AS col0 FROM tab0
----
153
158
164

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

query I rowsort
SELECT DISTINCT - - col0 + cor0.col0 * col2 * - col1 AS col1 FROM tab1 cor0
----
-36416
-4209
-99760

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

query I rowsort
SELECT ALL - cor0.col0 + col0 AS col1 FROM tab1 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1616
SELECT ALL col1 * col2 + + col2 DIV + col1 FROM tab2 AS cor0
----
1534
648
837

skipif mysql # not compatible
query I rowsort label-1616
SELECT ALL col1 * col2 + + col2 / + col1 FROM tab2 AS cor0
----
1534
648
837

query I rowsort
SELECT DISTINCT + + col1 - cor0.col2 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1618
SELECT ALL cor0.col1 DIV + col0 AS col0 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-1618
SELECT ALL cor0.col1 / + col0 AS col0 FROM tab0 cor0
----
1
2
3

query I rowsort
SELECT col0 * + col2 + col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT - - col0 * + col2 + + col1 AS col2 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-1621
SELECT DISTINCT - col0 + - col2 * col2 DIV - col0 AS col2 FROM tab1 AS cor0
----
-14
35
969

skipif mysql # not compatible
query I rowsort label-1621
SELECT DISTINCT - col0 + - col2 * col2 / - col0 AS col2 FROM tab1 AS cor0
----
-14
35
969

query I rowsort
SELECT ALL - col0 * + col0 * cor0.col0 + - col0 AS col0 FROM tab1 cor0
----
-262208
-30
-512080

onlyif mysql # use DIV operator for integer division
query I rowsort label-1623
SELECT ALL - + col1 + col2 DIV col0 AS col1 FROM tab2 AS cor0
----
-17
-28
-59

skipif mysql # not compatible
query I rowsort label-1623
SELECT ALL - + col1 + col2 / col0 AS col1 FROM tab2 AS cor0
----
-17
-28
-59

query I rowsort
SELECT ALL + cor0.col1 * - col0 + col1 * col2 * col0 FROM tab0 cor0
----
0
656019
66048

query I rowsort
SELECT DISTINCT + col0 + col1 + col1 AS col0 FROM tab1 cor0
----
106
55
84

query I rowsort
SELECT ALL col0 * - col2 + cor0.col1 * cor0.col2 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
2052
36342
8544

query I rowsort
SELECT col1 * tab1.col1 + + col1 FROM tab1
----
110
182
702

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE ( - col2 * - col1 ) < NULL
----

query I rowsort
SELECT col0 + - col2 - - tab2.col2 FROM tab2
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-1630
SELECT ALL - + cor0.col1 DIV + col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-1630
SELECT ALL - + cor0.col1 / + col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT - - cor0.col0 + col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT col0 * col2 + col1 FROM tab2
----
2087
220
3019

query I rowsort
SELECT - col2 + tab1.col0 + - col0 FROM tab1
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1634
SELECT - col2 DIV col1 + col2 FROM tab1 AS cor0
----
52
52
89

skipif mysql # not compatible
query I rowsort label-1634
SELECT - col2 / col1 + col2 FROM tab1 AS cor0
----
52
52
89

query I rowsort
SELECT - cor0.col1 * + col2 + + cor0.col0 * col1 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT DISTINCT + col0 - col1 * col2 FROM tab1
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-1637
SELECT + col2 + - col2 * col1 DIV col2 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-1637
SELECT + col2 + - col2 * col1 / col2 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL col2 + - col1 + col1 * col2 FROM tab0
----
1
2785
7453

query I rowsort
SELECT col2 * - col0 + col2 AS col0 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT - col0 + - col1 * tab1.col2 * + tab1.col0 + - col1 AS col1 FROM tab1
----
-36554
-4241
-99933

onlyif mysql # use DIV operator for integer division
query I rowsort label-1641
SELECT + tab0.col2 + col1 + col1 DIV col2 AS col2 FROM tab0
----
121
174
195

skipif mysql # not compatible
query I rowsort label-1641
SELECT + tab0.col2 + col1 + col1 / col2 AS col2 FROM tab0
----
121
174
195

query I rowsort
SELECT ALL col0 * + col0 + + col0 AS col0 FROM tab0
----
1260
600
8010

query I rowsort
SELECT col0 * - col0 + ( - cor0.col2 ) FROM tab2 AS cor0
----
-6110
-6279
-76

query I rowsort
SELECT - col0 * col2 + + col1 * ( col1 + col0 ) * - col2 FROM tab2 AS cor0
----
-212186
-31995
-65018

query I rowsort
SELECT DISTINCT + 62 AS col0 FROM tab1, tab2 AS cor0
----
62

query I rowsort
SELECT ALL - col1 + - col2 + col0 FROM tab0
----
-63
-84
-95

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE col2 + col1 IN ( tab1.col0 - col0 / - col0 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT - col2 NOT IN ( col0 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT + col2 < NULL
----

query I rowsort
SELECT - 56 AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to a228dfb9ede9780b082a5a3dfb2fca80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1651
SELECT ALL + 13 DIV + col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1651
SELECT ALL + 13 / + col0 FROM tab0
----
0
0
0

query I rowsort
SELECT - col0 * col1 * 68 FROM tab2 AS cor0
----
-14756
-312936
-91324

onlyif mysql # use DIV operator for integer division
query I rowsort label-1653
SELECT - - 99 DIV col2 FROM tab0 AS cor0
----
1
3
99

skipif mysql # not compatible
query I rowsort label-1653
SELECT - - 99 / col2 FROM tab0 AS cor0
----
1
3
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab2 WHERE NOT NULL IN ( - col1 )
----

query I rowsort
SELECT DISTINCT col0 - col2 * col1 * + col0 FROM tab1
----
-36416
-4209
-99760

query I rowsort
SELECT col0 + - col2 * col0 * + col1 AS col0 FROM tab1
----
-36416
-4209
-99760

query III rowsort
SELECT * FROM tab2 WHERE col1 NOT IN ( tab2.col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT col2 * col1 + - col0 - tab1.col1 * + col0 AS col2 FROM tab1
----
-134
128
1323

query I rowsort
SELECT ALL + col2 + col0 * + tab1.col1 AS col1 FROM tab1
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col1 - col0 col0 FROM tab2
----
-1612
-725
-844

query I rowsort
SELECT ALL col1 + col2 * col2 AS col0 FROM tab1 cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT col2 + col0 + + col1 AS col0 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT DISTINCT tab2.col2 + col2 FROM tab2 WHERE NOT ( + col1 ) NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT col2 + + col1 FROM tab1 WHERE NOT ( col2 ) <= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1665
SELECT tab1.col0 + col0 DIV - col0 AS col1 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-1665
SELECT tab1.col0 + col0 / - col0 AS col1 FROM tab1
----
2
63
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col1 + tab2.col0 col2 FROM tab2
----
3559
368
968

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL > col0
----

query I rowsort
SELECT ALL col0 * - col2 * + col0 + col2 AS col2 FROM tab1
----
-233415
-432
-614304

query I rowsort
SELECT col1 + col2 FROM tab1 WHERE NULL NOT BETWEEN - col0 / col0 + + col0 AND col1
----

query I rowsort
SELECT DISTINCT - tab2.col2 * col0 + + tab2.col0 AS col1 FROM tab2
----
-182
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-1671
SELECT col0 + + col2 DIV - ( col1 + col0 ) AS col1 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-1671
SELECT col0 + + col2 / - ( col1 + col0 ) AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - + 0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 62 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to d2579f9395350eda865ff3a2d38a74f6

query I rowsort
SELECT - + 80 * cor0.col1 AS col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 1fcf6129aa5585b44cae00d80bd7a5c5

query I rowsort
SELECT DISTINCT col2 - col1 * + col1 FROM tab2
----
-251
-3455
-934

onlyif mysql # use DIV operator for integer division
query I rowsort label-1676
SELECT DISTINCT col1 + - col1 DIV 75 - - 67 AS col0 FROM tab0
----
152
157
163

skipif mysql # not compatible
query I rowsort label-1676
SELECT DISTINCT col1 + - col1 / 75 - - 67 AS col0 FROM tab0
----
152
157
163

query I rowsort
SELECT 95 - - col1 * - ( col2 ) * - col0 FROM tab1 AS cor0
----
36575
4307
99935

query I rowsort
SELECT ALL - + col2 * + col2 + col0 AS col1 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT ALL + - 80 * col1 FROM tab1 AS cor0
----
-1040
-2080
-800

query I rowsort
SELECT DISTINCT + 71 * + col0 AS col2 FROM tab1 AS cor0
----
213
4544
5680

query I rowsort
SELECT + cor0.col1 * + col1 + + ( cor0.col2 ) FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT ALL + col2 * - col1 * 24 AS col1 FROM tab2 cor0
----
-15504
-20088
-36816

query I rowsort
SELECT cor0.col1 * ( col0 ) - - col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL col1 + + col0 * col0 + + cor0.col1 AS col0 FROM tab2 cor0
----
111
6202
6275

onlyif mysql # use DIV operator for integer division
query I rowsort label-1685
SELECT ALL - + cor0.col0 + - CAST( 9 AS SIGNED ) DIV col1 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-1685
SELECT ALL - + cor0.col0 + - CAST ( 9 AS INTEGER ) / col1 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL col1 * + col0 - - col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - col0 - 13 FROM tab1 AS cor0
----
-16
-77
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-1688
SELECT + col0 * + col0 DIV col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-1688
SELECT + col0 * + col0 / col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + - 77 * + cor0.col1 FROM tab0 AS cor0
----
-6622
-7007
-7469

query I rowsort
SELECT + + col1 * col2 * col0 AS col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT col0 * - col1 + col1 * - col1 * - 80 FROM tab2
----
21777
273878
76663

query I rowsort
SELECT DISTINCT tab1.col1 * 79 AS col0 FROM tab1
----
1027
2054
790

query I rowsort
SELECT ALL col1 * ( + 97 + col1 * - tab2.col0 ) FROM tab2
----
-21182
-265795
-3720

query I rowsort
SELECT - 40 * ( + col0 ) FROM tab2 AS cor0
----
-280
-3120
-3160

query I rowsort
SELECT ( 6 ) + col0 FROM tab0 AS cor0
----
30
41
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-1696
SELECT 9 * col2 DIV - col2 FROM tab1 AS cor0
----
-9
-9
-9

skipif mysql # not compatible
query I rowsort label-1696
SELECT 9 * col2 / - col2 FROM tab1 AS cor0
----
-9
-9
-9

query I rowsort
SELECT ALL - 77 * col1 + col1 AS col2 FROM tab0 AS cor0
----
-6536
-6916
-7372

onlyif mysql # use DIV operator for integer division
query I rowsort label-1698
SELECT - + 96 DIV - cor0.col2 FROM tab0 AS cor0
----
1
2
96

skipif mysql # not compatible
query I rowsort label-1698
SELECT - + 96 / - cor0.col2 FROM tab0 AS cor0
----
1
2
96

query I rowsort
SELECT DISTINCT - - 34 FROM tab0 AS cor0
----
34

query I rowsort
SELECT ALL - - col1 + cor0.col0 * - col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT - cor0.col1 + + col1 * col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT DISTINCT 27 + col1 * - col1 FROM tab2
----
-262
-3454
-934

query I rowsort
SELECT DISTINCT 56 + tab2.col0 + col1 AS col2 FROM tab2
----
152
193
94

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 88 * + col0 col0 FROM tab0 AS cor0
----
2112
3080
7832

query I rowsort
SELECT DISTINCT - 40 * - cor0.col2 FROM tab2 AS cor0
----
1040
1080
1520

query I rowsort
SELECT DISTINCT + 64 * + col1 * - col1 FROM tab0 cor0
----
-473344
-529984
-602176

query I rowsort
SELECT DISTINCT + col0 * col0 + + col1 * - cor0.col1 AS col2 FROM tab0 cor0
----
-360
-6820
-8184

query I rowsort
SELECT ALL + - col2 * col1 * - col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1, tab2 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL - tab2.col0 + - col2 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT ALL 71 * cor0.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 4d1111acc6df6dc2dcb69f3857e0ac2d

query I rowsort
SELECT col0 * - 41 + col0 * + col2 AS col2 FROM tab1 AS cor0
----
1024
39
4400

query I rowsort
SELECT + + ( 86 ) + - col1 FROM tab0 AS cor0
----
-11
-5
0

query I rowsort
SELECT DISTINCT + col0 * 74 + col0 FROM tab2 AS cor0
----
525
5850
5925

query I rowsort
SELECT ALL + 0 + col0 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1717
SELECT DISTINCT + CAST( NULL AS SIGNED ) + 23 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1717
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + 23 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL col1 + ( + col1 * + col1 ) AS col2 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT ALL - col2 * - ( + col2 * - col2 ) + ( - col1 ) AS col2 FROM tab1
----
-157490
-185203
-884749

query I rowsort
SELECT DISTINCT + col2 + - 65 + col0 FROM tab0 AS cor0
----
-29
-8
106

query I rowsort
SELECT col1 + + ( 89 ) FROM tab1 AS cor0
----
102
115
99

query I rowsort
SELECT ALL + - cor0.col1 * 43 AS col0 FROM tab2 AS cor0
----
-1333
-2537
-731

onlyif mysql # use DIV operator for integer division
query I rowsort label-1723
SELECT ALL - col2 - - 77 DIV col1 FROM tab1 cor0
----
-50
-52
-91

skipif mysql # not compatible
query I rowsort label-1723
SELECT ALL - col2 - - 77 / col1 FROM tab1 cor0
----
-50
-52
-91

query I rowsort
SELECT - + col1 + ( col2 ) * col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT ALL col2 * col0 + + 26 FROM tab2 AS cor0
----
2054
215
3028

query I rowsort
SELECT DISTINCT + - col0 * col0 + - ( - col0 ) FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT ALL col1 - + 54 FROM tab2 AS cor0
----
-23
-37
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor1.col0 * - cor0.col0 col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to eb103eabe531563e672e54874d056f9f

onlyif mysql # use DIV operator for integer division
query I rowsort label-1729
SELECT - col1 + + col0 DIV + 49 AS col1 FROM tab2 AS cor0
----
-16
-31
-58

skipif mysql # not compatible
query I rowsort label-1729
SELECT - col1 + + col0 / + 49 AS col1 FROM tab2 AS cor0
----
-16
-31
-58

query I rowsort
SELECT - - 46 FROM tab0, tab1 cor0, tab1, tab2 AS cor1
----
81 values hashing to 086e8f56201fbf4c0ce74087e710811d

query I rowsort
SELECT DISTINCT 98 * col2 FROM tab2 AS cor0
----
2548
2646
3724

query I rowsort
SELECT ALL - 3 AS col2 FROM tab2 AS cor0
----
-3
-3
-3

query I rowsort
SELECT ALL - - ( col1 ) + + col1 * + col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL cor0.col2 * 97 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 4c90a6a69681a0d8bb228279a7192e70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1735
SELECT ALL cor0.col0 * + tab1.col1 - - CAST( NULL AS SIGNED ) AS col1 FROM tab1, tab0, tab1 AS cor0, tab2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-1735
SELECT ALL cor0.col0 * + tab1.col1 - - CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab0, tab1 AS cor0, tab2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT - 23 * col2 + - tab1.col2 * - 13 + col0 * col0 FROM tab1
----
-531
3526
5440

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( + cor0.col0 AS REAL ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 0 col1 FROM tab1, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

query I rowsort
SELECT - 25 + col1 FROM tab1 AS cor0
----
-12
-15
1

query I rowsort
SELECT ALL + col1 * 31 - + tab0.col0 FROM tab0
----
2642
2732
2972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 + + ( col1 ) col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL col1 * 39 AS col0 FROM tab1 cor0
----
1014
390
507

query I rowsort
SELECT + - col0 * - col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + col0 + - cor0.col2 * 15 FROM tab0 AS cor0
----
-1141
-471
20

query I rowsort
SELECT DISTINCT col0 - + cor0.col0 * - col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT tab1.col2 * col1 + col0 AS col1 FROM tab1
----
1328
1407
634

query I rowsort
SELECT cor1.col2 AS col1 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 36 col1 FROM tab1 AS cor0
----
-36
-36
-36

query I rowsort
SELECT ALL 64 * - cor0.col0 * - 3 FROM tab1 AS cor0
----
12288
15360
576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 70 - - col2 col2 FROM tab0 AS cor0
----
-37
-69
12

query I rowsort
SELECT ALL - col2 * col1 + cor0.col0 - - col0 FROM tab0 AS cor0
----
-27
-2790
-7284

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col2 - - ( 28 ) FROM tab2 AS cor0
----
1562
674
865

query I rowsort
SELECT DISTINCT - col0 * ( + col1 ) AS col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - col1 + + col1 * - col1 + col0 AS col2 FROM tab0 AS cor0
----
-7458
-8283
-9471

query I rowsort
SELECT ALL 22 AS col1 FROM tab0
----
22
22
22

query I rowsort
SELECT ALL + - col2 - + cor0.col1 AS col0 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT ALL col0 + 67 FROM tab1 AS cor0
----
131
147
70

query I rowsort
SELECT cor0.col0 + + ( - ( + col0 ) ) * - cor0.col2 * 51 AS col0 FROM tab2 AS cor0
----
103506
153181
9646

query I rowsort
SELECT 81 + + 6 FROM tab2 AS cor0
----
87
87
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1760
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab1, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1760
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab1, tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1761
SELECT + tab2.col0 DIV 12 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 7318d0dc3ebf76e990ab679b26520e3b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1761
SELECT + tab2.col0 / 12 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 7318d0dc3ebf76e990ab679b26520e3b

query I rowsort
SELECT ALL 43 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT DISTINCT - col2 * 85 * + 40 AS col2 FROM tab2
----
-129200
-88400
-91800

query I rowsort
SELECT 16 * col1 + ( - col1 + col2 ) FROM tab0 AS cor0
----
1323
1447
1456

query I rowsort
SELECT DISTINCT + ( 27 ) AS col0 FROM tab0
----
27

query I rowsort
SELECT ALL - 18 * 38 + + col2 + col2 FROM tab2
----
-608
-630
-632

onlyif mysql # use DIV operator for integer division
query I rowsort label-1767
SELECT col1 DIV cor0.col0 + col0 * + 29 FROM tab2 cor0
----
207
2262
2291

skipif mysql # not compatible
query I rowsort label-1767
SELECT col1 / cor0.col0 + col0 * + 29 FROM tab2 cor0
----
207
2262
2291

query I rowsort
SELECT ALL - ( col1 ) + + col1 * + col0 * col2 AS col2 FROM tab2 AS cor0
----
119593
51017
5828

onlyif mysql # use DIV operator for integer division
query I rowsort label-1769
SELECT ALL - - col2 * col0 DIV col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-1769
SELECT ALL - - col2 * col0 / col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + + ( col2 ) + - cor0.col1 + col0 AS col0 FROM tab0 AS cor0
----
-29
-61
80

query I rowsort
SELECT DISTINCT + col0 + - col0 + col1 * - 85 AS col1 FROM tab2 AS cor0
----
-1445
-2635
-5015

query I rowsort
SELECT col2 * + 79 - + col2 FROM tab2
----
2028
2106
2964

query I rowsort
SELECT + 84 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1774
SELECT ALL + CAST( - 8 AS SIGNED ) AS col2 FROM tab0
----
-8
-8
-8

skipif mysql # not compatible
query I rowsort label-1774
SELECT ALL + CAST ( - 8 AS INTEGER ) AS col2 FROM tab0
----
-8
-8
-8

query I rowsort
SELECT DISTINCT + 37 AS col0 FROM tab2, tab0, tab1 cor0
----
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 col0 FROM tab2
----
70
70
70

query I rowsort
SELECT cor1.col1 + 22 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 911e5c496f90009657aa95d5b190034f

query I rowsort
SELECT - - 94 FROM tab0 AS cor0
----
94
94
94

query I rowsort
SELECT ( col1 ) * - col1 AS col1 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL 56 AS col2 FROM tab0 AS cor0
----
56
56
56

query I rowsort
SELECT ALL col2 * - col0 + 27 AS col0 FROM tab2 AS cor0
----
-162
-2001
-2975

query I rowsort
SELECT DISTINCT - col2 + - col2 AS col1 FROM tab1 cor0
----
-108
-114
-192

query I rowsort
SELECT + + 83 AS col1 FROM tab2 AS cor0
----
83
83
83

query I rowsort
SELECT + col0 + + 67 AS col1 FROM tab0 AS cor0
----
102
156
91

query I rowsort
SELECT + col1 * ( - col1 * col0 ) + col0 FROM tab1 AS cor0
----
-13440
-2025
-6336

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1786
SELECT DISTINCT + CAST( NULL AS DECIMAL ) AS col0 FROM tab2, tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1786
SELECT DISTINCT + CAST ( NULL AS REAL ) AS col0 FROM tab2, tab1 cor0
----
NULL

query I rowsort
SELECT + col2 + + cor0.col0 * col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT - col2 * cor0.col1 + - col2 * col2 + 48 FROM tab1 AS cor0
----
-10416
-3771
-4272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col1 * col1 col2 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT col0 - col2 * - 92 FROM tab2 AS cor0
----
2470
2491
3575

query I rowsort
SELECT - tab0.col1 * col2 + col1 AS col2 FROM tab0
----
-2752
-7371
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1792
SELECT + col2 * - col2 * + CAST( + 32 AS SIGNED ) FROM tab1
----
-103968
-294912
-93312

skipif mysql # not compatible
query I rowsort label-1792
SELECT + col2 * - col2 * + CAST ( + 32 AS INTEGER ) FROM tab1
----
-103968
-294912
-93312

query I rowsort
SELECT ALL - 11 + - 14 FROM tab0 AS cor0
----
-25
-25
-25

onlyif mysql # use DIV operator for integer division
query I rowsort label-1794
SELECT + ( 29 ) + + col2 DIV col0 col0 FROM tab0 AS cor0
----
29
29
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1794
SELECT + ( 29 ) + + col2 / col0 col0 FROM tab0 AS cor0
----
29
29
30

query I rowsort
SELECT + 44 * + col1 AS col0 FROM tab1 cor0
----
1144
440
572

query I rowsort
SELECT DISTINCT + 53 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
53

query I rowsort
SELECT ALL 56 + + col1 AS col1 FROM tab2 AS cor0
----
115
73
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-1798
SELECT col0 DIV + col2 + - col1 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-7396
-8280
-9374

skipif mysql # not compatible
query I rowsort label-1798
SELECT col0 / + col2 + - col1 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-7396
-8280
-9374

query I rowsort
SELECT - - cor0.col1 + - col1 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - + 80 * cor0.col1 FROM tab0 AS cor0
----
-6880
-7280
-7760

query I rowsort
SELECT + 77 + + col2 * + col0 + col0 FROM tab0 AS cor0
----
147
7464
893

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1802
SELECT - CAST( col2 AS SIGNED ) * - col1 + 83 + + 89 FROM tab2 cor0
----
1009
1706
818

skipif mysql # not compatible
query I rowsort label-1802
SELECT - CAST ( col2 AS INTEGER ) * - col1 + 83 + + 89 FROM tab2 cor0
----
1009
1706
818

query I rowsort
SELECT + - 31 AS col0 FROM tab2 AS cor0
----
-31
-31
-31

query I rowsort
SELECT DISTINCT ( - 0 ) AS col2 FROM tab0 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * ( col0 ) col2 FROM tab0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1806
SELECT DISTINCT tab1.col0 + CAST( + ( col1 ) * 38 AS SIGNED ) - + col0 FROM tab1
----
380
494
988

skipif mysql # not compatible
query I rowsort label-1806
SELECT DISTINCT tab1.col0 + CAST ( + ( col1 ) * 38 AS INTEGER ) - + col0 FROM tab1
----
380
494
988

query I rowsort
SELECT ALL 62 + - col2 FROM tab2 AS cor0
----
24
35
36

query I rowsort
SELECT ALL + ( - 49 ) * col1 AS col2 FROM tab0 AS cor0
----
-4214
-4459
-4753

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT CAST ( cor0.col2 AS REAL ) col0 FROM tab1, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT - tab2.col2 + - col1 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT ALL 38 FROM tab1, tab0 cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT 46 * col2 AS col1 FROM tab2 cor0
----
1196
1242
1748

query I rowsort
SELECT - + 51 AS col0 FROM tab0 AS cor0
----
-51
-51
-51

query I rowsort
SELECT DISTINCT 95 FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab2, tab0 AS cor1
----
95

query I rowsort
SELECT - ( col0 + col2 ) FROM tab2
----
-104
-117
-34

query I rowsort
SELECT DISTINCT - tab1.col2 + - col2 AS col2 FROM tab1
----
-108
-114
-192

query I rowsort
SELECT ALL + - 33 * + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 998f77a319bd78cae1deb5867f8c127f

query I rowsort
SELECT DISTINCT + col0 + col2 * + col2 AS col0 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT - cor0.col2 * 9 AS col2 FROM tab2 AS cor0
----
-234
-243
-342

query I rowsort
SELECT - col2 - 73 * ( + col2 ) * + tab1.col1 FROM tab1
----
-102546
-41667
-91200

onlyif mysql # use DIV operator for integer division
query I rowsort label-1821
SELECT col0 DIV - col2 + + col2 FROM tab0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-1821
SELECT col0 / - col2 + + col2 FROM tab0
----
-34
33
81

query I rowsort
SELECT DISTINCT tab2.col1 * col1 + - col0 * col1 AS col2 FROM tab2
----
-1054
-1121
744

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1823
SELECT col1 * ( cor0.col0 ) + - col2 + + CAST( + col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
1384
197
4654

skipif mysql # not compatible
query I rowsort label-1823
SELECT col1 * ( cor0.col0 ) + - col2 + + CAST ( + col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
1384
197
4654

query I rowsort
SELECT DISTINCT + col1 * - ( + col2 + + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-1210
-1482
-2288

query I rowsort
SELECT - + 1 * col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT 66 * - col1 AS col1 FROM tab0 AS cor0
----
-5676
-6006
-6402

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1827
SELECT ALL 44 * - col0 / CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1827
SELECT ALL 44 * - col0 / CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * - cor0.col1 * col0 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT + col1 + - col0 * - col0 AS col2 FROM tab2
----
6143
6258
80

query I rowsort
SELECT ALL + 47 * + col2 AS col2 FROM tab1
----
2538
2679
4512

query I rowsort
SELECT DISTINCT 85 * cor0.col1 FROM tab1 AS cor0
----
1105
2210
850

query I rowsort
SELECT + ( col1 ) + ( 76 ) * col2 AS col2 FROM tab1 AS cor0
----
4130
4342
7309

query I rowsort
SELECT + col1 * col2 * 45 AS col1 FROM tab0 AS cor0
----
127710
335790
4365

query I rowsort
SELECT ALL - col0 * + col1 + + ( col1 ) FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col1 col2 FROM tab0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT ALL col1 + 1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT - cor0.col2 * col2 + col1 AS col2 FROM tab1 cor0
----
-2890
-3239
-9203

query I rowsort
SELECT DISTINCT + - col0 * 89 + + ( - col1 ) AS col0 FROM tab0 AS cor0
----
-2222
-3212
-8012

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1840
SELECT + col1 + + CAST( 31 * + col2 AS SIGNED ) FROM tab1 AS cor0
----
1700
1777
2989

skipif mysql # not compatible
query I rowsort label-1840
SELECT + col1 + + CAST ( 31 * + col2 AS INTEGER ) FROM tab1 AS cor0
----
1700
1777
2989

onlyif mysql # use DIV operator for integer division
query I rowsort label-1841
SELECT - col1 DIV 42 + col1 FROM tab2
----
17
31
58

skipif mysql # not compatible
query I rowsort label-1841
SELECT - col1 / 42 + col1 FROM tab2
----
17
31
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 + + col0 * col0 * - col2 col0 FROM tab2 cor0
----
-1319
-158180
-237154

query I rowsort
SELECT ALL + 49 + col0 * cor0.col0 FROM tab0 AS cor0
----
1274
625
7970

query I rowsort
SELECT DISTINCT - 48 + + 4 AS col2 FROM tab0 AS cor0
----
-44

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT ALL + 5 FROM tab2, tab2 cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 26 * - col2 + col1 * col2 * - col2 col1 FROM tab2 AS cor0
----
-21897
-23560
-39208

query I rowsort
SELECT - 18 + - 36 AS col2 FROM tab0 AS cor0
----
-54
-54
-54

query I rowsort
SELECT ALL - + cor0.col0 + + 33 FROM tab2 AS cor0
----
-45
-46
26

query I rowsort
SELECT DISTINCT - + col0 * - col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT - - ( + 44 ) AS col1 FROM tab1 cor0
----
44
44
44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1852
SELECT tab2.col1 * ( col0 ) + CAST( col1 AS SIGNED ) AS col2 FROM tab2
----
1360
248
4661

skipif mysql # not compatible
query I rowsort label-1852
SELECT tab2.col1 * ( col0 ) + CAST ( col1 AS INTEGER ) AS col2 FROM tab2
----
1360
248
4661

query I rowsort
SELECT - - 15 * + col2 + col2 * + ( col1 ) * col1 FROM tab1 AS cor0
----
17664
37314
6555

query I rowsort
SELECT - - cor0.col1 * - 66 + cor0.col1 FROM tab2 AS cor0
----
-1105
-2015
-3835

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 79 col1 FROM tab1 AS cor0
----
-79

query I rowsort
SELECT ALL + + cor0.col0 + ( + col1 ) * col0 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-1857
SELECT - 4 DIV col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1857
SELECT - 4 / col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 15 AS col1 FROM tab1, tab1 cor0, tab2 AS cor1
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

query I rowsort
SELECT - 36 FROM tab0, tab1 AS cor0
----
9 values hashing to afecaf209e79e23b6674a73fffa3e837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + 82 col2 FROM tab0 AS cor0
----
106
117
171

query I rowsort
SELECT + + col1 * - 94 AS col0 FROM tab1 cor0
----
-1222
-2444
-940

query I rowsort
SELECT + - cor0.col2 + + col2 * + 35 AS col2 FROM tab2 AS cor0
----
1292
884
918

query I rowsort
SELECT DISTINCT - cor0.col0 * + 56 FROM tab2 cor0
----
-392
-4368
-4424

query I rowsort
SELECT 50 FROM tab2, tab2 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT col1 * 34 FROM tab2 AS cor0
----
1054
2006
578

query I rowsort
SELECT - - cor0.col1 * - 37 + - col0 * + col0 AS col0 FROM tab0 AS cor0
----
-11288
-3758
-4814

query I rowsort
SELECT + ( 7 ) * col2 AS col1 FROM tab2 AS cor0
----
182
189
266

query I rowsort
SELECT + 12 * 81 + + col2 FROM tab2 AS cor0
----
1010
998
999

query I rowsort
SELECT - - col2 * col0 * col2 FROM tab1 cor0
----
207936
737280
8748

query I rowsort
SELECT DISTINCT col2 * + ( + col1 ) + col0 AS col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT - - col2 + ( col2 ) AS col0 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT DISTINCT + 25 * 52 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
1300

query I rowsort
SELECT col0 * col1 * - 45 AS col2 FROM tab1
----
-28800
-3510
-46800

query I rowsort
SELECT ALL + + cor0.col2 + + 76 AS col0 FROM tab2 AS cor0
----
102
103
114

query I rowsort
SELECT DISTINCT - col0 + - col0 * - col0 AS col1 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT col0 + + ( col2 ) + col2 * col1 FROM tab0 cor0
----
133
2895
7633

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + cor0.col1 * + 81 + + col2 col2 FROM tab1 AS cor0
----
1229
2163
931

onlyif mysql # use DIV operator for integer division
query I rowsort label-1878
SELECT DISTINCT + cor0.col1 + + col2 DIV col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-1878
SELECT DISTINCT + cor0.col1 + + col2 / col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + 69 + - col2 FROM tab0
----
-13
36
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - 8 col2 FROM tab1
----
-104
-208
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL + col2 * CAST ( 97 * col1 AS REAL ) col1 FROM tab1
----
121056
136188
55290

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1882
SELECT cor0.col0 + CAST( + 75 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
153
154
82

skipif mysql # not compatible
query I rowsort label-1882
SELECT cor0.col0 + CAST ( + 75 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
153
154
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 72 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

skipif mysql # not compatible
query I rowsort
SELECT CAST ( 11 AS REAL ) FROM tab2 AS cor0
----
11
11
11

query I rowsort
SELECT - col0 * ( cor0.col1 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col2 + + col0 * col0 * - col0 - 43 * col0 AS col1 FROM tab0
----
-14889
-44381
-708878

query I rowsort
SELECT + - col0 + col2 AS col2 FROM tab0 cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1888
SELECT 29 * col0 DIV + col0 + col1 AS col1 FROM tab0 AS cor0
----
115
120
126

skipif mysql # not compatible
query I rowsort label-1888
SELECT 29 * col0 / + col0 + col1 AS col1 FROM tab0 AS cor0
----
115
120
126

query I rowsort
SELECT DISTINCT - ( - col2 ) * col1 * col1 FROM tab0 AS cor0
----
244068
679042
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col2 * - col1 + + cor0.col1 col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT + - 48 + col2 + + col1 FROM tab1 AS cor0
----
19
32
61

query I rowsort
SELECT col2 + col2 + 74 * col1 FROM tab0 AS cor0
----
6430
6898
7180

query I rowsort
SELECT ALL + + 12 FROM tab2 AS cor0
----
12
12
12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1894
SELECT ALL CAST( 27 AS SIGNED ) AS col0 FROM tab2
----
27
27
27

skipif mysql # not compatible
query I rowsort label-1894
SELECT ALL CAST ( 27 AS INTEGER ) AS col0 FROM tab2
----
27
27
27

query I rowsort
SELECT + col0 + + col1 + 12 AS col1 FROM tab0 AS cor0
----
122
144
192

query I rowsort
SELECT - col0 + col0 * col1 + col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - col2 * cor0.col1 + 43 + col2 FROM tab0 AS cor0
----
-2762
-53
-7337

query I rowsort
SELECT DISTINCT + 96 * - col1 AS col2 FROM tab2 AS cor0
----
-1632
-2976
-5664

query I rowsort
SELECT ALL col1 * col0 + + 56 AS col1 FROM tab2
----
1399
273
4658

query I rowsort
SELECT col1 + + tab0.col1 * + col0 AS col0 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT col1 + - col2 + - tab0.col0 FROM tab0
----
-80
29
61

query I rowsort
SELECT DISTINCT + 65 + col0 FROM tab1
----
129
145
68

query I rowsort
SELECT - 58 + - col1 + + col0 * - col0 * - col0 AS col1 FROM tab0
----
13680
42720
704820

query I rowsort
SELECT DISTINCT - 32 + + col0 FROM tab1
----
-29
32
48

query I rowsort
SELECT ALL + - 29 * + col0 FROM tab2 AS cor0
----
-203
-2262
-2291

query I rowsort
SELECT ALL - - 80 + - col2 FROM tab2 cor0
----
42
53
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 77 - + col0 col0 FROM tab2 AS cor0
----
-1
-2
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1908
SELECT + + col0 * + CAST( + col2 AS SIGNED ) + + col1 AS col0 FROM tab2 AS cor0
----
2087
220
3019

skipif mysql # not compatible
query I rowsort label-1908
SELECT + + col0 * + CAST ( + col2 AS INTEGER ) + + col1 AS col0 FROM tab2 AS cor0
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + 78 * + col0 col2 FROM tab1 AS cor0
----
260
5002
6253

query I rowsort
SELECT ALL - col0 + - 17 * 17 AS col1 FROM tab2 AS cor0
----
-296
-367
-368

query I rowsort
SELECT DISTINCT - col2 * + 53 - - 8 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-1679
-1850
-2150

query I rowsort
SELECT ALL - - col0 * 28 + 98 FROM tab2 AS cor0
----
2282
2310
294

query I rowsort
SELECT ALL + col2 + ( col1 ) AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL col2 + ( col0 ) AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - col2 + 75 * col2 AS col2 FROM tab0 AS cor0
----
2442
6068
74

query I rowsort
SELECT col1 + col1 * + col0 FROM tab0 cor0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT cor0.col1 * + 98 + 7 FROM tab2, tab1 AS cor0
----
1281
2555
987

query I rowsort
SELECT ALL 14 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

query I rowsort
SELECT + 14 * col0 FROM tab2
----
1092
1106
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1920
SELECT DISTINCT cor0.col1 DIV + col2 AS col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-1920
SELECT DISTINCT cor0.col1 / + col2 AS col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT - 73 + col0 AS col1 FROM tab0
----
-38
-49
16

query I rowsort
SELECT ALL col0 * col0 - col1 * tab2.col1 AS col2 FROM tab2
----
-912
2603
5952

query I rowsort
SELECT DISTINCT + col2 * + col2 + - col0 AS col0 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT ALL + - 75 * + col1 AS col0 FROM tab0 AS cor0
----
-6450
-6825
-7275

onlyif mysql # use DIV operator for integer division
query I rowsort label-1925
SELECT ALL + CAST( col1 AS SIGNED ) DIV + col1 AS col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1925
SELECT ALL + CAST ( col1 AS INTEGER ) / + col1 AS col0 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 10 col2 FROM tab1 AS cor0
----
10

query I rowsort
SELECT + + ( - 42 ) FROM tab0 AS cor0
----
-42
-42
-42

onlyif mysql # use DIV operator for integer division
query I rowsort label-1928
SELECT ALL + 30 DIV 55 col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1928
SELECT ALL + 30 / 55 col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 20 * + col0 + - col1 AS col0 FROM tab1 AS cor0
----
-1290
-1613
-86

query I rowsort
SELECT DISTINCT - ( - 87 ) * + col2 AS col0 FROM tab1 cor0
----
4698
4959
8352

query I rowsort
SELECT - ( - cor0.col1 ) + - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 46 AS col0 FROM tab2 cor0
----
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 82 * col0 + + col0 col0 FROM tab0 AS cor0
----
1992
2905
7387

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1934
SELECT + - CAST( - ( col0 ) AS SIGNED ) AS col0 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-1934
SELECT + - CAST ( - ( col0 ) AS INTEGER ) AS col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT 55 + + col1 AS col1 FROM tab1 AS cor0
----
65
68
81

query I rowsort
SELECT ALL + 36 * + 6 FROM tab1 AS cor0
----
216
216
216

query I rowsort
SELECT col1 * + col0 + tab2.col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT DISTINCT - + 65 + - col2 * col0 FROM tab0 AS cor0
----
-100
-7363
-857

query I rowsort
SELECT 30 * + col2 + - col1 * col1 * + col0 FROM tab2 AS cor0
----
-21691
-270738
-5917

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1940
SELECT CAST( NULL AS SIGNED ) * + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1940
SELECT CAST ( NULL AS INTEGER ) * + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * - 19 + col1 + col2 AS col1 FROM tab0 AS cor0
----
1753
1902
1941

query I rowsort
SELECT + col0 * + 0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1943
SELECT DISTINCT - - col2 + + col1 * cor0.col2 DIV + col2 + - ( 14 ) * - col2 AS col2 FROM tab0 AS cor0
----
112
1321
581

skipif mysql # not compatible
query I rowsort label-1943
SELECT DISTINCT - - col2 + + col1 * cor0.col2 / + col2 + - ( 14 ) * - col2 AS col2 FROM tab0 AS cor0
----
112
1321
581

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1944
SELECT col2 * - CAST( + col0 AS SIGNED ) + - col2 col2 FROM tab2 AS cor0
----
-2054
-216
-3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1944
SELECT col2 * - CAST ( + col0 AS INTEGER ) + - col2 col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT - col0 * col0 + 58 AS col1 FROM tab1 AS cor0
----
-4038
-6342
49

query I rowsort
SELECT DISTINCT col1 + col0 * + 16 AS col1 FROM tab2
----
1281
1307
143

query I rowsort
SELECT ALL - + col0 * 0 * col2 + - col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - - col0 - col0 AS col1 FROM tab1 cor0
----
0

query I rowsort
SELECT - col2 * + col0 + col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT - 69 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1951
SELECT - CAST( NULL AS SIGNED ) * 96 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1951
SELECT - CAST ( NULL AS INTEGER ) * 96 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 66 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to a408108d423d7784b7d610cb779e515a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * - col0 col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 1 * cor0.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - - col0 * col0 + - 62 AS col1 FROM tab1 cor0
----
-53
4034
6338

onlyif mysql # use DIV operator for integer division
query I rowsort label-1956
SELECT ALL - ( + col2 ) + + 23 * + col2 DIV + col2 FROM tab0 AS cor0
----
-10
-59
22

skipif mysql # not compatible
query I rowsort label-1956
SELECT ALL - ( + col2 ) + + 23 * + col2 / + col2 FROM tab0 AS cor0
----
-10
-59
22

query I rowsort
SELECT ALL cor0.col1 * - col0 + 40 FROM tab0 AS cor0
----
-2024
-3355
-8059

query I rowsort
SELECT DISTINCT + 64 + col0 * col0 * col2 FROM tab0 AS cor0
----
1289
19072
649586

query I rowsort
SELECT + - col1 + cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - 56 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1456
-560
-728

query I rowsort
SELECT ALL + ( + 79 ) + col1 + - ( 28 + + col1 ) * - col2 FROM tab0
----
301
3927
9928

query I rowsort
SELECT ALL + tab2.col2 * + tab2.col1 AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL - col2 * - col2 * + col1 FROM tab0
----
611884
93654
97

query I rowsort
SELECT col1 * + col0 + - 79 AS col2 FROM tab2
----
1264
138
4523

query I rowsort
SELECT DISTINCT - 30 + col1 + + col1 AS col1 FROM tab0
----
142
152
164

query I rowsort
SELECT ALL - col2 + col1 * col0 AS col2 FROM tab1
----
24
583
944

query I rowsort
SELECT + col0 * - tab2.col0 * 65 FROM tab2
----
-3185
-395460
-405665

query I rowsort
SELECT ALL - col1 + col2 + - 41 FROM tab0
----
-137
-50
-94

query I rowsort
SELECT - - col0 * + col1 + col0 + 28 FROM tab2 cor0
----
1450
252
4708

onlyif mysql # use DIV operator for integer division
query I rowsort label-1970
SELECT - cor1.col1 DIV - 75 AS col1 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-1970
SELECT - cor1.col1 / - 75 AS col1 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT ALL cor0.col1 * col1 + + col2 + + col0 AS col0 FROM tab2 AS cor0
----
3585
406
995

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1972
SELECT + cor0.col0 + + cor0.col0 * - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1972
SELECT + cor0.col0 + + cor0.col0 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 16 * + col1 AS col0 FROM tab2 AS cor0
----
272
496
944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1974
SELECT - CAST( 33 AS SIGNED ) FROM tab2, tab1 AS cor0
----
9 values hashing to 8035c665a75d22be5922be1a4e574e03

skipif mysql # not compatible
query I rowsort label-1974
SELECT - CAST ( 33 AS INTEGER ) FROM tab2, tab1 AS cor0
----
9 values hashing to 8035c665a75d22be5922be1a4e574e03

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1975
SELECT DISTINCT - + col1 + - CAST( col1 AS SIGNED ) * - col1 AS col2 FROM tab1 AS cor0
----
156
650
90

skipif mysql # not compatible
query I rowsort label-1975
SELECT DISTINCT - + col1 + - CAST ( col1 AS INTEGER ) * - col1 AS col2 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT col1 * 49 * + 52 FROM tab0
----
219128
231868
247156

query I rowsort
SELECT DISTINCT - 34 AS col1 FROM tab0, tab0 AS cor0
----
-34

query I rowsort
SELECT + col2 + 82 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
180
201
255

query I rowsort
SELECT ALL - ( col2 ) * col2 - col0 * col2 AS col0 FROM tab1 AS cor0
----
-16896
-3078
-6897

query I rowsort
SELECT ALL cor0.col0 * col0 AS col1 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT 48 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1982
SELECT ALL + - CAST( col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-1982
SELECT ALL + - CAST ( col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1983
SELECT ALL + CAST( 78 AS SIGNED ) + col0 FROM tab2 AS cor0
----
156
157
85

skipif mysql # not compatible
query I rowsort label-1983
SELECT ALL + CAST ( 78 AS INTEGER ) + col0 FROM tab2 AS cor0
----
156
157
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 7 - - col2 col0 FROM tab1 cor0
----
103
61
64

query I rowsort
SELECT - col0 + + col0 * + 77 FROM tab1 AS cor0
----
228
4864
6080

query I rowsort
SELECT DISTINCT col0 * col0 - col0 AS col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT 23 - col2 * 5 AS col0 FROM tab1 AS cor0
----
-247
-262
-457

query I rowsort
SELECT - col1 + 82 + col0 FROM tab1
----
136
149
59

query I rowsort
SELECT col0 * - ( - col1 ) * - 12 FROM tab2
----
-16116
-2604
-55224

onlyif mysql # use DIV operator for integer division
query I rowsort label-1990
SELECT ( - col1 ) DIV col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1990
SELECT ( - col1 ) / col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT - + 40 + - col0 * 24 FROM tab2 cor0
----
-1912
-1936
-208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - col1 col2 FROM tab2 AS cor0
----
-118
-34
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-1993
SELECT ALL + ( 17 ) * - col0 + ( - col0 ) DIV col2 AS col2 FROM tab0
----
-1514
-408
-630

skipif mysql # not compatible
query I rowsort label-1993
SELECT ALL + ( 17 ) * - col0 + ( - col0 ) / col2 AS col2 FROM tab0
----
-1514
-408
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-1994
SELECT - 3 DIV col1 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1994
SELECT - 3 / col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT 56 + col2 * cor0.col0 * + col1 AS col1 FROM tab1 cor0
----
36536
4268
99896

query I rowsort
SELECT DISTINCT - 29 + 22 FROM tab1 AS cor0
----
-7

query I rowsort
SELECT + ( - 90 ) + - col2 * 79 AS col2 FROM tab0 AS cor0
----
-169
-2697
-6568

query I rowsort
SELECT ALL + col1 + col2 * - col0 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT - cor0.col0 * + 51 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 400c37b6ecc2b05b786f59ba99b585f9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2000
SELECT col2 * cor0.col0 DIV cor0.col1 AS col0 FROM tab2 AS cor0
----
176
34
6

skipif mysql # not compatible
query I rowsort label-2000
SELECT col2 * cor0.col0 / cor0.col1 AS col0 FROM tab2 AS cor0
----
176
34
6

query I rowsort
SELECT - 12 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

onlyif mysql # use DIV operator for integer division
query I rowsort label-2002
SELECT - tab1.col1 DIV col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2002
SELECT - tab1.col1 / col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL - 88 - 51 AS col2 FROM tab2, tab1 AS cor0, tab1, tab0 cor1
----
81 values hashing to 78d1e863b775939f439c347eba78b3ee

query I rowsort
SELECT + - 75 * col1 + + col1 AS col1 FROM tab1 AS cor0
----
-1924
-740
-962

query I rowsort
SELECT ALL ( 71 ) * - col2 AS col1 FROM tab0 AS cor0
----
-2343
-5822
-71

query I rowsort
SELECT ALL + 49 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT ( 34 ) * col0 FROM tab1
----
102
2176
2720

query I rowsort
SELECT - 88 * 83 AS col2 FROM tab1
----
-7304
-7304
-7304

query I rowsort
SELECT ALL + 17 * + col0 + - 68 AS col0 FROM tab1 AS cor0
----
-17
1020
1292

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2010
SELECT + col0 + - col0 / CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2010
SELECT + col0 + - col0 / CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col0 + col0 * ( + 31 ) AS col0 FROM tab1 AS cor0
----
1920
2400
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2012
SELECT DISTINCT CAST( + col0 AS SIGNED ) + + col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2012
SELECT DISTINCT CAST ( + col0 AS INTEGER ) + + col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2013
SELECT 51 + + 87 * col2 + + col1 DIV - col2 FROM tab1
----
4749
5010
8403

skipif mysql # not compatible
query I rowsort label-2013
SELECT 51 + + 87 * col2 + + col1 / - col2 FROM tab1
----
4749
5010
8403

onlyif mysql # use DIV operator for integer division
query I rowsort label-2014
SELECT DISTINCT 53 DIV + 5 FROM tab0, tab1, tab2 AS cor0
----
10

skipif mysql # not compatible
query I rowsort label-2014
SELECT DISTINCT 53 / + 5 FROM tab0, tab1, tab2 AS cor0
----
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-2015
SELECT col2 DIV - 50 + tab1.col0 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-2015
SELECT col2 / - 50 + tab1.col0 FROM tab1
----
2
63
79

query I rowsort
SELECT DISTINCT - col0 + col0 * - col2 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT - col0 + ( - 12 ) * + col1 AS col0 FROM tab2 AS cor0
----
-283
-379
-786

query I rowsort
SELECT ALL + col2 + ( col2 ) AS col1 FROM tab2 AS cor0
----
52
54
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 78 + - 29 * tab1.col1 col1 FROM tab1, tab2 cor0, tab1 cor1
----
27 values hashing to c92c64eff785e85d6b75bbca211a8d46

query I rowsort
SELECT DISTINCT + - 11 FROM tab1, tab0, tab0 AS cor0
----
-11

query I rowsort
SELECT ALL 79 * col0 AS col2 FROM tab0
----
1896
2765
7031

onlyif mysql # use DIV operator for integer division
query I rowsort label-2022
SELECT ALL tab0.col0 * col2 * - col1 - col0 DIV + 8 FROM tab0
----
-3399
-664129
-68115

skipif mysql # not compatible
query I rowsort label-2022
SELECT ALL tab0.col0 * col2 * - col1 - col0 / + 8 FROM tab0
----
-3399
-664129
-68115

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2023
SELECT - - col0 * + CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-2023
SELECT - - col0 * + CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-2024
SELECT DISTINCT - tab1.col1 DIV col0 AS col2 FROM tab1
----
-8
0

skipif mysql # not compatible
query I rowsort label-2024
SELECT DISTINCT - tab1.col1 / col0 AS col2 FROM tab1
----
-8
0

query I rowsort
SELECT - col2 + + 48 * col1 AS col2 FROM tab1
----
1194
423
528

query I rowsort
SELECT + cor2.col1 FROM tab2, tab1 AS cor0, tab0 cor1, tab1 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT DISTINCT + col1 * - cor0.col2 + + col0 - + col1 AS col1 FROM tab0 AS cor0
----
-159
-2900
-7464

query I rowsort
SELECT col1 * - 67 AS col1 FROM tab2 AS cor0
----
-1139
-2077
-3953

query I rowsort
SELECT col2 + col0 * col1 * col2 AS col1 FROM tab1
----
36537
4266
99936

query I rowsort
SELECT DISTINCT col2 * - col0 * col1 AS col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT - 44 + + col0 AS col1 FROM tab2 cor0
----
-37
34
35

query I rowsort
SELECT + col2 + + 66 FROM tab0 cor0
----
148
67
99

query I rowsort
SELECT ALL + ( col2 ) * - col2 AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 47 - col0 col2 FROM tab0 AS cor0
----
-42
12
23

query I rowsort
SELECT DISTINCT - - 30 AS col2 FROM tab1 AS cor0
----
30

query I rowsort
SELECT ALL - col2 + + col2 * col1 FROM tab0 cor0
----
2805
7380
96

query I rowsort
SELECT DISTINCT + ( 18 ) + - cor0.col1 * + col0 FROM tab0 cor0
----
-2046
-3377
-8081

query I rowsort
SELECT ALL ( col1 ) + - col2 * - 5 * col2 AS col2 FROM tab0 AS cor0
----
102
33711
5531

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2039
SELECT + + CAST( col2 AS SIGNED ) / + col1 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2039
SELECT + + CAST ( col2 AS INTEGER ) / + col1 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + 37 col2 FROM tab0 AS cor0
----
126
61
72

query I rowsort
SELECT ALL + ( 59 ) + col1 FROM tab2 AS cor0
----
118
76
90

query I rowsort
SELECT ALL + 99 AS col0 FROM tab2 AS cor0
----
99
99
99

query I rowsort
SELECT 33 - + cor0.col0 FROM tab0 AS cor0
----
-2
-56
9

query I rowsort
SELECT - - ( + col1 ) * col1 + col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT ALL 33 FROM tab0 cor0
----
33
33
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-2046
SELECT + col2 DIV 22 AS col1 FROM tab0 AS cor0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-2046
SELECT + col2 / 22 AS col1 FROM tab0 AS cor0
----
0
1
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 + 62 col0 FROM tab2 AS cor0
----
24
35
36

query I rowsort
SELECT DISTINCT ( - cor0.col0 ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-7
-78
-79

query I rowsort
SELECT + + col2 * col1 + + cor0.col2 * + 77 * cor0.col0 FROM tab2 AS cor0
----
15390
157690
231800

query I rowsort
SELECT 96 * col1 AS col1 FROM tab1 AS cor0
----
1248
2496
960

query I rowsort
SELECT ALL col2 - col1 * - col2 * 18 AS col1 FROM tab1 AS cor0
----
10317
22560
25326

query I rowsort
SELECT DISTINCT 91 AS col1 FROM tab2, tab0 AS cor0
----
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-2053
SELECT DISTINCT + col0 DIV - col0 + + col2 * + col2 col1 FROM tab2 AS cor0
----
1443
675
728

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2053
SELECT DISTINCT + col0 / - col0 + + col2 * + col2 col1 FROM tab2 AS cor0
----
1443
675
728

query I rowsort
SELECT DISTINCT - col2 * 1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL - col1 * - 80 FROM tab1 AS cor0
----
1040
2080
800

query I rowsort
SELECT DISTINCT + col2 * + col0 - col2 * col1 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT DISTINCT + 83 + - col1 FROM tab0
----
-14
-3
-8

query I rowsort
SELECT 17 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col0 * - col1 col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * col1 + + 15 col0 FROM tab1 AS cor0
----
1055
655
93

query I rowsort
SELECT col1 * col2 * - col2 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT cor0.col0 + - 19 FROM tab1 AS cor0
----
-16
45
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-2064
SELECT DISTINCT + - cor0.col2 * col0 + + ( + col2 ) DIV - col2 col1 FROM tab0 AS cor0
----
-36
-7299
-793

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2064
SELECT DISTINCT + - cor0.col2 * col0 + + ( + col2 ) / - col2 col1 FROM tab0 AS cor0
----
-36
-7299
-793

query I rowsort
SELECT - - col2 + 70 FROM tab0 AS cor0
----
103
152
71

query I rowsort
SELECT col1 + + 76 AS col0 FROM tab2 AS cor0
----
107
135
93

query I rowsort
SELECT - - cor0.col1 + ( 1 ) + - cor0.col0 AS col1 FROM tab0 cor0
----
3
63
63

query I rowsort
SELECT col1 * + cor0.col1 + col0 AS col1 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT + cor0.col1 + col2 + col2 * col0 AS col2 FROM tab0 AS cor0
----
133
7471
911

query I rowsort
SELECT col1 + - ( - col2 ) + + col0 * - col2 FROM tab1 cor0
----
-3581
-7571
-82

query I rowsort
SELECT DISTINCT + col0 - - 28 AS col1 FROM tab2 AS cor0
----
106
107
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-2072
SELECT DISTINCT + ( - ( + col0 DIV cor0.col0 ) ) * col2 * - col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-2072
SELECT DISTINCT + ( - ( + col0 / cor0.col0 ) ) * col2 * - col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - - 61 * col1 AS col0 FROM tab1 AS cor0
----
1586
610
793

query I rowsort
SELECT ALL 78 + col0 * col0 AS col0 FROM tab1 AS cor0
----
4174
6478
87

query I rowsort
SELECT DISTINCT - + ( 66 ) + + col2 AS col0 FROM tab2 AS cor0
----
-28
-39
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * - cor0.col0 col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL ( + 78 ) * + cor0.col2 FROM tab2 AS cor0
----
2028
2106
2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-2078
SELECT - ( col2 ) DIV - col1 col0 FROM tab2
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2078
SELECT - ( col2 ) / - col1 col0 FROM tab2
----
0
0
2

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-2080
SELECT ALL CAST( NULL AS SIGNED ) + col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2080
SELECT ALL CAST ( NULL AS INTEGER ) + col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 + 68 FROM tab0 cor0
----
-21
33
44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2082
SELECT ALL cor0.col1 * col0 + col0 + CAST( NULL AS DECIMAL ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2082
SELECT ALL cor0.col1 * col0 + col0 + CAST ( NULL AS REAL ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 + - ( col1 + + col1 * + 54 ) FROM tab0 AS cor0
----
-4644
-4914
-5238

query I rowsort
SELECT 34 + col2 * col0 FROM tab2 AS cor0
----
2062
223
3036

query I rowsort
SELECT ALL - 38 * col1 AS col1 FROM tab0 AS cor0
----
-3268
-3458
-3686

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * - col1 col0 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-2087
SELECT - 97 DIV - col0 + - col1 col1 FROM tab2 AS cor0
----
-16
-18
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2087
SELECT - 97 / - col0 + - col1 col1 FROM tab2 AS cor0
----
-16
-18
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - col1 * 23 + - col2 * cor0.col2 col2 FROM tab0 AS cor0
----
169019
183739
216406

onlyif mysql # use DIV operator for integer division
query I rowsort label-2089
SELECT col0 DIV col2 + col1 - col1 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2089
SELECT col0 / col2 + col1 - col1 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT - 3 + cor0.col2 FROM tab0 cor0
----
-2
30
79

query I rowsort
SELECT + - 6 + + col0 AS col0 FROM tab2 AS cor0
----
1
72
73

query I rowsort
SELECT + col0 + 79 AS col0 FROM tab2
----
157
158
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2093
SELECT - col2 + + col2 * CAST( col0 AS SIGNED ) + - col0 * - col2 FROM tab2 AS cor0
----
351
4030
5966

skipif mysql # not compatible
query I rowsort label-2093
SELECT - col2 + + col2 * CAST ( col0 AS INTEGER ) + - col0 * - col2 FROM tab2 AS cor0
----
351
4030
5966

query I rowsort
SELECT ( - col1 ) * - col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - ( col1 ) * + tab1.col1 FROM tab1
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col1 * ( + col1 ) col2 FROM tab2 AS cor0
----
3559
368
968

onlyif mysql # use DIV operator for integer division
query I rowsort label-2097
SELECT 47 DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2097
SELECT 47 / col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col2 ) * - col0 col0 FROM tab2 cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2099
SELECT - CAST( NULL AS SIGNED ) + 34 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2099
SELECT - CAST ( NULL AS INTEGER ) + 34 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( col1 + col0 ) AS col1 FROM tab1
----
29
74
93

query I rowsort
SELECT + ( + 13 ) AS col2 FROM tab2
----
13
13
13

query I rowsort
SELECT DISTINCT 98 * + tab0.col2 * col0 FROM tab0
----
3430
715204
77616

query I rowsort
SELECT + col2 + 33 * col2 AS col1 FROM tab1 AS cor0
----
1836
1938
3264

query I rowsort
SELECT ALL - + col0 - col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT ALL - col0 + + 54 FROM tab1 AS cor0
----
-10
-26
51

query I rowsort
SELECT DISTINCT + col1 * col2 * 36 AS col0 FROM tab2 AS cor0
----
23256
30132
55224

query I rowsort
SELECT DISTINCT + cor0.col2 * + 52 * - col2 FROM tab1 AS cor0
----
-151632
-168948
-479232

query I rowsort
SELECT - - 63 * ( col0 ) + col2 * cor0.col1 FROM tab0 AS cor0
----
13069
2302
4350

query I rowsort
SELECT + col0 + + 15 AS col2 FROM tab1 AS cor0
----
18
79
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-2110
SELECT DISTINCT - col1 + + 64 DIV col2 + col2 AS col2 FROM tab0 AS cor0
----
-32
-52
-9

skipif mysql # not compatible
query I rowsort label-2110
SELECT DISTINCT - col1 + + 64 / col2 + col2 AS col2 FROM tab0 AS cor0
----
-32
-52
-9

query I rowsort
SELECT + col2 * 42 * col0 AS col0 FROM tab0 AS cor0
----
1470
306516
33264

query I rowsort
SELECT ALL + - col1 * 70 FROM tab1 cor0
----
-1820
-700
-910

query I rowsort
SELECT DISTINCT col0 - - 44 AS col1 FROM tab0
----
133
68
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2114
SELECT ALL CAST( - 50 AS SIGNED ) + col2 AS col0 FROM tab1 AS cor0
----
4
46
7

skipif mysql # not compatible
query I rowsort label-2114
SELECT ALL CAST ( - 50 AS INTEGER ) + col2 AS col0 FROM tab1 AS cor0
----
4
46
7

query I rowsort
SELECT - 43 AS col0 FROM tab0 cor0
----
-43
-43
-43

query I rowsort
SELECT - 0 + col2 * col2 * + ( - col0 ) FROM tab0 AS cor0
----
-26136
-35
-598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2117
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - col1 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2117
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - col1 AS col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2118
SELECT DISTINCT + + CAST( - col1 AS SIGNED ) FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-2118
SELECT DISTINCT + + CAST ( - col1 AS INTEGER ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT 67 + col2 FROM tab0 AS cor0
----
100
149
68

query I rowsort
SELECT - cor0.col0 + + col2 * + 74 FROM tab1 AS cor0
----
3993
4154
7024

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab1 cor1, tab1, tab1 AS cor2
----
3645 values hashing to 44545a6297aa29bb730ffb907c13bc58

query I rowsort
SELECT ALL 87 - col1 AS col2 FROM tab0 AS cor0
----
-10
-4
1

query I rowsort
SELECT - col1 + - tab0.col0 * col1 * - col0 FROM tab0 WHERE col1 > NULL
----

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab1 WHERE NOT ( col1 * col2 ) <> ( NULL )
----

query I rowsort
SELECT + col0 * col1 * tab1.col0 + col2 AS col0 FROM tab1
----
288
41017
83296

query I rowsort
SELECT ALL + col1 + col0 - col0 AS col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT col1 * + col2 * + 48 FROM tab1
----
27360
59904
67392

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2128
SELECT DISTINCT - + cor0.col2 - CAST( NULL AS SIGNED ) * - cor0.col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2128
SELECT DISTINCT - + cor0.col2 - CAST ( NULL AS INTEGER ) * - cor0.col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 + col0 * + col2 AS col2 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT DISTINCT - col1 + + 17 AS col0 FROM tab2 AS cor0
----
-14
-42
0

query I rowsort
SELECT DISTINCT cor0.col1 - 98 AS col0 FROM tab0 AS cor0
----
-1
-12
-7

query I rowsort
SELECT ALL + col1 + + cor0.col1 * + col0 * col0 FROM tab0 AS cor0
----
118922
49622
720902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + - col0 col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT + 9 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT DISTINCT + col1 * - 14 FROM tab0 AS cor0
----
-1204
-1274
-1358

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + 65 col1 FROM tab2 AS cor0
----
1690
1755
2470

query I rowsort
SELECT - col0 + col1 * - cor0.col0 FROM tab2 AS cor0
----
-1422
-224
-4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + ( - ( + col2 ) ) * - col1 * col2 col2 FROM tab1 AS cor0
----
119904
32547
75870

query I rowsort
SELECT DISTINCT col1 * col2 * - ( - col2 ) + col2 * + ( col0 + + col2 ) FROM tab0
----
133
625906
95535

onlyif mysql # use DIV operator for integer division
query I rowsort label-2140
SELECT ALL - + 4 DIV + 62 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-2140
SELECT ALL - + 4 / + 62 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT - 7 AS col1 FROM tab0
----
-7
-7
-7

query I rowsort
SELECT - 57 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab2, tab1 AS cor2
----
243 values hashing to 8cb69fe641d5073f3d026c445306c478

query I rowsort
SELECT ALL col0 * + ( col2 ) FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT - 79 AS col2 FROM tab1, tab2 AS cor0
----
-79

query I rowsort
SELECT DISTINCT - col0 * + 9 FROM tab0
----
-216
-315
-801

query I rowsort
SELECT ALL - - col1 * ( - col1 ) - col2 * 18 * col2 AS col0 FROM tab2 AS cor0
----
-14083
-15649
-26281

query I rowsort
SELECT ALL - col0 + tab1.col0 * col2 * 24 AS col1 FROM tab1
----
184240
3885
87488

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2148
SELECT - CAST( NULL AS SIGNED ) * 24 + + col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2148
SELECT - CAST ( NULL AS INTEGER ) * 24 + + col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + 60 + 76 - + col2 AS col2 FROM tab1
----
40
79
82

query I rowsort
SELECT col1 * col1 + cor0.col1 * col2 + - col1 AS col0 FROM tab2 AS cor0
----
1767
4956
918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( - col2 ) * 41 + col1 col0 FROM tab2 AS cor0
----
-1007
-1076
-1541

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 9 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT - col2 - cor0.col2 * col2 * - col1 AS col2 FROM tab0 cor0
----
611802
93621
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 2 + tab1.col1 col0 FROM tab1
----
11
24
8

query I rowsort
SELECT ( 65 ) + + col2 + + ( 34 ) FROM tab0
----
100
132
181

skipif mysql # not compatible
query I rowsort
SELECT ALL - col2 * col2 + CAST ( col2 * col2 AS REAL ) AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 + + col0 * - col1 * col0 FROM tab2 AS cor0
----
-106059
-1492
-358930

query I rowsort
SELECT ALL + - 37 FROM tab1 cor0
----
-37
-37
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 1 + cor0.col1 col0 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT DISTINCT - - 46 + cor0.col2 * col0 AS col2 FROM tab2 AS cor0
----
2074
235
3048

onlyif mysql # use DIV operator for integer division
query I rowsort label-2161
SELECT ALL col1 DIV + cor0.col2 AS col1 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2161
SELECT ALL col1 / + cor0.col2 AS col1 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT ALL - - 24 + col0 + - cor0.col1 AS col0 FROM tab2 AS cor0
----
0
43
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-2163
SELECT - col0 DIV col2 + + col2 AS col1 FROM tab1 cor0
----
54
56
96

skipif mysql # not compatible
query I rowsort label-2163
SELECT - col0 / col2 + + col2 AS col1 FROM tab1 cor0
----
54
56
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 96 col0 FROM tab1 AS cor0
----
-96
-96
-96

query I rowsort
SELECT col2 * + col0 + col2 + - col1 FROM tab2 AS cor0
----
185
1995
3023

query I rowsort
SELECT DISTINCT + 26 + col1 * col0 FROM tab1 AS cor0
----
104
1066
666

query I rowsort
SELECT - + col1 + cor0.col0 * col0 AS col0 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT + col0 + 54 + - 42 FROM tab2
----
19
90
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2169
SELECT col2 * CAST( col1 AS SIGNED ) + col2 AS col2 FROM tab0
----
2871
7544
98

skipif mysql # not compatible
query I rowsort label-2169
SELECT col2 * CAST ( col1 AS INTEGER ) + col2 AS col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT DISTINCT col2 + 81 * - col0 AS col1 FROM tab1
----
-189
-5127
-6384

query I rowsort
SELECT DISTINCT + col1 * + ( - col0 ) * col1 + - ( ( col1 ) + col2 ) AS col2 FROM tab2
----
-22886
-271603
-6785

query I rowsort
SELECT - col1 * col1 + - ( col2 ) AS col1 FROM tab2
----
-327
-3507
-988

query I rowsort
SELECT - + ( col2 ) - + col1 * col2 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT + - cor0.col0 + - col1 FROM tab0 AS cor0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 81 * 90 col1 FROM tab2 AS cor0
----
7290
7290
7290

query I rowsort
SELECT ( 56 ) + - col0 * ( col2 ) FROM tab1 AS cor0
----
-106
-3592
-7624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2178
SELECT col0 / CAST( NULL AS DECIMAL ) col0 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2178
SELECT col0 / CAST ( NULL AS REAL ) col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 + 81 + ( + col0 ) FROM tab2
----
122
133
61

query I rowsort
SELECT col0 * 86 + + col1 AS col2 FROM tab1 AS cor0
----
284
5514
6893

query I rowsort
SELECT ALL - + ( 69 ) AS col0 FROM tab0 AS cor0
----
-69
-69
-69

query I rowsort
SELECT cor0.col0 + col0 + - col2 AS col1 FROM tab1 cor0
----
-48
64
71

query I rowsort
SELECT - cor0.col2 - cor0.col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + ( 56 ) + col0 * ( col0 ) FROM tab2 AS cor0
----
105
6140
6297

query I rowsort
SELECT ALL + 5 + + col2 FROM tab1 AS cor0
----
101
59
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2186
SELECT DISTINCT + col2 + - col1 DIV + cor0.col2 FROM tab0 AS cor0
----
-96
31
81

skipif mysql # not compatible
query I rowsort label-2186
SELECT DISTINCT + col2 + - col1 / + cor0.col2 FROM tab0 AS cor0
----
-96
31
81

query I rowsort
SELECT cor0.col0 * 0 * col0 + col1 + col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL - col0 * 82 FROM tab1 AS cor0
----
-246
-5248
-6560

query I rowsort
SELECT 13 AS col0 FROM tab0 cor0
----
13
13
13

query I rowsort
SELECT ALL - col2 + - cor0.col2 * - col0 * - cor0.col0 + + col1 AS col1 FROM tab2 cor0
----
-1319
-158151
-237179

query I rowsort
SELECT ALL - + ( - col0 ) + + col1 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT cor0.col1 + - col2 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT + 50 + col1 * col1 * - col2 AS col1 FROM tab0 AS cor0
----
-244018
-678992
-9359

query I rowsort
SELECT - - 15 * - cor0.col2 FROM tab0 AS cor0
----
-1230
-15
-495

query I rowsort
SELECT ALL + 69 + col0 FROM tab0 AS cor0
----
104
158
93

query I rowsort
SELECT ALL - col0 * 47 FROM tab1 cor0
----
-141
-3008
-3760

query I rowsort
SELECT - 86 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2198
SELECT - col1 * - 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-2198
SELECT - col1 * - CAST ( NULL AS INTEGER ) + col0 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + cor0.col2 * + 51 FROM tab2 AS cor0
----
-1326
-1377
-1938

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( ( col0 ) ) * col2 * + 2 col2 FROM tab2 AS cor0
----
-378
-4056
-6004

query I rowsort
SELECT + col2 + + col2 + 80 * ( col0 ) FROM tab1 AS cor0
----
348
5234
6592

query I rowsort
SELECT - col2 * + cor0.col2 * - ( 99 + cor0.col2 ) FROM tab0 AS cor0
----
100
1217044
143748

onlyif mysql # use DIV operator for integer division
query I rowsort label-2203
SELECT - 41 DIV - cor0.col0 + - ( col1 ) + + col1 AS col0 FROM tab2 AS cor0
----
0
0
5

skipif mysql # not compatible
query I rowsort label-2203
SELECT - 41 / - cor0.col0 + - ( col1 ) + + col1 AS col0 FROM tab2 AS cor0
----
0
0
5

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab1 AS cor1, tab2, tab0 cor2
----
3645 values hashing to 5acb69cde71208fe580e10b8b669428e

query I rowsort
SELECT - col2 * - cor0.col0 + 85 AS col2 FROM tab1 AS cor0
----
247
3733
7765

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) + - 17 col1 FROM tab0 AS cor0
----
-106
-41
-52

query I rowsort
SELECT - col1 * - 68 AS col0 FROM tab2 AS cor0
----
1156
2108
4012

query I rowsort
SELECT - col0 - col0 AS col2 FROM tab0
----
-178
-48
-70

query I rowsort
SELECT - ( cor0.col0 ) * col2 AS col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT col1 * 50 FROM tab1 AS cor0
----
1300
500
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col0 col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # use DIV operator for integer division
query I rowsort label-2212
SELECT DISTINCT + col0 + col0 DIV col1 AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2212
SELECT DISTINCT + col0 + col0 / col1 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + cor0.col0 * col1 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2214
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2214
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT 40 + + 9 FROM tab0, tab0 AS cor0
----
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * 19 col0 FROM tab2 AS cor0
----
133
1482
1501

query I rowsort
SELECT + col1 + - ( - col2 ) + - col2 * col1 FROM tab0
----
-2719
-7289
1

query I rowsort
SELECT - col1 * ( + col1 ) - col2 AS col2 FROM tab0
----
-7429
-8363
-9410

query I rowsort
SELECT + col2 - 88 * col1 AS col2 FROM tab2
----
-1458
-2701
-5166

query I rowsort
SELECT ALL col2 - col0 * + col1 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL - + cor0.col2 + 33 AS col2 FROM tab1 AS cor0
----
-21
-24
-63

query I rowsort
SELECT DISTINCT - - col2 + - 17 AS col2 FROM tab2 AS cor0
----
10
21
9

query I rowsort
SELECT 34 * - cor0.col2 * col0 + - col1 AS col2 FROM tab0 cor0
----
-1287
-248223
-27014

query I rowsort
SELECT ALL col1 + - col0 + - col0 AS col1 FROM tab0 AS cor0
----
-87
27
38

query I rowsort
SELECT DISTINCT + - 84 * + col1 - - col2 AS col2 FROM tab0 AS cor0
----
-7191
-7562
-8147

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2226
SELECT - CAST( - col2 AS SIGNED ) + + col2 * + col0 FROM tab1 AS cor0
----
216
3705
7776

skipif mysql # not compatible
query I rowsort label-2226
SELECT - CAST ( - col2 AS INTEGER ) + + col2 * + col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT - 44 AS col2 FROM tab0 cor0
----
-44
-44
-44

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + 53 AS REAL ) FROM tab0 AS cor0
----
53
53
53

query I rowsort
SELECT col0 * - 37 AS col1 FROM tab2
----
-259
-2886
-2923

query I rowsort
SELECT - col1 * + 20 AS col0 FROM tab1
----
-200
-260
-520

query I rowsort
SELECT ALL - ( + col1 ) + + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 51 col0 FROM tab0 AS cor0
----
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-2233
SELECT DISTINCT + col1 DIV 19 FROM tab2 AS cor0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-2233
SELECT DISTINCT + col1 / 19 FROM tab2 AS cor0
----
0
1
3

query I rowsort
SELECT cor0.col2 FROM tab0, tab1 cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2235
SELECT DISTINCT - + CAST( 37 AS SIGNED ) * col0 AS col0 FROM tab1 AS cor0
----
-111
-2368
-2960

skipif mysql # not compatible
query I rowsort label-2235
SELECT DISTINCT - + CAST ( 37 AS INTEGER ) * col0 AS col0 FROM tab1 AS cor0
----
-111
-2368
-2960

query I rowsort
SELECT - - ( col1 ) * + cor0.col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + + col0 * col0 * col2 FROM tab2 AS cor0
----
1323
158184
237158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2238
SELECT ALL + CAST( - 47 * col2 AS SIGNED ) FROM tab2
----
-1222
-1269
-1786

skipif mysql # not compatible
query I rowsort label-2238
SELECT ALL + CAST ( - 47 * col2 AS INTEGER ) FROM tab2
----
-1222
-1269
-1786

query I rowsort
SELECT 89 * - col1 FROM tab1
----
-1157
-2314
-890

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2240
SELECT ALL CAST( 28 + - col2 AS SIGNED ) * col1 FROM tab2
----
-170
118
31

skipif mysql # not compatible
query I rowsort label-2240
SELECT ALL CAST ( 28 + - col2 AS INTEGER ) * col1 FROM tab2
----
-170
118
31

query I rowsort
SELECT ALL 7 * 27 - col2 FROM tab1 AS cor0
----
132
135
93

query I rowsort
SELECT DISTINCT col0 + + 84 AS col2 FROM tab2 AS cor0
----
162
163
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-2243
SELECT ALL - ( - 5 ) + + col2 DIV 1 FROM tab2 cor0
----
31
32
43

skipif mysql # not compatible
query I rowsort label-2243
SELECT ALL - ( - 5 ) + + col2 / 1 FROM tab2 cor0
----
31
32
43

query I rowsort
SELECT ALL - col0 * col0 + + col0 * 90 FROM tab2 cor0
----
581
869
936

query I rowsort
SELECT DISTINCT col1 + - col1 * - tab1.col1 AS col1 FROM tab1
----
110
182
702

query I rowsort
SELECT + col0 * 40 - tab0.col0 FROM tab0
----
1365
3471
936

query I rowsort
SELECT ALL cor0.col2 * cor0.col1 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to f5605ce6cbd6ecc79a4a887488bb6947

query I rowsort
SELECT + 60 FROM tab1, tab2 cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT ALL - 79 + col1 + - col2 AS col1 FROM tab0 AS cor0
----
-26
-70
17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2250
SELECT DISTINCT 36 + + col1 - + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2250
SELECT DISTINCT 36 + + col1 - + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 19 * + col0 - 10 * + 48 col0 FROM tab2 AS cor0
----
-347
1002
1021

query I rowsort
SELECT + col1 + 9 AS col1 FROM tab2
----
26
40
68

query I rowsort
SELECT 28 + - col0 AS col2 FROM tab1
----
-36
-52
25

query I rowsort
SELECT DISTINCT col2 + - 62 * col0 AS col1 FROM tab0
----
-1455
-2169
-5436

query I rowsort
SELECT DISTINCT - - col2 * ( + col0 + col2 ) AS col1 FROM tab1 AS cor0
----
16896
3078
6897

query I rowsort
SELECT DISTINCT - - cor0.col0 * + 67 FROM tab2 AS cor0
----
469
5226
5293

query I rowsort
SELECT - cor0.col2 * 68 + - 95 * cor0.col0 * 26 - col2 AS col2 FROM tab1 AS cor0
----
-11136
-162013
-204224

query I rowsort
SELECT col0 + col1 * - 5 AS col2 FROM tab1 AS cor0
----
-127
14
15

query I rowsort
SELECT - 52 - + cor0.col2 AS col2 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 8a1640c57b1733d008709876c20acac6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 * + tab2.col1 col1 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT col2 + 79 AS col0 FROM tab1 AS cor0
----
133
136
175

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * ( col1 ) - - col0 * - 76 * col2 col1 FROM tab1 cor0
----
-10908
-276678
-582432

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + 61 col2 FROM tab1 AS cor0
----
183
3904
4880

query I rowsort
SELECT ALL - - col0 * - 56 AS col1 FROM tab1 cor0
----
-168
-3584
-4480

query I rowsort
SELECT + 24 * col2 + 7 FROM tab1
----
1303
1375
2311

query I rowsort
SELECT DISTINCT - col2 * + col0 * col2 AS col1 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT ALL col1 * 13 + - 39 * col0 AS col2 FROM tab2
----
-2275
-2860
130

query I rowsort
SELECT col2 - - col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL - col2 + col1 * + 28 AS col2 FROM tab2 AS cor0
----
1626
438
841

query I rowsort
SELECT DISTINCT + col0 * + ( col2 * col1 + - col1 * col2 ) FROM tab0 cor0
----
0

query I rowsort
SELECT ALL + - col1 + - cor0.col1 AS col0 FROM tab2 cor0
----
-118
-34
-62

query I rowsort
SELECT - - col1 * - col1 + col1 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-744
1054
1121

query I rowsort
SELECT + col0 * - ( + 1 ) + col0 * + col2 FROM tab1 AS cor0
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-2274
SELECT col1 DIV + col2 + 17 * col2 FROM tab0
----
114
1395
563

skipif mysql # not compatible
query I rowsort label-2274
SELECT col1 / + col2 + 17 * col2 FROM tab0
----
114
1395
563

onlyif mysql # use DIV operator for integer division
query I rowsort label-2275
SELECT + 45 DIV - col0 + - col2 AS col2 FROM tab0
----
-2
-34
-82

skipif mysql # not compatible
query I rowsort label-2275
SELECT + 45 / - col0 + - col2 AS col2 FROM tab0
----
-2
-34
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2276
SELECT col0 DIV + cor0.col2 col0 FROM tab1 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2276
SELECT col0 / + cor0.col2 col0 FROM tab1 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col2 + tab0.col1 + col2 col1 FROM tab0
----
-2719
-7289
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2278
SELECT + CAST( col2 AS SIGNED ) * + col1 + - col0 * col2 + col0 * + 13 AS col2 FROM tab0 AS cor0
----
1321
2358
517

skipif mysql # not compatible
query I rowsort label-2278
SELECT + CAST ( col2 AS INTEGER ) * + col1 + - col0 * col2 + col0 * + 13 AS col2 FROM tab0 AS cor0
----
1321
2358
517

query I rowsort
SELECT - + col1 * 24 FROM tab0 AS cor0
----
-2064
-2184
-2328

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + ( + 19 ) col0 FROM tab2
----
26
97
98

query I rowsort
SELECT + 72 + + 70 FROM tab2 AS cor0
----
142
142
142

query I rowsort
SELECT 62 * - cor0.col2 + - col0 + + 71 FROM tab2 cor0
----
-1610
-1619
-2364

query I rowsort
SELECT ALL col1 * + col0 * col1 AS col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT DISTINCT - col2 + + col1 + - col1 * col0 * tab0.col0 AS col2 FROM tab0
----
-118729
-49483
-720802

query I rowsort
SELECT tab2.col0 + - ( 70 ) AS col0 FROM tab2
----
-63
8
9

query I rowsort
SELECT + col1 + 99 * - ( col0 + + ( 43 ) ) AS col0 FROM tab0
----
-12977
-6547
-7625

query I rowsort
SELECT 84 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT + - ( - 17 ) + - cor0.col0 AS col1 FROM tab1 AS cor0
----
-47
-63
14

query I rowsort
SELECT ALL - - col2 * ( col0 * + 9 ) FROM tab2 cor0
----
1701
18252
27018

query I rowsort
SELECT ALL + - col0 + col0 * - col0 - 81 FROM tab1 AS cor0
----
-4241
-6561
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 + + 38 col0 FROM tab1 AS cor0
----
48
51
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 54 * col0 + + col1 col1 FROM tab2 AS cor0
----
-347
-4153
-4249

query I rowsort
SELECT DISTINCT 16 + - col1 FROM tab0 AS cor0
----
-70
-75
-81

query I rowsort
SELECT DISTINCT + col1 * 95 + col1 FROM tab2 cor0
----
1632
2976
5664

query I rowsort
SELECT ALL 88 * 76 AS col1 FROM tab1
----
6688
6688
6688

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT ALL - 88 AS col0 FROM tab2 AS cor0
----
-88
-88
-88

query I rowsort
SELECT - tab1.col0 + + col2 * col2 + 52 * + col0 * - col0 AS col1 FROM tab1
----
-209807
-323664
2445

query I rowsort
SELECT - 44 + - ( col0 + col1 ) * + ( - col2 ) AS col1 FROM tab2
----
3518
3604
982

query I rowsort
SELECT ( cor0.col1 ) + + col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - 2 AS col2 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 20c9213316527d507e26425041e08387

query I rowsort
SELECT DISTINCT tab0.col1 * - tab0.col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + + 77 + col1 FROM tab0 AS cor0
----
163
168
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - col0 col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 78 AS col0 FROM tab2 AS cor0
----
-78

query I rowsort
SELECT ALL cor0.col2 * - cor0.col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - ( col0 ) * col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-2308
SELECT col2 DIV 37 FROM tab1
----
1
1
2

skipif mysql # not compatible
query I rowsort label-2308
SELECT col2 / 37 FROM tab1
----
1
1
2

query I rowsort
SELECT DISTINCT cor0.col0 - - col0 * + col1 AS col0 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2310
SELECT col0 + + CAST( col0 + + col2 AS SIGNED ) * col0 FROM tab0 cor0
----
1295
1392
15308

skipif mysql # not compatible
query I rowsort label-2310
SELECT col0 + + CAST ( col0 + + col2 AS INTEGER ) * col0 FROM tab0 cor0
----
1295
1392
15308

query I rowsort
SELECT - col2 + - 51 * + col1 FROM tab2 AS cor0
----
-1608
-3035
-905

query I rowsort
SELECT + 90 + cor0.col2 AS col0 FROM tab0 AS cor0
----
123
172
91

query I rowsort
SELECT col0 + + col0 + - col0 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT - + 61 AS col0 FROM tab2 AS cor0
----
-61

query I rowsort
SELECT + col1 * 80 AS col2 FROM tab0 AS cor0
----
6880
7280
7760

query I rowsort
SELECT ALL - col1 * - col1 * + col2 AS col0 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT ALL + col1 * ( ( col2 ) ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + cor0.col0 + ( - 35 ) FROM tab2 AS cor0
----
-28
43
44

query I rowsort
SELECT DISTINCT cor0.col2 + col0 + + col2 * + col2 AS col0 FROM tab0 cor0
----
1146
37
6895

onlyif mysql # use DIV operator for integer division
query I rowsort label-2320
SELECT ALL + col0 DIV ( + col0 ) - - col1 AS col0 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-2320
SELECT ALL + col0 / ( + col0 ) - - col1 AS col0 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT - col0 * - col0 + col2 * + col2 AS col2 FROM tab0 AS cor0
----
1226
14645
1665

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col1 + + 75 col1 FROM tab2 AS cor0
----
16
44
58

query I rowsort
SELECT col2 + + 11 + col0 AS col1 FROM tab2 AS cor0
----
115
128
45

query I rowsort
SELECT DISTINCT + col0 + col0 * 69 AS col1 FROM tab0 cor0
----
1680
2450
6230

query I rowsort
SELECT ALL - col1 * - cor0.col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col0 + - 66 AS col1 FROM tab1 AS cor0
----
-130
-146
-69

query I rowsort
SELECT DISTINCT - + col1 * + 54 AS col1 FROM tab0 AS cor0
----
-4644
-4914
-5238

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 cor2
----
972 values hashing to 4c0813b2179303fdf58f082d81d6d03c

query I rowsort
SELECT + cor0.col0 * 26 FROM tab2, tab0 AS cor0
----
9 values hashing to 41b6b26d7cd29c488633bf055b58762b

query I rowsort
SELECT col1 + + 69 AS col0 FROM tab0
----
155
160
166

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 cor0 CROSS JOIN tab0, tab0 AS cor1, tab1, tab0 AS cor2, tab2
----
-26
-27
-38

query I rowsort
SELECT cor0.col2 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + 79 FROM tab2 AS cor0 CROSS JOIN tab2, tab1 cor1, tab1 AS cor2
----
79

query I rowsort
SELECT - tab0.col1 * - col0 + col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT + 84 * col1 AS col1 FROM tab1
----
1092
2184
840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col0 * + 22 * cor0.col1 col1 FROM tab2 AS cor0
----
101303
29563
4805

query I rowsort
SELECT + 57 AS col2 FROM tab1
----
57
57
57

query I rowsort
SELECT - cor1.col1 - ( cor1.col1 ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 66e198acca624efd182aa551bb5de4c7

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0 CROSS JOIN tab0, tab2, tab1 AS cor1
----
3645 values hashing to ae08f1949fd59e00b049f28175217e60

onlyif mysql # use DIV operator for integer division
query I rowsort label-2340
SELECT + col0 * col0 + col1 DIV col2 + col0 FROM tab1
----
12
4160
6480

skipif mysql # not compatible
query I rowsort label-2340
SELECT + col0 * col0 + col1 / col2 + col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT DISTINCT - 19 * col0 * - col1 + + 56 - 88 AS col1 FROM tab1
----
12128
1450
19728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2342
SELECT DISTINCT + col1 * - col2 + CAST( NULL AS SIGNED ) * - col0 * col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2342
SELECT DISTINCT + col1 * - col2 + CAST ( NULL AS INTEGER ) * - col0 * col0 FROM tab1
----
NULL

query I rowsort
SELECT 2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

query I rowsort
SELECT 94 * - col2 * - 64 + tab0.col1 + - col0 * - col2 FROM tab0
----
199406
500701
6148

query I rowsort
SELECT DISTINCT - col1 + - col2 + - 65 * - 82 FROM tab1
----
5221
5250
5263

query I rowsort
SELECT ALL - col2 + - tab2.col2 FROM tab2
----
-52
-54
-76

query I rowsort
SELECT 48 + col1 * + 70 * col0 FROM tab2 cor0
----
15238
322188
94058

query I rowsort
SELECT col0 * col1 + ( col1 ) FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL 89 + + col0 FROM tab2
----
167
168
96

query I rowsort
SELECT ALL - ( 40 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f02f17e9bc17e514af018c6f245ed7a9

query I rowsort
SELECT - col0 + cor0.col0 * + col2 AS col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT ALL - 34 * col0 + col2 FROM tab2 AS cor0
----
-211
-2626
-2648

query I rowsort
SELECT DISTINCT - col2 * col1 + col1 * - col2 FROM tab1 AS cor0
----
-1140
-2496
-2808

query I rowsort
SELECT DISTINCT col1 + col0 * col0 AS col0 FROM tab1 cor0
----
35
4106
6413

query I rowsort
SELECT + + 19 * col1 FROM tab1 AS cor0
----
190
247
494

query I rowsort
SELECT ALL + 69 + col0 FROM tab2 AS cor0
----
147
148
76

query I rowsort
SELECT - - col2 + + col2 + + col1 AS col1 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT - col0 + 90 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-20
-42
-90

query I rowsort
SELECT DISTINCT + col0 * - ( - 87 + col1 ) AS col0 FROM tab1 AS cor0
----
183
4928
5920

query I rowsort
SELECT DISTINCT col1 + 33 FROM tab2 AS cor0
----
50
64
92

query I rowsort
SELECT - col0 * + 35 * - col2 AS col1 FROM tab1
----
127680
268800
5670

onlyif mysql # use DIV operator for integer division
query I rowsort label-2362
SELECT + - col2 + col2 + 30 * - col0 DIV + 1 AS col2 FROM tab2 cor0
----
-210
-2340
-2370

skipif mysql # not compatible
query I rowsort label-2362
SELECT + - col2 + col2 + 30 * - col0 / + 1 AS col2 FROM tab2 cor0
----
-210
-2340
-2370

query I rowsort
SELECT - 27 AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2364
SELECT ALL - col0 + + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2364
SELECT ALL - col0 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col0 + 28 * col1 FROM tab2 AS cor0
----
1574
397
861

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2366
SELECT DISTINCT + cor0.col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2366
SELECT DISTINCT + cor0.col2 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2367
SELECT + col0 * CAST( - col1 AS SIGNED ) + col1 * cor0.col0 + - col2 DIV col0 AS col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-2367
SELECT + col0 * CAST ( - col1 AS INTEGER ) + col1 * cor0.col0 + - col2 / col0 AS col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT DISTINCT + col2 + - col2 * - cor0.col1 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-2369
SELECT ALL 42 - col1 DIV cor0.col1 AS col2 FROM tab0 AS cor0
----
41
41
41

skipif mysql # not compatible
query I rowsort label-2369
SELECT ALL 42 - col1 / cor0.col1 AS col2 FROM tab0 AS cor0
----
41
41
41

query I rowsort
SELECT - ( + ( - col1 ) ) FROM tab1 cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2371
SELECT DISTINCT CAST( NULL AS SIGNED ) * + 94 + col0 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2371
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + 94 + col0 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ( + col2 ) * + col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2373
SELECT ALL + + CAST( col0 AS SIGNED ) * - cor0.col2 - cor0.col1 FROM tab0 AS cor0
----
-132
-7389
-878

skipif mysql # not compatible
query I rowsort label-2373
SELECT ALL + + CAST ( col0 AS INTEGER ) * - cor0.col2 - cor0.col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT + col2 * 63 + - col2 FROM tab1
----
3348
3534
5952

query I rowsort
SELECT ALL ( + col1 ) * col1 + 26 * col1 + col2 FROM tab1 AS cor0
----
1406
417
603

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) * cor0.col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - - cor0.col1 * - col2 + - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor2.col0 + - 36 - cor2.col0 col2 FROM tab0, tab1 AS cor0, tab0 cor1, tab2, tab0 AS cor2
----
243 values hashing to c1ae4c89d090987d84c5253ea2a6e34b

query I rowsort
SELECT ALL + 76 - - ( col0 + col2 ) FROM tab1 AS cor0
----
133
197
252

query I rowsort
SELECT + col2 + - col2 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL ( + col0 ) * col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - - col2 * - col0 * col0 + col1 * col1 FROM tab1 AS cor0
----
-233372
-614231
190

query I rowsort
SELECT ALL + col1 + col0 * - ( 53 ) AS col0 FROM tab0 AS cor0
----
-1186
-1758
-4626

query I rowsort
SELECT DISTINCT - + 83 AS col1 FROM tab0 AS cor0
----
-83

query I rowsort
SELECT + col0 - - cor0.col0 AS col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT - col1 + + col1 * + cor0.col0 * col2 AS col0 FROM tab1 AS cor0
----
36470
4186
99827

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 + + 21 FROM tab0 AS cor0
----
-7375
-8260
-9388

query I rowsort
SELECT col0 * cor0.col1 - col2 AS col1 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT ALL + ( ( col1 ) ) * - col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT 12 * 92 AS col2 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to efd963c930af7ab3163e0f64e20752a8

query I rowsort
SELECT - 7 + + col1 AS col1 FROM tab1
----
19
3
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2392
SELECT ( 58 ) DIV col0 - 25 AS col2 FROM tab2
----
-17
-25
-25

skipif mysql # not compatible
query I rowsort label-2392
SELECT ( 58 ) / col0 - 25 AS col2 FROM tab2
----
-17
-25
-25

query I rowsort
SELECT DISTINCT 90 FROM tab0, tab2, tab0 AS cor0
----
90

query I rowsort
SELECT ALL - - col1 * - col2 + col2 * col0 - + col1 FROM tab0 cor0
----
-159
-2132
-255

query I rowsort
SELECT ALL + + col2 + col1 + - col1 * + col2 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
-10927
-25889
-90421

query I rowsort
SELECT DISTINCT - col2 - col2 * col0 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT - col1 * - col1 + + col2 * - col2 FROM tab1 AS cor0
----
-2240
-3149
-9047

onlyif mysql # use DIV operator for integer division
query I rowsort label-2398
SELECT ALL + col2 * - col2 + + cor0.col1 DIV col0 AS col1 FROM tab0 AS cor0
----
-1086
-6723
1

skipif mysql # not compatible
query I rowsort label-2398
SELECT ALL + col2 * - col2 + + cor0.col1 / col0 AS col1 FROM tab0 AS cor0
----
-1086
-6723
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * col0 + col0 col1 FROM tab0 AS cor0
----
-7209
-768
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * cor0.col1 + + cor0.col2 col1 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-2401
SELECT col2 DIV col1 + tab2.col2 * + col0 AS col2 FROM tab2
----
189
2028
3004

skipif mysql # not compatible
query I rowsort label-2401
SELECT col2 / col1 + tab2.col2 * + col0 AS col2 FROM tab2
----
189
2028
3004

query I rowsort
SELECT ALL col0 + col2 * col1 AS col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT + + 46 * + col0 AS col0 FROM tab0 AS cor0
----
1104
1610
4094

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) + col1 * col0 col0 FROM tab1 AS cor0
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + - cor0.col2 * col2 col1 FROM tab0 AS cor0
----
-1065
-6635
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col0 - col0 col1 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT + - cor0.col0 * + col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - - col1 * + col0 + col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT - ( col0 ) * cor0.col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL ( col1 ) * col2 * + col2 + tab0.col1 * col0 FROM tab0
----
3492
619983
95718

query I rowsort
SELECT col0 + 11 * + col1 - - tab2.col2 FROM tab2
----
304
375
753

query I rowsort
SELECT DISTINCT 32 AS col1 FROM tab2, tab2 AS cor0
----
32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2414
SELECT CAST( NULL AS SIGNED ) / 96 + tab2.col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2414
SELECT CAST ( NULL AS INTEGER ) / 96 + tab2.col0 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2415
SELECT col1 + + col0 * col1 DIV col2 AS col2 FROM tab1
----
21
23
27

skipif mysql # not compatible
query I rowsort label-2415
SELECT col1 + + col0 * col1 / col2 AS col2 FROM tab1
----
21
23
27

query I rowsort
SELECT - 55 - - col1 AS col2 FROM tab0 AS cor0
----
31
36
42

query I rowsort
SELECT DISTINCT col0 + - 93 FROM tab1
----
-13
-29
-90

query I rowsort
SELECT - 45 * - col1 FROM tab1
----
1170
450
585

query I rowsort
SELECT DISTINCT - 87 + - col2 FROM tab0
----
-120
-169
-88

query I rowsort
SELECT ALL + col0 * col2 + tab0.col1 * + col1 FROM tab0
----
15579
8188
9444

query I rowsort
SELECT + 74 * + col2 + + col1 FROM tab1 AS cor0
----
4022
4228
7117

query I rowsort
SELECT ALL - col1 + + col2 * cor0.col1 AS col0 FROM tab0 AS cor0
----
0
2752
7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-2423
SELECT DISTINCT + cor0.col2 DIV col0 - - col1 * col1 FROM tab0 AS cor0
----
7397
8281
9409

skipif mysql # not compatible
query I rowsort label-2423
SELECT DISTINCT + cor0.col2 / col0 - - col1 * col1 FROM tab0 AS cor0
----
7397
8281
9409

query I rowsort
SELECT ALL + - col1 * + col0 * - col0 AS col0 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT + 86 AS col1 FROM tab2
----
86
86
86

query I rowsort
SELECT DISTINCT col0 + col0 * col2 AS col2 FROM tab2
----
196
2106
3081

query I rowsort
SELECT ALL + col0 * tab0.col2 + - col1 AS col1 FROM tab0
----
-62
706
7207

query I rowsort
SELECT ALL - col2 + col0 * - col2 AS col1 FROM tab2
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT col1 + col2 * tab0.col2 FROM tab0
----
1175
6815
98

query I rowsort
SELECT col2 + - col0 - - col2 * col0 FROM tab0
----
1
7291
801

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + col0 NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT * FROM tab0 WHERE - col0 * col1 < NULL
----

query I rowsort
SELECT + col1 * + col2 + - col1 FROM tab2
----
1475
629
806

query I rowsort
SELECT DISTINCT - col2 * col2 * - tab2.col0 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT + col0 + - col2 + col2 * + col1 AS col1 FROM tab0
----
131
2829
7469

query I rowsort
SELECT ALL tab0.col1 + - col0 * col1 AS col0 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT - col1 + + col0 AS col2 FROM tab0 WHERE NOT ( NULL ) IN ( - col0 )
----

query I rowsort
SELECT DISTINCT - col0 * + col0 * tab2.col1 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT col1 + + col0 * col0 FROM tab2
----
6143
6258
80

query I rowsort
SELECT ALL - col2 * col2 + - col0 + + col1 FROM tab0
----
-1027
-6722
61

query I rowsort
SELECT ALL col2 + - col2 * col2 * + col1 + + col1 FROM tab0
----
-611711
-93535
1

query III rowsort
SELECT * FROM tab2 WHERE NULL NOT IN ( + col2 * - col0 )
----

query I rowsort
SELECT DISTINCT + tab2.col2 * - col0 * col1 AS col0 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 FROM tab2 AS cor0
----
14
156
158

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT + col0 * col0 + tab2.col1 >= ( - col2 )
----

query I rowsort
SELECT col0 + + col0 * col1 * tab2.col1 FROM tab2 WHERE - col0 + col0 + + col0 IN ( - col2 * col0 )
----

query I rowsort
SELECT + col2 * + cor0.col0 + col1 FROM tab1 AS cor0
----
188
3658
7693

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT ( + col0 + col1 ) IN ( col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-2449
SELECT - cor0.col0 DIV - col0 col2 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2449
SELECT - cor0.col0 / - col0 col2 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2450
SELECT ( col1 ) * col0 + - col0 DIV + 55 AS col0 FROM tab2 AS cor0
----
1342
217
4601

skipif mysql # not compatible
query I rowsort label-2450
SELECT ( col1 ) * col0 + - col0 / + 55 AS col0 FROM tab2 AS cor0
----
1342
217
4601

query I rowsort
SELECT + 57 - 21 AS col0 FROM tab0 AS cor0
----
36
36
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-2452
SELECT ALL 42 DIV - col2 FROM tab0 AS cor0
----
-1
-42
0

skipif mysql # not compatible
query I rowsort label-2452
SELECT ALL 42 / - col2 FROM tab0 AS cor0
----
-1
-42
0

query I rowsort
SELECT + - col1 + 84 AS col1 FROM tab2 cor0
----
25
53
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 31 col0 FROM tab0 AS cor0
----
-31
-31
-31

query I rowsort
SELECT - 99 AS col1 FROM tab0 AS cor0
----
-99
-99
-99

query I rowsort
SELECT DISTINCT 55 + - 98 + col2 * col1 FROM tab2 AS cor0
----
1491
603
794

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2457
SELECT CAST( col1 AS SIGNED ) + - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2457
SELECT CAST ( col1 AS INTEGER ) + - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - cor0.col2 + col0 * + col0 AS col1 FROM tab0 AS cor0
----
1224
543
7839

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 94 + col1 col0 FROM tab2 AS cor0
----
-35
-63
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-2460
SELECT DISTINCT + + 27 * - col0 + col0 + ( - col0 + col2 ) DIV - col1 FROM tab0 AS cor0
----
-2314
-624
-910

skipif mysql # not compatible
query I rowsort label-2460
SELECT DISTINCT + + 27 * - col0 + col0 + ( - col0 + col2 ) / - col1 FROM tab0 AS cor0
----
-2314
-624
-910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 21 - - col2 col1 FROM tab0 AS cor0
----
-20
12
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col2 col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT 24 * + 72 + col0 AS col1 FROM tab0 AS cor0
----
1752
1763
1817

query I rowsort
SELECT col0 - + 31 FROM tab0 AS cor0
----
-7
4
58

query I rowsort
SELECT ALL - col0 * + ( - col1 * + 16 ) + 64 FROM tab2 cor0
----
21552
3536
73696

query I rowsort
SELECT DISTINCT - - ( - 25 ) * - col0 + 46 * col1 * col2 FROM tab2 AS cor0
----
31691
38677
72514

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2467
SELECT + ( col1 ) * col2 - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2467
SELECT + ( col1 ) * col2 - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 88 FROM tab0 AS cor0
----
-88
-88
-88

query I rowsort
SELECT ALL - col2 + - col0 * col1 * col1 AS col0 FROM tab2 AS cor0
----
-22869
-271544
-6754

query I rowsort
SELECT DISTINCT - + col0 - - col0 FROM tab1 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 28 + cor0.col0 col2 FROM tab0 cor0
----
-4
61
7

query I rowsort
SELECT DISTINCT - + col1 * col0 + - col0 AS col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL + + col1 * col2 + - 73 FROM tab2 AS cor0
----
1461
573
764

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2474
SELECT ALL + 90 * col2 + + CAST( - col2 AS SIGNED ) * col2 * + col1 FROM tab0 AS cor0
----
-604504
-7
-90684

skipif mysql # not compatible
query I rowsort label-2474
SELECT ALL + 90 * col2 + + CAST ( - col2 AS INTEGER ) * col2 * + col1 FROM tab0 AS cor0
----
-604504
-7
-90684

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col1 col0 FROM tab1
----
20
26
52

query I rowsort
SELECT + 38 * + col0 + + col1 FROM tab1
----
140
2442
3053

query I rowsort
SELECT ALL col0 * cor0.col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL col1 * 27 AS col1 FROM tab0 AS cor0
----
2322
2457
2619

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2479
SELECT ALL + CAST( + 25 AS SIGNED ) AS col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

skipif mysql # not compatible
query I rowsort label-2479
SELECT ALL + CAST ( + 25 AS INTEGER ) AS col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2, tab1 AS cor0 WHERE NULL IN ( + cor0.col1 )
----

query I rowsort
SELECT - cor0.col2 FROM tab2, tab1, tab2 cor0
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT ALL tab0.col1 - tab0.col0 AS col0 FROM tab0
----
2
62
62

query I rowsort
SELECT ALL col2 + col0 * tab2.col0 - col0 FROM tab2
----
6032
6200
69

query I rowsort
SELECT ALL - col0 * + col2 - - col0 FROM tab0
----
-7209
-768
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2485
SELECT DISTINCT + col1 DIV + ( col1 ) FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-2485
SELECT DISTINCT + col1 / + ( col1 ) FROM tab1
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2486
SELECT - col0 DIV col1 + 49 FROM tab0
----
49
49
49

skipif mysql # not compatible
query I rowsort label-2486
SELECT - col0 / col1 + 49 FROM tab0
----
49
49
49

query I rowsort
SELECT cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + col2 + 81 FROM tab0
----
114
163
82

query I rowsort
SELECT DISTINCT tab0.col0 * - col2 * col0 AS col0 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT col2 * col0 + - 72 * + col0 AS col1 FROM tab2
----
-2686
-315
-3588

query I rowsort
SELECT ALL 62 FROM tab2, tab0 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT ALL col1 + 47 + tab2.col0 FROM tab2
----
143
184
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-2493
SELECT cor0.col0 + + col1 DIV cor0.col1 - cor0.col1 FROM tab0 AS cor0
----
-1
-61
-61

skipif mysql # not compatible
query I rowsort label-2493
SELECT cor0.col0 + + col1 / cor0.col1 - cor0.col1 FROM tab0 AS cor0
----
-1
-61
-61

onlyif mysql # use DIV operator for integer division
query I rowsort label-2494
SELECT DISTINCT - col1 * + col0 + col1 DIV + col0 + col2 FROM tab0
----
-2028
-3392
-8016

skipif mysql # not compatible
query I rowsort label-2494
SELECT DISTINCT - col1 * + col0 + col1 / + col0 + col2 FROM tab0
----
-2028
-3392
-8016

query I rowsort
SELECT DISTINCT tab1.col1 * col1 + col0 * col0 AS col1 FROM tab1
----
4196
6569
685

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 + - col1 * col1 col1 FROM tab0
----
-7372
-8192
-9374

onlyif mysql # use DIV operator for integer division
query I rowsort label-2497
SELECT 75 DIV - col2 AS col2 FROM tab0
----
-2
-75
0

skipif mysql # not compatible
query I rowsort label-2497
SELECT 75 / - col2 AS col2 FROM tab0
----
-2
-75
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2498
SELECT 97 DIV + 80 + col1 + col0 * col1 * tab0.col0 AS col1 FROM tab0
----
118923
49623
720903

skipif mysql # not compatible
query I rowsort label-2498
SELECT 97 / + 80 + col1 + col0 * col1 * tab0.col0 AS col1 FROM tab0
----
118923
49623
720903

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 1 col2 FROM tab2
----
17
31
59

query I rowsort
SELECT + + ( col2 ) * + col0 * + col0 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT ALL 31 FROM tab2 cor0
----
31
31
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-2502
SELECT DISTINCT - - 56 DIV 7 FROM tab2 AS cor0
----
8

skipif mysql # not compatible
query I rowsort label-2502
SELECT DISTINCT - - 56 / 7 FROM tab2 AS cor0
----
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 31 + + col2 * + col0 col0 FROM tab2 AS cor0
----
2059
220
3033

query I rowsort
SELECT cor0.col0 + - cor0.col0 AS col1 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

onlyif mysql # use DIV operator for integer division
query I rowsort label-2505
SELECT ALL col1 + tab1.col0 * tab1.col1 DIV col2 AS col2 FROM tab1
----
21
23
27

skipif mysql # not compatible
query I rowsort label-2505
SELECT ALL col1 + tab1.col0 * tab1.col1 / col2 AS col2 FROM tab1
----
21
23
27

query I rowsort
SELECT DISTINCT - col2 + tab2.col0 AS col1 FROM tab2
----
-20
41
52

query I rowsort
SELECT - 3 - col1 FROM tab0
----
-100
-89
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-2508
SELECT + - col2 DIV cor0.col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-2508
SELECT + - col2 / cor0.col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT ALL - col1 * col1 * + col2 + - col2 * col1 FROM tab1 AS cor0
----
-17472
-37908
-6270

onlyif mysql # use DIV operator for integer division
query I rowsort label-2510
SELECT ALL + - cor0.col0 + - col1 DIV - 38 FROM tab2 AS cor0
----
-7
-77
-79

skipif mysql # not compatible
query I rowsort label-2510
SELECT ALL + - cor0.col0 + - col1 / - 38 FROM tab2 AS cor0
----
-7
-77
-79

query I rowsort
SELECT DISTINCT - col2 + + ( - 96 + col0 ) FROM tab2 AS cor0
----
-116
-44
-55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2512
SELECT - - col1 * - CAST( 5 AS SIGNED ) col1 FROM tab2 AS cor0
----
-155
-295
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2512
SELECT - - col1 * - CAST ( 5 AS INTEGER ) col1 FROM tab2 AS cor0
----
-155
-295
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2513
SELECT ALL + cor0.col2 * - CAST( col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

skipif mysql # not compatible
query I rowsort label-2513
SELECT ALL + cor0.col2 * - CAST ( col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-2514
SELECT ALL - col0 DIV ( col2 * col1 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2514
SELECT ALL - col0 / ( col2 * col1 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col2 * - 21 FROM tab1 AS cor0
----
-1134
-1197
-2016

query I rowsort
SELECT + 62 + + col0 AS col1 FROM tab1
----
126
142
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col2 - col0 col0 FROM tab1
----
159
3584
7600

query I rowsort
SELECT DISTINCT + - col2 * cor0.col2 + - col2 AS col0 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT - - col2 + ( + col0 ) AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + - col0 * + 27 FROM tab0 AS cor0
----
-2403
-648
-945

query I rowsort
SELECT ALL - 44 - + 63 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f2eff2e271bc09dea2510ed6bb28e960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 83 col1 FROM tab2 AS cor0
----
-83
-83
-83

query I rowsort
SELECT - col0 * col2 * + 94 AS col0 FROM tab0 AS cor0
----
-3290
-686012
-74448

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab2, tab0, tab2 cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT + col2 * col2 + col2 + col1 * - 77 FROM tab2
----
-1631
-3841
173

query I rowsort
SELECT DISTINCT col1 + - col0 * - col2 AS col0 FROM tab0
----
132
7389
878

query I rowsort
SELECT DISTINCT - 39 + - col0 + + col2 AS col1 FROM tab0
----
-30
-46
-73

query I rowsort
SELECT + 51 * + 79 FROM tab2
----
4029
4029
4029

query I rowsort
SELECT ALL + col2 + 83 * col2 FROM tab0 AS cor0
----
2772
6888
84

query I rowsort
SELECT - ( - cor0.col0 ) * col0 FROM tab0 AS cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) + col0 / cor0.col0 AS col0 FROM tab1 AS cor0
----
11
14
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-2532
SELECT DISTINCT + 37 DIV + col2 - col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-2532
SELECT DISTINCT + 37 / + col2 - col0 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2533
SELECT - + col1 * + col1 * + 93 + col2 DIV - cor0.col0 + + col1 FROM tab1 AS cor0
----
-15705
-62860
-9290

skipif mysql # not compatible
query I rowsort label-2533
SELECT - + col1 * + col1 * + 93 + col2 / - cor0.col0 + + col1 FROM tab1 AS cor0
----
-15705
-62860
-9290

query I rowsort
SELECT ALL - - cor0.col0 * + col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + 88 AS col2 FROM tab0 AS cor0
----
88

query I rowsort
SELECT ALL - + ( - cor0.col2 ) * - col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + col1 - + col0 * - 34 FROM tab2 AS cor0
----
269
2703
2711

query I rowsort
SELECT - col1 + col0 * 45 FROM tab1 AS cor0
----
109
2870
3587

query I rowsort
SELECT - ( col0 ) - + col0 * + col1 * + col0 AS col1 FROM tab0 AS cor0
----
-118860
-49560
-720900

query I rowsort
SELECT + col1 + cor0.col2 + col1 FROM tab2 cor0
----
144
72
89

query I rowsort
SELECT ALL ( + ( col2 ) ) + - col1 * col1 AS col0 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT + 31 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT tab1.col1 + + 26 * col0 + + col2 FROM tab1
----
158
1731
2189

query I rowsort
SELECT cor0.col2 - + col2 * 72 AS col2 FROM tab0 AS cor0
----
-2343
-5822
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-2545
SELECT ALL - 57 DIV col0 - + 93 * - col1 AS col2 FROM tab1
----
1209
2399
930

skipif mysql # not compatible
query I rowsort label-2545
SELECT ALL - 57 / col0 - + 93 * - col1 AS col2 FROM tab1
----
1209
2399
930

query I rowsort
SELECT ALL col1 - + col1 * + 77 FROM tab1
----
-1976
-760
-988

query I rowsort
SELECT cor0.col2 * + 22 FROM tab2, tab1 AS cor0
----
9 values hashing to 753d4f7c514b9e015612181ef0349c00

query I rowsort
SELECT ALL - 22 * - col2 AS col0 FROM tab1 AS cor0
----
1188
1254
2112

query I rowsort
SELECT DISTINCT + - cor0.col2 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL col0 * col1 + - col1 * + col0 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2551
SELECT DISTINCT col2 + CAST( NULL AS SIGNED ) * + col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2551
SELECT DISTINCT col2 + CAST ( NULL AS INTEGER ) * + col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT col0 * + col0 + + col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT + - col1 - 70 FROM tab1 cor0
----
-80
-83
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2554
SELECT DISTINCT + col0 * 35 DIV col0 + col1 * 3 FROM tab0 cor0
----
293
308
326

skipif mysql # not compatible
query I rowsort label-2554
SELECT DISTINCT + col0 * 35 / col0 + col1 * 3 FROM tab0 cor0
----
293
308
326

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2555
SELECT DISTINCT - col2 * + CAST( NULL AS SIGNED ) + - col2 * + col1 AS col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2555
SELECT DISTINCT - col2 * + CAST ( NULL AS INTEGER ) + - col2 * + col1 AS col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT - + cor0.col1 * + 61 + 32 AS col0 FROM tab2 AS cor0
----
-1005
-1859
-3567

query I rowsort
SELECT DISTINCT - col0 * col1 + col2 + - col1 FROM tab0 cor0
----
-2117
-3491
-8108

onlyif mysql # use DIV operator for integer division
query I rowsort label-2558
SELECT - col0 - col2 DIV 37 col1 FROM tab2 cor0
----
-7
-78
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2558
SELECT - col0 - col2 / 37 col1 FROM tab2 cor0
----
-7
-78
-80

query I rowsort
SELECT - col2 + 39 FROM tab0 AS cor0
----
-43
38
6

query I rowsort
SELECT - 54 * + col0 AS col1 FROM tab0 AS cor0
----
-1296
-1890
-4806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * ( - col2 ) col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL + + 98 * + col2 FROM tab0 cor0
----
3234
8036
98

query I rowsort
SELECT ALL - 43 + + cor0.col1 * col1 FROM tab0 cor0
----
7353
8238
9366

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2564
SELECT ALL col1 * - CAST( NULL AS DECIMAL ) col0 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2564
SELECT ALL col1 * - CAST ( NULL AS REAL ) col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + 16 * ( + col1 + - col1 ) AS col1 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - 74 * 78 col0 FROM tab2
----
-5789
-5803
-5831

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col1 col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT col2 * cor0.col0 * col1 FROM tab0 AS cor0
----
3395
664118
68112

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2569
SELECT CAST( col1 AS SIGNED ) * + col0 + ( + col2 ) AS col1 FROM tab1 AS cor0
----
1136
132
697

skipif mysql # not compatible
query I rowsort label-2569
SELECT CAST ( col1 AS INTEGER ) * + col0 + ( + col2 ) AS col1 FROM tab1 AS cor0
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - 72 col2 FROM tab0 AS cor0
----
-6192
-6552
-6984

query I rowsort
SELECT ALL - + col2 * col0 + + cor0.col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL - 66 * cor0.col0 FROM tab2 AS cor0
----
-462
-5148
-5214

query I rowsort
SELECT + + col0 + 7 AS col2 FROM tab0 AS cor0
----
31
42
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 35 col1 FROM tab0 AS cor0
----
35

query I rowsort
SELECT DISTINCT + - ( 39 ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
-1287
-3198
-39

query I rowsort
SELECT + col0 * col2 - col2 FROM tab0 AS cor0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-2577
SELECT DISTINCT - - col2 + col2 DIV + col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2577
SELECT DISTINCT - - col2 + col2 / + col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT col1 * + col2 + + cor0.col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT - 42 AS col2 FROM tab2 cor0
----
-42

query I rowsort
SELECT - col1 + 56 AS col0 FROM tab0 AS cor0
----
-30
-35
-41

query I rowsort
SELECT ALL 39 * 30 AS col0 FROM tab2 AS cor0
----
1170
1170
1170

onlyif mysql # use DIV operator for integer division
query I rowsort label-2582
SELECT - col1 DIV col2 - - col0 FROM tab0 cor0
----
-62
22
88

skipif mysql # not compatible
query I rowsort label-2582
SELECT - col1 / col2 - - col0 FROM tab0 cor0
----
-62
22
88

query I rowsort
SELECT + - cor0.col0 * - col2 + col1 * + col0 AS col1 FROM tab0 AS cor0
----
15397
2856
3430

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col1 ) * + col1 col2 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT ALL 1 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

query I rowsort
SELECT 5 * col1 AS col1 FROM tab0 AS cor0
----
430
455
485

query I rowsort
SELECT + - col0 * col0 * col0 + cor0.col1 * col0 FROM tab1 AS cor0
----
-261504
-510960
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( + col2 ) * 88 col2 FROM tab0 AS cor0
----
-2904
-7216
-88

query I rowsort
SELECT - 70 + - col2 AS col0 FROM tab0 AS cor0
----
-103
-152
-71

query I rowsort
SELECT ALL - 68 * col2 FROM tab0 AS cor0
----
-2244
-5576
-68

query I rowsort
SELECT - + 19 + col0 AS col1 FROM tab2 AS cor0
----
-12
59
60

query I rowsort
SELECT DISTINCT - 67 + col0 + + col1 AS col0 FROM tab1 AS cor0
----
-38
26
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - - cor0.col0 col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL cor0.col2 + - 52 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 2cc689f0f49fd633760c3e7a81e20a1a

query I rowsort
SELECT - col2 + + 43 * col0 AS col2 FROM tab2 AS cor0
----
274
3328
3359

query I rowsort
SELECT DISTINCT + col1 * + 49 FROM tab2 AS cor0
----
1519
2891
833

query I rowsort
SELECT + 3 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 3e22859a313d85a6146c6df5f23d77cf

onlyif mysql # use DIV operator for integer division
query I rowsort label-2598
SELECT ALL - col0 DIV + cor0.col0 + + 9 + - col0 * col0 FROM tab1 AS cor0
----
-1
-4088
-6392

skipif mysql # not compatible
query I rowsort label-2598
SELECT ALL - col0 / + cor0.col0 + + 9 + - col0 * col0 FROM tab1 AS cor0
----
-1
-4088
-6392

query I rowsort
SELECT DISTINCT + - col2 * + col1 + + col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT - cor0.col0 + - ( + col0 ) AS col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL - cor0.col0 + 85 * + col1 + col1 FROM tab1 AS cor0
----
1038
2233
796

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2602
SELECT ALL + col0 + + col1 * + col1 - - col2 * + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2602
SELECT ALL + col0 + + col1 * + col1 - - col2 * + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2603
SELECT ALL + col1 * CAST( - col2 AS SIGNED ) col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2603
SELECT ALL + col1 * CAST ( - col2 AS INTEGER ) col2 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-2604
SELECT DISTINCT - col2 DIV - col2 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-2604
SELECT DISTINCT - col2 / - col2 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT DISTINCT ( + col2 ) + + 64 FROM tab2
----
102
90
91

query I rowsort
SELECT cor0.col2 + 52 FROM tab1 AS cor0
----
106
109
148

query I rowsort
SELECT - + cor0.col1 + tab1.col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 9b7a2a902d3451f8fc30dda59e4968c9

query I rowsort
SELECT DISTINCT 71 * + tab0.col0 + - col2 FROM tab0
----
1671
2484
6237

query I rowsort
SELECT - - cor0.col0 + ( 11 ) FROM tab1 AS cor0
----
14
75
91

query I rowsort
SELECT - - cor0.col2 * ( col1 ) + - col1 * - 72 FROM tab1 AS cor0
----
1290
2184
3276

query I rowsort
SELECT col0 + ( tab1.col1 ) * + tab1.col2 FROM tab1
----
1328
1407
634

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 0705df526be8eeded96d0c20ae938712

query I rowsort
SELECT + col1 + + ( - col2 ) FROM tab2
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + col2 * - col0 col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT - col1 * col2 + cor0.col1 * - 93 * col2 FROM tab1 AS cor0
----
-117312
-131976
-53580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + + col1 * + cor0.col0 col0 FROM tab2 cor0
----
1264
210
4524

query I rowsort
SELECT - - cor0.col0 * + cor0.col1 + - 18 AS col0 FROM tab1 cor0
----
1022
60
622

onlyif mysql # use DIV operator for integer division
query I rowsort label-2618
SELECT ALL + + col2 DIV col0 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2618
SELECT ALL + + col2 / col0 FROM tab0 cor0
----
0
0
1

query I rowsort
SELECT DISTINCT - 10 + + col2 FROM tab1 AS cor0
----
44
47
86

query I rowsort
SELECT tab1.col0 * - tab1.col0 + + col2 - - col1 * col0 AS col2 FROM tab1
----
-3399
-5264
123

query I rowsort
SELECT ( 72 ) * cor1.col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 8921f64ed3038aa4e3d52a74a5f833fb

query I rowsort
SELECT ALL - cor0.col2 + col1 * col1 AS col2 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT ALL 88 * - col2 * - col0 + col1 AS col1 FROM tab0 AS cor0
----
3177
642315
69782

query I rowsort
SELECT ALL + 47 * - tab1.col2 * - col1 FROM tab1
----
26790
58656
65988

onlyif mysql # use DIV operator for integer division
query I rowsort label-2625
SELECT DISTINCT col0 DIV - col2 col2 FROM tab0 AS cor0
----
-1
-35
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2625
SELECT DISTINCT col0 / - col2 col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT - + 67 + - cor0.col0 AS col0 FROM tab0 cor0
----
-102
-156
-91

query I rowsort
SELECT cor0.col1 * col2 + col1 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2, tab1 cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT - 13 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to e95f5f4bd0f480397cced5f5e8a23792

query I rowsort
SELECT ALL col0 + + 20 AS col2 FROM tab0
----
109
44
55

query I rowsort
SELECT 76 + col1 * col1 FROM tab0
----
7472
8357
9485

query I rowsort
SELECT ALL + - 27 FROM tab2 AS cor0
----
-27
-27
-27

query I rowsort
SELECT DISTINCT + col1 * col1 * + col1 AS col2 FROM tab1 cor0
----
1000
17576
2197

query I rowsort
SELECT ALL - - 24 * col0 AS col1 FROM tab2 AS cor0
----
168
1872
1896

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2635
SELECT ( col0 ) + + CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-2635
SELECT ( col0 ) + + CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + + col0 * - col0 AS col2 FROM tab2 AS cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-2637
SELECT ALL - col2 DIV - ( ( + col0 ) ) FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2637
SELECT ALL - col2 / - ( ( + col0 ) ) FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT + + col2 + + col0 * - col0 AS col2 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT + col1 * 72 FROM tab2 cor0
----
1224
2232
4248

onlyif mysql # use DIV operator for integer division
query I rowsort label-2640
SELECT - cor0.col0 DIV col1 AS col0 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-2640
SELECT - cor0.col0 / col1 AS col0 FROM tab2 cor0
----
-1
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2641
SELECT cor0.col2 DIV - 97 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2641
SELECT cor0.col2 / - 97 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT col1 - ( + col0 ) * - col2 FROM tab2
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-2643
SELECT - + col2 DIV - ( - ( + cor0.col2 ) ) AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2643
SELECT - + col2 / - ( - ( + cor0.col2 ) ) AS col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT cor0.col1 + cor0.col2 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 71bdffb602517a95c6721e05f7b4b3dd

query I rowsort
SELECT + cor0.col1 * - col1 * col2 AS col2 FROM tab2 cor0
----
-10982
-25947
-90506

query I rowsort
SELECT - 83 * + 77 + + col2 * col1 AS col1 FROM tab1 cor0
----
-4987
-5143
-5821

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2647
SELECT ALL CAST( col2 AS SIGNED ) + col1 * - 15 FROM tab1 AS cor0
----
-336
-93
-99

skipif mysql # not compatible
query I rowsort label-2647
SELECT ALL CAST ( col2 AS INTEGER ) + col1 * - 15 FROM tab1 AS cor0
----
-336
-93
-99

query I rowsort
SELECT + col1 + + col2 * col0 AS col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + col0 * - col0 * col2 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT ALL + 3 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT DISTINCT + col2 * - col0 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT col1 * 62 + - cor0.col1 * + ( 70 ) FROM tab1 AS cor0
----
-104
-208
-80

query I rowsort
SELECT DISTINCT + + col1 * - 57 + - col1 - col2 * + 6 FROM tab1 cor0
----
-1330
-1832
-922

query I rowsort
SELECT ALL + col2 * 74 FROM tab1 AS cor0
----
3996
4218
7104

query I rowsort
SELECT DISTINCT + + col1 * col0 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT + 33 + - col1 AS col1 FROM tab0 cor0
----
-53
-58
-64

query I rowsort
SELECT DISTINCT + 38 FROM tab2, tab0, tab1 AS cor0, tab2 cor1
----
38

query I rowsort
SELECT + 44 + col1 * - 19 FROM tab2 AS cor0
----
-1077
-279
-545

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 + 17 + + col2 col2 FROM tab1
----
17
17
17

query I rowsort
SELECT - col1 * - cor0.col0 + col1 * col0 AS col0 FROM tab0 AS cor0
----
16198
4128
6790

query I rowsort
SELECT DISTINCT col1 + - cor0.col0 * 51 AS col0 FROM tab2 AS cor0
----
-326
-3919
-4012

query I rowsort
SELECT ALL col1 - + col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL + + col2 * + col2 + + ( col0 ) FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2665
SELECT - col0 * - col0 + - CAST( + cor0.col0 AS SIGNED ) * + col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2665
SELECT - col0 * - col0 + - CAST ( + cor0.col0 AS INTEGER ) * + col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( - 84 + tab2.col2 ) AS col2 FROM tab2
----
46
57
58

query I rowsort
SELECT ( col0 * col0 + + col1 * col0 ) FROM tab2
----
10686
266
7584

query I rowsort
SELECT DISTINCT 17 * col0 AS col0 FROM tab2 AS cor0
----
119
1326
1343

onlyif mysql # use DIV operator for integer division
query I rowsort label-2669
SELECT ALL col0 + col0 DIV + col0 AS col1 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-2669
SELECT ALL col0 + col0 / + col0 AS col1 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT DISTINCT + 5 * - col2 FROM tab0 AS cor0
----
-165
-410
-5

query I rowsort
SELECT 58 * col2 * + 19 AS col0 FROM tab0 AS cor0
----
1102
36366
90364

query I rowsort
SELECT ALL + col2 * col0 * col0 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT tab2.col1 * col0 + + col2 * ( col2 ) FROM tab2
----
2787
5278
946

query I rowsort
SELECT ALL 9 * col0 AS col2 FROM tab2
----
63
702
711

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 88 * + col2 col1 FROM tab0
----
2904
7216
88

query I rowsort
SELECT ALL - 21 * col2 AS col2 FROM tab0
----
-1722
-21
-693

query I rowsort
SELECT DISTINCT ( - col1 ) + 58 * + 90 + cor0.col1 FROM tab2 AS cor0
----
5220

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2678
SELECT col2 * + col1 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2678
SELECT col2 * + col1 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2679
SELECT + 40 * + col2 DIV - CAST( col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-40
-40
-40

skipif mysql # not compatible
query I rowsort label-2679
SELECT + 40 * + col2 / - CAST ( col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-40
-40
-40

query I rowsort
SELECT DISTINCT - col1 + - cor0.col1 * + ( col1 ) FROM tab0 cor0
----
-7482
-8372
-9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-2681
SELECT ALL col1 DIV - col2 + - tab1.col1 * col2 * 52 AS col1 FROM tab1
----
-29640
-64896
-73008

skipif mysql # not compatible
query I rowsort label-2681
SELECT ALL col1 / - col2 + - tab1.col1 * col2 * 52 AS col1 FROM tab1
----
-29640
-64896
-73008

query I rowsort
SELECT + + col0 * - 69 FROM tab1 AS cor0
----
-207
-4416
-5520

query I rowsort
SELECT col2 + + col1 * + 83 + - col1 AS col0 FROM tab1 AS cor0
----
1162
2186
877

query I rowsort
SELECT - col0 * - 30 AS col2 FROM tab2 AS cor0
----
210
2340
2370

query I rowsort
SELECT - 71 * cor0.col1 + + col1 * - 78 FROM tab1 AS cor0
----
-1490
-1937
-3874

query I rowsort
SELECT ALL + col2 + 60 AS col2 FROM tab2 AS cor0
----
86
87
98

query I rowsort
SELECT + 27 FROM tab1, tab0 AS cor0, tab0 cor1, tab1 AS cor2
----
81 values hashing to 092918b9163061e291041d594b1a402a

query I rowsort
SELECT ALL - col1 + + col0 * - col2 AS col1 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT ( col2 ) * col1 + ( ( + col1 ) ) * col1 AS col0 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT ALL - 8 + 5 FROM tab0 cor0
----
-3
-3
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-2691
SELECT DISTINCT - + col1 * - 35 + + col2 DIV col1 FROM tab1 AS cor0
----
355
462
912

skipif mysql # not compatible
query I rowsort label-2691
SELECT DISTINCT - + col1 * - 35 + + col2 / col1 FROM tab1 AS cor0
----
355
462
912

query I rowsort
SELECT + 39 + 32 FROM tab1 AS cor0
----
71
71
71

query I rowsort
SELECT DISTINCT + + 80 - + cor0.col1 FROM tab0 AS cor0
----
-11
-17
-6

query I rowsort
SELECT ALL ( col0 ) * + col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - 0 * + col0 + cor0.col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL - - 13 * + col0 * col2 FROM tab0 AS cor0
----
10296
455
94874

query I rowsort
SELECT ALL + col2 * 70 AS col0 FROM tab1 AS cor0
----
3780
3990
6720

query I rowsort
SELECT DISTINCT 95 AS col0 FROM tab1 AS cor0
----
95

query I rowsort
SELECT DISTINCT cor0.col0 + - col1 + - col0 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - 96 + col1 FROM tab0 AS cor0
----
-10
-5
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2701
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + ( + col0 + col0 ) / - cor0.col0 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2701
SELECT DISTINCT + CAST ( NULL AS REAL ) + ( + col0 + col0 ) / - cor0.col0 AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2702
SELECT + CAST( NULL AS SIGNED ) * 6 * - col1 + + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2702
SELECT + CAST ( NULL AS INTEGER ) * 6 * - col1 + + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 66 + + col0 * col2 AS col1 FROM tab2 cor0
----
123
1962
2936

query I rowsort
SELECT DISTINCT - ( + ( + col2 ) ) * col0 - col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT + col2 + 37 AS col1 FROM tab2 AS cor0
----
63
64
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 77 * ( - col2 * - col2 ) col0 FROM tab1 AS cor0
----
-224532
-250173
-709632

query I rowsort
SELECT DISTINCT cor0.col0 + - 18 AS col1 FROM tab1 AS cor0
----
-15
46
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2708
SELECT ALL + col1 * col0 + - col2 - CAST( - col1 AS SIGNED ) FROM tab2 cor0
----
1322
221
4635

skipif mysql # not compatible
query I rowsort label-2708
SELECT ALL + col1 * col0 + - col2 - CAST ( - col1 AS INTEGER ) FROM tab2 cor0
----
1322
221
4635

query I rowsort
SELECT DISTINCT + + 90 + col2 AS col0 FROM tab0 AS cor0
----
123
172
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-2710
SELECT cor0.col2 DIV + 92 AS col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2710
SELECT cor0.col2 / + 92 AS col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT + cor0.col0 * - col2 + - col1 FROM tab1 AS cor0
----
-188
-3658
-7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-2712
SELECT + + 23 DIV - col0 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-2712
SELECT + + 23 / - col0 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT ALL - - ( + col2 ) + col2 AS col0 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT DISTINCT + 74 * - col1 FROM tab1 AS cor0
----
-1924
-740
-962

query I rowsort
SELECT ALL + 76 + cor0.col2 FROM tab2 AS cor0
----
102
103
114

query I rowsort
SELECT DISTINCT + + 70 + - col0 FROM tab1 AS cor0
----
-10
6
67

query I rowsort
SELECT - 74 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to 5a477330c946251f814fbbfd08e77c28

query I rowsort
SELECT ALL + col1 + 41 * col2 FROM tab1 AS cor0
----
2240
2347
3949

query I rowsort
SELECT ALL - - col1 - - ( col1 ) * + col1 AS col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT col2 + 99 AS col1 FROM tab0 AS cor0
----
100
132
181

query I rowsort
SELECT - col0 + 67 * - col2 FROM tab0 AS cor0
----
-102
-2235
-5583

query I rowsort
SELECT - col1 * - 67 * 11 AS col0 FROM tab0 AS cor0
----
63382
67067
71489

query I rowsort
SELECT DISTINCT 71 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
71

query I rowsort
SELECT 18 + - col2 AS col1 FROM tab1 cor0
----
-36
-39
-78

query I rowsort
SELECT + col1 + col2 * 42 * - col2 FROM tab1
----
-122446
-136448
-387059

query I rowsort
SELECT col0 + ( + col0 ) + + col0 FROM tab2
----
21
234
237

query I rowsort
SELECT ALL + - col1 + 81 + 42 FROM tab1 AS cor0
----
110
113
97

query I rowsort
SELECT col1 + - col1 * + col1 * + col0 + col1 AS col0 FROM tab1
----
-13494
-1976
-6380

query I rowsort
SELECT + col1 * 16 FROM tab2
----
272
496
944

query I rowsort
SELECT - - 63 AS col0 FROM tab1 cor0
----
63
63
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-2731
SELECT cor0.col0 DIV col1 - + col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-2731
SELECT cor0.col0 / col1 - + col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2732
SELECT col0 + cor0.col2 DIV col0 AS col2 FROM tab0 AS cor0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-2732
SELECT col0 + cor0.col2 / col0 AS col2 FROM tab0 AS cor0
----
25
35
89

query I rowsort
SELECT ALL ( - col0 + - col2 ) FROM tab0
----
-171
-36
-57

query I rowsort
SELECT + ( + col2 ) * cor0.col1 + - col1 AS col0 FROM tab1 AS cor0
----
1235
1378
560

onlyif mysql # use DIV operator for integer division
query I rowsort label-2735
SELECT - + col1 + + col2 DIV col1 FROM tab1 AS cor0
----
-24
-5
-6

skipif mysql # not compatible
query I rowsort label-2735
SELECT - + col1 + + col2 / col1 FROM tab1 AS cor0
----
-24
-5
-6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2736
SELECT + CAST( 46 AS SIGNED ) FROM tab1 AS cor0
----
46
46
46

skipif mysql # not compatible
query I rowsort label-2736
SELECT + CAST ( 46 AS INTEGER ) FROM tab1 AS cor0
----
46
46
46

query I rowsort
SELECT ALL - 99 * ( - col0 ) AS col1 FROM tab1 AS cor0
----
297
6336
7920

query I rowsort
SELECT ALL col0 * + 47 + col2 + cor0.col1 AS col1 FROM tab2 AS cor0
----
3751
3768
387

query I rowsort
SELECT col1 * + col0 + col0 * col1 AS col1 FROM tab2 WHERE NOT - col0 > NULL
----

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE + col1 BETWEEN NULL AND ( - col1 * - col0 * col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2741
SELECT DISTINCT + cor0.col2 DIV col0 + - col2 - - col2 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-2741
SELECT DISTINCT + cor0.col2 / col0 + - col2 - - col2 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT cor0.col1 * col0 * - col1 AS col2 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL col1 * + col1 + - col1 FROM tab1
----
156
650
90

query III rowsort
SELECT ALL * FROM tab0 WHERE ( + col2 ) >= ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2745
SELECT tab1.col2 DIV col2 AS col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2745
SELECT tab1.col2 / col2 AS col0 FROM tab1
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2746
SELECT ALL + col0 DIV + col1 + + col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2746
SELECT ALL + col0 / + col1 + + col1 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT + col0 * col1 - + tab1.col0 FROM tab1
----
576
75
960

query I rowsort
SELECT ALL + col2 + + tab2.col0 + + col0 AS col0 FROM tab2 WHERE NOT col2 IN ( - col0 )
----
182
196
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-2749
SELECT DISTINCT + col0 * + col1 - + col0 DIV + col1 AS col0 FROM tab1
----
1034
634
78

skipif mysql # not compatible
query I rowsort label-2749
SELECT DISTINCT + col0 * + col1 - + col0 / + col1 AS col0 FROM tab1
----
1034
634
78

query I rowsort
SELECT DISTINCT col1 + cor0.col1 * col0 FROM tab2 AS cor0 WHERE NULL <> NULL
----

query I rowsort
SELECT ALL + col2 * + col0 AS col0 FROM tab2 AS cor0 WHERE NULL NOT IN ( col0 )
----

query I rowsort
SELECT ALL col0 * - col2 * col2 AS col0 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT - col2 * + col2 * tab0.col1 AS col2 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT cor0.col0 * - col1 * + col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL - col1 + - col1 * col2 - - col2 FROM tab2
----
-1567
-625
-841

query I rowsort
SELECT + col1 * tab0.col0 + col2 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT ALL col0 * tab0.col1 * + col1 - - col2 AS col0 FROM tab0
----
177537
329316
737091

query I rowsort
SELECT DISTINCT col1 - col2 * + tab1.col0 * - col2 FROM tab1
----
207946
737293
8774

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 - + tab1.col2 col1 FROM tab1
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2760
SELECT - col1 DIV col2 + cor0.col0 * + col2 + cor0.col1 FROM tab0 AS cor0
----
35
7388
876

skipif mysql # not compatible
query I rowsort label-2760
SELECT - col1 / col2 + cor0.col0 * + col2 + cor0.col1 FROM tab0 AS cor0
----
35
7388
876

query I rowsort
SELECT - - col0 * - col0 * - col1 AS col0 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT col2 + col2 * - col2 + col0 AS col0 FROM tab0 AS cor0
----
-1032
-6553
35

query I rowsort
SELECT DISTINCT col2 * col1 * col1 + cor0.col2 * + col2 AS col2 FROM tab0 AS cor0
----
245157
685766
9410

query I rowsort
SELECT + + col0 + + col2 * col2 AS col1 FROM tab2 cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT - col0 * - col1 AS col2 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + tab1.col1 * + tab1.col0 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL - col2 * + cor0.col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + col1 * col2 * - col2 AS col1 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT ALL - - col0 + cor0.col2 AS col2 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2770
SELECT ALL col0 / + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2770
SELECT ALL col0 / + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * col1 + col1 * col1 AS col1 FROM tab0 AS cor0
----
14792
16562
18818

onlyif mysql # use DIV operator for integer division
query I rowsort label-2772
SELECT ALL - col2 - col0 DIV col0 AS col1 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-2772
SELECT ALL - col2 - col0 / col0 AS col1 FROM tab0 AS cor0
----
-2
-34
-83

query I rowsort
SELECT DISTINCT + col1 + + col2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
124
134
205

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2774
SELECT + col2 * + ( cor0.col2 ) + + col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2774
SELECT + col2 * + ( cor0.col2 ) + + col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col0 + - 2 FROM tab2 AS cor0
----
5
76
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2776
SELECT + col2 * CAST( NULL AS SIGNED ) + 55 * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2776
SELECT + col2 * CAST ( NULL AS INTEGER ) + 55 * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + ( - 8 ) FROM tab2 AS cor0
----
18
19
30

query I rowsort
SELECT DISTINCT col2 * - ( + cor0.col0 ) - col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - cor0.col0 + - ( - col2 ) AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT tab1.col0 + + ( col2 ) AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT + col0 + 15 FROM tab1
----
18
79
95

query I rowsort
SELECT - col2 * 12 * - 12 + - col2 AS col1 FROM tab1
----
13728
7722
8151

query I rowsort
SELECT DISTINCT + - col1 * ( cor0.col1 ) AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT + - col2 * col0 * + col2 AS col1 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT 88 AS col2 FROM tab1, tab0 AS cor0
----
88

query I rowsort
SELECT col1 + col1 * 99 AS col1 FROM tab0
----
8600
9100
9700

query I rowsort
SELECT col1 + + col1 * ( - 73 ) FROM tab1 cor0
----
-1872
-720
-936

query I rowsort
SELECT ALL col1 + - col2 - cor0.col2 FROM tab0 AS cor0
----
-73
20
95

query I rowsort
SELECT - 90 * col0 - col1 * + col0 FROM tab2 AS cor0
----
-11622
-8453
-847

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col2 col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + + col0 + - col0 * cor0.col1 * + ( col1 + - col0 * ( col0 ) ) FROM tab1 AS cor0
----
-1323
2615104
6642560

onlyif mysql # use DIV operator for integer division
query I rowsort label-2792
SELECT ALL + + col2 + col0 DIV 90 + + 61 col1 FROM tab1 AS cor0
----
115
118
157

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2792
SELECT ALL + + col2 + col0 / 90 + + 61 col1 FROM tab1 AS cor0
----
115
118
157

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 54 * + col1 - col1 col0 FROM tab0 AS cor0
----
4558
4823
5141

query I rowsort
SELECT DISTINCT col0 + col2 AS col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT col1 + - col0 + - 80 FROM tab2 AS cor0
----
-142
-56
-99

query I rowsort
SELECT ALL col1 * col2 + col2 * - ( - col2 ) AS col0 FROM tab1 AS cor0
----
10464
3819
4320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * col0 col1 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT ALL tab1.col1 - - 13 AS col0 FROM tab1
----
23
26
39

query I rowsort
SELECT ALL + ( ( - col2 ) ) * + col0 - col1 FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT + tab2.col2 AS col1 FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL - ( + col2 ) * - col1 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT - 32 + col1 AS col2 FROM tab2
----
-1
-15
27

query I rowsort
SELECT ALL + 72 FROM tab1, tab1 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2804
SELECT ALL CAST( NULL AS SIGNED ) * col1 - - tab2.col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2804
SELECT ALL CAST ( NULL AS INTEGER ) * col1 - - tab2.col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + - col1 * tab1.col0 - - 67 FROM tab1
----
-509
-8
-893

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2806
SELECT DISTINCT - tab2.col1 / CAST( NULL AS DECIMAL ) AS col0 FROM tab2, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2806
SELECT DISTINCT - tab2.col1 / CAST ( NULL AS REAL ) AS col0 FROM tab2, tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2807
SELECT DISTINCT + col1 * col0 * + CAST( col1 AS SIGNED ) + - cor0.col0 DIV - col1 AS col1 FROM tab0 cor0
----
177504
329315
737009

skipif mysql # not compatible
query I rowsort label-2807
SELECT DISTINCT + col1 * col0 * + CAST ( col1 AS INTEGER ) + - cor0.col0 / - col1 AS col1 FROM tab0 cor0
----
177504
329315
737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * col0 + - 1 col2 FROM tab1 cor0
----
1039
639
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 13 col1 FROM tab2 AS cor0
----
13
13
13

query I rowsort
SELECT DISTINCT - 90 + col0 FROM tab1 AS cor0
----
-10
-26
-87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2811
SELECT DISTINCT CAST( 39 AS SIGNED ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
39

skipif mysql # not compatible
query I rowsort label-2811
SELECT DISTINCT CAST ( 39 AS INTEGER ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
39

query I rowsort
SELECT DISTINCT + col1 + col0 * - 31 FROM tab2
----
-186
-2359
-2432

query I rowsort
SELECT ALL + 38 + col0 * 43 + + col1 AS col0 FROM tab0
----
1156
1640
3956

query I rowsort
SELECT ALL - ( 96 ) AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to a7b3e5dd01c8929180b7ffda67f79798

query I rowsort
SELECT ALL - col1 + col1 + + 99 FROM tab0
----
99
99
99

query I rowsort
SELECT col2 + col2 + - col0 * - 94 * col0 AS col0 FROM tab1
----
385138
601792
954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - ( col2 ) * col1 col2 FROM tab2 cor0
----
-1560
-684
-864

query I rowsort
SELECT ALL tab1.col0 * + col0 + col0 FROM tab1
----
12
4160
6480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL + + 67 AS col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to eea8a0738728ea55e4e7ba1506c9905a

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2, tab1, tab1 AS cor0, tab0
----
3
64
80

query I rowsort
SELECT DISTINCT 21 + col1 * col0 AS col2 FROM tab2
----
1364
238
4623

onlyif mysql # use DIV operator for integer division
query I rowsort label-2823
SELECT tab1.col2 DIV tab1.col0 + - ( + 86 ) DIV col0 + tab1.col0 AS col2 FROM tab1
----
-7
63
80

skipif mysql # not compatible
query I rowsort label-2823
SELECT tab1.col2 / tab1.col0 + - ( + 86 ) / col0 + tab1.col0 AS col2 FROM tab1
----
-7
63
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2824
SELECT + col2 * + col1 DIV + col1 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2824
SELECT + col2 * + col1 / + col1 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2825
SELECT DISTINCT col1 + col1 DIV + col1 + - col2 AS col1 FROM tab0
----
10
54
97

skipif mysql # not compatible
query I rowsort label-2825
SELECT DISTINCT col1 + col1 / + col1 + - col2 AS col1 FROM tab0
----
10
54
97

query I rowsort
SELECT + - col2 * - 47 FROM tab1 cor0
----
2538
2679
4512

query I rowsort
SELECT - col1 * 19 + col1 FROM tab1 AS cor0
----
-180
-234
-468

query I rowsort
SELECT - col2 * 17 * col2 + + col1 AS col2 FROM tab2 cor0
----
-11433
-12362
-24531

query I rowsort
SELECT col2 * ( - cor0.col0 * col0 ) - col2 FROM tab2 AS cor0
----
-1350
-158210
-237196

onlyif mysql # use DIV operator for integer division
query I rowsort label-2830
SELECT ALL col1 * 34 DIV - col1 FROM tab1 AS cor0
----
-34
-34
-34

skipif mysql # not compatible
query I rowsort label-2830
SELECT ALL col1 * 34 / - col1 FROM tab1 AS cor0
----
-34
-34
-34

query I rowsort
SELECT col1 * + 95 FROM tab0 AS cor0
----
8170
8645
9215

query I rowsort
SELECT ALL + col1 + - 79 AS col0 FROM tab2 cor0
----
-20
-48
-62

query I rowsort
SELECT + + col0 * col2 + col2 AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT - - cor0.col0 + ( cor0.col2 ) FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + col0 * ( + ( col2 ) ) + col0 * col0 AS col2 FROM tab0 AS cor0
----
1260
1368
15219

query I rowsort
SELECT - col1 - - ( - col1 * col2 ) FROM tab0 AS cor0
----
-194
-2924
-7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 76 col2 FROM tab1, tab0 AS cor0
----
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-2838
SELECT DISTINCT 28 + + col2 DIV + col1 AS col2 FROM tab2 AS cor0
----
28
30

skipif mysql # not compatible
query I rowsort label-2838
SELECT DISTINCT 28 + + col2 / + col1 AS col2 FROM tab2 AS cor0
----
28
30

query I rowsort
SELECT ALL + 60 * - col0 * col2 FROM tab2 AS cor0
----
-11340
-121680
-180120

onlyif mysql # use DIV operator for integer division
query I rowsort label-2840
SELECT DISTINCT + col0 DIV 84 + - col1 + 17 FROM tab0 AS cor0
----
-69
-73
-80

skipif mysql # not compatible
query I rowsort label-2840
SELECT DISTINCT + col0 / 84 + - col1 + 17 FROM tab0 AS cor0
----
-69
-73
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2841
SELECT - CAST( NULL AS SIGNED ) * cor0.col2 + col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2841
SELECT - CAST ( NULL AS INTEGER ) * cor0.col2 + col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2842
SELECT DISTINCT + 32 DIV - 58 AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2842
SELECT DISTINCT + 32 / - 58 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT + - col0 + - col0 * - 81 FROM tab2 AS cor0
----
560
6240
6320

query I rowsort
SELECT ALL - 78 * + col0 * - col1 FROM tab0 AS cor0
----
160992
264810
631722

query I rowsort
SELECT DISTINCT 88 * - tab1.col2 * + col1 AS col1 FROM tab1
----
-109824
-123552
-50160

query I rowsort
SELECT ALL cor0.col1 + + 23 FROM tab0, tab2 cor0
----
9 values hashing to baa3de508afc19b77ea3f119b0a49202

query I rowsort
SELECT ALL ( tab0.col2 ) - 34 * 9 FROM tab0, tab0 AS cor0
----
9 values hashing to eb66b1034b7959578bc4a11c36e78ff6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2848
SELECT + CAST( NULL AS SIGNED ) * - col1 + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2848
SELECT + CAST ( NULL AS INTEGER ) * - col1 + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * 22 col1 FROM tab1 AS cor0
----
-1188
-1254
-2112

query I rowsort
SELECT + col2 * 1 + + col0 FROM tab0 cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2851
SELECT - - CAST( 58 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
58
58
58

skipif mysql # not compatible
query I rowsort label-2851
SELECT - - CAST ( 58 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
58
58
58

query I rowsort
SELECT + - col1 * - col0 * - col0 AS col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT - + col2 + - col0 * col1 AS col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT - 1 * col0 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT ALL 39 FROM tab0, tab2 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab2 AS cor1, tab1, tab1 cor2
----
3645 values hashing to 6156c969b7e054b8a333fdb86aee82f2

query I rowsort
SELECT + cor0.col0 + + col1 * - col1 AS col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT + col2 * + 37 AS col1 FROM tab1
----
1998
2109
3552

query I rowsort
SELECT cor0.col2 + col1 * col1 * + col2 AS col0 FROM tab1 AS cor0
----
16320
36558
5757

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2860
SELECT + col0 + + CAST( NULL AS SIGNED ) * - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2860
SELECT + col0 + + CAST ( NULL AS INTEGER ) * - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2861
SELECT - 9 DIV - col1 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2861
SELECT - 9 / - col1 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2862
SELECT + + col1 + 81 DIV col1 AS col1 FROM tab2 AS cor0
----
21
33
60

skipif mysql # not compatible
query I rowsort label-2862
SELECT + + col1 + 81 / col1 AS col1 FROM tab2 AS cor0
----
21
33
60

query I rowsort
SELECT ALL col1 * col0 * 91 FROM tab2
----
122213
19747
418782

query I rowsort
SELECT col0 + 50 FROM tab2
----
128
129
57

query I rowsort
SELECT col2 + - col2 + - col1 AS col2 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT ALL + - cor0.col2 * col0 + cor0.col1 AS col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + - 11 FROM tab1 cor0
----
-11
-11
-11

query I rowsort
SELECT DISTINCT - tab2.col2 * 93 AS col1 FROM tab2
----
-2418
-2511
-3534

query I rowsort
SELECT + col0 * + 18 AS col0 FROM tab2
----
126
1404
1422

onlyif mysql # use DIV operator for integer division
query I rowsort label-2870
SELECT 68 + + col0 DIV col0 AS col1 FROM tab0 AS cor0
----
69
69
69

skipif mysql # not compatible
query I rowsort label-2870
SELECT 68 + + col0 / col0 AS col1 FROM tab0 AS cor0
----
69
69
69

query I rowsort
SELECT cor0.col0 * ( col2 ) + col2 * + col2 AS col1 FROM tab0 AS cor0
----
14022
1881
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 41 + + 85 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 19b1f1fcc466c23e5267b585248665fc

query I rowsort
SELECT ALL + ( tab1.col1 ) FROM tab1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 * + col0 col2 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 74 col2 FROM tab1 AS cor0
----
-74
-74
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col2 + + col2 col1 FROM tab0
----
1122
2
6806

query I rowsort
SELECT tab2.col0 - + col1 * - tab2.col1 FROM tab2
----
3559
368
968

query I rowsort
SELECT + + col1 * - 38 * + col1 AS col1 FROM tab0 AS cor0
----
-281048
-314678
-357542

query I rowsort
SELECT - - col0 + - 1 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT - tab1.col2 + 66 AS col0 FROM tab1, tab2 cor0
----
9 values hashing to 17793c9cf2b14be4b690b5d32f61b411

onlyif mysql # use DIV operator for integer division
query I rowsort label-2881
SELECT DISTINCT col1 DIV + col0 col2 FROM tab2
----
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2881
SELECT DISTINCT col1 / + col0 col2 FROM tab2
----
0
4

query I rowsort
SELECT DISTINCT col0 * col0 - + 79 * col1 FROM tab1
----
-2045
3306
5373

query I rowsort
SELECT ALL col2 - 67 AS col0 FROM tab0
----
-34
-66
15

query I rowsort
SELECT + col0 * - 79 * + 58 + + col0 * + col2 - - col0 FROM tab2 AS cor0
----
-31878
-355290
-358897

query I rowsort
SELECT + col2 + col2 + + col1 FROM tab0
----
152
255
99

query I rowsort
SELECT cor0.col0 * 45 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
1478
3914
994

query I rowsort
SELECT - - col1 + - col1 - 66 FROM tab0 AS cor0
----
-66
-66
-66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2888
SELECT + col0 + + ( col2 ) * col2 + CAST( + 27 AS SIGNED ) FROM tab1 AS cor0
----
2946
3340
9323

skipif mysql # not compatible
query I rowsort label-2888
SELECT + col0 + + ( col2 ) * col2 + CAST ( + 27 AS INTEGER ) FROM tab1 AS cor0
----
2946
3340
9323

query I rowsort
SELECT - - col1 + - col0 AS col2 FROM tab0 AS cor0
----
2
62
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2890
SELECT DISTINCT - 91 + - tab0.col2 * CAST( NULL AS SIGNED ) / - col1 col0 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2890
SELECT DISTINCT - 91 + - tab0.col2 * CAST ( NULL AS INTEGER ) / - col1 col0 FROM tab0
----
NULL

query I rowsort
SELECT ALL 82 + + col2 + col1 AS col1 FROM tab0
----
180
201
255

query I rowsort
SELECT DISTINCT col1 + col2 * 62 * col1 + col0 * col1 AS col1 FROM tab1
----
35990
78429
87152

query I rowsort
SELECT + 91 + + col2 * col1 + + col0 FROM tab1
----
1419
1498
725

query I rowsort
SELECT - col2 * - col2 + + col0 AS col1 FROM tab0
----
1113
36
6813

query I rowsort
SELECT ALL col0 + col1 * - 31 FROM tab2 cor0
----
-1751
-448
-954

onlyif mysql # use DIV operator for integer division
query I rowsort label-2896
SELECT 41 * + cor0.col0 + - ( - cor0.col1 ) + + col2 * col2 DIV 13 AS col1 FROM tab1 AS cor0
----
2883
373
4001

skipif mysql # not compatible
query I rowsort label-2896
SELECT 41 * + cor0.col0 + - ( - cor0.col1 ) + + col2 * col2 / 13 AS col1 FROM tab1 AS cor0
----
2883
373
4001

query I rowsort
SELECT DISTINCT - - 72 * col1 FROM tab2 AS cor0
----
1224
2232
4248

query I rowsort
SELECT col0 * 0 + + col1 + - col2 AS col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT cor0.col1 * + ( + col1 + - col2 ) AS col1 FROM tab2 AS cor0
----
-357
124
1947

query I rowsort
SELECT col2 + col0 + + col1 FROM tab2 AS cor0
----
134
163
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2901
SELECT DISTINCT + col1 * CAST( col0 AS SIGNED ) FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-2901
SELECT DISTINCT + col1 * CAST ( col0 AS INTEGER ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + col0 * - col1 + col1 + col1 FROM tab2 AS cor0
----
-1309
-155
-4484

query I rowsort
SELECT + + col1 + 76 * col2 + - col1 * + col2 FROM tab0 AS cor0
----
-1139
-244
76

query I rowsort
SELECT - + cor0.col2 * - 78 + - col1 AS col0 FROM tab2 AS cor0
----
1969
2075
2947

query I rowsort
SELECT ALL col2 + col2 * + col2 AS col1 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2906
SELECT DISTINCT - + cor0.col1 + CAST( NULL AS SIGNED ) / - col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2906
SELECT DISTINCT - + cor0.col1 + CAST ( NULL AS INTEGER ) / - col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + col1 + - 16 AS col0 FROM tab0 AS cor0
----
70
75
81

query I rowsort
SELECT + + col2 + col2 + 35 AS col0 FROM tab2 AS cor0
----
111
87
89

query I rowsort
SELECT ALL + - cor0.col1 * + 29 FROM tab0 AS cor0
----
-2494
-2639
-2813

query I rowsort
SELECT DISTINCT col2 * col1 + - tab1.col2 * col1 FROM tab1
----
0

query III rowsort
SELECT * FROM tab1 WHERE + col1 NOT IN ( + col0 * col1 * - col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT ALL + col2 * col2 + tab0.col0 FROM tab0
----
1113
36
6813

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE col0 IN ( + tab2.col0 + tab2.col0 )
----

query I rowsort
SELECT ALL + col0 * - col0 FROM tab2 WHERE NULL NOT IN ( + tab2.col0 * col2 - + tab2.col1 )
----

query I rowsort
SELECT DISTINCT + col2 + - col2 * col1 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT + col1 * col0 * col0 FROM tab1 WHERE ( + col0 ) NOT IN ( tab1.col1 * col0 )
----
234
40960
83200

query I rowsort
SELECT DISTINCT + col2 * + col2 + - col1 FROM tab0
----
-96
1003
6633

onlyif mysql # use DIV operator for integer division
query I rowsort label-2918
SELECT DISTINCT + col0 DIV - col2 AS col1 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-2918
SELECT DISTINCT + col0 / - col2 AS col1 FROM tab1
----
-1
0

query I rowsort
SELECT - col2 * col1 * col0 AS col1 FROM tab1
----
-36480
-4212
-99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-2920
SELECT ALL col2 DIV - col1 col1 FROM tab2
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2920
SELECT ALL col2 / - col1 col1 FROM tab2
----
-2
0
0

query I rowsort
SELECT DISTINCT - col0 + col0 * 9 AS col1 FROM tab2 AS cor0
----
56
624
632

query I rowsort
SELECT ALL col1 * - col2 + - 60 + cor0.col1 AS col1 FROM tab2 AS cor0
----
-1535
-689
-866

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 col0 FROM tab2 WHERE NULL NOT IN ( col0 )
----

query I rowsort
SELECT DISTINCT + col1 + col1 * - col1 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT ALL col1 - col2 * col0 AS col1 FROM tab0 WHERE NULL NOT IN ( + col1 )
----

query I rowsort
SELECT col0 * + col1 + + col1 - col2 FROM tab1
----
50
593
957

query I rowsort
SELECT DISTINCT col0 * col1 + + col2 AS col1 FROM tab1
----
1136
132
697

query I rowsort
SELECT ALL + cor0.col1 + + col2 + 77 AS col1 FROM tab1 AS cor0
----
144
157
186

query I rowsort
SELECT ALL cor0.col1 * - col0 * + 78 + + ( cor0.col0 ) FROM tab2 AS cor0
----
-104675
-16919
-358878

query I rowsort
SELECT + col0 * col0 + col0 FROM tab0 AS cor0
----
1260
600
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 57 col1 FROM tab2 AS cor0
----
57
57
57

query I rowsort
SELECT + 22 FROM tab1, tab2, tab1 cor0, tab0
----
81 values hashing to c6f049334398e3533dd6996714479a2f

onlyif mysql # use DIV operator for integer division
query I rowsort label-2933
SELECT ALL ( tab1.col0 ) DIV col1 + + 77 col2 FROM tab1
----
77
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2933
SELECT ALL ( tab1.col0 ) / col1 + + 77 col2 FROM tab1
----
77
83
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2934
SELECT ALL - 39 + col2 DIV - ( + 34 ) AS col0 FROM tab0
----
-39
-39
-41

skipif mysql # not compatible
query I rowsort label-2934
SELECT ALL - 39 + col2 / - ( + 34 ) AS col0 FROM tab0
----
-39
-39
-41

query I rowsort
SELECT ALL + + 17 * col1 FROM tab1 AS cor0
----
170
221
442

query I rowsort
SELECT ALL + + 48 * col0 FROM tab0 AS cor0
----
1152
1680
4272

query I rowsort
SELECT DISTINCT - + cor0.col2 * col0 + - 36 FROM tab1 AS cor0
----
-198
-3684
-7716

onlyif mysql # use DIV operator for integer division
query I rowsort label-2938
SELECT DISTINCT ( col2 ) DIV - col0 + + 95 + - col1 AS col1 FROM tab0 cor0
----
-2
4
8

skipif mysql # not compatible
query I rowsort label-2938
SELECT DISTINCT ( col2 ) / - col0 + + 95 + - col1 AS col1 FROM tab0 cor0
----
-2
4
8

query I rowsort
SELECT DISTINCT + 46 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
46

query I rowsort
SELECT + col1 + + 3 * ( col2 ) * ( + col0 + + col0 * + col2 ) FROM tab0 AS cor0
----
1817293
307
80870

query I rowsort
SELECT DISTINCT 19 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab1 AS cor2
----
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + 19 col2 FROM tab0
----
105
110
116

query I rowsort
SELECT + col0 + col0 * col2 * - col2 AS col0 FROM tab2
----
-113997
-5096
-52650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2944
SELECT DISTINCT CAST( ( col1 ) AS SIGNED ) + ( + col0 ) * col2 AS col1 FROM tab1 AS cor0
----
188
3658
7693

skipif mysql # not compatible
query I rowsort label-2944
SELECT DISTINCT CAST ( ( col1 ) AS INTEGER ) + ( + col0 ) * col2 AS col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + 8 * - 17 + - col0 AS col2 FROM tab0 AS cor0
----
-160
-171
-225

query I rowsort
SELECT + 42 FROM tab1 cor0
----
42
42
42

query I rowsort
SELECT DISTINCT + 46 * cor0.col2 AS col1 FROM tab1, tab0 AS cor0
----
1518
3772
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - col0 col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - ( - col0 ) * - col0 AS col1 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT ALL - + col1 + - 40 AS col0 FROM tab0 AS cor0
----
-126
-131
-137

query I rowsort
SELECT DISTINCT - cor1.col2 AS col2 FROM tab1, tab1 cor0, tab2 AS cor1
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-2952
SELECT + col2 * + 98 + col2 DIV ( + col1 ) + + col2 DIV - ( 77 ) FROM tab1 AS cor0
----
5294
5591
9414

skipif mysql # not compatible
query I rowsort label-2952
SELECT + col2 * + 98 + col2 / ( + col1 ) + + col2 / - ( 77 ) FROM tab1 AS cor0
----
5294
5591
9414

query I rowsort
SELECT ALL + col2 * + col1 + - col0 AS col0 FROM tab1 AS cor0
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-2954
SELECT ALL + col1 * col2 DIV 59 + col0 * col1 * + col0 col2 FROM tab1 AS cor0
----
257
40969
83221

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2954
SELECT ALL + col1 * col2 / 59 + col0 * col1 * + col0 col2 FROM tab1 AS cor0
----
257
40969
83221

query I rowsort
SELECT - col2 * 74 FROM tab2 AS cor0
----
-1924
-1998
-2812

query I rowsort
SELECT DISTINCT - + col0 * - 94 * + col2 AS col0 FROM tab1 AS cor0
----
15228
342912
721920

query I rowsort
SELECT DISTINCT col1 + - col1 + + 70 FROM tab0 AS cor0
----
70

query I rowsort
SELECT ALL cor0.col2 + - 84 FROM tab2 AS cor0
----
-46
-57
-58

query I rowsort
SELECT ALL col2 * - ( + cor0.col0 ) - + col2 AS col0 FROM tab2 cor0
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT + cor0.col2 * - 24 FROM tab0 AS cor0
----
-1968
-24
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( tab2.col1 ) col1 FROM tab2
----
17
31
59

query I rowsort
SELECT + col2 * 77 + 82 * + col2 AS col2 FROM tab2 AS cor0
----
4134
4293
6042

query I rowsort
SELECT col2 * + col1 + - col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT DISTINCT 76 * + col1 AS col0 FROM tab0
----
6536
6916
7372

query I rowsort
SELECT + 91 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 3 col0 FROM tab1
----
-3

query I rowsort
SELECT - + cor0.col0 + col2 * + col0 FROM tab1 AS cor0
----
159
3584
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - 56 col0 FROM tab0 AS cor0
----
-138
-57
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2969
SELECT - - cor0.col0 DIV + 16 + 25 FROM tab2 AS cor0
----
25
29
29

skipif mysql # not compatible
query I rowsort label-2969
SELECT - - cor0.col0 / + 16 + 25 FROM tab2 AS cor0
----
25
29
29

query I rowsort
SELECT - + col2 + ( col2 ) AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 49 * col1 FROM tab0
----
-4214
-4459
-4753

query I rowsort
SELECT - col1 + + tab1.col1 + col1 AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT 19 + col0 * + col1 AS col1 FROM tab0
----
2083
3414
8118

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2974
SELECT CAST( NULL AS SIGNED ) * col2 * + cor0.col0 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2974
SELECT CAST ( NULL AS INTEGER ) * col2 * + cor0.col0 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col1 + 67 FROM tab0 AS cor0
----
153
158
164

query I rowsort
SELECT - + ( 27 ) FROM tab0 AS cor0
----
-27
-27
-27

query I rowsort
SELECT - ( 48 ) * col1 AS col1 FROM tab0 AS cor0
----
-4128
-4368
-4656

query I rowsort
SELECT - 22 + col1 - + col0 FROM tab1
----
-76
-89
1

query I rowsort
SELECT col1 * col1 + - col0 AS col1 FROM tab1 AS cor0
----
36
673
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + + col0 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + ( col0 ) * col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col0 + - col0 * ( 3 ) - - col0 FROM tab1
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2983
SELECT - ( tab1.col1 ) DIV col1 AS col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2983
SELECT - ( tab1.col1 ) / col1 AS col2 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ( - col0 ) + + col1 AS col2 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT col2 * - col0 * + 46 + + col0 - tab1.col0 AS col2 FROM tab1
----
-167808
-353280
-7452

query I rowsort
SELECT DISTINCT 96 + col2 + col2 AS col1 FROM tab1 AS cor0
----
204
210
288

onlyif mysql # use DIV operator for integer division
query I rowsort label-2987
SELECT DISTINCT + col2 * cor0.col0 DIV cor0.col0 FROM tab2 cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2987
SELECT DISTINCT + col2 * cor0.col0 / cor0.col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT - + 25 AS col2 FROM tab0 AS cor0
----
-25
-25
-25

query I rowsort
SELECT - - col1 * 0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 68 AS col0 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to 6fbba7db5bccb533a35aa5125a231f88

query I rowsort
SELECT - col1 * cor0.col2 + cor0.col1 + col0 AS col2 FROM tab0 AS cor0
----
-2728
-7282
35

query I rowsort
SELECT DISTINCT + cor0.col0 * ( + 98 ) FROM tab0 AS cor0
----
2352
3430
8722

query I rowsort
SELECT ( cor0.col2 ) * + cor0.col0 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to e1120e7b687b32270ef70393236e7341

onlyif mysql # use DIV operator for integer division
query I rowsort label-2994
SELECT + col0 DIV + col2 + ( col2 + 3 ) * + col2 AS col0 FROM tab0 AS cor0
----
1188
39
6971

skipif mysql # not compatible
query I rowsort label-2994
SELECT + col0 / + col2 + ( col2 + 3 ) * + col2 AS col0 FROM tab0 AS cor0
----
1188
39
6971

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 84 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2996
SELECT CAST( NULL AS SIGNED ) + - 65 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-2996
SELECT CAST ( NULL AS INTEGER ) + - 65 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0, tab0 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to ea1a922b7fccb9d184b31eb4689e063b

query I rowsort
SELECT ALL 31 * 4 AS col1 FROM tab2
----
124
124
124

onlyif mysql # use DIV operator for integer division
query I rowsort label-2999
SELECT - - 60 DIV + 85 AS col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2999
SELECT - - 60 / + 85 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 30 - col1 * - cor0.col2 FROM tab2 AS cor0
----
1564
676
867

query I rowsort
SELECT + + 83 + col2 AS col1 FROM tab2 AS cor0
----
109
110
121

query I rowsort
SELECT ALL + col2 + + cor0.col1 + col0 AS col1 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT ALL + cor0.col1 * + col2 + - 13 FROM tab0 AS cor0
----
2825
7449
84

query I rowsort
SELECT DISTINCT 65 * col2 AS col0 FROM tab2 cor0
----
1690
1755
2470

query I rowsort
SELECT ALL 4 * col0 FROM tab1 AS cor0
----
12
256
320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col2 * - col2 col0 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT ALL - 21 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 631fbd1fd929405aba54a22c2a06c757

skipif mysql # not compatible
query I rowsort
SELECT CAST ( 77 AS REAL ) FROM tab0
----
77
77
77

query I rowsort
SELECT + tab2.col0 - - 71 FROM tab2
----
149
150
78

query I rowsort
SELECT DISTINCT - - 89 AS col0 FROM tab0 AS cor0
----
89

query I rowsort
SELECT - 93 + 28 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

query I rowsort
SELECT DISTINCT - 50 * + col0 - + col1 FROM tab1 AS cor0
----
-176
-3210
-4013

query I rowsort
SELECT ALL + col1 * + 11 AS col1 FROM tab0 cor0
----
1001
1067
946

query I rowsort
SELECT + - 25 * + cor0.col1 + + col0 FROM tab2 AS cor0
----
-1397
-346
-768

query I rowsort
SELECT + - col1 * + 29 * col0 + - 44 AS col2 FROM tab0 AS cor0
----
-234915
-59900
-98499

query I rowsort
SELECT ALL col2 + + col1 * col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab1, tab2 cor0, tab1 AS cor1
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * 70 + col2 col2 FROM tab2 AS cor0
----
1846
1917
2698

query I rowsort
SELECT DISTINCT - + col2 + col0 * + col0 * - col0 FROM tab1 cor0
----
-262201
-512096
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3020
SELECT ALL + + cor0.col1 DIV col0 + col0 AS col2 FROM tab0 AS cor0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-3020
SELECT ALL + + cor0.col1 / col0 + col0 AS col2 FROM tab0 AS cor0
----
27
37
90

query I rowsort
SELECT + 74 + + cor0.col0 FROM tab1 AS cor0
----
138
154
77

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT col2 * 36 AS col2 FROM tab0 AS cor0
----
1188
2952
36

query I rowsort
SELECT - col0 + ( col1 ) FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL + + col0 + - ( + col1 ) * - col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT col0 * ( + col2 ) + + col0 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT cor0.col0 * col1 + - col2 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT ALL + col1 * col0 - - col2 AS col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL - - col0 + + ( + 89 ) AS col1 FROM tab1 AS cor0
----
153
169
92

query I rowsort
SELECT + - col1 * + cor0.col1 * ( + col1 + - 49 ) FROM tab2 AS cor0
----
-34810
17298
9248

query I rowsort
SELECT ALL - cor0.col1 + - col1 FROM tab1 AS cor0
----
-20
-26
-52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3032
SELECT - tab2.col1 * - col0 + tab2.col0 * - ( col0 + CAST( NULL AS SIGNED ) ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3032
SELECT - tab2.col1 * - col0 + tab2.col0 * - ( col0 + CAST ( NULL AS INTEGER ) ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 + + col0 * - ( col0 ) FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT ALL col0 * 81 AS col2 FROM tab1 AS cor0
----
243
5184
6480

query I rowsort
SELECT DISTINCT + - col0 * cor0.col1 + cor0.col1 * - col2 FROM tab1 cor0
----
-1210
-1482
-2288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3036
SELECT DISTINCT CAST( NULL AS SIGNED ) + - cor0.col2 * tab0.col2 FROM tab0, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3036
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - cor0.col2 * tab0.col2 FROM tab0, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( - cor0.col2 AS REAL ) AS col1 FROM tab1, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + - tab0.col1 * - 55 AS col2 FROM tab0, tab2, tab1 cor0
----
4730
5005
5335

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3039
SELECT ALL + col1 * + CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3039
SELECT ALL + col1 * + CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 + - col1 * cor0.col2 AS col1 FROM tab0 cor0
----
-2805
-7380
-96

query I rowsort
SELECT - ( + col2 ) * - col2 * ( col0 ) AS col0 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT - + ( col2 ) * cor0.col2 * 72 AS col1 FROM tab0 AS cor0
----
-484128
-72
-78408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col0 * - col2 col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT - - 92 * - col0 AS col2 FROM tab2 AS cor0
----
-644
-7176
-7268

onlyif mysql # use DIV operator for integer division
query I rowsort label-3045
SELECT - + ( col2 ) DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3045
SELECT - + ( col2 ) / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col1 + + col1 + col1 * col1 FROM tab2 AS cor0
----
1023
323
3599

query I rowsort
SELECT - col1 * col2 - + col0 AS col1 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT + ( col1 ) + 53 AS col2 FROM tab0 AS cor0
----
139
144
150

query I rowsort
SELECT DISTINCT + + col2 * col2 + - col2 * cor0.col2 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL + + 13 + col2 * col2 FROM tab0 AS cor0
----
1102
14
6737

query I rowsort
SELECT ALL - col0 + - col2 * - tab0.col1 FROM tab0
----
2814
62
7373

query I rowsort
SELECT DISTINCT - 40 * col1 + - col1 AS col0 FROM tab0
----
-3526
-3731
-3977

query I rowsort
SELECT + + col0 * - col2 + + ( + 16 ) * col0 * col1 FROM tab0 AS cor0
----
122286
32232
54285

query I rowsort
SELECT ALL - col0 * col0 + cor0.col2 * col1 * col2 + col1 FROM tab1 AS cor0
----
113421
28404
75833

query I rowsort
SELECT col0 * col1 - + col2 * col1 AS col1 FROM tab1 cor0
----
-1326
-208
70

query I rowsort
SELECT 75 + 65 * col0 * cor0.col0 FROM tab1 AS cor0
----
266315
416075
660

query I rowsort
SELECT - + 57 + 55 FROM tab2 AS cor0
----
-2
-2
-2

query I rowsort
SELECT - 37 * - ( cor0.col2 ) FROM tab0 AS cor0
----
1221
3034
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3059
SELECT + CAST( + col2 AS SIGNED ) - cor0.col1 AS col2 FROM tab2 AS cor0
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-3059
SELECT + CAST ( + col2 AS INTEGER ) - cor0.col1 AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ( 36 ) FROM tab2 AS cor0
----
36
36
36

query I rowsort
SELECT col0 * cor0.col2 + cor0.col1 * col1 FROM tab2 AS cor0
----
1150
3291
5509

query I rowsort
SELECT - - 76 - col0 AS col1 FROM tab2 AS cor0
----
-2
-3
69

query I rowsort
SELECT ALL col0 + cor0.col0 * col1 * cor0.col2 AS col0 FROM tab0 AS cor0
----
3430
664207
68136

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3064
SELECT CAST( NULL AS SIGNED ) * + ( + col2 ) * + col2 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3064
SELECT CAST ( NULL AS INTEGER ) * + ( + col2 ) * + col2 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 87 col0 FROM tab2
----
87

query I rowsort
SELECT ALL + 80 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - 49 col2 FROM tab1 AS cor0
----
-23
-36
-39

query I rowsort
SELECT DISTINCT - - 95 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
95

query I rowsort
SELECT DISTINCT - 82 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-82

query I rowsort
SELECT + col2 * - ( ( - cor0.col1 ) ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + 90 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT ALL 59 AS col0 FROM tab1, tab1 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to 05f41d0d3fd0b5c29af79ab9209cab27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 + ( 17 ) col0 FROM tab2 AS cor0
----
24
95
96

query I rowsort
SELECT + col1 * + col2 * cor0.col2 AS col1 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT - ( ( + cor0.col0 ) ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + col0 * col0 * + col2 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT ALL - col0 + cor0.col0 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - 5 col0 FROM tab1 cor0
----
-15
-320
-400

query I rowsort
SELECT ALL col1 + + col2 * col2 AS col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT + + 97 AS col2 FROM tab0 AS cor0
----
97

query I rowsort
SELECT DISTINCT - - col2 + col2 * col1 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT - 15 + + col1 + - tab1.col1 FROM tab1
----
-15

query I rowsort
SELECT DISTINCT col0 + col2 * + col0 AS col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT + ( - col1 ) * + 96 - 6 FROM tab0
----
-8262
-8742
-9318

query I rowsort
SELECT DISTINCT + 33 * tab1.col2 FROM tab1
----
1782
1881
3168

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3086
SELECT - col0 + col2 - - CAST( + ( - col1 ) + col0 AS SIGNED ) * + tab2.col0 FROM tab2
----
-148
1430
4857

skipif mysql # not compatible
query I rowsort label-3086
SELECT - col0 + col2 - - CAST ( + ( - col1 ) + col0 AS INTEGER ) * + tab2.col0 FROM tab2
----
-148
1430
4857

skipif mysql # not compatible
query I rowsort
SELECT ALL + - col2 + col0 + CAST ( + col0 AS REAL ) AS col1 FROM tab2 AS cor0
----
-13
120
130

query I rowsort
SELECT ALL + col0 * + 77 FROM tab0 cor0
----
1848
2695
6853

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3089
SELECT ALL + - col0 * + CAST( - ( col1 ) AS SIGNED ) FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-3089
SELECT ALL + - col0 * + CAST ( - ( col1 ) AS INTEGER ) FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col1 col2 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3091
SELECT ALL - cor0.col0 / CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3091
SELECT ALL - cor0.col0 / CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * + col2 + ( + col0 ) * 96 FROM tab1 AS cor0
----
0
126
2496

query I rowsort
SELECT + col0 * + col1 * ( col2 + + ( ( col1 ) ) ) FROM tab0 AS cor0
----
1401127
245616
332710

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0, tab0 AS cor1, tab0, tab2 cor2
----
3645 values hashing to 71180f9f3efadf0ee3a7fec9678208ad

query I rowsort
SELECT ALL + col0 * - col0 - - 58 * - col2 AS col0 FROM tab1 AS cor0
----
-11968
-3141
-7402

query I rowsort
SELECT DISTINCT + cor0.col0 + + col0 AS col2 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT ALL - - col1 * - cor0.col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + + col0 * col2 + + col1 * - col2 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT DISTINCT + col1 + - col1 * col2 + - col0 FROM tab2 cor0
----
-1553
-708
-813

onlyif mysql # use DIV operator for integer division
query I rowsort label-3100
SELECT - 67 + + col0 * col0 DIV ( ( col1 ) + col0 ) FROM tab1
----
-12
-67
1

skipif mysql # not compatible
query I rowsort label-3100
SELECT - 67 + + col0 * col0 / ( ( col1 ) + col0 ) FROM tab1
----
-12
-67
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3101
SELECT - + col1 DIV - 33 AS col0 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3101
SELECT - + col1 / - 33 AS col0 FROM tab2 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + tab0.col1 ) col2 FROM tab0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3103
SELECT DISTINCT - col0 * cor0.col0 + CAST( - col2 AS SIGNED ) + col0 * + col1 AS col0 FROM tab0 AS cor0
----
1455
2169
96

skipif mysql # not compatible
query I rowsort label-3103
SELECT DISTINCT - col0 * cor0.col0 + CAST ( - col2 AS INTEGER ) + col0 * + col1 AS col0 FROM tab0 AS cor0
----
1455
2169
96

skipif mysql # not compatible
query I rowsort
SELECT CAST ( 27 AS REAL ) FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * tab2.col0 + - col2 * - col2 col0 FROM tab2
----
2704
4446
918

query I rowsort
SELECT DISTINCT - col2 + col0 + ( + col1 ) AS col2 FROM tab2
----
11
111
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 48 + ( - col1 ) col2 FROM tab1 cor0
----
22
35
38

query I rowsort
SELECT ALL + col0 * col1 * col1 + - 68 AS col1 FROM tab0 AS cor0
----
177436
329247
736941

query I rowsort
SELECT DISTINCT + ( + 28 ) - - col1 AS col2 FROM tab1 AS cor0
----
38
41
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-3110
SELECT col0 * - 41 - - ( col2 ) * 2 DIV + col0 FROM tab2
----
-280
-3198
-3239

skipif mysql # not compatible
query I rowsort label-3110
SELECT col0 * - 41 - - ( col2 ) * 2 / + col0 FROM tab2
----
-280
-3198
-3239

query I rowsort
SELECT - tab1.col2 + - 39 + col1 FROM tab1
----
-122
-67
-86

query I rowsort
SELECT col0 * - 94 + + tab2.col1 FROM tab2
----
-627
-7273
-7409

query I rowsort
SELECT + tab2.col2 + + 15 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 4c15608727201de8881255fd78299137

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3114
SELECT DISTINCT col1 * 78 + + col0 + + col1 * CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-3114
SELECT DISTINCT col1 * 78 + + col0 + + col1 * CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab2
----
NULL

query I rowsort
SELECT col2 + + 39 FROM tab1
----
135
93
96

query I rowsort
SELECT DISTINCT - + ( - 28 ) * col2 FROM tab0 AS cor0
----
2296
28
924

query I rowsort
SELECT ALL ( - col1 ) - - cor0.col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - - 82 AS col1 FROM tab1 cor0
----
82
82
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3119
SELECT DISTINCT - CAST( NULL AS SIGNED ) * 17 * col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3119
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * 17 * col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + 42 * col0 + - col0 FROM tab2 cor0
----
287
3198
3239

query I rowsort
SELECT DISTINCT - ( - 58 ) FROM tab1 AS cor0
----
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col0 col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT + + col2 * 53 - col0 FROM tab2 cor0
----
1300
1424
1935

query I rowsort
SELECT + - 47 + - col0 FROM tab1 AS cor0
----
-111
-127
-50

query I rowsort
SELECT - col1 * 85 AS col0 FROM tab1 AS cor0
----
-1105
-2210
-850

query I rowsort
SELECT DISTINCT + 98 + col1 * + col1 FROM tab2 AS cor0
----
1059
3579
387

query I rowsort
SELECT + + cor0.col0 * col1 + col2 + - ( col1 ) AS col1 FROM tab0 AS cor0
----
2011
3299
8090

query I rowsort
SELECT ALL - col2 + - ( col2 ) * col2 AS col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL col1 * col1 * + col0 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT DISTINCT - ( 83 ) * + col1 AS col1 FROM tab2
----
-1411
-2573
-4897

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col0 AS REAL ) + col1 * CAST ( 68 AS INTEGER ) AS col2 FROM tab2
----
1235
2115
4090

query I rowsort
SELECT tab1.col1 * 3 * + col2 AS col2 FROM tab1
----
1710
3744
4212

query I rowsort
SELECT ALL - cor0.col1 + - col2 * + col0 * + col0 FROM tab2 AS cor0
----
-1354
-158243
-237175

onlyif mysql # use DIV operator for integer division
query I rowsort label-3134
SELECT ALL 7 * + 26 + + col2 DIV col2 AS col0 FROM tab0 AS cor0
----
183
183
183

skipif mysql # not compatible
query I rowsort label-3134
SELECT ALL 7 * + 26 + + col2 / col2 AS col0 FROM tab0 AS cor0
----
183
183
183

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * cor0.col2 col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ( col0 ) + - col2 * - 41 FROM tab2 AS cor0
----
1114
1144
1637

query I rowsort
SELECT - col1 + - cor0.col0 * - 37 AS col1 FROM tab1 AS cor0
----
2358
2947
85

query I rowsort
SELECT 61 + - col0 AS col1 FROM tab1 AS cor0
----
-19
-3
58

query I rowsort
SELECT + col2 * col2 * - ( - col2 ) FROM tab0 AS cor0
----
1
35937
551368

query I rowsort
SELECT DISTINCT col2 + + col2 * - col1 FROM tab2 cor0
----
-1508
-608
-810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 48 + ( - col1 ) * - col1 col2 FROM tab0
----
7444
8329
9457

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col0 col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3143
SELECT - 18 * col0 + CAST( - col1 AS SIGNED ) + col1 AS col2 FROM tab1 AS cor0
----
-1152
-1440
-54

skipif mysql # not compatible
query I rowsort label-3143
SELECT - 18 * col0 + CAST ( - col1 AS INTEGER ) + col1 AS col2 FROM tab1 AS cor0
----
-1152
-1440
-54

query I rowsort
SELECT ALL col2 * 99 FROM tab1 cor0
----
5346
5643
9504

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + cor0.col1 col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL col2 * - 54 FROM tab1 AS cor0
----
-2916
-3078
-5184

query I rowsort
SELECT DISTINCT + + col2 + ( + 29 ) * + col1 * + col2 AS col2 FROM tab2 AS cor0
----
18772
24300
44512

query I rowsort
SELECT ALL - - col2 + 29 FROM tab2 AS cor0
----
55
56
67

query I rowsort
SELECT DISTINCT col0 + 21 AS col2 FROM tab0 AS cor0
----
110
45
56

query I rowsort
SELECT ALL + col1 * ( - col0 ) AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + col2 * col1 + + col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT 78 AS col0 FROM tab2, tab0 AS cor0
----
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3153
SELECT DISTINCT col2 * ( + col1 ) + col2 DIV - col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-3153
SELECT DISTINCT col2 * ( + col1 ) + col2 / - col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + ( + col2 ) col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT col2 + - col0 * + col1 AS col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-3156
SELECT ALL col2 + - col2 DIV + col2 AS col0 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-3156
SELECT ALL col2 + - col2 / + col2 AS col0 FROM tab0 AS cor0
----
0
32
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3157
SELECT DISTINCT col2 DIV col1 col0 FROM tab2 AS cor0
----
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3157
SELECT DISTINCT col2 / col1 col0 FROM tab2 AS cor0
----
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + col0 * col2 col2 FROM tab2 cor0
----
158
1969
2985

query I rowsort
SELECT + cor0.col0 + col0 + col0 AS col2 FROM tab1 AS cor0
----
192
240
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3160
SELECT + + col1 DIV - col1 + col0 + col2 AS col1 FROM tab0 cor0
----
170
35
56

skipif mysql # not compatible
query I rowsort label-3160
SELECT + + col1 / - col1 + col0 + col2 AS col1 FROM tab0 cor0
----
170
35
56

query I rowsort
SELECT ALL + col2 + 64 * - 65 AS col0 FROM tab0
----
-4078
-4127
-4159

query I rowsort
SELECT 49 FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to e587c122dea39a2488ff88b884cea462

onlyif mysql # use DIV operator for integer division
query I rowsort label-3163
SELECT col1 DIV tab2.col1 + col2 + col0 * col2 FROM tab2
----
2055
217
3041

skipif mysql # not compatible
query I rowsort label-3163
SELECT col1 / tab2.col1 + col2 + col0 * col2 FROM tab2
----
2055
217
3041

onlyif mysql # use DIV operator for integer division
query I rowsort label-3164
SELECT DISTINCT + col2 * col1 DIV - ( col0 ) AS col1 FROM tab2
----
-119
-19
-8

skipif mysql # not compatible
query I rowsort label-3164
SELECT DISTINCT + col2 * col1 / - ( col0 ) AS col1 FROM tab2
----
-119
-19
-8

query I rowsort
SELECT DISTINCT col2 * - 42 * - col1 FROM tab2
----
27132
35154
64428

onlyif mysql # use DIV operator for integer division
query I rowsort label-3166
SELECT + cor0.col1 DIV - ( 45 * - col1 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3166
SELECT + cor0.col1 / - ( 45 * - col1 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 45 * cor0.col2 AS col1 FROM tab1 AS cor0
----
-2430
-2565
-4320

query I rowsort
SELECT ( ( col1 ) ) * cor0.col2 - 66 * + col0 FROM tab1 AS cor0
----
-3654
-4032
1206

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 col1 FROM tab2 cor0
----
44
44
44

query I rowsort
SELECT DISTINCT + 5 * - 34 FROM tab0, tab1 cor0
----
-170

query I rowsort
SELECT DISTINCT col1 * + ( tab2.col1 ) FROM tab2
----
289
3481
961

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( col0 AS REAL ) * cor0.col2 AS col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT + ( cor0.col1 ) * cor0.col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + - 12 * + 93 FROM tab2 AS cor0
----
-1116
-1116
-1116

query I rowsort
SELECT col0 * - 54 FROM tab2 cor0
----
-378
-4212
-4266

query I rowsort
SELECT + + col2 * col1 * col1 AS col2 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT + col2 * col0 + + col0 + col2 * - col1 FROM tab0 AS cor0
----
-2022
-27
-75

query I rowsort
SELECT 77 * cor0.col0 + - col1 FROM tab1 AS cor0
----
205
4918
6147

query I rowsort
SELECT 59 AS col0 FROM tab0
----
59
59
59

query I rowsort
SELECT - - col1 + + cor0.col1 AS col1 FROM tab0 cor0
----
172
182
194

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - - col0 * CAST ( ( - col1 ) AS REAL ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + col0 + col0 * col2 AS col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT col1 * ( col2 ) AS col0 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3184
SELECT DISTINCT col1 * col2 DIV + col1 AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3184
SELECT DISTINCT col1 * col2 / + col1 AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT col1 * - ( 50 ) FROM tab1 AS cor0
----
-1300
-500
-650

query I rowsort
SELECT ALL + + col0 * - cor0.col1 + - 40 * col1 FROM tab0 AS cor0
----
-11739
-5504
-7275

query I rowsort
SELECT ALL col1 * - ( 0 ) + col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL + cor0.col2 + ( + 69 ) FROM tab2 AS cor0
----
107
95
96

query I rowsort
SELECT ALL col1 + col2 * + col2 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT - col1 + cor0.col0 * 43 AS col2 FROM tab0 cor0
----
1408
3736
946

query I rowsort
SELECT ALL + col1 + 37 AS col2 FROM tab0 AS cor0
----
123
128
134

query I rowsort
SELECT ALL + + col1 + - ( 25 * col1 + + col2 ) AS col2 FROM tab0 AS cor0
----
-2097
-2266
-2329

query I rowsort
SELECT ALL cor0.col1 + - 68 FROM tab0 AS cor0
----
18
23
29

query I rowsort
SELECT DISTINCT cor0.col1 + + col2 * 83 FROM tab1 cor0
----
4508
4741
7981

query I rowsort
SELECT DISTINCT 39 + + tab1.col0 * col0 AS col1 FROM tab1
----
4135
48
6439

query I rowsort
SELECT DISTINCT + + col2 + ( col0 + + cor0.col1 * 39 ) AS col0 FROM tab2 AS cor0
----
1243
2405
780

query I rowsort
SELECT ALL cor0.col2 * + col2 + cor0.col1 + - col0 FROM tab1 AS cor0
----
2939
3195
9149

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * 54 + + cor0.col1 col2 FROM tab1 AS cor0
----
1430
550
715

query I rowsort
SELECT ALL - col2 * - col0 + ( - col0 ) FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT + + col0 * + col0 + col0 * - col2 FROM tab1 AS cor0
----
-1280
-153
448

query I rowsort
SELECT DISTINCT - col1 - + cor0.col1 FROM tab0 AS cor0
----
-172
-182
-194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 73 col1 FROM tab2 cor0
----
73
73
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-3203
SELECT 45 DIV col0 FROM tab1
----
0
0
15

skipif mysql # not compatible
query I rowsort label-3203
SELECT 45 / col0 FROM tab1
----
0
0
15

query I rowsort
SELECT DISTINCT 23 * col1 AS col0 FROM tab0
----
1978
2093
2231

query I rowsort
SELECT col0 * col1 + - ( col2 ) * col1 FROM tab0 AS cor0
----
-774
3298
637

query I rowsort
SELECT DISTINCT + 57 - col0 AS col0 FROM tab1
----
-23
-7
54

query I rowsort
SELECT + tab2.col2 * col2 + + col2 + col0 FROM tab2
----
1561
763
780

query I rowsort
SELECT + col1 * + col0 - - 2 AS col1 FROM tab2
----
1345
219
4604

onlyif mysql # use DIV operator for integer division
query I rowsort label-3209
SELECT + col2 + col0 DIV + ( + ( + col0 ) ) AS col0 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-3209
SELECT + col2 + col0 / + ( + ( + col0 ) ) AS col0 FROM tab0
----
2
34
83

query I rowsort
SELECT DISTINCT + 98 * cor0.col0 AS col2 FROM tab2 AS cor0
----
686
7644
7742

query I rowsort
SELECT - col0 * - cor0.col0 * cor0.col1 FROM tab0 AS cor0
----
118825
49536
720811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * + cor0.col2 + + col1 col2 FROM tab1 AS cor0
----
2942
3259
9229

query III rowsort
SELECT * FROM tab0 WHERE NOT ( col2 * - col0 ) IN ( + col2 + col2 * - col0 * tab0.col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3214
SELECT ALL - col0 + tab0.col2 DIV col2 FROM tab0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-3214
SELECT ALL - col0 + tab0.col2 / col2 FROM tab0
----
-23
-34
-88

query I rowsort
SELECT ALL col0 + + tab2.col0 * col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT - col0 * + col1 + col0 AS col1 FROM tab0
----
-2040
-3360
-8010

query III rowsort
SELECT * FROM tab1 WHERE NOT ( col0 ) NOT BETWEEN col1 * - col2 AND col1
----
3
26
54

query I rowsort
SELECT ALL - col0 + - col0 * col0 AS col0 FROM tab2
----
-56
-6162
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-3219
SELECT col1 + col1 DIV + col0 AS col0 FROM tab0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-3219
SELECT col1 + col1 / + col0 AS col0 FROM tab0
----
89
92
99

query I rowsort
SELECT col2 AS col0 FROM tab2 WHERE ( col1 ) IN ( - col2 * + col0 + - col0 / - col0 )
----

query I rowsort
SELECT ALL col1 + - col1 * col0 * - col0 AS col0 FROM tab1
----
260
40970
83213

query I rowsort
SELECT col2 AS col1 FROM tab1 WHERE NULL = + col0 * col2 / - col0
----

query I rowsort
SELECT col1 * col1 + - col0 * tab2.col2 - - col1 AS col2 FROM tab2
----
-2696
1512
803

query I rowsort
SELECT - tab0.col2 * col0 + + tab0.col2 * - tab0.col1 FROM tab0
----
-132
-14760
-3630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 92 col1 FROM tab2 AS cor0
----
92
92
92

query I rowsort
SELECT - + col2 * - col2 + col1 AS col2 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT + + col0 * col1 + - col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT ALL cor0.col0 * - cor0.col2 - - 12 FROM tab0 AS cor0
----
-23
-7286
-780

onlyif mysql # use DIV operator for integer division
query I rowsort label-3229
SELECT + cor0.col1 + col2 DIV col0 FROM tab2 AS cor0
----
17
34
59

skipif mysql # not compatible
query I rowsort label-3229
SELECT + cor0.col1 + col2 / col0 FROM tab2 AS cor0
----
17
34
59

query I rowsort
SELECT col0 + col0 + col1 AS col0 FROM tab0
----
134
167
269

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 * + col0 col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT - col1 * - col0 * - col1 + col1 AS col2 FROM tab1
----
-13507
-2002
-6390

query I rowsort
SELECT DISTINCT tab0.col1 * col1 + - col0 FROM tab0
----
7372
8192
9374

query I rowsort
SELECT col2 * + tab0.col2 - + col0 * col0 * tab0.col2 AS col0 FROM tab0
----
-1224
-17919
-642798

onlyif mysql # use DIV operator for integer division
query I rowsort label-3235
SELECT DISTINCT cor0.col0 * col0 - col2 DIV - col1 col2 FROM tab0 cor0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3235
SELECT DISTINCT cor0.col0 * col0 - col2 / - col1 col2 FROM tab0 cor0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col2 col1 FROM tab1 cor0
----
2916
3249
9216

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE NOT col2 NOT BETWEEN NULL AND + col1 - col0
----

query I rowsort
SELECT ALL - col1 * col2 + col1 + - col0 FROM tab0 AS cor0
----
-2776
-35
-7460

query I rowsort
SELECT ALL + col1 + + col2 + col1 FROM tab2
----
144
72
89

query I rowsort
SELECT ALL - tab0.col1 * col2 * - col0 AS col1 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT col1 + - col2 * - col2 FROM tab0
----
1175
6815
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3242
SELECT ALL col2 + - col2 * col2 + - col0 DIV col1 FROM tab1
----
-2862
-3198
-9126

skipif mysql # not compatible
query I rowsort label-3242
SELECT ALL col2 + - col2 * col2 + - col0 / col1 FROM tab1
----
-2862
-3198
-9126

query I rowsort
SELECT DISTINCT + col0 * tab0.col1 * + col1 AS col2 FROM tab0
----
177504
329315
737009

query III rowsort
SELECT * FROM tab1 WHERE NOT ( col1 + col2 + + col2 ) >= - col0 + + col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3245
SELECT + col0 DIV + tab0.col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3245
SELECT + col0 / + tab0.col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + tab2.col1 + - col2 + + col1 AS col0 FROM tab2
----
-4
35
92

query I rowsort
SELECT DISTINCT col2 + col0 * + col2 * + col1 FROM tab1
----
36537
4266
99936

query I rowsort
SELECT ALL - col0 * col0 - - col0 AS col1 FROM tab1
----
-4032
-6
-6320

query I rowsort
SELECT ALL tab0.col2 * tab0.col2 AS col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT col1 * + tab2.col2 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT col2 + + col1 AS col0 FROM tab2 WHERE NOT ( col2 + col0 ) IN ( - col0 )
----
55
58
85

query I rowsort
SELECT - col1 * + col1 * col2 AS col1 FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT col1 * - col1 * col2 + - col2 FROM tab2
----
-11020
-25974
-90532

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT ( col0 + col2 * col2 ) <> ( NULL )
----

query I rowsort
SELECT + ( ( + cor0.col0 ) ) * 2 * - col2 + cor0.col2 AS col0 FROM tab1 AS cor0
----
-15264
-270
-7239

query I rowsort
SELECT + ( cor0.col2 ) + col0 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3257
SELECT CAST( - 85 AS SIGNED ) * col0 AS col2 FROM tab2 AS cor0
----
-595
-6630
-6715

skipif mysql # not compatible
query I rowsort label-3257
SELECT CAST ( - 85 AS INTEGER ) * col0 AS col2 FROM tab2 AS cor0
----
-595
-6630
-6715

query I rowsort
SELECT ALL col0 + 89 * col0 FROM tab2
----
630
7020
7110

query I rowsort
SELECT + 98 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 cor2
----
81 values hashing to 6624b1f09c0594f5576803ac29f4499d

onlyif mysql # use DIV operator for integer division
query I rowsort label-3260
SELECT DISTINCT col2 DIV - col1 + - col0 FROM tab1
----
-5
-69
-87

skipif mysql # not compatible
query I rowsort label-3260
SELECT DISTINCT col2 / - col1 + - col0 FROM tab1
----
-5
-69
-87

query I rowsort
SELECT 74 * - col1 * - col0 AS col2 FROM tab1
----
47360
5772
76960

query I rowsort
SELECT col1 + + ( col0 + col2 ) * - cor0.col2 FROM tab2 cor0
----
-2645
-4429
-887

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col2 ) * + tab2.col2 col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT DISTINCT - cor0.col0 * + 62 FROM tab2, tab0 AS cor0
----
-1488
-2170
-5518

query I rowsort
SELECT ALL + cor0.col2 * + 18 + cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 46962dfe43199cb3daf58bc5b62378a7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3267
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1, tab0 cor0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-3267
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1, tab0 cor0, tab0 AS cor1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col2 ) * tab0.col2 col1 FROM tab0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 - - col0 col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL - + cor0.col0 * ( + col1 ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col0 * 24 + + 45 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-130
-1905
-1930

onlyif mysql # use DIV operator for integer division
query I rowsort label-3272
SELECT + tab2.col1 DIV + 5 FROM tab2
----
11
3
6

skipif mysql # not compatible
query I rowsort label-3272
SELECT + tab2.col1 / + 5 FROM tab2
----
11
3
6

query I rowsort
SELECT col1 * - 70 AS col1 FROM tab1 AS cor0
----
-1820
-700
-910

query I rowsort
SELECT - + col0 * + 23 * col0 FROM tab2 AS cor0
----
-1127
-139932
-143543

query I rowsort
SELECT - col1 * 57 * - 35 FROM tab1 AS cor0
----
19950
25935
51870

query I rowsort
SELECT + col2 * - ( + col0 * - cor0.col1 ) FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT - tab1.col1 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT ALL - col0 * col2 - 36 FROM tab1 AS cor0
----
-198
-3684
-7716

query I rowsort
SELECT ALL ( + col2 ) + col1 * col1 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT ( - col1 ) * col2 - - ( + col1 + - col0 ) FROM tab2
----
-1553
-708
-813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 51 col0 FROM tab2, tab2 AS cor0
----
-51

query I rowsort
SELECT DISTINCT 95 * - col0 FROM tab0
----
-2280
-3325
-8455

query I rowsort
SELECT - col0 * col0 * + 6 FROM tab1 AS cor0
----
-24576
-38400
-54

query I rowsort
SELECT DISTINCT + + col2 + + col2 * 67 AS col2 FROM tab1 AS cor0
----
3672
3876
6528

query I rowsort
SELECT col1 + cor0.col2 * 28 FROM tab1 AS cor0
----
1538
1606
2701

query I rowsort
SELECT cor0.col2 + 33 * + col0 FROM tab0 AS cor0
----
1156
3019
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-3287
SELECT + col0 - - cor0.col0 DIV - 91 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3287
SELECT + col0 - - cor0.col0 / - 91 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + col0 + - 49 AS col1 FROM tab1 AS cor0
----
-46
15
31

query I rowsort
SELECT + col2 * + 18 AS col2 FROM tab1 AS cor0
----
1026
1728
972

onlyif mysql # use DIV operator for integer division
query I rowsort label-3290
SELECT - cor0.col2 DIV ( ( col1 ) ) FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-3290
SELECT - cor0.col2 / ( ( col1 ) ) FROM tab1 AS cor0
----
-2
-5
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3291
SELECT CAST( NULL AS SIGNED ) + col0 + cor0.col2 * - 2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3291
SELECT CAST ( NULL AS INTEGER ) + col0 + cor0.col2 * - 2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 50 + + col1 + col2 col0 FROM tab1 AS cor0
----
17
30
59

query I rowsort
SELECT + cor1.col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL - col2 * + 71 FROM tab0 AS cor0
----
-2343
-5822
-71

query I rowsort
SELECT - col2 * + col2 * col1 + + cor0.col0 + - col1 FROM tab0 AS cor0
----
-159
-611886
-93716

query I rowsort
SELECT - 40 - - col0 FROM tab2 AS cor0
----
-33
38
39

query I rowsort
SELECT ALL 25 + - 61 FROM tab1 cor0
----
-36
-36
-36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3298
SELECT ALL CAST( - cor0.col2 AS SIGNED ) + - col1 col2 FROM tab2 AS cor0
----
-55
-58
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3298
SELECT ALL CAST ( - cor0.col2 AS INTEGER ) + - col1 col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT + 58 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 13 * col2 + col0 col2 FROM tab0 AS cor0
----
1155
453
48

query I rowsort
SELECT - - col0 - + 54 FROM tab2 AS cor0
----
-47
24
25

query I rowsort
SELECT DISTINCT + - col1 + - col1 - + col2 AS col2 FROM tab0 cor0
----
-195
-205
-264

onlyif mysql # use DIV operator for integer division
query I rowsort label-3303
SELECT ALL - col0 + - ( + col0 ) * - cor0.col0 + col1 DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
4032
6
6320

skipif mysql # not compatible
query I rowsort label-3303
SELECT ALL - col0 + - ( + col0 ) * - cor0.col0 + col1 / cor0.col2 AS col1 FROM tab1 AS cor0
----
4032
6
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-3304
SELECT ALL + - col0 + + col2 DIV col0 + col1 col2 FROM tab1 cor0
----
-54
-66
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3304
SELECT ALL + - col0 + + col2 / col0 + col1 col2 FROM tab1 cor0
----
-54
-66
41

query I rowsort
SELECT - - col2 + + 28 FROM tab0 AS cor0
----
110
29
61

query I rowsort
SELECT DISTINCT + - 3 + - 46 FROM tab0 AS cor0
----
-49

query I rowsort
SELECT + - 78 FROM tab2 cor0
----
-78
-78
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3308
SELECT ALL + - col1 * + col0 + col2 + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3308
SELECT ALL + - col1 * + col0 + col2 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 27 AS col0 FROM tab1 cor0
----
27

query I rowsort
SELECT DISTINCT - - cor0.col2 * + col1 + - col0 AS col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT + cor0.col1 * col2 * cor0.col0 + + col0 AS col1 FROM tab0 AS cor0
----
3430
664207
68136

onlyif mysql # use DIV operator for integer division
query I rowsort label-3312
SELECT DISTINCT - col1 DIV col1 + 43 * + 45 FROM tab0 AS cor0
----
1934

skipif mysql # not compatible
query I rowsort label-3312
SELECT DISTINCT - col1 / col1 + 43 * + 45 FROM tab0 AS cor0
----
1934

query I rowsort
SELECT ALL col2 + - col2 * col2 AS col0 FROM tab2 cor0
----
-1406
-650
-702

query I rowsort
SELECT ALL - 28 + - col2 * ( col0 ) FROM tab2 cor0
----
-2056
-217
-3030

query I rowsort
SELECT col2 + col1 + - col0 FROM tab2 AS cor0
----
-24
51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3316
SELECT DISTINCT - 67 DIV + col1 + + col1 AS col2 FROM tab2
----
14
29
58

skipif mysql # not compatible
query I rowsort label-3316
SELECT DISTINCT - 67 / + col1 + + col1 AS col2 FROM tab2
----
14
29
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 92 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

query I rowsort
SELECT ALL - col2 * - col2 + col1 + col0 FROM tab0 AS cor0
----
1199
133
6904

query I rowsort
SELECT ALL - col1 * - 16 AS col0 FROM tab2 AS cor0
----
272
496
944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3320
SELECT DISTINCT col2 * CAST( + col2 AS SIGNED ) FROM tab0 AS cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-3320
SELECT DISTINCT col2 * CAST ( + col2 AS INTEGER ) FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + cor0.col2 + 92 * col2 AS col2 FROM tab1 AS cor0
----
5022
5301
8928

query I rowsort
SELECT + col1 * + 17 AS col0 FROM tab0 cor0
----
1462
1547
1649

query I rowsort
SELECT ALL 43 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab1, tab1 AS cor2
----
243 values hashing to 9f059abb74645264a8907ee97b850de4

query I rowsort
SELECT ALL - col2 - ( - 54 ) FROM tab0
----
-28
21
53

query I rowsort
SELECT DISTINCT tab1.col1 * - col1 - col0 FROM tab1
----
-164
-249
-679

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 92 * - ( cor0.col2 ) col0 FROM tab2, tab2 AS cor0
----
-2392
-2484
-3496

query I rowsort
SELECT 28 FROM tab1, tab0, tab1 AS cor0, tab2 AS cor1
----
81 values hashing to 423726553d33e100432ebde49ddd31b5

query I rowsort
SELECT DISTINCT tab1.col2 * - ( + col0 ) FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL - col1 - ( col2 ) FROM tab2
----
-55
-58
-85

query I rowsort
SELECT ALL + 90 + col1 * ( - col0 ) * col0 FROM tab1
----
-144
-40870
-83110

query I rowsort
SELECT - col1 - - col1 * + col0 AS col2 FROM tab1 AS cor0
----
1027
52
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-3332
SELECT ALL + col1 + - col2 DIV col0 AS col0 FROM tab2 AS cor0
----
17
28
59

skipif mysql # not compatible
query I rowsort label-3332
SELECT ALL + col1 + - col2 / col0 AS col0 FROM tab2 AS cor0
----
17
28
59

query I rowsort
SELECT ALL + + col2 * col1 + col2 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT ALL 31 + col2 FROM tab0 cor0
----
113
32
64

query I rowsort
SELECT - - col0 * col0 + col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL ( cor0.col1 ) AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT col0 + + ( + 82 ) FROM tab2 AS cor0
----
160
161
89

query I rowsort
SELECT + col1 * + 7 + ( col2 + + 17 ) FROM tab1 AS cor0
----
144
204
253

query I rowsort
SELECT - col0 * cor0.col1 + - 5 + + col2 AS col0 FROM tab2 AS cor0
----
-1310
-195
-4581

query I rowsort
SELECT - - col2 * + 43 + + col0 * + cor0.col2 FROM tab2 AS cor0
----
1350
3146
4636

query I rowsort
SELECT ( + col1 + col2 ) FROM tab1
----
109
67
80

query I rowsort
SELECT ALL col2 * - 71 FROM tab0 AS cor0
----
-2343
-5822
-71

query I rowsort
SELECT ALL - - 44 * cor0.col1 + cor0.col2 * col2 + 94 FROM tab0 AS cor0
----
10822
4363
4967

query I rowsort
SELECT - + col2 * col1 + cor0.col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT ALL col0 * col0 + col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT 46 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

query I rowsort
SELECT ALL col0 + 88 FROM tab0 AS cor0
----
112
123
177

query I rowsort
SELECT DISTINCT - 1 FROM tab2, tab2 AS cor0, tab1 AS cor1, tab2 AS cor2
----
-1

query I rowsort
SELECT 78 + col0 * + col1 AS col0 FROM tab1 AS cor0
----
1118
156
718

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 + - cor0.col0 col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT - 27 + + 79 * cor0.col1 * 21 + col2 AS col2 FROM tab2 AS cor0
----
28214
51429
97880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 72 + - col2 * ( ( col0 ) ) col0 FROM tab1 cor0
----
-234
-3720
-7752

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3353
SELECT ALL col2 * - col1 + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3353
SELECT ALL col2 * - col1 + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3354
SELECT + 43 DIV + cor0.col0 AS col1 FROM tab1 AS cor0
----
0
0
14

skipif mysql # not compatible
query I rowsort label-3354
SELECT + 43 / + cor0.col0 AS col1 FROM tab1 AS cor0
----
0
0
14

query I rowsort
SELECT DISTINCT 16 + + cor0.col0 FROM tab0 AS cor0
----
105
40
51

query I rowsort
SELECT + col0 - - cor0.col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL col1 + - col0 * - col2 AS col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT - 2 - - col2 * 88 FROM tab2 AS cor0
----
2286
2374
3342

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + cor0.col2 col1 FROM tab0 cor0
----
164
2
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3360
SELECT ALL CAST( col0 * - col0 AS SIGNED ) AS col2 FROM tab1
----
-4096
-6400
-9

skipif mysql # not compatible
query I rowsort label-3360
SELECT ALL CAST ( col0 * - col0 AS INTEGER ) AS col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT + col1 * ( - col0 ) * + col0 + + col1 FROM tab1
----
-208
-40950
-83187

query I rowsort
SELECT DISTINCT - col1 * + ( col0 ) FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - - col0 * cor0.col1 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - col1 + + cor0.col0 * - 14 FROM tab0 cor0
----
-1337
-422
-587

query I rowsort
SELECT + ( + col1 ) + col1 * col2 FROM tab0 cor0
----
194
2924
7553

query I rowsort
SELECT ALL col1 * col2 * - col0 + + 36 FROM tab1
----
-36444
-4176
-99804

onlyif mysql # use DIV operator for integer division
query I rowsort label-3367
SELECT DISTINCT col2 + col2 DIV ( col1 ) AS col0 FROM tab2
----
26
27
40

skipif mysql # not compatible
query I rowsort label-3367
SELECT DISTINCT col2 + col2 / ( col1 ) AS col0 FROM tab2
----
26
27
40

query I rowsort
SELECT - col2 - + 89 AS col1 FROM tab2 AS cor0
----
-115
-116
-127

query I rowsort
SELECT + - col2 - + col0 AS col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT col1 * ( + 98 ) FROM tab1 AS cor0
----
1274
2548
980

query I rowsort
SELECT - + col0 - ( - 48 ) FROM tab2 AS cor0
----
-30
-31
41

query I rowsort
SELECT DISTINCT 54 AS col1 FROM tab0
----
54

query I rowsort
SELECT DISTINCT + col0 * col1 + col2 * col1 FROM tab2
----
1054
1989
6136

query I rowsort
SELECT col2 - ( - col1 ) FROM tab0
----
119
173
98

query I rowsort
SELECT + col2 * col2 + col1 AS col2 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT + tab2.col1 + ( + 47 ) FROM tab2
----
106
64
78

query I rowsort
SELECT DISTINCT 98 * - cor0.col0 AS col0 FROM tab2, tab2 AS cor0
----
-686
-7644
-7742

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + 44 * + col0 ) col1 FROM tab2
----
308
3432
3476

query I rowsort
SELECT DISTINCT col2 * + cor0.col0 + col0 AS col2 FROM tab0 cor0
----
70
7387
816

query I rowsort
SELECT - 67 + cor0.col2 + col0 FROM tab1 AS cor0
----
-10
109
54

query I rowsort
SELECT DISTINCT + col1 * - 22 FROM tab2 AS cor0
----
-1298
-374
-682

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3382
SELECT - - CAST( - col0 AS SIGNED ) * + col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-3382
SELECT - - CAST ( - col0 AS INTEGER ) * + col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - col1 + - col0 - - col0 AS col2 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + 51 AS col2 FROM tab0 AS cor0
----
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3385
SELECT DISTINCT CAST( NULL AS SIGNED ) - col1 / + col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3385
SELECT DISTINCT CAST ( NULL AS INTEGER ) - col1 / + col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + - col1 + col2 * col2 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT DISTINCT - col2 * + 40 + col1 + col2 AS col0 FROM tab1 AS cor0
----
-2080
-2213
-3731

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3388
SELECT - - col0 + - CAST( NULL AS SIGNED ) * - col1 / + cor0.col1 col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3388
SELECT - - col0 + - CAST ( NULL AS INTEGER ) * - col1 / + cor0.col1 col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + ( col0 ) col0 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3390
SELECT ALL - + col1 + CAST( - 23 AS SIGNED ) * col1 + + col1 * col2 AS col2 FROM tab1 AS cor0
----
330
780
936

skipif mysql # not compatible
query I rowsort label-3390
SELECT ALL - + col1 + CAST ( - 23 AS INTEGER ) * col1 + + col1 * col2 AS col2 FROM tab1 AS cor0
----
330
780
936

query I rowsort
SELECT - 46 * 93 + col2 AS col2 FROM tab1 cor0
----
-4182
-4221
-4224

query I rowsort
SELECT DISTINCT 70 + ( + col1 * - col0 ) AS col1 FROM tab1 AS cor0
----
-570
-8
-970

onlyif mysql # use DIV operator for integer division
query I rowsort label-3393
SELECT ALL + col1 DIV - 44 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3393
SELECT ALL + col1 / - 44 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT col2 * 64 + col0 FROM tab2
----
1735
1742
2511

query I rowsort
SELECT tab1.col1 * - ( + 85 ) AS col0 FROM tab1
----
-1105
-2210
-850

query I rowsort
SELECT DISTINCT - tab0.col2 * 70 + + 2 AS col0 FROM tab0
----
-2308
-5738
-68

query I rowsort
SELECT - col2 + + 55 FROM tab1
----
-2
-41
1

query I rowsort
SELECT DISTINCT col2 * ( + 38 ) + col2 FROM tab0
----
1287
3198
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 3 + tab1.col0 col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 145b2664099de330bd73aca5dfd63b00

query I rowsort
SELECT + col1 * cor0.col2 - ( + col2 * col2 + - col1 ) AS col0 FROM tab1 AS cor0
----
-1486
-2669
-7955

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 52 col1 FROM tab2 AS cor0
----
52
52
52

query I rowsort
SELECT ALL - - cor0.col1 * - cor0.col2 + - col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT ALL - - 44 * cor0.col0 AS col1 FROM tab1 AS cor0
----
132
2816
3520

query I rowsort
SELECT DISTINCT + 55 AS col0 FROM tab1 AS cor0
----
55

query I rowsort
SELECT + - col1 - + cor0.col1 AS col0 FROM tab1 AS cor0
----
-20
-26
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-3406
SELECT + cor0.col0 * + col0 + 75 - - cor0.col0 DIV + col2 AS col1 FROM tab0 AS cor0
----
1335
651
7997

skipif mysql # not compatible
query I rowsort label-3406
SELECT + cor0.col0 * + col0 + 75 - - cor0.col0 / + col2 AS col1 FROM tab0 AS cor0
----
1335
651
7997

query I rowsort
SELECT - - cor0.col0 * col0 + - ( - cor0.col1 + + col2 * col0 ) FROM tab0 AS cor0
----
-130
1287
714

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( tab2.col0 ) - col1 col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT + 16 - tab0.col0 FROM tab0
----
-19
-73
-8

query I rowsort
SELECT DISTINCT + 63 + col2 AS col2 FROM tab0 AS cor0
----
145
64
96

query I rowsort
SELECT ALL - col1 * tab0.col0 * col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT - ( + col0 ) + + 26 FROM tab1
----
-38
-54
23

query I rowsort
SELECT 94 + + col1 AS col2 FROM tab2
----
111
125
153

onlyif mysql # use DIV operator for integer division
query I rowsort label-3414
SELECT DISTINCT ( - col1 ) DIV - col2 AS col1 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-3414
SELECT DISTINCT ( - col1 ) / - col2 AS col1 FROM tab0
----
1
2
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + ( + 69 ) * cor0.col2 col2 FROM tab0 AS cor0
----
104
2301
5747

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + col1 * + ( + col0 ) col2 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL + cor0.col0 * - col2 + - col2 * col2 AS col0 FROM tab0 cor0
----
-14022
-1881
-36

query I rowsort
SELECT ALL + col0 * + col1 * + 46 + col0 AS col1 FROM tab2 AS cor0
----
211770
61857
9989

onlyif mysql # use DIV operator for integer division
query I rowsort label-3419
SELECT ALL + - col1 * - col1 + - cor0.col0 - col0 DIV + col0 AS col1 FROM tab1 AS cor0
----
35
672
88

skipif mysql # not compatible
query I rowsort label-3419
SELECT ALL + - col1 * - col1 + - cor0.col0 - col0 / + col0 AS col1 FROM tab1 AS cor0
----
35
672
88

query I rowsort
SELECT DISTINCT cor0.col2 + col2 * col0 AS col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL - + col2 * - ( ( cor0.col1 ) ) AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL col2 * col0 * ( + col1 + 94 ) FROM tab1 AS cor0
----
19440
379392
821760

query I rowsort
SELECT col2 * - col0 + 98 FROM tab0 AS cor0
----
-694
-7200
63

query I rowsort
SELECT - - col0 - + 76 AS col0 FROM tab2 AS cor0
----
-69
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * - 31 + col1 col2 FROM tab0 AS cor0
----
1182
2850
830

query I rowsort
SELECT DISTINCT col0 - - ( - col2 ) FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL - cor0.col1 * ( - col2 ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT col1 * ( 64 ) * - col2 + col2 FROM tab0 AS cor0
----
-181599
-477486
-6207

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + cor0.col1 * CAST ( - ( cor0.col1 ) + 57 AS REAL ) FROM tab0 AS cor0
----
-2494
-3094
-3880

query I rowsort
SELECT col1 * - col0 + + ( + col2 ) AS col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT - col2 - 14 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-1118
-1144
-125

query I rowsort
SELECT DISTINCT col0 + ( 5 ) AS col1 FROM tab0 AS cor0
----
29
40
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-3433
SELECT - 7 DIV - col1 + + col2 AS col0 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-3433
SELECT - 7 / - col1 + + col2 AS col0 FROM tab1
----
54
57
96

query I rowsort
SELECT + cor0.col2 * col0 * col2 AS col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT - col2 - + ( + tab1.col2 ) * + 98 AS col0 FROM tab1
----
-5346
-5643
-9504

query I rowsort
SELECT DISTINCT + - ( col1 ) + col1 * - 45 FROM tab2 AS cor0
----
-1426
-2714
-782

onlyif mysql # use DIV operator for integer division
query I rowsort label-3437
SELECT DISTINCT col1 DIV + cor0.col1 col1 FROM tab2 cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3437
SELECT DISTINCT col1 / + cor0.col1 col1 FROM tab2 cor0
----
1

query I rowsort
SELECT - + 94 * - 96 + col0 AS col1 FROM tab0 AS cor0
----
9048
9059
9113

query I rowsort
SELECT DISTINCT - - col2 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT col1 * + col0 + col1 FROM tab2 cor0
----
1360
248
4661

query I rowsort
SELECT ALL col0 * + 81 AS col0 FROM tab2 AS cor0
----
567
6318
6399

query I rowsort
SELECT + ( cor0.col0 ) + col0 FROM tab2 AS cor0
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-3443
SELECT - + cor0.col2 DIV + col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3443
SELECT - + cor0.col2 / + col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + col1 + 44 * col2 * - col0 AS col2 FROM tab0 AS cor0
----
-1443
-321021
-34762

query I rowsort
SELECT ALL + - col1 + + col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + ( + col2 ) AS col0 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT 90 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
90

query I rowsort
SELECT ALL - col1 + - col1 * 91 AS col0 FROM tab2 AS cor0
----
-1564
-2852
-5428

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col2 - + col1 col2 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT + ( col1 ) AS col0 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT ALL 15 * + 51 AS col2 FROM tab2
----
765
765
765

query I rowsort
SELECT ALL + col1 + + cor0.col2 * col2 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT + + col1 + - col2 * col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT + col1 + col2 + col0 AS col2 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT ALL - 10 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
170
310
590

query I rowsort
SELECT ALL - tab1.col2 * + col1 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - tab0.col2 + col2 * 97 FROM tab0
----
3168
7872
96

query I rowsort
SELECT DISTINCT col0 * col0 + col2 + - 83 FROM tab1
----
-20
4070
6413

onlyif mysql # use DIV operator for integer division
query I rowsort label-3459
SELECT DISTINCT - col2 DIV cor0.col0 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
-10
-14
-44

skipif mysql # not compatible
query I rowsort label-3459
SELECT DISTINCT - col2 / cor0.col0 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
-10
-14
-44

query I rowsort
SELECT ALL ( + col1 ) * col1 AS col1 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT ALL + col0 * col0 + col2 * + 37 FROM tab0 AS cor0
----
10955
1262
1797

query I rowsort
SELECT DISTINCT col0 * cor0.col2 - + col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT DISTINCT col1 * col1 - col2 FROM tab0 cor0
----
7363
8199
9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 29 * col2 col1 FROM tab0 cor0
----
-2378
-29
-957

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3465
SELECT ALL + ( - cor0.col0 ) * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3465
SELECT ALL + ( - cor0.col0 ) * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - 26 ) FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 47d0574274146de273829785364ada39

query I rowsort
SELECT ALL + col2 - 65 * col1 AS col0 FROM tab1 AS cor0
----
-1636
-593
-749

query I rowsort
SELECT DISTINCT - col1 * col2 + + 42 * - col1 FROM tab1 AS cor0
----
-1794
-2496
-990

query I rowsort
SELECT ALL + + col1 * + col2 + col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT - - cor0.col0 AS col0 FROM tab2, tab0, tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3471
SELECT DISTINCT col2 - CAST( NULL AS SIGNED ) * - 6 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3471
SELECT DISTINCT col2 - CAST ( NULL AS INTEGER ) * - 6 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - cor0.col0 * + col0 * 11 + + col0 AS col2 FROM tab1 AS cor0
----
-44992
-70320
-96

query I rowsort
SELECT DISTINCT - col2 - + ( 14 ) * + col0 * - col1 AS col0 FROM tab0 cor0
----
113304
28863
47529

query I rowsort
SELECT col0 * + 50 AS col0 FROM tab0 AS cor0
----
1200
1750
4450

query I rowsort
SELECT 60 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT DISTINCT col0 * 22 FROM tab1
----
1408
1760
66

query I rowsort
SELECT - - col2 + - col0 + + col2 FROM tab2 AS cor0
----
-26
-3
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-3478
SELECT - cor0.col1 * + col0 DIV col0 + + col2 * + cor0.col1 + - col0 * + col2 AS col0 FROM tab2 AS cor0
----
-2373
-553
617

skipif mysql # not compatible
query I rowsort label-3478
SELECT - cor0.col1 * + col0 / col0 + + col2 * + cor0.col1 + - col0 * + col2 AS col0 FROM tab2 AS cor0
----
-2373
-553
617

query I rowsort
SELECT + col2 * - ( cor0.col1 ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT 5 * - cor0.col2 FROM tab1 cor0
----
-270
-285
-480

query I rowsort
SELECT DISTINCT + col1 * ( col1 ) FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab2, tab1 cor0
----
9 values hashing to 1a063bfb694f348122cd0739295ca641

query I rowsort
SELECT - + 0 * + ( col0 ) FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col2 col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL + cor0.col2 * col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT + col1 * cor0.col0 + - col1 * - col0 + col0 FROM tab1 AS cor0
----
1344
159
2160

query I rowsort
SELECT - col2 + - col2 * 32 FROM tab1 AS cor0
----
-1782
-1881
-3168

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3489
SELECT - - cor0.col1 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3489
SELECT - - cor0.col1 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3490
SELECT + + col2 DIV col1 + ( col0 * + col2 ) + + col0 AS col2 FROM tab2 AS cor0
----
196
2106
3083

skipif mysql # not compatible
query I rowsort label-3490
SELECT + + col2 / col1 + ( col0 * + col2 ) + + col0 AS col2 FROM tab2 AS cor0
----
196
2106
3083

query I rowsort
SELECT col0 * - 14 AS col0 FROM tab1 cor0
----
-1120
-42
-896

query I rowsort
SELECT - cor0.col0 * col1 + cor0.col1 + - col2 AS col2 FROM tab1 AS cor0
----
-106
-1123
-687

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3493
SELECT - col1 + + CAST( col2 AS SIGNED ) * col2 AS col0 FROM tab2 AS cor0
----
1427
617
698

skipif mysql # not compatible
query I rowsort label-3493
SELECT - col1 + + CAST ( col2 AS INTEGER ) * col2 AS col0 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT - col2 * + 58 AS col1 FROM tab2 AS cor0
----
-1508
-1566
-2204

query I rowsort
SELECT DISTINCT 50 * - col2 AS col2 FROM tab0
----
-1650
-4100
-50

query I rowsort
SELECT col2 * - col0 + 82 * col0 FROM tab2
----
3476
385
4368

query I rowsort
SELECT DISTINCT 53 * - col2 AS col0 FROM tab1
----
-2862
-3021
-5088

query I rowsort
SELECT + col2 * + col1 + + tab0.col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT ALL 59 AS col1 FROM tab2
----
59
59
59

query I rowsort
SELECT ALL 92 * - tab1.col2 - + tab1.col2 FROM tab1
----
-5022
-5301
-8928

query I rowsort
SELECT ALL ( ( + col1 ) ) - + col1 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT tab1.col0 * - ( + col0 ) AS col1 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT 90 + - col0 - col2 * + col1 FROM tab2
----
-1522
-635
-754

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3504
SELECT ALL - CAST( NULL AS SIGNED ) * + ( col1 ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3504
SELECT ALL - CAST ( NULL AS INTEGER ) * + ( col1 ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 50 AS col0 FROM tab0 cor0
----
50
50
50

query I rowsort
SELECT DISTINCT col2 + - 35 * col0 * col1 AS col1 FROM tab2 AS cor0
----
-161044
-46967
-7568

query I rowsort
SELECT + 89 + - col2 + + col0 FROM tab2 AS cor0
----
130
141
69

query I rowsort
SELECT 87 * ( + col1 ) AS col2 FROM tab1 AS cor0
----
1131
2262
870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT cor0.col1 + cor0.col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0a66faf44289070d88fd26bbc9bf34e3

query I rowsort
SELECT + + col0 * col0 + col0 * - col2 + col0 AS col1 FROM tab2 AS cor0
----
-133
3318
4134

query I rowsort
SELECT ALL col0 + cor0.col1 AS col2 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT 18 + col1 * col1 AS col0 FROM tab1 AS cor0
----
118
187
694

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 41 + col0 * + col1 * - col1 col0 FROM tab0 AS cor0
----
-177463
-329274
-736968

query I rowsort
SELECT ALL + ( cor0.col1 ) * - col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + ( + ( col1 ) * col0 ) AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - 77 + col0 FROM tab0 AS cor0
----
-42
-53
12

query I rowsort
SELECT + + col1 * - cor0.col0 + col0 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + col2 * - col0 + + col2 * + col2 + - col2 AS col2 FROM tab2 cor0
----
-1378
-1596
513

query I rowsort
SELECT ALL + col2 * tab0.col1 * col1 AS col1 FROM tab0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-3521
SELECT - col1 DIV - 35 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3521
SELECT - col1 / - 35 AS col0 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3522
SELECT ALL + ( col1 ) DIV col1 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3522
SELECT ALL + ( col1 ) / col1 FROM tab1
----
1
1
1

query I rowsort
SELECT 35 * + col2 * tab1.col1 FROM tab1
----
19950
43680
49140

query I rowsort
SELECT - col2 * - 89 FROM tab1
----
4806
5073
8544

onlyif mysql # use DIV operator for integer division
query I rowsort label-3525
SELECT ALL + ( + 70 ) DIV - col0 FROM tab1
----
-1
-23
0

skipif mysql # not compatible
query I rowsort label-3525
SELECT ALL + ( + 70 ) / - col0 FROM tab1
----
-1
-23
0

query I rowsort
SELECT ALL - + col0 * cor0.col0 + col0 * - col0 - col0 FROM tab1 AS cor0
----
-12880
-21
-8256

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + cor0.col1 * - ( col2 ) col1 FROM tab0 AS cor0
----
-611884
-93654
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3528
SELECT - - col0 DIV cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3528
SELECT - - col0 / cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * 40 AS col0 FROM tab1 AS cor0
----
-1040
-400
-520

query I rowsort
SELECT ALL + - col0 * ( 56 ) + - col1 + col2 FROM tab2 AS cor0
----
-396
-4401
-4403

query I rowsort
SELECT ALL + cor0.col0 * - 60 FROM tab0 cor0
----
-1440
-2100
-5340

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 - + col0 col1 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT col2 * col2 + tab2.col1 * col2 FROM tab2
----
1566
2090
2210

query I rowsort
SELECT DISTINCT - col2 * - col1 + - col0 AS col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT tab0.col1 * col1 + col2 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT - col1 FROM tab2 WHERE NOT ( NULL ) BETWEEN ( col2 * + col2 ) AND col2 + - col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col0 FROM tab1 WHERE NOT NULL IN ( col1 * - col0 )
----

query I rowsort
SELECT + tab0.col0 + col1 * - col1 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT col0 + col0 * - col0 FROM tab0
----
-1190
-552
-7832

query I rowsort
SELECT ALL + col0 * cor0.col0 * col1 + cor0.col1 * + col2 AS col0 FROM tab0 cor0
----
118922
52374
728273

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - cor0.col0 - col2 col0 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT ALL - col1 + cor0.col2 * - col0 AS col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT + col1 + - col1 * col0 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL col0 * - col1 + - col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT col2 - - col2 FROM tab1 AS cor0 WHERE NOT col1 + col0 > NULL OR ( NULL ) IN ( + col1 * col1 )
----

query I rowsort
SELECT + col1 - + tab2.col0 FROM tab2
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-3547
SELECT 9 + - col1 DIV col1 + - col1 * cor0.col1 FROM tab1 AS cor0
----
-161
-668
-92

skipif mysql # not compatible
query I rowsort label-3547
SELECT 9 + - col1 / col1 + - col1 * cor0.col1 FROM tab1 AS cor0
----
-161
-668
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-3548
SELECT - col2 DIV col1 + col0 * - col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-3548
SELECT - col2 / col1 + col0 * - col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + + cor0.col1 - col0 FROM tab0 cor0
----
2
62

query I rowsort
SELECT ALL - + col2 - + col1 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * + col2 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT col2 * - col1 + col0 + - col2 * col1 * col0 FROM tab0 AS cor0
----
-3457
-671491
-70926

query I rowsort
SELECT + col2 + col1 * + col0 * col1 + + col1 AS col1 FROM tab2 cor0
----
22886
271603
6785

onlyif mysql # use DIV operator for integer division
query I rowsort label-3554
SELECT ALL - + cor0.col0 * col2 DIV - col1 AS col2 FROM tab1 AS cor0
----
364
590
6

skipif mysql # not compatible
query I rowsort label-3554
SELECT ALL - + cor0.col0 * col2 / - col1 AS col2 FROM tab1 AS cor0
----
364
590
6

query I rowsort
SELECT ALL - col2 * col0 + + ( - cor0.col0 * + col2 ) AS col0 FROM tab2 AS cor0
----
-378
-4056
-6004

onlyif mysql # use DIV operator for integer division
query I rowsort label-3556
SELECT - cor0.col1 * col1 DIV + col0 AS col1 FROM tab1 AS cor0
----
-1
-2
-225

skipif mysql # not compatible
query I rowsort label-3556
SELECT - cor0.col1 * col1 / + col0 AS col1 FROM tab1 AS cor0
----
-1
-2
-225

query I rowsort
SELECT DISTINCT - + 35 AS col2 FROM tab0 AS cor0
----
-35

query I rowsort
SELECT + col2 + - cor0.col1 * col1 AS col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT ALL 96 * col0 AS col0 FROM tab0 AS cor0
----
2304
3360
8544

query I rowsort
SELECT - - 87 + + col0 FROM tab2 AS cor0
----
165
166
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-3561
SELECT ALL + cor0.col1 DIV cor0.col0 AS col1 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-3561
SELECT ALL + cor0.col1 / cor0.col0 AS col1 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT - col2 * col2 + + ( - ( col2 ) ) FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT 78 * + col0 FROM tab1 cor0
----
234
4992
6240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 66 * col2 col0 FROM tab2
----
1716
1782
2508

query I rowsort
SELECT ALL + ( 69 ) AS col0 FROM tab0 AS cor0
----
69
69
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-3566
SELECT DISTINCT - + 52 DIV col1 + - col2 * + col2 AS col0 FROM tab2 AS cor0
----
-1447
-676
-730

skipif mysql # not compatible
query I rowsort label-3566
SELECT DISTINCT - + 52 / col1 + - col2 * + col2 AS col0 FROM tab2 AS cor0
----
-1447
-676
-730

query I rowsort
SELECT DISTINCT - 63 + 23 * col2 AS col2 FROM tab0 AS cor0
----
-40
1823
696

query I rowsort
SELECT ALL - col0 * + col2 + + col1 AS col1 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT + ( 81 ) * - col1 AS col2 FROM tab1
----
-1053
-2106
-810

query I rowsort
SELECT - col0 * - tab2.col2 + + tab2.col2 * col1 * + ( col0 ) AS col2 FROM tab2
----
121680
54036
6048

query I rowsort
SELECT + col1 + 28 FROM tab1
----
38
41
54

query I rowsort
SELECT + 91 + + col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
1131
169
731

query I rowsort
SELECT DISTINCT + - ( + 78 ) * col0 AS col2 FROM tab0 cor0
----
-1872
-2730
-6942

query I rowsort
SELECT DISTINCT cor0.col0 + 79 + + col2 FROM tab2 AS cor0
----
113
183
196

query I rowsort
SELECT ALL + col1 * col0 + - col1 * ( + col2 ) FROM tab1 AS cor0
----
-1326
-208
70

query I rowsort
SELECT DISTINCT + + cor0.col2 * - 48 + - col2 + col0 FROM tab0 AS cor0
----
-14
-1593
-3929

query I rowsort
SELECT DISTINCT - ( 10 ) FROM tab2, tab1 AS cor0
----
-10

query I rowsort
SELECT - 56 * cor0.col1 + - col1 FROM tab2 AS cor0
----
-1767
-3363
-969

query I rowsort
SELECT ALL - ( - 22 ) FROM tab2
----
22
22
22

onlyif mysql # use DIV operator for integer division
query I rowsort label-3580
SELECT DISTINCT - 75 DIV + 77 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3580
SELECT DISTINCT - 75 / + 77 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL + + ( col1 ) + + col0 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - col2 * col1 + 26 * col1 FROM tab0
----
-5096
-602
2425

query I rowsort
SELECT ( + col0 ) + col0 * - 63 AS col0 FROM tab2 cor0
----
-434
-4836
-4898

query I rowsort
SELECT - col0 * col2 + + col0 * col1 + + col1 AS col1 FROM tab0 AS cor0
----
1358
3457
892

query I rowsort
SELECT ALL col0 * 91 FROM tab1
----
273
5824
7280

query I rowsort
SELECT DISTINCT col2 + ( + 99 * + col0 ) FROM tab0
----
2409
3466
8893

onlyif mysql # use DIV operator for integer division
query I rowsort label-3587
SELECT - col0 DIV - 93 col1 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3587
SELECT - col0 / - 93 col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3588
SELECT DISTINCT + tab0.col0 DIV 21 + col1 col1 FROM tab0
----
87
95
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3588
SELECT DISTINCT + tab0.col0 / 21 + col1 col1 FROM tab0
----
87
95
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3589
SELECT - + col1 DIV ( + 45 ) FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3589
SELECT - + col1 / ( + 45 ) FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL col1 + - col0 * - 81 FROM tab0 cor0
----
2030
2932
7300

query I rowsort
SELECT + + col1 * - col2 * col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT + ( - 47 ) + + cor0.col1 * ( col1 ) * col0 FROM tab2 AS cor0
----
22784
271471
6680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3593
SELECT + - 11 * - col1 + col0 * CAST( - 66 AS SIGNED ) FROM tab2 AS cor0
----
-121
-4499
-5027

skipif mysql # not compatible
query I rowsort label-3593
SELECT + - 11 * - col1 + col0 * CAST ( - 66 AS INTEGER ) FROM tab2 AS cor0
----
-121
-4499
-5027

query I rowsort
SELECT + ( col0 ) - - col0 * - 86 AS col1 FROM tab2 AS cor0
----
-595
-6630
-6715

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 44 * ( - cor0.col1 ) + col0 col1 FROM tab2 AS cor0
----
1371
2674
827

query I rowsort
SELECT + 34 * - col0 * col0 AS col2 FROM tab1 AS cor0
----
-139264
-217600
-306

query I rowsort
SELECT col2 + col0 * - 42 AS col1 FROM tab2
----
-267
-3250
-3280

onlyif mysql # use DIV operator for integer division
query I rowsort label-3598
SELECT col2 DIV + 1 AS col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-3598
SELECT col2 / + 1 AS col0 FROM tab2
----
26
27
38

query I rowsort
SELECT col1 * col0 + col0 + + col1 FROM tab1
----
107
1133
714

query I rowsort
SELECT col1 + 82 AS col0 FROM tab1
----
108
92
95

query I rowsort
SELECT + + col1 + col2 * col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT - col0 * + ( col1 + col0 ) FROM tab2 AS cor0
----
-10686
-266
-7584

query I rowsort
SELECT ALL - tab1.col1 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT DISTINCT - ( + col2 ) * - col1 + 62 * col2 AS col1 FROM tab0 AS cor0
----
12546
159
4884

query I rowsort
SELECT ALL + 21 * col0 + col2 FROM tab1 AS cor0
----
117
1401
1776

onlyif mysql # use DIV operator for integer division
query I rowsort label-3606
SELECT ALL cor0.col2 DIV ( col2 + col1 ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3606
SELECT ALL cor0.col2 / ( col2 + col1 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 + 8 FROM tab1 AS cor0
----
-18
-2
-5

query I rowsort
SELECT ALL + 35 * - col2 - + col2 AS col2 FROM tab1 AS cor0
----
-1944
-2052
-3456

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor1.col0 col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT ALL + ( 71 ) AS col0 FROM tab0 cor0
----
71
71
71

query I rowsort
SELECT 7 * - col2 + - col2 FROM tab0 AS cor0
----
-264
-656
-8

query I rowsort
SELECT ALL tab1.col1 * + col0 * 70 + - 36 AS col0 FROM tab1
----
44764
5424
72764

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 4 + - cor0.col2 * + cor0.col0 col1 FROM tab1 AS cor0
----
-158
-3644
-7676

query I rowsort
SELECT 69 + - cor0.col0 + - col2 FROM tab2 AS cor0
----
-35
-48
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( col1 ) col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + col0 * + col2 + col0 - col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL col1 * + col2 * + col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT col1 + 74 AS col1 FROM tab1 cor0
----
100
84
87

query I rowsort
SELECT ALL + cor0.col1 * + col2 - + cor0.col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT + col2 * ( col2 * + col2 ) AS col2 FROM tab2 AS cor0
----
17576
19683
54872

onlyif mysql # use DIV operator for integer division
query I rowsort label-3621
SELECT ALL + col0 DIV + col1 AS col0 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-3621
SELECT ALL + col0 / + col1 AS col0 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT DISTINCT - cor0.col2 + + 83 AS col1 FROM tab2 AS cor0
----
45
56
57

query I rowsort
SELECT ALL - col2 * tab0.col1 AS col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL tab2.col0 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT - tab0.col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT ALL - col0 * + ( - 92 ) AS col1 FROM tab0 AS cor0
----
2208
3220
8188

query I rowsort
SELECT - 40 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 01aad4539198a6509248e086869f90a6

query I rowsort
SELECT - - col1 + 32 AS col1 FROM tab1 AS cor0
----
42
45
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - ( col1 ) * col1 col2 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT ALL 80 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT ALL + - col0 + col1 * - col1 AS col0 FROM tab1 AS cor0
----
-164
-249
-679

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 54 col1 FROM tab0 AS cor0
----
-35
19
30

query I rowsort
SELECT - - col1 + - 95 FROM tab2 AS cor0
----
-36
-64
-78

query I rowsort
SELECT DISTINCT - - col0 * 69 FROM tab0 AS cor0
----
1656
2415
6141

onlyif mysql # use DIV operator for integer division
query I rowsort label-3635
SELECT ALL + col0 * + col2 + col2 + - col2 DIV - col0 AS col2 FROM tab1 AS cor0
----
234
3705
7777

skipif mysql # not compatible
query I rowsort label-3635
SELECT ALL + col0 * + col2 + col2 + - col2 / - col0 AS col2 FROM tab1 AS cor0
----
234
3705
7777

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col0 + col2 * col0 * col2 col1 FROM tab2 AS cor0
----
120317
5152
58812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 7 col0 FROM tab2 cor0
----
182
189
266

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - 53 - col0 * col0 col0 FROM tab0
----
-12267
-1278
-2325

query I rowsort
SELECT DISTINCT col2 * - ( - 20 + col1 * + ( + 58 ) ) FROM tab0
----
-163944
-431156
-5606

query I rowsort
SELECT DISTINCT - 62 * - col1 + + col1 AS col0 FROM tab1 AS cor0
----
1638
630
819

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 79 col2 FROM tab0 cor0
----
-79
-79
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * ( col2 ) * + col0 col0 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT col0 * 31 * 52 + col1 FROM tab0
----
143559
38774
56517

onlyif mysql # use DIV operator for integer division
query I rowsort label-3644
SELECT + col1 + - tab0.col0 DIV tab0.col0 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-3644
SELECT + col1 + - tab0.col0 / tab0.col0 FROM tab0
----
85
90
96

query I rowsort
SELECT DISTINCT - 56 + col1 * - col1 * col0 FROM tab2 AS cor0
----
-22887
-271574
-6783

query I rowsort
SELECT + + col2 + col2 * cor0.col0 - - ( - col2 ) AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - cor0.col2 * + cor0.col2 * ( + col0 * - col2 ) - + 3 FROM tab0 AS cor0
----
32
49071749
862485

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 + col0 * col1 col1 FROM tab1 AS cor0
----
1027
52
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-3649
SELECT - 73 * col2 DIV col0 + + col2 * + cor0.col1 * - cor0.col0 FROM tab2 AS cor0
----
-119676
-51069
-6140

skipif mysql # not compatible
query I rowsort label-3649
SELECT - 73 * col2 / col0 + + col2 * + cor0.col1 * - cor0.col0 FROM tab2 AS cor0
----
-119676
-51069
-6140

query I rowsort
SELECT ALL - + 10 + + cor0.col1 FROM tab1 AS cor0
----
0
16
3

query I rowsort
SELECT DISTINCT - + 76 * + col1 AS col2 FROM tab0 cor0
----
-6536
-6916
-7372

query I rowsort
SELECT DISTINCT 54 + col1 + - 45 * + cor0.col0 FROM tab2 AS cor0
----
-230
-3397
-3484

query I rowsort
SELECT DISTINCT - 40 + + col1 * col2 - - col1 * + col1 FROM tab2 AS cor0
----
1758
4975
895

query I rowsort
SELECT col1 * col2 - ( - col2 ) * col0 AS col1 FROM tab1 cor0
----
1566
4218
8928

query I rowsort
SELECT DISTINCT - 39 * + cor0.col2 + col1 + cor0.col2 FROM tab1 AS cor0
----
-2026
-2156
-3635

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + + col1 * 9 col0 FROM tab0 cor0
----
860
910
970

query I rowsort
SELECT DISTINCT - 3 - - col1 AS col2 FROM tab2 AS cor0
----
14
28
56

query I rowsort
SELECT + - 78 * col1 * - col1 + col0 FROM tab1 AS cor0
----
13262
52731
7864

query I rowsort
SELECT DISTINCT col1 + - cor0.col2 * + 26 * col1 AS col0 FROM tab2 AS cor0
----
-16779
-21731
-39825

onlyif mysql # use DIV operator for integer division
query I rowsort label-3660
SELECT ALL + tab0.col0 DIV col0 - col2 AS col2 FROM tab0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-3660
SELECT ALL + tab0.col0 / col0 - col2 AS col2 FROM tab0
----
-32
-81
0

query I rowsort
SELECT - 23 * col2 * + col2 FROM tab1
----
-211968
-67068
-74727

query I rowsort
SELECT - 20 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to f1cccb95c90889319e7a51e4ae9475bb

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 22 col2 FROM tab0
----
-22
-22
-22

query I rowsort
SELECT - 88 * col1 * - 47 + 97 AS col0 FROM tab0 AS cor0
----
355793
376473
401289

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3665
SELECT ALL - col2 * col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3665
SELECT ALL - col2 * col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 + col1 col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT - tab1.col0 * ( col1 ) AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL + ( + 4 ) * - col2 AS col2 FROM tab0
----
-132
-328
-4

query I rowsort
SELECT - 3 FROM tab0, tab1 AS cor0
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

query I rowsort
SELECT - - ( + col0 ) + col1 + col0 FROM tab2 AS cor0
----
175
215
45

query I rowsort
SELECT ALL - - ( - col2 ) * col1 * + col2 AS col2 FROM tab0 AS cor0
----
-611884
-93654
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - 33 + col0 ) * col1 col2 FROM tab0
----
-194
-5096
774

query I rowsort
SELECT ALL 7 * + col0 AS col0 FROM tab0 AS cor0
----
168
245
623

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + col0 col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT + 79 + + col2 * ( + 53 ) FROM tab1 AS cor0
----
2941
3100
5167

query I rowsort
SELECT + 10 * cor0.col0 + + col1 * - col2 * + col2 AS col2 FROM tab0 cor0
----
-610994
-93414
253

query I rowsort
SELECT 85 + col0 AS col0 FROM tab2
----
163
164
92

query I rowsort
SELECT - col2 + 0 AS col1 FROM tab1
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3679
SELECT col2 + col1 * + CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
-7363
-8199
-9408

skipif mysql # not compatible
query I rowsort label-3679
SELECT col2 + col1 * + CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT col2 + - cor0.col1 AS col0 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + cor0.col1 * col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL - col1 * - 30 * cor0.col1 FROM tab0 AS cor0
----
221880
248430
282270

query I rowsort
SELECT - + col0 * ( col1 ) + cor0.col1 AS col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT - - col1 + - ( 95 ) * col0 FROM tab2 AS cor0
----
-634
-7351
-7488

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT + col0 + - ( col0 ) AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 + - col2 * col2 AS col0 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT + col0 - 35 FROM tab0 AS cor0
----
-11
0
54

query I rowsort
SELECT ALL - cor0.col0 * - 5 AS col0 FROM tab2 cor0
----
35
390
395

onlyif mysql # use DIV operator for integer division
query I rowsort label-3690
SELECT + + col0 DIV col0 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3690
SELECT + + col0 / col0 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 77 col0 FROM tab2 AS cor0
----
-2002
-2079
-2926

query I rowsort
SELECT + 82 * + col1 + - col0 FROM tab1 AS cor0
----
2129
756
986

query I rowsort
SELECT - - 19 * col1 + + col2 + + 1 * - ( - col1 ) FROM tab0 AS cor0
----
1753
1902
1941

query I rowsort
SELECT col1 * - tab1.col0 + - col0 + - col0 * + 21 FROM tab1
----
-144
-2048
-2800

query I rowsort
SELECT - - ( - cor0.col2 ) * col1 + col2 + col0 FROM tab1 AS cor0
----
-1072
-1347
-449

query I rowsort
SELECT ALL col2 + + 68 * col2 * - col0 FROM tab2
----
-12825
-137878
-204098

onlyif mysql # use DIV operator for integer division
query I rowsort label-3697
SELECT DISTINCT - 44 DIV 34 col1 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab2 AS cor2
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3697
SELECT DISTINCT - 44 / 34 col1 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab2 AS cor2
----
-1

query I rowsort
SELECT + cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL - col0 + - col1 * - col2 + - col1 * - ( 32 ) * col2 FROM tab2
----
21239
27614
50544

query I rowsort
SELECT - 11 + + 50 FROM tab2 AS cor0
----
39
39
39

query I rowsort
SELECT - col1 + col2 + - cor0.col0 FROM tab1 AS cor0
----
-17
25
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3702
SELECT + 55 DIV col0 + - cor0.col1 col1 FROM tab2 AS cor0
----
-17
-24
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3702
SELECT + 55 / col0 + - cor0.col1 col1 FROM tab2 AS cor0
----
-17
-24
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 * + 39 col0 FROM tab2
----
273
3042
3081

query I rowsort
SELECT ALL - col2 + - 63 FROM tab0
----
-145
-64
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3705
SELECT - col1 DIV ( - 98 ) FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3705
SELECT - col1 / ( - 98 ) FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3706
SELECT + 88 + col0 DIV col1 AS col2 FROM tab1 AS cor0
----
88
94
94

skipif mysql # not compatible
query I rowsort label-3706
SELECT + 88 + col0 / col1 AS col2 FROM tab1 AS cor0
----
88
94
94

query I rowsort
SELECT + ( + col0 ) * - cor0.col2 + - 35 + + cor0.col1 AS col2 FROM tab2 AS cor0
----
-193
-2004
-3020

query I rowsort
SELECT + - col2 * - col0 + - col1 + + cor0.col0 * col0 AS col1 FROM tab2 AS cor0
----
207
8053
9226

query I rowsort
SELECT col2 + - col2 * - 29 FROM tab0 cor0
----
2460
30
990

onlyif mysql # use DIV operator for integer division
query I rowsort label-3710
SELECT ALL - + col1 DIV + col0 + + CAST( 47 AS SIGNED ) AS col2 FROM tab0 cor0
----
44
45
46

skipif mysql # not compatible
query I rowsort label-3710
SELECT ALL - + col1 / + col0 + + CAST ( 47 AS INTEGER ) AS col2 FROM tab0 cor0
----
44
45
46

query I rowsort
SELECT ALL 68 + col0 * - col0 AS col0 FROM tab1 AS cor0
----
-4028
-6332
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3712
SELECT + ( col1 ) + + col2 DIV col2 AS col0 FROM tab0 cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-3712
SELECT + ( col1 ) + + col2 / col2 AS col0 FROM tab0 cor0
----
87
92
98

query I rowsort
SELECT DISTINCT - 90 + col2 * col1 + + 19 * col0 FROM tab1 AS cor0
----
1371
1696
2678

query I rowsort
SELECT 45 AS col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3715
SELECT + CAST( NULL AS SIGNED ) AS col1 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3715
SELECT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT - ( col2 ) + + col1 + col0 AS col2 FROM tab0 AS cor0
----
131
77
98

query I rowsort
SELECT - + 33 + cor0.col2 AS col2 FROM tab1 AS cor0
----
21
24
63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3718
SELECT ALL + col2 * CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3718
SELECT ALL + col2 * CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3719
SELECT - col1 / CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3719
SELECT - col1 / CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3720
SELECT cor0.col1 DIV ( + col2 ) + col1 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-3720
SELECT cor0.col1 / ( + col2 ) + col1 FROM tab0 AS cor0
----
194
88
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-3721
SELECT - cor0.col2 + 3 DIV - col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-3721
SELECT - cor0.col2 + 3 / - col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - + cor0.col1 FROM tab0, tab1, tab2 cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT ALL + col2 + + col1 - col1 * col0 * 51 FROM tab0
----
-105145
-173047
-412876

query I rowsort
SELECT - ( cor0.col0 ) * - col2 + ( + 96 ) FROM tab2 cor0
----
2124
285
3098

query I rowsort
SELECT ALL - - 58 * + col0 AS col1 FROM tab0 AS cor0
----
1392
2030
5162

query I rowsort
SELECT + 19 + col2 FROM tab1 cor0
----
115
73
76

query I rowsort
SELECT DISTINCT col0 * - 3 FROM tab0 AS cor0
----
-105
-267
-72

query I rowsort
SELECT - cor0.col0 * - col1 + + cor0.col1 * 31 AS col2 FROM tab0 AS cor0
----
10920
4730
6402

query I rowsort
SELECT - col0 * col1 * - col1 + col1 FROM tab2 AS cor0
----
22848
271577
6758

query I rowsort
SELECT - 29 * col1 FROM tab0 AS cor0
----
-2494
-2639
-2813

query I rowsort
SELECT - col2 * - ( + col1 ) + col2 * - col2 AS col2 FROM tab1 cor0
----
-1512
-2679
-7968

query I rowsort
SELECT DISTINCT + 25 * col0 + col0 AS col2 FROM tab0 AS cor0
----
2314
624
910

query I rowsort
SELECT DISTINCT ( 49 ) * - col2 + + 48 FROM tab0 cor0
----
-1
-1569
-3970

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3734
SELECT ALL + + CAST( NULL AS SIGNED ) * + col2 * col2 AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3734
SELECT ALL + + CAST ( NULL AS INTEGER ) * + col2 * col2 AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 5 + - col2 AS col1 FROM tab0 AS cor0
----
-28
-77
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * 61 col0 FROM tab1 AS cor0
----
-1586
-610
-793

query I rowsort
SELECT DISTINCT + 18 * - col2 AS col0 FROM tab2 AS cor0
----
-468
-486
-684

query I rowsort
SELECT + + ( - col0 ) * - col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - tab1.col1 + col0 + - col0 * col2 * col2 AS col2 FROM tab1
----
-207882
-737213
-8771

query I rowsort
SELECT DISTINCT + 79 + col2 * col1 FROM tab2
----
1613
725
916

query I rowsort
SELECT 73 * - col1 FROM tab2
----
-1241
-2263
-4307

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3743
SELECT DISTINCT CAST( + col2 AS SIGNED ) + col0 FROM tab2 cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-3743
SELECT DISTINCT CAST ( + col2 AS INTEGER ) + col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + 20 * + 55 FROM tab1 cor0
----
1100

query I rowsort
SELECT - - 11 * col2 * cor0.col0 FROM tab0 AS cor0
----
385
80278
8712

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col0 col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT col2 * - col1 + col2 - col2 * + col0 FROM tab1 AS cor0
----
-1512
-4161
-8832

query I rowsort
SELECT - 4 * - col0 * col2 FROM tab2 AS cor0
----
12008
756
8112

query I rowsort
SELECT DISTINCT - 67 + col0 AS col1 FROM tab1 AS cor0
----
-3
-64
13

query I rowsort
SELECT col2 + - col1 + col2 AS col2 FROM tab2 AS cor0
----
-7
23
59

query I rowsort
SELECT ALL + 67 * - col1 AS col2 FROM tab2 AS cor0
----
-1139
-2077
-3953

query I rowsort
SELECT + cor0.col2 * cor0.col0 * ( - col2 * - col1 ) AS col0 FROM tab0 AS cor0
----
2247696
3395
54457676

query I rowsort
SELECT DISTINCT + 21 + col1 AS col1 FROM tab2 AS cor0
----
38
52
80

query I rowsort
SELECT DISTINCT 44 * + col0 AS col2 FROM tab0 AS cor0
----
1056
1540
3916

query I rowsort
SELECT 25 * + 1 * col2 FROM tab1
----
1350
1425
2400

query I rowsort
SELECT - col1 * 6 FROM tab2
----
-102
-186
-354

query I rowsort
SELECT - - col2 * - ( col2 ) AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + col0 * - col2 + - 18 AS col1 FROM tab1 AS cor0
----
-180
-3666
-7698

query I rowsort
SELECT ALL - col0 + - ( - col1 ) FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - + col2 * + 31 AS col2 FROM tab1 AS cor0
----
-1674
-1767
-2976

query I rowsort
SELECT DISTINCT cor0.col2 + ( + col2 * col0 ) FROM tab0 cor0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - 90 * + col1 col1 FROM tab2 cor0
----
-120870
-19530
-414180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3763
SELECT ALL + col0 + CAST( 12 AS SIGNED ) FROM tab2 AS cor0
----
19
90
91

skipif mysql # not compatible
query I rowsort label-3763
SELECT ALL + col0 + CAST ( 12 AS INTEGER ) FROM tab2 AS cor0
----
19
90
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3764
SELECT DISTINCT + - col1 + CAST( 77 + - col1 AS SIGNED ) FROM tab0 cor0
----
-105
-117
-95

skipif mysql # not compatible
query I rowsort label-3764
SELECT DISTINCT + - col1 + CAST ( 77 + - col1 AS INTEGER ) FROM tab0 cor0
----
-105
-117
-95

query I rowsort
SELECT ALL - col2 * col1 + 23 FROM tab1 AS cor0
----
-1225
-1381
-547

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + cor0.col1 + + col0 col2 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3767
SELECT + col2 * - 54 + - col0 * cor0.col0 DIV - col1 col1 FROM tab2 AS cor0
----
-1301
-1457
-1685

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3767
SELECT + col2 * - 54 + - col0 * cor0.col0 / - col1 col1 FROM tab2 AS cor0
----
-1301
-1457
-1685

query I rowsort
SELECT - 40 * col2 + + col0 FROM tab0 AS cor0
----
-1296
-3191
-5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3769
SELECT - col1 + + ( + col0 ) * cor0.col0 * + CAST( + 61 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
249846
390387
523

skipif mysql # not compatible
query I rowsort label-3769
SELECT - col1 + + ( + col0 ) * cor0.col0 * + CAST ( + 61 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
249846
390387
523

query I rowsort
SELECT - + col1 - 3 FROM tab1 AS cor0
----
-13
-16
-29

query I rowsort
SELECT + 34 + + tab0.col2 FROM tab0
----
116
35
67

query I rowsort
SELECT DISTINCT - 38 * col2 FROM tab1
----
-2052
-2166
-3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-3773
SELECT - 39 * col1 DIV + 92 FROM tab2
----
-13
-25
-7

skipif mysql # not compatible
query I rowsort label-3773
SELECT - 39 * col1 / + 92 FROM tab2
----
-13
-25
-7

query I rowsort
SELECT + col2 * ( 53 ) + cor0.col2 * - 94 FROM tab1 AS cor0
----
-2214
-2337
-3936

query I rowsort
SELECT DISTINCT - + col0 * col0 + ( + col2 * 63 ) FROM tab0 cor0
----
-1162
-2755
1503

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col1 * - 26 col1 FROM tab0 AS cor0
----
-2322
-2457
-2619

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3777
SELECT ALL - col2 * ( col1 ) + col2 * + CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
-1242
3078
6432

skipif mysql # not compatible
query I rowsort label-3777
SELECT ALL - col2 * ( col1 ) + col2 * + CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
-1242
3078
6432

onlyif mysql # use DIV operator for integer division
query I rowsort label-3778
SELECT ALL - + col2 + + col1 DIV - 66 AS col1 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-3778
SELECT ALL - + col2 + + col1 / - 66 AS col1 FROM tab0 AS cor0
----
-2
-34
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3779
SELECT + col1 + - CAST( col2 AS SIGNED ) * + col1 AS col0 FROM tab1 cor0
----
-1235
-1378
-560

skipif mysql # not compatible
query I rowsort label-3779
SELECT + col1 + - CAST ( col2 AS INTEGER ) * + col1 AS col0 FROM tab1 cor0
----
-1235
-1378
-560

query I rowsort
SELECT + col2 * col1 + - col1 * - col1 * col0 FROM tab0 AS cor0
----
180342
329412
744471

query I rowsort
SELECT + tab1.col2 FROM tab0, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ( + col1 + - col1 ) FROM tab2
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3783
SELECT DISTINCT - CAST( NULL AS SIGNED ) * tab2.col1 AS col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-3783
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * tab2.col1 AS col0 FROM tab2
----
NULL

query I rowsort
SELECT col2 * + 62 * col2 FROM tab0 AS cor0
----
416888
62
67518

query I rowsort
SELECT ALL + + ( + col0 ) AS col2 FROM tab2 cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3786
SELECT DISTINCT + - 8 + + ( col2 ) DIV - col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-15

skipif mysql # not compatible
query I rowsort label-3786
SELECT DISTINCT + - 8 + + ( col2 ) / - col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-15

query I rowsort
SELECT DISTINCT col2 * 26 AS col2 FROM tab0 AS cor0
----
2132
26
858

query I rowsort
SELECT DISTINCT + + col2 * 17 FROM tab2 AS cor0
----
442
459
646

query I rowsort
SELECT col0 * + col2 * - cor0.col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 29 * col2 col0 FROM tab1 AS cor0
----
1566
1653
2784

query I rowsort
SELECT DISTINCT - col2 * + 58 FROM tab0 AS cor0
----
-1914
-4756
-58

query I rowsort
SELECT DISTINCT - - 89 * - col2 AS col1 FROM tab1 AS cor0
----
-4806
-5073
-8544

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3793
SELECT col1 + col1 - - CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3793
SELECT col1 + col1 - - CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3794
SELECT DISTINCT col0 + col1 DIV - col2 col0 FROM tab0 AS cor0
----
-62
22
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3794
SELECT DISTINCT col0 + col1 / - col2 col0 FROM tab0 AS cor0
----
-62
22
88

query I rowsort
SELECT DISTINCT - 24 + + col2 * - ( + ( col2 ) ) AS col0 FROM tab0 AS cor0
----
-1113
-25
-6748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col0 + 78 col0 FROM tab1 AS cor0
----
4174
6478
87

query I rowsort
SELECT ALL + tab1.col2 * col2 * + tab1.col0 AS col0 FROM tab1
----
207936
737280
8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-3798
SELECT - col2 DIV - cor0.col2 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3798
SELECT - col2 / - cor0.col2 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT 4 * col0 FROM tab2 AS cor0
----
28
312
316

onlyif mysql # use DIV operator for integer division
query I rowsort label-3800
SELECT - + 36 * col0 DIV col0 AS col0 FROM tab2 AS cor0
----
-36
-36
-36

skipif mysql # not compatible
query I rowsort label-3800
SELECT - + 36 * col0 / col0 AS col0 FROM tab2 AS cor0
----
-36
-36
-36

query I rowsort
SELECT - col1 + + 81 * + col1 FROM tab0 AS cor0
----
6880
7280
7760

query I rowsort
SELECT + ( col2 ) + col0 AS col1 FROM tab1 cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3803
SELECT ALL - 26 DIV ( - tab1.col2 ) AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3803
SELECT ALL - 26 / ( - tab1.col2 ) AS col1 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3804
SELECT ALL - CAST( 20 * tab1.col2 AS SIGNED ) FROM tab1
----
-1080
-1140
-1920

skipif mysql # not compatible
query I rowsort label-3804
SELECT ALL - CAST ( 20 * tab1.col2 AS INTEGER ) FROM tab1
----
-1080
-1140
-1920

query I rowsort
SELECT + 18 * col0 AS col2 FROM tab0
----
1602
432
630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + 32 col1 FROM tab0 cor0
----
121
56
67

query I rowsort
SELECT col1 + col2 + col1 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT ALL - col0 + - col0 * - col2 AS col2 FROM tab2
----
182
1950
2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * - cor0.col0 col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL cor0.col0 * + 21 AS col0 FROM tab2 AS cor0
----
147
1638
1659

query I rowsort
SELECT DISTINCT - col1 * + col1 + 26 AS col2 FROM tab0 AS cor0
----
-7370
-8255
-9383

query I rowsort
SELECT - cor0.col2 + col2 * - 25 + - col1 * col1 AS col1 FROM tab2 AS cor0
----
-1277
-1663
-4157

query I rowsort
SELECT DISTINCT + cor0.col2 + 45 * + col0 * col1 FROM tab0 AS cor0
----
152776
364537
92913

query I rowsort
SELECT + + col1 * + 69 AS col1 FROM tab0 cor0
----
5934
6279
6693

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3815
SELECT ALL - - CAST( NULL AS SIGNED ) + + col2 + cor0.col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3815
SELECT ALL - - CAST ( NULL AS INTEGER ) + + col2 + cor0.col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * - col1 + + cor0.col1 - col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - cor0.col1 * + col1 + col0 FROM tab0 cor0
----
-7372
-8192
-9374

query I rowsort
SELECT + - 77 * - ( + col1 ) FROM tab1 AS cor0
----
1001
2002
770

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - ( 84 ) col0 FROM tab0
----
-117
-166
-85

query I rowsort
SELECT ALL + cor0.col0 + col2 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-1456
-567
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-3821
SELECT - cor0.col2 DIV + cor0.col2 AS col0 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3821
SELECT - cor0.col2 / + cor0.col2 AS col0 FROM tab0 cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3822
SELECT DISTINCT + - 58 DIV - col1 FROM tab2 AS cor0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-3822
SELECT DISTINCT + - 58 / - col1 FROM tab2 AS cor0
----
0
1
3

query I rowsort
SELECT DISTINCT - 51 AS col2 FROM tab1 AS cor0
----
-51

query I rowsort
SELECT ALL - 91 + col2 FROM tab2 AS cor0
----
-53
-64
-65

query I rowsort
SELECT - 75 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c0722b1d77ac0ed13c0f2691a5751c59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3826
SELECT DISTINCT + ( + col0 ) + - CAST( col1 AS SIGNED ) * col0 AS col1 FROM tab0 cor0
----
-2040
-3360
-8010

skipif mysql # not compatible
query I rowsort label-3826
SELECT DISTINCT + ( + col0 ) + - CAST ( col1 AS INTEGER ) * col0 AS col1 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL ( col1 * col2 ) FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL 40 * col0 * - ( col2 ) - - col1 FROM tab2
----
-120063
-7529
-81061

query I rowsort
SELECT col0 * col1 + 35 AS col1 FROM tab0
----
2099
3430
8134

query I rowsort
SELECT - 33 AS col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to bbc05afe7eb6fed16e9d75f7f74d1948

query I rowsort
SELECT DISTINCT tab2.col0 * col0 - col1 AS col0 FROM tab2
----
18
6025
6224

query I rowsort
SELECT ALL - col1 * - tab0.col0 - + 33 FROM tab0
----
2031
3362
8066

query I rowsort
SELECT 64 * + col1 + col0 AS col2 FROM tab2
----
1167
1991
3854

query I rowsort
SELECT + col0 * + tab2.col0 + + col1 FROM tab2
----
6143
6258
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3835
SELECT + col1 * - col1 + + col2 + col2 DIV col1 col2 FROM tab2
----
-249
-3455
-934

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3835
SELECT + col1 * - col1 + + col2 + col2 / col1 col2 FROM tab2
----
-249
-3455
-934

onlyif mysql # use DIV operator for integer division
query I rowsort label-3836
SELECT + col1 * tab2.col0 DIV col0 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-3836
SELECT + col1 * tab2.col0 / col0 FROM tab2
----
17
31
59

query I rowsort
SELECT - col1 * + tab0.col1 * - col1 AS col2 FROM tab0
----
636056
753571
912673

onlyif mysql # use DIV operator for integer division
query I rowsort label-3838
SELECT DISTINCT - col0 DIV col0 col2 FROM tab1
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3838
SELECT DISTINCT - col0 / col0 col2 FROM tab1
----
-1

query I rowsort
SELECT DISTINCT - - col0 - col0 * + col0 AS col1 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT ALL - col2 + cor0.col2 + col1 FROM tab1 cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3841
SELECT DISTINCT - CAST( - col0 AS SIGNED ) * col0 AS col1 FROM tab2
----
49
6084
6241

skipif mysql # not compatible
query I rowsort label-3841
SELECT DISTINCT - CAST ( - col0 AS INTEGER ) * col0 AS col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT 69 * ( col2 ) * + tab1.col2 + col2 AS col0 FROM tab1
----
201258
224238
636000

query I rowsort
SELECT ALL + ( - 37 * - col1 ) FROM tab1
----
370
481
962

query I rowsort
SELECT - 24 + col1 * tab1.col0 FROM tab1
----
1016
54
616

query I rowsort
SELECT DISTINCT 67 * + col0 AS col0 FROM tab2
----
469
5226
5293

query I rowsort
SELECT col2 * 46 * - tab0.col2 + tab0.col2 FROM tab0
----
-309222
-45
-50061

query I rowsort
SELECT ( - 12 ) FROM tab2
----
-12
-12
-12

onlyif mysql # use DIV operator for integer division
query I rowsort label-3848
SELECT + cor0.col1 DIV col1 + cor0.col0 DIV col0 FROM tab1 AS cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-3848
SELECT + cor0.col1 / col1 + cor0.col0 / col0 FROM tab1 AS cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col0 AS REAL ) + col2 + + col2 * col0 AS col2 FROM tab0 AS cor0
----
1
7291
801

query I rowsort
SELECT DISTINCT - ( - col1 ) * + cor0.col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + - col2 + - ( col2 ) * col2 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT ALL + col2 * 63 AS col2 FROM tab0 AS cor0
----
2079
5166
63

query I rowsort
SELECT DISTINCT + cor0.col1 * - col0 + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + - cor0.col1 * col0 col2 FROM tab1 AS cor0
----
-1120
-704
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + col0 + - col0 col2 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL + + 3 + cor0.col2 AS col0 FROM tab1 AS cor0
----
57
60
99

query I rowsort
SELECT 71 FROM tab0 cor0
----
71
71
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + tab1.col0 col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL col2 * col2 - - col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT ALL + - cor0.col1 * col2 - - col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL + 31 + + col0 AS col2 FROM tab0 AS cor0
----
120
55
66

query I rowsort
SELECT + + col2 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + ( 83 ) FROM tab2 cor0
----
83
83
83

query I rowsort
SELECT DISTINCT + 54 FROM tab2, tab2 AS cor0, tab1 AS cor1, tab2 AS cor2
----
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3866
SELECT CAST( NULL AS SIGNED ) * + ( cor0.col1 ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3866
SELECT CAST ( NULL AS INTEGER ) * + ( cor0.col1 ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + 80 AS col2 FROM tab2
----
158
159
87

query I rowsort
SELECT 45 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 8a6d20810140ea088e8e0fd74ffb8339

query I rowsort
SELECT + 64 * 10 FROM tab2 AS cor0
----
640
640
640

onlyif mysql # use DIV operator for integer division
query I rowsort label-3870
SELECT - col2 + cor0.col2 DIV - col0 FROM tab0 AS cor0
----
-1
-34
-82

skipif mysql # not compatible
query I rowsort label-3870
SELECT - col2 + cor0.col2 / - col0 FROM tab0 AS cor0
----
-1
-34
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3871
SELECT - tab1.col1 DIV col2 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3871
SELECT - tab1.col1 / col2 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL 76 + col0 + - col2 FROM tab1
----
25
60
83

query I rowsort
SELECT ALL + 34 + col1 FROM tab0
----
120
125
131

query I rowsort
SELECT DISTINCT 17 + - col0 * col2 AS col0 FROM tab2
----
-172
-2011
-2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * col1 + 41 * ( col0 ) col1 FROM tab0 AS cor0
----
11748
3048
4830

onlyif mysql # use DIV operator for integer division
query I rowsort label-3876
SELECT 66 + + col1 DIV - ( cor0.col0 ) AS col2 FROM tab0 cor0
----
63
64
65

skipif mysql # not compatible
query I rowsort label-3876
SELECT 66 + + col1 / - ( cor0.col0 ) AS col2 FROM tab0 cor0
----
63
64
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-3877
SELECT 35 DIV - 64 AS col2 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3877
SELECT 35 / - 64 AS col2 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col2 AS REAL ) * + col1 AS col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - col0 * + 20 AS col1 FROM tab1
----
-1280
-1600
-60

query I rowsort
SELECT col2 * - 69 FROM tab0 cor0
----
-2277
-5658
-69

query I rowsort
SELECT - cor0.col0 * - col0 + 16 AS col0 FROM tab2 cor0
----
6100
6257
65

query I rowsort
SELECT - 48 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 2558735eaa258a08592aef9d33020c18

query I rowsort
SELECT - 75 + col2 FROM tab0
----
-42
-74
7

query I rowsort
SELECT + col2 * - tab2.col1 AS col1 FROM tab2
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3885
SELECT - cor1.col1 DIV + tab1.col0 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 368d9b4c52281c45681be080599facac

skipif mysql # not compatible
query I rowsort label-3885
SELECT - cor1.col1 / + tab1.col0 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 368d9b4c52281c45681be080599facac

query I rowsort
SELECT DISTINCT - + col2 + 71 * 41 AS col2 FROM tab0 AS cor0
----
2829
2878
2910

query I rowsort
SELECT DISTINCT - + col0 * cor0.col2 + + col0 AS col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL + ( + 19 ) FROM tab1 cor0
----
19
19
19

query I rowsort
SELECT DISTINCT + ( - col1 ) + col2 * - col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL cor0.col0 * 0 - - col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT col1 + ( + tab1.col1 ) AS col0 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL + 40 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT - cor0.col1 * - 20 FROM tab2 AS cor0
----
1180
340
620

onlyif mysql # use DIV operator for integer division
query I rowsort label-3895
SELECT col1 DIV + 81 - col0 FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-3895
SELECT col1 / + 81 - col0 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT - - ( + col2 ) AS col0 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) + col1 col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL ( col2 + + col0 ) AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT + - 77 + - col2 FROM tab1 cor0
----
-131
-134
-173

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3900
SELECT DISTINCT + CAST( NULL AS SIGNED ) - + col2 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3900
SELECT DISTINCT + CAST ( NULL AS INTEGER ) - + col2 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + col2 + + col2 - - col0 AS col2 FROM tab2 AS cor0
----
130
155
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3902
SELECT DISTINCT - 86 * 71 + col0 * CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3902
SELECT DISTINCT - 86 * 71 + col0 * CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + + col2 * 45 + col1 * cor0.col0 FROM tab2 cor0
----
1432
3053
5772

query I rowsort
SELECT ( + 50 ) AS col0 FROM tab2 AS cor0
----
50
50
50

query I rowsort
SELECT + + cor0.col1 + - 26 AS col1 FROM tab1 AS cor0
----
-13
-16
0

query I rowsort
SELECT col2 * tab2.col0 - 83 FROM tab2
----
106
1945
2919

query I rowsort
SELECT - 67 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

onlyif mysql # use DIV operator for integer division
query I rowsort label-3908
SELECT - 10 DIV - col1 + 24 DIV - cor0.col0 AS col1 FROM tab0 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3908
SELECT - 10 / - col1 + 24 / - cor0.col0 AS col1 FROM tab0 cor0
----
-1
0
0

query I rowsort
SELECT ( col0 ) + + col2 * cor0.col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT + + 47 * col1 AS col0 FROM tab0 AS cor0
----
4042
4277
4559

query I rowsort
SELECT + col0 * + col1 - col0 * + col0 AS col1 FROM tab0 cor0
----
1488
178
2170

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 49 col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
-49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3913
SELECT - - cor0.col2 * + CAST( col0 + - col1 AS SIGNED ) FROM tab1 AS cor0
----
-1242
3078
6432

skipif mysql # not compatible
query I rowsort label-3913
SELECT - - cor0.col2 * + CAST ( col0 + - col1 AS INTEGER ) FROM tab1 AS cor0
----
-1242
3078
6432

query I rowsort
SELECT col2 * - 0 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 98 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT + - col1 + ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL + - col1 + 41 + + col0 FROM tab1 cor0
----
108
18
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 - ( 22 ) col1 FROM tab2 AS cor0
----
-100
-101
-29

onlyif mysql # use DIV operator for integer division
query I rowsort label-3919
SELECT col1 DIV col0 + tab2.col2 + col1 AS col0 FROM tab2
----
55
62
85

skipif mysql # not compatible
query I rowsort label-3919
SELECT col1 / col0 + tab2.col2 + col1 AS col0 FROM tab2
----
55
62
85

query I rowsort
SELECT + 67 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT + col0 * - col0 + - col2 FROM tab1 AS cor0
----
-4153
-63
-6496

query I rowsort
SELECT ALL - col0 * col2 * 9 AS col2 FROM tab1 AS cor0
----
-1458
-32832
-69120

query I rowsort
SELECT - - col0 * col0 * ( 26 ) - - col0 * ( + cor0.col2 * + col0 ) AS col2 FROM tab0 AS cor0
----
33075
33984
855468

query I rowsort
SELECT - col1 + + 58 * - col1 AS col0 FROM tab0 AS cor0
----
-5074
-5369
-5723

query I rowsort
SELECT DISTINCT - col2 * - 88 FROM tab0 AS cor0
----
2904
7216
88

query I rowsort
SELECT ALL + - col1 + - col0 AS col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT 13 + - tab0.col0 + - 84 * col0 FROM tab0
----
-2027
-2962
-7552

query I rowsort
SELECT DISTINCT col1 + col2 - - col2 * col0 FROM tab2
----
2113
247
3057

onlyif mysql # use DIV operator for integer division
query I rowsort label-3929
SELECT ALL col1 DIV + CAST( 99 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3929
SELECT ALL col1 / + CAST ( 99 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 + 38 FROM tab2 AS cor0
----
-21
21
7

query I rowsort
SELECT DISTINCT cor0.col0 * col0 - + col2 FROM tab1 AS cor0
----
-45
4039
6304

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col2 * col1 * cor0.col0 col1 FROM tab2 cor0
----
-119574
-50955
-5852

query I rowsort
SELECT col2 - + ( col2 ) AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3934
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab2, tab1 cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-3934
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab2, tab1 cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT + col1 + col2 * + col2 FROM tab1 cor0
----
2942
3259
9229

onlyif mysql # use DIV operator for integer division
query I rowsort label-3936
SELECT + 93 DIV col1 AS col1 FROM tab0 cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3936
SELECT + 93 / col1 AS col1 FROM tab0 cor0
----
0
1
1

query I rowsort
SELECT ALL 89 + - 1 * - col2 FROM tab2 AS cor0
----
115
116
127

query I rowsort
SELECT DISTINCT - col2 * col1 * cor0.col2 + col2 * col0 FROM tab2 AS cor0
----
-21546
-22410
-37856

query I rowsort
SELECT DISTINCT + 29 * cor0.col1 AS col2 FROM tab0, tab2 AS cor0
----
1711
493
899

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3940
SELECT DISTINCT ( col1 ) * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3940
SELECT DISTINCT ( col1 ) * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3941
SELECT - 9 + col0 DIV ( - col1 * col0 ) AS col2 FROM tab0 AS cor0
----
-9
-9
-9

skipif mysql # not compatible
query I rowsort label-3941
SELECT - 9 + col0 / ( - col1 * col0 ) AS col2 FROM tab0 AS cor0
----
-9
-9
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3942
SELECT - col2 DIV + 28 - + col1 FROM tab0
----
-87
-93
-97

skipif mysql # not compatible
query I rowsort label-3942
SELECT - col2 / + 28 - + col1 FROM tab0
----
-87
-93
-97

query I rowsort
SELECT - 42 AS col1 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 56f86ff01cd96a3511acd46e0e811e27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 72 + - col0 + col1 col1 FROM tab2 AS cor0
----
10
53
96

query I rowsort
SELECT DISTINCT - + col1 + + col2 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL col1 + + col0 * - 81 AS col2 FROM tab1 cor0
----
-217
-5174
-6467

query I rowsort
SELECT DISTINCT - 92 + + col0 AS col1 FROM tab2 cor0
----
-13
-14
-85

query I rowsort
SELECT ALL + + cor0.col1 + + col0 AS col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT + 28 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

query I rowsort
SELECT DISTINCT + 3 AS col1 FROM tab1, tab2, tab0 AS cor0
----
3

query I rowsort
SELECT ALL + col0 + - 61 FROM tab0
----
-26
-37
28

query I rowsort
SELECT DISTINCT col1 + + ( col1 ) AS col2 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT + 84 AS col0 FROM tab1 AS cor0
----
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL - - 13 * ( col2 ) * CAST ( 30 AS REAL ) + col2 col2 FROM tab1 AS cor0
----
21114
22287
37536

query I rowsort
SELECT ALL - col2 - + ( - col0 + col0 * col2 ) AS col2 FROM tab1 AS cor0
----
-213
-3641
-7696

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3956
SELECT DISTINCT + CAST( - ( - col0 ) AS SIGNED ) + 21 * + 9 AS col1 FROM tab2 AS cor0
----
196
267
268

skipif mysql # not compatible
query I rowsort label-3956
SELECT DISTINCT + CAST ( - ( - col0 ) AS INTEGER ) + 21 * + 9 AS col1 FROM tab2 AS cor0
----
196
267
268

query I rowsort
SELECT + col0 + 70 AS col0 FROM tab1 AS cor0
----
134
150
73

query I rowsort
SELECT + col1 * - ( + 55 ) + tab1.col0 + + col0 * + col0 AS col2 FROM tab1
----
-1418
3610
5765

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - tab2.col0 * ( - col2 ) + - col1 + - CAST ( col1 + col0 AS REAL ) FROM tab2
----
120
1832
2889

query I rowsort
SELECT + col0 * - col1 + 87 + + col0 * col1 FROM tab0
----
87
87
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-3961
SELECT ALL 25 DIV 93 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3961
SELECT ALL 25 / 93 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 5 col2 FROM tab1 AS cor0
----
-5
-5
-5

query I rowsort
SELECT ALL 15 * - 95 + - col1 FROM tab2 cor0
----
-1442
-1456
-1484

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3964
SELECT DISTINCT + CAST( NULL AS SIGNED ) * ( - col1 ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3964
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * ( - col1 ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + col1 * - col0 - + col2 AS col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT + col1 * + ( col0 ) + ( + 67 + col0 ) AS col1 FROM tab1 AS cor0
----
1187
148
771

query I rowsort
SELECT ALL - 60 * - ( - col1 ) FROM tab2 AS cor0
----
-1020
-1860
-3540

query I rowsort
SELECT DISTINCT 66 * + col1 AS col2 FROM tab1 AS cor0
----
1716
660
858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + ( col2 ) col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + + 34 * + col1 - - col0 FROM tab0 AS cor0
----
2948
3183
3333

onlyif mysql # use DIV operator for integer division
query I rowsort label-3971
SELECT DISTINCT - col2 * 80 + + cor0.col1 DIV 8 + ( cor0.col2 ) * col0 * - ( col1 ) col0 FROM tab2 AS cor0
----
-121725
-54072
-8016

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3971
SELECT DISTINCT - col2 * 80 + + cor0.col1 / 8 + ( cor0.col2 ) * col0 * - ( col1 ) col0 FROM tab2 AS cor0
----
-121725
-54072
-8016

query I rowsort
SELECT + + col1 + col0 * col2 AS col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT - 20 * col2 FROM tab1 AS cor0
----
-1080
-1140
-1920

query I rowsort
SELECT DISTINCT + ( col1 ) + + col1 * col2 AS col1 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT ALL + - ( col1 ) * + col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - ( + 8 ) + + cor0.col1 * col1 + cor0.col0 FROM tab1 AS cor0
----
156
241
671

query I rowsort
SELECT DISTINCT + 9 * cor0.col2 + col2 AS col0 FROM tab1 AS cor0
----
540
570
960

query I rowsort
SELECT ALL col0 + col2 * col2 * - tab1.col2 FROM tab1
----
-157461
-185129
-884656

query I rowsort
SELECT DISTINCT - col0 * col0 FROM tab1 WHERE NOT ( NULL ) NOT BETWEEN col0 AND ( - col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3980
SELECT ALL - col0 DIV col1 + col0 AS col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3980
SELECT ALL - col0 / col1 + col0 AS col1 FROM tab0
----
24
35
89

query III rowsort
SELECT * FROM tab2 WHERE - col0 * col1 NOT IN ( + col2 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-3982
SELECT ALL + col0 DIV + col2 + - col0 FROM tab0
----
-24
-88
0

skipif mysql # not compatible
query I rowsort label-3982
SELECT ALL + col0 / + col2 + - col0 FROM tab0
----
-24
-88
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + tab1.col2 * col0 * col1 + col1 col2 FROM tab1
----
36426
4235
99773

query I rowsort
SELECT - col2 + col1 AS col2 FROM tab0 WHERE + col1 NOT BETWEEN + col0 + - col1 AND NULL
----

query I rowsort
SELECT ALL + col2 + - col0 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL + tab2.col2 FROM tab2 WHERE - col2 < ( - col2 + col0 - col2 )
----
26
38

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT + col0 * + col2 <> NULL
----

query I rowsort
SELECT ALL - col0 + col1 * - col0 AS col1 FROM tab2
----
-1422
-224
-4680

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE + col0 * + col1 <= NULL
----

query I rowsort
SELECT + tab0.col0 * - tab0.col2 AS col1 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col0 * + col1 col1 FROM tab2
----
1422
224
4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - cor0.col1 col2 FROM tab0 AS cor0
----
-119
-173
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3993
SELECT col2 DIV col1 + + col2 + + col0 AS col0 FROM tab2 AS cor0
----
104
119
34

skipif mysql # not compatible
query I rowsort label-3993
SELECT col2 / col1 + + col2 + + col0 AS col0 FROM tab2 AS cor0
----
104
119
34

query I rowsort
SELECT - col2 * cor0.col2 + col2 AS col2 FROM tab0 AS cor0
----
-1056
-6642
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3995
SELECT DISTINCT + cor0.col2 DIV cor0.col0 col0 FROM tab2 AS cor0
----
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3995
SELECT DISTINCT + cor0.col2 / cor0.col0 col0 FROM tab2 AS cor0
----
0
3

query I rowsort
SELECT + - col1 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - cor0.col1 * col0 + + col2 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT + col0 * col1 + - col2 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT DISTINCT - cor0.col1 * col0 + col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL + + col2 + cor0.col1 * col2 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-4001
SELECT ALL col0 * col2 + col2 * col0 DIV - col1 FROM tab0
----
35
7218
783

skipif mysql # not compatible
query I rowsort label-4001
SELECT ALL col0 * col2 + col2 * col0 / - col1 FROM tab0
----
35
7218
783

query I rowsort
SELECT DISTINCT + col0 + - tab1.col0 AS col1 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col0 + cor0.col0 + col2 * - col0 col0 FROM tab2 AS cor0
----
-1580
2652
35

query I rowsort
SELECT + cor0.col2 + col1 + - col2 AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + + col0 + - col2 * col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT tab2.col0 + tab2.col2 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL + col0 * col0 FROM tab2 WHERE NOT ( NULL ) > col1
----

query I rowsort
SELECT ALL + col1 * - 37 AS col1 FROM tab1 AS cor0
----
-370
-481
-962

query I rowsort
SELECT - - col2 * col2 + col2 AS col1 FROM tab2 cor0
----
1482
702
756

query I rowsort
SELECT ALL + cor0.col0 + - ( 46 ) FROM tab1 cor0
----
-43
18
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4011
SELECT + - cor0.col0 / + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4011
SELECT + - cor0.col0 / + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 * + col1 * + 66 AS col0 FROM tab2 cor0
----
-101244
-42636
-55242

query I rowsort
SELECT - cor0.col0 + col0 * - col2 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT - col0 * + col1 + ( col0 ) AS col1 FROM tab2 cor0
----
-1264
-210
-4524

query I rowsort
SELECT + col0 + 50 FROM tab1 AS cor0
----
114
130
53

query I rowsort
SELECT - 48 AS col1 FROM tab1
----
-48
-48
-48

query I rowsort
SELECT ALL + 38 AS col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 3a31dab513390ca6bd05c71a3d9c50f0

query I rowsort
SELECT ALL col0 * + tab2.col2 + col2 FROM tab2
----
2054
216
3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4020
SELECT - + col1 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4020
SELECT - + col1 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4021
SELECT + - cor0.col0 DIV - col1 + - cor0.col1 FROM tab2 AS cor0
----
-13
-31
-58

skipif mysql # not compatible
query I rowsort label-4021
SELECT + - cor0.col0 / - col1 + - cor0.col1 FROM tab2 AS cor0
----
-13
-31
-58

query I rowsort
SELECT ALL col0 * - col0 * + tab0.col2 + - col1 * - col1 * col1 AS col0 FROM tab0
----
104049
617048
911448

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * + col2 col1 FROM tab1 cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col1 * + col1 col0 FROM tab1
----
16224
36504
5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + tab2.col2 + col2 col0 FROM tab2 WHERE ( + col0 ) >= NULL
----

query I rowsort
SELECT col0 + col1 * col0 AS col1 FROM tab1
----
1120
704
81

query I rowsort
SELECT - col2 + + col1 FROM tab1 WHERE ( - col1 ) NOT BETWEEN + col2 + col1 AND NULL
----
-28
-47
-83

query III rowsort
SELECT * FROM tab1 WHERE NOT col1 NOT IN ( - col1 )
----

query I rowsort
SELECT ALL + col1 * - col0 + - col2 AS col0 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT ALL col0 FROM tab1 WHERE NOT NULL BETWEEN - col1 AND col0
----

query I rowsort
SELECT DISTINCT - col1 * - col2 + col1 FROM tab0
----
194
2924
7553

query III rowsort
SELECT * FROM tab1 WHERE NOT col0 < NULL
----

query I rowsort
SELECT 36 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 4d1892e880125dc90345721151acb22c

query I rowsort
SELECT cor0.col1 * + col2 + - 74 AS col1 FROM tab1 AS cor0
----
1174
1330
496

query I rowsort
SELECT + ( + col0 ) * col1 + + 25 FROM tab1 AS cor0
----
103
1065
665

query I rowsort
SELECT ALL + col0 * - cor0.col0 + + col1 FROM tab2 AS cor0
----
-18
-6025
-6224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col0 col0 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT ( + 46 ) FROM tab0 AS cor0
----
46
46
46

query I rowsort
SELECT ALL - col0 * - col1 + + col1 + col1 * col2 FROM tab2 AS cor0
----
1085
2006
6195

query I rowsort
SELECT ALL ( - ( col0 ) ) * 39 + + ( + col0 ) AS col0 FROM tab0 cor0
----
-1330
-3382
-912

query I rowsort
SELECT ALL + 67 + + col1 AS col2 FROM tab1 AS cor0
----
77
80
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4042
SELECT col2 * + col1 + + col2 * - col2 DIV col2 FROM tab0
----
2805
7380
96

skipif mysql # not compatible
query I rowsort label-4042
SELECT col2 * + col1 + + col2 * - col2 / col2 FROM tab0
----
2805
7380
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4043
SELECT + tab0.col0 * CAST( NULL AS SIGNED ) - + col1 * - col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4043
SELECT + tab0.col0 * CAST ( NULL AS INTEGER ) - + col1 * - col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ( + col2 + + col2 ) AS col2 FROM tab0
----
164
2
66

query I rowsort
SELECT DISTINCT - - 42 FROM tab1, tab0 AS cor0 CROSS JOIN tab1 cor1
----
42

query I rowsort
SELECT ALL ( 28 ) AS col0 FROM tab0 AS cor0
----
28
28
28

query I rowsort
SELECT DISTINCT ( cor0.col0 ) * col1 + + col1 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL - - 63 + + col2 FROM tab0 cor0
----
145
64
96

query I rowsort
SELECT ALL + + ( col2 ) * col0 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - - 87 * + col0 FROM tab2 AS cor0
----
609
6786
6873

query I rowsort
SELECT DISTINCT + + 26 + - ( + col0 ) FROM tab1 AS cor0
----
-38
-54
23

query I rowsort
SELECT DISTINCT + ( + 7 ) FROM tab0, tab0 cor0, tab1 AS cor1
----
7

query I rowsort
SELECT - ( col2 ) + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-104
-117
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-4054
SELECT ALL + - col0 * + ( col2 ) + - col1 + + col0 DIV cor0.col0 FROM tab2 AS cor0
----
-2086
-219
-3018

skipif mysql # not compatible
query I rowsort label-4054
SELECT ALL + - col0 * + ( col2 ) + - col1 + + col0 / cor0.col0 FROM tab2 AS cor0
----
-2086
-219
-3018

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4055
SELECT DISTINCT + - col1 - CAST( NULL AS SIGNED ) * ( col1 ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4055
SELECT DISTINCT + - col1 - CAST ( NULL AS INTEGER ) * ( col1 ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - col0 * + 13 + + ( + col1 ) FROM tab0 AS cor0
----
-1066
-226
-358

query I rowsort
SELECT col2 * col1 + + col2 FROM tab2 cor0
----
1560
684
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + 29 col2 FROM tab1 AS cor0
----
39
42
55

query I rowsort
SELECT DISTINCT + col0 + cor0.col1 + col2 FROM tab2 AS cor0
----
134
163
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + - col1 - + col1 col0 FROM tab1 AS cor0
----
-106
-122
-77

query I rowsort
SELECT ALL + + cor0.col2 AS col0 FROM tab1 cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4062
SELECT + + col2 DIV cor0.col2 + col0 * col2 FROM tab1 AS cor0
----
163
3649
7681

skipif mysql # not compatible
query I rowsort label-4062
SELECT + + col2 / cor0.col2 + col0 * col2 FROM tab1 AS cor0
----
163
3649
7681

query I rowsort
SELECT - col2 + col1 * + ( - col2 * ( + ( col0 ) ) ) + col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - + col2 * 20 - + col2 FROM tab2 AS cor0
----
-546
-567
-798

query I rowsort
SELECT ALL col0 * 10 FROM tab1 AS cor0
----
30
640
800

onlyif mysql # use DIV operator for integer division
query I rowsort label-4066
SELECT DISTINCT + + cor0.col1 DIV 40 AS col2 FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-4066
SELECT DISTINCT + + cor0.col1 / 40 AS col2 FROM tab2 AS cor0
----
0
1

query I rowsort
SELECT + col1 * col2 * col1 AS col1 FROM tab2 AS cor0
----
10982
25947
90506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4068
SELECT DISTINCT + 66 * col1 - - col1 * CAST( 57 AS SIGNED ) FROM tab2 AS cor0
----
2091
3813
7257

skipif mysql # not compatible
query I rowsort label-4068
SELECT DISTINCT + 66 * col1 - - col1 * CAST ( 57 AS INTEGER ) FROM tab2 AS cor0
----
2091
3813
7257

query I rowsort
SELECT ALL - 34 * - 92 AS col1 FROM tab1 AS cor0
----
3128
3128
3128

query I rowsort
SELECT cor2.col2 + - cor2.col0 AS col0 FROM tab0 cor0 CROSS JOIN tab1, tab1 cor1, tab1 AS cor2
----
81 values hashing to a7dd239868aa7502273662bd3834ab10

query I rowsort
SELECT DISTINCT ( - col2 ) * + 50 AS col1 FROM tab0 AS cor0
----
-1650
-4100
-50

query I rowsort
SELECT ALL - + 23 + 45 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT ALL ( + cor0.col0 ) * + col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - - col0 + col0 + col1 AS col2 FROM tab1 AS cor0
----
138
173
32

query I rowsort
SELECT ALL - + ( + col2 ) + col1 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4076
SELECT + 13 * + col1 + CAST( 83 AS SIGNED ) * - col2 + col2 col2 FROM tab0 AS cor0
----
-1588
-5541
1179

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4076
SELECT + 13 * + col1 + CAST ( 83 AS INTEGER ) * - col2 + col2 col2 FROM tab0 AS cor0
----
-1588
-5541
1179

onlyif mysql # use DIV operator for integer division
query I rowsort label-4077
SELECT DISTINCT tab1.col0 * + col1 + + 40 DIV 6 + + col0 col1 FROM tab1
----
1126
710
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4077
SELECT DISTINCT tab1.col0 * + col1 + + 40 / 6 + + col0 col1 FROM tab1
----
1126
710
87

query I rowsort
SELECT DISTINCT - 40 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
-40

onlyif mysql # use DIV operator for integer division
query I rowsort label-4079
SELECT + 19 * - col0 DIV + col0 + ( + col2 ) AS col2 FROM tab0
----
-18
14
63

skipif mysql # not compatible
query I rowsort label-4079
SELECT + 19 * - col0 / + col0 + ( + col2 ) AS col2 FROM tab0
----
-18
14
63

query I rowsort
SELECT ALL - ( col1 ) * 22 + - 62 FROM tab0
----
-1954
-2064
-2196

query I rowsort
SELECT - 11 + col2 FROM tab1
----
43
46
85

query I rowsort
SELECT + - col0 * 94 + col1 + - col1 FROM tab1 cor0
----
-282
-6016
-7520

query I rowsort
SELECT col0 + col0 * + 64 FROM tab0 AS cor0
----
1560
2275
5785

query I rowsort
SELECT DISTINCT - ( col1 ) * col2 + 18 FROM tab2
----
-1516
-628
-819

query I rowsort
SELECT DISTINCT - tab1.col2 + + col2 * col2 AS col2 FROM tab1
----
2862
3192
9120

query I rowsort
SELECT ALL - + 23 FROM tab0, tab1, tab1 cor0
----
27 values hashing to 9bd721f99d79dce21b1de2860fd51ed5

query I rowsort
SELECT 81 * col1 + - 76 AS col0 FROM tab1
----
2030
734
977

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab2, tab0 cor2
----
3645 values hashing to 32e6d0f63bf719b0a999c75379e75eca

query I rowsort
SELECT 74 + col2 AS col0 FROM tab2 AS cor0
----
100
101
112

query I rowsort
SELECT DISTINCT - - 24 * + col2 * + col0 AS col0 FROM tab2 AS cor0
----
4536
48672
72048

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4091
SELECT CAST( NULL AS SIGNED ) + 35 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4091
SELECT CAST ( NULL AS INTEGER ) + 35 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT col2 * ( 85 ) AS col1 FROM tab0
----
2805
6970
85

query I rowsort
SELECT DISTINCT tab0.col0 * + 82 AS col1 FROM tab0
----
1968
2870
7298

onlyif mysql # use DIV operator for integer division
query I rowsort label-4094
SELECT col1 * ( 24 + col1 ) DIV 71 col0 FROM tab2
----
24
68
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4094
SELECT col1 * ( 24 + col1 ) / 71 col0 FROM tab2
----
24
68
9

query I rowsort
SELECT DISTINCT col2 * + col0 + - col2 FROM tab0
----
34
7216
759

query I rowsort
SELECT + col1 * + 7 FROM tab1
----
182
70
91

query I rowsort
SELECT + col0 * 92 + col1 * + col0 FROM tab1 AS cor0
----
354
6528
8400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 + cor0.col2 col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - - ( col1 ) * - col1 + + col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT ALL + ( + col0 ) + col1 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + ( col0 ) + - col1 * + col1 AS col1 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT + ( col0 ) * col1 * + col1 + - cor0.col2 FROM tab1 AS cor0
----
13424
1974
6343

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4103
SELECT CAST( NULL AS DECIMAL ) * 96 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4103
SELECT CAST ( NULL AS REAL ) * 96 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 + + 44 FROM tab0
----
-38
11
43

query I rowsort
SELECT + 99 * cor0.col1 + col0 FROM tab2 AS cor0
----
1762
3076
5919

onlyif mysql # use DIV operator for integer division
query I rowsort label-4106
SELECT ALL col2 DIV col2 + col2 - + col0 * 91 FROM tab1
----
-218
-5766
-7183

skipif mysql # not compatible
query I rowsort label-4106
SELECT ALL col2 / col2 + col2 - + col0 * 91 FROM tab1
----
-218
-5766
-7183

query I rowsort
SELECT ALL + col0 + - 20 - - col0 AS col2 FROM tab2
----
-6
136
138

query I rowsort
SELECT DISTINCT - 83 * + col1 FROM tab2 AS cor0
----
-1411
-2573
-4897

query I rowsort
SELECT + ( col0 ) + + col2 * - 76 FROM tab1 AS cor0
----
-4101
-4268
-7216

query I rowsort
SELECT cor2.col1 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 86 * cor0.col2 col2 FROM tab2 cor0
----
2236
2322
3268

query I rowsort
SELECT ALL - 78 + 58 AS col0 FROM tab0 AS cor0
----
-20
-20
-20

query I rowsort
SELECT + - 89 + - col0 * + col0 * col2 FROM tab1 cor0
----
-233561
-575
-614489

query I rowsort
SELECT DISTINCT - + 37 FROM tab1 AS cor0
----
-37

query I rowsort
SELECT ALL + - ( col0 ) + + 99 FROM tab1 cor0
----
19
35
96

query I rowsort
SELECT ALL + col1 * + col1 + + col2 AS col1 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT - - col0 * col0 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
13824
42875
704969

query I rowsort
SELECT DISTINCT - ( - cor0.col0 ) * + cor0.col1 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - 45 + - col0 * 21 AS col1 FROM tab1 AS cor0
----
-108
-1389
-1725

onlyif mysql # use DIV operator for integer division
query I rowsort label-4120
SELECT col0 DIV + 44 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4120
SELECT col0 / + 44 FROM tab2
----
0
1
1

query I rowsort
SELECT ALL + 93 - col1 AS col0 FROM tab2
----
34
62
76

query I rowsort
SELECT DISTINCT col1 * col1 + col0 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT - col0 + 0 AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL 59 + + 52 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to b67b9652fb9ca175b51664220cfde41e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col2 * col1 col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT ALL + 30 * col1 AS col1 FROM tab1
----
300
390
780

query I rowsort
SELECT + 47 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT + col1 * + ( + cor0.col0 ) * + col2 AS col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT ALL + + 49 + cor0.col0 FROM tab1 AS cor0
----
113
129
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + - cor0.col0 col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 16 + col2 AS col0 FROM tab1 AS cor0
----
112
70
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4132
SELECT DISTINCT + cor0.col1 * + cor0.col1 + CAST( 68 AS SIGNED ) FROM tab0 AS cor0
----
7464
8349
9477

skipif mysql # not compatible
query I rowsort label-4132
SELECT DISTINCT + cor0.col1 * + cor0.col1 + CAST ( 68 AS INTEGER ) FROM tab0 AS cor0
----
7464
8349
9477

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4133
SELECT ALL + + col0 / col0 + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4133
SELECT ALL + + col0 / col0 + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + 39 * - col1 AS col0 FROM tab2 AS cor0
----
1209
2301
663

query I rowsort
SELECT DISTINCT - col1 * col1 * col0 + + col1 FROM tab2 AS cor0
----
-22814
-271459
-6696

query I rowsort
SELECT - + col1 * - col1 + col0 AS col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT - 57 + col0 * col2 AS col0 FROM tab2 AS cor0
----
132
1971
2945

query I rowsort
SELECT ALL - col2 * 44 FROM tab0
----
-1452
-3608
-44

query I rowsort
SELECT ALL - ( col1 ) + + col2 AS col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT col0 * col0 + + 15 AS col1 FROM tab2 AS cor0
----
6099
6256
64

query I rowsort
SELECT - 13 * col2 AS col0 FROM tab0 cor0
----
-1066
-13
-429

query I rowsort
SELECT + col0 * col2 + + ( col2 ) FROM tab0 cor0
----
36
7380
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-4143
SELECT ALL + 60 DIV col0 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4143
SELECT ALL + 60 / col0 FROM tab0 AS cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 78 col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
78

query I rowsort
SELECT col1 * 78 FROM tab0 AS cor0
----
6708
7098
7566

query I rowsort
SELECT ALL - col2 + - col2 * - col2 AS col0 FROM tab1 AS cor0
----
2862
3192
9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-4147
SELECT col0 + col2 DIV ( + cor0.col0 + col2 ) FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-4147
SELECT col0 + col2 / ( + cor0.col0 + col2 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - ( col2 ) * 12 AS col1 FROM tab1 AS cor0
----
-1152
-648
-684

query I rowsort
SELECT + 76 * col1 AS col0 FROM tab0 AS cor0
----
6536
6916
7372

query I rowsort
SELECT ALL 15 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT DISTINCT col2 + col1 * - col2 + col2 AS col1 FROM tab1 cor0
----
-1056
-1296
-456

query I rowsort
SELECT + + col0 + col0 * - col0 FROM tab2 AS cor0
----
-42
-6006
-6162

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4153
SELECT - CAST( NULL AS SIGNED ) + + col1 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4153
SELECT - CAST ( NULL AS INTEGER ) + + col1 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 * col0 * - col1 + col0 FROM tab1
----
36544
4215
99920

query I rowsort
SELECT + col0 + 35 AS col2 FROM tab2
----
113
114
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4156
SELECT CAST( + col1 AS SIGNED ) * + col2 * tab1.col1 AS col1 FROM tab1
----
16224
36504
5700

skipif mysql # not compatible
query I rowsort label-4156
SELECT CAST ( + col1 AS INTEGER ) * + col2 * tab1.col1 AS col1 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT - col0 - - col1 AS col2 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL + col0 * col0 + - col1 AS col2 FROM tab0
----
1128
490
7830

query I rowsort
SELECT ALL + ( - 39 ) * col0 + col2 + col1 FROM tab2 AS cor0
----
-215
-2957
-3026

query I rowsort
SELECT ALL + 38 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4161
SELECT - col1 + 34 - + col1 DIV - 55 FROM tab2
----
-24
17
3

skipif mysql # not compatible
query I rowsort label-4161
SELECT - col1 + 34 - + col1 / - 55 FROM tab2
----
-24
17
3

query I rowsort
SELECT DISTINCT - col0 + - 67 FROM tab0
----
-102
-156
-91

query I rowsort
SELECT ALL + 17 FROM tab1, tab1 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT 28 * col2 + col2 + col0 AS col1 FROM tab2
----
1181
790
832

query I rowsort
SELECT DISTINCT + ( - col2 * tab1.col1 ) + col0 + - col2 AS col0 FROM tab1
----
-1264
-1455
-563

query I rowsort
SELECT ( col0 ) - + cor0.col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT cor0.col1 * 10 + - col2 FROM tab1 cor0
----
206
34
43

query I rowsort
SELECT ALL + + col0 - + 38 * + col0 FROM tab2 AS cor0
----
-259
-2886
-2923

query I rowsort
SELECT + - col1 + 73 AS col1 FROM tab1 AS cor0
----
47
60
63

query I rowsort
SELECT DISTINCT ( - 83 ) AS col0 FROM tab1 cor0
----
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4171
SELECT ALL - tab1.col0 DIV 42 + col0 FROM tab1
----
3
63
79

skipif mysql # not compatible
query I rowsort label-4171
SELECT ALL - tab1.col0 / 42 + col0 FROM tab1
----
3
63
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4172
SELECT ALL + col2 DIV - col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4172
SELECT ALL + col2 / - col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - - cor0.col2 * col1 * 7 AS col1 FROM tab1 AS cor0
----
3990
8736
9828

query I rowsort
SELECT ALL + - cor0.col1 * col0 + + 40 FROM tab1 AS cor0
----
-1000
-38
-600

query I rowsort
SELECT ALL + ( + col2 * 30 ) FROM tab2
----
1140
780
810

query I rowsort
SELECT ALL + col0 * + cor0.col1 + ( + col0 ) + + col0 FROM tab2 AS cor0
----
1501
231
4758

query I rowsort
SELECT + ( col1 ) * col1 + col0 AS col1 FROM tab2 cor0
----
3559
368
968

query I rowsort
SELECT ALL ( - 24 ) + col2 FROM tab0
----
-23
58
9

query I rowsort
SELECT ALL col1 + - col1 * cor0.col1 * - col0 AS col1 FROM tab2 AS cor0
----
22848
271577
6758

query I rowsort
SELECT DISTINCT + 28 + + col2 AS col2 FROM tab0 AS cor0
----
110
29
61

query I rowsort
SELECT 79 * col2 + cor0.col2 AS col0 FROM tab2 cor0
----
2080
2160
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - - 59 * 29 col1 FROM tab0 AS cor0
----
1797
1802
1808

query I rowsort
SELECT col0 * 20 FROM tab0 AS cor0
----
1780
480
700

onlyif mysql # use DIV operator for integer division
query I rowsort label-4184
SELECT DISTINCT - col0 * col0 DIV 29 col1 FROM tab2
----
-1
-209
-215

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4184
SELECT DISTINCT - col0 * col0 / 29 col1 FROM tab2
----
-1
-209
-215

onlyif mysql # use DIV operator for integer division
query I rowsort label-4185
SELECT DISTINCT + col0 + - col1 DIV col1 AS col2 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-4185
SELECT DISTINCT + col0 + - col1 / col1 AS col2 FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT + cor0.col1 FROM tab2, tab0 AS cor0, tab2 cor1, tab1 AS cor2
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT ALL + col1 + 32 FROM tab1 cor0
----
42
45
58

query I rowsort
SELECT + col1 * + col0 - col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT + col2 + + col2 AS col2 FROM tab1 cor0
----
108
114
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4190
SELECT - + CAST( NULL AS SIGNED ) + col1 * col1 - col2 / col1 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4190
SELECT - + CAST ( NULL AS INTEGER ) + col1 * col1 - col2 / col1 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 88 - col1 * + col0 AS col0 FROM tab1 AS cor0
----
-552
-952
10

query I rowsort
SELECT ( 89 ) + col0 * - col0 AS col0 FROM tab1 AS cor0
----
-4007
-6311
80

query I rowsort
SELECT DISTINCT - 29 * col2 FROM tab2 AS cor0
----
-1102
-754
-783

query I rowsort
SELECT ALL + ( - col1 ) * - col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + - col1 + + 79 FROM tab2 cor0
----
20
48
62

query I rowsort
SELECT DISTINCT col0 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT 42 * - 79 * + col2 + + 71 * col0 - + cor0.col2 FROM tab1 cor0
----
-179013
-184639
-312944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4198
SELECT ALL col0 * + CAST( NULL AS SIGNED ) * col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4198
SELECT ALL col0 * + CAST ( NULL AS INTEGER ) * col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + + col2 - 14 FROM tab2 cor0
----
12
13
24

query I rowsort
SELECT + + cor0.col1 + + col1 * - 98 + col2 FROM tab2 AS cor0
----
-1611
-2980
-5697

query I rowsort
SELECT col0 * col1 + - col2 AS col0 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT - col0 + + ( col0 ) FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ( - col2 + - ( - col1 ) ) * + tab2.col2 AS col1 FROM tab2
----
-798
108
858

query I rowsort
SELECT DISTINCT col0 + + tab2.col1 AS col1 FROM tab2
----
137
38
96

query I rowsort
SELECT - col0 + col1 + + col1 AS col1 FROM tab1
----
-44
-54
49

query I rowsort
SELECT + col1 * - ( + col2 * col2 + + col2 ) AS col0 FROM tab0
----
-194
-619346
-96492

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col0 * - tab0.col1 col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + 80 AS col0 FROM tab0
----
80
80
80

query I rowsort
SELECT DISTINCT + 35 + - tab2.col0 AS col1 FROM tab2, tab1, tab1 AS cor0
----
-43
-44
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 32 + 17 col0 FROM tab1 AS cor0
----
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - 98 AS col1 FROM tab1, tab0 AS cor0
----
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 62 col0 FROM tab0 AS cor0
----
-62
-62
-62

query I rowsort
SELECT ALL - col2 + col2 * ( - ( col1 ) ) * - cor0.col1 AS col1 FROM tab1 AS cor0
----
16128
36450
5643

query I rowsort
SELECT - 45 * col0 AS col1 FROM tab2 AS cor0
----
-315
-3510
-3555

query I rowsort
SELECT ALL 20 - cor0.col0 FROM tab0 cor0
----
-15
-4
-69

onlyif mysql # use DIV operator for integer division
query I rowsort label-4217
SELECT DISTINCT + 62 * cor0.col0 DIV cor0.col0 - cor0.col0 AS col0 FROM tab2 AS cor0
----
-16
-17
55

skipif mysql # not compatible
query I rowsort label-4217
SELECT DISTINCT + 62 * cor0.col0 / cor0.col0 - cor0.col0 AS col0 FROM tab2 AS cor0
----
-16
-17
55

query I rowsort
SELECT DISTINCT - - col1 * + col2 + col0 AS col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT 1 - col2 AS col0 FROM tab2
----
-25
-26
-37

onlyif mysql # use DIV operator for integer division
query I rowsort label-4220
SELECT DISTINCT + 85 DIV - col2 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-4220
SELECT DISTINCT + 85 / - col2 FROM tab1
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4221
SELECT ALL CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4221
SELECT ALL CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab1, tab1 cor0, tab2 AS cor1
----
54
57
96

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 AS col0 FROM tab1, tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT - 70 AS col2 FROM tab1, tab2, tab0 AS cor0
----
-70

query I rowsort
SELECT 80 + - tab1.col0 FROM tab1
----
0
16
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 - + col0 col0 FROM tab2 cor0
----
-104
-117
-34

query I rowsort
SELECT - + cor0.col0 + - ( ( - col0 ) ) AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4228
SELECT + cor0.col0 * CAST( - col2 AS SIGNED ) + + col1 - 39 FROM tab0 AS cor0
----
-7246
-745
23

skipif mysql # not compatible
query I rowsort label-4228
SELECT + cor0.col0 * CAST ( - col2 AS INTEGER ) + + col1 - 39 FROM tab0 AS cor0
----
-7246
-745
23

query I rowsort
SELECT DISTINCT cor0.col0 + - col0 + col1 AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - - col0 + + 74 FROM tab2 AS cor0
----
152
153
81

query I rowsort
SELECT DISTINCT - col0 + - col1 * ( col0 ) FROM tab0 AS cor0
----
-2088
-3430
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-4232
SELECT ALL + col2 DIV ( col1 ) - cor0.col2 FROM tab1 cor0
----
-52
-52
-89

skipif mysql # not compatible
query I rowsort label-4232
SELECT ALL + col2 / ( col1 ) - cor0.col2 FROM tab1 cor0
----
-52
-52
-89

query I rowsort
SELECT + 9 * - 76 FROM tab0 AS cor0
----
-684
-684
-684

onlyif mysql # use DIV operator for integer division
query I rowsort label-4234
SELECT - col2 DIV 21 + col0 AS col0 FROM tab0 AS cor0
----
23
35
86

skipif mysql # not compatible
query I rowsort label-4234
SELECT - col2 / 21 + col0 AS col0 FROM tab0 AS cor0
----
23
35
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-4235
SELECT - 46 DIV col1 AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4235
SELECT - 46 / col1 AS col2 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4236
SELECT DISTINCT - + 96 DIV 34 col1 FROM tab0 AS cor0
----
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4236
SELECT DISTINCT - + 96 / 34 col1 FROM tab0 AS cor0
----
-2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4237
SELECT + col0 * CAST( NULL AS SIGNED ) * col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4237
SELECT + col0 * CAST ( NULL AS INTEGER ) * col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * - col1 + col1 * col1 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT ALL + - cor0.col1 + + col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - 53 + cor1.col2 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to e66007955de53209bb822ca2a8d7ab74

query I rowsort
SELECT ALL + 20 * col1 AS col1 FROM tab0 AS cor0
----
1720
1820
1940

query I rowsort
SELECT DISTINCT 45 * + col0 FROM tab0
----
1080
1575
4005

query I rowsort
SELECT - ( - col1 + + col1 ) * col0 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT 91 + - 92 * - col0 AS col1 FROM tab0
----
2299
3311
8279

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( - 27 AS REAL ) * + col0 * 58 + + col1 FROM tab0
----
-139283
-37498
-54713

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) * - col2 col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL + col2 + - 48 + col1 FROM tab0
----
125
50
71

query I rowsort
SELECT - - 84 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to e8cd683fe8cea77b4326d9b80f21c74a

query I rowsort
SELECT + + col2 * cor0.col1 + - col0 * + ( + cor0.col2 ) AS col2 FROM tab2 cor0
----
-2356
-494
648

onlyif mysql # use DIV operator for integer division
query I rowsort label-4250
SELECT ALL - ( col0 ) + col2 DIV col0 col2 FROM tab0 cor0
----
-23
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4250
SELECT ALL - ( col0 ) + col2 / col0 col2 FROM tab0 cor0
----
-23
-35
-89

query I rowsort
SELECT DISTINCT + + ( 55 ) + col1 AS col0 FROM tab2 AS cor0
----
114
72
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4252
SELECT DISTINCT - CAST( col0 AS SIGNED ) * - col1 + - 96 AS col1 FROM tab0 AS cor0
----
1968
3299
8003

skipif mysql # not compatible
query I rowsort label-4252
SELECT DISTINCT - CAST ( col0 AS INTEGER ) * - col1 + - 96 AS col1 FROM tab0 AS cor0
----
1968
3299
8003

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4253
SELECT ALL + + CAST( NULL AS SIGNED ) + col2 + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4253
SELECT ALL + + CAST ( NULL AS INTEGER ) + col2 + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col1 + col2 col1 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT - + 55 * + col2 + col2 AS col2 FROM tab2 AS cor0
----
-1404
-1458
-2052

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4256
SELECT - + 33 * col1 + + ( + ( - col0 ) ) * CAST( NULL AS SIGNED ) * - col0 + + col1 * 27 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4256
SELECT - + 33 * col1 + + ( + ( - col0 ) ) * CAST ( NULL AS INTEGER ) * - col0 + + col1 * 27 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 36 * - col1 AS col2 FROM tab2 cor0
----
1116
2124
612

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 68 * col2 + cor0.col1 col1 FROM tab0 AS cor0
----
165
2330
5667

query I rowsort
SELECT DISTINCT 50 * + col1 * + col2 + col1 AS col0 FROM tab0 AS cor0
----
141986
373191
4947

query I rowsort
SELECT DISTINCT ( col1 ) * - 64 FROM tab1 AS cor0
----
-1664
-640
-832

query I rowsort
SELECT ALL col2 * + col2 + + ( - col0 ) * - col1 + col0 AS col1 FROM tab2 AS cor0
----
2866
5356
953

query I rowsort
SELECT ALL - - col2 - col2 * + ( col0 ) FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT - col0 * - col0 AS col2 FROM tab0 cor0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4264
SELECT - 87 * + col0 + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4264
SELECT - 87 * + col0 + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 + col0 * ( + 77 * + col2 ) FROM tab0 AS cor0
----
2730
562035
61008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 1 + + col2 col1 FROM tab2
----
27
28
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col2 ) col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL 60 + col1 FROM tab0
----
146
151
157

query I rowsort
SELECT ALL 4 + 62 FROM tab1
----
66
66
66

query I rowsort
SELECT DISTINCT + + col1 + - ( - 72 ) FROM tab2 AS cor0
----
103
131
89

query I rowsort
SELECT - col0 * ( 10 ) AS col2 FROM tab0 AS cor0
----
-240
-350
-890

onlyif mysql # use DIV operator for integer division
query I rowsort label-4272
SELECT - col1 DIV - col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4272
SELECT - col1 / - col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL col2 * 5 AS col0 FROM tab2 cor0
----
130
135
190

query I rowsort
SELECT ALL cor0.col1 + + ( + col0 ) FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + col2 + - col2 * col2 AS col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT - + col1 + 86 FROM tab1 AS cor0
----
60
73
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4278
SELECT DISTINCT col1 + + 60 DIV + col0 AS col1 FROM tab2 AS cor0
----
17
39
59

skipif mysql # not compatible
query I rowsort label-4278
SELECT DISTINCT col1 + + 60 / + col0 AS col1 FROM tab2 AS cor0
----
17
39
59

query I rowsort
SELECT ALL col2 * 39 AS col1 FROM tab1 AS cor0
----
2106
2223
3744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + 27 - col0 col2 FROM tab2
----
-129
-131
13

query I rowsort
SELECT - col0 * - col0 + col0 + col2 AS col0 FROM tab1
----
4217
6576
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 68 * ( col1 ) + + cor0.col0 * + col0 col0 FROM tab1 cor0
----
1777
4776
7284

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 47 col2 FROM tab2 AS cor0
----
47

query I rowsort
SELECT ALL ( cor0.col0 ) AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - - 5 FROM tab1 cor0
----
5
5
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4286
SELECT + col1 DIV col1 + + col0 FROM tab1 cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-4286
SELECT + col1 / col1 + + col0 FROM tab1 cor0
----
4
65
81

query I rowsort
SELECT col0 * col1 + 9 FROM tab2
----
1352
226
4611

query I rowsort
SELECT - col0 + - ( ( - col2 ) ) * ( + col2 ) * - col0 AS col2 FROM tab1
----
-208000
-737360
-8751

query I rowsort
SELECT - 88 FROM tab0, tab2 cor0
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

onlyif mysql # use DIV operator for integer division
query I rowsort label-4290
SELECT col1 DIV + ( - col2 ) - - ( + col2 ) AS col1 FROM tab0 AS cor0
----
-96
31
81

skipif mysql # not compatible
query I rowsort label-4290
SELECT col1 / + ( - col2 ) - - ( + col2 ) AS col1 FROM tab0 AS cor0
----
-96
31
81

query I rowsort
SELECT DISTINCT - 24 AS col0 FROM tab1 AS cor0
----
-24

query I rowsort
SELECT ALL + 64 + col2 * col1 * - ( col0 ) AS col1 FROM tab0 cor0
----
-3331
-664054
-68048

query I rowsort
SELECT col0 + + col1 * col1 AS col0 FROM tab0
----
7420
8370
9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4294
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4294
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4295
SELECT DISTINCT + col2 * - cor0.col0 + + col0 - col1 DIV + col0 FROM tab0 AS cor0
----
-2
-7210
-771

skipif mysql # not compatible
query I rowsort label-4295
SELECT DISTINCT + col2 * - cor0.col0 + + col0 - col1 / + col0 FROM tab0 AS cor0
----
-2
-7210
-771

onlyif mysql # use DIV operator for integer division
query I rowsort label-4296
SELECT - + cor0.col0 DIV 23 AS col1 FROM tab1 AS cor0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-4296
SELECT - + cor0.col0 / 23 AS col1 FROM tab1 AS cor0
----
-2
-3
0

query I rowsort
SELECT ALL - col2 * 16 AS col1 FROM tab0 cor0
----
-1312
-16
-528

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4298
SELECT DISTINCT + col0 + CAST( NULL AS SIGNED ) + col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4298
SELECT DISTINCT + col0 + CAST ( NULL AS INTEGER ) + col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4299
SELECT cor0.col0 + 57 DIV col0 AS col1 FROM tab0 AS cor0
----
26
36
89

skipif mysql # not compatible
query I rowsort label-4299
SELECT cor0.col0 + 57 / col0 AS col1 FROM tab0 AS cor0
----
26
36
89

query I rowsort
SELECT DISTINCT + col1 * - ( 0 ) + cor0.col1 * col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col1 * col1 col2 FROM tab2 AS cor0
----
205379
29791
4913

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * col0 col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - - col0 * + cor0.col0 AS col2 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT col1 * + col1 * col0 AS col2 FROM tab2 AS cor0
----
22831
271518
6727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + cor0.col1 * - col2 col0 FROM tab0 cor0
----
-2805
-7380
-96

query IIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0 WHERE NOT NULL IN ( + cor0.col2 )
----

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT ( col0 ) = NULL
----

query I rowsort
SELECT - col0 * + cor0.col1 + - col0 * + col1 FROM tab0 AS cor0
----
-16198
-4128
-6790

query I rowsort
SELECT DISTINCT - tab2.col2 * + col1 + - col0 AS col1 FROM tab2
----
-1612
-725
-844

query I rowsort
SELECT - col2 * col2 + col1 AS col1 FROM tab2 AS cor0
----
-1427
-617
-698

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( NULL ) NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT - + col2 * - col1 + col2 AS col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT + + col1 + - col2 * col1 AS col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL col2 * col0 * + col1 AS col1 FROM tab2
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + col0 col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT col1 * col1 * tab2.col2 FROM tab2
----
10982
25947
90506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4318
SELECT DISTINCT 14 * col1 + - CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4318
SELECT DISTINCT 14 * col1 + - CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL + ( - col1 ) * ( 10 ) FROM tab1 AS cor0
----
-100
-130
-260

query I rowsort
SELECT 79 AS col1 FROM tab2, tab2 cor0, tab0 AS cor1, tab0, tab1 AS cor2
----
243 values hashing to 971343d8788357b3e9b614173472c1cb

query I rowsort
SELECT ALL - 48 + + col2 FROM tab1 AS cor0
----
48
6
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4322
SELECT DISTINCT + 30 * - col1 + CAST( - col2 AS SIGNED ) FROM tab2 AS cor0
----
-1796
-548
-957

skipif mysql # not compatible
query I rowsort label-4322
SELECT DISTINCT + 30 * - col1 + CAST ( - col2 AS INTEGER ) FROM tab2 AS cor0
----
-1796
-548
-957

query I rowsort
SELECT 91 FROM tab1, tab2 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 8a48d0ac75792561e233f0311a8872fd

onlyif mysql # use DIV operator for integer division
query I rowsort label-4324
SELECT DISTINCT - col0 + col2 * tab2.col0 DIV tab2.col0 AS col1 FROM tab2
----
-41
-52
20

skipif mysql # not compatible
query I rowsort label-4324
SELECT DISTINCT - col0 + col2 * tab2.col0 / tab2.col0 AS col1 FROM tab2
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * tab2.col0 col0 FROM tab2 WHERE NOT col0 + - col2 = ( NULL )
----

query I rowsort
SELECT DISTINCT - tab1.col0 * + col0 + + col2 FROM tab1
----
-4039
-6304
45

query I rowsort
SELECT ALL - 10 AS col1 FROM tab0, tab1, tab0 cor0
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT DISTINCT + 27 FROM tab1, tab2, tab0 AS cor0
----
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 - + col0 col0 FROM tab1
----
-108
-124
-47

onlyif mysql # use DIV operator for integer division
query I rowsort label-4330
SELECT col2 DIV + col0 + - col0 FROM tab0
----
-23
-35
-89

skipif mysql # not compatible
query I rowsort label-4330
SELECT col2 / + col0 + - col0 FROM tab0
----
-23
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4331
SELECT + ( tab1.col2 ) + 31 DIV col2 AS col0 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-4331
SELECT + ( tab1.col2 ) + 31 / col2 AS col0 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4332
SELECT DISTINCT - col2 * col1 DIV - 42 FROM tab2
----
15
19
36

skipif mysql # not compatible
query I rowsort label-4332
SELECT DISTINCT - col2 * col1 / - 42 FROM tab2
----
15
19
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-4333
SELECT ALL col1 DIV + col1 + + col1 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-4333
SELECT ALL col1 / + col1 + + col1 FROM tab1
----
11
14
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-4334
SELECT DISTINCT col0 DIV col0 + + col2 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4334
SELECT DISTINCT col0 / col0 + + col2 FROM tab0
----
2
34
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4335
SELECT DISTINCT col0 DIV + col2 - - col0 FROM tab1
----
3
65
80

skipif mysql # not compatible
query I rowsort label-4335
SELECT DISTINCT col0 / + col2 - - col0 FROM tab1
----
3
65
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4336
SELECT ALL col1 * col0 DIV col2 + col1 FROM tab0
----
148
189
3492

skipif mysql # not compatible
query I rowsort label-4336
SELECT ALL col1 * col0 / col2 + col1 FROM tab0
----
148
189
3492

query III rowsort
SELECT DISTINCT * FROM tab0 cor0 WHERE ( - col2 + + col1 * col1 / col2 ) NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 WHERE ( col1 * col1 * + col2 + + col1 ) > NULL
----

query I rowsort
SELECT col0 + - col0 * col2 * - col0 FROM tab1 AS cor0
----
233536
489
614480

query I rowsort
SELECT + col0 FROM tab1 AS cor0 WHERE NOT ( + col2 ) BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT col1 + - col0 * col2 * col1 + col1 FROM tab0
----
-3201
-663936
-67940

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - col2 + col1 col0 FROM tab1
----
-111
-163
-31

query I rowsort
SELECT ALL + col1 AS col1 FROM tab1 WHERE NOT NULL NOT IN ( col2 * tab1.col1 )
----

query I rowsort
SELECT - col2 * - col2 AS col0 FROM tab1 WHERE NOT col1 - col0 BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT DISTINCT + col0 + col0 + tab1.col2 * col1 AS col1 FROM tab1
----
1408
1410
698

query I rowsort
SELECT col0 * - col2 * + col0 AS col0 FROM tab0
----
-1225
-19008
-649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-4347
SELECT ALL - col1 DIV col2 + + col1 AS col2 FROM tab0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-4347
SELECT ALL - col1 / col2 + + col1 AS col2 FROM tab0
----
0
84
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 - col2 * - col2 col2 FROM tab2
----
2787
5278
946

query I rowsort
SELECT DISTINCT col2 FROM tab0 WHERE NOT NULL NOT IN ( + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4350
SELECT DISTINCT + tab0.col0 DIV + col2 + + col0 FROM tab0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-4350
SELECT DISTINCT + tab0.col0 / + col2 + + col0 FROM tab0
----
24
70
90

query I rowsort
SELECT + col1 + - col1 + tab2.col0 * - col2 AS col0 FROM tab2
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * tab1.col1 col2 FROM tab1
----
-1040
-640
-78

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( col2 ) >= ( NULL )
----

query I rowsort
SELECT ALL + col0 * col2 + tab0.col2 * col0 AS col2 FROM tab0
----
14596
1584
70

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT col1 BETWEEN NULL AND - col1
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT tab1.col1 * - col2 + + col0 AS col1 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT + col1 + - col0 * + 20 FROM tab0
----
-1689
-394
-603

query I rowsort
SELECT DISTINCT - + 3 * - cor0.col0 AS col1 FROM tab2, tab0, tab2 AS cor0
----
21
234
237

query I rowsort
SELECT DISTINCT + 98 AS col2 FROM tab1, tab0, tab0 AS cor0
----
98

query I rowsort
SELECT + cor0.col0 * + col1 - col2 AS col1 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT + 75 + + col0 + ( + 36 ) * col2 FROM tab0
----
1287
146
3116

query I rowsort
SELECT DISTINCT - + col0 * 48 + + col1 + - col0 * 69 FROM tab0 AS cor0
----
-10322
-2722
-3998

query I rowsort
SELECT DISTINCT cor0.col0 * + col2 + cor0.col2 * - col2 * col0 FROM tab1 AS cor0
----
-204288
-729600
-8586

query I rowsort
SELECT col0 + 92 * col1 FROM tab0 AS cor0
----
7936
8461
8959

query I rowsort
SELECT ALL - col0 + ( col1 ) * col0 - col1 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
12769
16291
9436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4366
SELECT ALL + col2 * ( + col2 ) * + cor0.col1 + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4366
SELECT ALL + col2 * ( + col2 ) * + cor0.col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * - col2 + - col1 AS col2 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT ALL + col1 + - 24 + - 50 FROM tab0 AS cor0
----
12
17
23

query I rowsort
SELECT - cor0.col2 + - col0 FROM tab2 cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT - col0 * ( col0 ) * + cor0.col0 FROM tab2 AS cor0
----
-343
-474552
-493039

onlyif mysql # use DIV operator for integer division
query I rowsort label-4371
SELECT ALL - - col1 DIV - 65 + + col2 + + col2 * - cor0.col0 FROM tab1 AS cor0
----
-108
-3591
-7584

skipif mysql # not compatible
query I rowsort label-4371
SELECT ALL - - col1 / - 65 + + col2 + + col2 * - cor0.col0 FROM tab1 AS cor0
----
-108
-3591
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col0 col0 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT - col2 + - ( + cor0.col1 ) FROM tab2 cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-4374
SELECT col2 + col1 DIV + cor0.col1 FROM tab1 cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-4374
SELECT col2 + col1 / + cor0.col1 FROM tab1 cor0
----
55
58
97

query I rowsort
SELECT DISTINCT 4 * + col0 AS col1 FROM tab0
----
140
356
96

query I rowsort
SELECT DISTINCT + col1 * ( col1 ) FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - 59 * - col0 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
11151
119652
177118

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - 81 AS REAL ) * col1 / - col1 FROM tab1 AS cor0
----
81

query I rowsort
SELECT DISTINCT ( col0 ) + + col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - 28 + col1 AS col1 FROM tab1 AS cor0
----
-15
-18
-2

query I rowsort
SELECT 36 * col1 * + cor0.col2 FROM tab1 AS cor0
----
20520
44928
50544

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4382
SELECT CAST( + col0 AS SIGNED ) + col0 AS col2 FROM tab2 AS cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort label-4382
SELECT CAST ( + col0 AS INTEGER ) + col0 AS col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL + cor0.col0 + col1 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT 13 * - ( + col0 ) AS col1 FROM tab1 AS cor0
----
-1040
-39
-832

query I rowsort
SELECT ALL + 88 * - col1 FROM tab1 AS cor0
----
-1144
-2288
-880

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4386
SELECT ALL + CAST( 72 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
72
72
72

skipif mysql # not compatible
query I rowsort label-4386
SELECT ALL + CAST ( 72 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
72
72
72

query I rowsort
SELECT DISTINCT ( + col1 ) + col2 AS col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4388
SELECT ALL + col1 - ( - col1 ) * + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4388
SELECT ALL + col1 - ( - col1 ) * + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 16 + - col1 * col1 * + col0 FROM tab2 AS cor0
----
-22847
-271534
-6743

onlyif mysql # use DIV operator for integer division
query I rowsort label-4390
SELECT ALL - col2 DIV 15 - col2 col2 FROM tab1 cor0
----
-102
-57
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4390
SELECT ALL - col2 / 15 - col2 col2 FROM tab1 cor0
----
-102
-57
-60

query I rowsort
SELECT DISTINCT - col2 * + ( col1 + ( + col0 ) ) FROM tab2 AS cor0
----
-1026
-3562
-3648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * - cor0.col1 * + col1 col2 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT DISTINCT - 31 * - col0 AS col1 FROM tab0 AS cor0
----
1085
2759
744

query I rowsort
SELECT DISTINCT + + col2 * cor0.col0 AS col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT - ( - col2 ) * - 8 AS col1 FROM tab2 AS cor0
----
-208
-216
-304

query I rowsort
SELECT DISTINCT col2 + - col0 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT - - cor0.col0 + - col1 AS col1 FROM tab0 AS cor0
----
-2
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col1 * - col0 col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + + 77 FROM tab0 AS cor0
----
77
77
77

query I rowsort
SELECT ALL - ( + col2 ) AS col1 FROM tab0
----
-1
-33
-82

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2
----
3645 values hashing to db56d052e81a1ceebb4c3aea124670be

query I rowsort
SELECT ALL - 99 + + col1 AS col2 FROM tab1 AS cor0
----
-73
-86
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4403
SELECT + - col1 * col0 DIV ( + col0 * col1 ) FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4403
SELECT + - col1 * col0 / ( + col0 * col1 ) FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + 94 * + col0 AS col0 FROM tab1 AS cor0
----
282
6016
7520

onlyif mysql # use DIV operator for integer division
query I rowsort label-4405
SELECT - - 46 DIV + cor0.col1 AS col0 FROM tab1 AS cor0
----
1
3
4

skipif mysql # not compatible
query I rowsort label-4405
SELECT - - 46 / + cor0.col1 AS col0 FROM tab1 AS cor0
----
1
3
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4406
SELECT - + 16 DIV col0 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4406
SELECT - + 16 / col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col0 * - col2 + + tab2.col0 * col2 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT + 91 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 26 * col1 * - 84 col0 FROM tab1
----
-21840
-28392
-56784

query I rowsort
SELECT + - 20 + + cor0.col1 FROM tab0 AS cor0
----
66
71
77

query I rowsort
SELECT ALL - + ( - 95 ) + col0 FROM tab1 AS cor0
----
159
175
98

query I rowsort
SELECT DISTINCT + 44 * - ( + col1 ) + col0 AS col1 FROM tab0 AS cor0
----
-3760
-3915
-4233

query I rowsort
SELECT - cor2.col2 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2, tab1 cor2
----
243 values hashing to 1d38a1a4aacea9827ed2338191291f0e

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0, tab0 cor2
----
3645 values hashing to f655b6f4c5b9ff73813030f2822ea1fd

query I rowsort
SELECT + col2 * - 47 * ( col1 ) AS col1 FROM tab0
----
-133386
-350714
-4559

query I rowsort
SELECT col1 + 18 FROM tab1
----
28
31
44

query I rowsort
SELECT DISTINCT ( - 48 ) FROM tab2
----
-48

query I rowsort
SELECT ALL 41 * + cor0.col1 + cor0.col2 * 50 AS col0 FROM tab0 AS cor0
----
4027
5176
7831

query I rowsort
SELECT - col2 * - cor0.col1 + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT col2 * + 56 AS col1 FROM tab2 AS cor0
----
1456
1512
2128

query I rowsort
SELECT + - col2 * col0 + + col2 AS col1 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT + cor0.col1 * ( + 42 ) FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to a329b7d44a2725af3687f35314083cee

query I rowsort
SELECT 66 + col0 * - col0 FROM tab1 AS cor0
----
-4030
-6334
57

query I rowsort
SELECT ALL + - 46 * col0 * col1 AS col2 FROM tab1 AS cor0
----
-29440
-3588
-47840

query I rowsort
SELECT - col1 * col2 + ( 11 ) * col0 * + ( col0 ) + - col1 FROM tab1 AS cor0
----
-1331
44476
69139

query I rowsort
SELECT 39 + + col2 FROM tab2 AS cor0
----
65
66
77

query I rowsort
SELECT - + 90 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to f6f26b9a04da14807208b93d507095c5

query I rowsort
SELECT - - col1 + + col2 + 37 AS col2 FROM tab2 AS cor0
----
122
92
95

query I rowsort
SELECT + col0 + - ( col1 ) * cor0.col1 * - col2 FROM tab1 AS cor0
----
16304
36507
5764

query I rowsort
SELECT + ( - col2 ) * ( + ( col1 ) ) AS col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT 7 + - col2 * - ( + 60 * + col2 ) AS col1 FROM tab2
----
40567
43747
86647

query I rowsort
SELECT + col1 * 87 AS col1 FROM tab2 AS cor0
----
1479
2697
5133

query I rowsort
SELECT ALL - + col1 + - col1 + + cor0.col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + 82 * + 58 AS col1 FROM tab2, tab1 AS cor0
----
4756

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4435
SELECT + col1 + CAST( + col1 AS SIGNED ) * cor0.col2 + 7 AS col0 FROM tab1 AS cor0
----
1268
1437
587

skipif mysql # not compatible
query I rowsort label-4435
SELECT + col1 + CAST ( + col1 AS INTEGER ) * cor0.col2 + 7 AS col0 FROM tab1 AS cor0
----
1268
1437
587

query I rowsort
SELECT DISTINCT col1 * + 4 FROM tab0 AS cor0
----
344
364
388

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4437
SELECT col2 + - CAST( NULL AS SIGNED ) * + 39 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4437
SELECT col2 + - CAST ( NULL AS INTEGER ) * + 39 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab1.col1 * - col1 + + col2 + + col2 AS col2 FROM tab1
----
-568
14
23

query I rowsort
SELECT ALL col2 + 56 AS col2 FROM tab2
----
82
83
94

query I rowsort
SELECT DISTINCT + col2 * - col2 + col2 * col1 FROM tab1 AS cor0
----
-1512
-2679
-7968

query I rowsort
SELECT ALL 27 FROM tab1, tab2 cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT DISTINCT + col1 + 81 + + tab0.col1 FROM tab0
----
253
263
275

query I rowsort
SELECT DISTINCT - col0 + ( - col2 ) * col0 * col2 FROM tab0
----
-26160
-598525
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-4444
SELECT col1 + - ( col0 ) DIV + col1 AS col1 FROM tab1
----
26
4
7

skipif mysql # not compatible
query I rowsort label-4444
SELECT col1 + - ( col0 ) / + col1 AS col1 FROM tab1
----
26
4
7

query I rowsort
SELECT - col0 + + col1 * - 92 AS col0 FROM tab1
----
-1276
-2395
-984

query I rowsort
SELECT DISTINCT + ( - col1 ) * col1 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - 72 AS col1 FROM tab2
----
-72

query I rowsort
SELECT DISTINCT col0 * col1 + - 1 AS col0 FROM tab2 AS cor0
----
1342
216
4601

query I rowsort
SELECT - cor0.col1 * col1 - 9 * col0 AS col0 FROM tab0 AS cor0
----
-7612
-9082
-9724

onlyif mysql # use DIV operator for integer division
query I rowsort label-4450
SELECT + col2 * - cor0.col2 + 34 DIV - col1 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-4450
SELECT + col2 * - cor0.col2 + 34 / - col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - col1 * - col0 + ( - 4 ) * cor0.col2 FROM tab2 AS cor0
----
109
1191
4498

query I rowsort
SELECT DISTINCT - 64 * tab2.col0 * + col0 AS col1 FROM tab2
----
-3136
-389376
-399424

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col2 col0 FROM tab0
----
53
9
96

query I rowsort
SELECT 91 * col1 - + col1 * - col0 AS col0 FROM tab0 AS cor0
----
12222
16380
9890

query I rowsort
SELECT - col2 * - col1 + 92 * - 20 * + col1 AS col1 FROM tab1 AS cor0
----
-17830
-22672
-46436

query I rowsort
SELECT ( col0 ) + - col1 + col2 AS col0 FROM tab0 AS cor0
----
-29
-61
80

query I rowsort
SELECT DISTINCT - ( col0 ) * - col2 + - col2 FROM tab2 cor0
----
162
2002
2964

query I rowsort
SELECT ALL + + 46 * - 19 FROM tab2 AS cor0
----
-874
-874
-874

query I rowsort
SELECT ALL cor0.col2 + - 44 FROM tab1 AS cor0
----
10
13
52

query I rowsort
SELECT DISTINCT + + ( col0 ) AS col0 FROM tab2 cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 57 * ( - cor0.col0 ) col2 FROM tab0 AS cor0
----
-1368
-1995
-5073

query I rowsort
SELECT ALL - ( + col1 ) * + col0 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL 32 FROM tab2, tab2 cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT - ( - 17 ) AS col0 FROM tab1
----
17
17
17

query I rowsort
SELECT ALL + - col0 + cor0.col0 * + col2 AS col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL tab0.col1 + + tab0.col2 FROM tab0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4468
SELECT ALL - col0 * col2 + - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4468
SELECT ALL - col0 * col2 + - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4469
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab1 AS cor0, tab1 cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-4469
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab1 AS cor0, tab1 cor1
----
NULL

query I rowsort
SELECT ALL - 34 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 5b88331e40da4796cc4826c442aa45f7

query I rowsort
SELECT ( col1 ) + 91 AS col2 FROM tab1
----
101
104
117

query I rowsort
SELECT DISTINCT col1 + ( col0 + + col0 ) FROM tab0 AS cor0
----
134
167
269

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * - col1 col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL - - cor0.col1 * 45 + col0 * - col2 AS col1 FROM tab1 AS cor0
----
-3198
-7095
1008

query I rowsort
SELECT DISTINCT - col2 + 69 FROM tab1 AS cor0
----
-27
12
15

query I rowsort
SELECT + col1 * + ( col0 ) + col2 * + col2 FROM tab1 AS cor0
----
10256
2994
3889

query I rowsort
SELECT - ( col2 ) * - 18 AS col2 FROM tab0
----
1476
18
594

query I rowsort
SELECT DISTINCT + col0 * col0 + col0 FROM tab0
----
1260
600
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-4479
SELECT + 54 * col1 + ( tab2.col2 ) DIV + tab2.col0 + ( tab2.col2 ) * - col2 * + 55 AS col1 FROM tab2
----
-33994
-38418
-78502

skipif mysql # not compatible
query I rowsort label-4479
SELECT + 54 * col1 + ( tab2.col2 ) / + tab2.col0 + ( tab2.col2 ) * - col2 * + 55 AS col1 FROM tab2
----
-33994
-38418
-78502

query I rowsort
SELECT + 69 + col1 FROM tab1
----
79
82
95

query I rowsort
SELECT ALL + col0 * + tab1.col1 + col1 * tab1.col1 FROM tab1
----
1209
740
754

query I rowsort
SELECT DISTINCT - 77 * col1 + - col0 + col1 AS col2 FROM tab2
----
-1371
-2363
-4562

query I rowsort
SELECT DISTINCT - col0 + - col2 + col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL col2 + ( + col2 ) AS col2 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4485
SELECT ALL tab2.col0 * + CAST( + 84 AS SIGNED ) AS col0 FROM tab2
----
588
6552
6636

skipif mysql # not compatible
query I rowsort label-4485
SELECT ALL tab2.col0 * + CAST ( + 84 AS INTEGER ) AS col0 FROM tab2
----
588
6552
6636

query I rowsort
SELECT col0 + - ( - col2 ) FROM tab0
----
171
36
57

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-4488
SELECT + col1 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-4488
SELECT + col1 / + col2 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * + col1 * 57 AS col2 FROM tab2 AS cor0
----
16473
198417
54777

query I rowsort
SELECT - col2 + 17 * - col1 FROM tab0 AS cor0
----
-1495
-1629
-1650

onlyif mysql # use DIV operator for integer division
query I rowsort label-4491
SELECT col2 DIV 19 FROM tab0 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-4491
SELECT col2 / 19 FROM tab0 AS cor0
----
0
1
4

query I rowsort
SELECT ALL - col0 + + 16 AS col1 FROM tab2 AS cor0
----
-62
-63
9

query I rowsort
SELECT DISTINCT cor0.col0 * 64 + + cor0.col2 FROM tab1 AS cor0
----
246
4153
5216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - 29 col0 FROM tab2 AS cor0
----
-46
-60
-88

query I rowsort
SELECT DISTINCT - + col1 * 64 AS col1 FROM tab2 AS cor0
----
-1088
-1984
-3776

query I rowsort
SELECT DISTINCT - - col2 + ( ( + col1 ) ) FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - 70 FROM tab0, tab1 AS cor0
----
-70

query I rowsort
SELECT - cor0.col1 * ( + col2 ) + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT col1 * col2 + + 13 * + cor0.col0 FROM tab0 AS cor0
----
3150
552
8619

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + cor0.col1 * + CAST ( 7 * col2 AS REAL ) AS col1 FROM tab2 AS cor0
----
10738
4522
5859

query I rowsort
SELECT DISTINCT cor0.col1 + ( - col2 ) FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + + col1 + + 8 FROM tab1 AS cor0
----
18
21
34

query I rowsort
SELECT ( - col1 ) + - col0 * - 68 AS col2 FROM tab1 AS cor0
----
178
4342
5427

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4504
SELECT CAST( 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-4504
SELECT CAST ( col1 AS INTEGER ) col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL 40 + + ( - col1 ) FROM tab0 AS cor0
----
-46
-51
-57

query I rowsort
SELECT 51 * + col1 + col0 FROM tab2 AS cor0
----
1588
3087
946

query I rowsort
SELECT + ( 74 ) * - col0 + + 58 AS col0 FROM tab0 AS cor0
----
-1718
-2532
-6528

query I rowsort
SELECT col2 * + 6 AS col2 FROM tab1 AS cor0
----
324
342
576

query I rowsort
SELECT + col0 * cor0.col0 + + col0 AS col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT + col0 + 11 * + col0 FROM tab2 AS cor0
----
84
936
948

query I rowsort
SELECT + 52 - - col0 FROM tab0 AS cor0
----
141
76
87

query I rowsort
SELECT DISTINCT - cor0.col1 + - col1 AS col0 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT - col1 * + col2 + ( - col2 * col0 ) AS col1 FROM tab2 AS cor0
----
-1026
-3562
-3648

query I rowsort
SELECT + 41 * + col1 - + 82 AS col0 FROM tab2 AS cor0
----
1189
2337
615

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 88 - col1 col2 FROM tab0 cor0
----
-174
-179
-185

query I rowsort
SELECT - 70 * col1 * - col0 + - 82 FROM tab2 AS cor0
----
15108
322058
93928

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4517
SELECT - + col2 + cor0.col2 * CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4517
SELECT - + col2 + cor0.col2 * CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( col0 ) * col0 col1 FROM tab2 cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-4519
SELECT + col2 DIV + col2 + CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4519
SELECT + col2 / + col2 + CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
2
34
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 57 * + col1 + col2 * col2 * + col1 + - ( col1 ) * col1 col1 FROM tab0 AS cor0
----
-3783
608790
91160

query I rowsort
SELECT - + col2 - + col0 FROM tab2 cor0
----
-104
-117
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - ( col2 * cor0.col1 ) + - col2 col2 FROM tab2 AS cor0
----
10944
25920
90480

query I rowsort
SELECT - - col1 * - 84 + - col0 AS col2 FROM tab0 AS cor0
----
-7248
-7733
-8183

query I rowsort
SELECT DISTINCT - col2 * + col0 + col1 + col2 FROM tab1
----
-3581
-7571
-82

query I rowsort
SELECT ALL - 27 * col0 + col2 FROM tab0
----
-2321
-615
-944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4526
SELECT ALL - - col2 + - col1 + CAST( 76 AS SIGNED ) FROM tab0 AS cor0
----
-20
23
67

skipif mysql # not compatible
query I rowsort label-4526
SELECT ALL - - col2 + - col1 + CAST ( 76 AS INTEGER ) FROM tab0 AS cor0
----
-20
23
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-4527
SELECT ALL + col1 DIV + col1 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4527
SELECT ALL + col1 / + col1 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - + 43 * col0 + col2 AS col0 FROM tab2 AS cor0
----
-274
-3328
-3359

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 2 + + col0 col0 FROM tab1 AS cor0
----
5
66
82

query I rowsort
SELECT + col2 * col1 + - col0 + - col2 * col1 AS col2 FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col2 col0 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT - 8 + + cor0.col2 FROM tab1 AS cor0
----
46
49
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 46 * - col0 col0 FROM tab2 AS cor0
----
-322
-3588
-3634

query I rowsort
SELECT DISTINCT col1 * + ( + col2 + - 30 ) FROM tab1
----
270
624
858

onlyif mysql # use DIV operator for integer division
query I rowsort label-4535
SELECT ALL col0 DIV tab2.col1 AS col2 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-4535
SELECT ALL col0 / tab2.col1 AS col2 FROM tab2
----
0
1
4

query I rowsort
SELECT + ( - col1 ) * + col2 AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - - ( + col2 ) + + col1 + - 59 AS col0 FROM tab1 AS cor0
----
21
50
8

query I rowsort
SELECT 36 + + col2 FROM tab0
----
118
37
69

query I rowsort
SELECT - 51 FROM tab2, tab1 AS cor0
----
9 values hashing to 08d3853e39924d3c636260a6dd856837

query I rowsort
SELECT ALL col0 * ( col0 + - col0 * - col0 ) AS col2 FROM tab1
----
266240
36
518400

query I rowsort
SELECT ALL cor0.col2 + + 27 FROM tab0, tab1 AS cor0
----
9 values hashing to 1e9059db3beed2ccbd08179e5e7e0280

query I rowsort
SELECT - 53 - col1 * col1 AS col1 FROM tab2
----
-1014
-342
-3534

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to f9101173abc9e524c6310e6c0eeefb0c

onlyif mysql # use DIV operator for integer division
query I rowsort label-4544
SELECT - ( ( cor0.col1 ) ) + - col2 + 56 * col0 DIV 80 FROM tab1 AS cor0
----
-23
-53
-78

skipif mysql # not compatible
query I rowsort label-4544
SELECT - ( ( cor0.col1 ) ) + - col2 + 56 * col0 / 80 FROM tab1 AS cor0
----
-23
-53
-78

query I rowsort
SELECT - col2 + + 12 AS col1 FROM tab0 AS cor0
----
-21
-70
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-4546
SELECT ALL tab1.col1 DIV 20 - col1 AS col0 FROM tab1
----
-10
-13
-25

skipif mysql # not compatible
query I rowsort label-4546
SELECT ALL tab1.col1 / 20 - col1 AS col0 FROM tab1
----
-10
-13
-25

query I rowsort
SELECT - 15 + - ( + col2 ) + - col2 FROM tab0
----
-17
-179
-81

query I rowsort
SELECT ALL - ( + cor0.col1 ) * - cor0.col0 + + 94 FROM tab1 AS cor0
----
1134
172
734

query I rowsort
SELECT - 95 * - col1 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
8084
8554
9118

query I rowsort
SELECT DISTINCT 36 + col0 * col0 FROM tab0 AS cor0
----
1261
612
7957

query I rowsort
SELECT ALL ( cor0.col1 ) * + col2 + + ( - col1 + - col0 ) * + ( 64 ) AS col0 FROM tab0 AS cor0
----
-4058
-4202
-8351

query I rowsort
SELECT ALL - 2 * + col1 + + col0 - + col1 FROM tab0 AS cor0
----
-184
-234
-256

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * - cor0.col0 + + col0 * + col2 - 62 col2 FROM tab1 AS cor0
----
-62
-62
-62

query I rowsort
SELECT - - 61 * - col0 + cor0.col1 FROM tab2 AS cor0
----
-396
-4699
-4802

query I rowsort
SELECT + + col1 * - cor0.col0 + + col2 * cor0.col2 AS col1 FROM tab2 AS cor0
----
-3926
101
512

query I rowsort
SELECT cor0.col2 * - col0 * cor0.col2 + 39 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-205440
-734160
-8631

query I rowsort
SELECT ALL 11 * col0 FROM tab2 cor0
----
77
858
869

query I rowsort
SELECT 70 FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT DISTINCT + + ( col1 ) + 94 * col1 AS col2 FROM tab1 AS cor0
----
1235
2470
950

query I rowsort
SELECT DISTINCT - col2 * 16 * col2 FROM tab0 AS cor0
----
-107584
-16
-17424

query I rowsort
SELECT + + col1 * - ( cor0.col2 * col2 ) FROM tab0 AS cor0
----
-611884
-93654
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4562
SELECT ALL - col0 - + col1 DIV - col0 AS col0 FROM tab2 AS cor0
----
-3
-78
-79

skipif mysql # not compatible
query I rowsort label-4562
SELECT ALL - col0 - + col1 / - col0 AS col0 FROM tab2 AS cor0
----
-3
-78
-79

query I rowsort
SELECT + 64 * + col0 * - col1 AS col0 FROM tab2 AS cor0
----
-13888
-294528
-85952

onlyif mysql # use DIV operator for integer division
query I rowsort label-4564
SELECT ALL - 92 * col2 DIV cor0.col1 + + col2 AS col1 FROM tab0 AS cor0
----
-2
0
1

skipif mysql # not compatible
query I rowsort label-4564
SELECT ALL - 92 * col2 / cor0.col1 + + col2 AS col1 FROM tab0 AS cor0
----
-2
0
1

query I rowsort
SELECT 7 + col2 * - col0 * - 57 FROM tab2 AS cor0
----
10780
115603
171121

query I rowsort
SELECT ALL + + ( + col0 ) * - col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL + col1 * 81 + + cor0.col1 AS col1 FROM tab1 AS cor0
----
1066
2132
820

query I rowsort
SELECT ALL + 88 * col1 AS col0 FROM tab0 AS cor0
----
7568
8008
8536

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4569
SELECT col0 - + CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4569
SELECT col0 - + CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 * + col1 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + cor0.col1 * - col2 + 37 AS col2 FROM tab2 AS cor0
----
-1497
-609
-800

query I rowsort
SELECT ALL + - col2 * - col2 AS col1 FROM tab2 cor0
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-4573
SELECT + col0 * col2 + col1 + + col2 * col1 DIV col0 FROM tab2 AS cor0
----
2106
3027
339

skipif mysql # not compatible
query I rowsort label-4573
SELECT + col0 * col2 + col1 + + col2 * col1 / col0 FROM tab2 AS cor0
----
2106
3027
339

onlyif mysql # use DIV operator for integer division
query I rowsort label-4574
SELECT ALL - + 74 DIV col0 - 97 * col2 FROM tab2 AS cor0
----
-2522
-2629
-3686

skipif mysql # not compatible
query I rowsort label-4574
SELECT ALL - + 74 / col0 - 97 * col2 FROM tab2 AS cor0
----
-2522
-2629
-3686

query I rowsort
SELECT DISTINCT - 53 * col1 FROM tab1 AS cor0
----
-1378
-530
-689

query I rowsort
SELECT col1 * + 14 AS col2 FROM tab2 AS cor0
----
238
434
826

query I rowsort
SELECT + col1 * col2 + ( - 85 * col2 ) AS col1 FROM tab0
----
12
33
492

query I rowsort
SELECT DISTINCT cor0.col0 - col0 AS col2 FROM tab2 cor0
----
0

query I rowsort
SELECT ALL + - 58 + + col1 FROM tab0 cor0
----
28
33
39

query I rowsort
SELECT DISTINCT col2 * - 68 AS col2 FROM tab2 AS cor0
----
-1768
-1836
-2584

query I rowsort
SELECT ALL 93 + col0 * + col1 FROM tab1 AS cor0
----
1133
171
733

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 68 * col1 col0 FROM tab2 AS cor0
----
-1156
-2108
-4012

query I rowsort
SELECT ALL - + ( + 74 ) + + col1 * 55 AS col1 FROM tab0 cor0
----
4656
4931
5261

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - 61 * - col2 + col1 * - 48 col0 FROM tab0 AS cor0
----
-2091
-4560
723

query I rowsort
SELECT DISTINCT - 53 * col1 AS col1 FROM tab2 AS cor0
----
-1643
-3127
-901

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - ( col1 ) col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - + ( + 39 ) * cor0.col2 + + col0 FROM tab1 AS cor0
----
-2103
-2159
-3664

query I rowsort
SELECT + col0 * + ( col2 ) + col1 + col0 AS col0 FROM tab0 AS cor0
----
167
7478
902

query I rowsort
SELECT DISTINCT col2 * tab0.col1 - 90 AS col0 FROM tab0
----
2748
7
7372

onlyif mysql # use DIV operator for integer division
query I rowsort label-4590
SELECT col2 DIV + 94 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4590
SELECT col2 / + 94 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT - tab0.col2 - - ( 91 ) * tab0.col1 AS col2 FROM tab0
----
7793
8199
8826

query I rowsort
SELECT ALL + col2 + + 0 - col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT + tab0.col0 + - col1 * - col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT + 84 + + col0 FROM tab1
----
148
164
87

query I rowsort
SELECT DISTINCT - - 46 * - col0 FROM tab0 AS cor0
----
-1104
-1610
-4094

query I rowsort
SELECT + col2 * + ( col1 ) - col0 AS col2 FROM tab2 AS cor0
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( - cor0.col2 ) * col1 col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + ( col1 ) * - col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - - 99 + - cor0.col0 FROM tab2 AS cor0
----
20
21
92

query I rowsort
SELECT ALL - + 24 * 93 FROM tab2 AS cor0
----
-2232
-2232
-2232

query I rowsort
SELECT ALL ( - ( + col2 ) ) + col0 AS col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT tab1.col1 + - 35 FROM tab1
----
-22
-25
-9

query I rowsort
SELECT + + ( + col1 ) * - col2 + col2 * col0 FROM tab1 AS cor0
----
-1242
3078
6432

query I rowsort
SELECT - col0 * + 98 FROM tab2
----
-686
-7644
-7742

onlyif mysql # use DIV operator for integer division
query I rowsort label-4605
SELECT - col1 * col2 DIV col0 FROM tab1
----
-15
-468
-8

skipif mysql # not compatible
query I rowsort label-4605
SELECT - col1 * col2 / col0 FROM tab1
----
-15
-468
-8

query I rowsort
SELECT - col2 + - col1 * col0 FROM tab0
----
-2097
-3396
-8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4607
SELECT ALL + CAST( NULL AS SIGNED ) + - col1 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4607
SELECT ALL + CAST ( NULL AS INTEGER ) + - col1 AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4608
SELECT ALL CAST( col0 AS SIGNED ) * + col0 * col0 + + col2 FROM tab1
----
262201
512096
81

skipif mysql # not compatible
query I rowsort label-4608
SELECT ALL CAST ( col0 AS INTEGER ) * + col0 * col0 + + col2 FROM tab1
----
262201
512096
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4609
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + 87 + col0 / col0 + + col1 AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4609
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + 87 + col0 / col0 + + col1 AS col1 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT col0 + ( + col1 ) AS col0 FROM tab1
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4611
SELECT DISTINCT + col0 + - col2 * - col2 DIV cor0.col2 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-4611
SELECT DISTINCT + col0 + - col2 * - col2 / cor0.col2 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4612
SELECT + + col1 * col1 - cor0.col2 DIV - cor0.col1 FROM tab0 AS cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-4612
SELECT + + col1 * col1 - cor0.col2 / - cor0.col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL col0 * col1 + + col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT - 74 + col0 AS col0 FROM tab2 AS cor0
----
-67
4
5

query I rowsort
SELECT ALL + 21 + col2 FROM tab1 AS cor0
----
117
75
78

query I rowsort
SELECT - 57 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 520dc393896969e02a72ab6c5d92126b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 - ( - ( - col2 ) ) * col2 col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT cor0.col2 * col0 * ( - col2 ) AS col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL + col0 * - col0 + col2 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT + + col2 * cor0.col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL col0 + ( - col2 ) + + col2 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - col0 * + tab2.col0 AS col1 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + col0 * ( + 82 * cor0.col0 ) + + cor0.col2 AS col1 FROM tab0 cor0
----
100451
47265
649604

query I rowsort
SELECT ALL + col1 * col2 - + cor0.col2 * col2 * + cor0.col0 FROM tab1 AS cor0
----
-207366
-7344
-736032

onlyif mysql # use DIV operator for integer division
query I rowsort label-4625
SELECT DISTINCT + col0 DIV 42 FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-4625
SELECT DISTINCT + col0 / 42 FROM tab2 AS cor0
----
0
1

query I rowsort
SELECT - + ( - col0 ) * col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT - col0 * + cor0.col0 - - col1 * col2 * col2 AS col2 FROM tab1 AS cor0
----
113408
28394
75807

query I rowsort
SELECT - col0 * - col0 * col0 FROM tab1 AS cor0
----
262144
27
512000

query I rowsort
SELECT - col1 - + 77 AS col1 FROM tab2 AS cor0
----
-108
-136
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4630
SELECT + col2 * ( col1 ) + col1 * - CAST( - 21 AS SIGNED ) * + col0 AS col2 FROM tab1 AS cor0
----
14010
23088
3042

skipif mysql # not compatible
query I rowsort label-4630
SELECT + col2 * ( col1 ) + col1 * - CAST ( - 21 AS INTEGER ) * + col0 AS col2 FROM tab1 AS cor0
----
14010
23088
3042

query I rowsort
SELECT + col2 * 39 * 73 - + col1 FROM tab1 AS cor0
----
153712
162269
273299

query I rowsort
SELECT col2 * col1 + col2 + col2 FROM tab2 AS cor0
----
1586
722
891

query I rowsort
SELECT - + col2 + - col2 * col2 AS col2 FROM tab0 AS cor0
----
-1122
-2
-6806

query I rowsort
SELECT + + col0 + col1 * - 36 AS col1 FROM tab1 AS cor0
----
-296
-388
-933

query I rowsort
SELECT DISTINCT + col2 + 91 AS col0 FROM tab2 cor0
----
117
118
129

query I rowsort
SELECT 65 * - tab2.col2 * - ( - col1 ) AS col1 FROM tab2
----
-41990
-54405
-99710

query I rowsort
SELECT - + col2 * - ( col2 ) FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL col0 * ( - col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4639
SELECT DISTINCT + col0 + 16 DIV - col1 AS col1 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-4639
SELECT DISTINCT + col0 + 16 / - col1 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - tab0.col1 - - col0 AS col2 FROM tab0
----
-2
-62

query I rowsort
SELECT ALL + 17 AS col0 FROM tab2
----
17
17
17

query I rowsort
SELECT - col1 * col2 + 79 FROM tab0 AS cor0
----
-18
-2759
-7383

query I rowsort
SELECT - ( col0 ) * col2 * 26 AS col2 FROM tab1 cor0
----
-199680
-4212
-94848

query I rowsort
SELECT + + ( cor0.col2 ) * - cor0.col1 * - col2 FROM tab1 cor0
----
119808
32490
75816

query I rowsort
SELECT - + 88 AS col0 FROM tab0 AS cor0
----
-88
-88
-88

query I rowsort
SELECT ALL 12 AS col1 FROM tab0
----
12
12
12

query I rowsort
SELECT ALL - col0 * ( + col1 ) FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4648
SELECT ALL + col2 + + 12 DIV col0 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4648
SELECT ALL + col2 + + 12 / col0 FROM tab0
----
1
33
82

query I rowsort
SELECT col1 * col0 + + ( + col0 ) FROM tab1
----
1120
704
81

query I rowsort
SELECT ALL + + col2 * ( + cor0.col0 * col2 ) FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT DISTINCT 94 AS col2 FROM tab0, tab0 AS cor0
----
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-4652
SELECT DISTINCT - + col1 DIV col0 - 96 DIV + col0 AS col2 FROM tab1 AS cor0
----
-1
-40

skipif mysql # not compatible
query I rowsort label-4652
SELECT DISTINCT - + col1 / col0 - 96 / + col0 AS col2 FROM tab1 AS cor0
----
-1
-40

query I rowsort
SELECT ALL + col0 * + ( 52 ) AS col0 FROM tab0 AS cor0
----
1248
1820
4628

query I rowsort
SELECT - col0 * ( + col1 ) AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT col1 * col1 + col2 AS col2 FROM tab2
----
327
3507
988

query I rowsort
SELECT + - col2 * col1 + cor0.col1 + + col1 FROM tab2 AS cor0
----
-1416
-612
-775

query I rowsort
SELECT ALL - ( - col0 ) + col0 AS col0 FROM tab0
----
178
48
70

query I rowsort
SELECT DISTINCT col0 * col0 + - tab2.col0 * - col0 FROM tab2
----
12168
12482
98

query I rowsort
SELECT 77 + + ( + col0 ) FROM tab1
----
141
157
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4660
SELECT - ( + col2 ) * col2 DIV - 65 + + 81 * col2 FROM tab0 AS cor0
----
2689
6745
81

skipif mysql # not compatible
query I rowsort label-4660
SELECT - ( + col2 ) * col2 / - 65 + + 81 * col2 FROM tab0 AS cor0
----
2689
6745
81

query I rowsort
SELECT + col1 * - col2 + - col2 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT + + col0 * + col1 + col1 * + col2 AS col1 FROM tab0 AS cor0
----
15561
3492
4902

query I rowsort
SELECT DISTINCT + 77 AS col2 FROM tab0, tab2 AS cor0
----
77

query I rowsort
SELECT - - col0 + - ( col0 ) + col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab0 cor2
----
17
31
59

query I rowsort
SELECT DISTINCT col2 + + col1 AS col0 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT - + cor0.col2 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT 10 + col2 * + col0 * + col2 AS col2 FROM tab1 AS cor0
----
207946
737290
8758

query I rowsort
SELECT + + col1 + - col2 * ( - col0 ) * col1 FROM tab0 AS cor0
----
3492
664209
68198

query I rowsort
SELECT - 93 + + col0 AS col2 FROM tab0 AS cor0
----
-4
-58
-69

query I rowsort
SELECT ALL + - col2 - + col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT ( col1 ) + 60 FROM tab0 AS cor0
----
146
151
157

query I rowsort
SELECT ALL - + 30 FROM tab0 AS cor0
----
-30
-30
-30

onlyif mysql # use DIV operator for integer division
query I rowsort label-4674
SELECT ALL - ( col0 ) DIV + cor0.col1 AS col2 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-4674
SELECT ALL - ( col0 ) / + cor0.col1 AS col2 FROM tab2 cor0
----
-1
-4
0

query I rowsort
SELECT - + cor0.col0 + col0 + - ( - col2 + col0 ) AS col0 FROM tab0 cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 16 col0 FROM tab2, tab1 AS cor0
----
9 values hashing to be22ac76b42c6f7212ecc0ba7c89eb34

query I rowsort
SELECT ALL + + col1 + - cor0.col0 * + cor0.col0 * + cor0.col0 + - col0 AS col1 FROM tab1 AS cor0
----
-262198
-4
-512067

query I rowsort
SELECT - 23 + col1 AS col1 FROM tab2 AS cor0
----
-6
36
8

query I rowsort
SELECT DISTINCT - ( - cor0.col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - 27 * + col1 + + cor0.col0 * col2 + col2 FROM tab2 AS cor0
----
-621
2581
461

query I rowsort
SELECT 48 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4682
SELECT DISTINCT + - col0 + - col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4682
SELECT DISTINCT + - col0 + - col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4683
SELECT + - col0 + col2 DIV 67 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-4683
SELECT + - col0 + col2 / 67 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + - ( col2 ) + - col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL - 97 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to e4a6bd848a69226cbb7ad3d154be321b

query I rowsort
SELECT + - col0 * + col2 + 4 AS col0 FROM tab2 AS cor0
----
-185
-2024
-2998

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col2 col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - - col0 * 34 FROM tab0 AS cor0
----
1190
3026
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-4689
SELECT ALL + col0 DIV 78 + col1 + col0 col1 FROM tab0 AS cor0
----
110
132
181

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4689
SELECT ALL + col0 / 78 + col1 + col0 col1 FROM tab0 AS cor0
----
110
132
181

query I rowsort
SELECT - col0 + col1 * cor0.col2 FROM tab1 AS cor0
----
1168
1401
506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col1 * - col2 col2 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT - + 45 + - ( col0 * - 25 ) AS col0 FROM tab0 AS cor0
----
2180
555
830

query I rowsort
SELECT ( 77 ) FROM tab1 AS cor0
----
77
77
77

query I rowsort
SELECT + + 48 + col2 * + col1 FROM tab1 AS cor0
----
1296
1452
618

query I rowsort
SELECT DISTINCT + + 55 + col0 + col0 AS col0 FROM tab2 AS cor0
----
211
213
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4696
SELECT DISTINCT - + CAST( + col0 AS SIGNED ) FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-4696
SELECT DISTINCT - + CAST ( + col0 AS INTEGER ) FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - col0 - + col2 * col1 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT - col2 * col2 + + col2 * col0 * - col1 AS col1 FROM tab0 cor0
----
-3396
-670842
-69201

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - ( col1 ) ) + ( - cor0.col2 ) * - col2 col2 FROM tab1 cor0
----
2942
3259
9229

query I rowsort
SELECT col0 * 42 - + col2 FROM tab2 AS cor0
----
267
3250
3280

onlyif mysql # use DIV operator for integer division
query I rowsort label-4701
SELECT DISTINCT - col1 DIV 95 - - col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4701
SELECT DISTINCT - col1 / 95 - - col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT 99 + 37 AS col1 FROM tab2 AS cor0
----
136

onlyif mysql # use DIV operator for integer division
query I rowsort label-4703
SELECT + col2 * col0 DIV + col0 AS col2 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4703
SELECT + col2 * col0 / + col0 AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT tab2.col2 + + ( col0 * + col2 ) + - tab2.col1 * - col2 * + col2 FROM tab2
----
22815
27588
41938

query I rowsort
SELECT - 1 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT ALL + ( 10 ) * col2 AS col1 FROM tab2 AS cor0
----
260
270
380

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 FROM tab2, tab0 AS cor0
----
172
182
194

query I rowsort
SELECT + 36 * 58 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to dd59006e6f4e385f3dae4c410b1dca9e

query I rowsort
SELECT - col2 * - 40 AS col1 FROM tab0 AS cor0
----
1320
3280
40

query I rowsort
SELECT - 98 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to f17b7008a7deae1eb5a2e707ec237638

query I rowsort
SELECT DISTINCT + ( col2 ) + col1 AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT - 8 AS col2 FROM tab1, tab2 AS cor0
----
-8

query I rowsort
SELECT - cor0.col1 * - col1 + - col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT DISTINCT ( + col2 + tab2.col2 ) * + 64 FROM tab2
----
3328
3456
4864

onlyif mysql # use DIV operator for integer division
query I rowsort label-4715
SELECT + 54 * col1 DIV col0 FROM tab0
----
149
193
55

skipif mysql # not compatible
query I rowsort label-4715
SELECT + 54 * col1 / col0 FROM tab0
----
149
193
55

query I rowsort
SELECT DISTINCT cor1.col2 AS col2 FROM tab2, tab1 cor0, tab2 AS cor1
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4717
SELECT 94 * col1 DIV + col1 FROM tab0
----
94
94
94

skipif mysql # not compatible
query I rowsort label-4717
SELECT 94 * col1 / + col1 FROM tab0
----
94
94
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-4718
SELECT - col1 * col2 DIV col1 AS col1 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4718
SELECT - col1 * col2 / col1 AS col1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT - - col2 + + ( + col0 ) * - col1 FROM tab2 AS cor0
----
-1305
-190
-4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-4720
SELECT + + col2 + cor0.col0 DIV col1 FROM tab1 AS cor0
----
102
54
63

skipif mysql # not compatible
query I rowsort label-4720
SELECT + + col2 + cor0.col0 / col1 FROM tab1 AS cor0
----
102
54
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col2 + - tab1.col0 * ( - tab1.col2 + col1 ) col2 FROM tab1
----
-241
-2576
-2832

onlyif mysql # use DIV operator for integer division
query I rowsort label-4722
SELECT + col1 DIV + ( + 84 ) AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4722
SELECT + col1 / + ( + 84 ) AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 55 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT DISTINCT - - 79 FROM tab1, tab0, tab1 AS cor0
----
79

query I rowsort
SELECT tab1.col2 * ( - cor0.col1 ) AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to a8ce768203b74f299b6ebad5477b14c1

query I rowsort
SELECT DISTINCT tab1.col2 * col2 * - col0 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT - col1 + + col0 AS col1 FROM tab2 cor0
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 11 col2 FROM tab2 AS cor0
----
-286
-297
-418

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * ( col1 ) + col1 col0 FROM tab0 cor0
----
7482
8372
9506

query I rowsort
SELECT - - col2 * - ( cor0.col0 ) FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + 62 * col0 + + 22 AS col0 FROM tab2
----
456
4858
4920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + 78 col1 FROM tab1 cor0
----
132
135
174

query I rowsort
SELECT + col0 + + cor0.col1 * + col2 * + col0 AS col2 FROM tab0 AS cor0
----
3430
664207
68136

query I rowsort
SELECT ALL - - col1 + 43 AS col1 FROM tab2 AS cor0
----
102
60
74

query I rowsort
SELECT ALL + col2 + + ( - col0 ) * col1 * + col1 FROM tab0 AS cor0
----
-177471
-329314
-736927

query I rowsort
SELECT - col2 + + col1 * - col1 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT - col0 * - 92 AS col0 FROM tab2 AS cor0
----
644
7176
7268

query I rowsort
SELECT + cor0.col0 - col1 AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT cor0.col2 * col2 * - col2 AS col1 FROM tab1 AS cor0
----
-157464
-185193
-884736

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col1 + - CAST ( + col2 AS REAL ) * col2 col1 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT - cor0.col2 * - col2 - + cor0.col1 * col1 AS col0 FROM tab2 AS cor0
----
-232
-2805
1155

query I rowsort
SELECT ALL - + col1 + cor0.col2 AS col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT + col1 * col0 * col0 + + col2 FROM tab2 AS cor0
----
106135
1546
358982

query I rowsort
SELECT - + col0 * - col1 + col2 * 74 AS col0 FROM tab0 AS cor0
----
14167
3469
4506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4745
SELECT ALL CAST( NULL AS SIGNED ) + + 2 * - cor0.col1 * col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4745
SELECT ALL CAST ( NULL AS INTEGER ) + + 2 * - cor0.col1 * col0 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4746
SELECT DISTINCT + ( cor0.col2 ) + col2 * CAST( col2 AS SIGNED ) AS col0 FROM tab1 cor0
----
2970
3306
9312

skipif mysql # not compatible
query I rowsort label-4746
SELECT DISTINCT + ( cor0.col2 ) + col2 * CAST ( col2 AS INTEGER ) AS col0 FROM tab1 cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT + 91 * col1 - col2 * ( + col1 ) AS col2 FROM tab0 AS cor0
----
4988
819
8730

query I rowsort
SELECT ALL - 39 * col0 FROM tab0 AS cor0
----
-1365
-3471
-936

query I rowsort
SELECT + + 89 + + col0 * cor0.col1 FROM tab2 AS cor0
----
1432
306
4691

query I rowsort
SELECT + 0 + - col0 * col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - col1 + + col2 * col1 AS col2 FROM tab2 cor0
----
1475
629
806

query I rowsort
SELECT ALL + 27 * col2 - 65 AS col2 FROM tab1 AS cor0
----
1393
1474
2527

query I rowsort
SELECT - col0 * + col2 + 23 AS col0 FROM tab1 AS cor0
----
-139
-3625
-7657

query I rowsort
SELECT DISTINCT - ( col0 ) * + 74 AS col1 FROM tab0 AS cor0
----
-1776
-2590
-6586

query I rowsort
SELECT ALL + - 10 * - col2 AS col0 FROM tab1 AS cor0
----
540
570
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT 76 + - col1 AS col1 FROM tab1 AS cor0
----
50
63
66

query I rowsort
SELECT DISTINCT + 75 AS col2 FROM tab0 cor0
----
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-4759
SELECT DISTINCT - + col2 * col0 DIV 24 col0 FROM tab0 AS cor0
----
-1
-304
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4759
SELECT DISTINCT - + col2 * col0 / 24 col0 FROM tab0 AS cor0
----
-1
-304
-33

query I rowsort
SELECT ALL + 57 * col2 AS col2 FROM tab0 AS cor0
----
1881
4674
57

query I rowsort
SELECT DISTINCT + ( col1 ) * + col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - cor0.col1 + - cor0.col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL - col0 + + col1 * col0 AS col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT ALL 28 * col0 * 32 FROM tab2 AS cor0
----
6272
69888
70784

onlyif mysql # use DIV operator for integer division
query I rowsort label-4765
SELECT + + 10 DIV col1 AS col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4765
SELECT + + 10 / col1 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL - 65 * col1 + col1 AS col1 FROM tab1 AS cor0
----
-1664
-640
-832

query I rowsort
SELECT - - col0 + - cor0.col1 + col2 FROM tab0 AS cor0
----
-29
-61
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4768
SELECT + cor0.col2 DIV col0 + 67 * + col1 + col1 FROM tab2 cor0
----
1156
2111
4012

skipif mysql # not compatible
query I rowsort label-4768
SELECT + cor0.col2 / col0 + 67 * + col1 + col1 FROM tab2 cor0
----
1156
2111
4012

query I rowsort
SELECT + col0 * 43 AS col0 FROM tab2 cor0
----
301
3354
3397

query I rowsort
SELECT DISTINCT + 38 * - cor0.col1 FROM tab0 AS cor0
----
-3268
-3458
-3686

query I rowsort
SELECT + 83 + - col1 * - 9 FROM tab2 AS cor0
----
236
362
614

query I rowsort
SELECT - 25 * col0 * - col0 + - col0 + + col1 * + col1 FROM tab2 AS cor0
----
155503
156235
2179

query I rowsort
SELECT + col2 + + 85 * col2 * - 16 + + 95 AS col0 FROM tab0 AS cor0
----
-111343
-1264
-44752

onlyif mysql # use DIV operator for integer division
query I rowsort label-4774
SELECT DISTINCT - - col0 DIV col0 AS col0 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4774
SELECT DISTINCT - - col0 / col0 AS col0 FROM tab1 AS cor0
----
1

query I rowsort
SELECT + + ( 80 ) + - col0 + col0 FROM tab2 AS cor0
----
80
80
80

query I rowsort
SELECT ( 46 ) FROM tab2, tab1 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab1, tab1 cor1, tab0 cor2
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT DISTINCT ( + 28 ) + - tab2.col1 + + tab2.col0 AS col2 FROM tab2
----
4
47
90

query I rowsort
SELECT DISTINCT 67 + 47 AS col1 FROM tab1
----
114

query I rowsort
SELECT DISTINCT - col1 + + col2 + col0 * col2 AS col1 FROM tab1
----
190
3695
7763

query I rowsort
SELECT ALL - - cor0.col0 * col2 AS col1 FROM tab2 cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 8 * - col0 col0 FROM tab1 AS cor0
----
-24
-512
-640

query I rowsort
SELECT DISTINCT + - col1 * col2 * col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-4784
SELECT - ( + col1 ) + col1 + col0 DIV - 85 col0 FROM tab0 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4784
SELECT - ( + col1 ) + col1 + col0 / - 85 col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL - 62 FROM tab2 cor0
----
-62
-62
-62

query I rowsort
SELECT cor0.col2 + 60 + + 22 FROM tab1 AS cor0
----
136
139
178

query I rowsort
SELECT + col0 + col1 * ( - tab2.col0 * - col1 ) FROM tab2
----
22910
271596
6734

onlyif mysql # use DIV operator for integer division
query I rowsort label-4788
SELECT - col2 DIV ( + col1 ) AS col1 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-4788
SELECT - col2 / ( + col1 ) AS col1 FROM tab2
----
-2
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4789
SELECT col1 + - ( + tab1.col2 ) * col1 + + ( + 28 ) DIV - col1 AS col2 FROM tab1
----
-1237
-1379
-562

skipif mysql # not compatible
query I rowsort label-4789
SELECT col1 + - ( + tab1.col2 ) * col1 + + ( + 28 ) / - col1 AS col2 FROM tab1
----
-1237
-1379
-562

query I rowsort
SELECT ALL + col0 + 50 AS col0 FROM tab2
----
128
129
57

query I rowsort
SELECT + col1 * col0 * + col0 AS col1 FROM tab2
----
106097
1519
358956

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4792
SELECT ALL col0 + + CAST( - 15 * col2 AS SIGNED ) col2 FROM tab0
----
-1141
-471
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4792
SELECT ALL col0 + + CAST ( - 15 * col2 AS INTEGER ) col2 FROM tab0
----
-1141
-471
20

query I rowsort
SELECT ALL col2 * + 83 AS col1 FROM tab1 AS cor0
----
4482
4731
7968

query I rowsort
SELECT ALL col1 * + cor0.col2 * - 83 FROM tab2 AS cor0
----
-127322
-53618
-69471

query I rowsort
SELECT ALL col0 + 21 * cor0.col1 FROM tab0 AS cor0
----
1830
2000
2072

query I rowsort
SELECT ALL cor1.col1 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT + col2 + col0 * - col1 AS col2 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT ( 65 ) + col1 FROM tab1
----
75
78
91

query I rowsort
SELECT ALL - ( tab1.col2 ) AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

onlyif mysql # use DIV operator for integer division
query I rowsort label-4800
SELECT DISTINCT + - ( + col1 ) DIV col1 + + 45 + + col2 FROM tab0 AS cor0
----
126
45
77

skipif mysql # not compatible
query I rowsort label-4800
SELECT DISTINCT + - ( + col1 ) / col1 + + 45 + + col2 FROM tab0 AS cor0
----
126
45
77

query I rowsort
SELECT DISTINCT ( + col2 ) + + col0 AS col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - - col1 + + col2 AS col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - cor1.col0 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
-24
-35
-89

query I rowsort
SELECT ALL + 21 + - col1 AS col1 FROM tab2 cor0
----
-10
-38
4

query I rowsort
SELECT ALL - col2 * - col2 + 43 AS col1 FROM tab0 AS cor0
----
1132
44
6767

onlyif mysql # use DIV operator for integer division
query I rowsort label-4806
SELECT ALL + col1 + + col0 DIV cor0.col0 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-4806
SELECT ALL + col1 + + col0 / cor0.col0 FROM tab1 AS cor0
----
11
14
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-4807
SELECT DISTINCT + col0 * col1 - col2 DIV - 48 col1 FROM tab1 cor0
----
1042
641
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4807
SELECT DISTINCT + col0 * col1 - col2 / - 48 col1 FROM tab1 cor0
----
1042
641
79

query I rowsort
SELECT ALL col2 + + col1 * + col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT + 15 * col0 AS col0 FROM tab0 AS cor0
----
1335
360
525

query I rowsort
SELECT ALL - col2 * - col2 * + col1 FROM tab1 cor0
----
119808
32490
75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-4811
SELECT ALL + 17 + - col1 * col2 DIV - col2 FROM tab1 AS cor0
----
27
30
43

skipif mysql # not compatible
query I rowsort label-4811
SELECT ALL + 17 + - col1 * col2 / - col2 FROM tab1 AS cor0
----
27
30
43

query I rowsort
SELECT DISTINCT col1 * col2 * col1 - col1 AS col2 FROM tab2 AS cor0
----
10965
25916
90447

query I rowsort
SELECT ALL ( col1 ) * - col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 39 col2 FROM tab0 AS cor0
----
39
39
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-4815
SELECT - - col0 DIV col0 + - cor0.col0 col0 FROM tab1 AS cor0
----
-2
-63
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4815
SELECT - - col0 / col0 + - cor0.col0 col0 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT - 20 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1780
-480
-700

query I rowsort
SELECT - 44 * col2 FROM tab0 AS cor0
----
-1452
-3608
-44

query I rowsort
SELECT ( col1 ) * - col2 + 30 * col2 AS col0 FROM tab1 AS cor0
----
1140
1632
216

query I rowsort
SELECT - + col0 + 69 * + col2 * col0 AS col2 FROM tab1 AS cor0
----
11175
251648
529840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4820
SELECT - CAST( NULL AS DECIMAL ) FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4820
SELECT - CAST ( NULL AS REAL ) FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT 33 AS col1 FROM tab2 cor0
----
33

query I rowsort
SELECT col0 * col0 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT - 41 + col0 AS col2 FROM tab0 AS cor0
----
-17
-6
48

query I rowsort
SELECT DISTINCT + ( col2 ) + col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - cor0.col0 * + col0 + col0 AS col0 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT ALL - + 44 AS col0 FROM tab2 AS cor0
----
-44
-44
-44

query I rowsort
SELECT - col1 + col2 * col0 + + ( - col2 ) FROM tab1 cor0
----
3581
7571
82

query I rowsort
SELECT ALL - - 84 AS col2 FROM tab1 AS cor0
----
84
84
84

query I rowsort
SELECT DISTINCT - + 68 * - col0 FROM tab0 AS cor0
----
1632
2380
6052

onlyif mysql # use DIV operator for integer division
query I rowsort label-4830
SELECT ALL 95 DIV - col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-4830
SELECT ALL 95 / - col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT - 60 * 29 FROM tab2 AS cor0
----
-1740
-1740
-1740

onlyif mysql # use DIV operator for integer division
query I rowsort label-4832
SELECT DISTINCT col1 * + 57 + - col1 DIV col2 AS col0 FROM tab1
----
1482
570
741

skipif mysql # not compatible
query I rowsort label-4832
SELECT DISTINCT col1 * + 57 + - col1 / col2 AS col0 FROM tab1
----
1482
570
741

onlyif mysql # use DIV operator for integer division
query I rowsort label-4833
SELECT + ( + col1 ) DIV cor0.col1 + 71 + cor0.col0 FROM tab0 AS cor0
----
107
161
96

skipif mysql # not compatible
query I rowsort label-4833
SELECT + ( + col1 ) / cor0.col1 + 71 + cor0.col0 FROM tab0 AS cor0
----
107
161
96

query I rowsort
SELECT + 22 + col1 AS col1 FROM tab2 AS cor0
----
39
53
81

query I rowsort
SELECT + col1 * col1 * col1 + cor0.col1 FROM tab1 AS cor0
----
1010
17602
2210

query I rowsort
SELECT ( 82 ) FROM tab2
----
82
82
82

query I rowsort
SELECT - 91 * + 14 + col1 * - 92 + - 99 AS col0 FROM tab1 AS cor0
----
-2293
-2569
-3765

query I rowsort
SELECT + 5 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT 33 FROM tab2, tab1 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT ALL + col0 + cor0.col1 + - cor0.col2 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT - 7 + - col0 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-56
-6091
-6248

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + 46 col0 FROM tab1 AS cor0
----
56
59
72

query I rowsort
SELECT DISTINCT ( + ( col1 ) ) + 41 FROM tab2 AS cor0
----
100
58
72

query I rowsort
SELECT col2 - + col1 * - col0 AS col1 FROM tab1
----
1136
132
697

query I rowsort
SELECT ALL col0 * + 26 + - 0 FROM tab2
----
182
2028
2054

query I rowsort
SELECT DISTINCT col0 + ( col0 + col0 ) * 85 AS col1 FROM tab2
----
1197
13338
13509

query I rowsort
SELECT col0 * col1 + + col0 * col1 FROM tab1
----
1280
156
2080

query I rowsort
SELECT + ( 9 ) + col0 FROM tab2 AS cor0
----
16
87
88

query I rowsort
SELECT DISTINCT + 3 * col2 AS col1 FROM tab2 cor0
----
114
78
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 * 76 col1 FROM tab1 AS cor0
----
5776
5776
5776

onlyif mysql # use DIV operator for integer division
query I rowsort label-4851
SELECT 54 + col0 DIV + col2 AS col0 FROM tab1 cor0
----
54
54
55

skipif mysql # not compatible
query I rowsort label-4851
SELECT 54 + col0 / + col2 AS col0 FROM tab1 cor0
----
54
54
55

query I rowsort
SELECT DISTINCT - col1 + col2 * col2 AS col0 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT ALL - 6 + + col1 AS col0 FROM tab1 AS cor0
----
20
4
7

query I rowsort
SELECT ALL + 9 * - col2 FROM tab2 AS cor0
----
-234
-243
-342

query I rowsort
SELECT - col1 * ( col2 ) AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT col0 * col1 * ( 30 ) - col1 AS col2 FROM tab1
----
19190
2314
31187

query I rowsort
SELECT 9 * col2 + cor0.col1 FROM tab0 AS cor0
----
106
383
829

query I rowsort
SELECT - 71 + col0 AS col2 FROM tab1 AS cor0
----
-68
-7
9

query I rowsort
SELECT - 83 * col2 + cor0.col1 AS col0 FROM tab0 AS cor0
----
-2653
-6715
14

query I rowsort
SELECT + + 69 * - col2 * + col2 FROM tab0 AS cor0
----
-463956
-69
-75141

onlyif mysql # use DIV operator for integer division
query I rowsort label-4861
SELECT DISTINCT cor0.col2 DIV + 74 col1 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4861
SELECT DISTINCT cor0.col2 / + 74 col1 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
0
1

query I rowsort
SELECT col1 * - ( 82 ) + col2 * - ( + col0 ) FROM tab0 AS cor0
----
-14760
-7844
-7989

query I rowsort
SELECT ALL + 18 * cor0.col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to bc562a3709efcd412b43f20058044b26

query I rowsort
SELECT ALL - + col0 * + col0 * col2 - - cor0.col2 AS col2 FROM tab0 AS cor0
----
-1224
-18975
-649440

query I rowsort
SELECT ALL + col2 + 43 FROM tab1 AS cor0
----
100
139
97

query I rowsort
SELECT col0 + + 11 FROM tab0 AS cor0
----
100
35
46

query I rowsort
SELECT cor0.col2 * col2 * - col0 + - col2 FROM tab0 AS cor0
----
-26169
-36
-598518

query I rowsort
SELECT + 19 + - 80 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT - + cor0.col2 + + col0 * col0 FROM tab1 AS cor0
----
-45
4039
6304

onlyif mysql # use DIV operator for integer division
query I rowsort label-4870
SELECT ALL - col0 * ( 9 ) + + col0 DIV + 12 AS col0 FROM tab0 cor0
----
-214
-313
-794

skipif mysql # not compatible
query I rowsort label-4870
SELECT ALL - col0 * ( 9 ) + + col0 / + 12 AS col0 FROM tab0 cor0
----
-214
-313
-794

query I rowsort
SELECT DISTINCT + col1 - 73 AS col1 FROM tab0 AS cor0
----
13
18
24

query I rowsort
SELECT ALL - col2 - 25 AS col2 FROM tab2 AS cor0
----
-51
-52
-63

query I rowsort
SELECT - col2 + 94 FROM tab0 cor0
----
12
61
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4874
SELECT cor0.col2 DIV col1 + col0 AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4874
SELECT cor0.col2 / col1 + col0 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT col2 + col1 AS col2 FROM tab2 cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-4876
SELECT + col2 * - col1 + - 87 DIV col2 FROM tab1 AS cor0
----
-1248
-1405
-571

skipif mysql # not compatible
query I rowsort label-4876
SELECT + col2 * - col1 + - 87 / col2 FROM tab1 AS cor0
----
-1248
-1405
-571

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4877
SELECT DISTINCT cor0.col1 * + CAST( NULL AS DECIMAL ) * col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4877
SELECT DISTINCT cor0.col1 * + CAST ( NULL AS REAL ) * col1 FROM tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4878
SELECT DISTINCT + col0 + - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4878
SELECT DISTINCT + col0 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col2 * + 97 FROM tab1 AS cor0
----
5238
5529
9312

query I rowsort
SELECT + col1 + + 11 AS col0 FROM tab2 AS cor0
----
28
42
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-4881
SELECT DISTINCT + col0 DIV col1 AS col2 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-4881
SELECT DISTINCT + col0 / col1 AS col2 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT DISTINCT + col2 * col0 * 29 + col2 FROM tab2 cor0
----
5508
58838
87096

onlyif mysql # use DIV operator for integer division
query I rowsort label-4883
SELECT + 52 DIV ( col2 ) + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4883
SELECT + 52 / ( col2 ) + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4884
SELECT ALL col2 + 32 DIV - col2 AS col2 FROM tab0 AS cor0
----
-31
33
82

skipif mysql # not compatible
query I rowsort label-4884
SELECT ALL col2 + 32 / - col2 AS col2 FROM tab0 AS cor0
----
-31
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4885
SELECT ALL + CAST( + 1 AS SIGNED ) FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4885
SELECT ALL + CAST ( + 1 AS INTEGER ) FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - col0 * - 67 + cor0.col0 + - ( + col2 ) FROM tab1 AS cor0
----
150
4295
5344

onlyif mysql # use DIV operator for integer division
query I rowsort label-4887
SELECT ALL + + col0 * col1 + + col0 - col2 DIV + cor0.col1 FROM tab1 cor0
----
1113
699
79

skipif mysql # not compatible
query I rowsort label-4887
SELECT ALL + + col0 * col1 + + col0 - col2 / + cor0.col1 FROM tab1 cor0
----
1113
699
79

query I rowsort
SELECT DISTINCT + ( + col0 ) * col2 - - col1 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL tab0.col0 * col0 + - col0 AS col0 FROM tab0
----
1190
552
7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-4890
SELECT - + col0 * col2 DIV + col0 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-4890
SELECT - + col0 * col2 / + col0 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL - + 50 * col1 AS col2 FROM tab2 AS cor0
----
-1550
-2950
-850

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 + + col2 col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT 62 FROM tab2, tab0 AS cor0, tab0 cor1
----
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * col1 col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - 22 * col2 AS col2 FROM tab2
----
-572
-594
-836

query I rowsort
SELECT ALL 48 - col0 FROM tab0
----
-41
13
24

query I rowsort
SELECT col0 + tab2.col1 + col1 FROM tab2
----
113
196
69

query I rowsort
SELECT ALL - col0 * col1 - + col1 * col1 AS col2 FROM tab0
----
-12804
-16380
-9460

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 - - col2 col1 FROM tab1
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - 87 ) col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

query I rowsort
SELECT ALL + + col1 * cor0.col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + 88 - + col2 FROM tab2
----
50
61
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 88 * - col1 col0 FROM tab0 AS cor0
----
-7568
-8008
-8536

onlyif mysql # use DIV operator for integer division
query I rowsort label-4904
SELECT DISTINCT + ( cor0.col0 ) DIV col2 + cor0.col1 FROM tab0 AS cor0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-4904
SELECT DISTINCT + ( cor0.col0 ) / col2 + cor0.col1 FROM tab0 AS cor0
----
132
86
92

query I rowsort
SELECT ALL 70 * - cor0.col2 - - col0 FROM tab2 AS cor0
----
-1742
-1883
-2581

query I rowsort
SELECT ALL - + col1 * 26 AS col2 FROM tab1 AS cor0
----
-260
-338
-676

query I rowsort
SELECT + 73 * col0 AS col1 FROM tab2 AS cor0
----
511
5694
5767

query I rowsort
SELECT ALL + - 36 * col1 FROM tab1 cor0
----
-360
-468
-936

onlyif mysql # use DIV operator for integer division
query I rowsort label-4909
SELECT DISTINCT + cor0.col2 DIV - 40 AS col1 FROM tab1 AS cor0
----
-1
-2

skipif mysql # not compatible
query I rowsort label-4909
SELECT DISTINCT + cor0.col2 / - 40 AS col1 FROM tab1 AS cor0
----
-1
-2

query I rowsort
SELECT 4 * - col0 FROM tab1 AS cor0
----
-12
-256
-320

query I rowsort
SELECT DISTINCT 4 * col1 - col0 * - col0 AS col2 FROM tab1 AS cor0
----
113
4136
6452

query I rowsort
SELECT 0 + 33 * - col1 AS col1 FROM tab2 AS cor0
----
-1023
-1947
-561

query I rowsort
SELECT + + 19 AS col1 FROM tab0 AS cor0
----
19
19
19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4914
SELECT - CAST( NULL AS SIGNED ) * col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4914
SELECT - CAST ( NULL AS INTEGER ) * col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 99 * - cor1.col1 AS col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
27 values hashing to bcd60d28479500be67fb7f800619901d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 col0 FROM tab2, tab1 cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT - 53 + + col2 AS col2 FROM tab1
----
1
4
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-4918
SELECT - - col1 DIV 67 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4918
SELECT - - col1 / 67 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 19 AS col1 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to 86c53e8567a17c8d91fc5aff119e0498

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4920
SELECT DISTINCT - CAST( NULL AS SIGNED ) + - 49 col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4920
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + - 49 col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT 13 * col1 + 4 * 70 + tab1.col2 FROM tab1
----
467
545
672

query I rowsort
SELECT + col2 * - col2 + - col0 AS col2 FROM tab0
----
-1113
-36
-6813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + tab1.col1 * - tab1.col2 col0 FROM tab1
----
-1344
-1458
-627

query I rowsort
SELECT DISTINCT 17 + cor1.col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
106
41
52

query I rowsort
SELECT - col2 * - col2 + - 22 * - col1 FROM tab1
----
3469
3488
9502

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4926
SELECT DISTINCT col2 * CAST( col1 AS SIGNED ) + + col2 * 40 * col2 FROM tab1 AS cor0
----
118044
130530
369888

skipif mysql # not compatible
query I rowsort label-4926
SELECT DISTINCT col2 * CAST ( col1 AS INTEGER ) + + col2 * 40 * col2 FROM tab1 AS cor0
----
118044
130530
369888

query I rowsort
SELECT DISTINCT + 47 AS col2 FROM tab0, tab1 AS cor0
----
47

query I rowsort
SELECT - + 54 + + 45 AS col2 FROM tab1 AS cor0
----
-9
-9
-9

query I rowsort
SELECT + 88 + - col0 * - col2 FROM tab1 AS cor0
----
250
3736
7768

query I rowsort
SELECT DISTINCT - + 63 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-63

query I rowsort
SELECT - tab1.col1 * + col2 AS col1 FROM tab1
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-4932
SELECT - + col2 * 70 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
-70
-70
-70

skipif mysql # not compatible
query I rowsort label-4932
SELECT - + col2 * 70 / cor0.col2 AS col1 FROM tab0 AS cor0
----
-70
-70
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 87 + 31 col0 FROM tab0 AS cor0
----
-56
-56
-56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4934
SELECT tab2.col0 * - tab2.col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4934
SELECT tab2.col0 * - tab2.col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab1
----
98

query I rowsort
SELECT 23 * - col1 FROM tab2
----
-1357
-391
-713

onlyif mysql # use DIV operator for integer division
query I rowsort label-4937
SELECT - + col2 + col1 DIV - col1 AS col0 FROM tab2 AS cor0
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-4937
SELECT - + col2 + col1 / - col1 AS col0 FROM tab2 AS cor0
----
-27
-28
-39

query I rowsort
SELECT + col0 + + ( col2 ) AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + + col0 + ( - col2 ) * col2 - + cor0.col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT + col0 * col2 + col2 * col2 + - col1 AS col2 FROM tab1 AS cor0
----
16883
3052
6887

query I rowsort
SELECT col2 * col0 + ( col1 ) + + col1 AS col0 FROM tab2 AS cor0
----
2146
251
3036

query I rowsort
SELECT + col1 + ( - ( - col0 ) ) * - col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT - - cor0.col1 * cor0.col0 - - cor0.col1 * col2 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT cor0.col2 * ( + col0 ) AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL - 41 * + col0 FROM tab1 AS cor0
----
-123
-2624
-3280

query I rowsort
SELECT cor0.col1 * - cor0.col1 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 38f503ad6f93db2d1a70a8c95bb8c2c2

query I rowsort
SELECT + + 57 * + col0 + + 46 FROM tab0 AS cor0
----
1414
2041
5119

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4948
SELECT - 44 + col2 + + CAST( - col1 AS SIGNED ) * - col2 FROM tab0 AS cor0
----
2827
54
7500

skipif mysql # not compatible
query I rowsort label-4948
SELECT - 44 + col2 + + CAST ( - col1 AS INTEGER ) * - col2 FROM tab0 AS cor0
----
2827
54
7500

query I rowsort
SELECT DISTINCT col0 + col2 * - col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT + col1 + + col0 * col1 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ( col2 ) + + 32 + 10 * col1 FROM tab0 AS cor0
----
1003
1024
925

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 15 col0 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 91b10a00c89b36b5bf0bed723e656ccc

query I rowsort
SELECT ALL + tab1.col1 + - col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + cor0.col0 * + col2 + + 67 FROM tab1 AS cor0
----
229
3715
7747

query I rowsort
SELECT DISTINCT col0 + 77 * col2 FROM tab0 AS cor0
----
112
2565
6403

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col1 + col2 col0 FROM tab1
----
131
189
83

query I rowsort
SELECT DISTINCT + 12 AS col0 FROM tab0, tab0 AS cor0, tab0 cor1
----
12

query I rowsort
SELECT DISTINCT - - ( ( + col2 ) ) + cor0.col0 * + 70 FROM tab1 AS cor0
----
264
4537
5696

query I rowsort
SELECT + 29 * + col2 AS col0 FROM tab0 AS cor0
----
2378
29
957

query I rowsort
SELECT ALL + ( - 43 ) FROM tab2 AS cor0
----
-43
-43
-43

query I rowsort
SELECT - 11 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7120875811e4d19a19b69cd34b6bc202

query I rowsort
SELECT DISTINCT + 42 FROM tab2, tab0 cor0, tab1 AS cor1
----
42

query I rowsort
SELECT - 82 * col2 + col1 FROM tab0 AS cor0
----
-2620
-6633
15

query I rowsort
SELECT DISTINCT - 79 AS col0 FROM tab0 AS cor0
----
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 99 ) * cor0.col2 col1 FROM tab0 AS cor0
----
3267
8118
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( ( col2 ) ) * + col1 col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + ( + col2 ) + col0 + col1 FROM tab0 AS cor0
----
133
143
262

onlyif mysql # use DIV operator for integer division
query I rowsort label-4968
SELECT DISTINCT + col0 DIV 77 FROM tab2
----
0
1

skipif mysql # not compatible
query I rowsort label-4968
SELECT DISTINCT + col0 / 77 FROM tab2
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4969
SELECT ALL + col0 DIV ( ( - col0 ) ) AS col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4969
SELECT ALL + col0 / ( ( - col0 ) ) AS col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col0 * 83 + col2 * 16 FROM tab0
----
2520
2921
8699

onlyif mysql # use DIV operator for integer division
query I rowsort label-4971
SELECT 93 DIV tab1.col2 FROM tab1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4971
SELECT 93 / tab1.col2 FROM tab1
----
0
1
1

query I rowsort
SELECT ALL + - col0 * - ( col2 + + col2 ) FROM tab0 AS cor0
----
14596
1584
70

query I rowsort
SELECT 77 - 58 * col0 AS col1 FROM tab1 AS cor0
----
-3635
-4563
-97

query I rowsort
SELECT DISTINCT + - col1 * 79 * - col2 FROM tab0 AS cor0
----
224202
589498
7663

query I rowsort
SELECT - col0 + 28 + - col2 AS col2 FROM tab1 AS cor0
----
-148
-29
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4976
SELECT + CAST( NULL AS DECIMAL ) - 73 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4976
SELECT + CAST ( NULL AS REAL ) - 73 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 88 * - cor0.col1 + - col0 FROM tab0 AS cor0
----
-7592
-8097
-8571

onlyif mysql # use DIV operator for integer division
query I rowsort label-4978
SELECT + + col2 DIV - col1 + + col2 + - col2 FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-4978
SELECT + + col2 / - col1 + + col2 + - col2 FROM tab1 cor0
----
-2
-5
-7

query I rowsort
SELECT - cor1.col1 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT - + col0 - col0 * 90 AS col0 FROM tab0 AS cor0
----
-2184
-3185
-8099

query I rowsort
SELECT - col1 * - col1 + - col2 * + 40 AS col1 FROM tab2
----
-119
-1231
2441

query I rowsort
SELECT 87 * - ( col0 ) * + col1 + 29 * tab0.col2 AS col0 FROM tab0
----
-178611
-295336
-702235

query I rowsort
SELECT ALL + - col0 - - col2 * - col0 * ( col1 ) FROM tab1 AS cor0
----
-36544
-4215
-99920

query I rowsort
SELECT DISTINCT col0 + 79 AS col1 FROM tab0 AS cor0
----
103
114
168

query I rowsort
SELECT - cor0.col0 + + cor0.col1 * + col2 FROM tab0 AS cor0
----
2814
62
7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col0 + col0 col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + col2 + - col1 + ( cor0.col2 + col1 ) FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT DISTINCT - col0 * col1 + col2 * - col0 * col0 FROM tab0 AS cor0
----
-21072
-4620
-657621

query I rowsort
SELECT DISTINCT - col0 * col0 + + 2 FROM tab2 AS cor0
----
-47
-6082
-6239

query I rowsort
SELECT ALL 34 + tab0.col1 AS col1 FROM tab0
----
120
125
131

query I rowsort
SELECT ALL col1 * cor0.col2 + col1 * - col0 AS col0 FROM tab1 AS cor0
----
-70
1326
208

query I rowsort
SELECT ALL col1 * + col2 + + col1 AS col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + + col0 * - col2 - - 26 FROM tab1 AS cor0
----
-136
-3622
-7654

query I rowsort
SELECT - ( col1 ) * + col0 + + col1 + + col1 FROM tab1 AS cor0
----
-1014
-26
-620

onlyif mysql # use DIV operator for integer division
query I rowsort label-4995
SELECT ALL - - col2 DIV col1 + - ( - ( col2 ) + col1 ) FROM tab0 AS cor0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-4995
SELECT ALL - - col2 / col1 + - ( - ( col2 ) + col1 ) FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + - 71 * cor0.col1 + col2 AS col2 FROM tab2 AS cor0
----
-1169
-2174
-4163

query I rowsort
SELECT DISTINCT cor0.col2 + col1 + ( + col0 ) FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT 93 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT DISTINCT + cor0.col1 * col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col1 * + col0 + 85 AS col0 FROM tab2 AS cor0
----
1428
302
4687

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * - 94 col1 FROM tab2 AS cor0
----
1598
2914
5546

onlyif mysql # use DIV operator for integer division
query I rowsort label-5002
SELECT DISTINCT col0 DIV - col0 + col0 + col2 col1 FROM tab2 AS cor0
----
103
116
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5002
SELECT DISTINCT col0 / - col0 + col0 + col2 col1 FROM tab2 AS cor0
----
103
116
33

query I rowsort
SELECT - cor0.col2 + + ( - ( + col2 ) ) AS col0 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT col0 + 72 FROM tab0 AS cor0
----
107
161
96

query I rowsort
SELECT ALL col0 * - ( + col1 ) + + col0 AS col0 FROM tab1 AS cor0
----
-576
-75
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-5006
SELECT DISTINCT + col2 DIV - col0 - - col2 FROM tab1 AS cor0
----
36
57
95

skipif mysql # not compatible
query I rowsort label-5006
SELECT DISTINCT + col2 / - col0 - - col2 FROM tab1 AS cor0
----
36
57
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * ( + col1 + col2 ) col2 FROM tab1 AS cor0
----
-240
-4288
-8720

query I rowsort
SELECT ALL - 82 * col0 AS col2 FROM tab1 cor0
----
-246
-5248
-6560

query I rowsort
SELECT DISTINCT 21 * + col1 FROM tab2 AS cor0
----
1239
357
651

onlyif mysql # use DIV operator for integer division
query I rowsort label-5010
SELECT DISTINCT + - ( col2 ) DIV col0 AS col0 FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-5010
SELECT DISTINCT + - ( col2 ) / col0 AS col0 FROM tab2 AS cor0
----
-3
0

query I rowsort
SELECT ALL 41 + col1 FROM tab0 AS cor0
----
127
132
138

query I rowsort
SELECT ALL 81 + col2 * - col2 FROM tab2 AS cor0
----
-1363
-595
-648

query I rowsort
SELECT - 61 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT DISTINCT 77 AS col1 FROM tab1, tab1 AS cor0
----
77

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab2 cor1, tab0 AS cor2
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT DISTINCT - 81 * - 27 AS col2 FROM tab0 cor0
----
2187

query I rowsort
SELECT ALL + 30 * + 91 * + col0 FROM tab2 AS cor0
----
19110
212940
215670

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5018
SELECT ALL + CAST( NULL AS SIGNED ) * col2 + col2 + ( - col1 ) * - col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5018
SELECT ALL + CAST ( NULL AS INTEGER ) * col2 + col2 + ( - col1 ) * - col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5019
SELECT col1 - + CAST( NULL AS SIGNED ) * - ( + col1 ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5019
SELECT col1 - + CAST ( NULL AS INTEGER ) * - ( + col1 ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * + ( + col1 ) - col2 * - 8 FROM tab1 AS cor0
----
1108
556
937

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 16 col0 FROM tab2 AS cor0
----
-62
-63
9

query I rowsort
SELECT ALL col1 + 70 AS col1 FROM tab1 cor0
----
80
83
96

query I rowsort
SELECT ALL col2 + - col1 * col2 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL + col2 * ( cor0.col0 ) AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT col0 + 19 * + col1 AS col0 FROM tab1 AS cor0
----
254
327
497

query I rowsort
SELECT + - col1 + + 46 AS col0 FROM tab1 AS cor0
----
20
33
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-5027
SELECT DISTINCT - - col0 DIV - col0 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-5027
SELECT DISTINCT - - col0 / - col0 FROM tab0 AS cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5028
SELECT DISTINCT + cor0.col1 DIV - col0 - col1 AS col2 FROM tab2 AS cor0
----
-17
-35
-59

skipif mysql # not compatible
query I rowsort label-5028
SELECT DISTINCT + cor0.col1 / - col0 - col1 AS col2 FROM tab2 AS cor0
----
-17
-35
-59

query I rowsort
SELECT col1 * 93 AS col1 FROM tab1 AS cor0
----
1209
2418
930

onlyif mysql # use DIV operator for integer division
query I rowsort label-5030
SELECT + col2 + - 78 * - col0 DIV col0 AS col2 FROM tab2 AS cor0
----
104
105
116

skipif mysql # not compatible
query I rowsort label-5030
SELECT + col2 + - 78 * - col0 / col0 AS col2 FROM tab2 AS cor0
----
104
105
116

query I rowsort
SELECT col0 * - col2 * 65 AS col2 FROM tab1 AS cor0
----
-10530
-237120
-499200

query I rowsort
SELECT + ( 0 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - ( + col2 ) + col2 + - col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
17
31
59

query I rowsort
SELECT ALL + 17 AS col0 FROM tab0 AS cor0
----
17
17
17

query I rowsort
SELECT ALL - 53 * cor0.col0 * col1 FROM tab1 AS cor0
----
-33920
-4134
-55120

query I rowsort
SELECT + 82 + + cor0.col0 FROM tab2 AS cor0
----
160
161
89

query I rowsort
SELECT - cor0.col2 * col0 * - col1 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT col0 * cor0.col2 + col0 + + 22 FROM tab2 AS cor0
----
2128
218
3103

query I rowsort
SELECT + 41 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-3526
-3731
-3977

query I rowsort
SELECT col1 * - tab0.col1 + - col1 + + tab0.col0 * + col2 FROM tab0
----
-1074
-6690
-9471

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 col0 FROM tab1 WHERE NULL NOT IN ( + col0 * + col1 * + col2 - col1 )
----

query I rowsort
SELECT DISTINCT - + 68 AS col1 FROM tab1 AS cor0
----
-68

query I rowsort
SELECT + col1 * + col2 + 60 FROM tab1 AS cor0
----
1308
1464
630

query I rowsort
SELECT + col2 * col1 + col1 * - col1 AS col1 FROM tab1
----
1079
470
728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5046
SELECT ALL - 95 + col2 * CAST( NULL AS SIGNED ) + + col2 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5046
SELECT ALL - 95 + col2 * CAST ( NULL AS INTEGER ) + + col2 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + + col2 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL + 64 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT + ( tab1.col1 ) * col2 AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ( col0 * - 29 ) + col2 + col2 FROM tab1
----
-1742
-2128
21

query I rowsort
SELECT + + col1 - + cor0.col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + + cor0.col1 * cor0.col1 + col2 * col2 AS col0 FROM tab1 AS cor0
----
3349
3592
9385

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5053
SELECT col0 * - CAST( NULL AS DECIMAL ) + - col0 + + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5053
SELECT col0 * - CAST ( NULL AS REAL ) + - col0 + + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5054
SELECT - - col2 + - col0 DIV + col0 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-5054
SELECT - - col2 + - col0 / + col0 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT DISTINCT ( + 92 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
92

query I rowsort
SELECT ALL ( 47 ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5057
SELECT - col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5057
SELECT - col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - ( tab2.col2 ) FROM tab2, tab2 cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col0 * tab2.col1 col1 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT + + col0 + 34 FROM tab2 AS cor0
----
112
113
41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5061
SELECT - col2 * - CAST( col0 AS SIGNED ) FROM tab1
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-5061
SELECT - col2 * - CAST ( col0 AS INTEGER ) FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL - col1 * 74 * - col2 + - tab0.col1 AS col2 FROM tab0
----
209926
552097
7081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + cor0.col1 col0 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - - ( + col1 ) + col1 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT - 83 + - col2 FROM tab1 AS cor0
----
-137
-140
-179

query I rowsort
SELECT ALL - 48 AS col0 FROM tab2
----
-48
-48
-48

query I rowsort
SELECT ALL + 24 + col2 AS col1 FROM tab2 AS cor0
----
50
51
62

query I rowsort
SELECT 58 - col1 * 55 FROM tab2 AS cor0
----
-1647
-3187
-877

query I rowsort
SELECT - col0 + col1 * 8 AS col0 FROM tab2 AS cor0
----
241
394
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5070
SELECT ALL + col2 - col1 DIV col1 FROM tab2
----
25
26
37

skipif mysql # not compatible
query I rowsort label-5070
SELECT ALL + col2 - col1 / col1 FROM tab2
----
25
26
37

query I rowsort
SELECT DISTINCT + col2 - + col0 * col1 * - col0 FROM tab0
----
118826
49569
720893

query I rowsort
SELECT - col1 + + tab2.col0 - col2 FROM tab2
----
-51
-7
24

query I rowsort
SELECT ALL - col1 + tab1.col0 * col1 * col0 AS col1 FROM tab1
----
208
40950
83187

query I rowsort
SELECT ALL col0 * col1 + - col0 FROM tab1
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-5075
SELECT ALL + col0 + col0 DIV - col1 FROM tab2
----
7
75
77

skipif mysql # not compatible
query I rowsort label-5075
SELECT ALL + col0 + col0 / - col1 FROM tab2
----
7
75
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-5076
SELECT - col1 DIV col0 + col2 AS col1 FROM tab0 cor0
----
-1
30
81

skipif mysql # not compatible
query I rowsort label-5076
SELECT - col1 / col0 + col2 AS col1 FROM tab0 cor0
----
-1
30
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5077
SELECT + cor0.col2 * + col1 DIV col1 + + col2 FROM tab2 AS cor0
----
52
54
76

skipif mysql # not compatible
query I rowsort label-5077
SELECT + cor0.col2 * + col1 / col1 + + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + cor0.col0 * col1 AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL + + cor0.col1 * cor0.col0 * + col1 AS col2 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT DISTINCT - cor0.col2 - col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT + + cor0.col0 * col1 + col0 AS col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT cor0.col2 + col2 AS col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL - - col0 + - col2 AS col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT - + col2 * + col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL col0 * + cor0.col0 + col0 * + col1 FROM tab2 AS cor0
----
10686
266
7584

query I rowsort
SELECT ALL - col0 + + col2 - - col1 FROM tab0
----
63
84
95

query I rowsort
SELECT ALL col2 * col1 - col0 FROM tab2
----
1456
567
830

query I rowsort
SELECT col2 * - col2 - tab2.col0 * - col1 FROM tab2
----
-101
-512
3926

query I rowsort
SELECT DISTINCT - cor0.col1 + col0 * - col2 AS col2 FROM tab0 cor0
----
-132
-7389
-878

query I rowsort
SELECT 17 * + col2 AS col2 FROM tab2 cor0
----
442
459
646

query I rowsort
SELECT 82 * col0 FROM tab1 AS cor0
----
246
5248
6560

query I rowsort
SELECT - 91 * + col0 AS col1 FROM tab1 AS cor0
----
-273
-5824
-7280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - cor0.col0 col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + 94 AS col1 FROM tab0 AS cor0
----
94
94
94

query I rowsort
SELECT DISTINCT - + 17 FROM tab0 cor0
----
-17

onlyif mysql # use DIV operator for integer division
query I rowsort label-5096
SELECT ALL - col2 DIV + 3 AS col1 FROM tab0
----
-11
-27
0

skipif mysql # not compatible
query I rowsort label-5096
SELECT ALL - col2 / + 3 AS col1 FROM tab0
----
-11
-27
0

query I rowsort
SELECT ALL - col1 AS col0 FROM tab0 WHERE ( tab0.col0 / col2 ) >= ( - col2 )
----
-86
-91
-97

query I rowsort
SELECT col0 + col2 * + col1 FROM tab0
----
132
2862
7551

query I rowsort
SELECT DISTINCT - col1 * col0 + - col2 FROM tab2
----
-1381
-244
-4628

query I rowsort
SELECT tab0.col1 * - col0 AS col0 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5101
SELECT ALL col1 + col1 DIV + tab1.col2 AS col0 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5101
SELECT ALL col1 + col1 / + tab1.col2 AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT col2 + + col0 * + col0 FROM tab2
----
6110
6279
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - - col0 col1 FROM tab1
----
121
176
57

query I rowsort
SELECT col0 + tab2.col1 + col0 FROM tab2
----
175
215
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col1 col1 FROM tab2 WHERE NOT NULL > NULL
----

query I rowsort
SELECT - tab2.col1 + col1 - + col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT col1 * - col0 + col0 FROM tab2 WHERE NOT ( NULL ) < col1 / + col2
----

query I rowsort
SELECT ALL - col2 * - col1 * - tab0.col2 + col1 FROM tab0
----
-611793
-93568
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - col2 * - tab2.col1 col1 FROM tab2
----
1593
663
868

query III rowsort
SELECT ALL * FROM tab2 WHERE col2 + - col2 BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL col0 * col0 + - tab0.col0 * col2 + col2 AS col0 FROM tab0
----
-183
1191
705

onlyif mysql # use DIV operator for integer division
query I rowsort label-5112
SELECT DISTINCT - col2 DIV col0 + - col0 + col0 col1 FROM tab2
----
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5112
SELECT DISTINCT - col2 / col0 + - col0 + col0 col1 FROM tab2
----
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + col2 col1 FROM tab0
----
-2838
-7462
-97

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( + col1 * + col1 ) IN ( tab1.col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

onlyif mysql # use DIV operator for integer division
query I rowsort label-5115
SELECT - col2 DIV col0 + - col0 * + col2 AS col0 FROM tab1
----
-180
-3648
-7681

skipif mysql # not compatible
query I rowsort label-5115
SELECT - col2 / col0 + - col0 * + col2 AS col0 FROM tab1
----
-180
-3648
-7681

query I rowsort
SELECT - col1 + tab0.col2 * col1 * + col2 FROM tab0
----
0
611793
93568

onlyif mysql # use DIV operator for integer division
query I rowsort label-5117
SELECT DISTINCT tab0.col2 DIV + col0 + - col0 DIV col0 AS col1 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-5117
SELECT DISTINCT tab0.col2 / + col0 + - col0 / col0 AS col1 FROM tab0
----
-1
0

query I rowsort
SELECT - col0 - col0 * col2 AS col2 FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT DISTINCT - col1 * + col1 + col1 * col0 * col0 FROM tab1
----
-442
40860
83031

query I rowsort
SELECT - col1 + + col1 * - col0 FROM tab2 AS cor0
----
-1360
-248
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-5121
SELECT ALL + col0 DIV col2 + - col2 AS col2 FROM tab1
----
-54
-56
-96

skipif mysql # not compatible
query I rowsort label-5121
SELECT ALL + col0 / col2 + - col2 AS col2 FROM tab1
----
-54
-56
-96

query I rowsort
SELECT DISTINCT col1 - + col0 * col0 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL cor0.col1 * - col0 * col0 + col2 * cor0.col2 AS col0 FROM tab2 AS cor0
----
-104653
-358280
-790

onlyif mysql # use DIV operator for integer division
query I rowsort label-5124
SELECT col1 + - col1 DIV - col0 AS col2 FROM tab0 AS cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-5124
SELECT col1 + - col1 / - col0 AS col2 FROM tab0 AS cor0
----
89
92
99

query I rowsort
SELECT - 3 + + col1 * + col1 FROM tab1 AS cor0
----
166
673
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5126
SELECT + col0 DIV ( col1 * + col2 ) FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5126
SELECT + col0 / ( col1 * + col2 ) FROM tab0
----
0
0
0

query I rowsort
SELECT col0 * col0 + + col2 AS col0 FROM tab0
----
1226
609
8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-5128
SELECT ALL + col2 * - 0 DIV + col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5128
SELECT ALL + col2 * - 0 / + col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + ( 60 + col0 ) FROM tab2
----
138
139
67

query I rowsort
SELECT ALL 7 * col2 FROM tab2
----
182
189
266

query I rowsort
SELECT DISTINCT - - cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
24
35
89

query I rowsort
SELECT cor0.col1 + col1 + - ( col1 + - cor0.col2 ) FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + 73 * + col2 AS col2 FROM tab1 cor0
----
3942
4161
7008

query I rowsort
SELECT + col0 * col1 * + col1 + cor0.col0 AS col1 FROM tab2 AS cor0
----
22910
271596
6734

query I rowsort
SELECT ALL - col0 * + cor0.col0 + col2 AS col2 FROM tab0 cor0
----
-1224
-543
-7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-5136
SELECT DISTINCT ( + col2 ) DIV + col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5136
SELECT DISTINCT ( + col2 ) / + col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT + ( - col2 ) + + col1 * col1 * - col1 + - ( col0 ) AS col2 FROM tab2 AS cor0
----
-205483
-29825
-5030

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5138
SELECT ALL col1 * + col0 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5138
SELECT ALL col1 * + col0 * 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-5139
SELECT col1 * + cor0.col1 + - 67 * + 3 + col1 * - CAST( NULL AS DECIMAL ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5139
SELECT col1 * + cor0.col1 + - 67 * + 3 + col1 * - CAST ( NULL AS REAL ) FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5140
SELECT + 52 * cor0.col0 DIV col0 + 21 DIV + cor0.col1 + - ( - col2 ) col1 FROM tab1 AS cor0
----
106
111
149

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5140
SELECT + 52 * cor0.col0 / col0 + 21 / + cor0.col1 + - ( - col2 ) col1 FROM tab1 AS cor0
----
106
111
149

query I rowsort
SELECT DISTINCT + 17 FROM tab0, tab1 AS cor0
----
17

query I rowsort
SELECT cor1.col0 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT + cor0.col1 * - cor0.col0 AS col2 FROM tab2, tab1 cor0, tab0 cor1
----
27 values hashing to 064f0d12f5a54890818030ba889e7e5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-5144
SELECT DISTINCT col2 DIV + 46 FROM tab1
----
1
2

skipif mysql # not compatible
query I rowsort label-5144
SELECT DISTINCT col2 / + 46 FROM tab1
----
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * - ( - col0 * - col2 ) col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-5146
SELECT DISTINCT - col0 DIV 24 + col2 AS col2 FROM tab2 AS cor0
----
23
27
35

skipif mysql # not compatible
query I rowsort label-5146
SELECT DISTINCT - col0 / 24 + col2 AS col2 FROM tab2 AS cor0
----
23
27
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5147
SELECT ALL + col2 * - CAST( + col1 * col2 AS SIGNED ) + ( - col2 ) FROM tab0 AS cor0
----
-611966
-93687
-98

skipif mysql # not compatible
query I rowsort label-5147
SELECT ALL + col2 * - CAST ( + col1 * col2 AS INTEGER ) + ( - col2 ) FROM tab0 AS cor0
----
-611966
-93687
-98

query I rowsort
SELECT DISTINCT col0 * + ( 86 + - col2 ) * col1 FROM tab0 AS cor0
----
109392
288575
32396

onlyif mysql # use DIV operator for integer division
query I rowsort label-5149
SELECT DISTINCT + col1 DIV col0 + - col1 col1 FROM tab0 cor0
----
-83
-90
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5149
SELECT DISTINCT + col1 / col0 + - col1 col1 FROM tab0 cor0
----
-83
-90
-95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5150
SELECT ALL col1 * - CAST( NULL AS SIGNED ) * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5150
SELECT ALL col1 * - CAST ( NULL AS INTEGER ) * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * - 13 + 7 FROM tab2 AS cor0
----
-214
-396
-760

query I rowsort
SELECT DISTINCT - - col1 - - 30 AS col0 FROM tab0 AS cor0
----
116
121
127

query I rowsort
SELECT - col0 + - col1 + cor0.col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - 84 * - col2 FROM tab0 AS cor0
----
2772
6888
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 19 col2 FROM tab1 AS cor0
----
-19
-19
-19

query I rowsort
SELECT + col0 * + 60 AS col0 FROM tab0 AS cor0
----
1440
2100
5340

onlyif mysql # use DIV operator for integer division
query I rowsort label-5157
SELECT ( + col1 ) DIV tab0.col1 col0 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5157
SELECT ( + col1 ) / tab0.col1 col0 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL + - 84 + - col0 FROM tab0 AS cor0
----
-108
-119
-173

query I rowsort
SELECT - + col2 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - - col0 * 42 AS col0 FROM tab2 AS cor0
----
294
3276
3318

query I rowsort
SELECT + ( + 20 ) FROM tab2 AS cor0
----
20
20
20

query I rowsort
SELECT col0 + - col1 * col1 * cor0.col0 FROM tab2 AS cor0
----
-22752
-271440
-6720

query I rowsort
SELECT 21 * - col2 + + ( + 82 ) AS col2 FROM tab0 AS cor0
----
-1640
-611
61

query I rowsort
SELECT DISTINCT - + col2 + col1 + + 67 * cor0.col1 FROM tab2 AS cor0
----
1118
2081
3986

onlyif mysql # use DIV operator for integer division
query I rowsort label-5165
SELECT + col0 * + col0 + 41 DIV - 85 AS col0 FROM tab0 AS cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-5165
SELECT + col0 * + col0 + 41 / - 85 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + 78 + col0 * col2 FROM tab2 AS cor0
----
2106
267
3080

query IIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 WHERE ( NULL ) IN ( cor0.col0 )
----

query I rowsort
SELECT ALL + col0 * col1 * col2 + col2 * + col1 FROM tab2 AS cor0
----
121186
51680
6696

query I rowsort
SELECT ALL + 45 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT - tab0.col2 * 48 FROM tab0
----
-1584
-3936
-48

query I rowsort
SELECT ALL + 46 * 59 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 8cb7557a541c5686e39bd62f17e0b16c

query I rowsort
SELECT - col0 + col2 + - col1 FROM tab1 cor0
----
-17
25
3

query I rowsort
SELECT ALL - tab1.col0 + 80 AS col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 6693c9b8cbe097bb1a0d1d3c973b526c

query I rowsort
SELECT 95 + - col1 * - col1 FROM tab2 cor0
----
1056
3576
384

query I rowsort
SELECT ALL - tab2.col2 * - tab2.col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL cor0.col2 * 89 AS col2 FROM tab2 AS cor0
----
2314
2403
3382

query I rowsort
SELECT DISTINCT + col2 + col2 * 14 FROM tab0 cor0
----
1230
15
495

query I rowsort
SELECT cor0.col1 * cor0.col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT + - 25 AS col1 FROM tab2 AS cor0
----
-25
-25
-25

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1, tab0 cor2
----
3645 values hashing to 0cc433e09ad9e61562b7840dd1db6f57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - tab1.col2 * tab1.col2 col2 FROM tab1
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT col0 * 10 FROM tab0 AS cor0
----
240
350
890

query I rowsort
SELECT DISTINCT - col2 + ( + col2 ) FROM tab1 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5184
SELECT DISTINCT + col0 DIV - 15 AS col1 FROM tab0 AS cor0
----
-1
-2
-5

skipif mysql # not compatible
query I rowsort label-5184
SELECT DISTINCT + col0 / - 15 AS col1 FROM tab0 AS cor0
----
-1
-2
-5

query I rowsort
SELECT DISTINCT - 71 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
-71

query I rowsort
SELECT ALL + col0 + + col2 * cor0.col2 FROM tab1 AS cor0
----
2919
3313
9296

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5187
SELECT DISTINCT - - col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5187
SELECT DISTINCT - - col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - col1 * + 26 FROM tab2 AS cor0
----
-1534
-442
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 99 + col2 col1 FROM tab0
----
100
132
181

onlyif mysql # use DIV operator for integer division
query I rowsort label-5190
SELECT + col0 + - col2 DIV col0 AS col1 FROM tab2
----
4
78
79

skipif mysql # not compatible
query I rowsort label-5190
SELECT + col0 + - col2 / col0 AS col1 FROM tab2
----
4
78
79

query I rowsort
SELECT DISTINCT 43 + col0 FROM tab1
----
107
123
46

query I rowsort
SELECT ALL - col2 + - tab2.col2 AS col1 FROM tab2
----
-52
-54
-76

query I rowsort
SELECT DISTINCT ( - col0 ) + + tab0.col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL - 5 * - 15 * + col2 + + col1 * 48 + col1 * + tab2.col1 FROM tab2
----
3955
4474
8263

query I rowsort
SELECT ALL 98 + + col1 + col0 FROM tab0
----
208
230
278

query I rowsort
SELECT + col2 * - 17 + + col1 AS col1 FROM tab0 cor0
----
-1303
-475
80

query I rowsort
SELECT ALL + 81 * col1 FROM tab2 AS cor0
----
1377
2511
4779

query I rowsort
SELECT - cor1.col2 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT ALL + col2 + col0 * ( col0 + col1 ) AS col0 FROM tab1 AS cor0
----
141
4793
7536

query I rowsort
SELECT DISTINCT 3 + + col1 * - col1 FROM tab0 AS cor0
----
-7393
-8278
-9406

query I rowsort
SELECT - 88 + - col2 FROM tab0 AS cor0
----
-121
-170
-89

query I rowsort
SELECT 29 * - col2 AS col0 FROM tab1 AS cor0
----
-1566
-1653
-2784

query I rowsort
SELECT DISTINCT + - 2 AS col1 FROM tab0 AS cor0
----
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 0 + col1 + 61 col2 FROM tab0 cor0
----
147
152
158

query I rowsort
SELECT DISTINCT + col0 * cor0.col1 + - 62 + + col0 AS col1 FROM tab0 AS cor0
----
2026
3368
8126

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 3 + + col0 * ( cor0.col1 ) col0 FROM tab0 AS cor0
----
2067
3398
8102

onlyif mysql # use DIV operator for integer division
query I rowsort label-5207
SELECT ALL + col0 + col2 DIV 47 + + 54 FROM tab1 AS cor0
----
119
136
58

skipif mysql # not compatible
query I rowsort label-5207
SELECT ALL + col0 + col2 / 47 + + 54 FROM tab1 AS cor0
----
119
136
58

query I rowsort
SELECT DISTINCT - col2 - cor0.col2 * - 72 AS col0 FROM tab0 AS cor0
----
2343
5822
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + cor0.col1 col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL col1 + col0 * + ( + cor0.col0 ) FROM tab2 AS cor0
----
6143
6258
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 6 col0 FROM tab0 AS cor0
----
-6
-6
-6

query I rowsort
SELECT 82 * - 55 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to bbc9f4da053940bd6f298736031fd0a5

query I rowsort
SELECT + col1 * col2 + - col1 AS col1 FROM tab1 cor0
----
1235
1378
560

query I rowsort
SELECT - col1 * + 38 + - col1 FROM tab2 AS cor0
----
-1209
-2301
-663

query I rowsort
SELECT + ( col0 ) + + ( + col1 ) * + col2 AS col2 FROM tab1
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 76 ) col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7b2b08dd3f1adef028d3f40ef7c716da

query I rowsort
SELECT + 64 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT - 92 + col0 FROM tab2
----
-13
-14
-85

query I rowsort
SELECT col1 - + col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + ( + col0 ) * + cor0.col2 AS col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT 66 * - ( - col0 ) * col2 FROM tab1 cor0
----
10692
240768
506880

query I rowsort
SELECT ALL - 19 * + 99 AS col0 FROM tab1 AS cor0
----
-1881
-1881
-1881

query I rowsort
SELECT ALL + 21 * - col2 FROM tab2 cor0
----
-546
-567
-798

query I rowsort
SELECT + ( + col0 ) + cor0.col2 AS col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5225
SELECT col2 * cor0.col0 + - col2 DIV ( + col1 ) FROM tab2 AS cor0
----
189
2028
3000

skipif mysql # not compatible
query I rowsort label-5225
SELECT col2 * cor0.col0 + - col2 / ( + col1 ) FROM tab2 AS cor0
----
189
2028
3000

onlyif mysql # use DIV operator for integer division
query I rowsort label-5226
SELECT ALL + - CAST( cor0.col1 AS SIGNED ) DIV col1 - 18 DIV + col0 FROM tab1 AS cor0
----
-1
-1
-7

skipif mysql # not compatible
query I rowsort label-5226
SELECT ALL + - CAST ( cor0.col1 AS INTEGER ) / col1 - 18 / + col0 FROM tab1 AS cor0
----
-1
-1
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5227
SELECT ALL CAST( - col0 AS SIGNED ) AS col1 FROM tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-5227
SELECT ALL CAST ( - col0 AS INTEGER ) AS col1 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT col1 * 79 AS col2 FROM tab1 AS cor0
----
1027
2054
790

query I rowsort
SELECT DISTINCT + ( + col0 ) * - col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - ( col2 ) + - col1 AS col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT col1 * ( col2 * col1 ) - ( + col0 ) FROM tab1
----
16144
36501
5636

query I rowsort
SELECT ALL + col2 + tab2.col1 * + ( - tab2.col0 ) * col0 - + col1 FROM tab2
----
-106076
-1523
-358989

query I rowsort
SELECT DISTINCT col2 + + col2 - col0 AS col1 FROM tab2
----
-26
-3
47

query I rowsort
SELECT DISTINCT - cor0.col2 * + col1 + + col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
24
35
89

query I rowsort
SELECT + - 96 * col2 FROM tab2 AS cor0
----
-2496
-2592
-3648

query I rowsort
SELECT ALL + + col1 - cor0.col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT + ( 70 ) * cor0.col1 + col0 FROM tab1 AS cor0
----
1823
764
990

query I rowsort
SELECT ALL + + col0 + 45 AS col0 FROM tab1 AS cor0
----
109
125
48

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0 CROSS JOIN tab2, tab0 AS cor1
----
972 values hashing to e4c748f267e8d2a0e6d563281e1fb975

query I rowsort
SELECT + cor0.col0 + + col1 * col2 * + col1 AS col0 FROM tab1 AS cor0
----
16304
36507
5764

query I rowsort
SELECT + - col1 * - col1 - ( - col1 + col0 * - col0 ) AS col0 FROM tab1 AS cor0
----
4206
6582
711

query I rowsort
SELECT + - cor0.col1 * cor0.col1 * + col1 AS col0 FROM tab2 AS cor0
----
-205379
-29791
-4913

query I rowsort
SELECT - - cor0.col2 * - col2 AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + cor0.col1 - col1 FROM tab1 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5246
SELECT DISTINCT + col1 * col1 DIV - 24 col2 FROM tab0
----
-308
-345
-392

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5246
SELECT DISTINCT + col1 * col1 / - 24 col2 FROM tab0
----
-308
-345
-392

query I rowsort
SELECT ALL 68 AS col0 FROM tab1
----
68
68
68

query I rowsort
SELECT + - col1 + 74 * + 6 FROM tab1 AS cor0
----
418
431
434

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 col0 FROM tab0
----
28
28
28

query I rowsort
SELECT + 39 + - col1 AS col2 FROM tab2
----
-20
22
8

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 cor1, tab1 AS cor2, tab0 AS cor3
----
3645 values hashing to f2e58df61204c8a189e87d6816ea9159

query I rowsort
SELECT DISTINCT col2 * + 63 AS col0 FROM tab0
----
2079
5166
63

query I rowsort
SELECT DISTINCT - tab0.col0 + + col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL - 57 + 23 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 40442a74794ded4c78101eefe525a5bb

query I rowsort
SELECT ALL + - col1 + - 64 - cor0.col1 * + col2 FROM tab1 cor0
----
-1325
-1494
-644

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5256
SELECT - + col0 + + CAST( col2 AS SIGNED ) FROM tab2 AS cor0
----
-41
-52
20

skipif mysql # not compatible
query I rowsort label-5256
SELECT - + col0 + + CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-5257
SELECT DISTINCT col1 DIV - col2 AS col0 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5257
SELECT DISTINCT col1 / - col2 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
26
27
38

query I rowsort
SELECT DISTINCT - 70 AS col2 FROM tab2, tab2 AS cor0
----
-70

query I rowsort
SELECT DISTINCT ( col2 ) * col1 * - col1 AS col0 FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT DISTINCT tab0.col1 AS col1 FROM tab0, tab1, tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - 31 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
-31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5263
SELECT col1 * + col0 / CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5263
SELECT col1 * + col0 / CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5264
SELECT ALL - col1 DIV cor0.col2 + + cor0.col2 * + 67 FROM tab0 AS cor0
----
-30
2209
5493

skipif mysql # not compatible
query I rowsort label-5264
SELECT ALL - col1 / cor0.col2 + + cor0.col2 * + 67 FROM tab0 AS cor0
----
-30
2209
5493

query I rowsort
SELECT ALL 90 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT - 28 + cor0.col0 FROM tab2 AS cor0
----
-21
50
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-5267
SELECT cor0.col0 DIV 75 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5267
SELECT cor0.col0 / 75 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT col2 + + 89 FROM tab2
----
115
116
127

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col0 col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
-7
-78
-79

query I rowsort
SELECT ALL - 54 * - col1 AS col1 FROM tab2 AS cor0
----
1674
3186
918

onlyif mysql # use DIV operator for integer division
query I rowsort label-5272
SELECT col0 DIV + cor0.col2 + col1 AS col2 FROM tab1 AS cor0
----
11
13
26

skipif mysql # not compatible
query I rowsort label-5272
SELECT col0 / + cor0.col2 + col1 AS col2 FROM tab1 AS cor0
----
11
13
26

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * ( - 35 ) col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
-350
-455
-910

query I rowsort
SELECT - - col2 * col0 + - cor0.col1 * - ( cor0.col1 + + col2 ) AS col0 FROM tab0 AS cor0
----
11026
23041
9541

query I rowsort
SELECT col0 * cor0.col0 + 74 FROM tab2 cor0
----
123
6158
6315

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( + col0 AS REAL ) FROM tab0
----
24
35
89

query I rowsort
SELECT ( + 91 + col1 ) FROM tab1
----
101
104
117

onlyif mysql # use DIV operator for integer division
query I rowsort label-5279
SELECT 76 DIV + col2 + col0 AS col2 FROM tab1
----
4
65
80

skipif mysql # not compatible
query I rowsort label-5279
SELECT 76 / + col2 + col0 AS col2 FROM tab1
----
4
65
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col2 * + ( - col1 ) col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + 61 * - 52 AS col0 FROM tab0 AS cor0
----
-3172
-3172
-3172

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5282
SELECT ALL - col1 + - CAST( - col1 AS SIGNED ) * + col2 FROM tab2
----
1475
629
806

skipif mysql # not compatible
query I rowsort label-5282
SELECT ALL - col1 + - CAST ( - col1 AS INTEGER ) * + col2 FROM tab2
----
1475
629
806

query I rowsort
SELECT DISTINCT col0 + + ( 17 ) FROM tab2
----
24
95
96

query I rowsort
SELECT + ( - col0 ) - col1 * - tab0.col1 AS col0 FROM tab0
----
7372
8192
9374

query I rowsort
SELECT DISTINCT - ( col2 * col0 ) AS col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT cor1.col0 AS col1 FROM tab2, tab1 AS cor0, tab1 cor1, tab0 AS cor2
----
3
64
80

query I rowsort
SELECT cor0.col1 + 94 FROM tab1 AS cor0
----
104
107
120

query I rowsort
SELECT DISTINCT 72 * ( - col2 * col2 ) AS col2 FROM tab1
----
-209952
-233928
-663552

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5289
SELECT CAST( NULL AS DECIMAL ) AS col2 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5289
SELECT CAST ( NULL AS REAL ) AS col2 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL + col0 - col0 * + ( - col1 ) FROM tab2
----
1422
224
4680

query I rowsort
SELECT DISTINCT tab2.col1 AS col2 FROM tab2, tab1, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + 6 * + col1 AS col2 FROM tab1
----
156
60
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5293
SELECT ALL 22 DIV col2 AS col1 FROM tab0
----
0
0
22

skipif mysql # not compatible
query I rowsort label-5293
SELECT ALL 22 / col2 AS col1 FROM tab0
----
0
0
22

query I rowsort
SELECT - ( col1 * - tab1.col1 ) AS col1 FROM tab1
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col0 col0 FROM tab0
----
171
36
57

query I rowsort
SELECT + 83 FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 5ced3720d5aeff0dd77d5059a38001b6

query I rowsort
SELECT DISTINCT col1 + - 65 FROM tab0
----
21
26
32

query I rowsort
SELECT - col2 * + cor0.col2 + - col1 * - col2 AS col2 FROM tab1 AS cor0
----
-1512
-2679
-7968

onlyif mysql # use DIV operator for integer division
query I rowsort label-5299
SELECT DISTINCT col2 * - 76 + col2 DIV + col2 FROM tab0 AS cor0
----
-2507
-6231
-75

skipif mysql # not compatible
query I rowsort label-5299
SELECT DISTINCT col2 * - 76 + col2 / + col2 FROM tab0 AS cor0
----
-2507
-6231
-75

query I rowsort
SELECT - - col0 * - col1 + col0 * col2 FROM tab2 AS cor0
----
-2574
-28
1659

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 + - 7 AS col0 FROM tab1 cor0
----
-1255
-1411
-577

query I rowsort
SELECT + + col2 * 87 + 4 FROM tab0 AS cor0
----
2875
7138
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - ( 26 ) col0 FROM tab0 AS cor0
----
-25
56
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5304
SELECT DISTINCT + - cor0.col2 + CAST( NULL AS SIGNED ) + 41 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5304
SELECT DISTINCT + - cor0.col2 + CAST ( NULL AS INTEGER ) + 41 AS col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5305
SELECT DISTINCT col1 DIV ( col1 ) + col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-5305
SELECT DISTINCT col1 / ( col1 ) + col0 FROM tab1
----
4
65
81

query I rowsort
SELECT 81 + - 83 * + tab0.col0 + cor0.col1 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 83efba7dc506574337542b578d02189a

query I rowsort
SELECT ALL + col0 * col0 + - 95 AS col0 FROM tab2
----
-46
5989
6146

query I rowsort
SELECT DISTINCT + col1 + - tab1.col0 AS col1 FROM tab1
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-5309
SELECT ALL + + cor0.col2 * + 67 + col2 DIV col0 FROM tab1 AS cor0
----
3636
3819
6433

skipif mysql # not compatible
query I rowsort label-5309
SELECT ALL + + cor0.col2 * + 67 + col2 / col0 FROM tab1 AS cor0
----
3636
3819
6433

onlyif mysql # use DIV operator for integer division
query I rowsort label-5310
SELECT + col0 * col1 DIV - col0 + col0 FROM tab2 AS cor0
----
-24
19
62

skipif mysql # not compatible
query I rowsort label-5310
SELECT + col0 * col1 / - col0 + col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - 36 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 3bcd07d22b62d2042b499253b1c13d9e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + ( cor0.col2 + col2 ) * + 76 * 9 col1 FROM tab1 AS cor0
----
131315
73846
77966

query I rowsort
SELECT col0 * + 25 FROM tab2 AS cor0
----
175
1950
1975

query I rowsort
SELECT - - 33 + - 20 * + col0 FROM tab2 cor0
----
-107
-1527
-1547

query I rowsort
SELECT ALL ( + col0 ) * - col2 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5316
SELECT DISTINCT CAST( col2 AS SIGNED ) * - col1 + + 20 AS col0 FROM tab0 cor0
----
-2818
-7442
-77

skipif mysql # not compatible
query I rowsort label-5316
SELECT DISTINCT CAST ( col2 AS INTEGER ) * - col1 + + 20 AS col0 FROM tab0 cor0
----
-2818
-7442
-77

query I rowsort
SELECT + 57 + col0 FROM tab0 AS cor0
----
146
81
92

query I rowsort
SELECT ALL 16 * + 72 + + col2 FROM tab0 AS cor0
----
1153
1185
1234

onlyif mysql # use DIV operator for integer division
query I rowsort label-5319
SELECT DISTINCT + 13 DIV col2 + col2 AS col1 FROM tab0 AS cor0
----
14
33
82

skipif mysql # not compatible
query I rowsort label-5319
SELECT DISTINCT + 13 / col2 + col2 AS col1 FROM tab0 AS cor0
----
14
33
82

query I rowsort
SELECT - col0 * - 12 FROM tab0 AS cor0
----
1068
288
420

query I rowsort
SELECT + - ( 56 ) * - col2 AS col2 FROM tab2 cor0
----
1456
1512
2128

query I rowsort
SELECT DISTINCT + + 96 + - col2 FROM tab1 AS cor0
----
0
39
42

query I rowsort
SELECT DISTINCT + ( - col1 ) + col1 AS col0 FROM tab0 cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5324
SELECT CAST( NULL AS SIGNED ) + col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5324
SELECT CAST ( NULL AS INTEGER ) + col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 80 * col0 AS col0 FROM tab2 AS cor0
----
-560
-6240
-6320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5326
SELECT DISTINCT + CAST( NULL AS DECIMAL ) * col1 + col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5326
SELECT DISTINCT + CAST ( NULL AS REAL ) * col1 + col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - - col2 + col2 AS col1 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT ALL col0 + - ( - col2 ) AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL col0 + + 89 AS col1 FROM tab2
----
167
168
96

query I rowsort
SELECT - 53 * 88 FROM tab0, tab0 AS cor0
----
9 values hashing to d3d6cc52cbee10ad72e063f9349a621e

query I rowsort
SELECT col1 - col0 * ( + col0 + + tab1.col1 ) * + ( + col0 + - 85 ) FROM tab1
----
37213
7160
99466

query I rowsort
SELECT + col1 + - 46 FROM tab0 AS cor0
----
40
45
51

query I rowsort
SELECT + 88 + - col1 FROM tab0 AS cor0
----
-3
-9
2

query I rowsort
SELECT - - 22 FROM tab2 cor0
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 + + col2 col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL 91 + cor0.col0 - col1 * ( col1 ) * col0 FROM tab1 AS cor0
----
-13349
-1934
-6245

query I rowsort
SELECT - cor0.col0 + cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + ( - col0 ) * - col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL 66 + col0 * col0 * - 63 AS col0 FROM tab0 cor0
----
-36222
-498957
-77109

query I rowsort
SELECT ALL 88 + + col1 FROM tab2 AS cor0
----
105
119
147

query I rowsort
SELECT DISTINCT col2 * + col0 - ( - col2 ) FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - col2 * + col0 - ( - 49 ) AS col1 FROM tab0 AS cor0
----
-7249
-743
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-5343
SELECT + col0 + - col1 DIV col1 AS col0 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-5343
SELECT + col0 + - col1 / col1 AS col0 FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT - col0 * - col0 + + col2 FROM tab1 AS cor0
----
4153
63
6496

onlyif mysql # use DIV operator for integer division
query I rowsort label-5345
SELECT col2 DIV col1 + + col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5345
SELECT col2 / col1 + + col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + ( - col0 ) - + col2 AS col1 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT ALL + - col1 + - 72 FROM tab1 cor0
----
-82
-85
-98

query I rowsort
SELECT - cor0.col0 + + col2 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT DISTINCT + col0 + 17 FROM tab2 AS cor0
----
24
95
96

query I rowsort
SELECT ALL col1 + + 90 * + 92 FROM tab2 AS cor0
----
8297
8311
8339

query I rowsort
SELECT DISTINCT - col2 + col1 + - 15 AS col2 FROM tab0
----
-6
38
81

query I rowsort
SELECT ALL + col0 - tab1.col0 * col0 FROM tab1
----
-4032
-6
-6320

query I rowsort
SELECT DISTINCT + col1 + col2 + col1 FROM tab0 AS cor0
----
195
205
264

query I rowsort
SELECT ALL ( + col2 ) * col1 AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL + 95 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5357
SELECT + - col1 DIV - 11 FROM tab0 AS cor0
----
7
8
8

skipif mysql # not compatible
query I rowsort label-5357
SELECT + - col1 / - 11 FROM tab0 AS cor0
----
7
8
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5358
SELECT col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5358
SELECT col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col0 * col0 col2 FROM tab0
----
13824
42875
704969

query I rowsort
SELECT col1 * + col1 + - ( + col1 ) FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT DISTINCT col0 + col1 + - col0 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT col1 FROM tab1 WHERE ( NULL ) > ( col2 )
----

query I rowsort
SELECT DISTINCT col2 + col0 + tab0.col2 AS col0 FROM tab0
----
253
37
90

query I rowsort
SELECT ALL col0 * tab2.col0 AS col1 FROM tab2
----
49
6084
6241

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col1 NOT BETWEEN NULL AND ( - col2 - - col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT DISTINCT tab2.col2 * - tab2.col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT col1 + col0 - - tab1.col0 FROM tab1
----
138
173
32

query I rowsort
SELECT + tab0.col0 * tab0.col0 * col2 AS col0 FROM tab0
----
1225
19008
649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-5369
SELECT + col2 + - col1 + col0 DIV col2 FROM tab0
----
-53
-61
-8

skipif mysql # not compatible
query I rowsort label-5369
SELECT + col2 + - col1 + col0 / col2 FROM tab0
----
-53
-61
-8

query I rowsort
SELECT DISTINCT + tab0.col0 + + tab0.col0 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL - col2 + + col0 * col2 FROM tab1
----
108
3591
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-5372
SELECT DISTINCT col0 + - col1 DIV - col2 + col0 FROM tab0
----
167
179
50

skipif mysql # not compatible
query I rowsort label-5372
SELECT DISTINCT col0 + - col1 / - col2 + col0 FROM tab0
----
167
179
50

query I rowsort
SELECT DISTINCT col2 + col0 * + col0 FROM tab1
----
4153
63
6496

query I rowsort
SELECT - col0 AS col1 FROM tab2 WHERE NOT NULL > + col1
----

query I rowsort
SELECT col0 - + col2 * - col0 AS col2 FROM tab1
----
165
3712
7760

query I rowsort
SELECT - col1 * col1 - - tab1.col2 AS col2 FROM tab1
----
-43
-622
-73

query I rowsort
SELECT + col1 + - col0 * col2 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT ALL col2 * col0 * - 20 FROM tab1 AS cor0
----
-153600
-3240
-72960

query I rowsort
SELECT DISTINCT + ( col1 ) * col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT cor0.col2 + + col1 * ( - ( col2 ) ) AS col1 FROM tab1 cor0
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-5381
SELECT DISTINCT + - col2 DIV col0 col0 FROM tab2 AS cor0
----
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5381
SELECT DISTINCT + - col2 / col0 col0 FROM tab2 AS cor0
----
-3
0

query I rowsort
SELECT + cor0.col2 + col1 * - col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL + ( + col0 ) + + col1 - + 53 * - col2 AS col0 FROM tab1 AS cor0
----
2891
3095
5181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5384
SELECT DISTINCT CAST( 24 AS SIGNED ) FROM tab1
----
24

skipif mysql # not compatible
query I rowsort label-5384
SELECT DISTINCT CAST ( 24 AS INTEGER ) FROM tab1
----
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-5385
SELECT DISTINCT ( + col2 + col2 ) DIV - 52 FROM tab0
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-5385
SELECT DISTINCT ( + col2 + col2 ) / - 52 FROM tab0
----
-1
-3
0

query I rowsort
SELECT tab0.col0 + 48 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 5473b80f743321556c1e1a8967e5f508

onlyif mysql # use DIV operator for integer division
query I rowsort label-5387
SELECT ALL + tab1.col0 DIV - col1 FROM tab1
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-5387
SELECT ALL + tab1.col0 / - col1 FROM tab1
----
-6
-6
0

query I rowsort
SELECT - 91 * 4 FROM tab2 AS cor0
----
-364
-364
-364

query I rowsort
SELECT + 36 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 4d1892e880125dc90345721151acb22c

query I rowsort
SELECT 5 + cor0.col1 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to b176c65c1e64e0787e1861a64085e08f

query I rowsort
SELECT + 36 + col1 + col0 AS col0 FROM tab1 AS cor0
----
110
129
65

query I rowsort
SELECT ALL col0 + 92 + - col1 AS col2 FROM tab2 AS cor0
----
111
154
68

query I rowsort
SELECT - 33 * col0 + col1 + - col1 FROM tab1 AS cor0
----
-2112
-2640
-99

query I rowsort
SELECT col0 * + cor0.col1 + + col2 + 51 * - col1 AS col0 FROM tab0 cor0
----
-1551
-2289
3540

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + col0 col1 FROM tab1 AS cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5396
SELECT DISTINCT - col0 DIV col1 + - col2 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-5396
SELECT DISTINCT - col0 / col1 + - col2 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5397
SELECT ALL tab2.col0 DIV col0 + - col0 AS col2 FROM tab2
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-5397
SELECT ALL tab2.col0 / col0 + - col0 AS col2 FROM tab2
----
-6
-77
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col2 FROM tab2, tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - ( col0 ) + - col2 AS col2 FROM tab0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 63 col0 FROM tab0
----
-63

onlyif mysql # use DIV operator for integer division
query I rowsort label-5401
SELECT ALL - + 66 DIV col0 + col0 AS col0 FROM tab0 AS cor0
----
22
34
89

skipif mysql # not compatible
query I rowsort label-5401
SELECT ALL - + 66 / col0 + col0 AS col0 FROM tab0 AS cor0
----
22
34
89

query I rowsort
SELECT ALL cor0.col2 * + cor0.col0 - - col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL - 52 * - col1 FROM tab1 AS cor0
----
1352
520
676

query I rowsort
SELECT - + 2 * col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT - - col1 + + cor0.col2 * col2 FROM tab2 AS cor0
----
1461
735
760

onlyif mysql # use DIV operator for integer division
query I rowsort label-5406
SELECT DISTINCT - - col0 + cor0.col0 + cor0.col0 DIV - col0 AS col2 FROM tab2 cor0
----
13
155
157

skipif mysql # not compatible
query I rowsort label-5406
SELECT DISTINCT - - col0 + cor0.col0 + cor0.col0 / - col0 AS col2 FROM tab2 cor0
----
13
155
157

onlyif mysql # use DIV operator for integer division
query I rowsort label-5407
SELECT ALL + col1 * col1 - + col2 DIV col0 FROM tab0 AS cor0
----
7395
8281
9409

skipif mysql # not compatible
query I rowsort label-5407
SELECT ALL + col1 * col1 - + col2 / col0 FROM tab0 AS cor0
----
7395
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-5408
SELECT ALL col0 DIV + col2 + + col2 FROM tab1 AS cor0
----
54
58
96

skipif mysql # not compatible
query I rowsort label-5408
SELECT ALL col0 / + col2 + + col2 FROM tab1 AS cor0
----
54
58
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 80 col1 FROM tab0 AS cor0
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col1 * + col0 + col1 col0 FROM tab0 cor0
----
-3298
-664027
-68026

onlyif mysql # use DIV operator for integer division
query I rowsort label-5411
SELECT DISTINCT col2 DIV cor0.col0 + - col0 FROM tab0 AS cor0
----
-23
-35
-89

skipif mysql # not compatible
query I rowsort label-5411
SELECT DISTINCT col2 / cor0.col0 + - col0 FROM tab0 AS cor0
----
-23
-35
-89

query I rowsort
SELECT - col0 * + col0 + cor0.col0 FROM tab0 cor0
----
-1190
-552
-7832

query I rowsort
SELECT ( - col2 ) + col1 FROM tab0
----
53
9
96

query I rowsort
SELECT - col0 * + col0 + - col2 AS col1 FROM tab2
----
-6110
-6279
-76

query I rowsort
SELECT + ( cor0.col2 ) + col2 AS col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT - ( - cor0.col2 ) * + col1 + + cor0.col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL + col0 + - col2 * col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT - cor0.col1 * + 93 + cor0.col0 AS col2 FROM tab2 AS cor0
----
-1502
-2876
-5409

query I rowsort
SELECT tab1.col1 * + col1 + col1 AS col0 FROM tab1
----
110
182
702

query I rowsort
SELECT + col2 + col1 + - col1 AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL - col2 * - 84 * + col2 - - col2 AS col1 FROM tab0
----
564898
85
91509

onlyif mysql # use DIV operator for integer division
query I rowsort label-5423
SELECT ALL - col2 + + col2 DIV - col0 FROM tab0
----
-1
-34
-82

skipif mysql # not compatible
query I rowsort label-5423
SELECT ALL - col2 + + col2 / - col0 FROM tab0
----
-1
-34
-82

query I rowsort
SELECT 78 * - 17 FROM tab0
----
-1326
-1326
-1326

query I rowsort
SELECT DISTINCT ( col1 ) - + col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT ALL col0 * - col2 - + col1 AS col2 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT ALL + 46 + - col2 + col2 FROM tab2
----
46
46
46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5428
SELECT CAST( col1 AS SIGNED ) * col1 - col2 FROM tab1 AS cor0
----
43
622
73

skipif mysql # not compatible
query I rowsort label-5428
SELECT CAST ( col1 AS INTEGER ) * col1 - col2 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT DISTINCT + col2 * - col0 + - col1 * + tab1.col2 FROM tab1
----
-1566
-4218
-8928

query I rowsort
SELECT ( col1 ) * tab1.col1 AS col1 FROM tab1
----
100
169
676

query I rowsort
SELECT ALL ( + tab0.col2 ) + - tab0.col2 FROM tab0
----
0
0
0

query I rowsort
SELECT tab0.col2 * - col2 + - tab0.col0 + + col1 * col0 FROM tab0
----
1286
3359
951

onlyif mysql # use DIV operator for integer division
query I rowsort label-5433
SELECT + col2 DIV - col1 + + col1 col1 FROM tab2 AS cor0
----
15
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5433
SELECT + col2 / - col1 + + col1 col1 FROM tab2 AS cor0
----
15
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5434
SELECT DISTINCT - tab0.col1 * tab0.col1 DIV - col0 col1 FROM tab0
----
268
308
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5434
SELECT DISTINCT - tab0.col1 * tab0.col1 / - col0 col1 FROM tab0
----
268
308
93

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT DISTINCT + col0 FROM tab2 WHERE NULL NOT IN ( - col1 + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5437
SELECT ALL col2 DIV - col2 AS col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5437
SELECT ALL col2 / - col2 AS col2 FROM tab1
----
-1
-1
-1

query III rowsort
SELECT ALL * FROM tab1 WHERE ( + col2 * col0 ) > col0
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT ALL - tab0.col1 + - col0 AS col2 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT - col2 * + tab1.col0 + + col2 AS col1 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT tab0.col1 AS col0 FROM tab0 WHERE col2 * col1 + col1 > NULL
----

query I rowsort
SELECT - col0 * - col1 + col2 * - col2 AS col2 FROM tab1
----
-2609
-2838
-8176

query I rowsort
SELECT - col1 * col1 AS col0 FROM tab2 WHERE ( NULL ) NOT BETWEEN col2 AND ( NULL )
----

query I rowsort
SELECT + col1 * - col2 AS col0 FROM tab2 WHERE NOT + col1 NOT IN ( - tab2.col2 * col2 )
----

query I rowsort
SELECT cor0.col0 + + col1 * - col1 + col1 * + col2 FROM tab2 AS cor0
----
-117
-1869
436

onlyif mysql # use DIV operator for integer division
query I rowsort label-5446
SELECT + col0 + col1 DIV col0 + col1 AS col0 FROM tab1 AS cor0
----
37
74
93

skipif mysql # not compatible
query I rowsort label-5446
SELECT + col0 + col1 / col0 + col1 AS col0 FROM tab1 AS cor0
----
37
74
93

query I rowsort
SELECT ALL + col0 AS col1 FROM tab1 AS cor0 WHERE NULL BETWEEN col2 * - col0 AND NULL
----

query I rowsort
SELECT ALL col0 * cor0.col2 * - cor0.col0 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT cor0.col0 * col2 * col0 AS col2 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT DISTINCT col1 * - col0 * col0 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT - col1 FROM tab1 WHERE NOT ( NULL ) IN ( col0 - + col2 * + col1 ) AND NOT - col2 * col0 + + col0 >= NULL
----

query I rowsort
SELECT - col2 + - tab1.col0 * + col2 FROM tab1
----
-216
-3705
-7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-5453
SELECT col0 * + col2 + - col2 DIV - col1 AS col0 FROM tab1
----
164
3653
7687

skipif mysql # not compatible
query I rowsort label-5453
SELECT col0 * + col2 + - col2 / - col1 AS col0 FROM tab1
----
164
3653
7687

query I rowsort
SELECT ALL cor0.col2 + + col1 * + col0 * col1 AS col2 FROM tab1 cor0
----
13616
2082
6457

query I rowsort
SELECT ALL + cor0.col2 + + col0 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT tab1.col0 * col2 + + col2 AS col0 FROM tab1
----
216
3705
7776

query I rowsort
SELECT - + col2 * col2 * col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT cor0.col2 + col0 * + col2 + + col1 FROM tab1 AS cor0
----
242
3715
7789

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * + col0 col1 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT + col0 * - col2 + col0 * tab1.col0 AS col0 FROM tab1
----
-1280
-153
448

query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - 8 AS col2 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to 852581644118629bf652b1aa4b8f4363

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5463
SELECT - tab1.col1 + - CAST( col0 AS SIGNED ) FROM tab1
----
-29
-74
-93

skipif mysql # not compatible
query I rowsort label-5463
SELECT - tab1.col1 + - CAST ( col0 AS INTEGER ) FROM tab1
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5464
SELECT ALL col1 DIV ( - 65 ) AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5464
SELECT ALL col1 / ( - 65 ) AS col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + + col2 + + cor0.col1 * - ( - col1 * + col1 + + col2 * + col0 ) FROM tab0 AS cor0
----
567977
89535
909279

query I rowsort
SELECT ALL + cor0.col1 + col0 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + - 38 * col1 FROM tab2 AS cor0
----
-1178
-2242
-646

query I rowsort
SELECT - ( - 69 ) + col2 * + ( cor0.col0 + cor0.col0 * - col2 ) FROM tab2 AS cor0
----
-111005
-4845
-50631

onlyif mysql # use DIV operator for integer division
query I rowsort label-5469
SELECT ALL - 36 * 63 DIV - col0 FROM tab1 AS cor0
----
28
35
756

skipif mysql # not compatible
query I rowsort label-5469
SELECT ALL - 36 * 63 / - col0 FROM tab1 AS cor0
----
28
35
756

query I rowsort
SELECT 72 * col2 * + col0 + 22 FROM tab0 cor0
----
2542
525478
57046

query I rowsort
SELECT + + col2 * 37 AS col1 FROM tab2 AS cor0
----
1406
962
999

query I rowsort
SELECT - + ( 55 ) * col2 + col1 AS col1 FROM tab0 cor0
----
-1729
-4419
42

query I rowsort
SELECT DISTINCT + 47 * - col1 AS col1 FROM tab1 AS cor0
----
-1222
-470
-611

onlyif mysql # use DIV operator for integer division
query I rowsort label-5474
SELECT DISTINCT - col2 DIV col0 + - col2 col2 FROM tab0 AS cor0
----
-1
-34
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5474
SELECT DISTINCT - col2 / col0 + - col2 col2 FROM tab0 AS cor0
----
-1
-34
-82

query I rowsort
SELECT ALL + + col2 * col1 + + col2 - + 29 FROM tab0 AS cor0
----
2842
69
7515

query I rowsort
SELECT - - cor0.col2 * + col2 + + col1 FROM tab0 AS cor0
----
1175
6815
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5477
SELECT + col0 + - col1 DIV ( col0 ) - cor0.col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-5477
SELECT + col0 + - col1 / ( col0 ) - cor0.col0 FROM tab2 AS cor0
----
-4
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5478
SELECT ALL - col0 DIV col0 + + col1 + + 10 FROM tab2 cor0
----
26
40
68

skipif mysql # not compatible
query I rowsort label-5478
SELECT ALL - col0 / col0 + + col1 + + 10 FROM tab2 cor0
----
26
40
68

query I rowsort
SELECT - col1 * - cor0.col2 AS col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL col1 - - cor0.col0 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - col2 * cor0.col2 + col0 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT - col2 + col2 * - 64 FROM tab1 cor0
----
-3510
-3705
-6240

query I rowsort
SELECT - cor0.col1 + + cor0.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * 63 + col0 col1 FROM tab0 AS cor0
----
-2055
-28
-5077

query I rowsort
SELECT 82 * - 2 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to 9d80001e2e99852daa15e9fddd52824c

query I rowsort
SELECT + col0 - - cor0.col0 AS col2 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT + + col1 * - 52 + col0 AS col1 FROM tab2 AS cor0
----
-1605
-2990
-805

query I rowsort
SELECT - - col2 * col2 - - col0 FROM tab1 AS cor0
----
2919
3313
9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col1 * + col2 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + - col1 * col0 + - col0 - + cor0.col1 AS col2 FROM tab2 AS cor0
----
-1439
-255
-4739

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5491
SELECT + col1 / CAST( NULL AS SIGNED ) + + ( - cor0.col2 + 78 ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5491
SELECT + col1 / CAST ( NULL AS INTEGER ) + + ( - cor0.col2 + 78 ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 + ( - col2 ) * + col2 FROM tab0 AS cor0
----
-1056
-6642
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 + + 49 * + 71 col1 FROM tab2 AS cor0
----
3486
3557
3558

query I rowsort
SELECT + col0 + + cor0.col0 * col2 AS col1 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-5495
SELECT ALL 76 DIV + col2 + col0 FROM tab1 AS cor0
----
4
65
80

skipif mysql # not compatible
query I rowsort label-5495
SELECT ALL 76 / + col2 + col0 FROM tab1 AS cor0
----
4
65
80

query I rowsort
SELECT ALL col2 * - col0 + + cor0.col1 * col2 FROM tab0 AS cor0
----
164
2046
62

query I rowsort
SELECT DISTINCT - - 2 * col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT - col2 + 78 AS col2 FROM tab1 AS cor0
----
-18
21
24

query I rowsort
SELECT DISTINCT col0 + col1 * - col1 AS col1 FROM tab2 AS cor0
----
-210
-3403
-954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * tab1.col2 * + 81 + col2 * 11 col2 FROM tab1
----
13716
296115
623136

query I rowsort
SELECT DISTINCT 61 AS col2 FROM tab2, tab0 AS cor0
----
61

query I rowsort
SELECT 11 * + tab1.col1 FROM tab1
----
110
143
286

onlyif mysql # use DIV operator for integer division
query I rowsort label-5503
SELECT + cor0.col1 DIV - col2 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5503
SELECT + cor0.col1 / - col2 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 + col0 * col2 AS col0 FROM tab1 cor0
----
159
3584
7600

query I rowsort
SELECT DISTINCT - 96 * col1 AS col0 FROM tab1
----
-1248
-2496
-960

query I rowsort
SELECT DISTINCT + tab1.col0 AS col0 FROM tab1, tab0, tab0 AS cor0, tab1 AS cor1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5507
SELECT + cor0.col2 * col2 DIV - cor0.col1 FROM tab1 AS cor0
----
-112
-324
-708

skipif mysql # not compatible
query I rowsort label-5507
SELECT + cor0.col2 * col2 / - cor0.col1 FROM tab1 AS cor0
----
-112
-324
-708

query I rowsort
SELECT 65 FROM tab2, tab1 cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT 99 - col1 FROM tab1
----
73
86
89

query I rowsort
SELECT ALL - ( col2 ) * + col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - 9 - + col1 AS col0 FROM tab0 cor0
----
-100
-106
-95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5512
SELECT DISTINCT CAST( NULL AS SIGNED ) * col0 - + col1 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5512
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col0 - + col1 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + + cor0.col2 * + col2 + col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT - col1 + - 47 * + col0 FROM tab0 AS cor0
----
-1214
-1742
-4274

onlyif mysql # use DIV operator for integer division
query I rowsort label-5515
SELECT DISTINCT - + 2 DIV - col1 + col1 * 52 * col2 FROM tab0 AS cor0
----
147576
388024
5044

skipif mysql # not compatible
query I rowsort label-5515
SELECT DISTINCT - + 2 / - col1 + col1 * 52 * col2 FROM tab0 AS cor0
----
147576
388024
5044

query I rowsort
SELECT ALL + 82 - + ( + col2 + cor0.col2 ) * 1 * col0 FROM tab1 AS cor0
----
-15278
-242
-7214

query I rowsort
SELECT + + 33 + - col2 FROM tab0 cor0
----
-49
0
32

query I rowsort
SELECT DISTINCT - - col2 * cor0.col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + - ( col2 ) - cor0.col0 AS col1 FROM tab2 AS cor0
----
-104
-117
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5520
SELECT DISTINCT cor0.col1 + + col1 * col0 DIV + col1 + - col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5520
SELECT DISTINCT cor0.col1 + + col1 * col0 / + col1 + - col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + col1 + col0 + ( - col2 + col1 ) * ( - 54 ) FROM tab0 AS cor0
----
-2752
-306
-5052

query I rowsort
SELECT DISTINCT + ( - col2 ) + - col2 AS col0 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT + col1 + cor0.col1 AS col0 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - 12 + cor0.col0 * col1 FROM tab0 cor0
----
2052
3383
8087

onlyif mysql # use DIV operator for integer division
query I rowsort label-5525
SELECT ALL ( - col0 ) DIV - col1 - + col0 * col2 AS col0 FROM tab1
----
-162
-3642
-7674

skipif mysql # not compatible
query I rowsort label-5525
SELECT ALL ( - col0 ) / - col1 - + col0 * col2 AS col0 FROM tab1
----
-162
-3642
-7674

query I rowsort
SELECT ALL - 83 + col2 * 14 * + col2 FROM tab0 AS cor0
----
-69
15163
94053

query I rowsort
SELECT col1 * + col1 + col0 * cor0.col2 FROM tab0 AS cor0
----
15579
8188
9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5528
SELECT ALL + col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5528
SELECT ALL + col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5529
SELECT DISTINCT + col1 DIV 92 AS col1 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-5529
SELECT DISTINCT + col1 / 92 AS col1 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT ALL - - col0 * 4 AS col0 FROM tab2 cor0
----
28
312
316

query I rowsort
SELECT DISTINCT col1 * + 84 FROM tab0 AS cor0
----
7224
7644
8148

query I rowsort
SELECT ALL + ( 29 ) AS col0 FROM tab2 AS cor0
----
29
29
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-5533
SELECT - + col1 + - col1 DIV - col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5533
SELECT - + col1 + - col1 / - col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + 38 * 37 FROM tab0 AS cor0
----
1406
1406
1406

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5535
SELECT DISTINCT + - col1 * - cor0.col1 * col0 + - CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5535
SELECT DISTINCT + - col1 * - cor0.col1 * col0 + - CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT col2 + ( - col0 ) * + ( - 98 ) FROM tab2 AS cor0
----
713
7670
7780

query I rowsort
SELECT DISTINCT col1 + + col1 * + cor0.col1 FROM tab2 AS cor0
----
306
3540
992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col1 + col2 * - col2 col2 FROM tab2
----
-1690
-1733
-4157

onlyif mysql # use DIV operator for integer division
query I rowsort label-5539
SELECT col0 - tab0.col2 DIV col0 FROM tab0
----
23
35
89

skipif mysql # not compatible
query I rowsort label-5539
SELECT col0 - tab0.col2 / col0 FROM tab0
----
23
35
89

query I rowsort
SELECT + col0 - col2 * + col2 AS col2 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT col2 + - tab2.col2 * col1 AS col1 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT ALL - ( + 70 ) - + col1 AS col0 FROM tab2 AS cor0
----
-101
-129
-87

query I rowsort
SELECT - 62 AS col2 FROM tab0 cor0
----
-62
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col0 - col1 col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL + - col1 * + col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) * tab2.col1 + - col2 col1 FROM tab2
----
1305
190
4576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5547
SELECT ALL + + CAST( 74 AS SIGNED ) * - tab0.col0 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to f11eef2d3c260a3092692393bd4de77d

skipif mysql # not compatible
query I rowsort label-5547
SELECT ALL + + CAST ( 74 AS INTEGER ) * - tab0.col0 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to f11eef2d3c260a3092692393bd4de77d

query I rowsort
SELECT ALL col1 * col0 * col0 FROM tab0
----
118825
49536
720811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + col1 col1 FROM tab0 AS cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5550
SELECT ALL col2 + - col0 DIV + 2 FROM tab2
----
-1
-13
24

skipif mysql # not compatible
query I rowsort label-5550
SELECT ALL col2 + - col0 / + 2 FROM tab2
----
-1
-13
24

query I rowsort
SELECT + col0 * col2 + col2 * col2 * + col1 AS col0 FROM tab1 cor0
----
127488
36138
75978

query I rowsort
SELECT + col0 + + 21 FROM tab2 AS cor0
----
100
28
99

query I rowsort
SELECT + col0 + col0 * + col1 + + col0 AS col2 FROM tab1
----
1200
768
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT + col0 * + tab2.col0 + - col0 + + col0 FROM tab2
----
49
6084
6241

query I rowsort
SELECT ALL - 18 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 09afafec657a5e9f082beb6a16ec85de

query I rowsort
SELECT ALL - + col2 * 97 AS col1 FROM tab2 cor0
----
-2522
-2619
-3686

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2, tab1 AS cor3
----
3645 values hashing to e678818485e7b492c8b5d6db976ebc7d

query I rowsort
SELECT + col2 + col1 + col1 * + cor0.col2 FROM tab1 AS cor0
----
1357
1484
637

query I rowsort
SELECT col0 * 99 + - col1 * col0 AS col2 FROM tab0 AS cor0
----
312
70
712

query I rowsort
SELECT DISTINCT + - col2 + - col0 AS col0 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5562
SELECT - col2 DIV ( - 56 ) AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5562
SELECT - col2 / ( - 56 ) AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 + + col1 * - col0 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT + + col0 * + ( col0 ) FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - col2 * - 37 FROM tab1 AS cor0
----
1998
2109
3552

query I rowsort
SELECT - + 43 + col0 FROM tab2 AS cor0
----
-36
35
36

query I rowsort
SELECT - + 82 * col0 - + col2 AS col0 FROM tab1 AS cor0
----
-300
-5305
-6656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col2 col0 FROM tab1
----
2916
3249
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5569
SELECT CAST( col1 + + col0 AS SIGNED ) col1 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5569
SELECT CAST ( col1 + + col0 AS INTEGER ) col1 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-5570
SELECT ALL - col2 + + 42 DIV col2 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-5570
SELECT ALL - col2 + + 42 / col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT 49 * - col2 AS col0 FROM tab0
----
-1617
-4018
-49

query I rowsort
SELECT ALL + ( 61 ) - + cor1.col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2a00985e53d7f9419c28e4b6b3f4ceac

query I rowsort
SELECT + 82 + - col2 * ( 75 ) AS col1 FROM tab2 AS cor0
----
-1868
-1943
-2768

onlyif mysql # use DIV operator for integer division
query I rowsort label-5574
SELECT + tab0.col0 DIV col2 - 92 * col1 AS col0 FROM tab0
----
-7912
-8371
-8889

skipif mysql # not compatible
query I rowsort label-5574
SELECT + tab0.col0 / col2 - 92 * col1 AS col0 FROM tab0
----
-7912
-8371
-8889

query I rowsort
SELECT DISTINCT 39 + - tab2.col2 FROM tab2
----
1
12
13

query I rowsort
SELECT ALL 41 AS col2 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

query I rowsort
SELECT + col2 * - 1 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 99 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT ALL + cor0.col0 * 98 + - col2 * col1 AS col2 FROM tab1 AS cor0
----
-1110
5702
6592

onlyif mysql # use DIV operator for integer division
query I rowsort label-5580
SELECT cor0.col1 + 3 DIV - 40 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif mysql # not compatible
query I rowsort label-5580
SELECT cor0.col1 + 3 / - 40 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 * + col2 col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT + 97 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT DISTINCT - col2 * + 84 AS col2 FROM tab2 cor0
----
-2184
-2268
-3192

query I rowsort
SELECT - - cor0.col0 * + col1 - + col1 AS col1 FROM tab2 AS cor0
----
1326
186
4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5585
SELECT ALL CAST( NULL AS DECIMAL ) / col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5585
SELECT ALL CAST ( NULL AS REAL ) / col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5586
SELECT + 23 + col2 DIV + col1 FROM tab2 AS cor0
----
23
23
25

skipif mysql # not compatible
query I rowsort label-5586
SELECT + 23 + col2 / + col1 FROM tab2 AS cor0
----
23
23
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-5587
SELECT - 24 DIV 64 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5587
SELECT - 24 / 64 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 47 * col0 + col2 * cor0.col2 AS col0 FROM tab0 AS cor0
----
10907
1646
2217

query I rowsort
SELECT cor0.col0 - - cor0.col0 AS col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - col0 + col2 * + cor0.col1 FROM tab2 cor0
----
1456
567
830

query I rowsort
SELECT 42 + + col0 * col1 AS col1 FROM tab0 AS cor0
----
2106
3437
8141

query I rowsort
SELECT ( col2 ) - tab0.col2 FROM tab0
----
0
0
0

query I rowsort
SELECT + ( + 59 ) FROM tab1
----
59
59
59

query I rowsort
SELECT 5 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT DISTINCT ( - tab2.col0 + col0 * - col0 ) FROM tab2
----
-56
-6162
-6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 18 ) * col2 + 96 * + tab2.col0 col2 FROM tab2
----
1158
7956
8268

query I rowsort
SELECT ( - col1 * - col2 ) + col1 FROM tab1
----
1261
1430
580

query I rowsort
SELECT DISTINCT 95 FROM tab2, tab1 AS cor0
----
95

query I rowsort
SELECT ALL + ( 89 ) AS col1 FROM tab1, tab0 AS cor0, tab1 cor1, tab0 AS cor2
----
81 values hashing to bb5bb13eab35a33bb4641905f5e7c9b6

query I rowsort
SELECT - col0 + col0 * - col2 * col0 FROM tab0 cor0
----
-1260
-19032
-649611

query I rowsort
SELECT + - 11 * cor0.col0 FROM tab2 AS cor0
----
-77
-858
-869

query I rowsort
SELECT ALL - 95 + - col1 * + col2 FROM tab1 cor0
----
-1343
-1499
-665

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col1 col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + - 46 + + col2 FROM tab0 AS cor0
----
-13
-45
36

query I rowsort
SELECT col0 * + col0 + col2 * col1 + + col2 FROM tab2 AS cor0
----
6925
7644
913

query I rowsort
SELECT - col2 + + col1 * - col0 FROM tab2 AS cor0
----
-1381
-244
-4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-5607
SELECT ALL - col0 DIV + col1 col2 FROM tab1 AS cor0
----
-6
-6
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5607
SELECT ALL - col0 / + col1 col2 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT ALL + 82 + - col0 AS col1 FROM tab2 AS cor0
----
3
4
75

query I rowsort
SELECT ( + 25 ) * col2 * + col2 AS col1 FROM tab1
----
230400
72900
81225

query I rowsort
SELECT + + col2 - + col1 * + col0 AS col1 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-5611
SELECT - - col0 + + col1 DIV ( - 24 ) FROM tab2 AS cor0
----
6
76
79

skipif mysql # not compatible
query I rowsort label-5611
SELECT - - col0 + + col1 / ( - 24 ) FROM tab2 AS cor0
----
6
76
79

query I rowsort
SELECT DISTINCT - - 5 * col0 FROM tab2 AS cor0
----
35
390
395

query I rowsort
SELECT ALL + 7 * - col0 + - ( + 61 ) * - cor0.col2 FROM tab1 cor0
----
3029
3273
5296

query I rowsort
SELECT cor0.col1 * 15 + 36 AS col2 FROM tab1 AS cor0
----
186
231
426

query I rowsort
SELECT col2 * - 11 + - tab0.col0 FROM tab0
----
-387
-46
-991

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 78 col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT DISTINCT col1 + + col0 * - col0 * col1 FROM tab1 AS cor0
----
-208
-40950
-83187

query I rowsort
SELECT ALL cor0.col0 + cor0.col2 - + col1 AS col1 FROM tab2 AS cor0
----
100
3
45

query I rowsort
SELECT ALL + col0 + 2 * 24 AS col1 FROM tab0 AS cor0
----
137
72
83

query I rowsort
SELECT col2 + - ( col1 ) AS col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + + col1 * + ( - col2 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + 79 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

query I rowsort
SELECT 85 * - cor0.col1 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to b16e9457aef5b95bde054b096035f5db

query I rowsort
SELECT DISTINCT - 95 AS col0 FROM tab1 cor0
----
-95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5625
SELECT ALL + + CAST( + col1 AS SIGNED ) + col0 * col2 AS col2 FROM tab1 AS cor0
----
188
3658
7693

skipif mysql # not compatible
query I rowsort label-5625
SELECT ALL + + CAST ( + col1 AS INTEGER ) + col0 * col2 AS col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT - col1 * + col0 * col1 - - col2 AS col1 FROM tab0 AS cor0
----
-177471
-329314
-736927

query I rowsort
SELECT col0 * 88 FROM tab1 AS cor0
----
264
5632
7040

onlyif mysql # use DIV operator for integer division
query I rowsort label-5628
SELECT - col2 DIV 48 AS col2 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5628
SELECT - col2 / 48 AS col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * + col0 AS col2 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT col1 * - col1 * 42 AS col2 FROM tab2 AS cor0
----
-12138
-146202
-40362

query I rowsort
SELECT - col0 * - ( + col1 ) FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT col1 + - cor0.col2 * 60 AS col1 FROM tab1 AS cor0
----
-3214
-3410
-5747

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5633
SELECT DISTINCT - ( col0 ) * CAST( NULL AS DECIMAL ) AS col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5633
SELECT DISTINCT - ( col0 ) * CAST ( NULL AS REAL ) AS col0 FROM tab2
----
NULL

query I rowsort
SELECT ALL - 70 * 67 FROM tab1, tab1 AS cor0
----
9 values hashing to c8294cf1d57f0eecbd348697ad49ab43

query I rowsort
SELECT + cor1.col1 AS col0 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT + 21 + cor0.col1 AS col2 FROM tab1, tab2 AS cor0
----
38
52
80

query I rowsort
SELECT ALL - col2 * + 32 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1120
-233536
-25344

query I rowsort
SELECT - col1 * - 78 * col1 AS col2 FROM tab0 AS cor0
----
576888
645918
733902

query I rowsort
SELECT - + col0 * cor0.col1 AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5640
SELECT DISTINCT - 84 DIV col0 + col0 * col1 FROM tab1
----
1039
50
639

skipif mysql # not compatible
query I rowsort label-5640
SELECT DISTINCT - 84 / col0 + col0 * col1 FROM tab1
----
1039
50
639

query I rowsort
SELECT + col1 + col1 * col2 * col2 AS col0 FROM tab2
----
22630
24565
39943

query I rowsort
SELECT + - 21 + + 78 * col1 FROM tab2 AS cor0
----
1305
2397
4581

query I rowsort
SELECT DISTINCT col2 + - ( - col1 ) FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 12 + col1 col0 FROM tab1 AS cor0
----
-2
1
14

query I rowsort
SELECT + col2 * + col2 + - 63 * - col1 FROM tab0
----
12457
6112
6507

query I rowsort
SELECT - + col1 * + cor0.col2 * 84 AS col2 FROM tab2 AS cor0
----
-128856
-54264
-70308

query I rowsort
SELECT DISTINCT + - col0 + cor0.col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT - 23 + + col2 FROM tab0 AS cor0
----
-22
10
59

query I rowsort
SELECT DISTINCT 88 * + col1 AS col2 FROM tab2 AS cor0
----
1496
2728
5192

query I rowsort
SELECT ALL - cor0.col0 * cor0.col2 + - ( 94 ) * col1 FROM tab0 AS cor0
----
-15852
-8876
-9153

onlyif mysql # use DIV operator for integer division
query I rowsort label-5651
SELECT - col2 * - col1 + + 58 DIV col0 AS col2 FROM tab0 AS cor0
----
2840
7462
98

skipif mysql # not compatible
query I rowsort label-5651
SELECT - col2 * - col1 + + 58 / col0 AS col2 FROM tab0 AS cor0
----
2840
7462
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5652
SELECT - col2 + + col2 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5652
SELECT - col2 + + col2 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + ( + col2 ) + + ( + 30 ) AS col2 FROM tab1 AS cor0
----
-24
-27
-66

query I rowsort
SELECT DISTINCT + col0 * col1 + - col1 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
-620
3068
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col0 + col2 col2 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5656
SELECT - CAST( NULL AS SIGNED ) + - ( + col0 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5656
SELECT - CAST ( NULL AS INTEGER ) + - ( + col0 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * + 51 AS col2 FROM tab0 AS cor0
----
-1224
-1785
-4539

onlyif mysql # use DIV operator for integer division
query I rowsort label-5658
SELECT + 12 DIV col2 + col1 col0 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5658
SELECT + 12 / col2 + col1 col0 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 * - col2 + - ( 57 ) * cor0.col1 col0 FROM tab0 AS cor0
----
-40839
-5530
-556555

onlyif mysql # use DIV operator for integer division
query I rowsort label-5660
SELECT - ( - 91 ) DIV + tab0.col2 FROM tab0
----
1
2
91

skipif mysql # not compatible
query I rowsort label-5660
SELECT - ( - 91 ) / + tab0.col2 FROM tab0
----
1
2
91

query I rowsort
SELECT + + ( cor0.col2 ) + + col0 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + 49 col0 FROM tab0 AS cor0
----
138
73
84

query I rowsort
SELECT + col2 + - col1 * - col0 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL 59 + + 87 AS col2 FROM tab1
----
146
146
146

query I rowsort
SELECT + 16 * tab0.col0 AS col2 FROM tab0
----
1424
384
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - 2 * - col2 ) + col1 col2 FROM tab1
----
-104
-179
-82

query I rowsort
SELECT DISTINCT ( tab2.col1 ) + col2 FROM tab2
----
55
58
85

query I rowsort
SELECT - col1 * + 78 - + col0 FROM tab0 AS cor0
----
-6732
-7187
-7601

query I rowsort
SELECT - + cor0.col2 - ( + col0 ) * + col1 FROM tab2 AS cor0
----
-1381
-244
-4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-5670
SELECT - CAST( col2 AS SIGNED ) DIV col0 + col2 FROM tab1 AS cor0
----
36
57
95

skipif mysql # not compatible
query I rowsort label-5670
SELECT - CAST ( col2 AS INTEGER ) / col0 + col2 FROM tab1 AS cor0
----
36
57
95

query I rowsort
SELECT ALL + 32 * 71 FROM tab0 AS cor0
----
2272
2272
2272

query I rowsort
SELECT - col0 + + col2 + col2 FROM tab2
----
-26
-3
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5673
SELECT + CAST( 35 AS SIGNED ) + - col1 * + cor0.col1 * col0 FROM tab2 AS cor0
----
-22796
-271483
-6692

skipif mysql # not compatible
query I rowsort label-5673
SELECT + CAST ( 35 AS INTEGER ) + - col1 * + cor0.col1 * col0 FROM tab2 AS cor0
----
-22796
-271483
-6692

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5674
SELECT - - CAST( NULL AS SIGNED ) * col0 + col0 * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5674
SELECT - - CAST ( NULL AS INTEGER ) * col0 + col0 * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5675
SELECT + 86 DIV + col0 AS col1 FROM tab2 AS cor0
----
1
1
12

skipif mysql # not compatible
query I rowsort label-5675
SELECT + 86 / + col0 AS col1 FROM tab2 AS cor0
----
1
1
12

query I rowsort
SELECT ALL col0 * col2 + - col2 AS col2 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT DISTINCT - col1 * col2 + col2 * - 45 AS col0 FROM tab0 AS cor0
----
-11152
-142
-4323

query I rowsort
SELECT - col2 * ( - 78 * + col1 ) AS col1 FROM tab2
----
119652
50388
65286

query I rowsort
SELECT + tab0.col2 * + 56 FROM tab0
----
1848
4592
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-5680
SELECT col0 DIV 41 AS col1 FROM tab0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5680
SELECT col0 / 41 AS col1 FROM tab0
----
0
0
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5681
SELECT - col2 * - CAST( 0 AS SIGNED ) FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5681
SELECT - col2 * - CAST ( 0 AS INTEGER ) FROM tab0
----
0
0
0

query I rowsort
SELECT col0 + - col1 * col2 FROM tab1 cor0
----
-1168
-1401
-506

query I rowsort
SELECT 76 AS col1 FROM tab0 cor0
----
76
76
76

query I rowsort
SELECT 27 + col2 FROM tab2
----
53
54
65

query I rowsort
SELECT 17 * 78 FROM tab1
----
1326
1326
1326

onlyif mysql # use DIV operator for integer division
query I rowsort label-5686
SELECT col1 + col0 DIV tab0.col2 AS col0 FROM tab0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-5686
SELECT col1 + col0 / tab0.col2 AS col0 FROM tab0
----
132
86
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5687
SELECT CAST( + col0 AS SIGNED ) * + col2 AS col1 FROM tab0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-5687
SELECT CAST ( + col0 AS INTEGER ) * + col2 AS col1 FROM tab0
----
35
7298
792

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col0 AS REAL ) + col0 * + col0 FROM tab2
----
42
6006
6162

query I rowsort
SELECT DISTINCT + 61 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
61

query I rowsort
SELECT DISTINCT - ( col1 ) * 15 FROM tab1
----
-150
-195
-390

query I rowsort
SELECT ALL ( 91 ) AS col0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT + 36 AS col0 FROM tab0 cor0
----
36
36
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-5693
SELECT + 33 * col2 DIV - col0 FROM tab2 AS cor0
----
-11
-127
-15

skipif mysql # not compatible
query I rowsort label-5693
SELECT + 33 * col2 / - col0 FROM tab2 AS cor0
----
-11
-127
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col1 ) + + col0 col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + 45 + - col1 AS col2 FROM tab2 cor0
----
-14
14
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 20 * - col1 col0 FROM tab1 cor0
----
200
260
520

query I rowsort
SELECT + 25 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 2c77240b60ac01c717a5ed5d0165f450

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 col2 FROM tab2
----
29
29
29

query I rowsort
SELECT + tab1.col0 - tab1.col2 * tab1.col2 FROM tab1
----
-2913
-3185
-9136

query I rowsort
SELECT col0 + col2 * - col1 * - col0 AS col0 FROM tab1 AS cor0
----
36544
4215
99920

query I rowsort
SELECT + - col2 * - 65 * col1 AS col2 FROM tab2 AS cor0
----
41990
54405
99710

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5702
SELECT ALL tab2.col1 * CAST( NULL AS SIGNED ) * - 5 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5702
SELECT ALL tab2.col1 * CAST ( NULL AS INTEGER ) * - 5 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 + + 35 * - col2 * - col2 AS col0 FROM tab1 AS cor0
----
102114
113772
322656

query I rowsort
SELECT DISTINCT + col2 * 9 + + 68 AS col2 FROM tab0 AS cor0
----
365
77
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-5705
SELECT - - cor0.col0 DIV ( cor0.col0 ) FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5705
SELECT - - cor0.col0 / ( cor0.col0 ) FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + + col1 * cor0.col0 * - cor0.col2 + - col0 FROM tab0 AS cor0
----
-3430
-664207
-68136

query I rowsort
SELECT + col1 * - 36 AS col0 FROM tab1 AS cor0
----
-360
-468
-936

query I rowsort
SELECT - col0 * + col2 + + col1 * - col2 FROM tab2 cor0
----
-1026
-3562
-3648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 22 col0 FROM tab1 AS cor0
----
-42
-58
19

query I rowsort
SELECT col0 + - 40 * - col2 * 49 FROM tab2 cor0
----
51038
52927
74559

query I rowsort
SELECT + col1 * - col2 + ( col2 * col0 ) FROM tab2 AS cor0
----
-648
2356
494

query I rowsort
SELECT + col1 * col2 + ( - col0 + col1 ) * col0 FROM tab2 AS cor0
----
-4252
1005
52

query I rowsort
SELECT ALL - + col1 * col2 * col0 + col1 FROM tab0 AS cor0
----
-3298
-664027
-68026

onlyif mysql # use DIV operator for integer division
query I rowsort label-5714
SELECT ALL + col0 + - col0 * ( + col0 ) DIV - col1 AS col2 FROM tab1 AS cor0
----
3
473
572

skipif mysql # not compatible
query I rowsort label-5714
SELECT ALL + col0 + - col0 * ( + col0 ) / - col1 AS col2 FROM tab1 AS cor0
----
3
473
572

query I rowsort
SELECT + + col2 + + col1 * col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL + 29 * - col1 + - col1 * col0 AS col2 FROM tab0 AS cor0
----
-10738
-4558
-6208

query I rowsort
SELECT ALL col2 * col0 + col1 AS col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT + 4 * - 25 AS col1 FROM tab2 cor0
----
-100

onlyif mysql # use DIV operator for integer division
query I rowsort label-5719
SELECT ALL col2 + col0 * - cor0.col2 * col0 - col1 DIV - col1 FROM tab0 AS cor0
----
-1223
-18974
-649439

skipif mysql # not compatible
query I rowsort label-5719
SELECT ALL col2 + col0 * - cor0.col2 * col0 - col1 / - col1 FROM tab0 AS cor0
----
-1223
-18974
-649439

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col1 + col0 * 16 col1 FROM tab0 AS cor0
----
3222
657
8886

query I rowsort
SELECT + col1 + - ( + col0 ) FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT ALL + col2 + + 66 FROM tab1 AS cor0
----
120
123
162

query I rowsort
SELECT ( cor0.col2 ) * col2 * col0 AS col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT + col2 + 53 FROM tab1 AS cor0
----
107
110
149

query I rowsort
SELECT DISTINCT col1 * + col1 + col2 * - col0 FROM tab1 AS cor0
----
-3548
-7511
514

query I rowsort
SELECT ALL col2 + 76 AS col1 FROM tab2
----
102
103
114

query I rowsort
SELECT ALL ( - 49 ) + + col2 FROM tab0 AS cor0
----
-16
-48
33

query I rowsort
SELECT - 24 * + col1 * col0 FROM tab1 AS cor0
----
-15360
-1872
-24960

query I rowsort
SELECT DISTINCT - col0 - - 42 FROM tab0 AS cor0
----
-47
18
7

query I rowsort
SELECT DISTINCT - col2 + col2 * + col0 - 86 AS col0 FROM tab2 AS cor0
----
1916
2878
76

query I rowsort
SELECT 59 FROM tab0 cor0
----
59
59
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5732
SELECT DISTINCT col1 + + col1 DIV col1 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-5732
SELECT DISTINCT col1 + + col1 / col1 FROM tab1 AS cor0
----
11
14
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 * 61 - - cor0.col1 col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to f805ef6047d517a5ac762e401609d93a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * - ( col1 * col0 ) col0 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT DISTINCT col0 + ( + col2 + col0 ) FROM tab1
----
185
256
60

query I rowsort
SELECT DISTINCT 51 FROM tab1, tab1 cor0
----
51

query I rowsort
SELECT 71 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT - col2 + - 29 AS col1 FROM tab2
----
-55
-56
-67

query I rowsort
SELECT ALL + col2 + 98 * - tab0.col0 AS col2 FROM tab0
----
-2319
-3429
-8640

onlyif mysql # use DIV operator for integer division
query I rowsort label-5740
SELECT + + col0 DIV col1 + ( col0 ) DIV 84 AS col1 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5740
SELECT + + col0 / col1 + ( col0 ) / 84 AS col1 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT - - col2 + + col2 * col2 AS col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT - - col0 + + col1 * 32 * - col2 AS col1 FROM tab0 AS cor0
----
-238695
-3069
-90792

query I rowsort
SELECT + col1 * + 91 + + ( - col2 ) FROM tab0 AS cor0
----
7793
8199
8826

query I rowsort
SELECT ALL col0 * 10 AS col0 FROM tab2 AS cor0
----
70
780
790

query I rowsort
SELECT 19 AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 86c53e8567a17c8d91fc5aff119e0498

query I rowsort
SELECT DISTINCT + + col2 + col0 * 39 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
1401
3642
993

query I rowsort
SELECT ALL + col1 * 42 + + col2 * + col0 + - col1 AS col1 FROM tab2 AS cor0
----
1460
3699
4447

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5748
SELECT + + cor0.col2 * + CAST( - col2 AS SIGNED ) + col2 FROM tab2 AS cor0
----
-1406
-650
-702

skipif mysql # not compatible
query I rowsort label-5748
SELECT + + cor0.col2 * + CAST ( - col2 AS INTEGER ) + col2 FROM tab2 AS cor0
----
-1406
-650
-702

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5749
SELECT ALL - ( - col0 ) * - col2 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5749
SELECT ALL - ( - col0 ) * - col2 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * - col2 + col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT cor0.col2 + - 32 FROM tab1 AS cor0
----
22
25
64

query I rowsort
SELECT DISTINCT - 40 FROM tab1, tab1 AS cor0
----
-40

query I rowsort
SELECT DISTINCT + 51 * 25 AS col2 FROM tab1
----
1275

query I rowsort
SELECT - - col1 + 31 + - col0 FROM tab2 cor0
----
-31
12
55

query I rowsort
SELECT + 30 + col2 + col0 FROM tab1 AS cor0
----
151
206
87

query I rowsort
SELECT DISTINCT - 23 + - col2 * + 34 AS col1 FROM tab2
----
-1315
-907
-941

query I rowsort
SELECT ALL - col0 + + col0 * - col1 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT DISTINCT col1 + col0 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-5759
SELECT DISTINCT - - col0 DIV + col0 - 58 FROM tab0 AS cor0
----
-57

skipif mysql # not compatible
query I rowsort label-5759
SELECT DISTINCT - - col0 / + col0 - 58 FROM tab0 AS cor0
----
-57

query I rowsort
SELECT ALL cor0.col1 + col1 * 84 AS col2 FROM tab2 AS cor0
----
1445
2635
5015

query I rowsort
SELECT - cor0.col1 + - col1 * col1 + + col0 FROM tab1 AS cor0
----
-102
-46
-699

query I rowsort
SELECT col0 + + 20 * + 81 FROM tab0 AS cor0
----
1644
1655
1709

query I rowsort
SELECT ALL cor0.col0 + cor0.col2 * col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL - cor0.col2 - ( - col0 ) * col0 AS col0 FROM tab1 cor0
----
-45
4039
6304

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5765
SELECT DISTINCT - cor0.col2 * - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5765
SELECT DISTINCT - cor0.col2 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL col0 * + 88 AS col0 FROM tab1 AS cor0
----
264
5632
7040

onlyif mysql # use DIV operator for integer division
query I rowsort label-5767
SELECT + - col1 * col2 + col0 + + col0 DIV + col2 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-505

skipif mysql # not compatible
query I rowsort label-5767
SELECT + - col1 * col2 + col0 + + col0 / + col2 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-505

query I rowsort
SELECT DISTINCT - - col0 + + col2 * 51 FROM tab1 AS cor0
----
2757
2971
4976

onlyif mysql # use DIV operator for integer division
query I rowsort label-5769
SELECT ALL col0 + col2 DIV - 71 FROM tab1
----
3
64
79

skipif mysql # not compatible
query I rowsort label-5769
SELECT ALL col0 + col2 / - 71 FROM tab1
----
3
64
79

query I rowsort
SELECT 62 + col2 AS col2 FROM tab2
----
100
88
89

query I rowsort
SELECT 73 * - tab0.col0 AS col0 FROM tab0
----
-1752
-2555
-6497

query I rowsort
SELECT ALL tab0.col0 - tab0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to c22e7a33a1d8d55a5f7224b3cf03e3bc

query I rowsort
SELECT DISTINCT + 73 * col0 AS col2 FROM tab0
----
1752
2555
6497

onlyif mysql # use DIV operator for integer division
query I rowsort label-5774
SELECT ALL 84 DIV tab2.col0 FROM tab2
----
1
1
12

skipif mysql # not compatible
query I rowsort label-5774
SELECT ALL 84 / tab2.col0 FROM tab2
----
1
1
12

query I rowsort
SELECT + - col0 * col1 * col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT - col0 * + cor0.col2 * + 1 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - - col0 + col0 * 57 FROM tab2 cor0
----
406
4524
4582

query I rowsort
SELECT + col1 * col0 + - col0 AS col1 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT + - col0 * - ( col2 ) AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - cor0.col0 * + col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - - ( - cor0.col2 ) + col0 * + col0 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT + cor0.col1 + col0 * col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL - 57 AS col0 FROM tab1
----
-57
-57
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5785
SELECT - - col0 * col0 DIV + col1 + col1 AS col1 FROM tab2 AS cor0
----
162
32
384

skipif mysql # not compatible
query I rowsort label-5785
SELECT - - col0 * col0 / + col1 + col1 AS col1 FROM tab2 AS cor0
----
162
32
384

query I rowsort
SELECT - - ( col0 ) + cor0.col1 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT col0 * col1 AS col2 FROM tab1 cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 78 col1 FROM tab0
----
-78

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1, tab0 AS cor0 WHERE NOT NULL >= NULL
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5790
SELECT + CAST( col0 AS SIGNED ) * tab2.col1 FROM tab2
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-5790
SELECT + CAST ( col0 AS INTEGER ) * tab2.col1 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-5791
SELECT DISTINCT ( 92 + col2 ) DIV col1 AS col2 FROM tab1
----
14
5

skipif mysql # not compatible
query I rowsort label-5791
SELECT DISTINCT ( 92 + col2 ) / col1 AS col2 FROM tab1
----
14
5

query I rowsort
SELECT - 14 * + col0 AS col2 FROM tab2
----
-1092
-1106
-98

query I rowsort
SELECT - ( + 30 ) * + col0 FROM tab0
----
-1050
-2670
-720

query I rowsort
SELECT + col1 * col2 + 76 FROM tab1 AS cor0
----
1324
1480
646

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - col1 * cor0.col0 col0 FROM tab2 AS cor0
----
-1305
-190
-4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-5796
SELECT + col1 DIV col0 + col0 AS col2 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-5796
SELECT + col1 / col0 + col0 AS col2 FROM tab1 AS cor0
----
11
64
80

query I rowsort
SELECT DISTINCT - 0 + col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - 34 * col2 * col0 AS col0 FROM tab2 AS cor0
----
-102068
-6426
-68952

query I rowsort
SELECT col2 + cor0.col2 + cor0.col1 FROM tab1 AS cor0
----
124
134
205

query I rowsort
SELECT col1 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL cor0.col0 * - col1 + col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL + col1 * + 84 + + col0 * + col0 AS col0 FROM tab2 cor0
----
11040
2653
7669

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - 96 + + col2 * - col0 col2 FROM tab0 AS cor0
----
-131
-15170
-3960

query I rowsort
SELECT - + cor0.col1 * col0 * - col0 AS col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL col1 + col1 * col1 FROM tab2
----
306
3540
992

query I rowsort
SELECT col1 * - col1 * 48 AS col2 FROM tab1
----
-32448
-4800
-8112

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5807
SELECT DISTINCT + CAST( cor0.col2 AS SIGNED ) - col0 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-5807
SELECT DISTINCT + CAST ( cor0.col2 AS INTEGER ) - col0 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-5808
SELECT + + col0 * cor0.col2 - cor0.col1 DIV - ( 98 ) FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-5808
SELECT + + col0 * cor0.col2 - cor0.col1 / - ( 98 ) FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL + cor0.col2 + + 21 * + col2 FROM tab2 AS cor0
----
572
594
836

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT 91 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT DISTINCT + - col2 + 95 * + col1 AS col0 FROM tab1 AS cor0
----
1139
2416
893

query I rowsort
SELECT - 57 - col0 FROM tab0 AS cor0
----
-146
-81
-92

query I rowsort
SELECT + 2 * + col2 - col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - - 2 FROM tab0 cor0
----
2

query I rowsort
SELECT ALL - - col1 + + 18 AS col2 FROM tab1 AS cor0
----
28
31
44

query I rowsort
SELECT ALL + 39 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5818
SELECT DISTINCT CAST( - 93 AS SIGNED ) AS col1 FROM tab2, tab1 cor0
----
-93

skipif mysql # not compatible
query I rowsort label-5818
SELECT DISTINCT CAST ( - 93 AS INTEGER ) AS col1 FROM tab2, tab1 cor0
----
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5819
SELECT ALL ( - col1 ) * - col1 * CAST( + col1 AS SIGNED ) + tab0.col2 AS col1 FROM tab0
----
636089
753653
912674

skipif mysql # not compatible
query I rowsort label-5819
SELECT ALL ( - col1 ) * - col1 * CAST ( + col1 AS INTEGER ) + tab0.col2 AS col1 FROM tab0
----
636089
753653
912674

query I rowsort
SELECT ALL - ( + 96 ) - col0 AS col1 FROM tab0
----
-120
-131
-185

query I rowsort
SELECT cor0.col1 * 93 FROM tab1 cor0
----
1209
2418
930

query I rowsort
SELECT - col1 * col0 - - cor0.col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT - 67 + + 76 AS col0 FROM tab2 cor0
----
9
9
9

query I rowsort
SELECT col0 * + cor0.col1 * col1 AS col1 FROM tab1 cor0
----
13520
2028
6400

query I rowsort
SELECT ALL - - 72 FROM tab0 cor0
----
72
72
72

query I rowsort
SELECT + 75 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
139
155
78

query I rowsort
SELECT - col2 * 33 + col1 FROM tab0 AS cor0
----
-1003
-2615
64

query I rowsort
SELECT col1 * - ( col1 ) + + tab2.col1 + 22 FROM tab2
----
-250
-3400
-908

query I rowsort
SELECT DISTINCT - ( - cor0.col2 ) FROM tab1, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - col1 * + col1 + 73 AS col2 FROM tab2 AS cor0
----
-216
-3408
-888

query I rowsort
SELECT col2 + + 70 FROM tab1 AS cor0
----
124
127
166

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + 66 col1 FROM tab1 AS cor0
----
-30
12
9

query I rowsort
SELECT DISTINCT col1 * - col1 * - 53 + col0 + + col2 FROM tab0 AS cor0
----
392045
439064
498713

query I rowsort
SELECT ALL - ( col0 ) + - col2 FROM tab0 AS cor0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5835
SELECT - 26 DIV + 48 + col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-5835
SELECT - 26 / + 48 + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + + 61 * 13 FROM tab2 AS cor0
----
793

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5837
SELECT - CAST( NULL AS SIGNED ) * - ( - cor0.col0 ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5837
SELECT - CAST ( NULL AS INTEGER ) * - ( - cor0.col0 ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5838
SELECT DISTINCT + 15 + cor0.col2 DIV + col0 AS col2 FROM tab0 cor0
----
15
16

skipif mysql # not compatible
query I rowsort label-5838
SELECT DISTINCT + 15 + cor0.col2 / + col0 AS col2 FROM tab0 cor0
----
15
16

onlyif mysql # use DIV operator for integer division
query I rowsort label-5839
SELECT ALL + cor0.col1 + - col0 DIV - cor0.col0 col0 FROM tab0 AS cor0
----
87
92
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5839
SELECT ALL + cor0.col1 + - col0 / - cor0.col0 col0 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT cor0.col0 + - col1 FROM tab2 cor0
----
-24
19
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5841
SELECT DISTINCT - CAST( + col2 AS SIGNED ) + cor0.col0 FROM tab2 AS cor0
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-5841
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) + cor0.col0 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-5842
SELECT ALL + ( - 27 ) * col2 DIV col0 + - col2 FROM tab2 AS cor0
----
-131
-35
-50

skipif mysql # not compatible
query I rowsort label-5842
SELECT ALL + ( - 27 ) * col2 / col0 + - col2 FROM tab2 AS cor0
----
-131
-35
-50

query I rowsort
SELECT + + 99 AS col1 FROM tab0 cor0
----
99
99
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-5844
SELECT ALL ( 46 ) * col2 + col1 DIV col2 FROM tab0 AS cor0
----
143
1520
3773

skipif mysql # not compatible
query I rowsort label-5844
SELECT ALL ( 46 ) * col2 + col1 / col2 FROM tab0 AS cor0
----
143
1520
3773

query I rowsort
SELECT + + col2 * 85 AS col2 FROM tab2 AS cor0
----
2210
2295
3230

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5846
SELECT DISTINCT + CAST( + 25 AS SIGNED ) * + col2 AS col2 FROM tab0 AS cor0
----
2050
25
825

skipif mysql # not compatible
query I rowsort label-5846
SELECT DISTINCT + CAST ( + 25 AS INTEGER ) * + col2 AS col2 FROM tab0 AS cor0
----
2050
25
825

query I rowsort
SELECT DISTINCT 30 * + col1 FROM tab0 cor0
----
2580
2730
2910

query I rowsort
SELECT ALL - tab0.col0 * 1 + tab0.col0 + - col0 AS col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - col0 * ( + 55 ) + - col1 + 25 * + 70 AS col2 FROM tab1
----
-1780
-2663
1559

onlyif mysql # use DIV operator for integer division
query I rowsort label-5850
SELECT - col0 DIV - col1 col0 FROM tab1 AS cor0
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5850
SELECT - col0 / - col1 col0 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT ALL col0 * col2 + + 66 * col2 FROM tab0 AS cor0
----
101
12710
2970

query I rowsort
SELECT DISTINCT + 32 * col2 - - ( + 68 ) * - col1 * - cor0.col0 FROM tab1 AS cor0
----
45344
7032
73792

query I rowsort
SELECT col1 + + cor0.col2 * + col1 AS col2 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT col1 * - col0 + col1 * 10 AS col0 FROM tab1 AS cor0
----
-540
-910
182

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 57 * col0 + - col1 col2 FROM tab1
----
-197
-3658
-4573

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - cor1.col2 ) col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT + 93 AS col2 FROM tab0 cor0
----
93
93
93

query I rowsort
SELECT ALL - col1 + - col1 - 86 * col0 * col0 FROM tab2 cor0
----
-4276
-523342
-536760

query I rowsort
SELECT + cor0.col1 + - col0 AS col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL - - col2 + col1 + cor0.col0 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) - col1 AS col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT ALL - - col1 + col0 * + ( col0 * - col2 ) + - col0 FROM tab1 AS cor0
----
-233526
-463
-614467

query I rowsort
SELECT ALL col1 * - col2 * + cor0.col1 + col1 AS col1 FROM tab0 AS cor0
----
-243982
-678951
-9312

query I rowsort
SELECT + - col1 * 31 + col1 + col0 * ( 69 ) FROM tab0 AS cor0
----
-495
-924
3411

onlyif mysql # use DIV operator for integer division
query I rowsort label-5865
SELECT - - col0 + - col0 DIV col2 FROM tab0 AS cor0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-5865
SELECT - - col0 + - col0 / col2 FROM tab0 AS cor0
----
0
24
88

query I rowsort
SELECT DISTINCT col2 * - 93 + 73 FROM tab0 AS cor0
----
-20
-2996
-7553

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5867
SELECT ALL - + cor0.col0 + - CAST( NULL AS SIGNED ) * col0 - - cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5867
SELECT ALL - + cor0.col0 + - CAST ( NULL AS INTEGER ) * col0 - - cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 28 + + col2 AS col1 FROM tab0
----
110
29
61

query I rowsort
SELECT + col2 - ( cor0.col0 ) * + col1 AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT + - cor0.col1 * - col2 + col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + col2 * + 73 + - col1 FROM tab0 AS cor0
----
-24
2323
5895

query I rowsort
SELECT cor0.col1 + col1 * + col1 AS col2 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT DISTINCT 54 + - col0 * + col0 AS col1 FROM tab2
----
-6030
-6187
5

query I rowsort
SELECT + 44 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT - - 86 + cor0.col2 FROM tab1 AS cor0
----
140
143
182

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - ( col1 ) + tab0.col0 col2 FROM tab0
----
-27
-38
87

query I rowsort
SELECT DISTINCT - - col1 * ( col1 * col2 ) - cor0.col0 FROM tab1 AS cor0
----
16144
36501
5636

query I rowsort
SELECT ALL - col0 * - ( col2 ) + - col1 AS col0 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT - col2 + - 60 FROM tab1 cor0
----
-114
-117
-156

query I rowsort
SELECT + - cor0.col2 + 23 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 134e89de36016e372e361a67c1ae62f5

query I rowsort
SELECT - - 46 * - col1 AS col0 FROM tab2 AS cor0
----
-1426
-2714
-782

query I rowsort
SELECT + cor0.col2 + - col1 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT - 38 * + 77 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
-2926

query I rowsort
SELECT ALL col2 * + 84 FROM tab0
----
2772
6888
84

query I rowsort
SELECT + 73 + cor0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to bb55bb7a7028c5833a465ed3eb1d8971

query I rowsort
SELECT DISTINCT - ( col2 ) * + col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT 65 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT + 45 * col0 AS col1 FROM tab0 AS cor0
----
1080
1575
4005

query I rowsort
SELECT + 6 FROM tab2, tab0 cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT ALL - col0 * col2 * + 15 AS col2 FROM tab0
----
-109470
-11880
-525

query I rowsort
SELECT DISTINCT + + 85 FROM tab0, tab2, tab0 AS cor0
----
85

query I rowsort
SELECT ALL + 76 * + col1 + + 14 - + cor0.col1 FROM tab0 AS cor0
----
6464
6839
7289

query I rowsort
SELECT DISTINCT 39 * - col1 FROM tab0 AS cor0
----
-3354
-3549
-3783

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + cor0.col2 + col2 * + col0 col1 FROM tab0 cor0
----
133
7471
911

onlyif mysql # use DIV operator for integer division
query I rowsort label-5895
SELECT DISTINCT + ( col2 ) + - col2 * - col0 DIV col0 AS col0 FROM tab0 AS cor0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-5895
SELECT DISTINCT + ( col2 ) + - col2 * - col0 / col0 AS col0 FROM tab0 AS cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col2 + + 52 + - col0 col2 FROM tab0
----
-1061
-6761
16

query I rowsort
SELECT - + 11 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 7120875811e4d19a19b69cd34b6bc202

onlyif mysql # use DIV operator for integer division
query I rowsort label-5898
SELECT + 83 + col1 * col1 DIV + col1 AS col2 FROM tab2
----
100
114
142

skipif mysql # not compatible
query I rowsort label-5898
SELECT + 83 + col1 * col1 / + col1 AS col2 FROM tab2
----
100
114
142

query I rowsort
SELECT + 75 * 65 FROM tab2 AS cor0
----
4875
4875
4875

query I rowsort
SELECT + col1 * + cor0.col2 + - col2 * cor0.col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + - ( + 49 ) * - col1 AS col0 FROM tab0 AS cor0
----
4214
4459
4753

query I rowsort
SELECT 55 + + 62 * + col1 * - 20 FROM tab0 AS cor0
----
-106585
-112785
-120225

query I rowsort
SELECT 88 * - col0 FROM tab2
----
-616
-6864
-6952

query I rowsort
SELECT DISTINCT 88 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
88

query I rowsort
SELECT + ( - col0 + + 44 ) * - col1 AS col2 FROM tab2
----
-1147
2006
595

query I rowsort
SELECT col0 * ( + col0 ) + col1 * + 59 FROM tab1 AS cor0
----
1543
4686
7167

query I rowsort
SELECT + col0 + ( - 81 ) + col2 FROM tab0 AS cor0
----
-24
-45
90

query I rowsort
SELECT ALL - col0 * col0 + tab2.col0 FROM tab2
----
-42
-6006
-6162

query I rowsort
SELECT + col0 + + 28 * col1 + col0 AS col2 FROM tab0 AS cor0
----
2456
2726
2786

query I rowsort
SELECT - - col1 + + col0 * - col0 + - col1 * 6 FROM tab2 AS cor0
----
-204
-6326
-6379

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + 1 col2 FROM tab0
----
-23
-34
-88

query I rowsort
SELECT col2 * - 39 FROM tab2 cor0
----
-1014
-1053
-1482

query I rowsort
SELECT + col2 + col2 - 78 FROM tab2
----
-2
-24
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5914
SELECT col1 + + col1 DIV + 32 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5914
SELECT col1 + + col1 / + 32 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL - col1 + ( - col2 ) FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5916
SELECT + col2 DIV cor0.col2 + cor0.col1 col1 FROM tab1 AS cor0
----
11
14
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5916
SELECT + col2 / cor0.col2 + cor0.col1 col1 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT DISTINCT + col2 + + ( col0 ) * col1 * col2 AS col0 FROM tab1 cor0
----
36537
4266
99936

query I rowsort
SELECT + - cor0.col2 + cor0.col1 AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL + - cor0.col0 * ( - col2 ) + col2 * col0 AS col0 FROM tab2 AS cor0
----
378
4056
6004

query I rowsort
SELECT ( col2 ) + + col1 + - col0 * - 29 * col1 AS col0 FROM tab1 AS cor0
----
18627
2342
30269

onlyif mysql # use DIV operator for integer division
query I rowsort label-5921
SELECT ALL - 37 DIV + col0 FROM tab1 AS cor0
----
-12
0
0

skipif mysql # not compatible
query I rowsort label-5921
SELECT ALL - 37 / + col0 FROM tab1 AS cor0
----
-12
0
0

query I rowsort
SELECT DISTINCT + ( col0 ) + col1 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + + cor0.col1 + + cor0.col2 * + cor0.col1 AS col0 FROM tab0 cor0
----
194
2924
7553

query I rowsort
SELECT 95 * ( - col2 ) FROM tab2 AS cor0
----
-2470
-2565
-3610

query I rowsort
SELECT ALL - - col1 * - col1 + + col2 * col1 AS col2 FROM tab1 AS cor0
----
1079
470
728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 99 + cor0.col1 * col0 col1 FROM tab2 AS cor0
----
12324
910
9164

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5927
SELECT DISTINCT + CAST( col1 AS SIGNED ) + - col0 AS col2 FROM tab1 AS cor0
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-5927
SELECT DISTINCT + CAST ( col1 AS INTEGER ) + - col0 AS col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL col0 * 99 AS col1 FROM tab1 AS cor0
----
297
6336
7920

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5929
SELECT ALL - + CAST( NULL AS SIGNED ) + + col2 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5929
SELECT ALL - + CAST ( NULL AS INTEGER ) + + col2 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 * + 13 AS col1 FROM tab2 AS cor0
----
1014
1027
91

query I rowsort
SELECT DISTINCT - - 39 * cor0.col0 * - col1 + + ( col0 ) * col0 FROM tab2 AS cor0
----
-173394
-46136
-8414

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5932
SELECT ALL CAST( col1 AS SIGNED ) col0 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5932
SELECT ALL CAST ( col1 AS INTEGER ) col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + tab1.col2 - - tab1.col1 FROM tab1
----
109
67
80

query I rowsort
SELECT col1 - ( + 41 ) AS col2 FROM tab2
----
-10
-24
18

query I rowsort
SELECT + tab1.col1 + + col1 * + col1 + + col2 FROM tab1
----
167
278
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-5936
SELECT ALL - col0 - 68 DIV col2 FROM tab0
----
-103
-26
-89

skipif mysql # not compatible
query I rowsort label-5936
SELECT ALL - col0 - 68 / col2 FROM tab0
----
-103
-26
-89

query I rowsort
SELECT col0 + - col1 * col0 + col1 FROM tab2
----
-1247
-179
-4465

query I rowsort
SELECT - - ( - col2 ) * col1 + 79 * col1 FROM tab2 cor0
----
1612
3127
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * + cor0.col0 col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 48 + - col0 FROM tab0 AS cor0
----
-41
13
24

query I rowsort
SELECT DISTINCT - 96 * + col2 FROM tab1 AS cor0
----
-5184
-5472
-9216

query I rowsort
SELECT DISTINCT - col2 * - col1 + - 58 + - 66 AS col2 FROM tab1 AS cor0
----
1124
1280
446

query I rowsort
SELECT DISTINCT 50 * col1 AS col2 FROM tab0 AS cor0
----
4300
4550
4850

query I rowsort
SELECT ALL + 0 + col2 AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + cor0.col0 - - col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + 9 + + col0 FROM tab1 cor0
----
12
73
89

query I rowsort
SELECT ALL 37 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) FROM tab1, tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT ALL tab1.col2 * + tab1.col1 AS col1 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5950
SELECT ALL - col1 * + col0 + - ( ( col0 ) ) DIV - col0 AS col0 FROM tab1 AS cor0
----
-1039
-639
-77

skipif mysql # not compatible
query I rowsort label-5950
SELECT ALL - col1 * + col0 + - ( ( col0 ) ) / - col0 AS col0 FROM tab1 AS cor0
----
-1039
-639
-77

query I rowsort
SELECT ALL 60 - + col0 AS col1 FROM tab2 AS cor0
----
-18
-19
53

query I rowsort
SELECT ALL - col0 + cor0.col1 + col1 AS col2 FROM tab0 cor0
----
148
159
93

query I rowsort
SELECT ALL - 73 AS col1 FROM tab2
----
-73
-73
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-5954
SELECT ALL - col1 + - 30 - + cor0.col2 DIV + col1 FROM tab2 cor0
----
-49
-61
-89

skipif mysql # not compatible
query I rowsort label-5954
SELECT ALL - col1 + - 30 - + cor0.col2 / + col1 FROM tab2 cor0
----
-49
-61
-89

query I rowsort
SELECT - cor0.col0 * col2 + - col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT + - 95 + - col2 * + 51 AS col0 FROM tab0 AS cor0
----
-146
-1778
-4277

query I rowsort
SELECT DISTINCT + tab1.col2 + tab1.col1 + col0 * col2 FROM tab1
----
242
3715
7789

query I rowsort
SELECT ALL tab2.col0 * col0 + col1 AS col0 FROM tab2
----
6143
6258
80

query I rowsort
SELECT col1 * col1 - col0 * + col2 AS col0 FROM tab0 AS cor0
----
6604
9374
983

query I rowsort
SELECT ( col0 ) + + col0 FROM tab0
----
178
48
70

query I rowsort
SELECT DISTINCT - col1 - col2 * - col0 AS col2 FROM tab2
----
158
1969
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-5962
SELECT 84 DIV - col2 FROM tab0
----
-1
-2
-84

skipif mysql # not compatible
query I rowsort label-5962
SELECT 84 / - col2 FROM tab0
----
-1
-2
-84

query I rowsort
SELECT ALL + 72 + 45 AS col0 FROM tab0 cor0
----
117
117
117

query I rowsort
SELECT DISTINCT 48 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-1488
-2832
-816

query I rowsort
SELECT DISTINCT - 39 + - col1 AS col2 FROM tab2
----
-56
-70
-98

query I rowsort
SELECT ALL - - col0 - - cor0.col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - 69 * col0 AS col0 FROM tab0 AS cor0
----
-1656
-2415
-6141

query I rowsort
SELECT - cor0.col0 * col1 + col2 AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT 8 * - cor0.col0 + cor0.col0 AS col1 FROM tab0 AS cor0
----
-168
-245
-623

query I rowsort
SELECT + ( col1 ) * + col2 + - cor0.col0 + col0 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + col2 * col1 + col1 * - col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5972
SELECT DISTINCT ( col2 ) + + ( + col0 ) DIV + cor0.col0 AS col0 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-5972
SELECT DISTINCT ( col2 ) + + ( + col0 ) / + cor0.col0 AS col0 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT + cor0.col0 * - col1 + col0 + - col1 FROM tab0 AS cor0
----
-2126
-3457
-8101

query I rowsort
SELECT ALL - + cor0.col2 * col0 * 66 AS col1 FROM tab2 AS cor0
----
-12474
-133848
-198132

query I rowsort
SELECT col0 + col0 * col1 + - col2 FROM tab2 cor0
----
1384
197
4654

query I rowsort
SELECT DISTINCT + - col2 + col0 AS col1 FROM tab0 cor0
----
-9
34
7

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab0 cor2, tab1 AS cor3
----
3645 values hashing to 59bb9dc93b6f10de841a7db8eb3857e9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + - 92 - col2 col2 FROM tab0 AS cor0
----
-39
-83
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5979
SELECT ALL col1 DIV - col2 + + col0 + - col2 col2 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5979
SELECT ALL col1 / - col2 + + col0 + - col2 col2 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5980
SELECT DISTINCT + + col2 + 7 * col2 DIV cor0.col0 FROM tab2 AS cor0
----
28
41
54

skipif mysql # not compatible
query I rowsort label-5980
SELECT DISTINCT + + col2 + 7 * col2 / cor0.col0 FROM tab2 AS cor0
----
28
41
54

query I rowsort
SELECT ALL cor0.col1 * 21 + + col2 + col0 * ( - col0 + - col1 * col0 ) AS col2 FROM tab1 AS cor0
----
-44789
-89231
357

query I rowsort
SELECT DISTINCT - + col2 * col1 + + col0 * col0 * - 37 + col2 * - col0 AS col1 FROM tab2 AS cor0
----
-228670
-234565
-2839

query I rowsort
SELECT ALL col0 * - 82 AS col0 FROM tab0 AS cor0
----
-1968
-2870
-7298

query I rowsort
SELECT + col2 * - 97 FROM tab2 AS cor0
----
-2522
-2619
-3686

query I rowsort
SELECT + cor2.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0, tab0 AS cor2
----
243 values hashing to c6425afc100dd55de8d45dec18c469ea

query I rowsort
SELECT ALL + 47 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-1457
-2773
-799

query I rowsort
SELECT ALL col2 * col1 + - col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT ALL - 12 + + col1 FROM tab1 AS cor0
----
-2
1
14

query I rowsort
SELECT + col2 * col0 + + col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT ( - 37 ) - col0 FROM tab1 AS cor0
----
-101
-117
-40

query I rowsort
SELECT ALL + - col2 + col2 * col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT ALL + + col2 + + col2 AS col2 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT 54 FROM tab2 cor0
----
54
54
54

query I rowsort
SELECT + ( + cor0.col1 ) + + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT col2 + 84 AS col0 FROM tab1 AS cor0
----
138
141
180

query I rowsort
SELECT - ( 53 ) AS col2 FROM tab2 AS cor0
----
-53
-53
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 36 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT DISTINCT - ( - col2 ) + + col0 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT col0 + + col0 * - tab1.col2 AS col2 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT - col0 + col2 * 80 AS col1 FROM tab0
----
2616
45
6471

query I rowsort
SELECT DISTINCT - col1 + + 62 AS col1 FROM tab0 AS cor0
----
-24
-29
-35

query I rowsort
SELECT 98 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query I rowsort
SELECT + + 51 + + col0 * + ( col1 ) AS col0 FROM tab1 AS cor0
----
1091
129
691

onlyif mysql # use DIV operator for integer division
query I rowsort label-6004
SELECT - col2 * col2 + cor0.col0 DIV col2 FROM tab1 AS cor0
----
-2916
-3248
-9216

skipif mysql # not compatible
query I rowsort label-6004
SELECT - col2 * col2 + cor0.col0 / col2 FROM tab1 AS cor0
----
-2916
-3248
-9216

query I rowsort
SELECT ALL + col2 * + col2 + + ( - cor0.col0 ) + - col0 * col0 FROM tab2 AS cor0
----
-4876
-5486
673

query I rowsort
SELECT + 8 + + col0 * + ( ( col1 ) ) FROM tab1 cor0
----
1048
648
86

query I rowsort
SELECT ALL + ( + cor0.col0 ) + - 77 AS col0 FROM tab0 AS cor0
----
-42
-53
12

query I rowsort
SELECT ALL - col2 + col2 * - col2 AS col0 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL - col2 - 47 FROM tab0 AS cor0
----
-129
-48
-80

query I rowsort
SELECT DISTINCT col1 * - col0 + + cor0.col1 * + col1 * 83 AS col0 FROM tab1 AS cor0
----
12987
56030
7660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - 5 col2 FROM tab0 AS cor0
----
-4
28
77

query I rowsort
SELECT ALL - + col0 * + 87 AS col2 FROM tab2 cor0
----
-609
-6786
-6873

query I rowsort
SELECT ALL 44 * col0 AS col0 FROM tab1 AS cor0
----
132
2816
3520

query I rowsort
SELECT ALL - ( - col0 * col0 ) AS col2 FROM tab0
----
1225
576
7921

query I rowsort
SELECT - col2 * - 76 FROM tab1
----
4104
4332
7296

query I rowsort
SELECT ALL + ( + tab2.col0 ) - col0 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT 94 * - col0 FROM tab2
----
-658
-7332
-7426

query I rowsort
SELECT - ( 68 ) FROM tab2 AS cor0
----
-68
-68
-68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6019
SELECT DISTINCT CAST( NULL AS SIGNED ) * - col1 - + col1 AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6019
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - col1 - + col1 AS col0 FROM tab0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6020
SELECT DISTINCT - - ( col2 ) * - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6020
SELECT DISTINCT - - ( col2 ) * - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL + 3 + + tab1.col0 * tab1.col0 + col0 FROM tab1
----
15
4163
6483

query I rowsort
SELECT - 24 * col0 + ( - col2 ) + + col0 FROM tab2
----
-1820
-1855
-188

query I rowsort
SELECT ALL + - 39 AS col0 FROM tab0 cor0
----
-39
-39
-39

onlyif mysql # use DIV operator for integer division
query I rowsort label-6024
SELECT ALL + ( - col1 ) DIV cor0.col0 AS col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-6024
SELECT ALL + ( - col1 ) / cor0.col0 AS col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT + + 20 + - col2 FROM tab1 cor0
----
-34
-37
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-6026
SELECT ALL + col0 DIV ( - col2 * col2 + + tab1.col1 ) col2 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6026
SELECT ALL + col0 / ( - col2 * col2 + + tab1.col1 ) col2 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6027
SELECT + cor0.col0 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6027
SELECT + cor0.col0 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 + tab0.col2 AS col2 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6029
SELECT ALL col0 DIV col0 + - tab1.col2 * col1 FROM tab1
----
-1247
-1403
-569

skipif mysql # not compatible
query I rowsort label-6029
SELECT ALL col0 / col0 + - tab1.col2 * col1 FROM tab1
----
-1247
-1403
-569

onlyif mysql # use DIV operator for integer division
query I rowsort label-6030
SELECT DISTINCT + col2 DIV + 17 + 2 DIV col0 FROM tab2 AS cor0
----
1
2

skipif mysql # not compatible
query I rowsort label-6030
SELECT DISTINCT + col2 / + 17 + 2 / col0 FROM tab2 AS cor0
----
1
2

query I rowsort
SELECT DISTINCT - col1 + 50 * col0 FROM tab1 AS cor0
----
124
3190
3987

query I rowsort
SELECT DISTINCT - col2 * col1 * cor0.col0 + + col1 AS col1 FROM tab1 AS cor0
----
-36470
-4186
-99827

query I rowsort
SELECT ALL + 75 + - col1 AS col1 FROM tab1 AS cor0
----
49
62
65

query I rowsort
SELECT 8 + - 67 FROM tab0 AS cor0
----
-59
-59
-59

query I rowsort
SELECT DISTINCT + + col2 * - ( col2 ) AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6036
SELECT ALL + 62 * - col1 + - col2 * CAST( - 69 AS SIGNED ) + + col1 * cor0.col2 FROM tab0 AS cor0
----
-217
-5848
7478

skipif mysql # not compatible
query I rowsort label-6036
SELECT ALL + 62 * - col1 + - col2 * CAST ( - 69 AS INTEGER ) + + col1 * cor0.col2 FROM tab0 AS cor0
----
-217
-5848
7478

query I rowsort
SELECT ALL 56 AS col2 FROM tab0 cor0
----
56
56
56

query I rowsort
SELECT - - col0 * - 20 AS col0 FROM tab1 AS cor0
----
-1280
-1600
-60

query I rowsort
SELECT DISTINCT 36 * 76 FROM tab0 AS cor0
----
2736

query I rowsort
SELECT col0 * - col1 + + col1 * - col1 FROM tab2 AS cor0
----
-1178
-1632
-8083

onlyif mysql # use DIV operator for integer division
query I rowsort label-6041
SELECT ( + cor0.col0 ) DIV col2 col0 FROM tab0 AS cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6041
SELECT ( + cor0.col0 ) / col2 col0 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6042
SELECT ALL + ( col2 ) + - cor0.col2 * CAST( col2 AS SIGNED ) * col0 FROM tab0 AS cor0
----
-26103
-34
-598354

skipif mysql # not compatible
query I rowsort label-6042
SELECT ALL + ( col2 ) + - cor0.col2 * CAST ( col2 AS INTEGER ) * col0 FROM tab0 AS cor0
----
-26103
-34
-598354

query I rowsort
SELECT + 46 * cor0.col2 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 1cd935e612b4c432effb9b66fa7bca63

query I rowsort
SELECT 89 * + 95 FROM tab0 AS cor0
----
8455
8455
8455

query I rowsort
SELECT - 22 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
1892
2002
2134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 94 * - col1 + col2 col1 FROM tab1 AS cor0
----
-1126
-2390
-883

query I rowsort
SELECT DISTINCT + 93 AS col1 FROM tab0 AS cor0
----
93

query I rowsort
SELECT ALL - ( col1 ) * - col2 AS col0 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6049
SELECT DISTINCT CAST( NULL AS SIGNED ) * + 18 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6049
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + 18 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - col0 + col1 * 79 FROM tab0
----
6770
7100
7628

onlyif mysql # use DIV operator for integer division
query I rowsort label-6051
SELECT + col0 DIV - ( 24 + col2 ) FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6051
SELECT + col0 / - ( 24 + col2 ) FROM tab0
----
-1
0
0

query I rowsort
SELECT + col2 + 88 FROM tab2
----
114
115
126

query I rowsort
SELECT col1 + - col1 + - 60 AS col1 FROM tab0
----
-60
-60
-60

onlyif mysql # use DIV operator for integer division
query I rowsort label-6054
SELECT DISTINCT + col0 + col1 + col0 DIV col0 FROM tab1
----
30
75
94

skipif mysql # not compatible
query I rowsort label-6054
SELECT DISTINCT + col0 + col1 + col0 / col0 FROM tab1
----
30
75
94

query I rowsort
SELECT + 22 + ( col0 ) * + cor0.col0 FROM tab2 AS cor0
----
6106
6263
71

query I rowsort
SELECT ALL col2 * + 81 AS col2 FROM tab2 cor0
----
2106
2187
3078

query I rowsort
SELECT ALL + + cor0.col0 - + 85 * col2 FROM tab0 AS cor0
----
-2781
-50
-6881

query I rowsort
SELECT ALL - - col0 * - col0 - ( col2 ) FROM tab2 AS cor0
----
-6110
-6279
-76

query I rowsort
SELECT ALL - col1 * ( + 56 ) * col0 + tab2.col0 AS col0 FROM tab2
----
-12145
-257634
-75129

query I rowsort
SELECT DISTINCT 42 AS col0 FROM tab0, tab2, tab2 AS cor0
----
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ALL + ( + 5 ) * col2 * col1 + + tab1.col2 * + col2 * - col1 AS col0 FROM tab1
----
-113568
-29640
-68796

query I rowsort
SELECT ALL + 66 + col2 * col2 FROM tab1
----
2982
3315
9282

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 83 col2 FROM tab1, tab2, tab1 AS cor0
----
83

query I rowsort
SELECT ALL + + col0 + col1 * - col1 * - 88 AS col0 FROM tab0 AS cor0
----
650872
728817
828027

query I rowsort
SELECT + + col1 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab0, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT - ( - col2 ) * col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL + col1 * + col1 + tab1.col0 FROM tab1
----
164
249
679

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 + col1 col1 FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT - 14 AS col0 FROM tab2, tab1 cor0, tab0 AS cor1
----
-14

query I rowsort
SELECT - - 23 + col2 * + col2 FROM tab2 AS cor0
----
1467
699
752

onlyif mysql # use DIV operator for integer division
query I rowsort label-6073
SELECT DISTINCT + cor0.col0 + col0 DIV col2 FROM tab1 AS cor0
----
3
65
80

skipif mysql # not compatible
query I rowsort label-6073
SELECT DISTINCT + cor0.col0 + col0 / col2 FROM tab1 AS cor0
----
3
65
80

query I rowsort
SELECT ALL + col0 + - col1 * + cor0.col0 - - cor0.col2 AS col1 FROM tab1 AS cor0
----
-21
-519
-864

query I rowsort
SELECT + - 45 AS col1 FROM tab1 AS cor0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT 21 + - cor0.col1 FROM tab1 AS cor0
----
-5
11
8

query I rowsort
SELECT + 6 * col1 AS col0 FROM tab0 AS cor0
----
516
546
582

query I rowsort
SELECT ALL 17 * - col1 + 97 FROM tab2 AS cor0
----
-192
-430
-906

query I rowsort
SELECT DISTINCT + 17 * col1 - - col1 AS col1 FROM tab2 AS cor0
----
1062
306
558

query I rowsort
SELECT ALL + col2 * + col2 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT - + cor0.col2 FROM tab0, tab2, tab1 cor0, tab1
----
81 values hashing to 2df272448a67587d4635afedff278dcc

query I rowsort
SELECT DISTINCT 15 * + col0 AS col0 FROM tab1
----
1200
45
960

query I rowsort
SELECT 35 AS col0 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT - - ( - col2 ) * + cor0.col2 + - 38 FROM tab0 AS cor0
----
-1127
-39
-6762

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + + ( - col0 ) * col2 col1 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT - col1 * col1 * + ( - col2 ) AS col1 FROM tab1 AS cor0
----
16224
36504
5700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6087
SELECT - + col1 * + CAST( NULL AS SIGNED ) * + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6087
SELECT - + col1 * + CAST ( NULL AS INTEGER ) * + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * + 18 * - col1 AS col0 FROM tab0 AS cor0
----
-134316
-1746
-51084

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 59 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT DISTINCT - + 5 AS col0 FROM tab0, tab2 AS cor0, tab1, tab0 AS cor1
----
-5

query I rowsort
SELECT ALL - 26 * + col0 * + col2 + + col2 + col1 FROM tab1 AS cor0
----
-199571
-4132
-94781

onlyif mysql # use DIV operator for integer division
query I rowsort label-6092
SELECT ALL - col0 DIV - col0 col2 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6092
SELECT ALL - col0 / - col0 col2 FROM tab2 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6093
SELECT + col1 * - col0 + col1 DIV 1 FROM tab1 AS cor0
----
-1027
-52
-630

skipif mysql # not compatible
query I rowsort label-6093
SELECT + col1 * - col0 + col1 / 1 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-6094
SELECT - - 67 - ( col1 + col1 ) DIV cor0.col2 FROM tab0 AS cor0
----
-127
62
65

skipif mysql # not compatible
query I rowsort label-6094
SELECT - - 67 - ( col1 + col1 ) / cor0.col2 FROM tab0 AS cor0
----
-127
62
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6095
SELECT - CAST( NULL AS SIGNED ) * 36 + - col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6095
SELECT - CAST ( NULL AS INTEGER ) * 36 + - col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 22 * + col2 + - cor0.col1 FROM tab2 AS cor0
----
513
563
819

query I rowsort
SELECT DISTINCT + col2 + col2 * + col0 AS col1 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-6098
SELECT + + 70 DIV col2 AS col2 FROM tab0 AS cor0
----
0
2
70

skipif mysql # not compatible
query I rowsort label-6098
SELECT + + 70 / col2 AS col2 FROM tab0 AS cor0
----
0
2
70

query I rowsort
SELECT DISTINCT col2 * - col0 * + tab2.col2 + - tab2.col0 + + col1 AS col2 FROM tab2
----
-114138
-5079
-52747

query I rowsort
SELECT ALL + col2 FROM tab1 WHERE NULL NOT IN ( col0 + - col0 )
----

query I rowsort
SELECT + col0 + - col1 * col0 AS col1 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT + col2 + col2 AS col1 FROM tab1 WHERE NOT NULL <> + col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6103
SELECT col1 DIV col2 + col1 AS col0 FROM tab0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-6103
SELECT col1 / col2 + col1 AS col0 FROM tab0
----
194
88
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-6104
SELECT + tab2.col0 * col0 DIV col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-6104
SELECT + tab2.col0 * col0 / col0 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT col0 * col0 + - col2 * + col0 + col1 AS col2 FROM tab0
----
-130
1287
714

query I rowsort
SELECT DISTINCT + col1 * + col1 + col0 * + col1 * + col1 FROM tab1
----
13689
2704
6500

query I rowsort
SELECT col1 * col0 + col1 + + col0 FROM tab2
----
1439
255
4739

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + tab0.col0 col1 FROM tab0
----
178
48
70

query III rowsort
SELECT * FROM tab2 WHERE ( + col1 ) > col1 / - col1 + - col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT ALL - col1 * - col2 + col0 FROM tab1
----
1328
1407
634

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab0 WHERE NOT ( + col1 ) <> NULL
----

query I rowsort
SELECT - col1 + - col1 - - col2 * - col0 FROM tab2
----
-2146
-251
-3036

query I rowsort
SELECT ALL + cor0.col2 + + col0 AS col2 FROM tab2 cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6114
SELECT DISTINCT - col2 + + cor0.col1 * + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
1305
190
4576

skipif mysql # not compatible
query I rowsort label-6114
SELECT DISTINCT - col2 + + cor0.col1 * + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT + 94 * col0 AS col0 FROM tab2 AS cor0
----
658
7332
7426

query I rowsort
SELECT 18 * col0 + + col1 AS col2 FROM tab0 AS cor0
----
1693
518
727

query I rowsort
SELECT DISTINCT + - 17 AS col0 FROM tab1, tab2 AS cor0
----
-17

onlyif mysql # use DIV operator for integer division
query I rowsort label-6118
SELECT DISTINCT - col2 + - tab2.col2 DIV - tab2.col0 AS col1 FROM tab2
----
-24
-26
-38

skipif mysql # not compatible
query I rowsort label-6118
SELECT DISTINCT - col2 + - tab2.col2 / - tab2.col0 AS col1 FROM tab2
----
-24
-26
-38

query I rowsort
SELECT - col0 - col1 AS col1 FROM tab0 WHERE NOT ( + col1 ) IN ( + col0 + - tab0.col0 * - col0 + col1 )
----
-110
-132
-180

query I rowsort
SELECT - tab2.col2 * + col1 - tab2.col0 FROM tab2
----
-1612
-725
-844

query I rowsort
SELECT - col0 * + col0 FROM tab0 WHERE ( NULL ) < ( NULL )
----

query I rowsort
SELECT ALL - col2 + col0 * + col0 * col2 AS col0 FROM tab0 AS cor0 WHERE NOT col0 = NULL
----

query I rowsort
SELECT cor0.col0 + + cor0.col1 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 882fef197e3b41358c58e24f2db2f2e1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col2 * - col1 col2 FROM tab2
----
-1593
-663
-868

onlyif mysql # use DIV operator for integer division
query I rowsort label-6125
SELECT - col2 - col0 DIV - col0 AS col2 FROM tab1
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-6125
SELECT - col2 - col0 / - col0 AS col2 FROM tab1
----
-53
-56
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col2 * + col1 col0 FROM tab1
----
1261
1430
580

query I rowsort
SELECT + 97 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to f1d3319b9491f64621f2dbb0808458ca

query I rowsort
SELECT DISTINCT - col2 * 81 FROM tab2 AS cor0
----
-2106
-2187
-3078

onlyif mysql # use DIV operator for integer division
query I rowsort label-6129
SELECT ALL + 91 DIV col0 - col0 DIV - ( - col0 ) FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6129
SELECT ALL + 91 / col0 - col0 / - ( - col0 ) FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT + 7 + - col1 * + col1 FROM tab0 AS cor0
----
-7389
-8274
-9402

query I rowsort
SELECT DISTINCT col2 * col1 + + col0 AS col0 FROM tab1 AS cor0
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 + - ( col2 ) col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT col0 * col1 - 50 AS col0 FROM tab0
----
2014
3345
8049

query I rowsort
SELECT DISTINCT - 32 AS col1 FROM tab0
----
-32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6135
SELECT CAST( NULL AS SIGNED ) + col0 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6135
SELECT CAST ( NULL AS INTEGER ) + col0 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ( col1 * tab2.col1 ) + ( + col0 ) FROM tab2
----
3559
368
968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6137
SELECT CAST( NULL AS SIGNED ) / 84 + col2 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6137
SELECT CAST ( NULL AS INTEGER ) / 84 + col2 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 26 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

query I rowsort
SELECT DISTINCT - + col2 - cor0.col0 AS col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT ALL cor0.col1 * + col2 - col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT - ( + 45 ) AS col1 FROM tab2 cor0
----
-45
-45
-45

query I rowsort
SELECT - cor0.col1 + 35 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to b4b97097356fc467d82d67952258c6eb

query I rowsort
SELECT DISTINCT tab0.col1 * - col2 + + ( 24 ) * col1 + + 60 AS col2 FROM tab0
----
-5218
-714
2291

query I rowsort
SELECT - col0 * col1 * col1 FROM tab1
----
-13520
-2028
-6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-6145
SELECT - col2 + - col2 DIV 13 + col2 AS col2 FROM tab0 AS cor0
----
-2
-6
0

skipif mysql # not compatible
query I rowsort label-6145
SELECT - col2 + - col2 / 13 + col2 AS col2 FROM tab0 AS cor0
----
-2
-6
0

query I rowsort
SELECT DISTINCT col0 * - col0 * col2 + col2 + - col0 FROM tab2
----
-1303
-158236
-237199

query I rowsort
SELECT col2 * + 95 + col1 + col0 FROM tab1 AS cor0
----
5159
5489
9213

query I rowsort
SELECT col0 * 26 * col0 AS col0 FROM tab0 AS cor0
----
14976
205946
31850

query I rowsort
SELECT DISTINCT col2 + + 19 FROM tab0
----
101
20
52

query I rowsort
SELECT DISTINCT - col0 * ( + col1 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col1 * + col0 + + 3 * + col0 + ( col0 + col2 ) FROM tab0 AS cor0
----
-1935
-3254
-7661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6152
SELECT DISTINCT - col0 + - CAST( NULL AS SIGNED ) * 36 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6152
SELECT DISTINCT - col0 + - CAST ( NULL AS INTEGER ) * 36 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6153
SELECT ALL + + cor0.col1 DIV + 97 AS col1 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6153
SELECT ALL + + cor0.col1 / + 97 AS col1 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT ALL cor0.col2 * 42 FROM tab2 AS cor0
----
1092
1134
1596

onlyif mysql # use DIV operator for integer division
query I rowsort label-6155
SELECT DISTINCT - col1 DIV 89 col1 FROM tab2 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6155
SELECT DISTINCT - col1 / 89 col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL + col0 + + 59 AS col1 FROM tab1 AS cor0
----
123
139
62

query I rowsort
SELECT DISTINCT + col2 + col2 * col1 * - col1 + col0 FROM tab2 AS cor0
----
-10865
-25913
-90402

onlyif mysql # use DIV operator for integer division
query I rowsort label-6158
SELECT + - CAST( 91 AS SIGNED ) DIV col0 FROM tab1 AS cor0
----
-1
-1
-30

skipif mysql # not compatible
query I rowsort label-6158
SELECT + - CAST ( 91 AS INTEGER ) / col0 FROM tab1 AS cor0
----
-1
-1
-30

query I rowsort
SELECT ALL 35 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT DISTINCT + col1 * col1 + col2 * col0 * col2 AS col0 FROM tab0 AS cor0
----
33532
606717
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - ( - col1 ) col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - + col2 + + col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT ALL - - col2 + ( - col2 ) + + cor0.col2 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT - 43 * col0 FROM tab0 AS cor0
----
-1032
-1505
-3827

query I rowsort
SELECT DISTINCT ( + 1 ) AS col1 FROM tab1
----
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6166
SELECT + CAST( col1 AS SIGNED ) + col2 FROM tab2
----
55
58
85

skipif mysql # not compatible
query I rowsort label-6166
SELECT + CAST ( col1 AS INTEGER ) + col2 FROM tab2
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6167
SELECT DISTINCT + col1 DIV + tab1.col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-6167
SELECT DISTINCT + col1 / + tab1.col2 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab2 cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6169
SELECT + - col2 * - CAST( NULL AS SIGNED ) * + col0 + + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6169
SELECT + - col2 * - CAST ( NULL AS INTEGER ) * + col0 + + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * 63 + + 19 AS col2 FROM tab1 AS cor0
----
-3383
-3572
-6029

query I rowsort
SELECT + col0 * col1 + 65 * + col0 FROM tab1 cor0
----
273
4800
6240

query I rowsort
SELECT ALL + col2 + 28 AS col1 FROM tab1 AS cor0
----
124
82
85

query I rowsort
SELECT col0 * + col2 + + 27 FROM tab2 AS cor0
----
2055
216
3029

query I rowsort
SELECT ALL - col2 + + 59 FROM tab1 AS cor0
----
-37
2
5

query I rowsort
SELECT - col1 * - col0 + col2 AS col0 FROM tab2 AS cor0
----
1381
244
4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + ( col2 ) col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - col1 - + col0 * 19 FROM tab1 AS cor0
----
-1226
-1533
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6178
SELECT - - col0 * ( - ( cor0.col1 ) ) + + col2 DIV + col1 FROM tab1 AS cor0
----
-1033
-635
-76

skipif mysql # not compatible
query I rowsort label-6178
SELECT - - col0 * ( - ( cor0.col1 ) ) + + col2 / + col1 FROM tab1 AS cor0
----
-1033
-635
-76

query I rowsort
SELECT - cor0.col1 + ( + cor0.col0 ) * col2 AS col1 FROM tab2 AS cor0
----
158
1969
2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * 12 col1 FROM tab1 AS cor0
----
120
156
312

onlyif mysql # use DIV operator for integer division
query I rowsort label-6181
SELECT ALL tab1.col2 + col1 DIV + ( + tab1.col1 ) + - col1 FROM tab1
----
29
48
84

skipif mysql # not compatible
query I rowsort label-6181
SELECT ALL tab1.col2 + col1 / + ( + tab1.col1 ) + - col1 FROM tab1
----
29
48
84

query I rowsort
SELECT - col1 * - tab2.col0 AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT + 78 + + col2 FROM tab2
----
104
105
116

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0, tab1 AS cor0 WHERE NOT NULL NOT IN ( cor0.col2 )
----

query I rowsort
SELECT + col2 + ( col1 + + col0 ) * col1 AS col2 FROM tab1 AS cor0
----
1305
797
808

query I rowsort
SELECT DISTINCT col0 * - col1 - 96 * - col1 FROM tab0
----
5917
6192
637

query I rowsort
SELECT + col1 * tab1.col1 * - col2 + + ( col2 ) - col0 * - col1 AS col0 FROM tab1
----
-15088
-36372
-5003

query I rowsort
SELECT ALL - 78 * col2 - 61 AS col1 FROM tab1
----
-4273
-4507
-7549

onlyif mysql # use DIV operator for integer division
query I rowsort label-6189
SELECT col2 + + col0 DIV 55 FROM tab2
----
27
27
39

skipif mysql # not compatible
query I rowsort label-6189
SELECT col2 + + col0 / 55 FROM tab2
----
27
27
39

query I rowsort
SELECT - + col0 * + 38 FROM tab2 AS cor0
----
-266
-2964
-3002

query I rowsort
SELECT ALL col0 * - col2 * - cor0.col1 + + col0 FROM tab1 AS cor0
----
36544
4215
99920

query I rowsort
SELECT ALL - col1 + 47 AS col2 FROM tab1 AS cor0
----
21
34
37

query I rowsort
SELECT ALL + cor0.col0 * 55 + col1 + - cor0.col1 AS col2 FROM tab2 cor0
----
385
4290
4345

onlyif mysql # use DIV operator for integer division
query I rowsort label-6194
SELECT - - cor0.col0 + + col2 DIV + col0 FROM tab1 AS cor0
----
21
64
81

skipif mysql # not compatible
query I rowsort label-6194
SELECT - - cor0.col0 + + col2 / + col0 FROM tab1 AS cor0
----
21
64
81

query I rowsort
SELECT DISTINCT - cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
-86
-91
-97

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1, tab0 AS cor0 WHERE NOT NULL <= NULL
----

query I rowsort
SELECT ALL + cor0.col1 + + tab2.col2 AS col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 4156fc5105e6abb5fe33cb914cb553df

query I rowsort
SELECT ALL - col0 * col2 * - col1 FROM tab1
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-6199
SELECT - col2 + - col2 DIV col2 AS col1 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-6199
SELECT - col2 + - col2 / col2 AS col1 FROM tab1 AS cor0
----
-55
-58
-97

query I rowsort
SELECT ALL - col1 * + col0 + col1 + + col0 FROM tab0 cor0
----
-1954
-3263
-7919

query I rowsort
SELECT - col2 * col2 + col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT - 62 * - col1 AS col1 FROM tab2 cor0
----
1054
1922
3658

query I rowsort
SELECT DISTINCT + 43 * col2 FROM tab0 cor0
----
1419
3526
43

query I rowsort
SELECT DISTINCT col0 + + col2 + + col2 FROM tab2 AS cor0
----
130
155
61

query I rowsort
SELECT ALL 1 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - - col1 + - col0 * + cor0.col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT 90 + + col1 * + col1 FROM tab0 AS cor0
----
7486
8371
9499

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 + col2 col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT col1 + col1 + col0 * + col1 AS col2 FROM tab0 AS cor0
----
2236
3589
8281

query I rowsort
SELECT ALL col1 * - col2 * + col0 FROM tab1 cor0
----
-36480
-4212
-99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 * tab0.col0 col0 FROM tab0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * - col2 col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT cor0.col1 + col2 * + col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL - 73 + + col0 + col0 * + col2 FROM tab1
----
3639
7687
92

query I rowsort
SELECT + col0 + + col1 * + col2 * cor0.col0 AS col1 FROM tab0 AS cor0
----
3430
664207
68136

query I rowsort
SELECT - col1 * cor0.col0 + col2 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL - - 49 AS col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT + col1 * + 89 FROM tab2 AS cor0
----
1513
2759
5251

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT col1 - + col1 * + col2 AS col2 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT tab0.col2 + + cor0.col1 AS col1 FROM tab0, tab2, tab1 AS cor0
----
9 values hashing to 1b6920525e1810523fdee3171c929510

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col0 FROM tab0, tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6223
SELECT ALL - col2 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6223
SELECT ALL - col2 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col1 - + col2 * col0 * - col2 FROM tab1 AS cor0
----
207926
737267
8722

onlyif mysql # use DIV operator for integer division
query I rowsort label-6225
SELECT ALL + col2 DIV - ( - col0 ) + col1 * - ( - cor0.col2 ) AS col0 FROM tab1 AS cor0
----
1249
1422
570

skipif mysql # not compatible
query I rowsort label-6225
SELECT ALL + col2 / - ( - col0 ) + col1 * - ( - cor0.col2 ) AS col0 FROM tab1 AS cor0
----
1249
1422
570

query I rowsort
SELECT col0 * - ( col0 ) AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6227
SELECT ALL col2 * - col0 + col2 DIV - col0 FROM tab1 AS cor0
----
-180
-3648
-7681

skipif mysql # not compatible
query I rowsort label-6227
SELECT ALL col2 * - col0 + col2 / - col0 FROM tab1 AS cor0
----
-180
-3648
-7681

query I rowsort
SELECT + 69 - 52 FROM tab0
----
17
17
17

query I rowsort
SELECT + + 37 + col0 - col0 FROM tab0 AS cor0
----
37
37
37

query I rowsort
SELECT 59 * 9 + col2 + - col1 AS col0 FROM tab1 AS cor0
----
559
578
614

query I rowsort
SELECT - ( + ( + col1 ) ) * + 41 + 9 * - cor0.col0 FROM tab2 AS cor0
----
-1334
-1408
-3121

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6232
SELECT - CAST( - 34 AS SIGNED ) + + col2 * + col2 FROM tab2 AS cor0
----
1478
710
763

skipif mysql # not compatible
query I rowsort label-6232
SELECT - CAST ( - 34 AS INTEGER ) + + col2 * + col2 FROM tab2 AS cor0
----
1478
710
763

onlyif mysql # use DIV operator for integer division
query I rowsort label-6233
SELECT CAST( + col2 AS SIGNED ) + col1 * col1 DIV 62 + - col1 FROM tab1 AS cor0
----
38
48
85

skipif mysql # not compatible
query I rowsort label-6233
SELECT CAST ( + col2 AS INTEGER ) + col1 * col1 / 62 + - col1 FROM tab1 AS cor0
----
38
48
85

query I rowsort
SELECT - col0 + - col1 + - 29 * - col2 AS col2 FROM tab1 AS cor0
----
1537
1579
2691

query I rowsort
SELECT ALL + - col1 * - col1 - col2 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT DISTINCT + 23 * col1 + + col1 FROM tab2 AS cor0
----
1416
408
744

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6237
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6237
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 32 col1 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab1 cor2
----
81 values hashing to 54c3a9a1fd8612641b43985c0c2f59cd

query I rowsort
SELECT DISTINCT - col2 * col1 * + 4 FROM tab1 AS cor0
----
-2280
-4992
-5616

query I rowsort
SELECT DISTINCT + + 20 * col0 FROM tab1 cor0
----
1280
1600
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-6241
SELECT ALL + col1 * col0 + + 35 DIV col1 FROM tab2 AS cor0
----
1345
218
4602

skipif mysql # not compatible
query I rowsort label-6241
SELECT ALL + col1 * col0 + + 35 / col1 FROM tab2 AS cor0
----
1345
218
4602

query I rowsort
SELECT DISTINCT + 49 * + col1 + + col1 FROM tab0 AS cor0
----
4300
4550
4850

query I rowsort
SELECT + 45 + cor0.col2 FROM tab1 AS cor0
----
102
141
99

query I rowsort
SELECT ALL - col2 * + col0 + - 82 FROM tab0 AS cor0
----
-117
-7380
-874

query I rowsort
SELECT cor0.col2 + col0 * cor0.col1 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL + - col1 + + ( col0 ) * col2 FROM tab2 AS cor0
----
158
1969
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-6247
SELECT DISTINCT col1 DIV + tab2.col1 + - CAST( col2 AS SIGNED ) AS col1 FROM tab2
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-6247
SELECT DISTINCT col1 / + tab2.col1 + - CAST ( col2 AS INTEGER ) AS col1 FROM tab2
----
-25
-26
-37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6248
SELECT ALL + - ( col0 ) + + col1 * - CAST( 25 AS SIGNED ) FROM tab2 AS cor0
----
-1553
-504
-782

skipif mysql # not compatible
query I rowsort label-6248
SELECT ALL + - ( col0 ) + + col1 * - CAST ( 25 AS INTEGER ) FROM tab2 AS cor0
----
-1553
-504
-782

query I rowsort
SELECT ALL col0 + + ( cor0.col2 ) AS col2 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6250
SELECT - col0 DIV - col1 + col0 * - 19 AS col2 FROM tab0 AS cor0
----
-1691
-456
-665

skipif mysql # not compatible
query I rowsort label-6250
SELECT - col0 / - col1 + col0 * - 19 AS col2 FROM tab0 AS cor0
----
-1691
-456
-665

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6251
SELECT CAST( - col1 AS SIGNED ) + - col1 * + 28 FROM tab0 AS cor0
----
-2494
-2639
-2813

skipif mysql # not compatible
query I rowsort label-6251
SELECT CAST ( - col1 AS INTEGER ) + - col1 * + 28 FROM tab0 AS cor0
----
-2494
-2639
-2813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 5 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT DISTINCT + col1 * + col2 + col1 * + col0 FROM tab2 AS cor0
----
1054
1989
6136

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab0 cor2, tab0 AS cor3
----
3645 values hashing to 862fba9ac85fdf2cec88a0bec0808b7e

query I rowsort
SELECT ALL + 29 FROM tab1, tab1 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT ALL + + col2 + cor0.col1 + col1 FROM tab1 AS cor0
----
106
122
77

query I rowsort
SELECT - tab0.col0 * + ( col2 + 39 ) FROM tab0
----
-10769
-1400
-1728

onlyif mysql # use DIV operator for integer division
query I rowsort label-6258
SELECT DISTINCT + col0 DIV - 36 + - col0 AS col2 FROM tab2
----
-7
-80
-81

skipif mysql # not compatible
query I rowsort label-6258
SELECT DISTINCT + col0 / - 36 + - col0 AS col2 FROM tab2
----
-7
-80
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-6259
SELECT ALL - 13 DIV + cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6259
SELECT ALL - 13 / + cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 31 + + col2 FROM tab2 AS cor0
----
57
58
69

query I rowsort
SELECT + ( 66 ) * + col0 FROM tab0
----
1584
2310
5874

query I rowsort
SELECT col2 + - 17 * + col0 - - ( 83 ) AS col0 FROM tab1
----
-1181
-948
86

query I rowsort
SELECT DISTINCT + tab2.col1 - 67 AS col2 FROM tab2
----
-36
-50
-8

query I rowsort
SELECT ALL - 36 + col1 FROM tab2
----
-19
-5
23

query I rowsort
SELECT ( cor0.col1 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT 82 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

onlyif mysql # use DIV operator for integer division
query I rowsort label-6267
SELECT DISTINCT - col1 DIV - 43 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6267
SELECT DISTINCT - col1 / - 43 FROM tab1 AS cor0
----
0

query I rowsort
SELECT cor0.col0 * + col1 * + col1 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT ALL col0 * - col0 * col1 AS col0 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT col0 + - ( col0 ) * col0 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT 31 + - 92 + col2 AS col0 FROM tab0 AS cor0
----
-28
-60
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6272
SELECT DISTINCT CAST( NULL AS SIGNED ) * col0 + - col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6272
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col0 + - col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6273
SELECT DISTINCT CAST( NULL AS SIGNED ) * ( - col2 + col0 ) col2 FROM tab1 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6273
SELECT DISTINCT CAST ( NULL AS INTEGER ) * ( - col2 + col0 ) col2 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col2 AS REAL ) * col2 + - ( + 74 ) + - col1 FROM tab0 AS cor0
----
-170
6559
929

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 78 col2 FROM tab1 AS cor0
----
132
135
174

query I rowsort
SELECT + ( cor0.col2 ) + col0 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6277
SELECT + CAST( NULL AS SIGNED ) * 43 + - col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6277
SELECT + CAST ( NULL AS INTEGER ) * 43 + - col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * col2 + - col1 + - col0 FROM tab1
----
2887
3175
9123

query I rowsort
SELECT ALL col1 + tab1.col1 * + col0 FROM tab1
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-6280
SELECT + 4 + + col0 DIV + col0 AS col0 FROM tab2 AS cor0
----
5
5
5

skipif mysql # not compatible
query I rowsort label-6280
SELECT + 4 + + col0 / + col0 AS col0 FROM tab2 AS cor0
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col1 col1 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

skipif mysql # not compatible
query I rowsort
SELECT ALL + cor0.col0 + + col0 / CAST ( cor0.col0 AS REAL ) AS col1 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT DISTINCT + + col2 * - col1 AS col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT + col1 + - col2 * 56 FROM tab1 AS cor0
----
-2998
-3182
-5363

query I rowsort
SELECT + col1 + + 86 + + cor0.col0 * - col2 * + col1 AS col2 FROM tab0 AS cor0
----
-3212
-663941
-67940

query I rowsort
SELECT + - col1 + col2 * - 80 FROM tab1 AS cor0
----
-4346
-4570
-7693

query I rowsort
SELECT DISTINCT col1 * 29 AS col0 FROM tab0 AS cor0
----
2494
2639
2813

query I rowsort
SELECT - - col1 - + ( - 87 + col0 ) FROM tab0 AS cor0
----
149
149
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6289
SELECT ALL - + col0 + - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6289
SELECT ALL - + col0 + - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * - col2 + - col1 * - col0 * + col1 AS col2 FROM tab1
----
-888
3151
4304

query I rowsort
SELECT - tab2.col0 * tab2.col2 * 62 FROM tab2
----
-11718
-125736
-186124

query I rowsort
SELECT - tab1.col0 + col1 * + col0 AS col2 FROM tab1
----
576
75
960

query I rowsort
SELECT + col1 * col1 - + 89 AS col0 FROM tab2 AS cor0
----
200
3392
872

query I rowsort
SELECT DISTINCT - tab1.col2 + + col2 AS col2 FROM tab1
----
0

query I rowsort
SELECT col2 * col0 + - col0 + col1 * col0 FROM tab2
----
399
4266
6552

query I rowsort
SELECT 55 * - tab1.col1 * - ( + col1 ) FROM tab1
----
37180
5500
9295

query I rowsort
SELECT + col0 + col0 - tab0.col2 FROM tab0
----
15
69
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 76 col0 FROM tab1, tab2 cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT ALL + - col1 + - ( col1 ) FROM tab1 AS cor0
----
-20
-26
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6300
SELECT + + cor0.col0 * + ( col2 ) - + cor0.col1 DIV ( cor0.col2 ) AS col1 FROM tab0 AS cor0
----
-62
7297
790

skipif mysql # not compatible
query I rowsort label-6300
SELECT + + cor0.col0 * + ( col2 ) - + cor0.col1 / ( cor0.col2 ) AS col1 FROM tab0 AS cor0
----
-62
7297
790

query I rowsort
SELECT - + col2 + col0 + col1 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT DISTINCT + ( 19 ) AS col2 FROM tab1, tab0 AS cor0
----
19

query I rowsort
SELECT - 41 * col0 FROM tab2 AS cor0
----
-287
-3198
-3239

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 60 * col1 col2 FROM tab0 AS cor0
----
-5160
-5460
-5820

query I rowsort
SELECT ( + tab2.col0 ) * col1 * tab2.col2 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT 71 + - 74 AS col1 FROM tab0
----
-3
-3
-3

query I rowsort
SELECT ( 14 ) FROM tab2
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 3 col0 FROM tab2
----
-3
-3
-3

query I rowsort
SELECT ALL + - 14 AS col1 FROM tab0 AS cor0
----
-14
-14
-14

query I rowsort
SELECT + col0 * + cor0.col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL 25 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6312
SELECT ALL col1 DIV - cor0.col1 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6312
SELECT ALL col1 / - cor0.col1 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + col1 * + col1 + - col2 * + 3 AS col2 FROM tab0 AS cor0
----
7297
8035
9406

query I rowsort
SELECT ( - col2 ) + + col1 * - col0 * 43 FROM tab2 AS cor0
----
-197912
-57787
-9358

query I rowsort
SELECT - - col1 + - col2 + col2 * 99 AS col0 FROM tab2 AS cor0
----
2607
2677
3741

query I rowsort
SELECT DISTINCT + 11 + col2 FROM tab2 AS cor0
----
37
38
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 + - col0 col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT col1 * 44 + col0 FROM tab1 AS cor0
----
1147
504
652

query I rowsort
SELECT DISTINCT col2 * - 65 FROM tab1 AS cor0
----
-3510
-3705
-6240

query I rowsort
SELECT DISTINCT + col0 - + col2 AS col1 FROM tab0 AS cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 * + 88 col0 FROM tab2 AS cor0
----
-616
-6864
-6952

query I rowsort
SELECT col0 * + 83 AS col0 FROM tab1
----
249
5312
6640

query I rowsort
SELECT DISTINCT - col2 * - 31 AS col2 FROM tab0
----
1023
2542
31

query I rowsort
SELECT DISTINCT ( cor0.col2 ) * cor0.col0 + - col1 AS col1 FROM tab2 cor0
----
158
1969
2985

query I rowsort
SELECT col0 * - col0 + - tab0.col0 FROM tab0
----
-1260
-600
-8010

query I rowsort
SELECT tab2.col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT col2 * + 73 + col2 AS col2 FROM tab2 AS cor0
----
1924
1998
2812

query I rowsort
SELECT ALL - 47 - + tab1.col2 FROM tab1
----
-101
-104
-143

query I rowsort
SELECT 99 * col0 + - ( + 49 + col1 ) * ( + cor0.col1 ) FROM tab0 AS cor0
----
-10697
-3929
-9234

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + cor0.col0 * cor0.col0 * - col1 col1 FROM tab0 AS cor0
----
-118860
-49560
-720900

query I rowsort
SELECT tab2.col0 * - 50 + 17 FROM tab2
----
-333
-3883
-3933

query I rowsort
SELECT DISTINCT - col2 + 33 AS col0 FROM tab0
----
-49
0
32

query I rowsort
SELECT DISTINCT - col2 * - col1 + - col2 FROM tab1
----
1152
1350
513

query I rowsort
SELECT ALL tab1.col1 + 77 AS col1 FROM tab1
----
103
87
90

query I rowsort
SELECT - - col0 + 55 + + 47 AS col1 FROM tab1 AS cor0
----
105
166
182

query I rowsort
SELECT col0 + - col1 * 64 FROM tab0 AS cor0
----
-5480
-5735
-6173

onlyif mysql # use DIV operator for integer division
query I rowsort label-6337
SELECT + col2 DIV ( cor0.col2 ) + + col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-6337
SELECT + col2 / ( cor0.col2 ) + + col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT - col1 * - 0 + col1 * + col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + col0 * + col1 + - col1 * + col1 FROM tab2
----
-744
1054
1121

onlyif mysql # use DIV operator for integer division
query I rowsort label-6340
SELECT ALL col1 DIV col0 + + col1 DIV + col1 - col0 AS col2 FROM tab2
----
-2
-77
-78

skipif mysql # not compatible
query I rowsort label-6340
SELECT ALL col1 / col0 + + col1 / + col1 - col0 AS col2 FROM tab2
----
-2
-77
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6341
SELECT - col0 + 51 DIV col2 AS col2 FROM tab0
----
-23
-89
16

skipif mysql # not compatible
query I rowsort label-6341
SELECT - col0 + 51 / col2 AS col2 FROM tab0
----
-23
-89
16

onlyif mysql # use DIV operator for integer division
query I rowsort label-6342
SELECT ALL col1 + col2 DIV + 45 AS col0 FROM tab0
----
86
92
97

skipif mysql # not compatible
query I rowsort label-6342
SELECT ALL col1 + col2 / + 45 AS col0 FROM tab0
----
86
92
97

query I rowsort
SELECT DISTINCT col0 * 83 FROM tab2 AS cor0
----
581
6474
6557

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 72 * col2 + col1 col1 FROM tab0 AS cor0
----
134
2438
5906

query I rowsort
SELECT ALL - col0 + 81 FROM tab0 AS cor0
----
-8
46
57

query I rowsort
SELECT col1 * - col1 + 5 * + cor0.col0 + col1 AS col0 FROM tab2 AS cor0
----
-3032
-895
123

query I rowsort
SELECT DISTINCT + - col0 + - cor0.col1 * - col1 AS col1 FROM tab0 AS cor0
----
7372
8192
9374

onlyif mysql # use DIV operator for integer division
query I rowsort label-6348
SELECT DISTINCT + col2 DIV 78 col2 FROM tab0 AS cor0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6348
SELECT DISTINCT + col2 / 78 col2 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT + col0 + - col2 * + col2 AS col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT col2 * col0 - + col1 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT - - col1 + - col2 + - col1 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6352
SELECT + col0 DIV 25 + col0 * col0 AS col2 FROM tab2 AS cor0
----
49
6087
6244

skipif mysql # not compatible
query I rowsort label-6352
SELECT + col0 / 25 + col0 * col0 AS col2 FROM tab2 AS cor0
----
49
6087
6244

query I rowsort
SELECT DISTINCT + col2 + - 30 * - col1 * col2 FROM tab1 AS cor0
----
17157
37536
42174

query I rowsort
SELECT DISTINCT + 80 + 1 * col0 * col1 FROM tab0 AS cor0
----
2144
3475
8179

onlyif mysql # use DIV operator for integer division
query I rowsort label-6355
SELECT - CAST( ( col0 ) AS SIGNED ) * + col0 + + col0 + col2 DIV col2 FROM tab1 AS cor0
----
-4031
-5
-6319

skipif mysql # not compatible
query I rowsort label-6355
SELECT - CAST ( ( col0 ) AS INTEGER ) * + col0 + + col0 + col2 / col2 FROM tab1 AS cor0
----
-4031
-5
-6319

onlyif mysql # use DIV operator for integer division
query I rowsort label-6356
SELECT ALL - col1 * col2 DIV + col1 col1 FROM tab2 cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6356
SELECT ALL - col1 * col2 / + col1 col1 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT 14 * + col0 + col0 + - ( + ( - col1 ) ) FROM tab1 cor0
----
1213
71
970

query I rowsort
SELECT ALL + + 47 + 67 * col0 AS col2 FROM tab1 AS cor0
----
248
4335
5407

query I rowsort
SELECT DISTINCT - - ( + col1 ) * col0 + ( ( col1 ) ) FROM tab2 cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT - cor0.col1 + 14 * cor0.col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
305
347
515

onlyif mysql # use DIV operator for integer division
query I rowsort label-6361
SELECT DISTINCT 85 * 48 DIV col0 AS col1 FROM tab1 AS cor0
----
1360
51
63

skipif mysql # not compatible
query I rowsort label-6361
SELECT DISTINCT 85 * 48 / col0 AS col1 FROM tab1 AS cor0
----
1360
51
63

query IIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 WHERE NOT ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT + ( + col2 ) + col0 * + 72 AS col2 FROM tab0 cor0
----
1761
2521
6490

query I rowsort
SELECT - 33 * 44 FROM tab2, tab0 AS cor0
----
9 values hashing to 50c050f94925ba135e474cc1173297e6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6366
SELECT DISTINCT + 21 DIV - cor0.col0 + col0 col0 FROM tab0 cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6366
SELECT DISTINCT + 21 / - cor0.col0 + col0 col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT ALL - - col1 * + col0 AS col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + col1 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-6369
SELECT DISTINCT + col1 DIV - ( + col2 * - col0 ) - + col1 * + ( cor0.col2 * + col0 ) FROM tab0 AS cor0
----
-3393
-664118
-68112

skipif mysql # not compatible
query I rowsort label-6369
SELECT DISTINCT + col1 / - ( + col2 * - col0 ) - + col1 * + ( cor0.col2 * + col0 ) FROM tab0 AS cor0
----
-3393
-664118
-68112

query I rowsort
SELECT ALL - col2 + + ( - 26 ) AS col0 FROM tab0 AS cor0
----
-108
-27
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6371
SELECT ALL - + col0 DIV 93 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6371
SELECT ALL - + col0 / 93 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col2 - - col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL - 7 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 82db7c0390abae7ccf4512b1302a6466

onlyif mysql # use DIV operator for integer division
query I rowsort label-6374
SELECT - - col0 * - col2 + col0 DIV - col2 AS col2 FROM tab1 AS cor0
----
-162
-3649
-7680

skipif mysql # not compatible
query I rowsort label-6374
SELECT - - col0 * - col2 + col0 / - col2 AS col2 FROM tab1 AS cor0
----
-162
-3649
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6375
SELECT - col1 DIV col2 + - ( + col1 ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-6375
SELECT - col1 / col2 + - ( + col1 ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT 27 + - col0 AS col2 FROM tab1
----
-37
-53
24

query I rowsort
SELECT ALL 46 * ( - col1 ) + 12 AS col0 FROM tab2
----
-1414
-2702
-770

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 43 * + col1 col1 FROM tab2
----
1333
2537
731

query I rowsort
SELECT ALL + + 49 * + col1 + 26 AS col2 FROM tab2 AS cor0
----
1545
2917
859

query I rowsort
SELECT DISTINCT 61 * - col1 + 81 AS col2 FROM tab1 AS cor0
----
-1505
-529
-712

onlyif mysql # use DIV operator for integer division
query I rowsort label-6381
SELECT DISTINCT - col0 DIV ( col0 ) AS col1 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-6381
SELECT DISTINCT - col0 / ( col0 ) AS col1 FROM tab2
----
-1

query I rowsort
SELECT ALL + 57 FROM tab0, tab2 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

onlyif mysql # use DIV operator for integer division
query I rowsort label-6383
SELECT col0 DIV + col2 + - col0 FROM tab0
----
-24
-88
0

skipif mysql # not compatible
query I rowsort label-6383
SELECT col0 / + col2 + - col0 FROM tab0
----
-24
-88
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * 1 col1 FROM tab1 cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 + - 71 col1 FROM tab0 AS cor0
----
-36
-47
18

query I rowsort
SELECT + col0 * + 53 FROM tab1 AS cor0
----
159
3392
4240

query I rowsort
SELECT DISTINCT + 81 * - 20 FROM tab2 AS cor0
----
-1620

onlyif mysql # use DIV operator for integer division
query I rowsort label-6388
SELECT ALL col2 * - col1 + + col1 DIV 48 FROM tab1 cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-6388
SELECT ALL col2 * - col1 + + col1 / 48 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT 3 FROM tab0, tab1 cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT DISTINCT + + ( col0 ) + col1 * + 61 AS col0 FROM tab0 AS cor0
----
5270
5640
5952

query I rowsort
SELECT ALL cor0.col0 * + col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT 91 * - 69 AS col1 FROM tab1 AS cor0
----
-6279
-6279
-6279

query I rowsort
SELECT DISTINCT - 37 + - col1 * - cor0.col0 FROM tab1 AS cor0
----
1003
41
603

query I rowsort
SELECT DISTINCT + - ( col2 ) * col0 + ( col2 ) FROM tab2 cor0
----
-162
-2002
-2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col2 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + - col1 * - 76 AS col0 FROM tab0 AS cor0
----
6536
6916
7372

onlyif mysql # use DIV operator for integer division
query I rowsort label-6397
SELECT ALL + ( col1 ) DIV - col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6397
SELECT ALL + ( col1 ) / - col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT + col0 * - 61 FROM tab1 cor0
----
-183
-3904
-4880

query I rowsort
SELECT col0 + - 2 * - col0 AS col1 FROM tab0 cor0
----
105
267
72

query I rowsort
SELECT - + col1 - cor0.col0 AS col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT col2 * - col1 * + ( - 67 ) FROM tab2 AS cor0
----
102778
43282
56079

query I rowsort
SELECT ALL ( + col1 ) * + col0 AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL + 8 FROM tab1, tab1 AS cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6404
SELECT + col0 * - col1 + + col0 DIV + col2 FROM tab0 AS cor0
----
-2064
-3360
-8098

skipif mysql # not compatible
query I rowsort label-6404
SELECT + col0 * - col1 + + col0 / + col2 FROM tab0 AS cor0
----
-2064
-3360
-8098

query I rowsort
SELECT + - col1 + - col1 * col0 AS col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT - col2 * - 6 FROM tab2 AS cor0
----
156
162
228

query I rowsort
SELECT - col0 * 27 + 3 FROM tab2 AS cor0
----
-186
-2103
-2130

query I rowsort
SELECT DISTINCT - cor0.col1 * + col0 + col0 AS col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - - cor0.col1 * - col2 * + col1 + col2 AS col0 FROM tab2 AS cor0
----
-10944
-25920
-90480

query I rowsort
SELECT DISTINCT + col2 * + col1 + - 8 FROM tab2 cor0
----
1526
638
829

query I rowsort
SELECT DISTINCT + col0 + + cor0.col2 + - col1 FROM tab0 AS cor0
----
-29
-61
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6412
SELECT DISTINCT col2 - CAST( + col2 AS SIGNED ) * + col0 FROM tab0 AS cor0
----
-34
-7216
-759

skipif mysql # not compatible
query I rowsort label-6412
SELECT DISTINCT col2 - CAST ( + col2 AS INTEGER ) * + col0 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-6413
SELECT ALL - tab2.col1 DIV - col1 + - col2 * col1 * - tab2.col2 AS col2 FROM tab2
----
22600
24549
39885

skipif mysql # not compatible
query I rowsort label-6413
SELECT ALL - tab2.col1 / - col1 + - col2 * col1 * - tab2.col2 AS col2 FROM tab2
----
22600
24549
39885

query I rowsort
SELECT col0 + + 68 FROM tab0 AS cor0
----
103
157
92

query I rowsort
SELECT + col2 + + col1 * ( col1 ) AS col0 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT + col1 * - col0 + col0 AS col0 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - 28 AS col2 FROM tab0 cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to eac00a95d734c7071360ed392c3f39bc

onlyif mysql # use DIV operator for integer division
query I rowsort label-6418
SELECT DISTINCT tab2.col2 DIV cor0.col1 AS col1 FROM tab2, tab2 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6418
SELECT DISTINCT tab2.col2 / cor0.col1 AS col1 FROM tab2, tab2 AS cor0
----
0
1
2

query I rowsort
SELECT + col0 * tab0.col2 + col0 * - col1 * col1 FROM tab0
----
-176712
-329280
-729711

query I rowsort
SELECT col2 * + tab1.col2 * - col1 AS col1 FROM tab1
----
-119808
-32490
-75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-6421
SELECT col2 + col1 + col1 DIV - cor0.col2 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-6421
SELECT col2 + col1 + col1 / - cor0.col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT col1 * col2 + col1 + col0 FROM tab0 AS cor0
----
229
2948
7642

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT NULL NOT IN ( - col2 )
----

query I rowsort
SELECT DISTINCT col2 * col2 * + col2 AS col0 FROM tab2 AS cor0
----
17576
19683
54872

query I rowsort
SELECT - col2 + - col2 + col1 FROM tab1 AS cor0
----
-104
-179
-82

query I rowsort
SELECT ALL col0 * col2 * col2 FROM tab1 cor0
----
207936
737280
8748

query I rowsort
SELECT col1 AS col2 FROM tab0 AS cor0 WHERE ( NULL ) <> ( - col1 )
----

query I rowsort
SELECT - col1 * + col2 + col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT - col1 * col0 + + col1 AS col2 FROM tab1
----
-1027
-52
-630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 - - col2 col2 FROM tab0
----
164
2
66

query I rowsort
SELECT DISTINCT col2 + - col2 * tab2.col0 * + col1 + + col0 FROM tab2
----
-119548
-50917
-5825

query I rowsort
SELECT DISTINCT + col2 FROM tab1 WHERE ( NULL ) >= ( NULL )
----

query III rowsort
SELECT * FROM tab0 WHERE ( NULL ) NOT IN ( tab0.col0 )
----

query I rowsort
SELECT ALL - col2 + + tab1.col0 + col2 FROM tab1
----
3
64
80

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT col0 + + tab1.col0 + col1 NOT BETWEEN ( col1 * col0 ) AND NULL
----

query I rowsort
SELECT ALL col1 * col2 + + col1 * col1 + - col2 AS col0 FROM tab2
----
1771
4989
897

query I rowsort
SELECT + col1 * col1 + tab2.col1 FROM tab2
----
306
3540
992

onlyif mysql # use DIV operator for integer division
query I rowsort label-6438
SELECT DISTINCT - cor0.col1 DIV - col2 - col0 * col2 col1 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6438
SELECT DISTINCT - cor0.col1 / - col2 - col0 * col2 col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + col0 + + cor0.col1 AS col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL + col0 * - col2 - + col1 AS col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT cor0.col2 * col2 * col1 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT DISTINCT col2 - col0 * - col0 * col0 AS col1 FROM tab1 AS cor0
----
262201
512096
81

query I rowsort
SELECT DISTINCT + - col1 + col0 * col1 AS col0 FROM tab1 AS cor0
----
1027
52
630

query IIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 WHERE NULL NOT IN ( cor0.col2 )
----

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2
----
3
64
80

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT + col0 NOT IN ( tab2.col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6447
SELECT tab1.col0 DIV - col0 AS col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6447
SELECT tab1.col0 / - col0 AS col0 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL col2 * col1 + - col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT + col0 + + 1 AS col2 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT ALL + - col2 - + ( + 32 ) FROM tab0 AS cor0
----
-114
-33
-65

query I rowsort
SELECT - - col2 + - ( col1 ) FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6452
SELECT ALL - col2 DIV col1 + + 21 DIV + col1 AS col1 FROM tab1 AS cor0
----
-2
-3
-6

skipif mysql # not compatible
query I rowsort label-6452
SELECT ALL - col2 / col1 + + 21 / + col1 AS col1 FROM tab1 AS cor0
----
-2
-3
-6

query I rowsort
SELECT ALL + + col0 + - 35 + 22 AS col1 FROM tab0 AS cor0
----
11
22
76

query I rowsort
SELECT ALL - cor0.col1 * + col0 - col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT 71 + col1 FROM tab2
----
102
130
88

query I rowsort
SELECT ALL - tab0.col1 + - col2 AS col0 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT - - col0 * col1 + ( col2 + ( + ( col0 ) ) ) FROM tab0 AS cor0
----
2121
3431
8270

query I rowsort
SELECT DISTINCT col1 + cor0.col2 * col1 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT col0 + ( - col1 ) FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - col0 + 57 * + 85 * - col2 FROM tab0 AS cor0
----
-159909
-397379
-4880

query I rowsort
SELECT DISTINCT + col0 * - col1 + - 72 + col2 FROM tab2 AS cor0
----
-1377
-262
-4648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * col1 + - 25 * + col1 col1 FROM tab1 AS cor0
----
-150
-156
26

query I rowsort
SELECT DISTINCT - col1 + ( - col0 ) * - col1 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT ALL + cor0.col0 + - ( - 2 ) * col0 + - ( - col2 ) AS col2 FROM tab2 AS cor0
----
260
275
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-6465
SELECT + col2 * + ( 38 ) - col1 DIV + col1 AS col2 FROM tab2 AS cor0
----
1025
1443
987

skipif mysql # not compatible
query I rowsort label-6465
SELECT + col2 * + ( 38 ) - col1 / + col1 AS col2 FROM tab2 AS cor0
----
1025
1443
987

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6466
SELECT ALL - col0 + CAST( + col1 AS SIGNED ) + + col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6466
SELECT ALL - col0 + CAST ( + col1 AS INTEGER ) + + col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT tab0.col1 + + tab0.col0 * - col0 - tab0.col1 AS col2 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT + col2 * - col1 + col1 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT col0 + col0 * + col2 + col0 FROM tab0
----
105
7476
840

onlyif mysql # use DIV operator for integer division
query I rowsort label-6470
SELECT col1 + - col0 + col1 DIV - col2 FROM tab1
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-6470
SELECT col1 + - col0 + col1 / - col2 FROM tab1
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col2 * + col2 * + col0 col2 FROM tab0
----
26136
35
598436

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col2 col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL - col0 * col1 * col0 AS col1 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT - col0 FROM tab2 WHERE NOT NULL >= NULL
----

query I rowsort
SELECT - col0 * + col2 FROM tab2 WHERE - col0 * col2 <> NULL
----

query I rowsort
SELECT DISTINCT col1 + col2 * col2 * col1 AS col1 FROM tab0
----
194
611975
93740

query I rowsort
SELECT + tab0.col2 * col0 * col2 + - col2 FROM tab0
----
26103
34
598354

query I rowsort
SELECT DISTINCT col1 - + tab1.col0 * col1 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT + col0 + col1 * col1 * col1 AS col0 FROM tab0
----
636080
753660
912708

query I rowsort
SELECT ALL col1 AS col0 FROM tab2 WHERE + col0 <> ( col2 * - col1 + col2 )
----
17
31
59

query III rowsort
SELECT * FROM tab0 WHERE NOT col1 >= - col2 - + col0
----

query I rowsort
SELECT - col0 + + col0 + col1 * col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ( - col2 ) + - 12 FROM tab0
----
-13
-45
-94

query I rowsort
SELECT DISTINCT - 4 * col0 FROM tab1
----
-12
-256
-320

query I rowsort
SELECT DISTINCT + - col1 * - cor0.col1 + cor0.col2 AS col0 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT - col0 * ( - col2 ) + - col0 AS col1 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT ALL + col0 * cor0.col0 FROM tab1 cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6488
SELECT col0 * col1 DIV + col2 AS col1 FROM tab1 AS cor0
----
1
10
11

skipif mysql # not compatible
query I rowsort label-6488
SELECT col0 * col1 / + col2 AS col1 FROM tab1 AS cor0
----
1
10
11

query I rowsort
SELECT col0 * - col2 + - 79 AS col1 FROM tab0 AS cor0
----
-114
-7377
-871

query I rowsort
SELECT 46 + col0 * col0 * col0 FROM tab1 AS cor0
----
262190
512046
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-6491
SELECT - col0 + - 11 DIV col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-6491
SELECT - col0 + - 11 / col2 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6492
SELECT DISTINCT col1 DIV 15 FROM tab2
----
1
2
3

skipif mysql # not compatible
query I rowsort label-6492
SELECT DISTINCT col1 / 15 FROM tab2
----
1
2
3

query I rowsort
SELECT 43 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6494
SELECT ALL - col0 * - col2 + col2 DIV - col1 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-6494
SELECT ALL - col0 * - col2 + col2 / - col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - 91 + + col0 AS col1 FROM tab2 cor0
----
-12
-13
-84

query I rowsort
SELECT - + ( + col1 ) + - col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT - tab1.col2 + col2 AS col0 FROM tab1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6498
SELECT ALL - ( + cor0.col0 ) DIV 61 FROM tab1, tab1 AS cor0
----
9 values hashing to b2e225572af74ba853e10fb5414ea67f

skipif mysql # not compatible
query I rowsort label-6498
SELECT ALL - ( + cor0.col0 ) / 61 FROM tab1, tab1 AS cor0
----
9 values hashing to b2e225572af74ba853e10fb5414ea67f

query I rowsort
SELECT - ( + tab0.col0 ) + col0 AS col2 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 60 + - col0 col1 FROM tab0
----
-29
25
36

query I rowsort
SELECT - col1 * - col2 + col2 AS col0 FROM tab0
----
2871
7544
98

query I rowsort
SELECT ( col2 * col2 ) FROM tab0
----
1
1089
6724

query I rowsort
SELECT ALL 68 * + col2 + - col1 * + 26 AS col0 FROM tab1 AS cor0
----
2996
3616
6190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 34 + col1 + - 5 col0 FROM tab0 AS cor0
----
115
120
126

query I rowsort
SELECT - + cor0.col1 * + col0 + 53 FROM tab0 AS cor0
----
-2011
-3342
-8046

query I rowsort
SELECT ALL - col1 + col2 * 5 + - cor0.col2 * col0 FROM tab1 AS cor0
----
-3373
-7213
82

query I rowsort
SELECT ALL + col2 * col1 - cor0.col1 FROM tab2 AS cor0
----
1475
629
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col1 col0 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab1, tab0 cor0, tab0 AS cor1
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6510
SELECT DISTINCT col0 DIV - tab2.col0 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-6510
SELECT DISTINCT col0 / - tab2.col0 FROM tab2
----
-1

query I rowsort
SELECT ALL - ( 5 ) * + col2 FROM tab2
----
-130
-135
-190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6512
SELECT - CAST( NULL AS SIGNED ) * - 70 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6512
SELECT - CAST ( NULL AS INTEGER ) * - 70 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + col0 * col0 col0 FROM tab2 cor0
----
56
6162
6320

query I rowsort
SELECT + ( col0 ) * col1 + col2 AS col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT col2 * col1 + cor0.col1 + - col1 * col2 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT - + col2 * col0 + col2 AS col0 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-6517
SELECT - col1 + col0 + + col0 DIV - col1 AS col2 FROM tab1 AS cor0
----
-23
48
61

skipif mysql # not compatible
query I rowsort label-6517
SELECT - col1 + col0 + + col0 / - col1 AS col2 FROM tab1 AS cor0
----
-23
48
61

query I rowsort
SELECT - 10 * cor0.col0 + + col1 FROM tab1 AS cor0
----
-4
-630
-787

query I rowsort
SELECT - col2 * col2 + - col2 + + cor0.col2 * col0 FROM tab1 AS cor0
----
-1632
-2808
342

onlyif mysql # use DIV operator for integer division
query I rowsort label-6520
SELECT + - 52 DIV - col1 + + col2 FROM tab2 AS cor0
----
26
28
41

skipif mysql # not compatible
query I rowsort label-6520
SELECT + - 52 / - col1 + + col2 FROM tab2 AS cor0
----
26
28
41

query I rowsort
SELECT ALL - col1 + + tab0.col1 AS col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 80 col0 FROM tab2
----
80

query I rowsort
SELECT + 10 * col2 FROM tab0 AS cor0
----
10
330
820

query I rowsort
SELECT + - ( col0 ) * col2 + + col2 * - col2 FROM tab0 AS cor0
----
-14022
-1881
-36

query I rowsort
SELECT + ( 1 ) + - col2 FROM tab1
----
-53
-56
-95

query I rowsort
SELECT ( - col1 ) * - col2 - + ( col0 ) AS col0 FROM tab1
----
1168
1401
506

query I rowsort
SELECT ALL ( + col1 ) * - col0 * ( tab0.col0 + col1 ) FROM tab0
----
-1457820
-227040
-448140

query I rowsort
SELECT DISTINCT + ( + tab2.col2 + - tab2.col1 ) * + col1 FROM tab2
----
-124
-1947
357

query I rowsort
SELECT DISTINCT - 79 - 57 FROM tab0
----
-136

onlyif mysql # use DIV operator for integer division
query I rowsort label-6530
SELECT ( col2 ) DIV + cor0.col0 AS col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-6530
SELECT ( col2 ) / + cor0.col0 AS col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT - ( - 29 ) * - col2 FROM tab0 cor0
----
-2378
-29
-957

query I rowsort
SELECT ( 65 ) AS col0 FROM tab2
----
65
65
65

query I rowsort
SELECT + tab2.col1 * - 0 + col1 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT + 72 * + col0 FROM tab2 AS cor0
----
504
5616
5688

onlyif mysql # use DIV operator for integer division
query I rowsort label-6535
SELECT 23 + cor0.col1 DIV 99 AS col2 FROM tab1 AS cor0
----
23
23
23

skipif mysql # not compatible
query I rowsort label-6535
SELECT 23 + cor0.col1 / 99 AS col2 FROM tab1 AS cor0
----
23
23
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + col1 col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + - cor0.col0 - col0 * + col2 AS col2 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT ALL - - col2 * col0 * + col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT DISTINCT + 25 + - col0 AS col2 FROM tab2 cor0
----
-53
-54
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-6540
SELECT - + 79 + - cor0.col1 DIV ( - col0 + + col1 ) FROM tab2 AS cor0
----
-76
-79
-80

skipif mysql # not compatible
query I rowsort label-6540
SELECT - + 79 + - cor0.col1 / ( - col0 + + col1 ) FROM tab2 AS cor0
----
-76
-79
-80

query I rowsort
SELECT - col0 * 76 FROM tab0 AS cor0
----
-1824
-2660
-6764

query I rowsort
SELECT DISTINCT - col0 * 87 + + cor0.col1 FROM tab0 AS cor0
----
-2002
-2948
-7652

onlyif mysql # use DIV operator for integer division
query I rowsort label-6543
SELECT ALL cor0.col2 DIV 31 col1 FROM tab0 AS cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6543
SELECT ALL cor0.col2 / 31 col1 FROM tab0 AS cor0
----
0
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6544
SELECT DISTINCT - + col0 + ( 17 ) DIV - col0 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6544
SELECT DISTINCT - + col0 + ( 17 ) / - col0 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - + col1 * + ( 14 * cor0.col2 + + col0 ) AS col0 FROM tab1 AS cor0
----
-18512
-19734
-8620

onlyif mysql # use DIV operator for integer division
query I rowsort label-6546
SELECT + col0 DIV + ( - 65 ) col0 FROM tab0 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6546
SELECT + col0 / + ( - 65 ) col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT ( + 21 ) AS col0 FROM tab1 AS cor0
----
21
21
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6548
SELECT DISTINCT + + 8 * + col0 + col0 DIV - ( col1 ) + - cor0.col1 FROM tab2 AS cor0
----
25
564
611

skipif mysql # not compatible
query I rowsort label-6548
SELECT DISTINCT + + 8 * + col0 + col0 / - ( col1 ) + - cor0.col1 FROM tab2 AS cor0
----
25
564
611

onlyif mysql # use DIV operator for integer division
query I rowsort label-6549
SELECT - 55 DIV + col0 AS col2 FROM tab1 AS cor0
----
-18
0
0

skipif mysql # not compatible
query I rowsort label-6549
SELECT - 55 / + col0 AS col2 FROM tab1 AS cor0
----
-18
0
0

query I rowsort
SELECT ALL - 33 + - col2 FROM tab1 AS cor0
----
-129
-87
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-6551
SELECT DISTINCT + col1 * col1 DIV - col1 AS col2 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-6551
SELECT DISTINCT + col1 * col1 / - col1 AS col2 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + col2 * col2 - col1 * cor0.col2 AS col1 FROM tab0 AS cor0
----
-1749
-738
-96

query I rowsort
SELECT DISTINCT - col0 + - 78 * col1 * cor0.col0 + + col0 * col2 FROM tab2 AS cor0
----
-101831
-16744
-357006

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + + col0 col0 FROM tab0 cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6555
SELECT ALL 17 DIV - 97 + - col0 * 62 - cor0.col2 AS col2 FROM tab1 AS cor0
----
-240
-4025
-5056

skipif mysql # not compatible
query I rowsort label-6555
SELECT ALL 17 / - 97 + - col0 * 62 - cor0.col2 AS col2 FROM tab1 AS cor0
----
-240
-4025
-5056

query I rowsort
SELECT DISTINCT + 17 + col1 AS col2 FROM tab0 cor0
----
103
108
114

query I rowsort
SELECT ALL - col0 * col2 - col2 * cor0.col2 AS col0 FROM tab0 AS cor0
----
-14022
-1881
-36

query I rowsort
SELECT ALL + col1 + 67 FROM tab2 AS cor0
----
126
84
98

query I rowsort
SELECT DISTINCT col2 * cor0.col1 + col2 * + 82 FROM tab1 cor0
----
5244
5832
9120

query I rowsort
SELECT ALL ( - col0 ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col2 + - col0 * + col1 col0 FROM tab0 AS cor0
----
-2117
-3491
-8108

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 92 + col0 col1 FROM tab0 AS cor0
----
-3
-57
-68

query I rowsort
SELECT ALL + - col1 + col1 * + col1 * - ( ( + cor0.col1 ) ) FROM tab2 cor0
----
-205438
-29822
-4930

query I rowsort
SELECT ALL - col2 + tab0.col1 AS col1 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT tab1.col1 * + col2 + 58 AS col1 FROM tab1
----
1306
1462
628

query I rowsort
SELECT ALL + col1 + tab2.col1 * - col0 AS col1 FROM tab2
----
-1326
-186
-4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-6567
SELECT ALL col1 DIV - col0 + + 26 FROM tab0
----
23
24
25

skipif mysql # not compatible
query I rowsort label-6567
SELECT ALL col1 / - col0 + + 26 FROM tab0
----
23
24
25

query I rowsort
SELECT 23 + col2 AS col2 FROM tab1 AS cor0
----
119
77
80

query I rowsort
SELECT + - 67 + - cor0.col0 * - col1 FROM tab2 cor0
----
1276
150
4535

query I rowsort
SELECT DISTINCT - 69 * col2 FROM tab0 AS cor0
----
-2277
-5658
-69

query I rowsort
SELECT DISTINCT ( col2 ) + col1 + 98 AS col0 FROM tab0 AS cor0
----
196
217
271

query I rowsort
SELECT DISTINCT - 73 + col1 FROM tab2 AS cor0
----
-14
-42
-56

query I rowsort
SELECT ALL - cor0.col1 + col0 * + col2 FROM tab2 cor0
----
158
1969
2985

query I rowsort
SELECT ALL - 94 FROM tab1 cor0
----
-94
-94
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6575
SELECT CAST( NULL AS SIGNED ) + col2 * col0 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6575
SELECT CAST ( NULL AS INTEGER ) + col2 * col0 AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 98 + col0 AS col2 FROM tab0 AS cor0
----
122
133
187

query I rowsort
SELECT DISTINCT + ( 75 ) AS col0 FROM tab1, tab0 AS cor0 CROSS JOIN tab0
----
75

query I rowsort
SELECT ALL + 36 - tab1.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 7edeeb0f4b8045d588d48a01f7fd52e9

query I rowsort
SELECT ALL - cor0.col2 FROM tab0, tab1 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 2df272448a67587d4635afedff278dcc

query I rowsort
SELECT + - col0 * + 22 + + col0 FROM tab2 AS cor0
----
-147
-1638
-1659

query I rowsort
SELECT DISTINCT - col2 - - col1 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6582
SELECT DISTINCT cor0.col1 + CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
118
34
62

skipif mysql # not compatible
query I rowsort label-6582
SELECT DISTINCT cor0.col1 + CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL - 64 + tab0.col1 AS col2 FROM tab0
----
22
27
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-6584
SELECT - ( + cor0.col0 ) * 9 DIV 78 AS col1 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 43e2e0a1ee93adb644b264952c3cdb4e

skipif mysql # not compatible
query I rowsort label-6584
SELECT - ( + cor0.col0 ) * 9 / 78 AS col1 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 43e2e0a1ee93adb644b264952c3cdb4e

query I rowsort
SELECT DISTINCT + col2 + 70 * cor0.col0 + col0 AS col2 FROM tab2 cor0
----
524
5564
5647

query I rowsort
SELECT ALL - col1 * - cor0.col0 + - col0 AS col2 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT - col2 + ( col0 ) * - col0 AS col0 FROM tab2 cor0
----
-6110
-6279
-76

query I rowsort
SELECT + + col1 + - 84 FROM tab0 AS cor0
----
13
2
7

query I rowsort
SELECT DISTINCT ( - col1 ) * + 50 FROM tab2
----
-1550
-2950
-850

query I rowsort
SELECT - 21 * + col0 FROM tab1
----
-1344
-1680
-63

query I rowsort
SELECT col1 + cor0.col1 * 32 * col1 FROM tab2 cor0
----
111451
30783
9265

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6592
SELECT ALL - col0 * col2 + + CAST( ( + cor0.col0 ) AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-159
-3584
-7600

skipif mysql # not compatible
query I rowsort label-6592
SELECT ALL - col0 * col2 + + CAST ( ( + cor0.col0 ) AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT 37 * + col0 FROM tab1 AS cor0
----
111
2368
2960

onlyif mysql # use DIV operator for integer division
query I rowsort label-6594
SELECT DISTINCT + - col0 DIV col1 col0 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6594
SELECT DISTINCT + - col0 / col1 col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - 23 * + col1 FROM tab1 AS cor0
----
-230
-299
-598

query I rowsort
SELECT DISTINCT cor0.col2 * col2 * - col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT ALL - + 38 FROM tab1 AS cor0
----
-38
-38
-38

query I rowsort
SELECT col1 + - col1 * + col2 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT col0 + 5 * col0 * col2 FROM tab2 AS cor0
----
10218
15089
952

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col2 ) * col0 * col1 + - col2 col2 FROM tab2
----
-119678
-51072
-5886

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6601
SELECT DISTINCT + + CAST( + ( col1 ) AS SIGNED ) FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6601
SELECT DISTINCT + + CAST ( + ( col1 ) AS INTEGER ) FROM tab0 cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 28 + - 78 * - cor0.col1 + - col2 col0 FROM tab1 AS cor0
----
2002
751
946

query I rowsort
SELECT + + ( cor0.col1 ) * col0 + - ( col1 * col1 ) FROM tab1 AS cor0
----
-598
540
871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col0 + - col1 col1 FROM tab0 AS cor0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6605
SELECT - 80 DIV tab1.col0 FROM tab1
----
-1
-1
-26

skipif mysql # not compatible
query I rowsort label-6605
SELECT - 80 / tab1.col0 FROM tab1
----
-1
-1
-26

query I rowsort
SELECT DISTINCT + ( 47 ) FROM tab1 AS cor0
----
47

query I rowsort
SELECT DISTINCT col0 * col2 + col2 AS col1 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT col1 * - 62 - col1 FROM tab0 AS cor0
----
-5418
-5733
-6111

query I rowsort
SELECT - 94 * + col2 + col2 FROM tab1 AS cor0
----
-5022
-5301
-8928

query I rowsort
SELECT + 75 + col2 FROM tab1
----
129
132
171

onlyif mysql # use DIV operator for integer division
query I rowsort label-6611
SELECT ALL + 56 DIV tab2.col1 + + cor0.col1 * + 22 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 9b95835583508bcb5b6f331b245931b5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6611
SELECT ALL + 56 / tab2.col1 + + cor0.col1 * + 22 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 9b95835583508bcb5b6f331b245931b5

query I rowsort
SELECT 26 FROM tab1, tab0, tab2 cor0, tab2
----
81 values hashing to 8b6a624eb92fb019d9664318e519f062

query I rowsort
SELECT - 90 * - col0 FROM tab1
----
270
5760
7200

query I rowsort
SELECT col1 + - col1 * + ( + 62 ) FROM tab0 AS cor0
----
-5246
-5551
-5917

query I rowsort
SELECT ALL - ( col2 ) * + ( col1 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - 93 AS col0 FROM tab0, tab1, tab0 AS cor0
----
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 98 * + col2 col1 FROM tab0
----
-3234
-8036
-98

query I rowsort
SELECT ALL - tab1.col2 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT - + ( 13 ) FROM tab0, tab1 cor0
----
9 values hashing to e95f5f4bd0f480397cced5f5e8a23792

query I rowsort
SELECT 70 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT + col1 * + col0 + - tab0.col0 * col0 AS col0 FROM tab0
----
1488
178
2170

query I rowsort
SELECT + col2 - - 22 FROM tab2 AS cor0
----
48
49
60

query I rowsort
SELECT + 88 * 0 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col2 * + col2 + col2 col2 FROM tab2
----
-22572
-24510
-39858

query I rowsort
SELECT ALL + 2 * + 55 FROM tab2, tab1 AS cor0
----
9 values hashing to ebfbd032a0a7b9ce9f54a2516c43134d

query I rowsort
SELECT ALL - 31 FROM tab1, tab0 AS cor0
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

query I rowsort
SELECT 93 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT tab1.col0 FROM tab1, tab0, tab0 cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT 59 AS col2 FROM tab2, tab2 AS cor0
----
59

query I rowsort
SELECT + col2 * col1 - col0 * col2 AS col1 FROM tab0 AS cor0
----
164
2046
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6631
SELECT 99 DIV col0 AS col2 FROM tab1 AS cor0
----
1
1
33

skipif mysql # not compatible
query I rowsort label-6631
SELECT 99 / col0 AS col2 FROM tab1 AS cor0
----
1
1
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * ( cor0.col1 ) col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - col0 * cor0.col1 + + 82 AS col0 FROM tab1 AS cor0
----
-558
-958
4

query I rowsort
SELECT - + col2 * + 86 AS col1 FROM tab2 AS cor0
----
-2236
-2322
-3268

onlyif mysql # use DIV operator for integer division
query I rowsort label-6635
SELECT DISTINCT + + col2 * 93 + col1 DIV - cor0.col2 FROM tab1 AS cor0
----
5022
5301
8928

skipif mysql # not compatible
query I rowsort label-6635
SELECT DISTINCT + + col2 * 93 + col1 / - cor0.col2 FROM tab1 AS cor0
----
5022
5301
8928

query I rowsort
SELECT + 2 - col2 FROM tab1
----
-52
-55
-94

query I rowsort
SELECT DISTINCT + 72 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
72

query I rowsort
SELECT - col1 + - 45 AS col2 FROM tab0
----
-131
-136
-142

skipif mysql # not compatible
query I rowsort
SELECT ALL - col0 + CAST ( - 80 AS REAL ) * + col2 FROM tab2 AS cor0
----
-2158
-2167
-3119

query I rowsort
SELECT ALL col0 + 55 * + col0 FROM tab1 cor0
----
168
3584
4480

query I rowsort
SELECT ALL - cor0.col2 * col0 + col1 * + col0 FROM tab2 AS cor0
----
-1659
2574
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-6642
SELECT + col1 DIV + ( + 86 ) + + col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6642
SELECT + col1 / + ( + 86 ) + + col2 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + ( + 30 ) AS col1 FROM tab1
----
30
30
30

query I rowsort
SELECT + tab0.col1 AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + col1 * col0 + tab2.col0 * 91 - + col1 * - col2 FROM tab2
----
13234
1691
9178

query I rowsort
SELECT ALL col2 + col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
327
3507
988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - cor0.col1 ) col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - cor0.col0 + col2 * + cor0.col0 - 46 FROM tab2 AS cor0
----
136
1904
2877

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) * + tab2.col2 col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT + col0 * + col2 + - col0 AS col1 FROM tab1
----
159
3584
7600

query I rowsort
SELECT - - 59 * 58 + - col1 FROM tab2 cor0
----
3363
3391
3405

query I rowsort
SELECT - ( 26 ) * col1 + + 99 * col2 FROM tab0 AS cor0
----
-2423
1031
5752

onlyif mysql # use DIV operator for integer division
query I rowsort label-6654
SELECT - col1 DIV + col2 - + col0 * tab0.col1 * col0 FROM tab0
----
-118922
-49538
-720812

skipif mysql # not compatible
query I rowsort label-6654
SELECT - col1 / + col2 - + col0 * tab0.col1 * col0 FROM tab0
----
-118922
-49538
-720812

query I rowsort
SELECT col2 + + col1 * - col1 AS col2 FROM tab1
----
-43
-622
-73

query I rowsort
SELECT - ( - col2 ) + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - + 69 * - col0 + + col1 + col0 AS col2 FROM tab0 cor0
----
1766
2547
6321

query I rowsort
SELECT - + 80 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-106
-107
-118

query I rowsort
SELECT ALL - - cor0.col0 * col0 + + ( col2 ) FROM tab0 cor0
----
1226
609
8003

query I rowsort
SELECT ALL + + 1 + col0 * 84 * + col2 FROM tab0 AS cor0
----
2941
613033
66529

query I rowsort
SELECT DISTINCT - col1 * - col2 + + col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT - 11 * - tab2.col0 + + 25 AS col2 FROM tab2
----
102
883
894

onlyif mysql # use DIV operator for integer division
query I rowsort label-6663
SELECT ALL - 44 * + col0 DIV col0 AS col0 FROM tab0
----
-44
-44
-44

skipif mysql # not compatible
query I rowsort label-6663
SELECT ALL - 44 * + col0 / col0 AS col0 FROM tab0
----
-44
-44
-44

query I rowsort
SELECT 58 + col0 * 22 AS col0 FROM tab2 AS cor0
----
1774
1796
212

query I rowsort
SELECT + 6 + cor0.col2 + ( - cor0.col1 ) * - col1 FROM tab1 AS cor0
----
163
271
736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * - ( - col2 * - cor0.col2 ) col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-6667
SELECT + - col2 DIV 98 + col0 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6667
SELECT + - col2 / 98 + col0 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + col0 * - 82 + - col2 + col0 AS col2 FROM tab2 AS cor0
----
-594
-6344
-6437

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * - 85 - + col2 col1 FROM tab2 AS cor0
----
2184
2268
3192

query I rowsort
SELECT + col2 * col0 * 61 AS col0 FROM tab2 AS cor0
----
11529
123708
183122

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + + ( + col0 ) * col1 col1 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6672
SELECT ALL - + col2 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6672
SELECT ALL - + col2 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6673
SELECT + col1 + - 83 * cor0.col2 DIV col1 FROM tab2 AS cor0
----
-168
-41
23

skipif mysql # not compatible
query I rowsort label-6673
SELECT + col1 + - 83 * cor0.col2 / col1 FROM tab2 AS cor0
----
-168
-41
23

query I rowsort
SELECT ALL - 3 * + 33 AS col0 FROM tab1 AS cor0
----
-99
-99
-99

query I rowsort
SELECT + 43 * col1 - - col1 * - col2 FROM tab2 cor0
----
1003
496
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6676
SELECT DISTINCT col1 + + col1 * cor0.col2 + - col2 DIV + 84 FROM tab1 AS cor0
----
1260
1430
580

skipif mysql # not compatible
query I rowsort label-6676
SELECT DISTINCT col1 + + col1 * cor0.col2 + - col2 / + 84 FROM tab1 AS cor0
----
1260
1430
580

query I rowsort
SELECT DISTINCT - - col1 * col2 + col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT - - col1 + col2 * - col2 FROM tab2 AS cor0
----
-1427
-617
-698

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6679
SELECT ALL + CAST( + 5 AS SIGNED ) FROM tab2 cor0
----
5
5
5

skipif mysql # not compatible
query I rowsort label-6679
SELECT ALL + CAST ( + 5 AS INTEGER ) FROM tab2 cor0
----
5
5
5

query I rowsort
SELECT ALL 71 * col2 FROM tab2 AS cor0
----
1846
1917
2698

query I rowsort
SELECT DISTINCT col1 + - col0 * + col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6682
SELECT DISTINCT + CAST( + 5 * col0 AS SIGNED ) + + col0 AS col2 FROM tab0
----
144
210
534

skipif mysql # not compatible
query I rowsort label-6682
SELECT DISTINCT + CAST ( + 5 * col0 AS INTEGER ) + + col0 AS col2 FROM tab0
----
144
210
534

query I rowsort
SELECT + col2 * - ( col2 ) AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + ( 2 ) + col2 FROM tab2 AS cor0
----
28
29
40

query I rowsort
SELECT ALL 27 * - 59 AS col0 FROM tab1 AS cor0
----
-1593
-1593
-1593

onlyif mysql # use DIV operator for integer division
query I rowsort label-6686
SELECT ALL col0 + col2 DIV + cor0.col2 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-6686
SELECT ALL col0 + col2 / + cor0.col2 FROM tab1 AS cor0
----
4
65
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6687
SELECT ALL - - 85 * ( - col1 ) - - CAST( col0 + - col2 AS SIGNED ) * - col2 AS col2 FROM tab2 AS cor0
----
-2095
-3003
-6367

skipif mysql # not compatible
query I rowsort label-6687
SELECT ALL - - 85 * ( - col1 ) - - CAST ( col0 + - col2 AS INTEGER ) * - col2 AS col2 FROM tab2 AS cor0
----
-2095
-3003
-6367

query I rowsort
SELECT - + col0 + cor0.col0 * + cor0.col0 FROM tab1 cor0
----
4032
6
6320

query I rowsort
SELECT DISTINCT - col2 + - col0 + col0 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - col0 * + ( col0 ) FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT + + col1 - 67 * + col1 AS col2 FROM tab1 AS cor0
----
-1716
-660
-858

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6692
SELECT ALL + CAST( + 9 AS SIGNED ) * + col2 AS col1 FROM tab2 AS cor0
----
234
243
342

skipif mysql # not compatible
query I rowsort label-6692
SELECT ALL + CAST ( + 9 AS INTEGER ) * + col2 AS col1 FROM tab2 AS cor0
----
234
243
342

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 - - col0 col0 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col1 ) + - col0 col2 FROM tab0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6695
SELECT ALL col2 DIV - tab0.col0 + + 62 FROM tab0
----
61
62
62

skipif mysql # not compatible
query I rowsort label-6695
SELECT ALL col2 / - tab0.col0 + + 62 FROM tab0
----
61
62
62

query I rowsort
SELECT DISTINCT tab1.col0 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT + col1 * + ( + col2 ) + col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT - col2 * - cor0.col0 + + col2 AS col1 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT col0 * - col1 + cor0.col1 AS col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col2 col0 FROM tab1, tab0 cor0, tab1 cor1
----
54
57
96

query I rowsort
SELECT 6 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT ALL 48 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT + 98 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT + + 93 * col1 AS col1 FROM tab2 cor0
----
1581
2883
5487

query I rowsort
SELECT 82 + col2 FROM tab1 AS cor0
----
136
139
178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 col1 FROM tab0 AS cor0
----
30
30
30

query I rowsort
SELECT col1 + 93 FROM tab1 AS cor0
----
103
106
119

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6708
SELECT DISTINCT + 79 * + col0 * + CAST( NULL AS SIGNED ) + col0 * + col0 + + col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6708
SELECT DISTINCT + 79 * + col0 * + CAST ( NULL AS INTEGER ) + col0 * + col0 + + col0 FROM tab0
----
NULL

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 - tab0.col0 * col0 + - 33 + col1 AS col0 FROM tab0
----
-1161
-523
-7863

query I rowsort
SELECT ALL - ( col2 ) + + ( col0 * cor0.col2 + col1 ) AS col1 FROM tab2 AS cor0
----
193
2061
2981

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col0 col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6713
SELECT ALL - 4 + + col0 - - cor0.col0 DIV col1 AS col0 FROM tab2 AS cor0
----
3
75
79

skipif mysql # not compatible
query I rowsort label-6713
SELECT ALL - 4 + + col0 - - cor0.col0 / col1 AS col0 FROM tab2 AS cor0
----
3
75
79

query I rowsort
SELECT + - 50 * col0 FROM tab2 AS cor0
----
-350
-3900
-3950

query I rowsort
SELECT - 30 * + col1 AS col1 FROM tab0 cor0
----
-2580
-2730
-2910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 * cor0.col2 + 72 * col0 col2 FROM tab1 cor0
----
14976
3132
7857

query I rowsort
SELECT col1 * + col2 * - col2 + + col2 FROM tab0 AS cor0
----
-611802
-93621
-96

query I rowsort
SELECT - cor0.col2 * - col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL - - col0 + col2 * - col0 + + col1 FROM tab2 AS cor0
----
-151
-1891
-2906

onlyif mysql # use DIV operator for integer division
query I rowsort label-6720
SELECT + col2 DIV - ( cor0.col1 ) + col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6720
SELECT + col2 / - ( cor0.col1 ) + col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + cor0.col0 - 84 AS col1 FROM tab1 cor0
----
-20
-4
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-6722
SELECT - cor0.col1 DIV - col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-6722
SELECT - cor0.col1 / - col0 FROM tab1 AS cor0
----
0
0
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-6723
SELECT + col1 DIV - 76 AS col0 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6723
SELECT + col1 / - 76 AS col0 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT + cor0.col1 + + col2 * col2 AS col0 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT ALL cor0.col1 * 57 AS col2 FROM tab0 AS cor0
----
4902
5187
5529

onlyif mysql # use DIV operator for integer division
query I rowsort label-6726
SELECT + col1 DIV 85 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6726
SELECT + col1 / 85 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * 48 + 15 col1 FROM tab1 AS cor0
----
2607
2751
4623

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 8 + + col2 col2 FROM tab0 AS cor0
----
41
9
90

query I rowsort
SELECT 33 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6730
SELECT + tab2.col0 / + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6730
SELECT + tab2.col0 / + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 37 * - col2 AS col0 FROM tab2 AS cor0
----
-1406
-962
-999

query I rowsort
SELECT ALL + 39 + 29 FROM tab0 AS cor0
----
68
68
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-6733
SELECT - - col2 + col1 DIV 16 AS col0 FROM tab1 cor0
----
55
57
96

skipif mysql # not compatible
query I rowsort label-6733
SELECT - - col2 + col1 / 16 AS col0 FROM tab1 cor0
----
55
57
96

query I rowsort
SELECT + 85 * col2 + col2 FROM tab1 cor0
----
4644
4902
8256

query I rowsort
SELECT cor0.col1 * ( cor0.col0 * + col2 ) FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT cor0.col0 * + 23 AS col1 FROM tab2 AS cor0
----
161
1794
1817

query I rowsort
SELECT DISTINCT + cor0.col2 * 64 FROM tab1 AS cor0
----
3456
3648
6144

query I rowsort
SELECT - col1 + col1 * col1 FROM tab2 cor0
----
272
3422
930

query I rowsort
SELECT DISTINCT - ( + 37 ) FROM tab2, tab1 AS cor0, tab0 AS cor1
----
-37

query I rowsort
SELECT DISTINCT - 98 * - 37 AS col2 FROM tab0 cor0
----
3626

query I rowsort
SELECT ALL - cor0.col1 * ( cor0.col0 ) + col0 FROM tab1 AS cor0
----
-576
-75
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-6742
SELECT ALL - - col1 + col1 DIV col1 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-6742
SELECT ALL - - col1 + col1 / col1 FROM tab1 AS cor0
----
11
14
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6743
SELECT DISTINCT + - CAST( col1 AS SIGNED ) * col2 - - 10 * 4 AS col2 FROM tab2 AS cor0
----
-1494
-606
-797

skipif mysql # not compatible
query I rowsort label-6743
SELECT DISTINCT + - CAST ( col1 AS INTEGER ) * col2 - - 10 * 4 AS col2 FROM tab2 AS cor0
----
-1494
-606
-797

query I rowsort
SELECT ALL 20 + - col0 AS col1 FROM tab1 AS cor0
----
-44
-60
17

query I rowsort
SELECT + + 31 AS col1 FROM tab1 cor0
----
31
31
31

query I rowsort
SELECT + col1 * tab0.col1 * - col0 + - ( col0 ) AS col1 FROM tab0
----
-177528
-329350
-737098

query I rowsort
SELECT 70 + + ( + tab1.col0 + + tab1.col0 ) FROM tab1
----
198
230
76

query I rowsort
SELECT 16 + - cor0.col2 FROM tab2 AS cor0
----
-10
-11
-22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6749
SELECT DISTINCT - CAST( NULL AS SIGNED ) * ( - col2 ) + col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6749
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * ( - col2 ) + col2 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6750
SELECT ALL col0 + - col2 * cor0.col1 DIV col1 FROM tab1 cor0
----
-16
-51
7

skipif mysql # not compatible
query I rowsort label-6750
SELECT ALL col0 + - col2 * cor0.col1 / col1 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT - + ( 71 ) * col1 FROM tab0 AS cor0
----
-6106
-6461
-6887

query I rowsort
SELECT - cor0.col0 + + 25 * + cor0.col2 AS col0 FROM tab1 cor0
----
1347
1361
2320

query I rowsort
SELECT DISTINCT + + col1 - + 47 AS col2 FROM tab2 cor0
----
-16
-30
12

query I rowsort
SELECT ( 5 ) FROM tab1
----
5
5
5

query I rowsort
SELECT + 19 - cor0.col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 6f27e9dbc51ac119cef696472d941ff5

onlyif mysql # use DIV operator for integer division
query I rowsort label-6756
SELECT + + col2 DIV cor0.col0 col2 FROM tab2 cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6756
SELECT + + col2 / cor0.col0 col2 FROM tab2 cor0
----
0
0
3

query I rowsort
SELECT DISTINCT col0 * + col0 + - 37 + - col0 FROM tab2 AS cor0
----
5
5969
6125

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6758
SELECT ALL col0 * col1 + CAST( NULL AS SIGNED ) * + 4 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6758
SELECT ALL col0 * col1 + CAST ( NULL AS INTEGER ) * + 4 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6759
SELECT + col0 + col2 DIV - col1 AS col1 FROM tab2 cor0
----
7
77
78

skipif mysql # not compatible
query I rowsort label-6759
SELECT + col0 + col2 / - col1 AS col1 FROM tab2 cor0
----
7
77
78

query I rowsort
SELECT ALL + ( + col0 ) * - col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL col2 * 72 + col0 FROM tab2
----
1950
1951
2815

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col0 + col1 col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6764
SELECT ALL + col1 DIV + col0 + - cor0.col2 - - col2 AS col0 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-6764
SELECT ALL + col1 / + col0 + - cor0.col2 - - col2 AS col0 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT + col2 * 74 + cor0.col0 AS col1 FROM tab1 AS cor0
----
3999
4282
7184

onlyif mysql # use DIV operator for integer division
query I rowsort label-6766
SELECT ALL + + cor0.col0 + + col2 DIV col1 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-6766
SELECT ALL + + cor0.col0 + + col2 / col1 FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT ALL + col1 * - col1 - + col1 * col0 FROM tab1
----
-1209
-740
-754

onlyif mysql # use DIV operator for integer division
query I rowsort label-6768
SELECT + col1 + col1 DIV - ( - 51 ) - col0 DIV ( 60 ) AS col1 FROM tab0
----
87
91
98

skipif mysql # not compatible
query I rowsort label-6768
SELECT + col1 + col1 / - ( - 51 ) - col0 / ( 60 ) AS col1 FROM tab0
----
87
91
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6769
SELECT + 18 DIV + col1 col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6769
SELECT + 18 / + col1 col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - cor0.col2 + + 53 FROM tab2, tab1 AS cor0
----
9 values hashing to 9df0d611f7942a6a86c0fbe43f618829

query I rowsort
SELECT DISTINCT - + cor0.col1 * tab0.col1 FROM tab0, tab2, tab2 AS cor0
----
9 values hashing to 3a68b2420e96feae5e3ca1f4dd4282df

query I rowsort
SELECT ALL - ( + 99 ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 64d06513850a26495bc6c2fddeb254b7

query I rowsort
SELECT + col2 * col1 - + col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT - + col1 * - 28 * - col0 AS col0 FROM tab2 AS cor0
----
-128856
-37604
-6076

query I rowsort
SELECT col0 * + 34 + col1 FROM tab2 AS cor0
----
269
2703
2711

query I rowsort
SELECT + + col2 + 44 AS col0 FROM tab1 AS cor0
----
101
140
98

query I rowsort
SELECT DISTINCT col1 + ( - ( col0 ) ) FROM tab1
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-6778
SELECT - col0 + - col2 + col2 DIV col0 AS col1 FROM tab1
----
-121
-175
-39

skipif mysql # not compatible
query I rowsort label-6778
SELECT - col0 + - col2 + col2 / col0 AS col1 FROM tab1
----
-121
-175
-39

query I rowsort
SELECT DISTINCT - col2 * col1 + + ( + col2 ) + + col2 AS col0 FROM tab2
----
-1482
-570
-783

query I rowsort
SELECT DISTINCT - tab0.col0 * col2 + 59 FROM tab0
----
-7239
-733
24

query I rowsort
SELECT ALL col2 * tab1.col1 + col0 + col1 AS col1 FROM tab1
----
1341
1433
644

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 + + col0 + col1 * - col0 col2 FROM tab1
----
-237
-4224
-8640

query I rowsort
SELECT DISTINCT tab2.col0 * col2 + col2 FROM tab2
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col1 + - col2 col2 FROM tab2
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6785
SELECT col2 - - CAST( col1 AS SIGNED ) AS col0 FROM tab1
----
109
67
80

skipif mysql # not compatible
query I rowsort label-6785
SELECT col2 - - CAST ( col1 AS INTEGER ) AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT col2 * - 11 FROM tab2 AS cor0
----
-286
-297
-418

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

onlyif mysql # use DIV operator for integer division
query I rowsort label-6788
SELECT DISTINCT ( ( - col2 DIV - 96 ) ) * + col1 * - cor0.col2 AS col0 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-6788
SELECT DISTINCT ( ( - col2 / - 96 ) ) * + col1 * - cor0.col2 AS col0 FROM tab0 cor0
----
0

query I rowsort
SELECT col2 + + 48 * + cor0.col2 + - col1 AS col1 FROM tab2 AS cor0
----
1215
1292
1845

onlyif mysql # use DIV operator for integer division
query I rowsort label-6790
SELECT ALL - 16 DIV col1 + - col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-6790
SELECT ALL - 16 / col1 + - col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + ( + col1 ) - + col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6792
SELECT + - CAST( NULL AS SIGNED ) * col2 + + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6792
SELECT + - CAST ( NULL AS INTEGER ) * col2 + + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col0 + - cor0.col0 FROM tab2 cor0
----
-14
-156
-158

query I rowsort
SELECT DISTINCT - ( - cor0.col0 ) + + col2 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6795
SELECT ALL - - CAST( NULL AS SIGNED ) * col1 - + col2 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6795
SELECT ALL - - CAST ( NULL AS INTEGER ) * col1 - + col2 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * ( cor0.col0 ) * ( + col0 ) + - col0 AS col1 FROM tab0 AS cor0
----
118790
49512
720722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * col1 col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL cor0.col2 + + col1 + - col1 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 46 col1 FROM tab1 cor0
----
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-6800
SELECT - ( + col2 ) DIV + col1 AS col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-6800
SELECT - ( + col2 ) / + col1 AS col1 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT DISTINCT - 0 + + col0 * cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - - 51 * + cor0.col0 FROM tab1 AS cor0
----
153
3264
4080

query I rowsort
SELECT ALL - + cor0.col1 * - col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - 8 FROM tab0 cor0
----
-8
-8
-8

query I rowsort
SELECT - + col1 + - ( + col2 ) FROM tab2 AS cor0
----
-55
-58
-85

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 cor0, tab0 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to c8e4a9d810c83d17322e338b2adc95b6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 93 * + col1 * col0 col2 FROM tab1
----
59520
7254
96720

query I rowsort
SELECT ALL - + col2 * - 48 FROM tab2 AS cor0
----
1248
1296
1824

query I rowsort
SELECT - col2 + + col0 * - 84 AS col1 FROM tab0 AS cor0
----
-2049
-2941
-7558

query I rowsort
SELECT - + col0 * - cor0.col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT + - 39 - col0 FROM tab1 AS cor0
----
-103
-119
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 - - col1 * col2 col2 FROM tab0 AS cor0
----
2794
53
7418

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6813
SELECT - col2 * - col1 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6813
SELECT - col2 * - col1 + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 42 + col1 FROM tab1 AS cor0
----
-16
-29
-32

query I rowsort
SELECT + - col0 * + col1 + + ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT tab1.col2 * + 10 FROM tab1
----
540
570
960

query I rowsort
SELECT - 97 * - col1 + + col2 * + col2 FROM tab1 AS cor0
----
10477
4219
5438

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6818
SELECT DISTINCT - col2 / + 10 + - col2 * CAST( NULL AS SIGNED ) + - col1 AS col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-6818
SELECT DISTINCT - col2 / + 10 + - col2 * CAST ( NULL AS INTEGER ) + - col1 AS col0 FROM tab2
----
NULL

query I rowsort
SELECT + col1 * + 25 AS col0 FROM tab1
----
250
325
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + cor0.col1 col2 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT ALL 57 * + col0 AS col2 FROM tab1 AS cor0
----
171
3648
4560

query I rowsort
SELECT ALL 61 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT - ( - 24 ) * col2 FROM tab2 cor0
----
624
648
912

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT DISTINCT + 76 - 96 * + col2 FROM tab1 AS cor0
----
-5108
-5396
-9140

query I rowsort
SELECT + cor0.col1 * + 82 FROM tab2 cor0
----
1394
2542
4838

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6827
SELECT ALL + - CAST( ( + col1 ) AS SIGNED ) FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-6827
SELECT ALL + - CAST ( ( + col1 ) AS INTEGER ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col0 * - ( + col2 ) * - col1 AS col0 FROM tab1
----
36480
4212
99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6829
SELECT + + CAST( NULL AS DECIMAL ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6829
SELECT + + CAST ( NULL AS REAL ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6830
SELECT - col1 * col0 DIV col1 + + 39 AS col0 FROM tab0
----
-50
15
4

skipif mysql # not compatible
query I rowsort label-6830
SELECT - col1 * col0 / col1 + + 39 AS col0 FROM tab0
----
-50
15
4

query I rowsort
SELECT - 58 + 54 AS col1 FROM tab1
----
-4
-4
-4

query I rowsort
SELECT 28 - - 58 AS col0 FROM tab0
----
86
86
86

query I rowsort
SELECT + + 7 * col1 FROM tab2 AS cor0
----
119
217
413

query I rowsort
SELECT ALL - 76 AS col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to d90b4aa5f03b4a149aa925c4a88acca0

query I rowsort
SELECT DISTINCT + col2 - col2 AS col2 FROM tab2
----
0

query I rowsort
SELECT 5 + - tab2.col0 FROM tab2
----
-2
-73
-74

onlyif mysql # use DIV operator for integer division
query I rowsort label-6837
SELECT ALL ( + col2 ) DIV + 46 + col2 + - col1 FROM tab1 AS cor0
----
29
48
85

skipif mysql # not compatible
query I rowsort label-6837
SELECT ALL ( + col2 ) / + 46 + col2 + - col1 FROM tab1 AS cor0
----
29
48
85

query I rowsort
SELECT DISTINCT col1 * - col1 + - col1 AS col1 FROM tab0 AS cor0
----
-7482
-8372
-9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * - cor0.col1 col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL col1 * col2 + 80 FROM tab0 AS cor0
----
177
2918
7542

query I rowsort
SELECT + + cor0.col1 AS col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT - col2 * - 56 FROM tab0
----
1848
4592
56

query I rowsort
SELECT ALL - col0 * - 61 AS col1 FROM tab2
----
427
4758
4819

query I rowsort
SELECT - col1 * 68 + - 31 FROM tab2 AS cor0
----
-1187
-2139
-4043

query I rowsort
SELECT - col1 * 65 + - col1 + col1 AS col2 FROM tab2 AS cor0
----
-1105
-2015
-3835

query I rowsort
SELECT + col0 + - 91 AS col0 FROM tab1 AS cor0
----
-11
-27
-88

query I rowsort
SELECT ALL + 35 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
-1085
-2065
-595

query I rowsort
SELECT + 12 + - 29 * + col0 FROM tab0 AS cor0
----
-1003
-2569
-684

skipif mysql # not compatible
query I rowsort
SELECT - - CAST ( col1 AS REAL ) * - col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + col2 * + ( - col2 ) FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT + col1 * - 94 FROM tab2
----
-1598
-2914
-5546

query I rowsort
SELECT ALL 18 * + 14 FROM tab2, tab0 cor0
----
9 values hashing to cb924e0179112edb1102a7a8eabda50b

query I rowsort
SELECT ALL + 25 FROM tab2, tab1 cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT ALL col1 + + col2 * + 57 AS col1 FROM tab1
----
3104
3259
5485

query I rowsort
SELECT col2 + 84 FROM tab0
----
117
166
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6856
SELECT ALL - + col2 DIV + 13 - + cor0.col1 AS col0 FROM tab0 cor0
----
-88
-97
-97

skipif mysql # not compatible
query I rowsort label-6856
SELECT ALL - + col2 / + 13 - + cor0.col1 AS col0 FROM tab0 cor0
----
-88
-97
-97

query I rowsort
SELECT + col1 * - 30 + - col0 * + col2 AS col1 FROM tab1 AS cor0
----
-3948
-8070
-942

query I rowsort
SELECT ALL col1 * - col0 + col0 AS col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT col2 * - 85 * - col1 FROM tab0 AS cor0
----
241230
634270
8245

query I rowsort
SELECT ALL - col2 * col0 - 56 AS col2 FROM tab1 AS cor0
----
-218
-3704
-7736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + ( + 74 ) * col0 col2 FROM tab1 cor0
----
47360
5772
76960

onlyif mysql # use DIV operator for integer division
query I rowsort label-6862
SELECT ALL - col0 * cor0.col1 DIV col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6862
SELECT ALL - col0 * cor0.col1 / col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - col2 * + ( + col0 * + col0 ) FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT 19 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab1 cor2
----
81 values hashing to 39241ace4c29d5a55052e1665aa36823

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * + 6 + col1 col2 FROM tab2 AS cor0
----
491
527
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6866
SELECT + + CAST( - 30 AS SIGNED ) * cor0.col2 * + CAST( 3 AS SIGNED ) AS col2 FROM tab1 cor0
----
-4860
-5130
-8640

skipif mysql # not compatible
query I rowsort label-6866
SELECT + + CAST ( - 30 AS INTEGER ) * cor0.col2 * + CAST ( 3 AS INTEGER ) AS col2 FROM tab1 cor0
----
-4860
-5130
-8640

query I rowsort
SELECT DISTINCT + col0 - cor0.col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT + + 63 * col1 AS col0 FROM tab0 AS cor0
----
5418
5733
6111

onlyif mysql # use DIV operator for integer division
query I rowsort label-6869
SELECT DISTINCT - ( col2 ) DIV - cor0.col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-6869
SELECT DISTINCT - ( col2 ) / - cor0.col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT ALL 26 * col0 + - col1 AS col2 FROM tab1 AS cor0
----
1654
2067
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6871
SELECT DISTINCT cor0.col0 + 7 DIV - col0 + ( - col0 ) FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-6871
SELECT DISTINCT cor0.col0 + 7 / - col0 + ( - col0 ) FROM tab0 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6872
SELECT ALL + - ( 89 ) + + cor0.col2 * 26 DIV col2 col0 FROM tab0 AS cor0
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6872
SELECT ALL + - ( 89 ) + + cor0.col2 * 26 / col2 col0 FROM tab0 AS cor0
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 + col2 col1 FROM tab2 cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6874
SELECT CAST( cor0.col0 AS SIGNED ) + col0 AS col2 FROM tab1 AS cor0
----
128
160
6

skipif mysql # not compatible
query I rowsort label-6874
SELECT CAST ( cor0.col0 AS INTEGER ) + col0 AS col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL - ( 24 ) AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to f2e40f6e5cdbc2877843191cb261975f

query I rowsort
SELECT ALL - - 82 + col1 AS col1 FROM tab2 cor0
----
113
141
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-6877
SELECT col2 + col2 DIV col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6877
SELECT col2 + col2 / col1 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6878
SELECT ALL - 74 DIV - col0 AS col0 FROM tab1
----
0
1
24

skipif mysql # not compatible
query I rowsort label-6878
SELECT ALL - 74 / - col0 AS col0 FROM tab1
----
0
1
24

query I rowsort
SELECT 5 * 20 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 88605988410cd7d6b5c389bf9a3dd418

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6880
SELECT - CAST( NULL AS SIGNED ) + - cor0.col1 AS col1 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6880
SELECT - CAST ( NULL AS INTEGER ) + - cor0.col1 AS col1 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL + 34 * col1 * + col0 FROM tab1 AS cor0
----
21760
2652
35360

query I rowsort
SELECT DISTINCT + - col2 * col2 * - ( col1 ) AS col0 FROM tab2 AS cor0
----
22599
24548
39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-6883
SELECT DISTINCT + col2 + + ( 87 ) DIV col1 col0 FROM tab0 AS cor0
----
1
34
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6883
SELECT DISTINCT + col2 + + ( 87 ) / col1 col0 FROM tab0 AS cor0
----
1
34
82

query I rowsort
SELECT + cor0.col2 + 6 - 83 FROM tab2, tab2 AS cor0
----
9 values hashing to 83c0a16b99daacc4c0194828527248e0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6885
SELECT ALL col2 DIV 53 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6885
SELECT ALL col2 / 53 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - col2 * + 66 AS col2 FROM tab0 AS cor0
----
-2178
-5412
-66

query I rowsort
SELECT col2 * col1 - - col1 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6888
SELECT cor0.col2 + CAST( NULL AS SIGNED ) / col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6888
SELECT cor0.col2 + CAST ( NULL AS INTEGER ) / col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6889
SELECT col1 * CAST( NULL AS SIGNED ) / - cor0.col0 - - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6889
SELECT col1 * CAST ( NULL AS INTEGER ) / - cor0.col0 - - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 * col2 + tab2.col1 col2 FROM tab2
----
1281
1300
1803

query I rowsort
SELECT - 9 - tab2.col0 * col2 FROM tab2
----
-198
-2037
-3011

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6892
SELECT - col0 * - CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6892
SELECT - col0 * - CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 90 * - col2 FROM tab1
----
-4860
-5130
-8640

query I rowsort
SELECT + col2 * tab1.col1 + - col1 FROM tab1
----
1235
1378
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6895
SELECT + col0 / CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6895
SELECT + col0 / CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * - 14 + + 67 AS col0 FROM tab2
----
-1025
-1039
-31

onlyif mysql # use DIV operator for integer division
query I rowsort label-6897
SELECT tab0.col1 * col2 + - tab0.col1 DIV - tab0.col1 AS col2 FROM tab0
----
2839
7463
98

skipif mysql # not compatible
query I rowsort label-6897
SELECT tab0.col1 * col2 + - tab0.col1 / - tab0.col1 AS col2 FROM tab0
----
2839
7463
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT - col2 + - col1 + cor0.col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT col0 * + ( col1 * col0 ) FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL col0 * 5 + + cor0.col2 AS col1 FROM tab2 AS cor0
----
416
433
62

query I rowsort
SELECT DISTINCT + - 84 AS col0 FROM tab1, tab2, tab1 cor0, tab0
----
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + col2 col1 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT - - col2 * - col1 + - cor0.col0 + + 19 * - col1 * - col1 AS col2 FROM tab1 AS cor0
----
11437
1266
1883

query I rowsort
SELECT DISTINCT - 89 * + col2 * - 71 + 51 FROM tab0 cor0
----
208578
518209
6370

onlyif mysql # use DIV operator for integer division
query I rowsort label-6907
SELECT ALL - col1 DIV - cor0.col2 + - col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-6907
SELECT ALL - col1 / - cor0.col2 + - col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + 82 * - col1 + 77 * col0 AS col1 FROM tab0 AS cor0
----
-5204
-5259
-609

query I rowsort
SELECT DISTINCT + - col2 + col0 AS col1 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT ALL - col2 * col0 + - 52 FROM tab1 AS cor0
----
-214
-3700
-7732

query I rowsort
SELECT ALL col1 * - col1 + ( cor0.col0 ) * + col0 FROM tab0 AS cor0
----
-360
-6820
-8184

query I rowsort
SELECT DISTINCT col0 + col0 * + 51 AS col2 FROM tab1 AS cor0
----
156
3328
4160

query I rowsort
SELECT + ( - cor0.col1 ) * + col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL - cor0.col1 - - col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6915
SELECT ALL CAST( 95 AS SIGNED ) * tab0.col2 AS col0 FROM tab0
----
3135
7790
95

skipif mysql # not compatible
query I rowsort label-6915
SELECT ALL CAST ( 95 AS INTEGER ) * tab0.col2 AS col0 FROM tab0
----
3135
7790
95

query I rowsort
SELECT DISTINCT - col1 * + 17 * col1 FROM tab0
----
-125732
-140777
-159953

query I rowsort
SELECT - cor1.col2 FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

onlyif mysql # use DIV operator for integer division
query I rowsort label-6918
SELECT + 10 DIV - col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6918
SELECT + 10 / - col2 FROM tab1 AS cor0
----
0
0
0

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1, tab1 AS cor0 WHERE NULL = NULL
----

query I rowsort
SELECT DISTINCT + tab2.col2 AS col2 FROM tab2, tab2 AS cor0, tab2 cor1
----
26
27
38

query I rowsort
SELECT - ( - ( - col2 ) + col2 ) FROM tab0
----
-164
-2
-66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6922
SELECT + ( + col1 ) * CAST( cor0.col0 AS SIGNED ) FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-6922
SELECT + ( + col1 ) * CAST ( cor0.col0 AS INTEGER ) FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - + ( + col0 ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6924
SELECT - + 47 + + col0 DIV 13 FROM tab0 AS cor0
----
-41
-45
-46

skipif mysql # not compatible
query I rowsort label-6924
SELECT - + 47 + + col0 / 13 FROM tab0 AS cor0
----
-41
-45
-46

query I rowsort
SELECT DISTINCT 19 * col1 FROM tab2
----
1121
323
589

onlyif mysql # use DIV operator for integer division
query I rowsort label-6926
SELECT - col1 + - 34 DIV + col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-6926
SELECT - col1 + - 34 / + col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + cor0.col0 * + col1 + + col1 AS col1 FROM tab0 cor0
----
2150
3492
8190

query I rowsort
SELECT ALL - col0 * 85 FROM tab0 AS cor0
----
-2040
-2975
-7565

onlyif mysql # use DIV operator for integer division
query I rowsort label-6929
SELECT + + col0 DIV ( - col0 ) AS col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6929
SELECT + + col0 / ( - col0 ) AS col1 FROM tab2 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6930
SELECT - col1 * + CAST( NULL AS SIGNED ) + 3 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6930
SELECT - col1 * + CAST ( NULL AS INTEGER ) + 3 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6931
SELECT - col2 DIV - 47 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6931
SELECT - col2 / - 47 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6932
SELECT - - col1 + CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6932
SELECT - - col1 + CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col0 * 8 AS col2 FROM tab0 cor0
----
-192
-280
-712

query I rowsort
SELECT DISTINCT tab0.col1 * + col1 * col0 AS col0 FROM tab0
----
177504
329315
737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-6935
SELECT DISTINCT + col2 DIV col2 + + cor0.col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-6935
SELECT DISTINCT + col2 / col2 + + cor0.col0 FROM tab0 AS cor0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + col0 col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + col2 * - 34 AS col0 FROM tab1 AS cor0
----
-1836
-1938
-3264

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6938
SELECT ALL + CAST( col2 AS SIGNED ) + col1 + - 25 FROM tab2 AS cor0
----
30
33
60

skipif mysql # not compatible
query I rowsort label-6938
SELECT ALL + CAST ( col2 AS INTEGER ) + col1 + - 25 FROM tab2 AS cor0
----
30
33
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6939
SELECT - CAST( + col2 AS SIGNED ) * - col2 * 44 + + cor0.col2 col1 FROM tab2 AS cor0
----
29770
32103
63574

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6939
SELECT - CAST ( + col2 AS INTEGER ) * - col2 * 44 + + cor0.col2 col1 FROM tab2 AS cor0
----
29770
32103
63574

onlyif mysql # use DIV operator for integer division
query I rowsort label-6940
SELECT DISTINCT - + 45 DIV col0 + col0 FROM tab2 cor0
----
1
78
79

skipif mysql # not compatible
query I rowsort label-6940
SELECT DISTINCT - + 45 / col0 + col0 FROM tab2 cor0
----
1
78
79

query I rowsort
SELECT 43 AS col0 FROM tab1 cor0
----
43
43
43

query I rowsort
SELECT ALL - 55 * 53 FROM tab2 AS cor0
----
-2915
-2915
-2915

query I rowsort
SELECT DISTINCT - + 86 * cor0.col0 + - cor0.col2 + - 35 * - ( col2 * col2 ) AS col1 FROM tab0 AS cor0
----
-2976
227604
36018

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6944
SELECT ALL CAST( NULL AS SIGNED ) * col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6944
SELECT ALL CAST ( NULL AS INTEGER ) * col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * 59 FROM tab2
----
-1534
-1593
-2242

onlyif mysql # use DIV operator for integer division
query I rowsort label-6946
SELECT DISTINCT - cor0.col0 DIV - 84 FROM tab2, tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-6946
SELECT DISTINCT - cor0.col0 / - 84 FROM tab2, tab0 AS cor0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6947
SELECT + + ( col1 ) + + col1 DIV - ( - 89 ) FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6947
SELECT + + ( col1 ) + + col1 / - ( - 89 ) FROM tab2 AS cor0
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6948
SELECT CAST( NULL AS SIGNED ) * + cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6948
SELECT CAST ( NULL AS INTEGER ) * + cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6949
SELECT ALL 52 DIV 58 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-6949
SELECT ALL 52 / 58 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-6950
SELECT + 58 DIV tab0.col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6950
SELECT + 58 / tab0.col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT - 70 + cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 15eede86ef0be714ffd88317951618ea

query I rowsort
SELECT DISTINCT + 0 FROM tab0, tab2 cor0, tab2 cor1
----
0

query I rowsort
SELECT DISTINCT - col0 + 90 AS col2 FROM tab0
----
1
55
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6954
SELECT - col0 * - CAST( NULL AS DECIMAL ) + - col1 * - col2 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-6954
SELECT - col0 * - CAST ( NULL AS REAL ) + - col1 * - col2 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6955
SELECT - cor0.col0 DIV - 69 + 80 AS col0 FROM tab1 AS cor0
----
80
80
81

skipif mysql # not compatible
query I rowsort label-6955
SELECT - cor0.col0 / - 69 + 80 AS col0 FROM tab1 AS cor0
----
80
80
81

query I rowsort
SELECT - col0 * 60 - + cor0.col1 FROM tab1 AS cor0
----
-206
-3850
-4813

query I rowsort
SELECT ALL + col0 + + col2 AS col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT cor2.col0 * 34 - - 39 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 54e69875cfb35a48a94176396328cc04

query I rowsort
SELECT DISTINCT - - col2 * 20 + - col2 * col1 * 29 FROM tab1 AS cor0
----
-15390
-34272
-39636

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
26
27
38

query I rowsort
SELECT DISTINCT - 84 FROM tab2, tab2 cor0, tab0 AS cor1, tab0, tab1 cor2
----
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6962
SELECT 76 + + col2 * CAST( NULL AS SIGNED ) / + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6962
SELECT 76 + + col2 * CAST ( NULL AS INTEGER ) / + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 88 * - col0 + + col2 * cor0.col2 FROM tab1 AS cor0
----
-2383
2176
2652

query I rowsort
SELECT - 11 + - col1 * + tab1.col0 * col0 + + col1 AS col2 FROM tab1
----
-219
-40961
-83198

onlyif mysql # use DIV operator for integer division
query I rowsort label-6965
SELECT ALL + - col0 + col1 + + 45 DIV + 27 AS col2 FROM tab1 AS cor0
----
-53
-66
24

skipif mysql # not compatible
query I rowsort label-6965
SELECT ALL + - col0 + col1 + + 45 / + 27 AS col2 FROM tab1 AS cor0
----
-53
-66
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-6966
SELECT ALL + + col2 + - col2 * cor0.col1 DIV + col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6966
SELECT ALL + + col2 + - col2 * cor0.col1 / + col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL col0 + col1 * 67 FROM tab1 AS cor0
----
1745
734
951

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6968
SELECT + col2 * - col1 + CAST( NULL AS SIGNED ) * - 52 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6968
SELECT + col2 * - col1 + CAST ( NULL AS INTEGER ) * - 52 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * - 66 AS col2 FROM tab0
----
2178
5412
66

query I rowsort
SELECT DISTINCT + cor0.col2 + - col2 * 60 FROM tab1 cor0
----
-3186
-3363
-5664

query I rowsort
SELECT col1 * + 32 + col0 FROM tab0 AS cor0
----
2776
3001
3139

query I rowsort
SELECT + 68 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6973
SELECT - col2 * CAST( col1 AS SIGNED ) + + col1 col2 FROM tab2 AS cor0
----
-1475
-629
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6973
SELECT - col2 * CAST ( col1 AS INTEGER ) + + col1 col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT - ( 60 ) + - col2 AS col0 FROM tab2 AS cor0
----
-86
-87
-98

query I rowsort
SELECT ALL col0 * + col2 * - col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT ( 47 ) * col0 AS col2 FROM tab1 AS cor0
----
141
3008
3760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6977
SELECT ALL + col1 - - col2 * - col2 * CAST( col1 * + col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-11501555
-1851920
-4094038

skipif mysql # not compatible
query I rowsort label-6977
SELECT ALL + col1 - - col2 * - col2 * CAST ( col1 * + col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-11501555
-1851920
-4094038

query I rowsort
SELECT - - col1 + + 24 * + col2 * 67 FROM tab0 AS cor0
----
131947
1705
53150

query I rowsort
SELECT DISTINCT col0 + - 27 * + col1 AS col1 FROM tab0 AS cor0
----
-2298
-2368
-2584

query I rowsort
SELECT ALL 94 * 91 AS col2 FROM tab0 AS cor0
----
8554
8554
8554

query I rowsort
SELECT ALL - 90 AS col2 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

query I rowsort
SELECT 43 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

query I rowsort
SELECT ALL - 38 * col1 AS col1 FROM tab2 AS cor0
----
-1178
-2242
-646

query I rowsort
SELECT ALL - col2 * - ( col0 ) + + ( col1 ) AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT - 30 AS col2 FROM tab1 AS cor0
----
-30

onlyif mysql # use DIV operator for integer division
query I rowsort label-6986
SELECT - ( - col0 ) DIV col0 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6986
SELECT - ( - col0 ) / col0 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - 43 * - col0 AS col0 FROM tab1 AS cor0
----
129
2752
3440

query I rowsort
SELECT ALL col1 + 73 FROM tab0 AS cor0
----
159
164
170

query I rowsort
SELECT cor0.col0 * - cor0.col1 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 9b23e5e74ef3405a4dbf05cceb18c8a8

query I rowsort
SELECT ALL - 7 + + col0 AS col1 FROM tab2 cor0
----
0
71
72

query I rowsort
SELECT ALL + col1 * + col2 + - col1 FROM tab0 AS cor0
----
0
2752
7371

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col0 * col1 col1 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT 16 AS col0 FROM tab1
----
16

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6994
SELECT - + CAST( NULL AS SIGNED ) * + col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6994
SELECT - + CAST ( NULL AS INTEGER ) * + col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * 52 + col2 FROM tab0 AS cor0
----
1749
4346
53

query I rowsort
SELECT + ( 26 ) FROM tab2 AS cor0
----
26
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + cor0.col0 * - 86 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to ae2df0a337255c9274dd66f416191902

query I rowsort
SELECT + 8 * + col1 FROM tab0 AS cor0
----
688
728
776

query I rowsort
SELECT - ( + col2 ) * + 87 FROM tab2 AS cor0
----
-2262
-2349
-3306

query I rowsort
SELECT - 90 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to c0d96679aba507520916e8654e5a6618

query I rowsort
SELECT DISTINCT ( 21 ) AS col2 FROM tab0
----
21

query I rowsort
SELECT - col0 * col2 + + col1 * col0 * + col1 FROM tab1
----
1866
2752
5840

query I rowsort
SELECT 15 + 40 * + col2 AS col0 FROM tab2
----
1055
1095
1535

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 54 * + col1 + - tab2.col2 col0 FROM tab2
----
1647
3160
880

query I rowsort
SELECT ALL ( col2 + - col1 ) * + tab2.col0 FROM tab2
----
-2574
-28
1659

query I rowsort
SELECT ALL - + col2 * - col2 + col2 AS col1 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT + + col1 - 61 FROM tab0 AS cor0
----
25
30
36

query I rowsort
SELECT DISTINCT cor0.col0 * 8 FROM tab2 cor0
----
56
624
632

query I rowsort
SELECT ALL + + col0 + - 37 AS col2 FROM tab2 AS cor0
----
-30
41
42

query I rowsort
SELECT ALL + + col2 + cor0.col0 * + col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - col0 * - 28 * 87 + + col1 FROM tab1 AS cor0
----
155914
194893
7334

query I rowsort
SELECT 26 * + col1 + + col0 FROM tab0
----
2260
2455
2557

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7013
SELECT CAST( - 24 AS SIGNED ) * + cor0.col0 + tab1.col2 AS col2 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to c724e0cc23896570a738aa8c5a90d8b1

skipif mysql # not compatible
query I rowsort label-7013
SELECT CAST ( - 24 AS INTEGER ) * + cor0.col0 + tab1.col2 AS col2 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to c724e0cc23896570a738aa8c5a90d8b1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7014
SELECT DISTINCT 55 DIV col2 + - col1 AS col0 FROM tab1
----
-10
-13
-25

skipif mysql # not compatible
query I rowsort label-7014
SELECT DISTINCT 55 / col2 + - col1 AS col0 FROM tab1
----
-10
-13
-25

query I rowsort
SELECT + + col2 * cor0.col2 + + col2 * - col1 * col1 AS col1 FROM tab1 AS cor0
----
-2451
-33588
-7008

query I rowsort
SELECT + 26 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7017
SELECT DISTINCT - + col0 * - CAST( NULL AS SIGNED ) col1 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7017
SELECT DISTINCT - + col0 * - CAST ( NULL AS INTEGER ) col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + cor0.col0 * col2 + col2 * col1 FROM tab2 AS cor0
----
1026
3562
3648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + cor0.col0 col0 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7020
SELECT + - col0 + CAST( col2 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-7020
SELECT + - col0 + CAST ( col2 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT col0 * - col0 + - cor0.col1 * - col2 FROM tab2 cor0
----
-4550
-5595
788

query I rowsort
SELECT ALL - col0 * ( tab2.col0 ) FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT + cor0.col0 * + 52 FROM tab1, tab0 AS cor0
----
9 values hashing to 064a0a3374c503b28491a45b55423f96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 10 col1 FROM tab2, tab0 AS cor0, tab1 cor1
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT DISTINCT - - cor0.col0 + col0 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT ALL + - 42 * cor0.col2 + + 77 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 83d86bbe7af4d3360c36c6cf197ba667

query I rowsort
SELECT + - cor0.col0 * cor0.col0 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort
SELECT + ( col2 ) + col0 + CAST ( cor0.col0 AS REAL ) FROM tab0 cor0
----
260
71
81

query I rowsort
SELECT DISTINCT + 7 * + col2 FROM tab2 cor0
----
182
189
266

query I rowsort
SELECT DISTINCT col2 * 84 FROM tab0 AS cor0
----
2772
6888
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-7031
SELECT - col2 DIV - 50 - col0 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-7031
SELECT - col2 / - 50 - col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + cor0.col0 + col1 + cor0.col2 * - col2 AS col0 FROM tab0 AS cor0
----
-6544
-979
131

query I rowsort
SELECT + col2 * + 31 AS col1 FROM tab2 AS cor0
----
1178
806
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7034
SELECT + CAST( cor0.col1 AS SIGNED ) * col0 + 58 + col1 * - col1 * - col2 FROM tab2 AS cor0
----
12383
26222
95166

skipif mysql # not compatible
query I rowsort label-7034
SELECT + CAST ( cor0.col1 AS INTEGER ) * col0 + 58 + col1 * - col1 * - col2 FROM tab2 AS cor0
----
12383
26222
95166

query I rowsort
SELECT ALL - 11 * 13 AS col2 FROM tab0 AS cor0
----
-143
-143
-143

query I rowsort
SELECT DISTINCT 63 * col2 AS col2 FROM tab2 AS cor0
----
1638
1701
2394

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7037
SELECT col0 + + col2 + CAST( - col0 AS SIGNED ) * col2 AS col0 FROM tab1 AS cor0
----
-105
-3527
-7504

skipif mysql # not compatible
query I rowsort label-7037
SELECT col0 + + col2 + CAST ( - col0 AS INTEGER ) * col2 AS col0 FROM tab1 AS cor0
----
-105
-3527
-7504

query I rowsort
SELECT - col2 + col0 * + col1 + + col0 * + col2 FROM tab0 cor0
----
15315
2823
3429

query I rowsort
SELECT tab0.col0 + 33 FROM tab0
----
122
57
68

query I rowsort
SELECT - + 45 - col0 AS col0 FROM tab2 AS cor0
----
-123
-124
-52

query I rowsort
SELECT - col0 * col1 + col1 AS col0 FROM tab2 AS cor0
----
-1326
-186
-4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-7042
SELECT + + col1 DIV col1 col1 FROM tab1 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7042
SELECT + + col1 / col1 col1 FROM tab1 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 + col2 + + col0 * col2 col1 FROM tab0 AS cor0
----
14678
1617
71

query I rowsort
SELECT - col0 * col1 + - 70 FROM tab1 AS cor0
----
-1110
-148
-710

query I rowsort
SELECT ALL + 97 + col2 FROM tab2 AS cor0
----
123
124
135

query I rowsort
SELECT DISTINCT col2 * cor0.col0 + - cor0.col1 * - col2 AS col1 FROM tab2 cor0
----
1026
3562
3648

query I rowsort
SELECT DISTINCT + 77 * + col0 + col2 + + 42 FROM tab0 AS cor0
----
1923
2738
6977

onlyif mysql # use DIV operator for integer division
query I rowsort label-7048
SELECT DISTINCT + - col2 DIV + cor0.col2 + 13 AS col2 FROM tab1 AS cor0
----
12

skipif mysql # not compatible
query I rowsort label-7048
SELECT DISTINCT + - col2 / + cor0.col2 + 13 AS col2 FROM tab1 AS cor0
----
12

query I rowsort
SELECT - + col0 * + col0 + + col2 * - col0 AS col0 FROM tab1 AS cor0
----
-14080
-171
-7744

query I rowsort
SELECT ALL + col2 - cor0.col2 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col1 + + cor0.col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c3106673b5165f666b99e75c964d6287

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * ( - col0 ) col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7053
SELECT col1 + + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7053
SELECT 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-7054
SELECT - col1 DIV + CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7054
SELECT - col1 / + CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7056
SELECT DISTINCT - col2 DIV + 18 AS col2 FROM tab0 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-7056
SELECT DISTINCT - col2 / + 18 AS col2 FROM tab0 AS cor0
----
-1
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7057
SELECT col1 DIV 66 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7057
SELECT col1 / 66 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT tab0.col2 * - 82 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 13c480322d6694ba12f2eb926dfd3e4f

query I rowsort
SELECT tab0.col0 * - cor0.col0 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to c51b32df5863551bb4dad3fddcd65620

query I rowsort
SELECT ALL + ( + 23 ) AS col0 FROM tab2 AS cor0
----
23
23
23

query I rowsort
SELECT ALL 27 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

query I rowsort
SELECT 26 * - col2 FROM tab1
----
-1404
-1482
-2496

query I rowsort
SELECT - col1 + col1 - tab1.col0 FROM tab1
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 77 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

onlyif mysql # use DIV operator for integer division
query I rowsort label-7065
SELECT 23 * col0 DIV + col1 AS col2 FROM tab2
----
106
30
5

skipif mysql # not compatible
query I rowsort label-7065
SELECT 23 * col0 / + col1 AS col2 FROM tab2
----
106
30
5

query I rowsort
SELECT - - 98 + - 96 FROM tab1 AS cor0
----
2
2
2

query I rowsort
SELECT + + col2 + + ( col2 ) AS col2 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT DISTINCT - col0 * col2 - + col0 AS col2 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT + col1 + 98 * cor0.col0 AS col1 FROM tab2 AS cor0
----
717
7703
7759

query I rowsort
SELECT ALL - - col1 * + col0 AS col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT col0 * - 25 AS col1 FROM tab0 AS cor0
----
-2225
-600
-875

query I rowsort
SELECT ALL + col0 + 61 AS col0 FROM tab1 cor0
----
125
141
64

query I rowsort
SELECT col0 * + ( - 63 ) AS col0 FROM tab0 AS cor0
----
-1512
-2205
-5607

query I rowsort
SELECT DISTINCT - cor0.col2 + + ( + 32 ) FROM tab2 AS cor0
----
-6
5
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col1 col1 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + 58 col2 FROM tab0 AS cor0
----
4988
5278
5626

query I rowsort
SELECT ALL - 79 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to c9cc9510604e093bd158ca33928acaed

query I rowsort
SELECT DISTINCT + + cor0.col0 + col0 AS col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL + col2 + col1 + - 22 FROM tab0 AS cor0
----
151
76
97

query I rowsort
SELECT ALL - cor0.col1 + - col0 * cor0.col0 + col2 AS col2 FROM tab1 cor0
----
-4049
-6317
19

query I rowsort
SELECT DISTINCT - col0 + + col1 * + col1 AS col0 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT col0 * + 42 + + col0 FROM tab0 AS cor0
----
1032
1505
3827

query I rowsort
SELECT + col1 + 83 FROM tab2 cor0
----
100
114
142

query I rowsort
SELECT DISTINCT + tab2.col2 * - tab2.col0 * + col2 AS col1 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT - cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-7
-78
-79

query I rowsort
SELECT ALL col1 * ( - col2 ) * col0 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT - 84 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-84

query I rowsort
SELECT - - col1 * + col2 + + col0 * - col0 FROM tab2 AS cor0
----
-4550
-5595
788

query I rowsort
SELECT DISTINCT + + col0 + + col1 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - - cor0.col2 * - col1 + - col0 * 50 FROM tab0 AS cor0
----
-11912
-1847
-4038

query I rowsort
SELECT ALL col0 * - col0 * 86 AS col2 FROM tab2 AS cor0
----
-4214
-523224
-536726

onlyif mysql # use DIV operator for integer division
query I rowsort label-7092
SELECT + 23 + col2 DIV col2 FROM tab0 cor0
----
24
24
24

skipif mysql # not compatible
query I rowsort label-7092
SELECT + 23 + col2 / col2 FROM tab0 cor0
----
24
24
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-7093
SELECT ALL col1 DIV - tab0.col0 + col1 FROM tab0
----
83
90
95

skipif mysql # not compatible
query I rowsort label-7093
SELECT ALL col1 / - tab0.col0 + col1 FROM tab0
----
83
90
95

query I rowsort
SELECT - col0 * col2 + col0 AS col1 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT + 40 * col2 - + 56 AS col0 FROM tab2 AS cor0
----
1024
1464
984

query I rowsort
SELECT col0 + - col1 * cor0.col1 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT DISTINCT + 62 * + col2 + 51 AS col0 FROM tab0 AS cor0
----
113
2097
5135

query I rowsort
SELECT DISTINCT - col0 * + col0 + ( col0 ) AS col0 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT ALL + col1 + col0 * cor0.col0 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT + + col1 * col0 + + 50 FROM tab2 AS cor0
----
1393
267
4652

query I rowsort
SELECT ALL - col1 + + cor0.col1 AS col2 FROM tab1 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7102
SELECT + col2 + col1 * - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7102
SELECT + col2 + col1 * - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7103
SELECT + col1 * + col1 * CAST( + col0 AS SIGNED ) FROM tab2
----
22831
271518
6727

skipif mysql # not compatible
query I rowsort label-7103
SELECT + col1 * + col1 * CAST ( + col0 AS INTEGER ) FROM tab2
----
22831
271518
6727

query I rowsort
SELECT + 33 + cor0.col2 * + col0 + col2 AS col0 FROM tab1 AS cor0
----
249
3738
7809

onlyif mysql # use DIV operator for integer division
query I rowsort label-7105
SELECT - + 91 - + col0 DIV ( col0 ) AS col2 FROM tab1 AS cor0
----
-92
-92
-92

skipif mysql # not compatible
query I rowsort label-7105
SELECT - + 91 - + col0 / ( col0 ) AS col2 FROM tab1 AS cor0
----
-92
-92
-92

query I rowsort
SELECT + - 32 + 86 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT 65 + + cor0.col2 AS col2 FROM tab1 cor0
----
119
122
161

query I rowsort
SELECT ALL + ( + col1 ) * 42 + + 53 FROM tab2 AS cor0
----
1355
2531
767

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 95 * - col0 col2 FROM tab2 cor0
----
665
7410
7505

query I rowsort
SELECT DISTINCT col2 * - col0 + + 29 * + col1 + + 11 FROM tab1 AS cor0
----
-3347
-7292
603

query I rowsort
SELECT + cor0.col2 + - 34 AS col2 FROM tab2 AS cor0
----
-7
-8
4

query I rowsort
SELECT DISTINCT - col2 + + cor0.col2 + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + col0 - - ( + 12 ) FROM tab2 AS cor0
----
19
90
91

query I rowsort
SELECT - - cor0.col0 * + 39 AS col1 FROM tab2 AS cor0
----
273
3042
3081

query I rowsort
SELECT col1 * - 67 FROM tab2
----
-1139
-2077
-3953

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 79 + tab2.col0 col0 FROM tab2, tab1 AS cor0
----
9 values hashing to b729ca2055453125f9340c954ea7ec3c

query I rowsort
SELECT ( + col1 ) * col0 + col0 FROM tab2
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7118
SELECT - ( tab1.col2 ) DIV col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-7118
SELECT - ( tab1.col2 ) / col1 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT DISTINCT + + 62 + + col1 FROM tab0 AS cor0
----
148
153
159

onlyif mysql # use DIV operator for integer division
query I rowsort label-7120
SELECT + 60 * - col1 DIV col1 FROM tab0 cor0
----
-60
-60
-60

skipif mysql # not compatible
query I rowsort label-7120
SELECT + 60 * - col1 / col1 FROM tab0 cor0
----
-60
-60
-60

query I rowsort
SELECT ALL ( - 51 ) AS col2 FROM tab1 AS cor0
----
-51
-51
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-7122
SELECT cor0.col0 DIV - col1 AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7122
SELECT cor0.col0 / - col1 AS col2 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7123
SELECT DISTINCT + ( + 95 ) DIV - col0 AS col2 FROM tab1 AS cor0
----
-1
-31

skipif mysql # not compatible
query I rowsort label-7123
SELECT DISTINCT + ( + 95 ) / - col0 AS col2 FROM tab1 AS cor0
----
-1
-31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7124
SELECT - - ( cor0.col0 ) + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7124
SELECT - - ( cor0.col0 ) + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7125
SELECT + 99 DIV + cor0.col1 + + col2 * col0 FROM tab0 cor0
----
36
7299
793

skipif mysql # not compatible
query I rowsort label-7125
SELECT + 99 / + cor0.col1 + + col2 * col0 FROM tab0 cor0
----
36
7299
793

query I rowsort
SELECT ALL + + col1 + cor0.col0 + col1 FROM tab1 AS cor0
----
106
55
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7127
SELECT + 40 * col0 - - CAST( - col2 AS SIGNED ) FROM tab1 cor0
----
2503
3104
66

skipif mysql # not compatible
query I rowsort label-7127
SELECT + 40 * col0 - - CAST ( - col2 AS INTEGER ) FROM tab1 cor0
----
2503
3104
66

query I rowsort
SELECT DISTINCT + col0 - col2 AS col1 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-7129
SELECT - col2 DIV + col0 + - 80 AS col1 FROM tab1 AS cor0
----
-80
-81
-98

skipif mysql # not compatible
query I rowsort label-7129
SELECT - col2 / + col0 + - 80 AS col1 FROM tab1 AS cor0
----
-80
-81
-98

query I rowsort
SELECT ALL - - 15 FROM tab0 AS cor0
----
15
15
15

query I rowsort
SELECT + 30 + col2 FROM tab0 cor0
----
112
31
63

query I rowsort
SELECT DISTINCT ( + 38 * + col1 ) + - 96 AS col0 FROM tab0
----
3172
3362
3590

query I rowsort
SELECT DISTINCT col2 + 97 + - col2 FROM tab2
----
97

query I rowsort
SELECT ALL - 35 + - col1 FROM tab1
----
-45
-48
-61

query I rowsort
SELECT DISTINCT - 27 FROM tab1, tab0 AS cor0
----
-27

query I rowsort
SELECT + cor1.col2 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col0 col2 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT + col2 * + 2 + + cor0.col2 FROM tab1 AS cor0
----
162
171
288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7139
SELECT ALL ( - 54 ) * + col2 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7139
SELECT ALL ( - 54 ) * + col2 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( 67 AS REAL ) + col1 AS col2 FROM tab2 AS cor0
----
-36
-50
-8

query I rowsort
SELECT DISTINCT + cor1.col0 + - cor0.col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ca8ec3f73e2033fdfd432059c411d9ca

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col2 + + col1 col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL - + ( cor0.col1 ) * col0 * + col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 98 col2 FROM tab1
----
98

query I rowsort
SELECT - 59 FROM tab2, tab2 cor0
----
9 values hashing to 1e6537c922fa953e0fd2f59430803703

query I rowsort
SELECT - 78 * + col0 AS col2 FROM tab1
----
-234
-4992
-6240

query I rowsort
SELECT 90 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT ALL - col2 + + col2 * - 19 AS col0 FROM tab0 AS cor0
----
-1640
-20
-660

query I rowsort
SELECT - 44 + + col2 * + col1 * + col0 AS col0 FROM tab2 AS cor0
----
119608
50990
5815

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 16 - tab1.col2 col2 FROM tab1
----
-38
-41
-80

query I rowsort
SELECT ALL - 38 + - col2 AS col2 FROM tab0
----
-120
-39
-71

query I rowsort
SELECT - 18 + col1 * + tab0.col0 FROM tab0
----
2046
3377
8081

onlyif mysql # use DIV operator for integer division
query I rowsort label-7153
SELECT - col0 * 88 + col1 DIV - col1 FROM tab2 AS cor0
----
-617
-6865
-6953

skipif mysql # not compatible
query I rowsort label-7153
SELECT - col0 * 88 + col1 / - col1 FROM tab2 AS cor0
----
-617
-6865
-6953

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7154
SELECT col1 * CAST( + col2 AS SIGNED ) + + col2 FROM tab0 AS cor0
----
2871
7544
98

skipif mysql # not compatible
query I rowsort label-7154
SELECT col1 * CAST ( + col2 AS INTEGER ) + + col2 FROM tab0 AS cor0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 62 col2 FROM tab1
----
62

query I rowsort
SELECT DISTINCT + 96 + - col0 AS col2 FROM tab2 cor0
----
17
18
89

query I rowsort
SELECT DISTINCT col2 - - ( - 9 + tab2.col1 ) AS col0 FROM tab2
----
46
49
76

query I rowsort
SELECT + col2 - 89 FROM tab1 AS cor0
----
-32
-35
7

query I rowsort
SELECT + + col2 * + 27 + + 88 FROM tab2 cor0
----
1114
790
817

query I rowsort
SELECT + cor0.col2 * 26 + + col2 AS col0 FROM tab0 AS cor0
----
2214
27
891

query I rowsort
SELECT - col0 + - 51 FROM tab1 AS cor0
----
-115
-131
-54

query I rowsort
SELECT - - col1 * ( - col1 ) + + col1 AS col2 FROM tab0 AS cor0
----
-7310
-8190
-9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7163
SELECT col0 * - CAST( 93 + col0 AS SIGNED ) AS col2 FROM tab1
----
-10048
-13840
-288

skipif mysql # not compatible
query I rowsort label-7163
SELECT col0 * - CAST ( 93 + col0 AS INTEGER ) AS col2 FROM tab1
----
-10048
-13840
-288

query I rowsort
SELECT - col0 - - 59 FROM tab1
----
-21
-5
56

query I rowsort
SELECT DISTINCT col1 - + 39 FROM tab2
----
-22
-8
20

query I rowsort
SELECT DISTINCT - 4 AS col2 FROM tab0, tab1 cor0
----
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-7167
SELECT DISTINCT 58 * 14 DIV col2 + 58 * col2 FROM tab1 AS cor0
----
3147
3320
5576

skipif mysql # not compatible
query I rowsort label-7167
SELECT DISTINCT 58 * 14 / col2 + 58 * col2 FROM tab1 AS cor0
----
3147
3320
5576

query I rowsort
SELECT + ( 8 ) FROM tab2 AS cor0
----
8
8
8

query I rowsort
SELECT ALL - col2 * - 15 + + col1 FROM tab2 AS cor0
----
436
449
587

query I rowsort
SELECT col2 + col1 * col2 AS col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL 84 + col2 * + col2 AS col0 FROM tab2 AS cor0
----
1528
760
813

onlyif mysql # use DIV operator for integer division
query I rowsort label-7172
SELECT DISTINCT - 26 DIV - 15 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-7172
SELECT DISTINCT - 26 / - 15 FROM tab0 AS cor0
----
1

query I rowsort
SELECT - + 77 * col2 AS col2 FROM tab2 cor0
----
-2002
-2079
-2926

query I rowsort
SELECT DISTINCT + + col1 - col1 AS col1 FROM tab2 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + col0 - col2 col2 FROM tab1 AS cor0
----
-105
-112
-50

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7177
SELECT - CAST( col2 AS SIGNED ) + col0 AS col0 FROM tab2 AS cor0
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-7177
SELECT - CAST ( col2 AS INTEGER ) + col0 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT 89 * cor0.col0 AS col1 FROM tab1 cor0
----
267
5696
7120

query I rowsort
SELECT + cor0.col0 + col1 * col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL + + 53 * + 47 AS col2 FROM tab1 AS cor0
----
2491
2491
2491

query I rowsort
SELECT cor0.col2 * col1 - col1 AS col2 FROM tab2 AS cor0
----
1475
629
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-7182
SELECT + CAST( + col2 AS SIGNED ) DIV col0 + ( - 88 ) FROM tab1 AS cor0
----
-70
-87
-88

skipif mysql # not compatible
query I rowsort label-7182
SELECT + CAST ( + col2 AS INTEGER ) / col0 + ( - 88 ) FROM tab1 AS cor0
----
-70
-87
-88

query I rowsort
SELECT DISTINCT col1 * - 72 + - col1 AS col2 FROM tab2 AS cor0
----
-1241
-2263
-4307

query I rowsort
SELECT - - 38 * - 0 - col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + - cor0.col1 * + col0 + + col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL - 22 * - col0 + - col1 * + col0 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-168
-39552
-81440

query I rowsort
SELECT - 93 * - 5 AS col0 FROM tab2 cor0
----
465
465
465

onlyif mysql # use DIV operator for integer division
query I rowsort label-7188
SELECT ALL + 44 + - cor0.col1 DIV + col0 FROM tab2 AS cor0
----
40
44
44

skipif mysql # not compatible
query I rowsort label-7188
SELECT ALL + 44 + - cor0.col1 / + col0 FROM tab2 AS cor0
----
40
44
44

query I rowsort
SELECT - 44 - col2 AS col0 FROM tab1 AS cor0
----
-101
-140
-98

query I rowsort
SELECT + col2 * - col0 AS col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT + col1 * cor0.col0 * - 75 AS col1 FROM tab1 AS cor0
----
-48000
-5850
-78000

query I rowsort
SELECT + ( + col0 ) + 40 FROM tab0 AS cor0
----
129
64
75

query I rowsort
SELECT ALL + 39 * - col0 + - col0 * col2 AS col2 FROM tab1 AS cor0
----
-10800
-279
-6144

query I rowsort
SELECT - - 2 + + cor0.col2 FROM tab0 cor0
----
3
35
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-7195
SELECT ALL + 52 DIV col0 AS col0 FROM tab2 AS cor0
----
0
0
7

skipif mysql # not compatible
query I rowsort label-7195
SELECT ALL + 52 / col0 AS col0 FROM tab2 AS cor0
----
0
0
7

query I rowsort
SELECT ALL - col0 + - col1 * + col0 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT DISTINCT + - col2 * + col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7198
SELECT ALL + + col2 + + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7198
SELECT ALL + + col2 + + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 * col1 + - 15 * - col0 * col1 AS col0 FROM tab1 AS cor0
----
15431
494
9500

query I rowsort
SELECT ALL + ( 85 ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7201
SELECT - col1 DIV col1 - 7 FROM tab1
----
-8
-8
-8

skipif mysql # not compatible
query I rowsort label-7201
SELECT - col1 / col1 - 7 FROM tab1
----
-8
-8
-8

query I rowsort
SELECT - 50 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to c7432a968c8352c12996dfa54dd4b9e8

query I rowsort
SELECT ALL cor0.col2 * cor0.col1 + + col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + col0 + + col1 + - col2 AS col2 FROM tab0 AS cor0
----
131
77
98

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NULL ) BETWEEN - col0 AND NULL
----

query I rowsort
SELECT ALL + cor0.col0 + - col1 + col0 FROM tab0 AS cor0
----
-27
-38
87

query I rowsort
SELECT + - col2 * + col0 + + col0 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT col0 * col2 + cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
132
14760
3630

query I rowsort
SELECT - col0 + col1 + - col2 AS col2 FROM tab0 AS cor0
----
-80
29
61

query I rowsort
SELECT ALL col0 + - col0 * - col0 AS col2 FROM tab1 cor0
----
12
4160
6480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col0 col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL col2 * col1 + + col2 / col2 AS col1 FROM tab2 AS cor0 WHERE ( col2 ) IN ( cor0.col1 )
----

query I rowsort
SELECT ALL + col2 - - col1 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + col1 * + col0 AS col1 FROM tab2 cor0 WHERE cor0.col2 * + col0 < NULL
----

query I rowsort
SELECT col1 * col0 - tab1.col0 AS col2 FROM tab1
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-7216
SELECT + col0 + col2 DIV - col0 FROM tab0
----
23
35
89

skipif mysql # not compatible
query I rowsort label-7216
SELECT + col0 + col2 / - col0 FROM tab0
----
23
35
89

query I rowsort
SELECT col1 AS col1 FROM tab0 WHERE NOT NULL IN ( col2 )
----

query I rowsort
SELECT ALL tab1.col1 + - tab1.col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT ALL col2 + + col0 + col1 * - col1 AS col0 FROM tab0 AS cor0
----
-7339
-8110
-9373

query I rowsort
SELECT + col1 * + col2 + col1 * + col1 AS col2 FROM tab0 AS cor0
----
10234
15743
9506

query I rowsort
SELECT cor0.col1 * + col1 + - col0 * + col1 + - col0 * col1 AS col2 FROM tab2 AS cor0
----
-2397
-5723
527

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col2 col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT col1 + + col0 + tab2.col2 AS col2 FROM tab2
----
134
163
65

query I rowsort
SELECT col2 + col1 - col0 FROM tab2
----
-24
51
7

query I rowsort
SELECT - col1 * + col2 - col0 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT DISTINCT + + col1 + + col1 + - cor0.col1 * - col1 * col1 FROM tab2 AS cor0
----
205497
29853
4947

onlyif mysql # use DIV operator for integer division
query I rowsort label-7227
SELECT DISTINCT col0 * col2 DIV col1 + col0 * - col1 FROM tab2
----
-1167
-211
-4568

skipif mysql # not compatible
query I rowsort label-7227
SELECT DISTINCT col0 * col2 / col1 + col0 * - col1 FROM tab2
----
-1167
-211
-4568

query I rowsort
SELECT + tab2.col0 + tab2.col1 * + col2 * - col1 - col2 * - col2 FROM tab2
----
-25211
-89752
-9459

query I rowsort
SELECT - col0 * col0 + col1 AS col2 FROM tab1
----
-4086
-6387
17

query I rowsort
SELECT - col1 * col1 * col1 FROM tab2
----
-205379
-29791
-4913

query I rowsort
SELECT col0 + + col2 + - col1 AS col0 FROM tab1
----
111
163
31

query I rowsort
SELECT DISTINCT + tab2.col1 + tab2.col0 + + col0 FROM tab2
----
175
215
45

query I rowsort
SELECT ALL - col0 + col0 + col0 AS col0 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL tab2.col0 + tab2.col1 * col2 * col1 FROM tab2
----
11061
25954
90584

query I rowsort
SELECT ALL col0 + tab2.col1 AS col1 FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7236
SELECT DISTINCT col1 DIV col1 + + col0 DIV col2 AS col2 FROM tab1
----
1
2

skipif mysql # not compatible
query I rowsort label-7236
SELECT DISTINCT col1 / col1 + + col0 / col2 AS col2 FROM tab1
----
1
2

query I rowsort
SELECT DISTINCT col2 * col1 * col2 + col2 AS col0 FROM tab1
----
119904
32547
75870

query I rowsort
SELECT + + 66 * - cor0.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 6e79ae544e0c71adfc130f8679335693

query I rowsort
SELECT - col2 + + tab2.col2 + col0 AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT col1 + col1 + + col1 * col2 AS col1 FROM tab0
----
291
3010
7644

query I rowsort
SELECT + + ( cor0.col2 ) * - col2 + - 73 FROM tab1 cor0
----
-2989
-3322
-9289

query I rowsort
SELECT + + cor0.col2 + + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - + ( - 96 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query I rowsort
SELECT DISTINCT col1 * + tab1.col0 * + col2 + col0 * + col2 FROM tab1
----
107520
40128
4374

query I rowsort
SELECT ALL + col2 + + col0 * + col1 FROM tab2
----
1381
244
4628

query I rowsort
SELECT ALL + col1 * col1 * col1 AS col1 FROM tab0
----
636056
753571
912673

query I rowsort
SELECT ALL - col0 + col1 * - col2 + + col1 FROM tab1
----
-1315
-1381
-624

query I rowsort
SELECT col2 - + col1 * col2 FROM tab2 WHERE NULL NOT IN ( col0 * + col1 )
----

query I rowsort
SELECT + tab1.col0 * col1 - col1 AS col2 FROM tab1
----
1027
52
630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7250
SELECT DISTINCT + ( - cor0.col1 ) / + CAST( NULL AS SIGNED ) + + col2 * + col1 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7250
SELECT DISTINCT + ( - cor0.col1 ) / + CAST ( NULL AS INTEGER ) + + col2 * + col1 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col1 * col2 + col0 * cor0.col1 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT - col0 + + col1 * ( - col0 ) FROM tab1 AS cor0
----
-1120
-704
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col2 ) * cor0.col0 + 30 col0 FROM tab1 AS cor0
----
192
3678
7710

query I rowsort
SELECT col1 AS col0 FROM tab1 WHERE NOT - col2 * + col0 NOT IN ( - col1 )
----

query I rowsort
SELECT col0 + col1 * tab2.col0 FROM tab2
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7256
SELECT DISTINCT + col0 + col2 DIV - col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7256
SELECT DISTINCT + col0 + col2 / - col1 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7257
SELECT col0 DIV col0 col2 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7257
SELECT col0 / col0 col2 FROM tab1
----
1
1
1

query I rowsort
SELECT ALL + col0 * + col1 + + tab0.col1 AS col0 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT ALL - col2 FROM tab1 WHERE NOT NULL BETWEEN + col0 AND ( - col2 )
----

query I rowsort
SELECT DISTINCT - col0 * col2 + col0 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT - cor0.col1 + - col1 * col0 * - col1 FROM tab0 AS cor0
----
177418
329218
736918

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 WHERE col0 + col2 / - col1 NOT BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - tab0.col0 col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT DISTINCT col2 + - col1 * - col2 FROM tab2
----
1560
684
864

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( - col2 ) < col2 + col2 + + col1
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 + + col2 * + col2 col1 FROM tab0
----
-96
1003
6633

onlyif mysql # use DIV operator for integer division
query I rowsort label-7267
SELECT ALL col1 DIV + col0 + - col0 AS col2 FROM tab1
----
-64
-80
5

skipif mysql # not compatible
query I rowsort label-7267
SELECT ALL col1 / + col0 + - col0 AS col2 FROM tab1
----
-64
-80
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-7268
SELECT - tab1.col0 DIV col2 + - col1 FROM tab1
----
-11
-13
-26

skipif mysql # not compatible
query I rowsort label-7268
SELECT - tab1.col0 / col2 + - col1 FROM tab1
----
-11
-13
-26

query I rowsort
SELECT col2 / col2 FROM tab2 WHERE NOT NULL = col0 * - col2 / + col1
----

query I rowsort
SELECT DISTINCT tab0.col2 FROM tab0 WHERE + col1 NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT * FROM tab0 WHERE NOT col2 IN ( + col0 / tab0.col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL col2 + + col0 * col0 * col2 AS col0 FROM tab1
----
233529
540
614496

query I rowsort
SELECT tab0.col0 + col1 * col2 * + col1 + col1 FROM tab0
----
244178
679222
9541

query I rowsort
SELECT - tab1.col2 + + col1 + col0 AS col1 FROM tab1
----
-25
-3
17

query I rowsort
SELECT DISTINCT col0 * + tab1.col2 + + col0 FROM tab1
----
165
3712
7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7276
SELECT + col0 + - col2 + CAST( - cor0.col1 AS SIGNED ) col2 FROM tab1 AS cor0
----
-29
-3
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7276
SELECT + col0 + - col2 + CAST ( - cor0.col1 AS INTEGER ) col2 FROM tab1 AS cor0
----
-29
-3
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-7277
SELECT + col1 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-7277
SELECT + col1 / cor0.col2 AS col1 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT 22 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 0 + + col2 - + col2 * - col1 col1 FROM tab2
----
1560
684
864

query I rowsort
SELECT - col1 * col0 * ( 66 ) FROM tab0 AS cor0
----
-136224
-224070
-534534

onlyif mysql # use DIV operator for integer division
query I rowsort label-7281
SELECT tab0.col2 DIV - col0 - 6 AS col2 FROM tab0
----
-6
-6
-7

skipif mysql # not compatible
query I rowsort label-7281
SELECT tab0.col2 / - col0 - 6 AS col2 FROM tab0
----
-6
-6
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col1 ) + - col1 col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT ALL + col2 * 23 FROM tab0 AS cor0
----
1886
23
759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7284
SELECT - - col0 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7284
SELECT - - col0 + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 + + ( + col0 ) * + col1 AS col2 FROM tab1 cor0
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-7286
SELECT DISTINCT - cor0.col1 + col1 * 99 DIV + col2 AS col1 FROM tab1 AS cor0
----
0
21
7

skipif mysql # not compatible
query I rowsort label-7286
SELECT DISTINCT - cor0.col1 + col1 * 99 / + col2 AS col1 FROM tab1 AS cor0
----
0
21
7

query I rowsort
SELECT + col2 * + 4 AS col0 FROM tab1 cor0
----
216
228
384

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 * + cor0.col0 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 3bf51d387ba44128cb3ec1426ea3afc8

query I rowsort
SELECT DISTINCT 99 * + col2 FROM tab2
----
2574
2673
3762

query I rowsort
SELECT + 34 + - ( cor0.col1 ) FROM tab2 AS cor0
----
-25
17
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-7291
SELECT - - CAST( + 22 AS SIGNED ) DIV + cor0.col2 AS col0 FROM tab0 AS cor0
----
0
0
22

skipif mysql # not compatible
query I rowsort label-7291
SELECT - - CAST ( + 22 AS INTEGER ) / + cor0.col2 AS col0 FROM tab0 AS cor0
----
0
0
22

query I rowsort
SELECT DISTINCT + col0 * + ( 22 ) FROM tab1
----
1408
1760
66

query I rowsort
SELECT DISTINCT 74 FROM tab1, tab0 AS cor0
----
74

query I rowsort
SELECT ALL 71 FROM tab2, tab0 cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7295
SELECT col2 DIV 27 FROM tab0 AS cor0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-7295
SELECT col2 / 27 FROM tab0 AS cor0
----
0
1
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7296
SELECT + CAST( NULL AS SIGNED ) / + 23 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7296
SELECT + CAST ( NULL AS INTEGER ) / + 23 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + cor0.col2 + - ( - col0 ) FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
-54
-57
-96

query I rowsort
SELECT ALL + 79 + - col2 AS col2 FROM tab0 AS cor0
----
-3
46
78

query I rowsort
SELECT col0 * + ( cor0.col2 ) FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + - col2 * - 41 AS col2 FROM tab0 AS cor0
----
1353
3362
41

query I rowsort
SELECT - 70 FROM tab2, tab2 AS cor0
----
9 values hashing to 35707a5d99c98b2657c084a50ff1b073

query I rowsort
SELECT DISTINCT + ( - tab0.col1 ) FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 28 col0 FROM tab2
----
-28
-28
-28

query I rowsort
SELECT ALL + col2 * - col2 * - col1 + col1 FROM tab0 AS cor0
----
194
611975
93740

onlyif mysql # use DIV operator for integer division
query I rowsort label-7306
SELECT ALL - col1 * col1 + col2 * col1 DIV - col2 FROM tab1 AS cor0
----
-110
-182
-702

skipif mysql # not compatible
query I rowsort label-7306
SELECT ALL - col1 * col1 + col2 * col1 / - col2 FROM tab1 AS cor0
----
-110
-182
-702

query I rowsort
SELECT DISTINCT 37 + col0 FROM tab1 AS cor0
----
101
117
40

query I rowsort
SELECT ALL col2 + col1 AS col1 FROM tab2 cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) * - col2 col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT + 31 + - col0 AS col2 FROM tab1
----
-33
-49
28

query I rowsort
SELECT ALL cor0.col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL + col2 * + cor0.col0 * col1 + + col2 AS col1 FROM tab2 AS cor0
----
119678
51072
5886

query I rowsort
SELECT ALL col2 + + cor0.col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - 21 + + col1 * col1 FROM tab0 AS cor0
----
7375
8260
9388

query I rowsort
SELECT ALL + 22 * - col0 FROM tab1 AS cor0
----
-1408
-1760
-66

query I rowsort
SELECT DISTINCT - col2 * + col2 + col0 AS col0 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT - + 15 * col2 FROM tab0 AS cor0
----
-1230
-15
-495

query I rowsort
SELECT ALL + col0 * col2 * col0 - - cor0.col1 FROM tab1 cor0
----
233482
512
614413

query I rowsort
SELECT + col0 + 69 AS col1 FROM tab1 cor0
----
133
149
72

query I rowsort
SELECT + col2 * col1 * col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT + - ( col1 ) * col1 + + cor0.col0 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT DISTINCT + 25 * + col1 AS col0 FROM tab1 AS cor0
----
250
325
650

query I rowsort
SELECT 33 + - 5 * col1 AS col2 FROM tab0 AS cor0
----
-397
-422
-452

query I rowsort
SELECT - 93 + + cor0.col0 FROM tab2 AS cor0
----
-14
-15
-86

query I rowsort
SELECT cor0.col1 + col2 * col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT col2 * 8 + - col1 * - col1 + col1 AS col0 FROM tab1
----
1134
566
950

query I rowsort
SELECT DISTINCT + col1 + - 31 FROM tab1
----
-18
-21
-5

query I rowsort
SELECT DISTINCT 18 AS col1 FROM tab2, tab2 AS cor0
----
18

query I rowsort
SELECT - - ( col1 ) * - col2 + - col0 AS col2 FROM tab2 AS cor0
----
-1612
-725
-844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 * - col2 col2 FROM tab0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7331
SELECT - CAST( NULL AS SIGNED ) col0 FROM tab0, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7331
SELECT - CAST ( NULL AS INTEGER ) col0 FROM tab0, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - col2 * - 86 FROM tab2 AS cor0
----
2236
2322
3268

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 * - 44 + + ( + tab1.col1 ) col0 FROM tab1
----
-2350
-2498
-4211

query I rowsort
SELECT ALL + col1 + + ( col2 ) FROM tab2
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7335
SELECT ALL + col1 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7335
SELECT ALL + col1 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 31 col1 FROM tab2 AS cor0
----
-31
-31
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 29 + - ( + cor0.col2 ) col1 FROM tab0 cor0
----
-111
-30
-62

query I rowsort
SELECT DISTINCT - - col0 * 13 * col1 AS col1 FROM tab1 AS cor0
----
1014
13520
8320

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab2, tab2 cor0, tab2 AS cor1
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7340
SELECT ALL + CAST( NULL AS SIGNED ) * - 0 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7340
SELECT ALL + CAST ( NULL AS INTEGER ) * - 0 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( + 0 ) AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 * col2 * + col0 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT ALL col2 * + 86 + + col1 AS col0 FROM tab2 AS cor0
----
2295
2353
3285

query I rowsort
SELECT DISTINCT 30 * col1 FROM tab0 AS cor0
----
2580
2730
2910

query I rowsort
SELECT ( - ( cor0.col0 ) ) + + 84 FROM tab1 cor0
----
20
4
81

query I rowsort
SELECT ALL + 40 AS col1 FROM tab0 cor0
----
40
40
40

query I rowsort
SELECT ALL 41 + 31 FROM tab2 AS cor0
----
72
72
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-7348
SELECT ALL 29 DIV 72 - col1 * + 21 AS col0 FROM tab0 AS cor0
----
-1806
-1911
-2037

skipif mysql # not compatible
query I rowsort label-7348
SELECT ALL 29 / 72 - col1 * + 21 AS col0 FROM tab0 AS cor0
----
-1806
-1911
-2037

query I rowsort
SELECT - 59 * + col1 + col0 FROM tab1 AS cor0
----
-1531
-526
-687

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 * - col1 * col2 col0 FROM tab2 AS cor0
----
-25194
-32643
-59826

onlyif mysql # use DIV operator for integer division
query I rowsort label-7351
SELECT col0 * col0 DIV col0 + col0 AS col0 FROM tab0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-7351
SELECT col0 * col0 / col0 + col0 AS col0 FROM tab0
----
178
48
70

query I rowsort
SELECT DISTINCT - col1 * + col2 + + col1 AS col0 FROM tab1 cor0
----
-1235
-1378
-560

query I rowsort
SELECT - - col0 * cor0.col0 * 9 FROM tab2 AS cor0
----
441
54756
56169

query I rowsort
SELECT + col2 + + col2 * col1 AS col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL - - 57 AS col0 FROM tab0 AS cor0
----
57
57
57

query I rowsort
SELECT - 35 + col1 * - col2 AS col0 FROM tab2 cor0
----
-1569
-681
-872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 8 col1 FROM tab2 AS cor0
----
-8
-8
-8

query I rowsort
SELECT DISTINCT + cor0.col2 + - 83 FROM tab0 cor0
----
-1
-50
-82

query I rowsort
SELECT + col0 * 84 + col2 * col0 FROM tab2 cor0
----
777
8580
9638

query I rowsort
SELECT col1 + cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-7361
SELECT col1 * col2 + col2 DIV - col0 AS col2 FROM tab0 AS cor0
----
2837
7462
97

skipif mysql # not compatible
query I rowsort label-7361
SELECT col1 * col2 + col2 / - col0 AS col2 FROM tab0 AS cor0
----
2837
7462
97

query I rowsort
SELECT col0 * 84 + col1 AS col0 FROM tab0 AS cor0
----
2102
3037
7567

onlyif mysql # use DIV operator for integer division
query I rowsort label-7363
SELECT + col0 + - col0 DIV col0 AS col0 FROM tab2
----
6
77
78

skipif mysql # not compatible
query I rowsort label-7363
SELECT + col0 + - col0 / col0 AS col0 FROM tab2
----
6
77
78

query I rowsort
SELECT ALL + - col2 + - ( - 55 ) + cor0.col0 FROM tab0 AS cor0
----
46
62
89

query I rowsort
SELECT DISTINCT + 65 FROM tab0, tab2 cor0
----
65

query I rowsort
SELECT 55 * + tab2.col2 + - 51 AS col0 FROM tab2
----
1379
1434
2039

query I rowsort
SELECT col0 * 16 FROM tab2 cor0
----
112
1248
1264

query I rowsort
SELECT ALL - 33 + cor0.col0 AS col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 7dc119560fbb3202b084702ebece4857

onlyif mysql # use DIV operator for integer division
query I rowsort label-7369
SELECT - cor0.col1 + - 69 DIV col2 FROM tab1 AS cor0
----
-11
-13
-27

skipif mysql # not compatible
query I rowsort label-7369
SELECT - cor0.col1 + - 69 / col2 FROM tab1 AS cor0
----
-11
-13
-27

query I rowsort
SELECT - col1 * + col2 + + col1 AS col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT + - col1 * col2 + - col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT col0 - + cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT DISTINCT - ( 5 ) FROM tab0, tab1 cor0
----
-5

query I rowsort
SELECT DISTINCT + col0 * + col0 * cor0.col1 AS col0 FROM tab1 cor0
----
234
40960
83200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 90 * cor0.col2 col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 2c0160c3e3227c387c2a25fc7d9ada75

query I rowsort
SELECT - 16 + col0 * - tab0.col0 AS col1 FROM tab0
----
-1241
-592
-7937

query I rowsort
SELECT DISTINCT + + col0 * cor0.col0 + cor0.col2 * + 55 AS col0 FROM tab2 cor0
----
1534
7514
8331

query I rowsort
SELECT ALL + - 93 + - col2 FROM tab1 AS cor0
----
-147
-150
-189

onlyif mysql # use DIV operator for integer division
query I rowsort label-7379
SELECT DISTINCT - col0 * + tab2.col1 DIV col1 FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-7379
SELECT DISTINCT - col0 * + tab2.col1 / col1 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT - 10 AS col0 FROM tab1, tab0 AS cor0 CROSS JOIN tab2 cor1
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT cor0.col1 * 3 FROM tab1 AS cor0
----
30
39
78

query I rowsort
SELECT + 14 * - col0 AS col0 FROM tab2 AS cor0
----
-1092
-1106
-98

query I rowsort
SELECT 99 * + col1 AS col0 FROM tab2 AS cor0
----
1683
3069
5841

query I rowsort
SELECT - tab2.col2 - col0 AS col2 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT col1 * - col2 - - 38 AS col0 FROM tab0 cor0
----
-2800
-59
-7424

query I rowsort
SELECT col1 + tab0.col0 * + col2 AS col2 FROM tab0
----
132
7389
878

query I rowsort
SELECT - col2 * - cor0.col2 * 16 FROM tab0 AS cor0
----
107584
16
17424

query I rowsort
SELECT DISTINCT - col1 * cor0.col1 FROM tab0 cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7389
SELECT cor0.col2 DIV + CAST( cor0.col2 AS SIGNED ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-7389
SELECT cor0.col2 / + CAST ( cor0.col2 AS INTEGER ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT DISTINCT - - cor0.col0 + - col2 AS col1 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT + col0 + col0 * + cor0.col1 AS col1 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT - cor0.col2 * col2 + 70 FROM tab2 AS cor0
----
-1374
-606
-659

query I rowsort
SELECT - col2 * ( tab2.col1 ) * + tab2.col2 AS col0 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT + - col0 * + ( + col0 ) + col2 AS col0 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT - col0 * - 28 AS col0 FROM tab2 AS cor0
----
196
2184
2212

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 19 col0 FROM tab2 AS cor0
----
19
19
19

query I rowsort
SELECT DISTINCT + col2 + 69 AS col1 FROM tab2 AS cor0
----
107
95
96

query I rowsort
SELECT DISTINCT + + 87 AS col1 FROM tab1 AS cor0
----
87

query I rowsort
SELECT ALL - + ( 2 ) FROM tab0 cor0
----
-2
-2
-2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7400
SELECT - CAST( NULL AS SIGNED ) + 16 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7400
SELECT - CAST ( NULL AS INTEGER ) + 16 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab1.col1 * + col0 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7403
SELECT - CAST( NULL AS SIGNED ) + + 48 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7403
SELECT - CAST ( NULL AS INTEGER ) + + 48 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( - 46 ) + + col2 AS col0 FROM tab1 AS cor0
----
11
50
8

query I rowsort
SELECT DISTINCT - 65 + + col2 * col2 FROM tab0 AS cor0
----
-64
1024
6659

query I rowsort
SELECT ALL + 15 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT ALL - 86 AS col0 FROM tab1 cor0
----
-86
-86
-86

query I rowsort
SELECT DISTINCT ( + 9 ) * col0 * - 25 FROM tab1 AS cor0
----
-14400
-18000
-675

query I rowsort
SELECT ALL ( col2 ) * col1 + ( - ( col0 ) ) FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ALL + - 77 * - col2 FROM tab1 AS cor0
----
4158
4389
7392

query I rowsort
SELECT + 17 - col2 FROM tab2
----
-10
-21
-9

query I rowsort
SELECT DISTINCT - ( - col0 + + col2 ) FROM tab2
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-7413
SELECT ALL + 7 DIV - col1 + col0 col2 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7413
SELECT ALL + 7 / - col1 + col0 col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - col0 + col2 * col0 + cor0.col1 FROM tab1 AS cor0
----
185
3594
7613

query I rowsort
SELECT ALL + + 81 * col1 FROM tab1 cor0
----
1053
2106
810

query I rowsort
SELECT ALL - 63 * + col2 AS col0 FROM tab2 AS cor0
----
-1638
-1701
-2394

query I rowsort
SELECT ALL - - 91 * + col1 FROM tab0 AS cor0
----
7826
8281
8827

query I rowsort
SELECT 16 + - col0 * + col1 FROM tab2 AS cor0
----
-1327
-201
-4586

query I rowsort
SELECT DISTINCT col2 + cor0.col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL + - col0 * col2 + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT - col2 + cor0.col0 + col2 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT col1 * 98 + - col2 AS col1 FROM tab1 AS cor0
----
1178
2494
923

query I rowsort
SELECT ALL - - col0 + - cor0.col2 * 43 + col2 FROM tab1 AS cor0
----
-2265
-2330
-3952

query I rowsort
SELECT ALL - - cor0.col2 * + col0 * - cor0.col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT + + col1 * + col2 + - col2 + + col0 AS col1 FROM tab0 cor0
----
131
2829
7469

query I rowsort
SELECT ALL + col2 * - ( ( + col2 ) ) AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT + col0 * + 39 FROM tab2 AS cor0
----
273
3042
3081

query I rowsort
SELECT col2 * - 73 FROM tab1 AS cor0
----
-3942
-4161
-7008

query I rowsort
SELECT - 19 * - 78 AS col1 FROM tab2, tab0 AS cor0, tab1 cor1
----
27 values hashing to 6ec91dc1c498aadaaa9f7ac107a311d5

query I rowsort
SELECT DISTINCT 72 - + col0 FROM tab0
----
-17
37
48

query I rowsort
SELECT + 28 AS col1 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7432
SELECT DISTINCT + col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7432
SELECT DISTINCT + col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7434
SELECT 50 DIV + col1 FROM tab1 AS cor0
----
1
3
5

skipif mysql # not compatible
query I rowsort label-7434
SELECT 50 / + col1 FROM tab1 AS cor0
----
1
3
5

query I rowsort
SELECT DISTINCT - col0 * col0 + 75 FROM tab0 AS cor0
----
-1150
-501
-7846

query I rowsort
SELECT DISTINCT + - col2 * cor0.col0 * 51 FROM tab0 AS cor0
----
-1785
-372198
-40392

query I rowsort
SELECT 80 + - col1 * + 15 FROM tab1 AS cor0
----
-115
-310
-70

query I rowsort
SELECT ALL col0 * - col0 + cor0.col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT DISTINCT + 36 FROM tab1, tab1 AS cor0
----
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col0 + - col1 col2 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT ALL - col0 + tab1.col0 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL col0 + - col2 * col2 AS col2 FROM tab0
----
-1065
-6635
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7443
SELECT + col1 + + col2 + - CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7443
SELECT + col1 + + col2 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 + - col0 * - col0 + col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL col0 * col2 - - col0 AS col1 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL + 71 + col2 AS col2 FROM tab0 cor0
----
104
153
72

query I rowsort
SELECT + + col1 * + col2 - col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT - 75 * col2 + col0 FROM tab0 AS cor0
----
-2451
-40
-6061

query I rowsort
SELECT ALL - - 29 + + col0 AS col0 FROM tab0 AS cor0
----
118
53
64

query I rowsort
SELECT col0 + col1 * + ( - 68 ) AS col2 FROM tab2 AS cor0
----
-1077
-2101
-3934

query I rowsort
SELECT DISTINCT - ( col1 ) * + cor0.col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + - col2 * 75 + col1 + - col1 * 81 FROM tab1 AS cor0
----
-5075
-6130
-8240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * + cor0.col0 + - cor0.col1 - col1 col2 FROM tab0 AS cor0
----
-229
-7480
-964

query I rowsort
SELECT + 4 AS col0 FROM tab0 cor0
----
4
4
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-7455
SELECT DISTINCT col1 DIV 8 + + col1 FROM tab2 AS cor0
----
19
34
66

skipif mysql # not compatible
query I rowsort label-7455
SELECT DISTINCT col1 / 8 + + col1 FROM tab2 AS cor0
----
19
34
66

query I rowsort
SELECT ALL + 88 + - col0 * col1 AS col1 FROM tab2 AS cor0
----
-1255
-129
-4514

query I rowsort
SELECT DISTINCT col0 * + col2 + col2 + col2 FROM tab0 AS cor0
----
37
7462
858

query I rowsort
SELECT 82 + col0 AS col1 FROM tab2
----
160
161
89

query I rowsort
SELECT ALL + col0 + - 57 AS col1 FROM tab0 AS cor0
----
-22
-33
32

query I rowsort
SELECT DISTINCT - col2 + + col2 * + col1 FROM tab1 AS cor0
----
1152
1350
513

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7461
SELECT CAST( NULL AS DECIMAL ) + + 92 * col0 * 22 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7461
SELECT CAST ( NULL AS REAL ) + + 92 * col0 * 22 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( col2 ) * + cor0.col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + ( col2 ) + - col0 * 21 AS col1 FROM tab2 AS cor0
----
-120
-1612
-1621

query I rowsort
SELECT ALL - 30 - col2 * col2 FROM tab2 AS cor0
----
-1474
-706
-759

query I rowsort
SELECT ALL - - 31 * col1 AS col2 FROM tab0 AS cor0
----
2666
2821
3007

query I rowsort
SELECT DISTINCT 40 * 82 FROM tab2 AS cor0
----
3280

query I rowsort
SELECT - + 17 AS col0 FROM tab0 cor0
----
-17
-17
-17

query I rowsort
SELECT ALL + col2 * + 37 * col2 AS col0 FROM tab2 AS cor0
----
25012
26973
53428

query I rowsort
SELECT - 19 AS col2 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 0fbbff28a7b63c37b01cf369f9325662

query I rowsort
SELECT + col0 + col2 * col0 FROM tab2 AS cor0
----
196
2106
3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-7471
SELECT - col1 DIV col0 + col2 * col0 + - col1 * + 12 AS col0 FROM tab2 cor0
----
-187
1320
2798

skipif mysql # not compatible
query I rowsort label-7471
SELECT - col1 / col0 + col2 * col0 + - col1 * + 12 AS col0 FROM tab2 cor0
----
-187
1320
2798

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab2 cor1, tab2 cor2
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT DISTINCT col1 * 88 FROM tab1 AS cor0
----
1144
2288
880

query I rowsort
SELECT col0 * - 73 AS col0 FROM tab1
----
-219
-4672
-5840

query I rowsort
SELECT - col2 + + 64 * 34 FROM tab2 AS cor0
----
2138
2149
2150

query I rowsort
SELECT col0 + - 32 * - col2 + - col0 AS col0 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT + 29 + col1 FROM tab2 AS cor0
----
46
60
88

query I rowsort
SELECT + col1 + col1 * - cor0.col1 FROM tab1 cor0
----
-156
-650
-90

query I rowsort
SELECT - - tab0.col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * 68 col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 98a23bbd72a4904034c49a3cb1e03c89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7481
SELECT + col2 * - col0 DIV - cor0.col0 AS col1 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-7481
SELECT + col2 * - col0 / - cor0.col0 AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT col2 + 88 AS col2 FROM tab0 AS cor0
----
121
170
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7483
SELECT DISTINCT - cor0.col2 + - col2 + + col2 DIV + col0 FROM tab2 AS cor0
----
-51
-52
-76

skipif mysql # not compatible
query I rowsort label-7483
SELECT DISTINCT - cor0.col2 + - col2 + + col2 / + col0 FROM tab2 AS cor0
----
-51
-52
-76

query I rowsort
SELECT ALL - - cor0.col2 * ( - col0 ) AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7485
SELECT 34 / + ( + cor0.col1 * + CAST( NULL AS DECIMAL ) ) col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7485
SELECT 34 / + ( + cor0.col1 * + CAST ( NULL AS REAL ) ) col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7486
SELECT - col1 * tab2.col0 + + tab2.col1 DIV 78 FROM tab2
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-7486
SELECT - col1 * tab2.col0 + + tab2.col1 / 78 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL col1 * + 54 AS col1 FROM tab0
----
4644
4914
5238

onlyif mysql # use DIV operator for integer division
query I rowsort label-7488
SELECT DISTINCT - 17 DIV + cor1.col2 FROM tab1, tab2 AS cor0, tab1 cor1
----
0

skipif mysql # not compatible
query I rowsort label-7488
SELECT DISTINCT - 17 / + cor1.col2 FROM tab1, tab2 AS cor0, tab1 cor1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + col0 * col0 col0 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT DISTINCT + col0 * 51 FROM tab0
----
1224
1785
4539

query I rowsort
SELECT 69 * - col2 + - col1 AS col0 FROM tab1 AS cor0
----
-3752
-3943
-6637

query I rowsort
SELECT ( - cor0.col0 ) + 25 FROM tab2 cor0
----
-53
-54
18

query I rowsort
SELECT - 93 + col0 AS col0 FROM tab2 AS cor0
----
-14
-15
-86

query I rowsort
SELECT col1 + + cor0.col2 * - ( col1 ) AS col0 FROM tab2 AS cor0
----
-1475
-629
-806

onlyif mysql # use DIV operator for integer division
query I rowsort label-7495
SELECT col1 DIV + col1 + ( col2 ) * - col0 AS col0 FROM tab0 AS cor0
----
-34
-7297
-791

skipif mysql # not compatible
query I rowsort label-7495
SELECT col1 / + col1 + ( col2 ) * - col0 AS col0 FROM tab0 AS cor0
----
-34
-7297
-791

query I rowsort
SELECT DISTINCT - + 44 AS col2 FROM tab2, tab0, tab2 AS cor0
----
-44

query I rowsort
SELECT + - 71 + col0 * col1 * 8 FROM tab0 AS cor0
----
16441
27089
64721

query I rowsort
SELECT + col1 + col1 * col1 + - col2 AS col1 FROM tab1 AS cor0
----
53
648
86

query I rowsort
SELECT - 60 * col2 AS col1 FROM tab2 cor0
----
-1560
-1620
-2280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 82 + + col0 col0 FROM tab0
----
106
117
171

query I rowsort
SELECT + col1 + + cor0.col2 * 3 FROM tab0 AS cor0
----
100
185
337

query I rowsort
SELECT DISTINCT 27 * cor0.col2 AS col0 FROM tab0 cor0
----
2214
27
891

onlyif mysql # use DIV operator for integer division
query I rowsort label-7503
SELECT + col2 * col2 + - 82 * col0 + col0 DIV + cor0.col2 FROM tab1 AS cor0
----
-1998
2656
2670

skipif mysql # not compatible
query I rowsort label-7503
SELECT + col2 * col2 + - 82 * col0 + col0 / + cor0.col2 FROM tab1 AS cor0
----
-1998
2656
2670

query I rowsort
SELECT ALL - + col2 * - col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - cor0.col2 col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col2 * col1 + + cor0.col0 + col1 AS col0 FROM tab2 AS cor0
----
1671
742
875

query I rowsort
SELECT ALL - + col0 * ( + col1 ) + col1 * - col2 * - col1 FROM tab1 AS cor0
----
15184
36426
5060

query I rowsort
SELECT DISTINCT - - col2 - ( - 16 ) FROM tab0 AS cor0
----
17
49
98

query I rowsort
SELECT DISTINCT - cor0.col1 + 33 - - col2 FROM tab2 AS cor0
----
0
29
54

query I rowsort
SELECT DISTINCT 69 * + tab2.col0 + 29 FROM tab2
----
512
5411
5480

query I rowsort
SELECT DISTINCT ( col0 ) + + col2 FROM tab0
----
171
36
57

query I rowsort
SELECT - col1 * + col1 * - 56 AS col2 FROM tab1
----
37856
5600
9464

query I rowsort
SELECT ALL + 76 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 7b2b08dd3f1adef028d3f40ef7c716da

query I rowsort
SELECT DISTINCT 61 * col0 + ( col1 ) * col1 + - 67 * - 71 AS col2 FROM tab0
----
13617
16301
18467

query I rowsort
SELECT ALL 59 + col0 * + col1 AS col1 FROM tab2 AS cor0
----
1402
276
4661

query I rowsort
SELECT DISTINCT - ( - 41 ) * - col1 AS col0 FROM tab0 AS cor0
----
-3526
-3731
-3977

query I rowsort
SELECT ALL - ( + 29 ) + cor0.col1 AS col2 FROM tab2 AS cor0
----
-12
2
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 86 + col0 col2 FROM tab1 AS cor0
----
-22
-6
-83

query I rowsort
SELECT ALL - 9 * 84 + - col1 * 34 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
250708
280798
319150

query I rowsort
SELECT - + col1 * - cor0.col2 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + 94 + ( col1 ) * 20 * - 66 AS col1 FROM tab0 cor0
----
-113426
-120026
-127946

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) + - col0 * - col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT - ( - 2 ) + col1 AS col0 FROM tab0 AS cor0
----
88
93
99

query I rowsort
SELECT ALL - - ( 30 ) + + col0 * 67 AS col2 FROM tab0 cor0
----
1638
2375
5993

query I rowsort
SELECT DISTINCT + + 62 * + col1 FROM tab0 AS cor0
----
5332
5642
6014

query I rowsort
SELECT cor0.col1 * + cor0.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 815fccd4c3d372b28d3f3fb103025775

query I rowsort
SELECT 1 + - col1 AS col2 FROM tab1
----
-12
-25
-9

query I rowsort
SELECT + - ( cor0.col0 ) + col0 * 9 AS col1 FROM tab1 AS cor0
----
24
512
640

query I rowsort
SELECT ALL - col1 * col1 - + cor0.col0 * + col1 AS col0 FROM tab2 AS cor0
----
-1178
-1632
-8083

query I rowsort
SELECT ALL + + cor0.col0 * + col2 + + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT - col2 * + col1 * col1 FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT ALL col1 * col2 * - col2 AS col0 FROM tab0
----
-611884
-93654
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( cor0.col2 ) + col2 col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT 22 * + cor0.col1 + + col2 + - col0 AS col1 FROM tab2 AS cor0
----
1246
333
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 31 + + col0 col0 FROM tab0 AS cor0
----
120
55
66

query I rowsort
SELECT + col1 * + col2 + + cor0.col2 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-7537
SELECT ALL + col2 DIV col2 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7537
SELECT ALL + col2 / col2 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT col0 * tab1.col0 + - col0 FROM tab1
----
4032
6
6320

query I rowsort
SELECT + col2 + + col1 + col2 AS col0 FROM tab0
----
152
255
99

query I rowsort
SELECT DISTINCT col0 + - 0 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

onlyif mysql # use DIV operator for integer division
query I rowsort label-7542
SELECT - col2 * col0 DIV - col1 col2 FROM tab2
----
176
34
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7542
SELECT - col2 * col0 / - col1 col2 FROM tab2
----
176
34
6

query I rowsort
SELECT + ( cor0.col2 ) + col0 * cor0.col0 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT + col0 * cor0.col0 + col2 + - col2 * cor0.col1 * cor0.col1 FROM tab1 AS cor0
----
-1547
-36441
-9728

query I rowsort
SELECT DISTINCT - col0 + ( - col0 ) AS col0 FROM tab2
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-7546
SELECT DISTINCT + 68 DIV 29 + - col2 AS col0 FROM tab0
----
-31
-80
1

skipif mysql # not compatible
query I rowsort label-7546
SELECT DISTINCT + 68 / 29 + - col2 AS col0 FROM tab0
----
-31
-80
1

query I rowsort
SELECT ALL + + 75 + col0 FROM tab0 AS cor0
----
110
164
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col0 * col2 col0 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT ALL + col2 + - cor0.col2 * + col0 * col2 + col1 AS col1 FROM tab2 AS cor0
----
-114021
-5045
-52643

query I rowsort
SELECT - col1 * + col0 * col1 FROM tab1
----
-13520
-2028
-6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-7551
SELECT - col1 * col0 + - col0 - + col0 DIV + col0 FROM tab2
----
-1423
-225
-4681

skipif mysql # not compatible
query I rowsort label-7551
SELECT - col1 * col0 + - col0 - + col0 / + col0 FROM tab2
----
-1423
-225
-4681

query I rowsort
SELECT DISTINCT col0 * col1 * col1 AS col1 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT col1 * col0 + - col0 AS col2 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT ALL col1 * col1 * - col2 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT col2 FROM tab1 WHERE NULL NOT BETWEEN ( - col0 ) AND col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7556
SELECT ALL col0 DIV - col0 + col0 AS col1 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-7556
SELECT ALL col0 / - col0 + col0 AS col1 FROM tab1
----
2
63
79

query I rowsort
SELECT DISTINCT - col0 * + col1 - + col2 AS col2 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT + col2 + col2 * col1 * col0 FROM tab1
----
36537
4266
99936

onlyif mysql # use DIV operator for integer division
query I rowsort label-7559
SELECT DISTINCT - col1 + tab1.col2 * col1 DIV col2 AS col0 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-7559
SELECT DISTINCT - col1 + tab1.col2 * col1 / col2 AS col0 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col2 * + tab2.col1 col0 FROM tab2
----
1593
663
868

query I rowsort
SELECT DISTINCT + col0 + + col0 FROM tab0 WHERE NULL <= NULL
----

query I rowsort
SELECT + col0 * col0 + col0 FROM tab0
----
1260
600
8010

query I rowsort
SELECT tab0.col2 + col0 * - col1 AS col0 FROM tab0
----
-2031
-3394
-8017

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL <> col0 * - col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col1 + col0 col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT + tab2.col0 + col1 * - col0 + col1 AS col0 FROM tab2
----
-1247
-179
-4465

query I rowsort
SELECT DISTINCT + col0 + col0 AS col2 FROM tab1
----
128
160
6

query I rowsort
SELECT DISTINCT tab1.col0 * + col2 + - col0 * + col1 FROM tab1
----
3008
6640
84

query I rowsort
SELECT + col1 + - col1 + col0 FROM tab2
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7570
SELECT ALL col2 DIV col2 + col1 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-7570
SELECT ALL col2 / col2 + col1 FROM tab1
----
11
14
27

query I rowsort
SELECT col1 - col1 FROM tab0 WHERE NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT + col0 * - col0 * col2 + col1 + + col0 * - col1 * col1 AS col1 FROM tab0
----
-1386440
-196426
-330443

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + cor0.col1 col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL col2 + + col2 FROM tab2 cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-7575
SELECT DISTINCT col1 * col2 - + cor0.col1 DIV col0 FROM tab2 AS cor0
----
1534
646
833

skipif mysql # not compatible
query I rowsort label-7575
SELECT DISTINCT col1 * col2 - + cor0.col1 / col0 FROM tab2 AS cor0
----
1534
646
833

query I rowsort
SELECT DISTINCT col0 * col1 + tab0.col1 * + col1 AS col1 FROM tab0
----
12804
16380
9460

query I rowsort
SELECT - col2 * - col2 * col1 + + col1 * tab2.col0 * - col0 FROM tab2
----
-319072
-81549
21080

query I rowsort
SELECT + col1 * + cor0.col1 * col0 + - col0 AS col2 FROM tab2 cor0
----
22752
271440
6720

query I rowsort
SELECT col0 * - col0 + + cor0.col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT - cor0.col0 + + col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7581
SELECT - CAST( NULL AS SIGNED ) + - col2 * col0 + col1 * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7581
SELECT - CAST ( NULL AS INTEGER ) + - col2 * col0 + col1 * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + - cor0.col2 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT - col0 + + col1 * - col2 AS col0 FROM tab0 AS cor0
----
-132
-2862
-7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7584
SELECT - CAST( - col1 AS SIGNED ) - col1 AS col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7584
SELECT - CAST ( - col1 AS INTEGER ) - col1 AS col1 FROM tab0 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col1 col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT 63 * - col1 AS col1 FROM tab0 AS cor0
----
-5418
-5733
-6111

onlyif mysql # use DIV operator for integer division
query I rowsort label-7587
SELECT col1 + 93 * col1 + ( col2 ) DIV - col0 AS col1 FROM tab2 AS cor0
----
1598
2911
5546

skipif mysql # not compatible
query I rowsort label-7587
SELECT col1 + 93 * col1 + ( col2 ) / - col0 AS col1 FROM tab2 AS cor0
----
1598
2911
5546

query I rowsort
SELECT DISTINCT + + col1 * 68 * col1 FROM tab1 AS cor0
----
11492
45968
6800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 87 col0 FROM tab2 AS cor0
----
87
87
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7590
SELECT DISTINCT + col0 + + col1 * + CAST( NULL AS SIGNED ) - - 75 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7590
SELECT DISTINCT + col0 + + col1 * + CAST ( NULL AS INTEGER ) - - 75 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - cor0.col0 * col2 * - 27 AS col2 FROM tab0 cor0
----
197046
21384
945

query I rowsort
SELECT - - col0 + - cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL col2 + - col1 * col2 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - cor0.col1 col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - 31 * - cor0.col0 * - col2 - + col0 FROM tab0 cor0
----
-1120
-226327
-24576

query I rowsort
SELECT DISTINCT 95 * - col1 + + 54 AS col0 FROM tab0 AS cor0
----
-8116
-8591
-9161

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7597
SELECT ALL CAST( NULL AS SIGNED ) + col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7597
SELECT ALL CAST ( NULL AS INTEGER ) + col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 + - col2 * - col2 FROM tab0
----
1122
2
6806

query I rowsort
SELECT ALL + 31 * col1 + - col2 FROM tab2
----
1803
489
934

query I rowsort
SELECT + col2 + 47 AS col1 FROM tab2 AS cor0
----
73
74
85

query I rowsort
SELECT + col1 + col1 * 45 AS col0 FROM tab1 AS cor0
----
1196
460
598

query I rowsort
SELECT ALL tab1.col2 * col0 AS col2 FROM tab1
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - + 0 col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT - 91 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 6ec4feac5c635ab8e5da71006896acab

query I rowsort
SELECT ( - cor0.col2 ) * 21 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0bc4e305568cab357c1ac865992af128

query I rowsort
SELECT - 38 * 12 FROM tab2, tab2 AS cor0
----
9 values hashing to 17ed70a400d0511223aea6dc459acf0e

query I rowsort
SELECT - col0 + 24 * - col2 AS col2 FROM tab1
----
-1299
-1432
-2384

onlyif mysql # use DIV operator for integer division
query I rowsort label-7608
SELECT + cor0.col0 * col2 + 57 + col0 DIV col1 col0 FROM tab1 AS cor0
----
219
3711
7743

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7608
SELECT + cor0.col0 * col2 + 57 + col0 / col1 col0 FROM tab1 AS cor0
----
219
3711
7743

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col1 - + col1 * + col2 col1 FROM tab0
----
-2666
-7280
97

query I rowsort
SELECT ALL ( + cor0.col0 ) FROM tab0, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL 34 * cor0.col2 + + cor0.col1 + + col0 AS col0 FROM tab0 AS cor0
----
1232
166
2968

query I rowsort
SELECT ALL - col0 * col2 * - col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT + col2 * - col2 + + col1 * col2 + cor0.col1 AS col2 FROM tab1 AS cor0
----
-1486
-2669
-7955

query I rowsort
SELECT ALL + 86 + col1 AS col2 FROM tab0
----
172
177
183

query I rowsort
SELECT ALL - col2 + - 20 FROM tab1
----
-116
-74
-77

query I rowsort
SELECT DISTINCT tab0.col1 * + col0 + - col0 FROM tab0
----
2040
3360
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7617
SELECT ALL - CAST( NULL AS SIGNED ) + col1 * - col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7617
SELECT ALL - CAST ( NULL AS INTEGER ) + col1 * - col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 44 + 26 AS col2 FROM tab1
----
70
70
70

query I rowsort
SELECT ALL - 66 + col2 + col2 * col0 AS col2 FROM tab1 AS cor0
----
150
3639
7710

onlyif mysql # use DIV operator for integer division
query I rowsort label-7620
SELECT 36 + + col0 DIV + cor0.col1 col2 FROM tab1 AS cor0
----
36
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7620
SELECT 36 + + col0 / + cor0.col1 col2 FROM tab1 AS cor0
----
36
42
42

query I rowsort
SELECT ALL - - 24 * + col2 + col1 FROM tab1 AS cor0
----
1322
1378
2317

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + ( - 48 ) * + col2 + col1 * - col0 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
-2358
38224
78592

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 31 col0 FROM tab1
----
31
31
31

query I rowsort
SELECT ALL 59 * - col0 FROM tab2 AS cor0
----
-413
-4602
-4661

query I rowsort
SELECT cor1.col0 + - 1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 5e65e8372a41563b26c445fbc8748cfe

query I rowsort
SELECT DISTINCT - cor0.col0 + col2 AS col2 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + cor0.col1 + col2 AS col0 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7629
SELECT DISTINCT - cor0.col2 * - CAST( 61 AS SIGNED ) col2 FROM tab2 AS cor0
----
1586
1647
2318

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7629
SELECT DISTINCT - cor0.col2 * - CAST ( 61 AS INTEGER ) col2 FROM tab2 AS cor0
----
1586
1647
2318

query I rowsort
SELECT ALL + col2 + ( col2 ) + + col1 * + col1 FROM tab0 AS cor0
----
7462
8445
9411

query I rowsort
SELECT DISTINCT + cor0.col2 * ( col2 ) AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - 61 AS col0 FROM tab0
----
-61
-61
-61

query I rowsort
SELECT ALL + col2 * col0 - 30 FROM tab2 AS cor0
----
159
1998
2972

query I rowsort
SELECT DISTINCT + col1 * 61 * 89 + + col0 AS col0 FROM tab0 AS cor0
----
466918
494128
526648

query I rowsort
SELECT + + col2 * + col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * + col0 col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7637
SELECT ALL - cor0.col2 DIV col1 - 91 AS col1 FROM tab2 AS cor0
----
-91
-91
-93

skipif mysql # not compatible
query I rowsort label-7637
SELECT ALL - cor0.col2 / col1 - 91 AS col1 FROM tab2 AS cor0
----
-91
-91
-93

query I rowsort
SELECT DISTINCT + col1 + cor0.col1 * + ( col2 ) * + col2 AS col2 FROM tab1 AS cor0
----
119821
32500
75842

query I rowsort
SELECT col0 * col0 * + 95 AS col0 FROM tab2
----
4655
577980
592895

query I rowsort
SELECT ALL + - col2 * + col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - 98 + col2 + - cor0.col2 FROM tab0 AS cor0
----
-98
-98
-98

query I rowsort
SELECT - col2 + col1 + + 23 AS col0 FROM tab2 AS cor0
----
2
27
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 17 * col2 col1 FROM tab2
----
442
459
646

onlyif mysql # use DIV operator for integer division
query I rowsort label-7644
SELECT ALL + + 53 DIV + col0 AS col1 FROM tab1 AS cor0
----
0
0
17

skipif mysql # not compatible
query I rowsort label-7644
SELECT ALL + + 53 / + col0 AS col1 FROM tab1 AS cor0
----
0
0
17

query I rowsort
SELECT + col2 + + ( - col2 ) FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 75 * + 57 col1 FROM tab0 AS cor0
----
-102600
-149625
-380475

query I rowsort
SELECT tab0.col1 + - col1 * + col0 FROM tab0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-7648
SELECT ALL + 0 DIV + col1 + + col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-7648
SELECT ALL + 0 / + col1 + + col0 FROM tab2
----
7
78
79

query I rowsort
SELECT + ( + col0 ) + col2 AS col1 FROM tab2
----
104
117
34

query I rowsort
SELECT - col2 * col0 - col1 * + 81 AS col0 FROM tab0 AS cor0
----
-14669
-7758
-7892

query I rowsort
SELECT DISTINCT - + 4 AS col2 FROM tab2 AS cor0
----
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-7652
SELECT ALL col2 DIV 58 col0 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7652
SELECT ALL col2 / 58 col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7653
SELECT + col2 DIV - 30 + col2 * + col2 AS col1 FROM tab2 cor0
----
1443
676
729

skipif mysql # not compatible
query I rowsort label-7653
SELECT + col2 / - 30 + col2 * + col2 AS col1 FROM tab2 cor0
----
1443
676
729

query I rowsort
SELECT + + col2 * + col0 + + cor0.col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL + ( + col2 ) * col2 + - col0 AS col2 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT col2 * col1 + + col2 + 82 FROM tab1 cor0
----
1426
1540
709

query I rowsort
SELECT ALL - + col0 * 63 * + col2 FROM tab1 AS cor0
----
-10206
-229824
-483840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7658
SELECT CAST( NULL AS SIGNED ) - - col0 col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7658
SELECT CAST ( NULL AS INTEGER ) - - col0 col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * col2 - col1 FROM tab1 cor0
----
136
3638
7667

query I rowsort
SELECT DISTINCT - + col0 * ( col2 ) + 81 AS col2 FROM tab0 cor0
----
-711
-7217
46

query I rowsort
SELECT - ( col1 ) * + cor0.col0 + - col1 - + ( + col2 ) FROM tab2 AS cor0
----
-1398
-275
-4687

query I rowsort
SELECT - - col1 * 55 + - col2 AS col0 FROM tab2 AS cor0
----
1678
3219
897

onlyif mysql # use DIV operator for integer division
query I rowsort label-7663
SELECT DISTINCT ( col0 ) DIV col1 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-7663
SELECT DISTINCT ( col0 ) / col1 FROM tab0 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - ( + col0 ) ) col2 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7665
SELECT + cor0.col0 * col2 DIV col2 AS col1 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7665
SELECT + cor0.col0 * col2 / col2 AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - col2 * - ( + col2 ) + col0 FROM tab0 cor0
----
1113
36
6813

query I rowsort
SELECT + ( + cor0.col0 ) - col2 FROM tab1 AS cor0
----
-16
-51
7

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + col2 AS REAL ) * col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - col2 + + col1 * col1 * 86 FROM tab0 AS cor0
----
636023
712084
809173

query I rowsort
SELECT ALL - col1 + 74 * + col1 FROM tab2
----
1241
2263
4307

onlyif mysql # use DIV operator for integer division
query I rowsort label-7671
SELECT - 60 DIV + 66 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7671
SELECT - 60 / + 66 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL + 56 * - col2 + - col0 + col1 AS col0 FROM tab0 AS cor0
----
-1786
-4590
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-7673
SELECT DISTINCT - col0 - col1 DIV ( col1 * cor0.col2 ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-7673
SELECT DISTINCT - col0 - col1 / ( col1 * cor0.col2 ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + + cor0.col1 * - col2 + col1 * - 48 FROM tab2 AS cor0
----
-1462
-2325
-4366

query I rowsort
SELECT + 84 FROM tab2 cor0
----
84
84
84

query I rowsort
SELECT + + col2 + + col1 + col1 * - 68 AS col0 FROM tab1 AS cor0
----
-1688
-613
-775

onlyif mysql # use DIV operator for integer division
query I rowsort label-7677
SELECT + 27 - + col0 DIV 97 AS col0 FROM tab1 cor0
----
27
27
27

skipif mysql # not compatible
query I rowsort label-7677
SELECT + 27 - + col0 / 97 AS col0 FROM tab1 cor0
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * cor0.col0 + - col1 col0 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT - + 85 + col1 AS col0 FROM tab2 cor0
----
-26
-54
-68

query I rowsort
SELECT - col2 + 57 + col1 * col0 AS col1 FROM tab0
----
2088
3451
8074

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7681
SELECT CAST( + col0 AS SIGNED ) * col1 * ( + col0 ) FROM tab2
----
106097
1519
358956

skipif mysql # not compatible
query I rowsort label-7681
SELECT CAST ( + col0 AS INTEGER ) * col1 * ( + col0 ) FROM tab2
----
106097
1519
358956

query I rowsort
SELECT + 46 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT DISTINCT - col1 * - col2 + col0 AS col0 FROM tab1
----
1328
1407
634

query I rowsort
SELECT ( col1 ) + col0 + - 28 * col2 FROM tab0 AS cor0
----
-2116
-814
104

query I rowsort
SELECT + col1 * - col1 + - ( - cor0.col1 ) FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT DISTINCT - 17 * 68 + col0 FROM tab0
----
-1067
-1121
-1132

onlyif mysql # use DIV operator for integer division
query I rowsort label-7687
SELECT col2 + + 35 DIV - col1 AS col1 FROM tab1
----
53
54
94

skipif mysql # not compatible
query I rowsort label-7687
SELECT col2 + + 35 / - col1 AS col1 FROM tab1
----
53
54
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * cor0.col0 * cor0.col2 col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT ALL + - 54 * cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 6de3270c546a8a8aabec7a395186c032

query I rowsort
SELECT - col1 + - ( col0 ) FROM tab1
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7691
SELECT col2 * ( col2 ) DIV col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7691
SELECT col2 * ( col2 ) / col2 FROM tab0 AS cor0
----
1
33
82

query IIIIIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab1, tab0 AS cor1, tab0, tab1 AS cor2, tab2
----
13122 values hashing to 6f4401de0fe6cf301cc95275f3789ab1

query I rowsort
SELECT ALL 6 FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 44f233d1b3804e00d9436c0a41d1e2c8

query I rowsort
SELECT + ( - cor1.col1 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7695
SELECT + CAST( NULL AS SIGNED ) / + 40 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7695
SELECT + CAST ( NULL AS INTEGER ) / + 40 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 68 * ( col0 ) AS col2 FROM tab0 AS cor0
----
-1632
-2380
-6052

query I rowsort
SELECT - + 22 AS col0 FROM tab0 AS cor0
----
-22
-22
-22

onlyif mysql # use DIV operator for integer division
query I rowsort label-7698
SELECT ALL col2 * - col2 - - col0 DIV col0 AS col2 FROM tab2
----
-1443
-675
-728

skipif mysql # not compatible
query I rowsort label-7698
SELECT ALL col2 * - col2 - - col0 / col0 AS col2 FROM tab2
----
-1443
-675
-728

skipif mysql # not compatible
query I rowsort
SELECT tab0.col1 * CAST ( - 22 AS REAL ) + col0 FROM tab0
----
-1868
-1913
-2099

onlyif mysql # use DIV operator for integer division
query I rowsort label-7700
SELECT - col2 DIV + col0 + + col1 * cor0.col2 FROM tab2 AS cor0
----
1534
646
834

skipif mysql # not compatible
query I rowsort label-7700
SELECT - col2 / + col0 + + col1 * cor0.col2 FROM tab2 AS cor0
----
1534
646
834

query I rowsort
SELECT ALL + cor0.col2 * ( 50 * cor0.col0 ) FROM tab0 AS cor0
----
1750
364900
39600

query I rowsort
SELECT DISTINCT col0 * - 75 FROM tab1 AS cor0
----
-225
-4800
-6000

query I rowsort
SELECT - - col2 * col2 * cor0.col0 AS col0 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT - col2 - + col1 * 51 AS col2 FROM tab2 AS cor0
----
-1608
-3035
-905

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - 44 col2 FROM tab2 AS cor0
----
-308
-3432
-3476

query I rowsort
SELECT DISTINCT - col0 + + 35 AS col0 FROM tab0 AS cor0
----
-54
0
11

query I rowsort
SELECT + 14 * col0 + col1 FROM tab2 cor0
----
1123
1151
129

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7708
SELECT ALL - - CAST( 22 AS SIGNED ) + + col1 AS col2 FROM tab1 AS cor0
----
32
35
48

skipif mysql # not compatible
query I rowsort label-7708
SELECT ALL - - CAST ( 22 AS INTEGER ) + + col1 AS col2 FROM tab1 AS cor0
----
32
35
48

query I rowsort
SELECT ALL - cor0.col2 + + 90 FROM tab0 AS cor0
----
57
8
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7710
SELECT ALL ( + col2 ) DIV + cor0.col1 - cor0.col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-7710
SELECT ALL ( + col2 ) / + cor0.col1 - cor0.col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - - ( 13 ) + + col2 FROM tab2 AS cor0
----
39
40
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + 36 + col2 col0 FROM tab0 AS cor0
----
1261
3286
897

query I rowsort
SELECT DISTINCT - + col1 + 69 * + col1 AS col1 FROM tab2 AS cor0
----
1156
2108
4012

onlyif mysql # use DIV operator for integer division
query I rowsort label-7714
SELECT tab0.col0 DIV ( + col1 ) FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7714
SELECT tab0.col0 / ( + col1 ) FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT 20 * - 12 - col2 AS col0 FROM tab2 AS cor0
----
-266
-267
-278

query I rowsort
SELECT + col0 - cor0.col0 * cor0.col2 * 53 AS col0 FROM tab0 AS cor0
----
-1820
-386705
-41952

query I rowsort
SELECT ALL + cor0.col2 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT - + col2 * - 83 + - col2 FROM tab2 cor0
----
2132
2214
3116

onlyif mysql # use DIV operator for integer division
query I rowsort label-7719
SELECT ALL - + col2 + - 74 DIV - 40 FROM tab2 AS cor0
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-7719
SELECT ALL - + col2 + - 74 / - 40 FROM tab2 AS cor0
----
-25
-26
-37

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 + + ( - col2 ) AS col2 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT DISTINCT - col0 * col1 - col2 AS col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT tab1.col1 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT tab0.col0 * col1 * + tab0.col0 FROM tab0
----
118825
49536
720811

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7724
SELECT ALL - col2 + + CAST( - col1 AS SIGNED ) FROM tab0 cor0
----
-119
-173
-98

skipif mysql # not compatible
query I rowsort label-7724
SELECT ALL - col2 + + CAST ( - col1 AS INTEGER ) FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT col0 * ( - col2 ) AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - 81 * col1 FROM tab2
----
-1377
-2511
-4779

query I rowsort
SELECT ALL col1 + - 65 FROM tab1 AS cor0
----
-39
-52
-55

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0, tab1 cor1, tab2, tab1 AS cor2
----
3645 values hashing to 2563d2f4127fd757b80c46400c5511cb

query I rowsort
SELECT - 69 - tab1.col1 FROM tab1
----
-79
-82
-95

query I rowsort
SELECT 10 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT DISTINCT + col1 * - 92 AS col2 FROM tab2
----
-1564
-2852
-5428

query I rowsort
SELECT DISTINCT - + col1 * - 67 + - col0 * col2 FROM tab0 AS cor0
----
-1201
4970
6464

query I rowsort
SELECT - 94 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

onlyif mysql # use DIV operator for integer division
query I rowsort label-7734
SELECT DISTINCT col1 DIV - col0 col1 FROM tab1
----
-8
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7734
SELECT DISTINCT col1 / - col0 col1 FROM tab1
----
-8
0

query I rowsort
SELECT DISTINCT col0 * + 46 + + col0 * + 29 * tab2.col2 FROM tab2
----
5803
62400
90692

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 78 - col0 * col2 col1 FROM tab0
----
-714
-7220
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-7737
SELECT DISTINCT + cor0.col2 DIV 61 col0 FROM tab2, tab0, tab1 AS cor0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7737
SELECT DISTINCT + cor0.col2 / 61 col0 FROM tab2, tab0, tab1 AS cor0
----
0
1

query I rowsort
SELECT ALL - tab2.col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT 59 * 37 AS col1 FROM tab0
----
2183
2183
2183

query I rowsort
SELECT + tab0.col1 - - col2 AS col1 FROM tab0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7742
SELECT + - CAST( - 41 AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

skipif mysql # not compatible
query I rowsort label-7742
SELECT + - CAST ( - 41 AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

onlyif mysql # use DIV operator for integer division
query I rowsort label-7743
SELECT ALL col0 * col2 DIV ( + col1 ) FROM tab2
----
176
34
6

skipif mysql # not compatible
query I rowsort label-7743
SELECT ALL col0 * col2 / ( + col1 ) FROM tab2
----
176
34
6

query I rowsort
SELECT ALL 72 + + col1 FROM tab1 AS cor0
----
82
85
98

query I rowsort
SELECT col2 * + col0 + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL - col2 * col1 * + col0 AS col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT + col1 - - cor0.col0 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + + ( col0 ) + + 12 AS col0 FROM tab0 AS cor0
----
101
36
47

query I rowsort
SELECT + - cor0.col1 * - col0 + + ( + col0 + - cor0.col2 ) * ( col0 ) AS col0 FROM tab0 AS cor0
----
1848
4585
8722

query I rowsort
SELECT ALL - + col0 + - cor0.col1 * - 84 FROM tab0 AS cor0
----
7200
7555
8113

query I rowsort
SELECT ALL col1 + - col0 * col1 AS col2 FROM tab0 cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL - cor0.col0 + col2 + col1 AS col1 FROM tab1 AS cor0
----
29
3
77

query I rowsort
SELECT DISTINCT - 28 + col2 AS col0 FROM tab0 AS cor0
----
-27
5
54

query I rowsort
SELECT ALL col1 * - col0 * 20 + + col2 * col1 FROM tab0 cor0
----
-154518
-38442
-67803

query I rowsort
SELECT - cor0.col0 * col0 - - col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT + ( + col2 ) + col0 + - col1 FROM tab2 AS cor0
----
100
3
45

query I rowsort
SELECT - 61 + - 57 * col0 FROM tab2 AS cor0
----
-4507
-4564
-460

query I rowsort
SELECT ALL col1 + 71 AS col0 FROM tab1
----
81
84
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7759
SELECT ALL col2 + - CAST( col0 * - col0 AS SIGNED ) FROM tab2
----
6110
6279
76

skipif mysql # not compatible
query I rowsort label-7759
SELECT ALL col2 + - CAST ( col0 * - col0 AS INTEGER ) FROM tab2
----
6110
6279
76

query I rowsort
SELECT cor0.col1 + - col2 * col1 FROM tab2 AS cor0
----
-1475
-629
-806

onlyif mysql # use DIV operator for integer division
query I rowsort label-7761
SELECT + col2 DIV col2 + col1 col2 FROM tab0 cor0
----
87
92
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7761
SELECT + col2 / col2 + col1 col2 FROM tab0 cor0
----
87
92
98

query I rowsort
SELECT - 10 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7763
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col2 AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7763
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col2 AS col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT ALL 95 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0, tab2 AS cor1, tab1, tab2 cor2
----
3645 values hashing to 6193516da5556fc054f35e0d2f4e5372

query I rowsort
SELECT DISTINCT + + ( - col0 ) - col2 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT ALL cor0.col2 * col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT ALL + - cor0.col0 * - col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7769
SELECT ALL - + col1 DIV - 30 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7769
SELECT ALL - + col1 / - 30 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7770
SELECT - col1 * + CAST( + col2 AS SIGNED ) - col2 FROM tab1 AS cor0
----
-1344
-1458
-627

skipif mysql # not compatible
query I rowsort label-7770
SELECT - col1 * + CAST ( + col2 AS INTEGER ) - col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT DISTINCT - + col0 * 75 + + col0 FROM tab2 AS cor0
----
-518
-5772
-5846

query I rowsort
SELECT DISTINCT col0 * col1 + - col1 * - col0 + 46 AS col1 FROM tab2 AS cor0
----
2732
480
9250

query I rowsort
SELECT - col2 + 15 AS col2 FROM tab2 AS cor0
----
-11
-12
-23

query I rowsort
SELECT ALL + - col1 * + 41 FROM tab1 AS cor0
----
-1066
-410
-533

query I rowsort
SELECT DISTINCT - col0 * col2 + + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT 59 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT ALL col1 * ( tab2.col0 ) FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT ( cor0.col1 ) FROM tab0, tab2 AS cor0, tab2 AS cor1
----
17
31
59

query I rowsort
SELECT col0 * col2 * ( - col1 * col0 ) FROM tab0 AS cor0
----
-118825
-1634688
-59106502

query I rowsort
SELECT col2 * cor0.col2 * 28 AS col0 FROM tab0 cor0
----
188272
28
30492

onlyif mysql # use DIV operator for integer division
query I rowsort label-7781
SELECT col2 DIV + col1 - - col2 * CAST( - col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-7781
SELECT col2 / + col1 - - col2 * CAST ( - col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + + 50 * 95 - col0 FROM tab0 AS cor0
----
4661
4715
4726

skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( - col2 AS REAL ) * - col1 - + ( ( - col1 ) ) FROM tab2 AS cor0
----
-1475
-629
-806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7784
SELECT + + CAST( NULL AS SIGNED ) * col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7784
SELECT + + CAST ( NULL AS INTEGER ) * col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col0 + ( + col0 ) * col2 AS col1 FROM tab1 cor0
----
159
3584
7600

query I rowsort
SELECT DISTINCT tab2.col2 * 13 * 63 FROM tab2
----
21294
22113
31122

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7787
SELECT - CAST( NULL AS SIGNED ) + 56 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7787
SELECT - CAST ( NULL AS INTEGER ) + 56 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - + 80 AS col0 FROM tab0 AS cor0
----
-80
-80
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 34 * + col0 - col1 col0 FROM tab1 AS cor0
----
2166
2707
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7790
SELECT ALL + + CAST( NULL AS SIGNED ) * col0 * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7790
SELECT ALL + + CAST ( NULL AS INTEGER ) * col0 * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7791
SELECT + ( cor0.col2 ) * - CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7791
SELECT + ( cor0.col2 ) * - CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 47 * col0 * - cor0.col0 FROM tab0 AS cor0
----
27072
372287
57575

query I rowsort
SELECT + col2 * col2 + - col1 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT + col1 * - col2 * + col0 + cor0.col1 FROM tab0 AS cor0
----
-3298
-664027
-68026

query I rowsort
SELECT + + 23 * cor0.col0 FROM tab0 AS cor0
----
2047
552
805

query I rowsort
SELECT + - 99 * + col1 * - col2 + - 17 AS col0 FROM tab0 AS cor0
----
280945
738721
9586

onlyif mysql # use DIV operator for integer division
query I rowsort label-7797
SELECT - 51 DIV + col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7797
SELECT - 51 / + col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 + col2 * col0 * + cor0.col2 FROM tab1 AS cor0
----
207872
737200
8745

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + - ( col2 ) col1 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7800
SELECT DISTINCT col2 DIV 11 AS col1 FROM tab0
----
0
3
7

skipif mysql # not compatible
query I rowsort label-7800
SELECT DISTINCT col2 / 11 AS col1 FROM tab0
----
0
3
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7801
SELECT DISTINCT + - ( col0 ) DIV + 9 + + ( col2 + + CAST( 21 AS SIGNED ) ) FROM tab1 cor0
----
109
71
75

skipif mysql # not compatible
query I rowsort label-7801
SELECT DISTINCT + - ( col0 ) / + 9 + + ( col2 + + CAST ( 21 AS INTEGER ) ) FROM tab1 cor0
----
109
71
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-7802
SELECT ALL - - cor0.col1 DIV + col1 + - col1 * col1 + col2 FROM tab0 AS cor0
----
-7362
-8198
-9407

skipif mysql # not compatible
query I rowsort label-7802
SELECT ALL - - cor0.col1 / + col1 + - col1 * col1 + col2 FROM tab0 AS cor0
----
-7362
-8198
-9407

query I rowsort
SELECT + 7 * - 83 + + col2 AS col2 FROM tab2
----
-543
-554
-555

query I rowsort
SELECT DISTINCT 56 + + cor0.col1 FROM tab1, tab1 AS cor0
----
66
69
82

query I rowsort
SELECT + ( - 11 ) + col1 * + 45 FROM tab2
----
1384
2644
754

query I rowsort
SELECT col1 * 37 - col1 FROM tab2
----
1116
2124
612

query I rowsort
SELECT 11 - + col2 FROM tab1
----
-43
-46
-85

query I rowsort
SELECT ALL - 97 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to e4a6bd848a69226cbb7ad3d154be321b

query I rowsort
SELECT + - 66 * + 29 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a231b31d5f92bbb5e81f8b83f67f951e

query I rowsort
SELECT DISTINCT + - col0 + + col0 + col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT - - cor0.col1 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT - col0 * col1 + - ( 88 * - col2 ) AS col2 FROM tab1 cor0
----
4376
4674
7408

query I rowsort
SELECT ALL col1 + + col2 * + 23 AS col2 FROM tab2 AS cor0
----
652
657
891

query I rowsort
SELECT + - col1 + + col1 * col0 AS col2 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT - col0 * - col1 * col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL - col0 + - col1 AS col0 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT ALL + 23 FROM tab0, tab0 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT - col0 * 42 + cor0.col0 AS col2 FROM tab0 cor0
----
-1435
-3649
-984

query I rowsort
SELECT - + col2 * col2 + - 36 AS col1 FROM tab1 AS cor0
----
-2952
-3285
-9252

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 + col2 * col2 + + col1 col0 FROM tab2 AS cor0
----
1597
2107
2269

query I rowsort
SELECT + 37 AS col1 FROM tab0 cor0
----
37
37
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7822
SELECT ALL CAST( 83 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
83
83
83

skipif mysql # not compatible
query I rowsort label-7822
SELECT ALL CAST ( 83 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
83
83
83

query I rowsort
SELECT DISTINCT - 31 * - cor0.col0 + - col2 * + 79 + col0 AS col2 FROM tab2 cor0
----
-1909
-474
442

query I rowsort
SELECT ALL - col0 * 11 + cor0.col1 AS col2 FROM tab1 AS cor0
----
-694
-7
-867

query I rowsort
SELECT - - 65 * 64 FROM tab2 AS cor0
----
4160
4160
4160

query I rowsort
SELECT DISTINCT + ( - 3 ) AS col0 FROM tab2 AS cor0
----
-3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7827
SELECT ALL + CAST( NULL AS SIGNED ) + cor0.col1 + - cor0.col1 / ( col2 ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7827
SELECT ALL + CAST ( NULL AS INTEGER ) + cor0.col1 + - cor0.col1 / ( col2 ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 + - ( col0 ) AS col1 FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - + cor0.col1 + + ( col2 + CAST ( - col2 AS REAL ) ) col1 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - ( - col2 ) + cor0.col1 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( + col0 ) + - col0 col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT DISTINCT + ( col0 ) + + col2 * - 79 FROM tab1 AS cor0
----
-4263
-4439
-7504

onlyif mysql # use DIV operator for integer division
query I rowsort label-7833
SELECT ALL - + col1 + col0 * col0 DIV col2 FROM tab1 AS cor0
----
-26
53
61

skipif mysql # not compatible
query I rowsort label-7833
SELECT ALL - + col1 + col0 * col0 / col2 FROM tab1 AS cor0
----
-26
53
61

query I rowsort
SELECT DISTINCT - 52 - + col1 * + col0 FROM tab0 cor0
----
-2116
-3447
-8151

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7835
SELECT DISTINCT CAST( - col0 AS SIGNED ) + col2 FROM tab0 AS cor0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-7835
SELECT DISTINCT CAST ( - col0 AS INTEGER ) + col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col2 + col1 + + col2 FROM tab2 AS cor0
----
111
85
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7837
SELECT ALL + ( 60 ) + col2 * CAST( - 71 AS SIGNED ) FROM tab1 cor0
----
-3774
-3987
-6756

skipif mysql # not compatible
query I rowsort label-7837
SELECT ALL + ( 60 ) + col2 * CAST ( - 71 AS INTEGER ) FROM tab1 cor0
----
-3774
-3987
-6756

query I rowsort
SELECT ALL - + col1 - - 23 FROM tab1 AS cor0
----
-3
10
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 57 col1 FROM tab2 AS cor0
----
-57

query I rowsort
SELECT ( col0 ) * + col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL - col1 * ( - col2 ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT 49 + col1 * cor0.col0 FROM tab0 AS cor0
----
2113
3444
8148

query I rowsort
SELECT DISTINCT - - col0 - col0 FROM tab1 cor0
----
0

query I rowsort
SELECT ALL cor0.col1 * cor0.col0 + - 99 * - cor0.col1 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to ca04ec1a73d5c2a03d43e83726adedf2

query I rowsort
SELECT ALL - - col1 * - col2 * - col1 AS col0 FROM tab1 AS cor0
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-7846
SELECT ALL col2 DIV + col0 AS col1 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-7846
SELECT ALL col2 / + col0 AS col1 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT 53 + + tab2.col1 * - col2 AS col1 FROM tab2
----
-1481
-593
-784

query I rowsort
SELECT + tab1.col2 + col1 AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT 5 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT + cor0.col2 + - 1 + 6 FROM tab2 AS cor0
----
31
32
43

query I rowsort
SELECT + - col0 * + col1 + + col0 + col1 FROM tab0 AS cor0
----
-1954
-3263
-7919

query I rowsort
SELECT DISTINCT + + cor0.col0 * - ( col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT col2 * - ( 54 * + col1 ) FROM tab1 AS cor0
----
-30780
-67392
-75816

query I rowsort
SELECT - + col0 * + 66 FROM tab2 AS cor0
----
-462
-5148
-5214

query I rowsort
SELECT ALL + col1 * 95 FROM tab0 AS cor0
----
8170
8645
9215

query I rowsort
SELECT col0 + + col0 + + col0 FROM tab0
----
105
267
72

query I rowsort
SELECT ( + col0 ) + - 37 + col1 * + col2 * - col2 AS col2 FROM tab0
----
-611832
-93667
-99

query I rowsort
SELECT col2 - ( - col2 ) FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT DISTINCT cor0.col0 * 51 * 61 FROM tab2 cor0
----
21777
242658
245769

query I rowsort
SELECT ALL col0 * + col1 + ( - col1 ) FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT ALL col1 * + 91 AS col0 FROM tab0 AS cor0
----
7826
8281
8827

query I rowsort
SELECT ALL 13 AS col0 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT ALL col1 * + col0 * ( col2 ) + - col0 AS col2 FROM tab1
----
36416
4209
99760

query I rowsort
SELECT - col0 + col2 + col2 AS col2 FROM tab0
----
-33
42
75

query I rowsort
SELECT + col2 * 55 FROM tab1
----
2970
3135
5280

query I rowsort
SELECT ( - cor0.col1 ) + - col1 + - col0 * col2 FROM tab2 AS cor0
----
-2146
-251
-3036

query I rowsort
SELECT ALL + 72 * - 29 AS col1 FROM tab0 AS cor0
----
-2088
-2088
-2088

query I rowsort
SELECT DISTINCT col1 + ( - col1 ) * col2 AS col0 FROM tab1
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-7869
SELECT 77 DIV 43 FROM tab0, tab0 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-7869
SELECT 77 / 43 FROM tab0, tab0 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT ALL + col0 + col1 + col0 * col0 FROM tab2
----
6221
6337
87

query I rowsort
SELECT DISTINCT - col2 + - col1 * - 5 AS col0 FROM tab1
----
-31
-7
76

query I rowsort
SELECT col2 * + tab0.col2 + - col0 * - col0 AS col1 FROM tab0
----
1226
14645
1665

onlyif mysql # use DIV operator for integer division
query I rowsort label-7873
SELECT cor0.col0 DIV cor0.col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-7873
SELECT cor0.col0 / cor0.col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT ALL - - 0 * - col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - 39 AS col2 FROM tab2
----
-39
-39
-39

query I rowsort
SELECT + cor1.col1 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 col2 FROM tab0 AS cor0
----
55
55
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-7878
SELECT DISTINCT + tab1.col2 + + col2 * col0 DIV col0 AS col0 FROM tab1
----
108
114
192

skipif mysql # not compatible
query I rowsort label-7878
SELECT DISTINCT + tab1.col2 + + col2 * col0 / col0 AS col0 FROM tab1
----
108
114
192

query I rowsort
SELECT DISTINCT col2 + tab2.col2 * 51 FROM tab2
----
1352
1404
1976

query I rowsort
SELECT col1 * ( - cor0.col2 * col2 ) AS col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT + cor0.col1 - col1 AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL + tab2.col1 * - 32 * 41 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to c3849ae1cd7cdb2635641a21bc3f7502

query I rowsort
SELECT DISTINCT + 80 FROM tab1, tab2, tab0 AS cor0
----
80

query I rowsort
SELECT DISTINCT - tab2.col2 * col0 AS col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ( - 83 ) AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to d55748f39f403ec273099c0d87b0bfbb

query I rowsort
SELECT DISTINCT col2 + + ( + col0 * 45 ) + + 78 AS col1 FROM tab1 AS cor0
----
267
3015
3774

query I rowsort
SELECT DISTINCT 92 * col1 + col1 AS col2 FROM tab2 cor0
----
1581
2883
5487

query I rowsort
SELECT ALL + 91 + + ( - cor0.col0 * 26 ) + - 65 FROM tab1 AS cor0
----
-1638
-2054
-52

query I rowsort
SELECT - col2 * - ( cor0.col0 ) FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * col0 col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + + 89 * + ( col1 ) FROM tab2 AS cor0
----
1513
2759
5251

onlyif mysql # use DIV operator for integer division
query I rowsort label-7892
SELECT DISTINCT - cor0.col0 * cor0.col1 DIV - col1 + + col0 + 90 FROM tab2 cor0
----
104
246
248

skipif mysql # not compatible
query I rowsort label-7892
SELECT DISTINCT - cor0.col0 * cor0.col1 / - col1 + + col0 + 90 FROM tab2 cor0
----
104
246
248

query I rowsort
SELECT - ( 4 + + col2 ) FROM tab0
----
-37
-5
-86

query I rowsort
SELECT ALL + cor0.col1 + col1 + col2 AS col1 FROM tab0 AS cor0
----
195
205
264

query I rowsort
SELECT - 95 + + 79 * cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to af35a6a3a0744e4f3678812bcf8a8f0b

query I rowsort
SELECT DISTINCT - 25 + + col1 * col0 FROM tab2 AS cor0
----
1318
192
4577

query I rowsort
SELECT DISTINCT - col1 - 40 AS col1 FROM tab0 AS cor0
----
-126
-131
-137

query I rowsort
SELECT + cor0.col2 * - col0 + - col2 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-7899
SELECT DISTINCT + col0 DIV 82 + col0 + - col2 * - 77 FROM tab2 AS cor0
----
2080
2086
3005

skipif mysql # not compatible
query I rowsort label-7899
SELECT DISTINCT + col0 / 82 + col0 + - col2 * - 77 FROM tab2 AS cor0
----
2080
2086
3005

query I rowsort
SELECT + - col0 * 77 + + 91 * col2 FROM tab1 AS cor0
----
2576
259
4683

query I rowsort
SELECT + col0 + + ( + col0 ) * + col1 AS col0 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 tab2 AS cor0
----
10982
25947
90506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7903
SELECT - col1 + + CAST( NULL AS SIGNED ) * - cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7903
SELECT - col1 + + CAST ( NULL AS INTEGER ) * - cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * 3 + - col1 FROM tab0 AS cor0
----
-94
13
155

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7905
SELECT CAST( 17 AS SIGNED ) * cor0.col2 FROM tab0 AS cor0
----
1394
17
561

skipif mysql # not compatible
query I rowsort label-7905
SELECT CAST ( 17 AS INTEGER ) * cor0.col2 FROM tab0 AS cor0
----
1394
17
561

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab1, tab0 cor1, tab2 cor2, tab1 AS cor3
----
3645 values hashing to 4c5172baaab682f997bd09d2b5cf0d22

onlyif mysql # use DIV operator for integer division
query I rowsort label-7907
SELECT + 83 DIV cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 3294894d5691618c467f11d859a940f4

skipif mysql # not compatible
query I rowsort label-7907
SELECT + 83 / cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 3294894d5691618c467f11d859a940f4

onlyif mysql # use DIV operator for integer division
query I rowsort label-7908
SELECT DISTINCT + col2 DIV + cor0.col1 FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-7908
SELECT DISTINCT + col2 / + cor0.col1 FROM tab2 AS cor0
----
0
2

query I rowsort
SELECT + cor0.col2 * - col0 * col2 + + col1 AS col2 FROM tab2 AS cor0
----
-114059
-5072
-52669

query I rowsort
SELECT ALL col2 * ( + 69 ) AS col0 FROM tab0 AS cor0
----
2277
5658
69

query I rowsort
SELECT - - col0 + - 87 * + col2 FROM tab2 AS cor0
----
-2184
-2342
-3227

query I rowsort
SELECT ALL - - cor0.col0 * ( - col2 * col1 + - col2 ) AS col0 FROM tab2 AS cor0
----
-121680
-54036
-6048

query I rowsort
SELECT - col0 * - ( ( + col0 ) ) + cor0.col0 AS col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT DISTINCT + col0 * + col1 * col0 AS col0 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT - col1 - col2 * - ( col2 ) FROM tab2
----
1427
617
698

query I rowsort
SELECT + - col0 * 81 + + col2 AS col2 FROM tab1 AS cor0
----
-189
-5127
-6384

query I rowsort
SELECT ALL col1 * - ( - ( tab0.col2 ) ) FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7918
SELECT + - col0 * col0 DIV + col0 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-7918
SELECT + - col0 * col0 / + col0 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7919
SELECT + col0 DIV - 47 AS col2 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-7919
SELECT + col0 / - 47 AS col2 FROM tab1 AS cor0
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7920
SELECT + col0 DIV ( col1 ) AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7920
SELECT + col0 / ( col1 ) AS col2 FROM tab0 AS cor0
----
0
0
0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 4b145ce61881e246723968d1ac787ac2

query I rowsort
SELECT DISTINCT col1 + col2 - ( col2 ) * cor0.col0 FROM tab1 cor0
----
-3581
-7571
-82

query I rowsort
SELECT ALL 12 - 93 FROM tab0
----
-81
-81
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7924
SELECT DISTINCT + CAST( NULL AS DECIMAL ) AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7924
SELECT DISTINCT + CAST ( NULL AS REAL ) AS col2 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 col1 FROM tab2
----
93
93
93

query I rowsort
SELECT + cor2.col0 AS col0 FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2
----
243 values hashing to ee8b23a58dda2d92e14ed437e06ed8d2

query I rowsort
SELECT + + cor1.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 21 + + col1 + ( col1 * tab1.col1 + + 11 * col1 ) col1 FROM tab1
----
199
304
967

query I rowsort
SELECT tab2.col2 + + tab2.col0 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT + tab2.col2 * col0 + 56 FROM tab2
----
2084
245
3058

query I rowsort
SELECT ALL - + col1 * col1 + col1 + - col2 FROM tab2 cor0
----
-310
-3448
-957

query I rowsort
SELECT ALL - ( col0 ) + col1 * 29 AS col2 FROM tab1 cor0
----
226
297
751

query I rowsort
SELECT cor0.col2 * + col1 * - 37 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-21026
-46096
-51945

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + col1 col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - 93 + cor0.col0 * col2 AS col2 FROM tab2 AS cor0
----
1935
2909
96

query I rowsort
SELECT DISTINCT col2 * + col1 * ( + col2 ) FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT + 80 * + col2 + + col2 * col1 FROM tab0 AS cor0
----
14022
177
5478

onlyif mysql # use DIV operator for integer division
query I rowsort label-7938
SELECT ALL cor0.col1 DIV - cor0.col1 AS col0 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7938
SELECT ALL cor0.col1 / - cor0.col1 AS col0 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT 45 * col2 + 49 FROM tab1 AS cor0
----
2479
2614
4369

query I rowsort
SELECT ALL - 98 * col2 FROM tab1 AS cor0
----
-5292
-5586
-9408

query I rowsort
SELECT + ( - col1 ) - + ( col0 ) * col2 FROM tab0 AS cor0
----
-132
-7389
-878

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 col2 * ( + 51 ) + + col0 * ( - col1 ) * + col0 FROM tab1 AS cor0
----
-38053
-78304
2520

onlyif mysql # use DIV operator for integer division
query I rowsort label-7944
SELECT DISTINCT col1 * col2 DIV col2 AS col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-7944
SELECT DISTINCT col1 * col2 / col2 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - col1 + 9 FROM tab0 AS cor0
----
-77
-82
-88

query I rowsort
SELECT col2 * ( - cor0.col0 * col0 ) FROM tab0 cor0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT + col2 * col0 * cor0.col2 + col2 * - 21 AS col0 FROM tab1 AS cor0
----
206739
735264
7614

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - cor0.col1 + ( cor0.col1 ) * col2 FROM tab2 cor0
----
1475
629
806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7950
SELECT DISTINCT col1 * CAST( NULL AS SIGNED ) - - col0 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7950
SELECT DISTINCT col1 * CAST ( NULL AS INTEGER ) - - col0 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + col2 * cor0.col0 + ( col0 ) * - 28 FROM tab0 AS cor0
----
-945
120
4806

query I rowsort
SELECT ALL - 91 * - col1 - col0 FROM tab0 AS cor0
----
7802
8192
8792

query I rowsort
SELECT ( - 47 ) + col2 AS col0 FROM tab0 AS cor0
----
-14
-46
35

query I rowsort
SELECT ALL + 51 * - 53 AS col2 FROM tab0 AS cor0
----
-2703
-2703
-2703

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col0 + - col1 * 91 col1 FROM tab2
----
-2890
-3038
-9971

query I rowsort
SELECT ALL 13 + + cor0.col0 * col0 FROM tab2 AS cor0
----
6097
62
6254

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7957
SELECT CAST( NULL AS SIGNED ) * - col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7957
SELECT CAST ( NULL AS INTEGER ) * - col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 50 col0 FROM tab2 AS cor0
----
50

query I rowsort
SELECT 51 * - col1 AS col1 FROM tab1 AS cor0
----
-1326
-510
-663

query I rowsort
SELECT + col0 + + 32 AS col0 FROM tab2 AS cor0
----
110
111
39

query I rowsort
SELECT DISTINCT - - 49 + + col0 AS col1 FROM tab2 AS cor0
----
127
128
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7962
SELECT col0 * - cor0.col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7962
SELECT col0 * - cor0.col2 + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col0 col2 FROM tab0 cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7964
SELECT ALL CAST( col0 AS SIGNED ) - + col1 FROM tab0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-7964
SELECT ALL CAST ( col0 AS INTEGER ) - + col1 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT ALL - 98 + - col2 AS col0 FROM tab1 cor0
----
-152
-155
-194

onlyif mysql # use DIV operator for integer division
query I rowsort label-7966
SELECT DISTINCT - 2 DIV col2 FROM tab0 AS cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-7966
SELECT DISTINCT - 2 / col2 FROM tab0 AS cor0
----
-2
0

query I rowsort
SELECT ALL - col2 * col2 * 56 AS col0 FROM tab0 AS cor0
----
-376544
-56
-60984

query I rowsort
SELECT ALL - + cor0.col2 + col0 * + 89 AS col1 FROM tab0 AS cor0
----
2103
3114
7839

query I rowsort
SELECT DISTINCT - + 9 * col1 + - 75 AS col0 FROM tab0 cor0
----
-849
-894
-948

query I rowsort
SELECT ALL col2 + + col2 * - col0 - tab0.col2 AS col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT ( - 79 ) * + col2 * col2 FROM tab2
----
-114076
-53404
-57591

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 70 + + 19 col1 FROM tab2
----
89
89
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7973
SELECT DISTINCT CAST( NULL AS SIGNED ) * tab0.col1 FROM tab2, tab0 AS cor0 CROSS JOIN tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7973
SELECT DISTINCT CAST ( NULL AS INTEGER ) * tab0.col1 FROM tab2, tab0 AS cor0 CROSS JOIN tab0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7974
SELECT col0 + - col0 * - cor0.col1 / - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7974
SELECT col0 + - col0 * - cor0.col1 / - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + ( col1 ) * + ( - cor0.col0 ) AS col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-7976
SELECT ALL - + ( + 7 ) + + col2 DIV + col2 - + col2 FROM tab1 AS cor0
----
-102
-60
-63

skipif mysql # not compatible
query I rowsort label-7976
SELECT ALL - + ( + 7 ) + + col2 / + col2 - + col2 FROM tab1 AS cor0
----
-102
-60
-63

query I rowsort
SELECT DISTINCT + 62 + col2 * + col1 * cor0.col1 FROM tab0 AS cor0
----
244130
679104
9471

query I rowsort
SELECT ALL + - cor0.col0 + - col2 AS col1 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL 94 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT - ( + 42 ) AS col0 FROM tab2
----
-42
-42
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col2 col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + - col1 * + ( col2 ) + + col0 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-7983
SELECT DISTINCT - col1 + col1 - - col0 DIV - col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7983
SELECT DISTINCT - col1 + col1 - - col0 / - col1 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7984
SELECT - col1 + + cor0.col0 DIV col1 FROM tab1 AS cor0
----
-26
-4
-7

skipif mysql # not compatible
query I rowsort label-7984
SELECT - col1 + + cor0.col0 / col1 FROM tab1 AS cor0
----
-26
-4
-7

query I rowsort
SELECT + col2 * + col0 + col0 * - col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col2 + col0 + - cor0.col1 FROM tab0 AS cor0
----
-29
-61
80

query I rowsort
SELECT + col2 + - col2 * ( col1 + col2 ) FROM tab0
----
-14104
-3894
-97

query I rowsort
SELECT - col0 * + col0 + 5 * col2 AS col2 FROM tab1 AS cor0
----
-3811
-5920
261

onlyif mysql # use DIV operator for integer division
query I rowsort label-7989
SELECT - + col2 DIV + col2 + col1 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-7989
SELECT - + col2 / + col2 + col1 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT + - col0 + 60 * col0 FROM tab1 AS cor0
----
177
3776
4720

query I rowsort
SELECT DISTINCT 39 AS col1 FROM tab0, tab0 AS cor0
----
39

query I rowsort
SELECT ALL - col2 * - col1 * col1 AS col0 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT - col0 + - 89 AS col2 FROM tab0 AS cor0
----
-113
-124
-178

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7994
SELECT CAST( - col2 AS SIGNED ) + + col2 + - cor0.col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-7994
SELECT CAST ( - col2 AS INTEGER ) + + col2 + - cor0.col1 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7995
SELECT DISTINCT - - CAST( NULL AS DECIMAL ) + + col2 * col1 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7995
SELECT DISTINCT - - CAST ( NULL AS REAL ) + + col2 * col1 AS col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7996
SELECT + col0 + + col2 + cor0.col2 DIV + 78 FROM tab0 AS cor0
----
172
36
57

skipif mysql # not compatible
query I rowsort label-7996
SELECT + col0 + + col2 + cor0.col2 / + 78 FROM tab0 AS cor0
----
172
36
57

query I rowsort
SELECT + 44 + col1 FROM tab0 cor0
----
130
135
141

query I rowsort
SELECT DISTINCT + 33 + cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
115
34
66

query I rowsort
SELECT - cor0.col1 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1, tab1 AS cor2
----
243 values hashing to dba0629212dd6bf03c2834a27d0b07fb

query I rowsort
SELECT ALL ( 82 ) AS col1 FROM tab0 AS cor0
----
82
82
82

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

onlyif mysql # use DIV operator for integer division
query I rowsort label-8002
SELECT ALL + col1 * col0 DIV + 68 col0 FROM tab1
----
1
15
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8002
SELECT ALL + col1 * col0 / + 68 col0 FROM tab1
----
1
15
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8003
SELECT DISTINCT CAST( - 75 AS SIGNED ) AS col2 FROM tab2
----
-75

skipif mysql # not compatible
query I rowsort label-8003
SELECT DISTINCT CAST ( - 75 AS INTEGER ) AS col2 FROM tab2
----
-75

query I rowsort
SELECT DISTINCT + col0 + - 61 AS col0 FROM tab1
----
-58
19
3

query I rowsort
SELECT DISTINCT + tab2.col1 + - tab2.col2 * - col2 * - tab2.col0 + ( col1 ) * col0 FROM tab2
----
-112716
-48067
-4855

query I rowsort
SELECT col1 * col2 - col1 FROM tab0
----
0
2752
7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-8007
SELECT col2 + - col2 DIV + col1 col2 FROM tab2
----
26
27
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8007
SELECT col2 + - col2 / + col1 col2 FROM tab2
----
26
27
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-8008
SELECT tab0.col0 DIV + tab0.col0 AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8008
SELECT tab0.col0 / + tab0.col0 AS col0 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8009
SELECT 61 * tab0.col0 + ( col1 ) DIV col2 FROM tab0
----
1466
2232
5430

skipif mysql # not compatible
query I rowsort label-8009
SELECT 61 * tab0.col0 + ( col1 ) / col2 FROM tab0
----
1466
2232
5430

query I rowsort
SELECT col2 + + ( col1 ) FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + - cor0.col2 - + ( col1 ) AS col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT - col0 * + col1 + + 59 AS col1 FROM tab1 AS cor0
----
-19
-581
-981

query I rowsort
SELECT tab0.col2 + - tab0.col0 + - tab0.col0 * col2 AS col0 FROM tab0
----
-69
-7305
-783

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 12 * + cor0.col0 col0 FROM tab2 AS cor0
----
84
936
948

onlyif mysql # use DIV operator for integer division
query I rowsort label-8015
SELECT DISTINCT + - col1 DIV col2 + col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-8015
SELECT DISTINCT + - col1 / col2 + col1 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8016
SELECT DISTINCT col1 * col1 * CAST( NULL AS DECIMAL ) col2 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8016
SELECT DISTINCT col1 * col1 * CAST ( NULL AS REAL ) col2 FROM tab1
----
NULL

query I rowsort
SELECT cor0.col1 * col2 + col1 + col0 * 41 FROM tab0 AS cor0
----
11202
1629
3908

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8018
SELECT - CAST( NULL AS SIGNED ) col2 FROM tab2, 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-8018
SELECT - CAST ( NULL AS INTEGER ) col2 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + col2 + 16 + + col1 FROM tab2 AS cor0
----
101
71
74

query I rowsort
SELECT + 43 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8021
SELECT DISTINCT col2 DIV col0 + + col0 FROM tab0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-8021
SELECT DISTINCT col2 / col0 + + col0 FROM tab0
----
25
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8022
SELECT DISTINCT - col0 * - cor0.col1 * + CAST( NULL AS DECIMAL ) - col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8022
SELECT DISTINCT - col0 * - cor0.col1 * + CAST ( NULL AS REAL ) - col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8023
SELECT ALL col2 + - col1 DIV ( + col0 ) + col0 DIV ( - col0 * col1 + + col1 ) AS col1 FROM tab1 AS cor0
----
46
57
96

skipif mysql # not compatible
query I rowsort label-8023
SELECT ALL col2 + - col1 / ( + col0 ) + col0 / ( - col0 * col1 + + col1 ) AS col1 FROM tab1 AS cor0
----
46
57
96

query I rowsort
SELECT + col0 * - col1 + - 24 AS col1 FROM tab1 AS cor0
----
-102
-1064
-664

query I rowsort
SELECT ALL + 49 + col1 * - cor0.col1 * 84 AS col2 FROM tab1 cor0
----
-14147
-56735
-8351

query I rowsort
SELECT + col2 + - 87 AS col2 FROM tab2 cor0
----
-49
-60
-61

query I rowsort
SELECT ALL - col0 + 39 AS col0 FROM tab1 AS cor0
----
-25
-41
36

query I rowsort
SELECT ALL + col2 * - 15 + + col2 FROM tab2 AS cor0
----
-364
-378
-532

onlyif mysql # use DIV operator for integer division
query I rowsort label-8029
SELECT DISTINCT col1 DIV + col1 + + cor0.col1 FROM tab1 cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-8029
SELECT DISTINCT col1 / + col1 + + cor0.col1 FROM tab1 cor0
----
11
14
27

query I rowsort
SELECT ALL + col2 * col1 - + col1 AS col1 FROM tab1 AS cor0
----
1235
1378
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * + col1 - + col2 col0 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT ALL col1 * col0 + + ( + col1 ) * - col1 AS col1 FROM tab2 AS cor0
----
-744
1054
1121

query I rowsort
SELECT ALL + col0 * + ( col1 ) + - col0 AS col2 FROM tab0 AS cor0
----
2040
3360
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * + 32 col2 FROM tab2 AS cor0
----
-224
-2496
-2528

query I rowsort
SELECT col1 * - col1 + + col2 - 93 * col0 FROM tab1
----
-5995
-7513
-901

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + col2 col0 FROM tab0
----
171
36
57

query III rowsort
SELECT * FROM tab0 WHERE NOT ( - col2 * col0 ) IN ( col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 WHERE NULL NOT BETWEEN NULL AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8039
SELECT DISTINCT + col1 * col0 + col2 DIV col2 FROM tab0
----
2065
3396
8100

skipif mysql # not compatible
query I rowsort label-8039
SELECT DISTINCT + col1 * col0 + col2 / col2 FROM tab0
----
2065
3396
8100

query I rowsort
SELECT ALL col0 + col0 * - tab2.col1 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT col2 + col1 * - tab2.col0 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT col2 + + col0 * col2 * col0 FROM tab1
----
233529
540
614496

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( NULL ) NOT BETWEEN NULL AND + col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8044
SELECT DISTINCT + col1 + col0 DIV + col0 + col0 AS col2 FROM tab0
----
111
133
181

skipif mysql # not compatible
query I rowsort label-8044
SELECT DISTINCT + col1 + col0 / + col0 + col0 AS col2 FROM tab0
----
111
133
181

query I rowsort
SELECT tab0.col1 * - col1 * col1 AS col1 FROM tab0
----
-636056
-753571
-912673

onlyif mysql # use DIV operator for integer division
query I rowsort label-8046
SELECT + col1 DIV - col1 + + col0 + - col1 AS col0 FROM tab0
----
-3
-63
-63

skipif mysql # not compatible
query I rowsort label-8046
SELECT + col1 / - col1 + + col0 + - col1 AS col0 FROM tab0
----
-3
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col1 - col0 col1 FROM tab0
----
-132
-2862
-7551

query I rowsort
SELECT ALL - col1 * - col2 + - col2 FROM tab0
----
2805
7380
96

query I rowsort
SELECT - col2 + col2 + tab1.col0 AS col0 FROM tab1
----
3
64
80

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT + col1 - - col0 BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT col0 * col1 + + col2 FROM tab1 WHERE NULL IN ( col0 + col1 )
----

query I rowsort
SELECT DISTINCT col1 * tab0.col1 FROM tab0 WHERE ( col1 - - col1 ) IN ( + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8053
SELECT col1 DIV col0 + col2 * col1 + + col0 DIV + col0 FROM tab0
----
100
2842
7464

skipif mysql # not compatible
query I rowsort label-8053
SELECT col1 / col0 + col2 * col1 + + col0 / + col0 FROM tab0
----
100
2842
7464

onlyif mysql # use DIV operator for integer division
query I rowsort label-8054
SELECT DISTINCT + col2 * col1 DIV - col0 + col0 * + tab0.col0 + col2 AS col2 FROM tab0
----
1224
491
7920

skipif mysql # not compatible
query I rowsort label-8054
SELECT DISTINCT + col2 * col1 / - col0 + col0 * + tab0.col0 + col2 AS col2 FROM tab0
----
1224
491
7920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col2 FROM tab1 WHERE NOT + col0 - - col1 < ( col1 )
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 38 - + cor0.col2 col2 FROM tab1 AS cor0
----
-16
-19
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-8057
SELECT + - cor0.col2 + + col1 DIV - 60 AS col2 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-8057
SELECT + - cor0.col2 + + col1 / - 60 AS col2 FROM tab0 AS cor0
----
-2
-34
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 92 + col2 col0 FROM tab1 AS cor0
----
-35
-38
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8059
SELECT - CAST( + col2 AS SIGNED ) + col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8059
SELECT - CAST ( + col2 AS INTEGER ) + col2 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT DISTINCT 71 * + 48 FROM tab0
----
3408

query I rowsort
SELECT DISTINCT - + 49 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-49

query I rowsort
SELECT ALL 0 AS col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT col1 * - cor0.col1 * + 35 FROM tab0 AS cor0
----
-258860
-289835
-329315

query I rowsort
SELECT ALL + 36 AS col0 FROM tab2 AS cor0
----
36
36
36

query I rowsort
SELECT DISTINCT + - col0 + - col1 * 43 FROM tab0 AS cor0
----
-3722
-4002
-4206

query I rowsort
SELECT + 62 - + col1 * col0 AS col0 FROM tab1 AS cor0
----
-16
-578
-978

query I rowsort
SELECT ALL - col0 * col0 * col1 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT col0 * - col0 - + col0 * - col2 * col1 FROM tab0 AS cor0
----
2170
656197
67536

query I rowsort
SELECT DISTINCT 47 + col2 FROM tab1 AS cor0
----
101
104
143

query I rowsort
SELECT - col1 + - cor0.col2 * 61 FROM tab0 AS cor0
----
-158
-2099
-5093

query I rowsort
SELECT + 61 * - col0 FROM tab2 AS cor0
----
-427
-4758
-4819

query I rowsort
SELECT + - cor0.col1 - - col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 cor1, tab2 AS cor2
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query I rowsort
SELECT ALL 75 AS col2 FROM tab0, tab2 AS cor0, tab2 cor1, tab1 cor2
----
81 values hashing to 3384246e49f3e69ba32c165b88111fee

query I rowsort
SELECT DISTINCT + col0 * ( - col1 ) + col2 FROM tab2 AS cor0
----
-1305
-190
-4576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8077
SELECT DISTINCT - col1 * CAST( NULL AS SIGNED ) * col1 + cor0.col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8077
SELECT DISTINCT - col1 * CAST ( NULL AS INTEGER ) * col1 + cor0.col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT + 43 FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

query I rowsort
SELECT - 32 + 94 * col1 FROM tab0 AS cor0
----
8052
8522
9086

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8080
SELECT ALL - CAST( col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-8080
SELECT ALL - CAST ( col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - ( - col1 ) * col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT 26 + + col0 AS col0 FROM tab0
----
115
50
61

query I rowsort
SELECT ( - col2 * + col2 ) FROM tab2
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-8084
SELECT DISTINCT - + 28 * col2 DIV - col2 FROM tab1 cor0
----
28

skipif mysql # not compatible
query I rowsort label-8084
SELECT DISTINCT - + 28 * col2 / - col2 FROM tab1 cor0
----
28

query I rowsort
SELECT ALL + cor1.col0 * 55 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to ba75f868349fa6ac2637b6d411685f70

query I rowsort
SELECT DISTINCT + 88 AS col1 FROM tab0, tab2 AS cor0
----
88

query I rowsort
SELECT DISTINCT + - col2 + ( + cor0.col1 ) * ( + col1 ) FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT col2 * col2 + + 98 * col2 FROM tab1 AS cor0
----
18624
8208
8835

query I rowsort
SELECT DISTINCT + col1 * col2 * + cor0.col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT DISTINCT - ( col0 ) * - ( - col1 ) + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL - 0 - + col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - col1 + + 74 * col1 FROM tab2 AS cor0
----
1241
2263
4307

query I rowsort
SELECT ALL col0 + - ( - col0 ) AS col2 FROM tab2 AS cor0
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-8094
SELECT + col0 + + col1 DIV ( col1 ) AS col1 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-8094
SELECT + col0 + + col1 / ( col1 ) AS col1 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT col2 * - 37 + - col0 AS col2 FROM tab1 AS cor0
----
-2001
-2173
-3632

query I rowsort
SELECT - col1 + - ( + 84 ) FROM tab2 AS cor0
----
-101
-115
-143

onlyif mysql # use DIV operator for integer division
query I rowsort label-8097
SELECT 11 DIV ( col0 * - ( col1 ) ) FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8097
SELECT 11 / ( col0 * - ( col1 ) ) FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - ( + ( col2 ) + + col0 * col0 ) FROM tab2
----
-6110
-6279
-76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8099
SELECT DISTINCT CAST( NULL AS SIGNED ) * col1 + - col2 * tab0.col2 / + col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-8099
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col1 + - col2 * tab0.col2 / + col0 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT + 12 AS col2 FROM tab1, tab2 cor0
----
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col2 + - ( - tab0.col1 * + ( - 77 ) ) col0 FROM tab0
----
-6589
-6925
-7468

query I rowsort
SELECT DISTINCT 73 FROM tab1, tab0, tab2 AS cor0
----
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-8103
SELECT + + cor0.col0 DIV cor0.col2 + - col2 * col1 AS col1 FROM tab0 AS cor0
----
-2838
-62
-7461

skipif mysql # not compatible
query I rowsort label-8103
SELECT + + cor0.col0 / cor0.col2 + - col2 * col1 AS col1 FROM tab0 AS cor0
----
-2838
-62
-7461

query I rowsort
SELECT cor0.col0 + 75 AS col2 FROM tab1 AS cor0
----
139
155
78

query I rowsort
SELECT ALL + + col1 * col1 + + col0 * - col1 AS col2 FROM tab0 AS cor0
----
182
5332
6014

query I rowsort
SELECT ALL + - col0 + + col1 * + 50 AS col1 FROM tab0 AS cor0
----
4276
4461
4815

query I rowsort
SELECT ALL + cor0.col2 * - col0 - - col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT 16 + - col2 AS col2 FROM tab2 AS cor0
----
-10
-11
-22

query I rowsort
SELECT - 33 * col0 FROM tab2
----
-231
-2574
-2607

query I rowsort
SELECT col2 * col2 + col2 AS col1 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT - ( col0 ) * col0 AS col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT col0 * + 53 AS col1 FROM tab2
----
371
4134
4187

query I rowsort
SELECT + 55 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8114
SELECT + - 43 * + col1 / - ( 53 ) + - col1 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8114
SELECT + - 43 * + col1 / - ( 53 ) + - col1 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * + col0 col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT col1 * col2 + - col2 + 20 FROM tab0
----
116
2825
7400

onlyif mysql # use DIV operator for integer division
query I rowsort label-8117
SELECT - ( - tab2.col2 ) DIV + ( 39 ) + col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-8117
SELECT - ( - tab2.col2 ) / + ( 39 ) + col0 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL + col1 + + col1 * ( col2 ) - col1 AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - col0 * col0 * col2 - + tab1.col0 FROM tab1
----
-233536
-489
-614480

query I rowsort
SELECT + ( - col2 ) + + 74 * - cor0.col0 * - col0 AS col2 FROM tab2 AS cor0
----
3599
450190
461796

onlyif mysql # use DIV operator for integer division
query I rowsort label-8121
SELECT col1 DIV + col0 col1 FROM tab1
----
0
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8121
SELECT col1 / + col0 col1 FROM tab1
----
0
0
8

query I rowsort
SELECT + + col1 * + cor0.col0 * - ( col1 ) AS col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT - col0 + + cor0.col1 AS col2 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT ALL col1 - + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col1 * - ( ( col0 ) ) + - col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT + 39 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

query I rowsort
SELECT + - col2 + - ( + cor0.col1 ) + - col2 AS col0 FROM tab1 AS cor0
----
-124
-134
-205

query I rowsort
SELECT ALL + cor0.col0 + - col2 * ( - cor0.col2 ) FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL + + col1 * + 78 + ( col1 ) FROM tab1 AS cor0
----
1027
2054
790

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8130
SELECT DISTINCT + col0 * CAST( NULL AS SIGNED ) + col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8130
SELECT DISTINCT + col0 * CAST ( NULL AS INTEGER ) + col2 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8131
SELECT col2 + CAST( col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-8131
SELECT col2 + CAST ( col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL + col1 + col1 * + 36 * col1 FROM tab1 AS cor0
----
24362
3610
6097

query I rowsort
SELECT - - 11 FROM tab0 AS cor0
----
11
11
11

query I rowsort
SELECT - - 97 * col1 FROM tab2 AS cor0
----
1649
3007
5723

query I rowsort
SELECT ( 70 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

query I rowsort
SELECT ALL 47 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 18 * - tab1.col0 + - cor0.col2 col2 FROM tab1, tab1 cor0
----
9 values hashing to d042ef4baee65e399e397c6d4f10e4c5

query I rowsort
SELECT - 55 * col2 * + cor0.col1 FROM tab2 AS cor0
----
-35530
-46035
-84370

query I rowsort
SELECT + ( + col2 ) + - col0 * - col0 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT ALL - tab1.col1 - ( - col1 ) * + col2 * + 20 FROM tab1
----
11390
24947
28054

query I rowsort
SELECT ALL col0 - + 9 FROM tab1
----
-6
55
71

query I rowsort
SELECT ALL - tab2.col2 - + 92 AS col0 FROM tab2
----
-118
-119
-130

onlyif mysql # use DIV operator for integer division
query I rowsort label-8143
SELECT col2 - col1 DIV col0 AS col2 FROM tab1
----
46
57
96

skipif mysql # not compatible
query I rowsort label-8143
SELECT col2 - col1 / col0 AS col2 FROM tab1
----
46
57
96

query I rowsort
SELECT ALL col0 * + 92 - - tab2.col0 FROM tab2
----
651
7254
7347

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - col2 col1 FROM tab0
----
53
9
96

query I rowsort
SELECT - col1 * + 76 FROM tab1
----
-1976
-760
-988

query I rowsort
SELECT DISTINCT - cor0.col2 * ( col0 ) AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - - 90 * - 92 FROM tab1 AS cor0
----
-8280
-8280
-8280

query I rowsort
SELECT ( cor0.col1 ) + + col0 * - col0 - ( col2 ) * 58 AS col2 FROM tab2 AS cor0
----
-1584
-7533
-8428

query I rowsort
SELECT ALL - ( 92 ) + + col0 * + col1 AS col1 FROM tab2
----
125
1251
4510

query I rowsort
SELECT + col0 + - 46 FROM tab1 AS cor0
----
-43
18
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8152
SELECT + CAST( NULL AS DECIMAL ) * col1 - - col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8152
SELECT + CAST ( NULL AS REAL ) * col1 - - col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 + col1 * - col2 * col0 AS col0 FROM tab0 AS cor0
----
-3298
-664027
-68026

query I rowsort
SELECT 64 + col1 AS col0 FROM tab2 AS cor0
----
123
81
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8155
SELECT DISTINCT CAST( - col1 AS SIGNED ) * col0 + 86 AS col1 FROM tab2 AS cor0
----
-1257
-131
-4516

skipif mysql # not compatible
query I rowsort label-8155
SELECT DISTINCT CAST ( - col1 AS INTEGER ) * col0 + 86 AS col1 FROM tab2 AS cor0
----
-1257
-131
-4516

query I rowsort
SELECT ALL - + 98 + col1 + col0 FROM tab1 AS cor0
----
-24
-5
-69

query I rowsort
SELECT + + col0 + 94 FROM tab2 AS cor0
----
101
172
173

query I rowsort
SELECT DISTINCT cor0.col0 * ( col2 ) FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8159
SELECT ALL - CAST( + col0 AS SIGNED ) * col0 + col1 + col1 FROM tab2 AS cor0
----
-5966
-6207
13

skipif mysql # not compatible
query I rowsort label-8159
SELECT ALL - CAST ( + col0 AS INTEGER ) * col0 + col1 + col1 FROM tab2 AS cor0
----
-5966
-6207
13

query I rowsort
SELECT DISTINCT - ( col2 ) * - col1 + + 70 + - col0 FROM tab2 AS cor0
----
1526
637
900

query I rowsort
SELECT + + ( - col2 ) + col1 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - cor0.col1 + + 19 + - col2 FROM tab0 AS cor0
----
-100
-154
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 62 col2 FROM tab1 AS cor0
----
62
62
62

query I rowsort
SELECT col1 + 67 AS col2 FROM tab2 AS cor0
----
126
84
98

query I rowsort
SELECT ALL + col2 * - 67 * + col1 + - 42 AS col1 FROM tab2 AS cor0
----
-102820
-43324
-56121

query I rowsort
SELECT 42 * ( + col0 ) + - col1 FROM tab1 AS cor0
----
100
2678
3347

query I rowsort
SELECT ALL ( + col1 ) + - col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ( - col2 ) * + cor0.col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - col0 + col1 * - col0 * col1 AS col0 FROM tab2 AS cor0
----
-22910
-271596
-6734

query I rowsort
SELECT ALL 52 AS col0 FROM tab1 cor0
----
52
52
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-8171
SELECT - col1 + col2 DIV col2 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-8171
SELECT - col1 + col2 / col2 FROM tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT DISTINCT 71 * col0 * + col2 FROM tab2 AS cor0
----
13419
143988
213142

onlyif mysql # use DIV operator for integer division
query I rowsort label-8173
SELECT DISTINCT + ( col2 ) DIV + col0 AS col1 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8173
SELECT DISTINCT + ( col2 ) / + col0 AS col1 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT + + ( + col2 ) + ( col2 ) AS col2 FROM tab2 AS cor0
----
52
54
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 col2 FROM tab1 AS cor0
----
25
25
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-8176
SELECT DISTINCT + 48 DIV - cor0.col0 col1 FROM tab1 AS cor0
----
-16
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8176
SELECT DISTINCT + 48 / - cor0.col0 col1 FROM tab1 AS cor0
----
-16
0

query I rowsort
SELECT DISTINCT col1 * - 28 AS col2 FROM tab2 cor0
----
-1652
-476
-868

query I rowsort
SELECT + - col2 * + ( - col2 ) AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL col1 * ( col1 ) * col1 AS col2 FROM tab1 AS cor0
----
1000
17576
2197

query I rowsort
SELECT ALL - col1 * col2 + 32 * + col2 FROM tab0 AS cor0
----
-1782
-4838
-65

query I rowsort
SELECT - + col0 * cor0.col1 * 16 AS col1 FROM tab1 AS cor0
----
-10240
-1248
-16640

query I rowsort
SELECT ALL - cor0.col1 * + 67 AS col2 FROM tab0 AS cor0
----
-5762
-6097
-6499

onlyif mysql # use DIV operator for integer division
query I rowsort label-8183
SELECT col2 DIV col2 + - col0 AS col2 FROM tab0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-8183
SELECT col2 / col2 + - col0 AS col2 FROM tab0
----
-23
-34
-88

query I rowsort
SELECT ALL - col0 + col1 * + col2 * col1 FROM tab1 AS cor0
----
16144
36501
5636

onlyif mysql # use DIV operator for integer division
query I rowsort label-8185
SELECT ALL - col2 DIV - col2 - col0 * + col1 FROM tab1 AS cor0
----
-1039
-639
-77

skipif mysql # not compatible
query I rowsort label-8185
SELECT ALL - col2 / - col2 - col0 * + col1 FROM tab1 AS cor0
----
-1039
-639
-77

query I rowsort
SELECT DISTINCT col2 * - col2 AS col0 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT col1 * 94 * col2 FROM tab1 AS cor0
----
117312
131976
53580

query I rowsort
SELECT ALL - col0 * ( + col1 ) AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + col0 * 41 FROM tab2 cor0
----
287
3198
3239

onlyif mysql # use DIV operator for integer division
query I rowsort label-8190
SELECT DISTINCT + tab1.col0 DIV - tab1.col1 AS col0 FROM tab1
----
-6
0

skipif mysql # not compatible
query I rowsort label-8190
SELECT DISTINCT + tab1.col0 / - tab1.col1 AS col0 FROM tab1
----
-6
0

query I rowsort
SELECT DISTINCT + - col0 * col2 AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - col2 * - ( ( + col1 ) ) * col0 FROM tab0
----
3395
664118
68112

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab0, tab0 cor1, tab0 AS cor2
----
972 values hashing to ea0f747588ddf5869ee18a5e22d9f237

query I rowsort
SELECT DISTINCT + col2 * 88 * col1 AS col2 FROM tab2
----
134992
56848
73656

onlyif mysql # use DIV operator for integer division
query I rowsort label-8195
SELECT DISTINCT 43 DIV col2 + 33 FROM tab0 AS cor0
----
33
34
76

skipif mysql # not compatible
query I rowsort label-8195
SELECT DISTINCT 43 / col2 + 33 FROM tab0 AS cor0
----
33
34
76

query I rowsort
SELECT col1 + + col0 * col1 * - col1 FROM tab1 cor0
----
-13507
-2002
-6390

query I rowsort
SELECT ALL - 91 + col2 FROM tab0 AS cor0
----
-58
-9
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8198
SELECT + cor0.col1 + cor0.col2 * CAST( ( + col2 ) AS SIGNED ) FROM tab2 AS cor0
----
1461
735
760

skipif mysql # not compatible
query I rowsort label-8198
SELECT + cor0.col1 + cor0.col2 * CAST ( ( + col2 ) AS INTEGER ) FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT DISTINCT col1 * - col2 + + col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL - - cor0.col0 + col2 * 57 FROM tab2 AS cor0
----
1546
1560
2245

query I rowsort
SELECT - ( - cor0.col1 ) * + col0 + 66 AS col0 FROM tab2 AS cor0
----
1409
283
4668

query I rowsort
SELECT tab1.col0 * + col0 AS col1 FROM tab1
----
4096
6400
9

query I rowsort
SELECT ALL - col1 + - col2 * col1 FROM tab2 AS cor0
----
-1593
-663
-868

onlyif mysql # use DIV operator for integer division
query I rowsort label-8204
SELECT + cor0.col1 DIV col0 + - 20 * col1 * - cor0.col1 FROM tab1 AS cor0
----
13528
2000
3380

skipif mysql # not compatible
query I rowsort label-8204
SELECT + cor0.col1 / col0 + - 20 * col1 * - cor0.col1 FROM tab1 AS cor0
----
13528
2000
3380

query I rowsort
SELECT ALL + - col0 * cor0.col0 + + col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT DISTINCT + 16 + col0 AS col2 FROM tab2 cor0
----
23
94
95

query I rowsort
SELECT + cor1.col0 * ( - cor1.col2 ) AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 91af1085835c3ef572d2dbd91480f658

query I rowsort
SELECT - 80 + col0 * + col0 FROM tab1 cor0
----
-71
4016
6320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8209
SELECT - + CAST( NULL AS DECIMAL ) + - col0 * + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8209
SELECT - + CAST ( NULL AS REAL ) + - col0 * + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + ( - 40 ) + cor0.col0 AS col1 FROM tab0 AS cor0
----
-16
-5
49

query I rowsort
SELECT + col2 + - 37 * - col1 AS col2 FROM tab1 AS cor0
----
1016
427
577

query I rowsort
SELECT + col0 * col0 + col1 + col2 FROM tab2 cor0
----
107
6169
6296

query I rowsort
SELECT - col2 * ( cor0.col1 ) * + cor0.col0 AS col1 FROM tab1 cor0
----
-36480
-4212
-99840

query I rowsort
SELECT + col0 * + ( col1 ) + - ( - col1 ) + - col1 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + col0 * + 66 + col1 + col1 AS col0 FROM tab0
----
1756
2504
6056

query I rowsort
SELECT DISTINCT col0 + ( col0 + - col2 * + 49 ) AS col0 FROM tab0
----
-1569
-3840
21

query I rowsort
SELECT + col1 + + col1 * col0 AS col2 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8218
SELECT + CAST( NULL AS SIGNED ) * + col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8218
SELECT + CAST ( NULL AS INTEGER ) * + col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 76 + cor0.col1 * - col2 col1 FROM tab1 AS cor0
----
-1172
-1328
-494

query I rowsort
SELECT DISTINCT col0 + - 59 AS col2 FROM tab2
----
-52
19
20

query I rowsort
SELECT + col0 * col0 * - 56 + + 8 * + cor0.col1 AS col1 FROM tab2 cor0
----
-2496
-340232
-349360

query I rowsort
SELECT ( ( col0 ) ) FROM tab1
----
3
64
80

query I rowsort
SELECT col1 * - col0 + col1 + col2 AS col2 FROM tab2 AS cor0
----
-1288
-159
-4517

query I rowsort
SELECT - + cor0.col1 + + 93 FROM tab0 AS cor0
----
-4
2
7

query I rowsort
SELECT + 80 * 13 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d8933ac1c2c2e7e9a564d37fb5255fd0

query I rowsort
SELECT DISTINCT - cor0.col1 * + tab2.col0 AS col0 FROM tab2, tab0, tab1 AS cor0
----
9 values hashing to bd3a01f5788d5b65679da995dbe27636

query I rowsort
SELECT DISTINCT 93 FROM tab1, tab0 AS cor0
----
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8228
SELECT - tab1.col1 DIV + 76 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8228
SELECT - tab1.col1 / + 76 AS col2 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * ( + col2 ) col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT col0 + ( - ( col1 ) * + 69 ) AS col0 FROM tab2
----
-1094
-2132
-3993

query I rowsort
SELECT - col0 + 54 * + col2 + ( + 21 ) * col1 FROM tab0 AS cor0
----
2056
3564
6250

onlyif mysql # use DIV operator for integer division
query I rowsort label-8232
SELECT DISTINCT col1 DIV col0 - col2 DIV ( col1 ) FROM tab2
----
-2
0
4

skipif mysql # not compatible
query I rowsort label-8232
SELECT DISTINCT col1 / col0 - col2 / ( col1 ) FROM tab2
----
-2
0
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8233
SELECT DISTINCT CAST( - col0 * - col2 AS SIGNED ) - - CAST( - ( col1 ) AS SIGNED ) FROM tab1
----
136
3638
7667

skipif mysql # not compatible
query I rowsort label-8233
SELECT DISTINCT CAST ( - col0 * - col2 AS INTEGER ) - - CAST ( - ( col1 ) AS INTEGER ) FROM tab1
----
136
3638
7667

query I rowsort
SELECT col0 + col0 + col2 * - col1 AS col2 FROM tab0
----
-27
-2790
-7284

query I rowsort
SELECT ALL - ( + col0 ) + - col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT + + ( col1 ) + - col0 * col2 AS col0 FROM tab2 cor0
----
-158
-1969
-2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col2 * - col1 col0 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT - col2 * - col2 * ( + tab2.col2 + - tab2.col0 ) AS col2 FROM tab2
----
-35152
-59204
14580

query I rowsort
SELECT col2 * col2 + - 25 AS col1 FROM tab2
----
1419
651
704

query I rowsort
SELECT DISTINCT - 76 * - 22 FROM tab2, tab1 cor0
----
1672

query I rowsort
SELECT DISTINCT - 35 AS col2 FROM tab1, tab2 AS cor0
----
-35

query I rowsort
SELECT ALL + - cor0.col2 * + 50 * - col2 + col1 * col2 - col1 FROM tab2 AS cor0
----
35275
37256
72829

query I rowsort
SELECT ALL - col0 * - 31 * + col0 AS col0 FROM tab2 AS cor0
----
1519
188604
193471

query I rowsort
SELECT DISTINCT + - col0 + 56 FROM tab2 AS cor0
----
-22
-23
49

query I rowsort
SELECT ALL 29 AS col0 FROM tab0
----
29
29
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-8246
SELECT ALL - - col1 DIV - 35 + col2 AS col0 FROM tab1 cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8246
SELECT ALL - - col1 / - 35 + col2 AS col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL 92 AS col2 FROM tab0
----
92
92
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8248
SELECT CAST( NULL AS SIGNED ) + cor0.col0 * cor0.col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8248
SELECT CAST ( NULL AS INTEGER ) + cor0.col0 * cor0.col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - - 18 AS col2 FROM tab1 AS cor0
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 54 * + col2 col1 FROM tab1 AS cor0
----
-2916
-3078
-5184

query I rowsort
SELECT ALL + col0 + cor0.col1 * 27 FROM tab0 AS cor0
----
2346
2546
2654

query I rowsort
SELECT DISTINCT - 92 * col0 FROM tab1
----
-276
-5888
-7360

query I rowsort
SELECT col1 + col1 + ( + 92 + - col1 ) FROM tab2
----
109
123
151

query I rowsort
SELECT ALL col1 * col2 + - ( col0 ) - col2 AS col2 FROM tab0
----
2781
61
7291

query I rowsort
SELECT DISTINCT 88 AS col0 FROM tab0, tab1 AS cor0, tab2 cor1
----
88

query I rowsort
SELECT ALL + 93 AS col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT col2 + col0 * - 38 AS col1 FROM tab0
----
-1329
-3300
-879

query I rowsort
SELECT + - col1 + col2 * + ( col0 ) * - col1 FROM tab2 AS cor0
----
-119711
-51051
-5890

onlyif mysql # use DIV operator for integer division
query I rowsort label-8259
SELECT ALL - tab1.col0 + ( - col2 + - tab1.col0 ) DIV ( + col1 ) col1 FROM tab1
----
-5
-76
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8259
SELECT ALL - tab1.col0 + ( - col2 + - tab1.col0 ) / ( + col1 ) col1 FROM tab1
----
-5
-76
-93

query I rowsort
SELECT col1 + 79 * - col2 * col0 FROM tab0
----
-2668
-576451
-62482

query I rowsort
SELECT ALL - 93 + - col1 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
-1627
-739
-930

onlyif mysql # use DIV operator for integer division
query I rowsort label-8262
SELECT DISTINCT + ( + col0 ) DIV col2 AS col1 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8262
SELECT DISTINCT + ( + col0 ) / col2 AS col1 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT ALL 59 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

onlyif mysql # use DIV operator for integer division
query I rowsort label-8264
SELECT col1 + - col2 * 35 DIV - col1 FROM tab0
----
122
97
99

skipif mysql # not compatible
query I rowsort label-8264
SELECT col1 + - col2 * 35 / - col1 FROM tab0
----
122
97
99

query I rowsort
SELECT col2 + 60 AS col2 FROM tab0 AS cor0
----
142
61
93

query I rowsort
SELECT DISTINCT - + ( 35 ) FROM tab1 AS cor0
----
-35

query I rowsort
SELECT + col0 + - 4 FROM tab0 AS cor0
----
20
31
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-8268
SELECT ALL + + 36 DIV - col0 FROM tab1 AS cor0
----
-12
0
0

skipif mysql # not compatible
query I rowsort label-8268
SELECT ALL + + 36 / - col0 FROM tab1 AS cor0
----
-12
0
0

query I rowsort
SELECT + col1 + ( col2 ) * col1 AS col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + 81 * col2 AS col0 FROM tab0
----
2673
6642
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-8271
SELECT DISTINCT - - ( 44 ) DIV col2 FROM tab0 AS cor0
----
0
1
44

skipif mysql # not compatible
query I rowsort label-8271
SELECT DISTINCT - - ( 44 ) / col2 FROM tab0 AS cor0
----
0
1
44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8272
SELECT DISTINCT + + CAST( NULL AS SIGNED ) + + col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8272
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) + + col0 FROM tab0 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8273
SELECT + col1 DIV + col1 col1 FROM tab2 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8273
SELECT + col1 / + col1 col1 FROM tab2 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - col1 * 55 FROM tab1 AS cor0
----
-1430
-550
-715

onlyif mysql # use DIV operator for integer division
query I rowsort label-8275
SELECT + 40 DIV 19 AS col1 FROM tab2 cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-8275
SELECT + 40 / 19 AS col1 FROM tab2 cor0
----
2
2
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8276
SELECT DISTINCT + + CAST( NULL AS SIGNED ) + 82 AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8276
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) + 82 AS col2 FROM tab0 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8277
SELECT cor0.col1 DIV + col1 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8277
SELECT cor0.col1 / + col1 FROM tab2 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - - 74 AS col1 FROM tab1 cor0
----
74

query I rowsort
SELECT ALL + 10 AS col0 FROM tab0 AS cor0
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * ( col2 ) col1 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * cor0.col0 col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col2 * 57 AS col1 FROM tab2 AS cor0
----
1482
1539
2166

query I rowsort
SELECT ALL - ( col0 * col0 ) AS col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT + 67 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

onlyif mysql # use DIV operator for integer division
query I rowsort label-8285
SELECT ALL + 89 DIV col0 col2 FROM tab0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8285
SELECT ALL + 89 / col0 col2 FROM tab0
----
1
2
3

query I rowsort
SELECT + 9 * - ( col1 ) + + ( ( - col0 ) ) FROM tab1
----
-154
-197
-237

query I rowsort
SELECT - col0 * + 80 FROM tab1
----
-240
-5120
-6400

query I rowsort
SELECT - + ( + col2 ) + + col2 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col1 + col2 + - col1 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-8290
SELECT DISTINCT - col1 + - col2 DIV col1 FROM tab2 AS cor0
----
-19
-31
-59

skipif mysql # not compatible
query I rowsort label-8290
SELECT DISTINCT - col1 + - col2 / col1 FROM tab2 AS cor0
----
-19
-31
-59

query I rowsort
SELECT - - col1 * ( col0 ) + col2 * + col2 FROM tab2 AS cor0
----
2787
5278
946

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8292
SELECT DISTINCT - 26 * - ( - col2 ) + - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8292
SELECT DISTINCT - 26 * - ( - col2 ) + - CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 18 AS col2 FROM tab0, tab2 AS cor0
----
18

query I rowsort
SELECT 11 * col0 + + col2 FROM tab1 AS cor0
----
761
87
976

query I rowsort
SELECT ALL + col0 + - 59 AS col2 FROM tab0 AS cor0
----
-24
-35
30

query I rowsort
SELECT ALL - col1 + col2 * col2 AS col2 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT + + 14 AS col0 FROM tab0 AS cor0
----
14
14
14

query I rowsort
SELECT DISTINCT col1 * col0 + col2 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL - ( col2 * + col1 ) AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + tab0.col2 * 1 + col2 * ( ( col0 ) ) FROM tab0
----
36
7380
825

query I rowsort
SELECT 68 * - col2 + + col0 FROM tab1
----
-3669
-3812
-6448

query I rowsort
SELECT - 66 + + 99 FROM tab0
----
33
33
33

query I rowsort
SELECT 90 * - col0 FROM tab2 AS cor0
----
-630
-7020
-7110

query I rowsort
SELECT - col0 * col1 + + col1 + col0 AS col1 FROM tab0 AS cor0
----
-1954
-3263
-7919

query I rowsort
SELECT DISTINCT + col1 * - col0 * + cor0.col2 FROM tab2 cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + - col0 * + ( 4 ) AS col1 FROM tab0 cor0
----
-140
-356
-96

query I rowsort
SELECT ALL cor0.col0 * cor0.col1 + + cor0.col0 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT + 6 AS col0 FROM tab2, tab0 AS cor0, tab0, tab1 AS cor1
----
6

query I rowsort
SELECT + + col2 * 72 AS col2 FROM tab0 AS cor0
----
2376
5904
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-8310
SELECT + cor0.col0 DIV + col1 - ( + cor0.col2 + col2 ) FROM tab2 AS cor0
----
-51
-54
-72

skipif mysql # not compatible
query I rowsort label-8310
SELECT + cor0.col0 / + col1 - ( + cor0.col2 + col2 ) FROM tab2 AS cor0
----
-51
-54
-72

query I rowsort
SELECT ALL - col0 + + col0 * + col1 AS col2 FROM tab1 AS cor0
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-8312
SELECT col2 + + 22 DIV + 33 AS col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8312
SELECT col2 + + 22 / + 33 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - 46 - - col1 AS col2 FROM tab0
----
40
45
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8314
SELECT ALL + + col1 + ( + cor0.col0 + - col0 ) * CAST( + col0 AS SIGNED ) FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-8314
SELECT ALL + + col1 + ( + cor0.col0 + - col0 ) * CAST ( + col0 AS INTEGER ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - col1 * 83 AS col0 FROM tab1 AS cor0
----
-1079
-2158
-830

query I rowsort
SELECT col2 - + 10 AS col1 FROM tab2 AS cor0
----
16
17
28

query I rowsort
SELECT DISTINCT - col2 * col0 - - col1 AS col2 FROM tab0 cor0
----
-706
-7207
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8318
SELECT DISTINCT - + cor0.col2 * CAST( 28 AS SIGNED ) FROM tab2 AS cor0
----
-1064
-728
-756

skipif mysql # not compatible
query I rowsort label-8318
SELECT DISTINCT - + cor0.col2 * CAST ( 28 AS INTEGER ) FROM tab2 AS cor0
----
-1064
-728
-756

onlyif mysql # use DIV operator for integer division
query I rowsort label-8319
SELECT ALL col1 * - col0 + + cor0.col0 DIV - cor0.col0 FROM tab2 AS cor0
----
-1344
-218
-4603

skipif mysql # not compatible
query I rowsort label-8319
SELECT ALL col1 * - col0 + + cor0.col0 / - cor0.col0 FROM tab2 AS cor0
----
-1344
-218
-4603

query I rowsort
SELECT DISTINCT col2 * - col1 * col0 - - col2 * 29 FROM tab0 AS cor0
----
-3366
-661740
-67155

onlyif mysql # use DIV operator for integer division
query I rowsort label-8321
SELECT ALL + col2 - col0 DIV + col2 AS col1 FROM tab0 AS cor0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-8321
SELECT ALL + col2 - col0 / + col2 AS col1 FROM tab0 AS cor0
----
-34
33
81

query I rowsort
SELECT - 95 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to cf302b83f15b730fe35c19bdd9363c13

query I rowsort
SELECT ALL + col0 + - tab2.col0 * col2 AS col1 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT ALL - 72 * col2 AS col0 FROM tab2 AS cor0
----
-1872
-1944
-2736

onlyif mysql # use DIV operator for integer division
query I rowsort label-8325
SELECT DISTINCT - ( + col0 ) DIV - col2 AS col2 FROM tab1 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8325
SELECT DISTINCT - ( + col0 ) / - col2 AS col2 FROM tab1 cor0
----
0
1

query I rowsort
SELECT - 86 + col2 * col0 AS col2 FROM tab1 AS cor0
----
3562
7594
76

query I rowsort
SELECT 67 * + col0 AS col0 FROM tab1 AS cor0
----
201
4288
5360

query I rowsort
SELECT + 13 * + col1 AS col0 FROM tab0 AS cor0
----
1118
1183
1261

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col1 - cor0.col0 col0 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT col1 * 7 AS col0 FROM tab0 AS cor0
----
602
637
679

query I rowsort
SELECT - 93 * - col0 FROM tab1 AS cor0
----
279
5952
7440

query I rowsort
SELECT cor0.col1 * - col1 + + col0 * col0 AS col0 FROM tab1 AS cor0
----
-667
3996
6231

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab1, tab0 AS cor0
----
98

query I rowsort
SELECT ALL 5 FROM tab1, tab2 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8335
SELECT + CAST( NULL AS SIGNED ) + 73 * + col2 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-8335
SELECT + CAST ( NULL AS INTEGER ) + 73 * + col2 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - col0 ) * - col1 * - col0 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT + col2 * - ( tab1.col2 ) * col0 + + col0 AS col0 FROM tab1
----
-207872
-737200
-8745

query I rowsort
SELECT ALL + col1 + 66 FROM tab1 AS cor0
----
76
79
92

query I rowsort
SELECT DISTINCT - ( col0 ) * col1 AS col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + col0 * col1 * - col2 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL tab0.col2 + col2 * col0 AS col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT ALL + col1 AS col1 FROM tab0 WHERE NOT NULL NOT IN ( tab0.col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8343
SELECT + tab0.col0 DIV - col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8343
SELECT + tab0.col0 / - col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col1 - col0 * col2 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 WHERE NOT NULL < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col1 col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - col2 * col0 + col2 * - cor0.col0 FROM tab2 AS cor0
----
-378
-4056
-6004

query I rowsort
SELECT - col1 + col0 * - col1 + col1 AS col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT col2 * cor0.col1 + + col1 AS col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL + col2 + - col0 * col0 * col2 FROM tab0
----
-1224
-18975
-649440

query I rowsort
SELECT DISTINCT - - cor0.col2 + - col0 AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - + col2 * + col2 + cor0.col1 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT ALL - col1 + cor0.col2 * col0 * col1 FROM tab2 AS cor0
----
119593
51017
5828

query I rowsort
SELECT DISTINCT col1 * cor0.col2 + + col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT - col2 * col0 * cor0.col2 + + col1 * col0 FROM tab0 AS cor0
----
-24072
-590337
3360

query I rowsort
SELECT + + 15 FROM tab1, tab1 AS cor0, tab0 cor1, tab0, tab2 cor2
----
243 values hashing to 81e3dd730ac65459b3cfedb9321b6b6e

query I rowsort
SELECT DISTINCT + cor1.col1 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT DISTINCT + col0 * - col2 + cor0.col1 * col0 AS col1 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT DISTINCT - col1 + col1 * + col2 FROM tab1 cor0
----
1235
1378
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col1 col0 FROM tab1 AS cor0
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col2 + 81 col0 FROM tab1 AS cor0
----
2997
3330
9297

query I rowsort
SELECT DISTINCT - col1 - + col0 * col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT 73 AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8364
SELECT ALL col2 - CAST( NULL AS SIGNED ) * col2 * - col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8364
SELECT ALL col2 - CAST ( NULL AS INTEGER ) * col2 * - col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 + + ( - 18 ) * - col1 FROM tab0 AS cor0
----
1462
1547
1649

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8366
SELECT col0 * - CAST( NULL AS SIGNED ) - + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8366
SELECT col0 * - CAST ( NULL AS INTEGER ) - + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8367
SELECT ALL - col1 * - cor0.col2 * col0 + col0 DIV cor0.col0 FROM tab1 AS cor0
----
36481
4213
99841

skipif mysql # not compatible
query I rowsort label-8367
SELECT ALL - col1 * - cor0.col2 * col0 + col0 / cor0.col0 FROM tab1 AS cor0
----
36481
4213
99841

query I rowsort
SELECT DISTINCT + + 96 * cor0.col1 FROM tab1 AS cor0
----
1248
2496
960

query I rowsort
SELECT ALL ( col0 ) + cor0.col2 * col0 AS col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT 63 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-33
6
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col0 * col0 col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + col1 + - 44 AS col1 FROM tab0 AS cor0
----
42
47
53

query I rowsort
SELECT ALL + col2 * - tab2.col0 AS col2 FROM tab2
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8374
SELECT + col1 + - CAST( NULL AS SIGNED ) * + col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8374
SELECT + col1 + - CAST ( NULL AS INTEGER ) * + col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 98 + col0 AS col2 FROM tab1 AS cor0
----
101
162
178

query I rowsort
SELECT DISTINCT - + 73 * + col2 * 93 + + col1 AS col2 FROM tab0 cor0
----
-223951
-556607
-6692

query I rowsort
SELECT + + col2 - - cor0.col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8378
SELECT DISTINCT - cor0.col0 DIV col0 FROM tab2 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-8378
SELECT DISTINCT - cor0.col0 / col0 FROM tab2 cor0
----
-1

query I rowsort
SELECT + 9 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT DISTINCT + 20 * - col2 FROM tab0 AS cor0
----
-1640
-20
-660

query I rowsort
SELECT DISTINCT col0 * - col0 * cor0.col2 + col2 FROM tab1 AS cor0
----
-233415
-432
-614304

query I rowsort
SELECT - - 27 + + cor0.col1 + - cor0.col0 FROM tab0 AS cor0
----
29
89
89

query I rowsort
SELECT + cor0.col2 - + col0 * col1 AS col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT - cor0.col1 + - col1 * + col0 + - 26 * col1 * - col0 AS col1 FROM tab0 AS cor0
----
202384
51514
84778

query I rowsort
SELECT - 55 + + col0 * col2 FROM tab1 AS cor0
----
107
3593
7625

query I rowsort
SELECT ALL - ( + col0 ) - - tab1.col1 AS col2 FROM tab1
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8387
SELECT + CAST( NULL AS SIGNED ) + + col2 / col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8387
SELECT + CAST ( NULL AS INTEGER ) + + col2 / col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor1.col0 col0 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ALL + tab1.col2 * 8 - - col0 FROM tab1
----
435
520
848

onlyif mysql # use DIV operator for integer division
query I rowsort label-8390
SELECT ALL ( 42 ) DIV + col0 AS col0 FROM tab2
----
0
0
6

skipif mysql # not compatible
query I rowsort label-8390
SELECT ALL ( 42 ) / + col0 AS col0 FROM tab2
----
0
0
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8391
SELECT ALL col0 + - col1 * col0 - CAST( 94 AS SIGNED ) AS col0 FROM tab0
----
-2134
-3454
-8104

skipif mysql # not compatible
query I rowsort label-8391
SELECT ALL col0 + - col1 * col0 - CAST ( 94 AS INTEGER ) AS col0 FROM tab0
----
-2134
-3454
-8104

query I rowsort
SELECT ALL 38 * 20 - col1 AS col0 FROM tab0
----
663
669
674

query I rowsort
SELECT DISTINCT + 14 * col2 FROM tab0 cor0
----
1148
14
462

query I rowsort
SELECT + - ( cor0.col2 ) * - col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT 69 + - col2 + col1 FROM tab1 AS cor0
----
-14
22
41

query I rowsort
SELECT DISTINCT + 24 * - col2 * ( col0 ) + - col1 FROM tab2
----
-4567
-48731
-72065

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8397
SELECT + CAST( NULL AS SIGNED ) + - 28 AS col0 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8397
SELECT + CAST ( NULL AS INTEGER ) + - 28 AS col0 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT col2 * col1 + col0 + + ( col2 ) * + tab0.col2 FROM tab0
----
133
14275
3951

query I rowsort
SELECT DISTINCT col1 + - tab1.col0 * col1 AS col2 FROM tab1
----
-1027
-52
-630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 49 ) col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT 86 + - col1 FROM tab0
----
-11
-5
0

query I rowsort
SELECT - tab2.col0 * - col0 * col2 AS col0 FROM tab2
----
1323
158184
237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-8403
SELECT DISTINCT - 18 * tab2.col2 DIV + 71 + col2 DIV + col0 + - col1 * - col2 FROM tab2
----
1528
637
834

skipif mysql # not compatible
query I rowsort label-8403
SELECT DISTINCT - 18 * tab2.col2 / + 71 + col2 / + col0 + - col1 * - col2 FROM tab2
----
1528
637
834

query I rowsort
SELECT DISTINCT - col1 + col1 * ( col0 ) FROM tab0
----
1978
3298
8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-8405
SELECT + col0 + col0 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-8405
SELECT + col0 + col0 / cor0.col0 AS col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT ALL + + cor0.col1 * + ( - cor0.col1 ) FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + col0 + + ( + col2 ) + - cor0.col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - - col2 / - CAST ( + ( col2 ) AS REAL ) FROM tab1 cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8409
SELECT ALL - col1 + + col2 DIV col1 AS col0 FROM tab1 AS cor0
----
-24
-5
-6

skipif mysql # not compatible
query I rowsort label-8409
SELECT ALL - col1 + + col2 / col1 AS col0 FROM tab1 AS cor0
----
-24
-5
-6

query I rowsort
SELECT 75 * - 97 AS col0 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to e68fb914e0967e634ecac6237178c14e

query I rowsort
SELECT ALL + 26 * col2 - col1 AS col2 FROM tab2 AS cor0
----
617
671
971

query I rowsort
SELECT DISTINCT + + 3 * ( col2 ) FROM tab0 cor0
----
246
3
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 * - col1 + + col1 col0 FROM tab2 AS cor0
----
-102
-186
-354

query I rowsort
SELECT ALL - col1 * + col0 - - col0 FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - col2 * + col2 + col0 * ( + col2 ) FROM tab1 AS cor0
----
-1536
-2754
399

query I rowsort
SELECT DISTINCT col0 * col0 + + cor0.col1 + col1 AS col2 FROM tab2 AS cor0
----
111
6202
6275

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * - col0 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8418
SELECT ALL - - CAST( col2 AS SIGNED ) FROM tab1 cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8418
SELECT ALL - - CAST ( col2 AS INTEGER ) FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL - + col1 * col0 * ( col2 ) FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL - + 28 + col0 * 3 FROM tab2 AS cor0
----
-7
206
209

query I rowsort
SELECT DISTINCT + - 34 AS col1 FROM tab2 AS cor0
----
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-8422
SELECT - cor0.col1 DIV col0 - + cor0.col0 AS col1 FROM tab2 AS cor0
----
-11
-78
-79

skipif mysql # not compatible
query I rowsort label-8422
SELECT - cor0.col1 / col0 - + cor0.col0 AS col1 FROM tab2 AS cor0
----
-11
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8423
SELECT + col1 * col2 - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8423
SELECT + col1 * col2 - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 41 - - cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 0631f7896a220543ddfd97e1a3f7915d

query I rowsort
SELECT DISTINCT ( - col0 * col1 + + 20 * - 7 ) FROM tab2
----
-1483
-357
-4742

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8426
SELECT + - CAST( NULL AS SIGNED ) / ( - col0 ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8426
SELECT + - CAST ( NULL AS INTEGER ) / ( - col0 ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( - 67 ) + col0 * col0 FROM tab0 AS cor0
----
1292
643
7988

query I rowsort
SELECT - - col0 + col1 * 55 AS col2 FROM tab0 AS cor0
----
4754
5094
5370

query I rowsort
SELECT DISTINCT + col1 - col0 * - col2 AS col0 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8430
SELECT ALL - cor0.col1 * CAST( NULL AS DECIMAL ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8430
SELECT ALL - cor0.col1 * CAST ( NULL AS REAL ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + - ( + col0 ) AS col2 FROM tab0 AS cor0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-8432
SELECT + cor0.col2 * + col0 + - col0 DIV col0 FROM tab2 cor0
----
188
2027
3001

skipif mysql # not compatible
query I rowsort label-8432
SELECT + cor0.col2 * + col0 + - col0 / col0 FROM tab2 cor0
----
188
2027
3001

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8433
SELECT + col1 * - CAST( + ( - col0 ) AS SIGNED ) + - 0 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-8433
SELECT + col1 * - CAST ( + ( - col0 ) AS INTEGER ) + - 0 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 * - cor0.col2 + col2 * 43 col0 FROM tab0 cor0
----
1394
17
561

onlyif mysql # use DIV operator for integer division
query I rowsort label-8435
SELECT DISTINCT cor0.col2 DIV + 37 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
1
2

skipif mysql # not compatible
query I rowsort label-8435
SELECT DISTINCT cor0.col2 / + 37 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
1
2

query I rowsort
SELECT 99 * - cor0.col2 * 16 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 7956f460435a9554cb8dd46b5d23df5b

query I rowsort
SELECT + + 61 + col0 * col2 * 16 AS col1 FROM tab0 AS cor0
----
116829
12733
621

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8438
SELECT DISTINCT + CAST( NULL AS SIGNED ) + - 4 AS col1 FROM tab0, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8438
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - 4 AS col1 FROM tab0, tab2 AS cor0
----
NULL

query I rowsort
SELECT - + cor0.col1 * - col0 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - col2 * - col0 + col1 * - 61 AS col1 FROM tab0 cor0
----
-4454
-5882
1747

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8441
SELECT - + CAST( NULL AS SIGNED ) * + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8441
SELECT - + CAST ( NULL AS INTEGER ) * + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 93 + + ( - col1 ) FROM tab1 AS cor0
----
67
80
83

query I rowsort
SELECT col2 * - ( - col1 ) FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-8444
SELECT DISTINCT + - cor0.col0 DIV 51 - + col2 AS col0 FROM tab2 AS cor0
----
-27
-39

skipif mysql # not compatible
query I rowsort label-8444
SELECT DISTINCT + - cor0.col0 / 51 - + col2 AS col0 FROM tab2 AS cor0
----
-27
-39

query I rowsort
SELECT - ( col2 ) * - col2 + + col2 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8446
SELECT col0 / CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8446
SELECT col0 / CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( - 91 ) FROM tab0 AS cor0
----
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-8448
SELECT ALL + col2 DIV - col2 + + cor0.col1 * col0 FROM tab0 cor0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-8448
SELECT ALL + col2 / - col2 + + cor0.col1 * col0 FROM tab0 cor0
----
2063
3394
8098

query I rowsort
SELECT ALL - cor0.col2 + - col1 + cor0.col0 AS col0 FROM tab2 AS cor0
----
-51
-7
24

query I rowsort
SELECT - + 63 - - 36 AS col2 FROM tab2 AS cor0
----
-27
-27
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + col1 * - col1 + - 73 col1 FROM tab0 AS cor0
----
-7436
-8272
-9481

query I rowsort
SELECT DISTINCT 39 - col2 FROM tab1 AS cor0
----
-15
-18
-57

query I rowsort
SELECT DISTINCT cor0.col2 + + 72 * col0 AS col0 FROM tab0 AS cor0
----
1761
2521
6490

query I rowsort
SELECT ALL - - cor0.col0 - col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 col2 FROM tab1, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to f1d978c2d5bfc6f26e0907ac777be83e

query I rowsort
SELECT + col0 + ( + 35 ) * col2 AS col2 FROM tab2 AS cor0
----
1409
952
988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + + ( - col2 * col2 ) + col0 col0 FROM tab2 AS cor0
----
-1327
-572
-695

onlyif mysql # use DIV operator for integer division
query I rowsort label-8458
SELECT DISTINCT + + col0 DIV - cor0.col1 AS col1 FROM tab1 AS cor0
----
-6
0

skipif mysql # not compatible
query I rowsort label-8458
SELECT DISTINCT + + col0 / - cor0.col1 AS col1 FROM tab1 AS cor0
----
-6
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 67 col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

query I rowsort
SELECT col1 * 80 * col2 AS col2 FROM tab1 AS cor0
----
112320
45600
99840

query I rowsort
SELECT col2 * - tab1.col0 - col1 FROM tab1
----
-188
-3658
-7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 - 3 col2 FROM tab0
----
-36
-4
-85

query I rowsort
SELECT - 99 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 761f5f1a166a00db99360141565a85da

query I rowsort
SELECT DISTINCT cor1.col2 - 19 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
35
38
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8465
SELECT DISTINCT - col2 + col0 + CAST( + col1 + col1 AS SIGNED ) * - col0 FROM tab0 cor0
----
-16191
-4137
-6756

skipif mysql # not compatible
query I rowsort label-8465
SELECT DISTINCT - col2 + col0 + CAST ( + col1 + col1 AS INTEGER ) * - col0 FROM tab0 cor0
----
-16191
-4137
-6756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 + col2 * ( - col2 ) col2 FROM tab1 cor0
----
-2913
-3185
-9136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 0 * col2 + 64 col0 FROM tab1 AS cor0
----
64
64
64

query I rowsort
SELECT - cor0.col2 + + col1 AS col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - 9 * col0 AS col0 FROM tab1 cor0
----
-27
-576
-720

query I rowsort
SELECT ALL col0 * col0 + 74 AS col2 FROM tab0 AS cor0
----
1299
650
7995

onlyif mysql # use DIV operator for integer division
query I rowsort label-8471
SELECT ALL + 7 + + col1 DIV 38 AS col0 FROM tab0
----
9
9
9

skipif mysql # not compatible
query I rowsort label-8471
SELECT ALL + 7 + + col1 / 38 AS col0 FROM tab0
----
9
9
9

query I rowsort
SELECT ALL col0 * - cor0.col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + 64 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT + col0 + + ( + cor0.col1 ) * col1 AS col0 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT + col1 * ( - ( col1 ) ) + - cor0.col1 * col1 AS col0 FROM tab1 AS cor0
----
-1352
-200
-338

query I rowsort
SELECT DISTINCT col0 * + col2 + ( + col1 ) AS col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + + col0 + 21 * + col1 FROM tab2 AS cor0
----
1317
436
658

onlyif mysql # use DIV operator for integer division
query I rowsort label-8478
SELECT ALL + col2 DIV col1 + col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8478
SELECT ALL + col2 / col1 + col2 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + col2 col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - col0 * ( 45 ) AS col0 FROM tab1 AS cor0
----
-135
-2880
-3600

query I rowsort
SELECT + col0 + col2 AS col1 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT ALL + 17 AS col2 FROM tab0 AS cor0
----
17
17
17

query I rowsort
SELECT ALL - ( - col2 ) + + col0 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8484
SELECT + 34 DIV tab0.col0 AS col2 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8484
SELECT + 34 / tab0.col0 AS col2 FROM tab0
----
0
0
1

query I rowsort
SELECT ALL ( + tab0.col1 ) * + tab0.col0 + - col0 AS col1 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT - 47 AS col2 FROM tab0
----
-47

query I rowsort
SELECT DISTINCT 21 + col0 AS col0 FROM tab2 AS cor0
----
100
28
99

query I rowsort
SELECT DISTINCT - - ( 49 ) + col0 * - ( ( col2 ) ) FROM tab0 AS cor0
----
-7249
-743
14

query I rowsort
SELECT + col1 * ( + col1 ) AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + - col2 + - 20 * + col0 FROM tab2 AS cor0
----
-1586
-1618
-167

query I rowsort
SELECT + ( - col2 ) + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT col2 * + col0 - col0 * + 29 AS col0 FROM tab2 AS cor0
----
-14
-234
711

query I rowsort
SELECT DISTINCT - col2 * col2 + col2 + - col1 * col2 AS col0 FROM tab0 AS cor0
----
-14104
-3894
-97

query I rowsort
SELECT ALL - cor0.col1 - col2 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + + col2 * + col0 + - col1 + col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + - col1 * col1 - col2 * - col1 * + cor0.col0 FROM tab2 AS cor0
----
116171
4898
50745

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8497
SELECT DISTINCT - col1 * + col1 * CAST( NULL AS DECIMAL ) + + col2 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8497
SELECT DISTINCT - col1 * + col1 * CAST ( NULL AS REAL ) + + col2 AS col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 + - col1 - col2 col1 FROM tab2 cor0
----
-51
-7
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8499
SELECT ALL + 78 * 7 - col1 * - CAST( - 34 AS SIGNED ) AS col1 FROM tab2
----
-1460
-32
-508

skipif mysql # not compatible
query I rowsort label-8499
SELECT ALL + 78 * 7 - col1 * - CAST ( - 34 AS INTEGER ) AS col1 FROM tab2
----
-1460
-32
-508

onlyif mysql # use DIV operator for integer division
query I rowsort label-8500
SELECT ALL - + col2 DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8500
SELECT ALL - + col2 / - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - - 76 * - col1 FROM tab2 AS cor0
----
-1292
-2356
-4484

query I rowsort
SELECT - 50 + - tab0.col0 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to d480d01c5f255fa91e8c7c9f38dd8b7a

onlyif mysql # use DIV operator for integer division
query I rowsort label-8503
SELECT DISTINCT col1 * col2 DIV + ( 51 ) + col1 FROM tab1
----
21
37
53

skipif mysql # not compatible
query I rowsort label-8503
SELECT DISTINCT col1 * col2 / + ( 51 ) + col1 FROM tab1
----
21
37
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-8504
SELECT - + cor0.col0 DIV ( + cor0.col1 ) + col2 * + col0 DIV - col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-8504
SELECT - + cor0.col0 / ( + cor0.col1 ) + col2 * + col0 / - col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - 78 + + tab0.col1 FROM tab0
----
13
19
8

query I rowsort
SELECT ALL 91 - + col2 AS col0 FROM tab2 AS cor0
----
53
64
65

query I rowsort
SELECT DISTINCT - 76 + col2 FROM tab1
----
-19
-22
20

query I rowsort
SELECT - col1 * 60 FROM tab1 AS cor0
----
-1560
-600
-780

query I rowsort
SELECT col0 * col1 - - col1 AS col0 FROM tab2
----
1360
248
4661

query I rowsort
SELECT + 77 + col1 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-212
-3404
-884

query I rowsort
SELECT - - ( col1 ) * - col0 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + + 51 * 48 FROM tab2 AS cor0
----
2448
2448
2448

query I rowsort
SELECT ALL - col1 * - ( + col1 * + col2 ) AS col1 FROM tab1
----
16224
36504
5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 2 + - 73 * col0 col0 FROM tab1 AS cor0
----
-221
-4674
-5842

query I rowsort
SELECT + - col1 * - 80 FROM tab2 AS cor0
----
1360
2480
4720

query I rowsort
SELECT - 13 * cor0.col0 FROM tab1 AS cor0
----
-1040
-39
-832

query I rowsort
SELECT ALL + 79 + + 65 * + col2 FROM tab2 AS cor0
----
1769
1834
2549

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 79 - 33 col2 FROM tab2 AS cor0
----
46

query I rowsort
SELECT + + 30 * 45 FROM tab1 cor0
----
1350
1350
1350

query I rowsort
SELECT DISTINCT + 83 * col2 FROM tab1 AS cor0
----
4482
4731
7968

query I rowsort
SELECT DISTINCT + + col0 * + col1 + + col0 AS col0 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8522
SELECT - col0 DIV cor0.col2 AS col0 FROM tab1 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8522
SELECT - col0 / cor0.col2 AS col0 FROM tab1 cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8523
SELECT col1 + col0 DIV + col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8523
SELECT col1 + col0 / + col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8524
SELECT col1 * CAST( - col2 AS SIGNED ) + col2 + + ( - 6 ) DIV - col0 FROM tab1 cor0
----
-1152
-1348
-513

skipif mysql # not compatible
query I rowsort label-8524
SELECT col1 * CAST ( - col2 AS INTEGER ) + col2 + + ( - 6 ) / - col0 FROM tab1 cor0
----
-1152
-1348
-513

query I rowsort
SELECT + + col0 + col1 + col2 * + col1 AS col1 FROM tab0 AS cor0
----
229
2948
7642

onlyif mysql # use DIV operator for integer division
query I rowsort label-8526
SELECT ALL 24 DIV col0 AS col0 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-8526
SELECT ALL 24 / col0 AS col0 FROM tab1
----
0
0
8

query I rowsort
SELECT ALL + ( col1 * col0 + + col2 ) FROM tab1
----
1136
132
697

query I rowsort
SELECT ALL + 77 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT ( + 64 ) FROM tab1, tab0 AS cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT ALL col1 * 77 * ( - col1 ) AS col2 FROM tab1
----
-13013
-52052
-7700

query I rowsort
SELECT + + col2 + 47 AS col0 FROM tab1 AS cor0
----
101
104
143

query I rowsort
SELECT - - col2 * cor0.col1 FROM tab1 cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8533
SELECT + col1 / CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8533
SELECT + col1 / CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col0 + + 55 AS col1 FROM tab1 AS cor0
----
119
135
58

query I rowsort
SELECT ALL + 16 + col2 * tab2.col0 FROM tab2
----
2044
205
3018

query I rowsort
SELECT col0 + 46 FROM tab0 AS cor0
----
135
70
81

query I rowsort
SELECT ALL 96 * - col2 + col2 * + ( col1 + col0 ) * col1 FROM tab2 AS cor0
----
207662
29214
58368

query I rowsort
SELECT ALL + col2 + + 52 AS col0 FROM tab0 cor0
----
134
53
85

query I rowsort
SELECT DISTINCT - 70 AS col1 FROM tab0 AS cor0
----
-70

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT 86 + col0 FROM tab1 cor0
----
150
166
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8542
SELECT ALL + col1 * col1 DIV col2 AS col2 FROM tab0
----
100
224
9409

skipif mysql # not compatible
query I rowsort label-8542
SELECT ALL + col1 * col1 / col2 AS col2 FROM tab0
----
100
224
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col1 FROM tab0, tab0 cor0, tab2 AS cor1
----
-86
-91
-97

query I rowsort
SELECT - + 26 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 47d0574274146de273829785364ada39

query I rowsort
SELECT - col1 + cor0.col2 + - 72 FROM tab1 AS cor0
----
-25
-44
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-8546
SELECT 18 + - col2 DIV + col2 + + 64 AS col0 FROM tab1 AS cor0
----
81
81
81

skipif mysql # not compatible
query I rowsort label-8546
SELECT 18 + - col2 / + col2 + + 64 AS col0 FROM tab1 AS cor0
----
81
81
81

query I rowsort
SELECT DISTINCT col0 * col1 - 54 * col1 AS col2 FROM tab2
----
-1457
1416
425

query I rowsort
SELECT ALL + - 28 + col2 - + col2 FROM tab2 AS cor0
----
-28
-28
-28

query I rowsort
SELECT ALL - - col0 * - col2 * - 68 + ( - col2 ) * - col0 FROM tab0 AS cor0
----
2415
503562
54648

query I rowsort
SELECT + cor0.col0 - col1 AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - col0 * ( + cor0.col0 ) * col1 + col0 * + col1 FROM tab0 AS cor0
----
-115430
-47472
-712712

query I rowsort
SELECT DISTINCT cor0.col1 + - col2 AS col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT col2 * + 33 + - col2 FROM tab1 AS cor0
----
1728
1824
3072

query I rowsort
SELECT ALL + + col2 + - 8 AS col0 FROM tab2 AS cor0
----
18
19
30

query I rowsort
SELECT + 18 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT ALL - 69 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 3bd7460efa48c66c072ad5f3c2def7e9

query I rowsort
SELECT cor0.col0 + col2 * - 77 - col1 AS col1 FROM tab2 AS cor0
----
-1983
-2103
-2864

query I rowsort
SELECT DISTINCT + col2 + col2 * - col2 FROM tab2 AS cor0
----
-1406
-650
-702

query IIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 WHERE ( cor0.col1 ) >= NULL
----

query I rowsort
SELECT ALL 28 + 83 FROM tab2 AS cor0
----
111
111
111

query I rowsort
SELECT ALL - cor0.col2 * - 14 * + col2 AS col0 FROM tab1 AS cor0
----
129024
40824
45486

onlyif mysql # use DIV operator for integer division
query I rowsort label-8562
SELECT DISTINCT + col0 + cor0.col1 DIV col2 AS col1 FROM tab0 AS cor0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-8562
SELECT DISTINCT + col0 + cor0.col1 / col2 AS col1 FROM tab0 AS cor0
----
132
26
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 9 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT + col0 + + 80 - + col1 FROM tab1
----
134
147
57

query I rowsort
SELECT DISTINCT - col2 * 9 + tab0.col0 - col2 AS col0 FROM tab0
----
-306
-731
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-8566
SELECT + col1 DIV 68 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8566
SELECT + col1 / 68 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT cor1.col2 + + 1 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27
28
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-8568
SELECT col1 + 38 DIV - col1 FROM tab1 AS cor0
----
11
25
7

skipif mysql # not compatible
query I rowsort label-8568
SELECT col1 + 38 / - col1 FROM tab1 AS cor0
----
11
25
7

query I rowsort
SELECT DISTINCT tab1.col1 - ( + ( col0 ) * + col2 ) AS col0 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT - 89 FROM tab2, tab2 cor0
----
-89

query I rowsort
SELECT DISTINCT - col0 + 31 FROM tab0
----
-4
-58
7

query I rowsort
SELECT + col1 * - col1 * - col0 FROM tab1
----
13520
2028
6400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8573
SELECT ALL + + CAST( NULL AS SIGNED ) * + 34 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8573
SELECT ALL + + CAST ( NULL AS INTEGER ) * + 34 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + - col2 * - tab2.col0 FROM tab2
----
2087
220
3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8575
SELECT DISTINCT CAST( + 41 AS SIGNED ) + + tab0.col0 FROM tab0
----
130
65
76

skipif mysql # not compatible
query I rowsort label-8575
SELECT DISTINCT CAST ( + 41 AS INTEGER ) + + tab0.col0 FROM tab0
----
130
65
76

query I rowsort
SELECT DISTINCT + col0 * - col0 + tab2.col1 + 21 FROM tab2
----
-6004
-6203
3

query I rowsort
SELECT + tab0.col1 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-8578
SELECT ALL - cor0.col2 DIV col2 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8578
SELECT ALL - cor0.col2 / col2 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - + 87 AS col0 FROM tab2 AS cor0
----
-87

query I rowsort
SELECT + 13 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to b092e3fa17e78608cf120e97d1bfff67

query I rowsort
SELECT - 60 * col1 FROM tab1 AS cor0
----
-1560
-600
-780

query I rowsort
SELECT DISTINCT + + col2 * col2 + col0 AS col0 FROM tab0 AS cor0
----
1113
36
6813

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8583
SELECT - - col2 * - col0 + - col2 * CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8583
SELECT - - col2 * - col0 + - col2 * CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + tab0.col2 * col2 + + tab0.col1 * col1 FROM tab0
----
15005
8485
9410

query I rowsort
SELECT - 18 + col0 FROM tab1
----
-15
46
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8586
SELECT DISTINCT ( col0 ) + + 22 * col1 DIV col1 col1 FROM tab0 AS cor0
----
111
46
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8586
SELECT DISTINCT ( col0 ) + + 22 * col1 / col1 col1 FROM tab0 AS cor0
----
111
46
57

query I rowsort
SELECT DISTINCT + col0 * - cor0.col1 + - col0 + 58 AS col1 FROM tab0 cor0
----
-2030
-3372
-8130

query I rowsort
SELECT DISTINCT col2 + - col2 * + ( + col0 ) FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT 78 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to f0487ba81d377516702723e098c02ba1

query I rowsort
SELECT - col0 * - col1 * - col2 + + col1 FROM tab2 AS cor0
----
-119593
-51017
-5828

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 - col1 col0 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT ALL - 77 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c7e5f48ecd3843d54a76808ed1f43ff6

query I rowsort
SELECT ALL col1 + - col0 * - 95 FROM tab2 AS cor0
----
696
7469
7522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col0 * ( 90 ) * col0 + + col2 * - 55 * + col0 col2 FROM tab1 AS cor0
----
-569280
-9720
-998400

query I rowsort
SELECT DISTINCT + col1 * + 22 * col1 AS col0 FROM tab0 AS cor0
----
162712
182182
206998

query I rowsort
SELECT ALL - + col1 * 35 + + 59 FROM tab0 AS cor0
----
-2951
-3126
-3336

query I rowsort
SELECT ALL - - col2 + 10 AS col2 FROM tab0 AS cor0
----
11
43
92

query I rowsort
SELECT ALL col2 * 50 AS col2 FROM tab0 AS cor0
----
1650
4100
50

query I rowsort
SELECT DISTINCT - col1 * col1 + + 73 FROM tab2 AS cor0
----
-216
-3408
-888

query I rowsort
SELECT DISTINCT - col2 * col0 * - col0 + - cor0.col0 * + col2 FROM tab2 AS cor0
----
1134
156156
234156

query I rowsort
SELECT ALL - - col1 * + col0 + + cor0.col0 + col0 AS col2 FROM tab0 AS cor0
----
2112
3465
8277

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * 95 col2 FROM tab1 AS cor0
----
285
6080
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-8603
SELECT col0 * col0 + + 61 DIV + col2 FROM tab1
----
10
4097
6400

skipif mysql # not compatible
query I rowsort label-8603
SELECT col0 * col0 + + 61 / + col2 FROM tab1
----
10
4097
6400

query I rowsort
SELECT DISTINCT - col0 * 46 FROM tab0 cor0
----
-1104
-1610
-4094

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col1 + - CAST ( 74 AS REAL ) FROM tab1 AS cor0
----
-48
-61
-64

query I rowsort
SELECT DISTINCT + col2 * + 32 AS col0 FROM tab1 AS cor0
----
1728
1824
3072

query I rowsort
SELECT + col1 * + ( - ( - col1 ) ) AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ( + 12 ) FROM tab2, tab0 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col1 * + CAST ( col1 AS REAL ) + - col2 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT ALL + col0 * - col2 - col2 AS col2 FROM tab0 AS cor0
----
-36
-7380
-825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 83 col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 10 col0 FROM tab0 AS cor0
----
10
10
10

query I rowsort
SELECT + 79 * 98 FROM tab1 AS cor0
----
7742
7742
7742

query I rowsort
SELECT DISTINCT - 17 + tab0.col0 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
18
7
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-8615
SELECT ALL + col0 * col0 DIV 55 AS col2 FROM tab2 AS cor0
----
0
110
113

skipif mysql # not compatible
query I rowsort label-8615
SELECT ALL + col0 * col0 / 55 AS col2 FROM tab2 AS cor0
----
0
110
113

onlyif mysql # use DIV operator for integer division
query I rowsort label-8616
SELECT ALL + col1 + + col1 DIV - 43 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-8616
SELECT ALL + col1 + + col1 / - 43 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-8617
SELECT - 65 + - col1 DIV - 37 AS col0 FROM tab0 AS cor0
----
-63
-63
-63

skipif mysql # not compatible
query I rowsort label-8617
SELECT - 65 + - col1 / - 37 AS col0 FROM tab0 AS cor0
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 42 * col1 col2 FROM tab2 AS cor0
----
1302
2478
714

query I rowsort
SELECT DISTINCT - 25 * + col1 AS col0 FROM tab1 AS cor0
----
-250
-325
-650

query I rowsort
SELECT col2 + + col1 + tab1.col0 FROM tab1
----
131
189
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8621
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 90 + col0 / CAST( NULL AS DECIMAL ) AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-8621
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 90 + col0 / CAST ( NULL AS REAL ) AS col2 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col0 ) + - col1 col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT + + col2 * col1 + - 88 FROM tab1 AS cor0
----
1160
1316
482

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1, tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT ( tab0.col1 ) * - 57 AS col0 FROM tab0
----
-4902
-5187
-5529

query I rowsort
SELECT + + col1 * ( + col2 ) * - col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT + 66 * col0 AS col1 FROM tab2
----
462
5148
5214

onlyif mysql # use DIV operator for integer division
query I rowsort label-8628
SELECT + cor0.col1 DIV - col0 + - ( + col1 ) DIV col0 AS col1 FROM tab0 AS cor0
----
-2
-4
-6

skipif mysql # not compatible
query I rowsort label-8628
SELECT + cor0.col1 / - col0 + - ( + col1 ) / col0 AS col1 FROM tab0 AS cor0
----
-2
-4
-6

query I rowsort
SELECT ( cor0.col0 ) + cor0.col2 * + cor0.col2 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT ALL + col1 - + col2 * + tab1.col1 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT - 98 AS col0 FROM tab1, tab0 AS cor0
----
-98

query I rowsort
SELECT col0 * + 9 AS col0 FROM tab0
----
216
315
801

query I rowsort
SELECT ALL 61 - col1 * - col0 AS col0 FROM tab0
----
2125
3456
8160

onlyif mysql # use DIV operator for integer division
query I rowsort label-8634
SELECT col0 DIV ( - col0 ) + cor0.col0 * - col2 FROM tab0 AS cor0
----
-36
-7299
-793

skipif mysql # not compatible
query I rowsort label-8634
SELECT col0 / ( - col0 ) + cor0.col0 * - col2 FROM tab0 AS cor0
----
-36
-7299
-793

query I rowsort
SELECT DISTINCT + col2 + + 92 FROM tab0 AS cor0
----
125
174
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8636
SELECT + + ( 52 ) * col2 + - cor0.col1 DIV + col1 AS col1 FROM tab2 AS cor0
----
1351
1403
1975

skipif mysql # not compatible
query I rowsort label-8636
SELECT + + ( 52 ) * col2 + - cor0.col1 / + col1 AS col1 FROM tab2 AS cor0
----
1351
1403
1975

query I rowsort
SELECT ALL + 55 FROM tab1, tab2 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT DISTINCT + col0 * col0 + - col0 AS col1 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT DISTINCT - col2 * + col0 + + col1 AS col2 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT ALL - - col2 + cor0.col0 - col2 AS col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT - ( - col2 ) * + cor0.col2 + col0 AS col0 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT 66 + col0 FROM tab1 AS cor0
----
130
146
69

query I rowsort
SELECT ALL + + cor0.col2 * + col0 + col2 AS col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT col1 - - cor0.col0 * + col2 FROM tab2 cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT col2 * col0 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT + col1 * + col2 AS col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - col2 * col2 + cor0.col0 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT 55 * tab2.col0 AS col1 FROM tab2
----
385
4290
4345

query I rowsort
SELECT + 11 * cor0.col1 AS col0 FROM tab0 cor0
----
1001
1067
946

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - col2 col0 FROM tab2 cor0
----
-52
-54
-76

query I rowsort
SELECT - cor0.col1 + - col2 * + col0 FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-8652
SELECT ALL col2 + + col1 DIV - col1 AS col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-8652
SELECT ALL col2 + + col1 / - col1 AS col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT ALL - + cor0.col2 + + col2 * - col1 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT + ( col2 ) * - col2 + - col1 AS col1 FROM tab0 cor0
----
-1175
-6815
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( 38 ) col2 FROM tab1
----
-38
-38
-38

query I rowsort
SELECT ALL 35 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT ALL - 38 * + col0 AS col2 FROM tab0
----
-1330
-3382
-912

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8658
SELECT - col2 * + CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8658
SELECT - col2 * + CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * + cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-8660
SELECT DISTINCT 74 DIV cor1.col0 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
0
2
3

skipif mysql # not compatible
query I rowsort label-8660
SELECT DISTINCT 74 / cor1.col0 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
0
2
3

query I rowsort
SELECT DISTINCT 36 * 74 FROM tab2, tab1 AS cor0
----
2664

query III rowsort
SELECT * FROM tab1 WHERE NOT - col1 * col1 + - col1 = ( NULL ) AND NOT ( col2 ) NOT IN ( col0 - col0 )
----

query I rowsort
SELECT col2 * + col0 * col2 + tab1.col1 FROM tab1
----
207946
737293
8774

onlyif mysql # use DIV operator for integer division
query I rowsort label-8664
SELECT DISTINCT - + col2 + - cor0.col1 * - cor0.col1 DIV - col1 FROM tab2 AS cor0
----
-55
-58
-85

skipif mysql # not compatible
query I rowsort label-8664
SELECT DISTINCT - + col2 + - cor0.col1 * - cor0.col1 / - col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL col0 * + cor0.col1 AS col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT - tab1.col1 - - tab1.col2 FROM tab1
----
28
47
83

query I rowsort
SELECT - col0 * col0 + col2 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT - col2 * col2 + - col1 FROM tab2
----
-1461
-735
-760

query I rowsort
SELECT DISTINCT - col2 * - col1 + tab0.col0 * + col1 * col0 AS col1 FROM tab0
----
118922
52374
728273

query I rowsort
SELECT DISTINCT - col0 * - col0 * col0 - col2 FROM tab1
----
-27
262087
511904

query I rowsort
SELECT - col0 * - tab0.col2 + + col2 FROM tab0
----
36
7380
825

query I rowsort
SELECT + tab0.col2 + - col1 * + col0 + - col0 FROM tab0
----
-2055
-3429
-8106

query I rowsort
SELECT DISTINCT + + col0 * col2 + col1 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-8674
SELECT ALL + + col2 DIV cor0.col0 col0 FROM tab1 AS cor0
----
0
1
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8674
SELECT ALL + + col2 / cor0.col0 col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT + col1 + col0 * col0 - + col0 FROM tab2 AS cor0
----
6065
6179
73

query I rowsort
SELECT ALL + col2 + col0 * + col1 AS col2 FROM tab2 cor0
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-8677
SELECT DISTINCT col2 DIV col0 + col0 * col2 AS col2 FROM tab0
----
35
7298
793

skipif mysql # not compatible
query I rowsort label-8677
SELECT DISTINCT col2 / col0 + col0 * col2 AS col2 FROM tab0
----
35
7298
793

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 85 + - col1 col1 FROM tab1
----
59
72
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 49 col2 FROM tab1
----
49

query I rowsort
SELECT DISTINCT col1 * col0 * + col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT DISTINCT + cor0.col1 * - col2 * - col0 + - cor0.col0 FROM tab2 AS cor0
----
119574
50955
5852

query I rowsort
SELECT ALL - col0 + col1 * + ( + col1 * - col0 ) FROM tab1 AS cor0
----
-13600
-2031
-6464

query I rowsort
SELECT col2 + + col2 * col2 AS col1 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT + col0 * + col2 * col2 FROM tab1 AS cor0
----
207936
737280
8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 16 col0 FROM tab1 AS cor0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT 4 * col0 FROM tab2 AS cor0
----
28
312
316

query I rowsort
SELECT ALL - - cor0.col2 + col0 FROM tab1 cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8688
SELECT ALL + - 46 + col1 + CAST( NULL AS DECIMAL ) * cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8688
SELECT ALL + - 46 + col1 + CAST ( NULL AS REAL ) * cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8689
SELECT DISTINCT - col0 * + col0 * CAST( - 79 + + col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-79210
31680
53900

skipif mysql # not compatible
query I rowsort label-8689
SELECT DISTINCT - col0 * + col0 * CAST ( - 79 + + col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-79210
31680
53900

query I rowsort
SELECT ALL cor0.col2 * - col2 + col1 AS col0 FROM tab1 cor0
----
-2890
-3239
-9203

query I rowsort
SELECT DISTINCT + - col1 + + col0 * 85 FROM tab0 AS cor0
----
1954
2878
7474

query I rowsort
SELECT - col2 * col1 * + col0 + + 95 FROM tab0
----
-3300
-664023
-68017

query I rowsort
SELECT DISTINCT - + ( - 99 ) AS col2 FROM tab2 AS cor0
----
99

query I rowsort
SELECT col1 + + 8 FROM tab0 cor0
----
105
94
99

query I rowsort
SELECT + ( - 63 ) * col2 FROM tab2 AS cor0
----
-1638
-1701
-2394

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8696
SELECT DISTINCT CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8696
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8697
SELECT ALL + col0 DIV - ( + col2 ) FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8697
SELECT ALL + col0 / - ( + col2 ) FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT + - col2 + 22 AS col0 FROM tab0 AS cor0
----
-11
-60
21

query I rowsort
SELECT DISTINCT + 22 FROM tab1, tab2, tab1 AS cor0
----
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( tab2.col0 ) col0 FROM tab2
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8701
SELECT ALL - CAST( + col2 AS SIGNED ) AS col1 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-8701
SELECT ALL - CAST ( + col2 AS INTEGER ) AS col1 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - 61 FROM tab0, tab1 AS cor0
----
-61

query I rowsort
SELECT DISTINCT - 27 * - tab2.col0 AS col1 FROM tab2
----
189
2106
2133

onlyif mysql # use DIV operator for integer division
query I rowsort label-8704
SELECT ALL - cor0.col2 DIV col2 - - col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-8704
SELECT ALL - cor0.col2 / col2 - - col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT col0 * - 55 FROM tab0 cor0
----
-1320
-1925
-4895

query I rowsort
SELECT ALL + + ( ( col1 ) ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT col0 + ( - col0 ) * + ( col1 ) AS col2 FROM tab2 cor0
----
-1264
-210
-4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-8708
SELECT ALL + ( - 71 ) DIV - tab2.col0 FROM tab2
----
0
0
10

skipif mysql # not compatible
query I rowsort label-8708
SELECT ALL + ( - 71 ) / - tab2.col0 FROM tab2
----
0
0
10

query I rowsort
SELECT ALL col0 * ( - col2 ) FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + 13 + ( - col0 ) FROM tab0 AS cor0
----
-11
-22
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 22 * col0 col0 FROM tab2 AS cor0
----
154
1716
1738

query I rowsort
SELECT ALL + - ( cor0.col0 ) * + cor0.col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-8713
SELECT DISTINCT col0 DIV 41 AS col2 FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8713
SELECT DISTINCT col0 / 41 AS col2 FROM tab2 AS cor0
----
0
1

query I rowsort
SELECT cor0.col0 * col0 * + col1 + + col2 FROM tab0 cor0
----
118826
49569
720893

query I rowsort
SELECT + + col2 + - col1 AS col0 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-8716
SELECT - tab2.col2 * 96 DIV + tab2.col1 FROM tab2
----
-214
-42
-83

skipif mysql # not compatible
query I rowsort label-8716
SELECT - tab2.col2 * 96 / + tab2.col1 FROM tab2
----
-214
-42
-83

query I rowsort
SELECT + col0 * col0 * - 23 FROM tab1
----
-147200
-207
-94208

onlyif mysql # use DIV operator for integer division
query I rowsort label-8718
SELECT + col2 + + ( col1 ) DIV - col1 + col1 FROM tab1
----
108
66
79

skipif mysql # not compatible
query I rowsort label-8718
SELECT + col2 + + ( col1 ) / - col1 + col1 FROM tab1
----
108
66
79

query I rowsort
SELECT col0 * col2 + + col1 + col2 FROM tab2
----
2113
247
3057

onlyif mysql # use DIV operator for integer division
query I rowsort label-8720
SELECT - tab0.col2 DIV 81 AS col2 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8720
SELECT - tab0.col2 / 81 AS col2 FROM tab0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - 53 col0 FROM tab2 AS cor0
----
-15
-26
-27

query I rowsort
SELECT DISTINCT col1 + 66 FROM tab0 AS cor0
----
152
157
163

onlyif mysql # use DIV operator for integer division
query I rowsort label-8723
SELECT col0 DIV + col0 AS col2 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8723
SELECT col0 / + col0 AS col2 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ALL 8 * col2 + cor0.col2 * col2 AS col0 FROM tab1 AS cor0
----
3348
3705
9984

query I rowsort
SELECT DISTINCT + + 56 * + cor0.col1 + col1 AS col0 FROM tab1 AS cor0
----
1482
570
741

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8726
SELECT - - CAST( NULL AS DECIMAL ) + col0 * - cor0.col1 col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8726
SELECT - - CAST ( NULL AS REAL ) + col0 * - cor0.col1 col1 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8727
SELECT col0 DIV ( + 18 ) + + col1 FROM tab1
----
13
17
26

skipif mysql # not compatible
query I rowsort label-8727
SELECT col0 / ( + 18 ) + + col1 FROM tab1
----
13
17
26

query I rowsort
SELECT DISTINCT - col1 + ( - col2 * - col0 ) AS col2 FROM tab0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-8729
SELECT DISTINCT - col0 + col0 DIV - col2 + - col2 DIV col2 AS col1 FROM tab0
----
-25
-71
-91

skipif mysql # not compatible
query I rowsort label-8729
SELECT DISTINCT - col0 + col0 / - col2 + - col2 / col2 AS col1 FROM tab0
----
-25
-71
-91

query I rowsort
SELECT + ( + col0 ) AS col2 FROM tab2 cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8731
SELECT - col1 + - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8731
SELECT - col1 + - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8732
SELECT ALL tab1.col0 + CAST( col1 AS SIGNED ) FROM tab1
----
29
74
93

skipif mysql # not compatible
query I rowsort label-8732
SELECT ALL tab1.col0 + CAST ( col1 AS INTEGER ) FROM tab1
----
29
74
93

query I rowsort
SELECT ALL + col2 * + 21 FROM tab1
----
1134
1197
2016

query I rowsort
SELECT col1 * col0 + col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ( col2 ) - - col0 AS col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT ( - 19 ) * col2 + + ( - col0 ) AS col1 FROM tab2 AS cor0
----
-520
-572
-801

query I rowsort
SELECT - ( + col0 ) - cor0.col0 FROM tab1 cor0
----
-128
-160
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col2 col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

onlyif mysql # use DIV operator for integer division
query I rowsort label-8739
SELECT DISTINCT col0 * 63 DIV - 97 + - col0 FROM tab1
----
-105
-131
-4

skipif mysql # not compatible
query I rowsort label-8739
SELECT DISTINCT col0 * 63 / - 97 + - col0 FROM tab1
----
-105
-131
-4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8740
SELECT + + CAST( NULL AS SIGNED ) + + col1 * + col0 + - ( + 80 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8740
SELECT + + CAST ( NULL AS INTEGER ) + + col1 * + col0 + - ( + 80 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8741
SELECT ALL + CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8741
SELECT ALL + CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8742
SELECT DISTINCT - CAST( + col0 AS SIGNED ) FROM tab2 cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-8742
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) FROM tab2 cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col1 + + col0 col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT + 45 * + col2 + - col0 + col1 * cor0.col2 FROM tab1 AS cor0
----
3071
3831
5488

skipif mysql # not compatible
query I rowsort
SELECT ALL - + CAST ( - col1 AS REAL ) AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - 54 + col0 + col1 FROM tab0 AS cor0
----
126
56
78

query I rowsort
SELECT 40 + col0 * - ( - col0 ) FROM tab2 AS cor0
----
6124
6281
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8748
SELECT + col0 DIV + col0 + - col0 DIV + col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8748
SELECT + col0 / + col0 + - col0 / + col1 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL 49 * + col0 AS col1 FROM tab0
----
1176
1715
4361

query I rowsort
SELECT ( col2 ) + + col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8751
SELECT + col0 DIV col1 + - col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-8751
SELECT + col0 / col1 + - col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - + ( col0 ) + col0 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col0 col0 FROM tab2 cor0
----
-14
-156
-158

query I rowsort
SELECT - - cor0.col2 + - col2 AS col1 FROM tab0 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * ( + col0 ) col0 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-8756
SELECT ALL + col0 * 42 DIV + col0 FROM tab1 AS cor0
----
42
42
42

skipif mysql # not compatible
query I rowsort label-8756
SELECT ALL + col0 * 42 / + col0 FROM tab1 AS cor0
----
42
42
42

query I rowsort
SELECT DISTINCT - col2 * ( + col2 ) FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8758
SELECT - cor0.col1 + - CAST( NULL AS SIGNED ) * - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8758
SELECT - cor0.col1 + - CAST ( NULL AS INTEGER ) * - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8759
SELECT ALL + col1 DIV 63 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8759
SELECT ALL + col1 / 63 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col0 * 75 + col2 * cor0.col1 AS col2 FROM tab1 AS cor0
----
1629
5370
7248

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 58 * col1 col0 FROM tab1
----
1508
580
754

query I rowsort
SELECT DISTINCT - + col0 * col2 * - col2 - - col1 AS col0 FROM tab2 AS cor0
----
114093
5134
52787

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 cor1, tab2 AS cor2
----
972 values hashing to 0fcd8d0934383dd58863be894b07a6ed

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8764
SELECT ALL - CAST( NULL AS SIGNED ) + 57 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8764
SELECT ALL - CAST ( NULL AS INTEGER ) + 57 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col2 col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8766
SELECT ( + ( tab1.col1 ) + col0 ) DIV col0 FROM tab1
----
1
1
9

skipif mysql # not compatible
query I rowsort label-8766
SELECT ( + ( tab1.col1 ) + col0 ) / col0 FROM tab1
----
1
1
9

query I rowsort
SELECT + + 24 + col2 + - col0 FROM tab2 AS cor0
----
-17
-28
44

query I rowsort
SELECT DISTINCT + 43 * cor0.col1 AS col0 FROM tab1, tab1 AS cor0
----
1118
430
559

query I rowsort
SELECT ( col0 ) - col2 * + col1 AS col1 FROM tab1
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-8770
SELECT ALL 28 + - col2 DIV + 81 AS col1 FROM tab1
----
27
28
28

skipif mysql # not compatible
query I rowsort label-8770
SELECT ALL 28 + - col2 / + 81 AS col1 FROM tab1
----
27
28
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - - col2 col0 FROM tab1
----
121
176
57

query I rowsort
SELECT - 79 + col1 AS col1 FROM tab2
----
-20
-48
-62

query I rowsort
SELECT DISTINCT col2 + + col1 + 99 FROM tab0
----
197
218
272

query I rowsort
SELECT - 69 + col0 FROM tab2
----
-62
10
9

query I rowsort
SELECT + col0 * col2 + 39 FROM tab0 AS cor0
----
7337
74
831

onlyif mysql # use DIV operator for integer division
query I rowsort label-8776
SELECT + col2 + - col2 DIV + col0 FROM tab1 AS cor0
----
36
57
95

skipif mysql # not compatible
query I rowsort label-8776
SELECT + col2 + - col2 / + col0 FROM tab1 AS cor0
----
36
57
95

query I rowsort
SELECT DISTINCT - col2 * - col1 + col0 AS col0 FROM tab0
----
132
2862
7551

query I rowsort
SELECT - col2 - + col0 AS col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT col2 * - col0 + col2 AS col2 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT ALL col2 * - col1 + - tab0.col0 * - col0 AS col2 FROM tab0
----
-2262
1128
459

query I rowsort
SELECT ALL tab1.col1 + + col2 * col1 AS col2 FROM tab1
----
1261
1430
580

query I rowsort
SELECT DISTINCT col1 * + col1 + col1 * col0 FROM tab1
----
1209
740
754

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 + col1 col0 FROM tab1
----
188
3658
7693

query I rowsort
SELECT DISTINCT col1 + - tab1.col1 * - col1 AS col0 FROM tab1
----
110
182
702

query I rowsort
SELECT DISTINCT + + ( col2 ) * ( 53 ) + + col0 * col2 AS col0 FROM tab1 AS cor0
----
12768
3024
6669

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col2 FROM tab0 WHERE NOT ( NULL ) IN ( col0 * col0 * - col0 + tab0.col0 )
----

query I rowsort
SELECT - col1 * col1 + - col2 + tab2.col0 * - col1 FROM tab2
----
-1205
-1670
-8109

query I rowsort
SELECT DISTINCT col0 * - col1 + + col2 + col2 FROM tab0 AS cor0
----
-1998
-3393
-7935

onlyif mysql # use DIV operator for integer division
query I rowsort label-8789
SELECT cor0.col1 + col2 + cor0.col1 DIV cor0.col1 AS col0 FROM tab2 AS cor0
----
56
59
86

skipif mysql # not compatible
query I rowsort label-8789
SELECT cor0.col1 + col2 + cor0.col1 / cor0.col1 AS col0 FROM tab2 AS cor0
----
56
59
86

query I rowsort
SELECT DISTINCT tab1.col0 - col1 * col1 AS col1 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT tab0.col0 + + col2 - - col0 AS col1 FROM tab0
----
260
71
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col2 * - col1 col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT col2 - - col0 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + col0 + - col2 + tab0.col1 AS col2 FROM tab0
----
131
77
98

query I rowsort
SELECT col0 + + col2 + col1 * col2 AS col0 FROM tab1
----
1424
1461
691

query I rowsort
SELECT DISTINCT + col1 * + col2 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT col0 + - col1 + - col2 * col2 AS col2 FROM tab1
----
-2939
-3195
-9149

query I rowsort
SELECT ALL + col0 + tab0.col2 + - tab0.col1 FROM tab0
----
-29
-61
80

query I rowsort
SELECT + col1 * col1 * + col2 AS col1 FROM tab0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-8800
SELECT col2 DIV - col0 col2 FROM tab1
----
-1
-18
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8800
SELECT col2 / - col0 col2 FROM tab1
----
-1
-18
0

query I rowsort
SELECT - col1 AS col0 FROM tab2 WHERE + col1 + col1 BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT ALL tab1.col0 * + col2 + tab1.col0 + + col0 AS col0 FROM tab1
----
168
3776
7840

query I rowsort
SELECT ALL - col0 FROM tab0 WHERE NOT col1 + col2 IN ( - col1 )
----
-24
-35
-89

query I rowsort
SELECT DISTINCT col1 * tab0.col0 + col1 AS col2 FROM tab0
----
2150
3492
8190

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT NULL IN ( - cor0.col0 * + col1 + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8806
SELECT col0 DIV col1 + col1 * cor0.col1 FROM tab0 cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-8806
SELECT col0 / col1 + col1 * cor0.col1 FROM tab0 cor0
----
7396
8281
9409

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL IN ( col0 + - col2 / + col2 )
----

query I rowsort
SELECT + col0 * col1 * - col2 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL + col2 + + col1 * col0 / col1 FROM tab1 WHERE NOT ( NULL ) NOT IN ( + col0 * - col2 )
----

query I rowsort
SELECT DISTINCT col1 + tab0.col1 AS col1 FROM tab0
----
172
182
194

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( NULL ) IN ( col2 + + tab2.col2 )
----

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NULL ) > ( + col2 * col2 + + col0 )
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8813
SELECT + - CAST( 79 AS SIGNED ) * - col0 + + ( col1 ) + cor0.col1 AS col2 FROM tab1 AS cor0
----
289
5076
6346

skipif mysql # not compatible
query I rowsort label-8813
SELECT + - CAST ( 79 AS INTEGER ) * - col0 + + ( col1 ) + cor0.col1 AS col2 FROM tab1 AS cor0
----
289
5076
6346

onlyif mysql # use DIV operator for integer division
query I rowsort label-8814
SELECT - col0 * 40 + - col2 DIV ( + col2 ) + cor0.col1 FROM tab1 cor0
----
-2551
-3188
-95

skipif mysql # not compatible
query I rowsort label-8814
SELECT - col0 * 40 + - col2 / ( + col2 ) + cor0.col1 FROM tab1 cor0
----
-2551
-3188
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col0 ) + - col2 + col1 col0 FROM tab2 AS cor0
----
11
111
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-8816
SELECT ALL - col2 + - 6 + col2 DIV + col1 AS col2 FROM tab2
----
-32
-33
-42

skipif mysql # not compatible
query I rowsort label-8816
SELECT ALL - col2 + - 6 + col2 / + col1 AS col2 FROM tab2
----
-32
-33
-42

query I rowsort
SELECT - 57 AS col2 FROM tab2
----
-57
-57
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8818
SELECT ALL - CAST( + 56 AS SIGNED ) * - tab2.col2 * col0 FROM tab2
----
10584
113568
168112

skipif mysql # not compatible
query I rowsort label-8818
SELECT ALL - CAST ( + 56 AS INTEGER ) * - tab2.col2 * col0 FROM tab2
----
10584
113568
168112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 23 + col0 * + tab2.col2 * + 88 col1 FROM tab2
----
16655
178487
264199

query I rowsort
SELECT ALL + 87 - + 46 FROM tab2 AS cor0
----
41
41
41

query I rowsort
SELECT - ( 15 ) * col2 + 4 + - col1 FROM tab2 AS cor0
----
-432
-445
-583

query I rowsort
SELECT DISTINCT ( ( col0 ) ) + 69 + + ( col2 ) * - 3 AS col0 FROM tab1 AS cor0
----
-139
-38
-90

query I rowsort
SELECT - - 33 + col2 AS col1 FROM tab2 AS cor0
----
59
60
71

query I rowsort
SELECT DISTINCT - + col1 + col1 * - col0 AS col2 FROM tab2 cor0
----
-1360
-248
-4661

query I rowsort
SELECT 57 AS col0 FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to 220a93709e207779b34ef74b544764a5

query I rowsort
SELECT DISTINCT - 47 + col0 * 59 FROM tab0 AS cor0
----
1369
2018
5204

query I rowsort
SELECT DISTINCT + + cor0.col2 * - col0 + 17 * - col1 FROM tab1 AS cor0
----
-3818
-604
-7901

query I rowsort
SELECT + 7 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + 13 + 11 col0 FROM tab2 AS cor0
----
-14
-2
-3

query I rowsort
SELECT ALL + - col0 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8831
SELECT ALL + + col1 * + col1 DIV col1 + col0 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-8831
SELECT ALL + + col1 * + col1 / col1 + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - + col1 + + col1 * col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT ALL - cor0.col2 + + 36 FROM tab0 AS cor0
----
-46
3
35

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
7
78
79

query I rowsort
SELECT - 9 FROM tab0, tab1 AS cor0, tab1, tab1 AS cor1
----
81 values hashing to ea2ee48b6db0ed0e9f87711d3eeef049

query I rowsort
SELECT + 87 + + cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b3807af288587dc3cb2eb007f5a1bf51

query I rowsort
SELECT - col2 * - 9 FROM tab2 AS cor0
----
234
243
342

query I rowsort
SELECT DISTINCT - - 19 FROM tab2, tab1, tab1 cor0
----
19

query I rowsort
SELECT col2 + - ( + col2 ) + - col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 5 col2 FROM tab0 cor0
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 56 col0 FROM tab1 AS cor0
----
56
56
56

query I rowsort
SELECT ALL + col0 + col2 * col0 FROM tab0
----
70
7387
816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8843
SELECT CAST( + tab1.col0 AS SIGNED ) col1 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8843
SELECT CAST ( + tab1.col0 AS INTEGER ) col1 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT 81 * - col1 FROM tab2
----
-1377
-2511
-4779

query I rowsort
SELECT - 8 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 852581644118629bf652b1aa4b8f4363

query I rowsort
SELECT ALL 0 AS col1 FROM tab0, tab2, tab2 AS cor0, tab0 AS cor1
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

query I rowsort
SELECT - col2 + - 11 - 6 AS col1 FROM tab1
----
-113
-71
-74

query I rowsort
SELECT + ( - col2 ) + - cor0.col2 AS col1 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT - col2 + - col0 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT - + ( + ( + col1 ) ) + col1 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8851
SELECT - - col0 * 11 + col1 DIV + col1 FROM tab2 AS cor0
----
78
859
870

skipif mysql # not compatible
query I rowsort label-8851
SELECT - - col0 * 11 + col1 / + col1 FROM tab2 AS cor0
----
78
859
870

query I rowsort
SELECT DISTINCT + + col2 * - col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-8853
SELECT ALL - 37 DIV col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8853
SELECT ALL - 37 / col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 + ( cor0.col2 ) AS col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT + 52 * - col2 FROM tab2 AS cor0
----
-1352
-1404
-1976

query I rowsort
SELECT ( 44 ) AS col1 FROM tab2 AS cor0
----
44
44
44

query I rowsort
SELECT ALL + - 59 * + col1 AS col1 FROM tab2 AS cor0
----
-1003
-1829
-3481

onlyif mysql # use DIV operator for integer division
query I rowsort label-8858
SELECT + 41 + + 49 DIV - col0 AS col1 FROM tab0 cor0
----
39
40
41

skipif mysql # not compatible
query I rowsort label-8858
SELECT + 41 + + 49 / - col0 AS col1 FROM tab0 cor0
----
39
40
41

query I rowsort
SELECT DISTINCT - col1 * col1 + col1 AS col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT + ( - tab2.col2 ) + + col1 AS col2 FROM tab2
----
-21
33
4

query I rowsort
SELECT ( - tab2.col2 ) + + col1 * ( - col2 ) FROM tab2
----
-1560
-684
-864

query I rowsort
SELECT DISTINCT col0 + - 37 AS col2 FROM tab0
----
-13
-2
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 3 * 16 col2 FROM tab2 AS cor0
----
48

query I rowsort
SELECT DISTINCT col1 * cor0.col1 + col0 AS col1 FROM tab2 AS cor0
----
3559
368
968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8865
SELECT DISTINCT + CAST( NULL AS SIGNED ) + - col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8865
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8867
SELECT + + CAST( NULL AS SIGNED ) * col0 + cor0.col2 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8867
SELECT + + CAST ( NULL AS INTEGER ) * col0 + cor0.col2 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 99 * col0 + col1 FROM tab1 AS cor0
----
323
6346
7933

query I rowsort
SELECT DISTINCT 37 + col2 * + cor0.col1 FROM tab1 AS cor0
----
1285
1441
607

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8870
SELECT DISTINCT - + 61 * col0 / col1 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8870
SELECT DISTINCT - + 61 * col0 / col1 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + 73 + col0 AS col1 FROM tab2 AS cor0
----
151
152
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + cor0.col0 col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - + 54 AS col0 FROM tab1 AS cor0
----
-54
-54
-54

query I rowsort
SELECT col1 * + col1 + - 38 FROM tab2 cor0
----
251
3443
923

query I rowsort
SELECT DISTINCT - - 48 AS col2 FROM tab0 AS cor0
----
48

query I rowsort
SELECT DISTINCT + ( col1 ) + - ( col0 ) AS col0 FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + col2 + ( + 14 ) + col0 col2 FROM tab2 AS cor0
----
1537
750
768

query I rowsort
SELECT ALL col1 + - col2 * col2 AS col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT + ( + col0 ) + - col2 * 57 AS col1 FROM tab2 AS cor0
----
-1404
-1532
-2087

query I rowsort
SELECT DISTINCT - - col1 * cor0.col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + 4 + - col2 * + 64 FROM tab0 AS cor0
----
-2108
-5244
-60

query I rowsort
SELECT ALL - + col2 * col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + 26 * + col2 + 57 FROM tab2 AS cor0
----
1045
733
759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8884
SELECT - cor0.col0 + - col2 * CAST( 92 + - col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-1654
-2929
-936

skipif mysql # not compatible
query I rowsort label-8884
SELECT - cor0.col0 + - col2 * CAST ( 92 + - col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-1654
-2929
-936

query I rowsort
SELECT DISTINCT + 50 + col2 * 59 FROM tab1 AS cor0
----
3236
3413
5714

query I rowsort
SELECT ALL + 40 * + 92 * tab0.col0 + col2 * col2 * - col1 + + ( - tab0.col2 * + col1 ) FROM tab0
----
-291826
-8172
128606

query I rowsort
SELECT ( + 49 ) * col0 + col1 * - col2 AS col0 FROM tab2
----
-494
2288
3225

query I rowsort
SELECT ALL 15 * col0 - 55 * - 55 * - col1 FROM tab0 AS cor0
----
-259790
-273940
-292900

query I rowsort
SELECT ALL + col1 * + col0 AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT + col0 - ( col1 ) AS col1 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8891
SELECT ALL col1 * CAST( NULL AS SIGNED ) + + 72 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8891
SELECT ALL col1 * CAST ( NULL AS INTEGER ) + + 72 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col2 + 40 - + col2 FROM tab0 AS cor0
----
-124
-26
38

query I rowsort
SELECT + col0 * - col2 * col1 AS col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT + cor0.col2 * + 62 FROM tab1 AS cor0
----
3348
3534
5952

onlyif mysql # use DIV operator for integer division
query I rowsort label-8895
SELECT col1 * - col0 - + ( - cor0.col1 ) DIV - col1 AS col1 FROM tab1 AS cor0
----
-1041
-641
-79

skipif mysql # not compatible
query I rowsort label-8895
SELECT col1 * - col0 - + ( - cor0.col1 ) / - col1 AS col1 FROM tab1 AS cor0
----
-1041
-641
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8896
SELECT ALL col1 DIV 77 + 62 * col1 AS col1 FROM tab1 AS cor0
----
1612
620
806

skipif mysql # not compatible
query I rowsort label-8896
SELECT ALL col1 / 77 + 62 * col1 AS col1 FROM tab1 AS cor0
----
1612
620
806

query I rowsort
SELECT ALL + tab1.col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT - col0 * 62 FROM tab1 AS cor0
----
-186
-3968
-4960

onlyif mysql # use DIV operator for integer division
query I rowsort label-8899
SELECT ALL col2 + + ( cor0.col2 ) DIV + col0 FROM tab1 AS cor0
----
57
72
97

skipif mysql # not compatible
query I rowsort label-8899
SELECT ALL col2 + + ( cor0.col2 ) / + col0 FROM tab1 AS cor0
----
57
72
97

query I rowsort
SELECT ALL - col1 + col0 * col2 AS col1 FROM tab0 cor0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-8901
SELECT ALL + col1 DIV 90 + + col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-8901
SELECT ALL + col1 / 90 + + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL - cor0.col2 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 99 col1 FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2
----
99

query I rowsort
SELECT tab1.col1 + - col1 * col2 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT - 43 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ab0c314d2b589ccedb9a875beeb1f86a

query I rowsort
SELECT DISTINCT + col2 - + col0 AS col0 FROM tab0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col2 * ( - 55 ) col2 FROM tab0
----
-369820
-55
-59895

query I rowsort
SELECT DISTINCT + tab2.col2 + - col2 * + 72 AS col2 FROM tab2
----
-1846
-1917
-2698

query I rowsort
SELECT - tab2.col2 + + col1 * col1 * - 86 FROM tab2
----
-24892
-299392
-82673

query I rowsort
SELECT - col0 * + ( + 76 ) * col1 + + col2 * + col0 FROM tab2 AS cor0
----
-16303
-347724
-99066

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8911
SELECT + - cor0.col1 * + col0 * - 21 + - col1 * CAST( - col2 AS SIGNED ) + - col1 FROM tab1 AS cor0
----
14000
23075
3016

skipif mysql # not compatible
query I rowsort label-8911
SELECT + - cor0.col1 * + col0 * - 21 + - col1 * CAST ( - col2 AS INTEGER ) + - col1 FROM tab1 AS cor0
----
14000
23075
3016

query I rowsort
SELECT - cor0.col2 + col2 + - 83 AS col1 FROM tab0 AS cor0
----
-83
-83
-83

query I rowsort
SELECT 49 * - col2 + 83 * + ( col0 ) AS col1 FROM tab2
----
-742
4695
5200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col2 col0 FROM tab2, tab0, tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-8915
SELECT + 32 DIV - col0 + tab2.col0 * col1 AS col0 FROM tab2
----
1343
213
4602

skipif mysql # not compatible
query I rowsort label-8915
SELECT + 32 / - col0 + tab2.col0 * col1 AS col0 FROM tab2
----
1343
213
4602

query I rowsort
SELECT DISTINCT 3 + col1 AS col1 FROM tab1
----
13
16
29

query I rowsort
SELECT + - col2 + 19 + + col1 * col2 FROM tab0 cor0
----
115
2824
7399

query I rowsort
SELECT ALL - cor0.col1 * 11 AS col1 FROM tab2 AS cor0
----
-187
-341
-649

query I rowsort
SELECT ALL - col2 + - cor0.col0 * 59 AS col1 FROM tab0 cor0
----
-1449
-2066
-5333

skipif mysql # not compatible
query I rowsort
SELECT + col1 + 65 + - ( col2 ) * CAST ( col2 AS REAL ) FROM tab0 AS cor0
----
-6568
-938
161

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 + 79 AS col0 FROM tab2 AS cor0
----
-210
-3402
-882

query I rowsort
SELECT - 87 + col2 FROM tab0
----
-5
-54
-86

onlyif mysql # use DIV operator for integer division
query I rowsort label-8923
SELECT - 30 DIV + cor0.col0 FROM tab1 AS cor0
----
-10
0
0

skipif mysql # not compatible
query I rowsort label-8923
SELECT - 30 / + cor0.col0 FROM tab1 AS cor0
----
-10
0
0

query I rowsort
SELECT ALL + col0 * 75 FROM tab1 cor0
----
225
4800
6000

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8925
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + - col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8925
SELECT DISTINCT + CAST ( NULL AS REAL ) + - col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - + 20 + 59 AS col2 FROM tab2 AS cor0
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 87 ) * col0 + 52 col1 FROM tab2 AS cor0
----
661
6838
6925

query I rowsort
SELECT DISTINCT - - 47 * - col0 AS col2 FROM tab1 AS cor0
----
-141
-3008
-3760

query I rowsort
SELECT ALL + + 86 + + col1 AS col0 FROM tab0 cor0
----
172
177
183

query I rowsort
SELECT ALL - cor0.col0 + 12 AS col1 FROM tab2 AS cor0
----
-66
-67
5

query I rowsort
SELECT - - col2 + col1 + col1 * col2 AS col2 FROM tab2 cor0
----
1619
701
895

query I rowsort
SELECT DISTINCT + - col2 * + col1 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT col2 + + col1 * - tab0.col0 + + 93 * - col2 AS col1 FROM tab0
----
-15643
-3487
-5100

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8934
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + 99 + - col2 - - col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-8934
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + 99 + - col2 - - col2 FROM tab1
----
NULL

query I rowsort
SELECT + col2 * col2 - col0 AS col1 FROM tab2 cor0
----
1365
598
722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8936
SELECT - + ( - col1 ) - + CAST( NULL AS SIGNED ) * - col2 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-8936
SELECT - + ( - col1 ) - + CAST ( NULL AS INTEGER ) * - col2 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 - col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - - 16 * col1 + col2 AS col2 FROM tab2 cor0
----
310
523
970

query I rowsort
SELECT + - 41 * + col2 FROM tab0 AS cor0
----
-1353
-3362
-41

query I rowsort
SELECT + col0 * - 36 + col0 * col2 AS col0 FROM tab2 AS cor0
----
-63
-780
158

query I rowsort
SELECT - cor0.col1 - + cor0.col1 AS col0 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT + col2 * - col0 + col0 * - col0 AS col2 FROM tab0 AS cor0
----
-1260
-1368
-15219

query I rowsort
SELECT ALL 18 FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT - ( + ( col1 ) ) FROM tab1
----
-10
-13
-26

query I rowsort
SELECT - ( - tab0.col0 * + col0 ) AS col2 FROM tab0
----
1225
576
7921

query I rowsort
SELECT ALL + tab1.col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8947
SELECT ALL - ( - col0 ) * + cor0.col1 + CAST( + col1 AS SIGNED ) AS col1 FROM tab1 cor0
----
104
1053
650

skipif mysql # not compatible
query I rowsort label-8947
SELECT ALL - ( - col0 ) * + cor0.col1 + CAST ( + col1 AS INTEGER ) AS col1 FROM tab1 cor0
----
104
1053
650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8948
SELECT DISTINCT + + CAST( NULL AS SIGNED ) - + col0 * col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8948
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) - + col0 * col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - - ( + 60 ) FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

onlyif mysql # use DIV operator for integer division
query I rowsort label-8950
SELECT - col2 + + ( - col2 ) * + col2 * - col0 + col2 DIV + col1 AS col0 FROM tab0 AS cor0
----
26103
34
598354

skipif mysql # not compatible
query I rowsort label-8950
SELECT - col2 + + ( - col2 ) * + col2 * - col0 + col2 / + col1 AS col0 FROM tab0 AS cor0
----
26103
34
598354

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8952
SELECT + + col0 * + CAST( NULL AS SIGNED ) + - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8952
SELECT + + col0 * + CAST ( NULL AS INTEGER ) + - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col1 * 43 + col0 * col1 FROM tab1 AS cor0
----
-1040
210
481

query I rowsort
SELECT DISTINCT - 53 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
-53

query I rowsort
SELECT - col1 * - 41 FROM tab2 cor0
----
1271
2419
697

query I rowsort
SELECT + + cor0.col2 + 88 + + cor0.col2 FROM tab0 AS cor0
----
154
252
90

query I rowsort
SELECT DISTINCT - 15 + - col2 FROM tab0 AS cor0
----
-16
-48
-97

query I rowsort
SELECT DISTINCT + - col0 - col1 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT col1 - - 25 * 63 FROM tab1
----
1585
1588
1601

query I rowsort
SELECT DISTINCT col2 * + col2 + + 76 + - col0 FROM tab1
----
2989
3261
9212

query I rowsort
SELECT DISTINCT col2 + ( - tab2.col0 * tab2.col0 ) AS col2 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT + col0 * 83 + + tab2.col0 AS col1 FROM tab2
----
588
6552
6636

query I rowsort
SELECT - tab0.col2 * col1 + col0 * tab0.col0 FROM tab0
----
-2262
1128
459

query I rowsort
SELECT col0 - + 39 AS col1 FROM tab0
----
-15
-4
50

query I rowsort
SELECT ALL + ( 7 ) * - col2 + + col2 * + col0 AS col1 FROM tab0
----
28
561
6724

query I rowsort
SELECT DISTINCT ( - col2 ) * - col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT + 77 * - col1 AS col2 FROM tab2 AS cor0
----
-1309
-2387
-4543

query I rowsort
SELECT - col0 * + col1 + col0 + - col2 * - col2 * - 42 FROM tab0 AS cor0
----
-290418
-3402
-47778

query I rowsort
SELECT ALL tab1.col2 * 72 AS col1 FROM tab1
----
3888
4104
6912

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8970
SELECT CAST( ( col1 ) AS SIGNED ) FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8970
SELECT CAST ( ( col1 ) AS INTEGER ) FROM tab0
----
86
91
97

query I rowsort
SELECT 15 * 29 FROM tab2
----
435
435
435

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 43 col1 FROM tab1
----
43

query I rowsort
SELECT 55 * - col0 - col1 AS col1 FROM tab0 AS cor0
----
-1406
-2022
-4986

query I rowsort
SELECT - + col1 * + col1 + - col1 + col0 FROM tab2 cor0
----
-227
-3462
-985

query I rowsort
SELECT ALL col2 - - col1 * + col2 * + col0 FROM tab2
----
119678
51072
5886

onlyif mysql # use DIV operator for integer division
query I rowsort label-8976
SELECT ALL - col1 DIV col1 - ( 93 ) FROM tab0
----
-94
-94
-94

skipif mysql # not compatible
query I rowsort label-8976
SELECT ALL - col1 / col1 - ( 93 ) FROM tab0
----
-94
-94
-94

query I rowsort
SELECT ALL col2 * + col1 - tab1.col1 FROM tab1
----
1235
1378
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8978
SELECT col0 * col2 + - CAST( NULL AS SIGNED ) / col0 - - col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8978
SELECT col0 * col2 + - CAST ( NULL AS INTEGER ) / col0 - - col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab0, tab2, tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT col1 + col0 + col0 * + tab0.col0 AS col0 FROM tab0
----
1357
686
8101

query I rowsort
SELECT DISTINCT + cor0.col0 * - 73 FROM tab1 AS cor0
----
-219
-4672
-5840

skipif mysql # not compatible
query I rowsort
SELECT ALL - col2 * col2 + col0 * col0 + CAST ( ( + col0 ) * ( - col1 ) + + col0 * col1 AS REAL ) AS col0 FROM tab2 AS cor0
----
-680
4797
5408

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT - col1 * + col2 + 11 * - col1 FROM tab2 AS cor0
----
-1178
-2183
-833

query I rowsort
SELECT col0 * 54 + col0 AS col1 FROM tab2
----
385
4290
4345

onlyif mysql # use DIV operator for integer division
query I rowsort label-8986
SELECT + col1 * cor0.col0 + + col1 * + col0 + - col1 DIV col2 AS col0 FROM tab0 AS cor0
----
16197
4126
6693

skipif mysql # not compatible
query I rowsort label-8986
SELECT + col1 * cor0.col0 + + col1 * + col0 + - col1 / col2 AS col0 FROM tab0 AS cor0
----
16197
4126
6693

query I rowsort
SELECT + col0 + col0 * 17 AS col1 FROM tab1 AS cor0
----
1152
1440
54

query I rowsort
SELECT ALL col0 + ( col2 ) AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col1 * - 90 AS col2 FROM tab2 AS cor0
----
1530
2790
5310

query I rowsort
SELECT DISTINCT - col2 * - col1 * + cor0.col0 FROM tab2 cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT + - col2 * ( - col2 ) AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT cor0.col0 * col0 + col2 AS col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT DISTINCT - + col0 + + 59 AS col2 FROM tab2 AS cor0
----
-19
-20
52

query I rowsort
SELECT ALL cor0.col2 + + 24 AS col0 FROM tab1 AS cor0
----
120
78
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-8995
SELECT ALL + - col1 DIV - 29 + 91 + col1 AS col2 FROM tab1 cor0
----
101
104
117

skipif mysql # not compatible
query I rowsort label-8995
SELECT ALL + - col1 / - 29 + 91 + col1 AS col2 FROM tab1 cor0
----
101
104
117

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8996
SELECT - + cor0.col1 + CAST( NULL AS SIGNED ) / col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8996
SELECT - + cor0.col1 + CAST ( NULL AS INTEGER ) / col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8997
SELECT + CAST( + col1 AS SIGNED ) * cor0.col2 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-8997
SELECT + CAST ( + col1 AS INTEGER ) * cor0.col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + cor0.col0 * - col1 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + + col0 * ( + col2 ) FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT 53 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
-1
-4
-43

query I rowsort
SELECT + 61 AS col1 FROM tab0 cor0
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * 96 + col2 col1 FROM tab2 AS cor0
----
1670
3003
5690

query I rowsort
SELECT ALL - 1 + 3 FROM tab2 AS cor0
----
2
2
2

query I rowsort
SELECT ALL 22 + - 45 AS col1 FROM tab1 AS cor0
----
-23
-23
-23

onlyif mysql # use DIV operator for integer division
query I rowsort label-9005
SELECT DISTINCT + col2 + col0 DIV + cor0.col0 AS col1 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-9005
SELECT DISTINCT + col2 + col0 / + cor0.col0 AS col1 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT DISTINCT + 38 * - col2 + col0 FROM tab2 AS cor0
----
-1019
-1365
-910

onlyif mysql # use DIV operator for integer division
query I rowsort label-9007
SELECT ALL - col0 DIV + cor0.col1 AS col0 FROM tab1 cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-9007
SELECT ALL - col0 / + cor0.col1 AS col0 FROM tab1 cor0
----
-6
-6
0

query I rowsort
SELECT ALL + - 66 FROM tab0 AS cor0
----
-66
-66
-66

query I rowsort
SELECT ALL cor0.col1 * cor0.col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 00f153c5d80e692faff5018d8701b92d

query I rowsort
SELECT ALL + cor0.col1 + - col1 * ( col1 * + col0 ) AS col0 FROM tab1 AS cor0
----
-13507
-2002
-6390

onlyif mysql # use DIV operator for integer division
query I rowsort label-9011
SELECT ALL ( - col0 ) DIV col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9011
SELECT ALL ( - col0 ) / col0 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT + 89 * + col1 * col0 AS col2 FROM tab1 AS cor0
----
56960
6942
92560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - col1 col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT - 87 * col2 FROM tab2 AS cor0
----
-2262
-2349
-3306

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 23 col0 FROM tab2 AS cor0
----
23

query I rowsort
SELECT ALL col2 * col2 - col1 AS col2 FROM tab1 AS cor0
----
2890
3239
9203

onlyif mysql # use DIV operator for integer division
query I rowsort label-9017
SELECT - 14 DIV + 90 + + cor0.col1 * col1 FROM tab0 cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-9017
SELECT - 14 / + 90 + + cor0.col1 * col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + ( + 56 ) FROM tab0 AS cor0
----
56
56
56

query I rowsort
SELECT + - 39 + - col1 AS col2 FROM tab1 AS cor0
----
-49
-52
-65

query I rowsort
SELECT + col0 * 26 AS col0 FROM tab0 AS cor0
----
2314
624
910

query I rowsort
SELECT - - col1 * 88 FROM tab2 AS cor0
----
1496
2728
5192

query I rowsort
SELECT ALL - col0 * - col2 * + col1 AS col0 FROM tab2
----
119652
51034
5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9023
SELECT tab0.col1 + + CAST( col0 AS SIGNED ) FROM tab0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-9023
SELECT tab0.col1 + + CAST ( col0 AS INTEGER ) FROM tab0
----
110
132
180

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col0 * col0 * cor0.col2 AS col1 FROM tab0 AS cor0
----
-1190
-18984
-649433

query I rowsort
SELECT DISTINCT 0 - 75 * col2 AS col2 FROM tab0 AS cor0
----
-2475
-6150
-75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9027
SELECT + CAST( - col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-9027
SELECT + CAST ( - col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL + ( + col1 ) * col2 AS col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - - col0 - + col1 * col1 AS col2 FROM tab0 cor0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL cor0.col0 * - col2 + + col1 * col1 * col2 FROM tab2 AS cor0
----
25758
7980
88478

query I rowsort
SELECT DISTINCT + col2 - - col0 * col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT - 48 * col0 + col1 FROM tab1 AS cor0
----
-118
-3062
-3827

query I rowsort
SELECT - col0 * col1 - col0 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT DISTINCT - + col2 * + col0 + + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + col0 * 59 AS col0 FROM tab2 AS cor0
----
413
4602
4661

query I rowsort
SELECT ALL - cor0.col0 * + col0 * + 69 AS col1 FROM tab2 AS cor0
----
-3381
-419796
-430629

onlyif mysql # use DIV operator for integer division
query I rowsort label-9037
SELECT 39 DIV col0 AS col1 FROM tab2 AS cor0
----
0
0
5

skipif mysql # not compatible
query I rowsort label-9037
SELECT 39 / col0 AS col1 FROM tab2 AS cor0
----
0
0
5

query I rowsort
SELECT DISTINCT + 43 + + col2 FROM tab0 AS cor0
----
125
44
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-9039
SELECT col0 DIV + 35 AS col2 FROM tab2 cor0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-9039
SELECT col0 / + 35 AS col2 FROM tab2 cor0
----
0
2
2

query I rowsort
SELECT DISTINCT 26 * cor0.col1 * + cor0.col1 FROM tab2, tab1 AS cor0
----
17576
2600
4394

query I rowsort
SELECT + col2 * 60 AS col1 FROM tab0 cor0
----
1980
4920
60

query I rowsort
SELECT DISTINCT - + col0 * - col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - col2 * 61 FROM tab0 AS cor0
----
-2013
-5002
-61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9044
SELECT DISTINCT + CAST( NULL AS SIGNED ) + 2 AS col2 FROM tab2, tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9044
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + 2 AS col2 FROM tab2, tab1 cor0
----
NULL

query I rowsort
SELECT + col2 * - col0 + - tab0.col0 AS col1 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT + + col0 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-9047
SELECT ALL - col2 DIV ( - col2 ) FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9047
SELECT ALL - col2 / ( - col2 ) FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9048
SELECT + col1 DIV ( col0 ) FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-9048
SELECT + col1 / ( col0 ) FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT col2 * + 37 AS col1 FROM tab0 AS cor0
----
1221
3034
37

query I rowsort
SELECT + col1 * 54 FROM tab1 AS cor0
----
1404
540
702

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 + + CAST ( + 12 AS REAL ) * - col0 + 83 * + ( + col1 * + 83 ) AS col0 FROM tab0 AS cor0
----
592190
625920
667848

query I rowsort
SELECT ALL - col2 * - 19 AS col0 FROM tab2 AS cor0
----
494
513
722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9053
SELECT - - CAST( NULL AS SIGNED ) + col1 * col1 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-9053
SELECT - - CAST ( NULL AS INTEGER ) + col1 * col1 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col2 FROM tab2, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT col1 * col1 * + col0 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT col0 + - ( - col1 ) * + col2 FROM tab2
----
1612
725
844

query I rowsort
SELECT DISTINCT - col1 * ( - ( col2 ) ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL - + col1 - - col0 FROM tab0 AS cor0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-9059
SELECT - 10 + col0 DIV col0 FROM tab2 AS cor0
----
-9
-9
-9

skipif mysql # not compatible
query I rowsort label-9059
SELECT - 10 + col0 / col0 FROM tab2 AS cor0
----
-9
-9
-9

query I rowsort
SELECT - 83 * - col0 AS col1 FROM tab0
----
1992
2905
7387

query I rowsort
SELECT DISTINCT + col2 * col1 + - col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT cor0.col2 + col2 * + ( col1 * + col2 ) + ( cor0.col1 ) FROM tab2 cor0
----
22657
24603
39969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 83 * + col2 + + 1 * + col0 col0 FROM tab1 AS cor0
----
4485
4795
8048

query I rowsort
SELECT col0 * - col1 + - ( - col2 ) AS col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT col0 * cor0.col0 + 77 FROM tab2 AS cor0
----
126
6161
6318

query I rowsort
SELECT col0 * 43 + col2 AS col1 FROM tab1 AS cor0
----
183
2809
3536

query I rowsort
SELECT ALL 88 + + col1 FROM tab0
----
174
179
185

query I rowsort
SELECT 32 - + col1 FROM tab0
----
-54
-59
-65

query I rowsort
SELECT - + 39 * col0 * + col2 + col2 FROM tab2 AS cor0
----
-117040
-7344
-79066

query I rowsort
SELECT - cor0.col2 + - col1 + cor0.col0 FROM tab2 cor0
----
-51
-7
24

query I rowsort
SELECT DISTINCT 75 + + col0 FROM tab1 AS cor0
----
139
155
78

query I rowsort
SELECT ALL - col1 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-9073
SELECT - 14 - - col0 DIV col1 AS col1 FROM tab0 AS cor0
----
-14
-14
-14

skipif mysql # not compatible
query I rowsort label-9073
SELECT - 14 - - col0 / col1 AS col1 FROM tab0 AS cor0
----
-14
-14
-14

query I rowsort
SELECT - col0 * col0 + 86 * col2 AS col1 FROM tab1 AS cor0
----
1856
4635
806

query I rowsort
SELECT - col0 + col1 + - col0 FROM tab0 AS cor0
----
-87
27
38

query I rowsort
SELECT ALL + col2 + + cor0.col0 + col0 * - cor0.col1 * cor0.col2 FROM tab0 AS cor0
----
-3359
-663947
-68055

query I rowsort
SELECT + col2 + + ( col2 ) AS col1 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT DISTINCT + col2 * col1 * col1 AS col0 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT - + cor0.col0 * + col0 + ( + cor0.col1 ) + + col2 FROM tab0 AS cor0
----
-1127
-457
-7748

query I rowsort
SELECT ALL - 10 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

query I rowsort
SELECT DISTINCT + 26 AS col1 FROM tab1, tab1 AS cor0
----
26

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT 99 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
99

query I rowsort
SELECT + ( - 9 ) AS col2 FROM tab1 cor0
----
-9
-9
-9

query I rowsort
SELECT DISTINCT + 97 FROM tab1 cor0
----
97

query I rowsort
SELECT ALL - col0 * + col2 * col0 AS col1 FROM tab0 cor0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT col2 + + col1 * + 15 AS col0 FROM tab2 AS cor0
----
293
492
911

query I rowsort
SELECT ALL + 2 AS col2 FROM tab2 AS cor0
----
2
2
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9089
SELECT DISTINCT - col2 + col1 DIV col0 col0 FROM tab1 cor0
----
-46
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9089
SELECT DISTINCT - col2 + col1 / col0 col0 FROM tab1 cor0
----
-46
-57
-96

query I rowsort
SELECT + 1 + col2 * + 62 AS col1 FROM tab2 AS cor0
----
1613
1675
2357

query I rowsort
SELECT ALL - 4 AS col1 FROM tab0 cor0
----
-4
-4
-4

query I rowsort
SELECT ALL + 39 * tab1.col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 212e39fed891251f5f97cd45b6964bba

query I rowsort
SELECT DISTINCT - ( - tab0.col0 ) FROM tab0
----
24
35
89

query I rowsort
SELECT - tab1.col1 AS col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT DISTINCT col0 + col1 * ( col0 ) + col2 * + 19 * + 58 FROM tab1 AS cor0
----
106912
59589
63518

query I rowsort
SELECT ALL col0 + col1 * ( + col2 ) FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL 63 * - col0 FROM tab1 AS cor0
----
-189
-4032
-5040

query I rowsort
SELECT DISTINCT 92 + col1 * col2 FROM tab0 AS cor0
----
189
2930
7554

query I rowsort
SELECT ALL col1 * col0 + + 24 * col2 * + col2 FROM tab1 AS cor0
----
222224
70062
78616

query I rowsort
SELECT ALL + col0 * + col2 - - col2 AS col1 FROM tab1
----
216
3705
7776

query I rowsort
SELECT ALL + col1 - - col1 AS col1 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL - col0 + + col1 * + col1 AS col0 FROM tab2
----
210
3403
954

query I rowsort
SELECT 37 + + tab0.col2 AS col1 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 23cad427fce0a05ab476b87f624b584c

query I rowsort
SELECT ALL 9 * + col1 - col1 AS col2 FROM tab0
----
688
728
776

query I rowsort
SELECT DISTINCT - 17 * + col2 AS col0 FROM tab2 AS cor0
----
-442
-459
-646

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 * col0 - 2 col0 FROM tab0
----
33
7296
790

query I rowsort
SELECT DISTINCT col0 + 14 FROM tab1
----
17
78
94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9108
SELECT DISTINCT + CAST( + col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9108
SELECT DISTINCT + CAST ( + col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col1 * - cor0.col2 + - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9110
SELECT + - CAST( NULL AS DECIMAL ) * cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9110
SELECT + - CAST ( NULL AS REAL ) * cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 41 FROM tab2, tab1 AS cor0
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

query I rowsort
SELECT DISTINCT - col0 * col1 + col0 AS col0 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT - col1 * col1 + col0 AS col0 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT - col2 + + tab1.col2 * + col2 * - col1 AS col1 FROM tab1
----
-119904
-32547
-75870

onlyif mysql # use DIV operator for integer division
query I rowsort label-9115
SELECT tab2.col1 DIV 15 + + col0 DIV tab2.col0 FROM tab2
----
2
3
4

skipif mysql # not compatible
query I rowsort label-9115
SELECT tab2.col1 / 15 + + col0 / tab2.col0 FROM tab2
----
2
3
4

query I rowsort
SELECT ALL - tab1.col0 + cor1.col2 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 11dda44fbebd45f5892a68d60653afd2

query I rowsort
SELECT 42 + 8 FROM tab0, tab2 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT + 22 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

query I rowsort
SELECT 97 + + col0 FROM tab0
----
121
132
186

query I rowsort
SELECT + cor0.col1 * + cor0.col0 * - col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT 46 * + 22 + col2 AS col0 FROM tab0 AS cor0
----
1013
1045
1094

onlyif mysql # use DIV operator for integer division
query I rowsort label-9122
SELECT + col2 * col1 DIV - col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-9122
SELECT + col2 * col1 / - col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( col0 AS REAL ) * col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) + col0 * col0 col2 FROM tab1
----
12
4160
6480

query I rowsort
SELECT DISTINCT + col2 * 18 + - col2 * - col1 FROM tab0 AS cor0
----
115
3432
8938

query I rowsort
SELECT 25 * + 0 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 28 + col0 + col1 col1 FROM tab1 AS cor0
----
102
121
57

query I rowsort
SELECT + ( + col1 ) * + col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT - 54 + + col1 AS col1 FROM tab1 AS cor0
----
-28
-41
-44

query I rowsort
SELECT + 78 * col2 FROM tab1 AS cor0
----
4212
4446
7488

query I rowsort
SELECT ALL - - 56 * col2 AS col2 FROM tab0 AS cor0
----
1848
4592
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-9132
SELECT DISTINCT + + ( col2 ) DIV col2 FROM tab0 cor0
----
1

skipif mysql # not compatible
query I rowsort label-9132
SELECT DISTINCT + + ( col2 ) / col2 FROM tab0 cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - 48 col0 FROM tab2 AS cor0
----
-17
-31
11

query I rowsort
SELECT - col1 * - col0 * - cor0.col0 AS col1 FROM tab1 cor0
----
-234
-40960
-83200

query I rowsort
SELECT ALL col0 + + col2 * + tab2.col0 AS col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT ALL col1 + + col1 * col0 AS col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL col1 + - col2 + + col1 FROM tab2 AS cor0
----
-4
35
92

query I rowsort
SELECT ALL + col0 FROM tab2 WHERE NOT col0 * + col0 NOT IN ( - col0 )
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + col0 / - col1 NOT IN ( + col2 * tab0.col0 + col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL col0 + - col2 * col0 FROM tab2
----
-182
-1950
-2923

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 WHERE col2 <> col2
----

query I rowsort
SELECT DISTINCT - cor0.col0 * col2 - + col0 FROM tab0 cor0
----
-70
-7387
-816

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE - col2 * cor0.col2 - - col0 IN ( col1 )
----

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab0 WHERE NOT + col1 < NULL
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE - col2 IN ( col1 * col2 )
----

query III rowsort
SELECT * FROM tab0 WHERE - col2 - + col1 * col2 * col0 BETWEEN NULL AND - col0
----

query I rowsort
SELECT ALL + tab2.col0 + - col1 + - col1 AS col1 FROM tab2
----
-40
-55
45

query I rowsort
SELECT + col1 * - col1 * + col1 FROM tab1
----
-1000
-17576
-2197

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NULL ) = + col2 + + col0
----

query I rowsort
SELECT ALL tab0.col0 + + col1 + tab0.col1 * col1 * col2 AS col2 FROM tab0 WHERE NOT - col2 NOT IN ( tab0.col1 + col1 )
----

query I rowsort
SELECT col0 * + col1 + + col1 + + col2 FROM tab2
----
1398
275
4687

query I rowsort
SELECT ALL + col0 + - tab2.col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT col0 * + col0 + + col2 FROM tab1
----
4153
63
6496

query I rowsort
SELECT + col2 * col2 + col2 + col2 AS col2 FROM tab0 WHERE NULL NOT BETWEEN col0 + + col1 AND + col1 * + col1
----

query III rowsort
SELECT ALL * FROM tab2 WHERE col2 * - col0 BETWEEN ( NULL ) AND col2
----

query I rowsort
SELECT ALL + col1 - col2 AS col0 FROM tab0 WHERE col2 * col1 IN ( col1 * col0 * col2 )
----

query I rowsort
SELECT col1 + + col2 * col1 * + col2 FROM tab1
----
119821
32500
75842

query I rowsort
SELECT ALL + col2 + + col0 + col1 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT ALL + col0 * col2 - - col0 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT col0 + - col2 + col1 * col1 FROM tab2 AS cor0
----
330
3533
941

query I rowsort
SELECT DISTINCT + cor0.col0 * - col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col2 + + col0 col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT col1 + + col2 * + col0 + col1 * col0 FROM tab2
----
4362
437
6689

query I rowsort
SELECT col1 + tab2.col0 * - col0 AS col2 FROM tab2
----
-18
-6025
-6224

onlyif mysql # use DIV operator for integer division
query I rowsort label-9165
SELECT DISTINCT + col2 * + col1 + tab0.col2 DIV - tab0.col2 FROM tab0
----
2837
7461
96

skipif mysql # not compatible
query I rowsort label-9165
SELECT DISTINCT + col2 * + col1 + tab0.col2 / - tab0.col2 FROM tab0
----
2837
7461
96

query I rowsort
SELECT + col2 * + col2 + - col2 + col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT col1 + col1 FROM tab2 WHERE ( NULL ) BETWEEN col1 AND + col1
----

query I rowsort
SELECT DISTINCT col2 * col0 FROM tab2 WHERE NULL IN ( col1 * + tab2.col0 )
----

query I rowsort
SELECT ALL - tab0.col1 - tab0.col0 * cor0.col1 AS col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to 9f793f0c3e50de3d34cb5d8e4a435aa3

query I rowsort
SELECT col0 + tab2.col1 AS col2 FROM tab2 WHERE NOT NULL < ( NULL )
----

query I rowsort
SELECT tab1.col2 FROM tab2 AS cor0 CROSS JOIN tab1
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT - + col0 + - col0 * col0 FROM tab2 AS cor0
----
-56
-6162
-6320

query I rowsort
SELECT DISTINCT - - col2 * cor0.col1 + - cor0.col0 + - cor0.col0 FROM tab1 AS cor0
----
1088
1398
442

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 + col1 * col2 + col2 FROM tab1
----
1344
1458
627

query III rowsort
SELECT * FROM tab2 WHERE NULL IN ( col1 * col0 + tab2.col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9177
SELECT + cor0.col0 * 11 DIV 66 + col0 FROM tab0 AS cor0
----
103
28
40

skipif mysql # not compatible
query I rowsort label-9177
SELECT + cor0.col0 * 11 / 66 + col0 FROM tab0 AS cor0
----
103
28
40

query I rowsort
SELECT - col1 + 36 AS col0 FROM tab0 AS cor0
----
-50
-55
-61

query I rowsort
SELECT 71 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT + - col0 + + col0 * 83 FROM tab0 AS cor0
----
1968
2870
7298

query I rowsort
SELECT + col0 * col1 * - 68 FROM tab1
----
-43520
-5304
-70720

query I rowsort
SELECT col1 * - ( + 45 ) + col1 FROM tab0 AS cor0
----
-3784
-4004
-4268

query I rowsort
SELECT ALL 95 + 70 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to ba887a18b86a2c64d4b2c70e5cbb32da

query I rowsort
SELECT col1 * 86 FROM tab1 cor0
----
1118
2236
860

query I rowsort
SELECT col0 + col0 * + col1 AS col2 FROM tab2
----
1422
224
4680

query I rowsort
SELECT ALL + col2 * col2 AS col2 FROM tab2 WHERE NOT NULL = ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col2 * col0 + col0 * + col2 col0 FROM tab0
----
26928
605734
70

query I rowsort
SELECT col0 * col0 * + col2 - col2 AS col2 FROM tab2
----
1296
158158
237120

onlyif mysql # use DIV operator for integer division
query I rowsort label-9189
SELECT DISTINCT col1 * - col0 DIV col0 AS col1 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-9189
SELECT DISTINCT col1 * - col0 / col0 AS col1 FROM tab0
----
-86
-91
-97

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL = + col2 + col2 * - col2 * - col0 + + col2 * col0
----

query I rowsort
SELECT ALL + col1 * - col1 FROM tab0 WHERE NULL > NULL
----

query I rowsort
SELECT + 94 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT + + col2 * col1 * ( - col0 ) FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT col0 - col2 * cor0.col2 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT - col2 * - col2 + - 4 + col1 AS col0 FROM tab2 AS cor0
----
1457
731
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-9196
SELECT ALL col2 DIV 7 FROM tab1
----
13
7
8

skipif mysql # not compatible
query I rowsort label-9196
SELECT ALL col2 / 7 FROM tab1
----
13
7
8

query I rowsort
SELECT col1 + + ( - 74 ) FROM tab0
----
12
17
23

query I rowsort
SELECT + + col0 * 28 * 97 AS col2 FROM tab0 cor0
----
241724
65184
95060

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT - + col1 * + 98 AS col0 FROM tab2 cor0
----
-1666
-3038
-5782

query I rowsort
SELECT col2 * + col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT ALL + tab1.col2 + + tab1.col2 - + col1 AS col0 FROM tab1
----
104
179
82

query I rowsort
SELECT ALL col0 * 46 FROM tab0 AS cor0
----
1104
1610
4094

onlyif mysql # use DIV operator for integer division
query I rowsort label-9204
SELECT ALL + 82 DIV + col2 AS col2 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-9204
SELECT ALL + 82 / + col2 AS col2 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT DISTINCT - - ( + col0 ) AS col1 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT + col1 + - col2 * - ( + cor0.col1 ) FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9207
SELECT - 29 * cor0.col2 + + CAST( + col1 AS SIGNED ) FROM tab2 cor0
----
-1085
-695
-752

skipif mysql # not compatible
query I rowsort label-9207
SELECT - 29 * cor0.col2 + + CAST ( + col1 AS INTEGER ) FROM tab2 cor0
----
-1085
-695
-752

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 23 * + cor0.col2 col1 FROM tab0 AS cor0
----
-1886
-23
-759

query I rowsort
SELECT DISTINCT col2 + ( col0 ) FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9210
SELECT DISTINCT - col0 * CAST( NULL AS SIGNED ) * - 76 + col0 * ( - col1 ) + + col2 * 19 * - cor0.col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9210
SELECT DISTINCT - col0 * CAST ( NULL AS INTEGER ) * - 76 + col0 * ( - col1 ) + + col2 * 19 * - cor0.col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - col2 * - 73 FROM tab2 AS cor0
----
1898
1971
2774

query I rowsort
SELECT ALL 56 * col2 FROM tab0
----
1848
4592
56

query I rowsort
SELECT 90 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT ALL col1 - - ( col2 + - col0 ) FROM tab2 AS cor0
----
-24
51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9215
SELECT DISTINCT col2 * col1 - col0 * col1 DIV 17 AS col2 FROM tab1 AS cor0
----
1187
1400
533

skipif mysql # not compatible
query I rowsort label-9215
SELECT DISTINCT col2 * col1 - col0 * col1 / 17 AS col2 FROM tab1 AS cor0
----
1187
1400
533

query I rowsort
SELECT ALL + - cor0.col2 * + col2 - col1 AS col0 FROM tab2 AS cor0
----
-1461
-735
-760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + - col1 col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - ( col2 * col2 ) + ( + col2 + col2 ) AS col2 FROM tab1
----
-2808
-3135
-9024

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * + 11 + - 70 col1 FROM tab0 AS cor0
----
-1016
-1071
-1137

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9220
SELECT DISTINCT - + cor0.col1 * + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-9220
SELECT DISTINCT - + cor0.col1 * + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9221
SELECT col1 * - 87 + col1 + + cor0.col2 / CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9221
SELECT col1 * - 87 + col1 + + cor0.col2 / CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 4 + + col0 FROM tab2 AS cor0
----
11
82
83

query I rowsort
SELECT - col2 - + tab1.col0 AS col1 FROM tab1
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9224
SELECT ALL + ( - col0 ) DIV col1 col1 FROM tab2 AS cor0
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9224
SELECT ALL + ( - col0 ) / col1 col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT DISTINCT cor0.col1 * + col1 + + cor0.col2 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT ALL - ( col0 ) + cor0.col2 * - col0 FROM tab1 cor0
----
-165
-3712
-7760

query I rowsort
SELECT ALL 29 * col1 + + col0 * - cor0.col2 FROM tab2 AS cor0
----
-2509
-317
710

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 + col1 col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-9229
SELECT DISTINCT col0 DIV - 8 FROM tab0
----
-11
-3
-4

skipif mysql # not compatible
query I rowsort label-9229
SELECT DISTINCT col0 / - 8 FROM tab0
----
-11
-3
-4

query I rowsort
SELECT - col2 * col1 + tab2.col1 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) + 62 * ( - col1 ) FROM tab0 cor0
----
-5246
-5551
-5917

query I rowsort
SELECT + col0 - col0 * 72 AS col2 FROM tab1 cor0
----
-213
-4544
-5680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9233
SELECT ALL - - col1 DIV cor0.col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9233
SELECT ALL - - col1 / cor0.col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9234
SELECT ALL - CAST( - col0 + + col2 AS SIGNED ) FROM tab2
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-9234
SELECT ALL - CAST ( - col0 + + col2 AS INTEGER ) FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL - ( cor0.col1 ) + 22 AS col2 FROM tab2 AS cor0
----
-37
-9
5

query I rowsort
SELECT + col0 * + cor0.col2 + 60 * 2 AS col0 FROM tab1 AS cor0
----
282
3768
7800

query I rowsort
SELECT col1 * col0 + col2 AS col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT + 12 * col0 * - col1 FROM tab1 cor0
----
-12480
-7680
-936

query I rowsort
SELECT ALL + 25 - col0 AS col1 FROM tab0
----
-10
-64
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9240
SELECT col2 DIV col2 + + tab0.col1 + + 9 FROM tab0
----
101
107
96

skipif mysql # not compatible
query I rowsort label-9240
SELECT col2 / col2 + + tab0.col1 + + 9 FROM tab0
----
101
107
96

query I rowsort
SELECT DISTINCT 3 * - col2 FROM tab1
----
-162
-171
-288

query I rowsort
SELECT ALL col1 + - col2 - tab0.col1 AS col1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT - 45 + col0 FROM tab0 cor0
----
-10
-21
44

query I rowsort
SELECT DISTINCT + col0 - cor0.col1 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT + 26 * col0 FROM tab1 AS cor0
----
1664
2080
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col1 * - col1 + + col0 + col1 col1 FROM tab0 AS cor0
----
7506
8461
9541

query I rowsort
SELECT ALL col0 * + col0 + - 47 AS col1 FROM tab1 cor0
----
-38
4049
6353

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9248
SELECT - col0 * col0 + CAST( NULL AS DECIMAL ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9248
SELECT - col0 * col0 + CAST ( NULL AS REAL ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 59 * col0 + col2 + + col2 FROM tab1
----
285
3890
4912

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * col2 + col0 * - cor0.col1 * + col2 col1 FROM tab0 AS cor0
----
-3360
-656820
-67320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 56 col1 FROM tab1
----
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-9252
SELECT DISTINCT col1 DIV + tab2.col0 AS col1 FROM tab2
----
0
4

skipif mysql # not compatible
query I rowsort label-9252
SELECT DISTINCT col1 / + tab2.col0 AS col1 FROM tab2
----
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col1 * col1 col0 FROM tab1
----
164
249
679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9254
SELECT DISTINCT - CAST( col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-9254
SELECT DISTINCT - CAST ( col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL ( - col2 ) * - col2 + + col1 AS col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT - 17 AS col2 FROM tab0 AS cor0
----
-17
-17
-17

query I rowsort
SELECT + 11 + + col1 FROM tab2 AS cor0
----
28
42
70

query I rowsort
SELECT ALL 96 * col2 FROM tab2 AS cor0
----
2496
2592
3648

query I rowsort
SELECT ALL + cor0.col1 + ( col2 ) FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9260
SELECT + - col2 DIV + col0 AS col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9260
SELECT + - col2 / + col0 AS col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT + ( col0 ) + - ( 53 ) FROM tab0 AS cor0
----
-18
-29
36

query I rowsort
SELECT DISTINCT + + 0 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL col2 + cor0.col1 * + ( - col1 ) AS col0 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT + 42 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT + col1 * col0 - 38 * col1 AS col1 FROM tab0 AS cor0
----
-1204
-291
4641

query I rowsort
SELECT ALL - - col2 * col2 + + cor0.col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT - cor0.col1 * col1 + - 68 AS col0 FROM tab1 AS cor0
----
-168
-237
-744

query I rowsort
SELECT DISTINCT col2 * ( + ( - col1 ) ) + - 81 AS col0 FROM tab1 AS cor0
----
-1329
-1485
-651

query I rowsort
SELECT DISTINCT - - cor0.col2 + 29 AS col0 FROM tab2 AS cor0
----
55
56
67

query I rowsort
SELECT DISTINCT + col0 * 12 + col1 - col0 FROM tab2 AS cor0
----
108
886
917

onlyif mysql # use DIV operator for integer division
query I rowsort label-9271
SELECT + cor0.col2 + - ( - ( + col0 ) ) DIV + 4 col0 FROM tab1 AS cor0
----
116
54
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9271
SELECT + cor0.col2 + - ( - ( + col0 ) ) / + 4 col0 FROM tab1 AS cor0
----
116
54
73

query I rowsort
SELECT DISTINCT + cor0.col1 + - col1 * ( col2 ) + - col0 FROM tab1 AS cor0
----
-1315
-1381
-624

onlyif mysql # use DIV operator for integer division
query I rowsort label-9273
SELECT DISTINCT col1 DIV ( col1 * + col0 ) FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9273
SELECT DISTINCT col1 / ( col1 * + col0 ) FROM tab1 AS cor0
----
0

query I rowsort
SELECT - col1 * 17 AS col1 FROM tab2 AS cor0
----
-1003
-289
-527

query I rowsort
SELECT ALL - + col0 * 79 FROM tab1 AS cor0
----
-237
-5056
-6320

query I rowsort
SELECT - col2 + - 49 * col0 FROM tab2 AS cor0
----
-370
-3848
-3909

query I rowsort
SELECT col1 + 22 * 79 AS col2 FROM tab1 AS cor0
----
1748
1751
1764

onlyif mysql # use DIV operator for integer division
query I rowsort label-9278
SELECT DISTINCT - - col0 DIV + col2 + - cor0.col1 FROM tab1 AS cor0
----
-13
-26
-9

skipif mysql # not compatible
query I rowsort label-9278
SELECT DISTINCT - - col0 / + col2 + - cor0.col1 FROM tab1 AS cor0
----
-13
-26
-9

query I rowsort
SELECT ALL - - cor0.col2 - + col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col0 * 23 + - ( + col2 ) * 52 FROM tab2 AS cor0
----
-1243
-159
442

query I rowsort
SELECT ALL cor0.col1 + col1 * + col2 AS col0 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT col1 + ( 77 ) FROM tab2 AS cor0
----
108
136
94

query I rowsort
SELECT DISTINCT + + col2 + 50 * - 61 FROM tab1 AS cor0
----
-2954
-2993
-2996

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9284
SELECT - CAST( NULL AS SIGNED ) * - col1 + 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-9284
SELECT - CAST ( NULL AS INTEGER ) * - col1 + col0 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 29 * 59 + col0 col2 FROM tab0 AS cor0
----
-1622
-1676
-1687

query I rowsort
SELECT + + 94 * col0 + - col1 AS col1 FROM tab0 AS cor0
----
2170
3193
8275

query I rowsort
SELECT col0 * - cor0.col0 + col0 AS col1 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT + - 9 FROM tab1 AS cor0
----
-9
-9
-9

query I rowsort
SELECT - + ( - col1 ) + - col2 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - col2 + + ( - tab0.col1 ) AS col1 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT ( + 42 ) + - cor0.col0 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 53c7ce3548fb455aed9d1753fd2ef743

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9292
SELECT tab1.col1 + - CAST( NULL AS SIGNED ) * 80 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9292
SELECT tab1.col1 + - CAST ( NULL AS INTEGER ) * 80 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + 63 FROM tab0 AS cor0
----
-26
28
39

query I rowsort
SELECT + ( - 57 ) * col0 + - col0 AS col2 FROM tab1 cor0
----
-174
-3712
-4640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + cor0.col1 + col2 col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL - col1 * - col2 + + 34 AS col0 FROM tab1 AS cor0
----
1282
1438
604

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 44 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

onlyif mysql # use DIV operator for integer division
query I rowsort label-9298
SELECT ALL col1 + col2 DIV - 73 FROM tab1 AS cor0
----
10
12
26

skipif mysql # not compatible
query I rowsort label-9298
SELECT ALL col1 + col2 / - 73 FROM tab1 AS cor0
----
10
12
26

query IIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 WHERE NOT NULL >= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9300
SELECT DISTINCT + cor0.col2 + - cor0.col1 DIV col2 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-9300
SELECT DISTINCT + cor0.col2 + - cor0.col1 / col2 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - + 50 + col2 FROM tab0 cor0
----
-17
-49
32

query I rowsort
SELECT col2 * + cor0.col2 + col0 * + ( cor0.col0 ) FROM tab2 AS cor0
----
6760
7685
778

query I rowsort
SELECT + + 94 FROM tab1 cor0
----
94
94
94

query I rowsort
SELECT DISTINCT - col1 + cor0.col2 * col2 AS col2 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT 11 AS col0 FROM tab0 AS cor0
----
11
11
11

query I rowsort
SELECT ALL + cor0.col1 * col1 + col2 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT + 64 * - col1 FROM tab2 AS cor0
----
-1088
-1984
-3776

query I rowsort
SELECT ALL - + 40 + col2 * 27 FROM tab1 AS cor0
----
1418
1499
2552

query I rowsort
SELECT DISTINCT - cor0.col1 + - col1 FROM tab0 cor0
----
-172
-182
-194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9310
SELECT ALL - CAST( ( - col1 ) AS SIGNED ) + - col2 * 4 AS col1 FROM tab0
----
-237
-46
93

skipif mysql # not compatible
query I rowsort label-9310
SELECT ALL - CAST ( ( - col1 ) AS INTEGER ) + - col2 * 4 AS col1 FROM tab0
----
-237
-46
93

query I rowsort
SELECT ALL 87 * cor0.col1 - col1 FROM tab2 cor0
----
1462
2666
5074

query I rowsort
SELECT ALL col2 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - ( + cor0.col1 ) FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT col0 * col1 * col2 - col2 * - ( col1 ) FROM tab1 AS cor0
----
101088
37050
5616

query I rowsort
SELECT DISTINCT + 86 * col1 - col1 FROM tab2 AS cor0
----
1445
2635
5015

query I rowsort
SELECT DISTINCT + col2 * tab2.col2 * 60 + tab2.col0 * col0 AS col0 FROM tab2
----
43789
46644
92881

onlyif mysql # use DIV operator for integer division
query I rowsort label-9317
SELECT + col1 DIV - cor0.col0 - - ( + col0 * - col0 ) FROM tab2 AS cor0
----
-53
-6084
-6241

skipif mysql # not compatible
query I rowsort label-9317
SELECT + col1 / - cor0.col0 - - ( + col0 * - col0 ) FROM tab2 AS cor0
----
-53
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-9318
SELECT DISTINCT ( col1 ) * col1 + + ( - 23 ) DIV - col2 FROM tab0
----
7396
8281
9432

skipif mysql # not compatible
query I rowsort label-9318
SELECT DISTINCT ( col1 ) * col1 + + ( - 23 ) / - col2 FROM tab0
----
7396
8281
9432

query I rowsort
SELECT 86 * col1 * col1 + ( - col1 ) FROM tab1
----
14521
58110
8590

query I rowsort
SELECT DISTINCT 70 * + 37 + col2 FROM tab2
----
2616
2617
2628

query I rowsort
SELECT ALL - col1 + - col1 + + col0 * 91 * - 64 FROM tab0 cor0
----
-139948
-204034
-518518

onlyif mysql # use DIV operator for integer division
query I rowsort label-9322
SELECT + - col1 DIV - col2 + col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-9322
SELECT + - col1 / - col2 + col0 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9323
SELECT ALL CAST( NULL AS SIGNED ) + - ( + col1 ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9323
SELECT ALL CAST ( NULL AS INTEGER ) + - ( + col1 ) AS col1 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9324
SELECT CAST( ( col2 ) AS SIGNED ) + col0 AS col2 FROM tab2
----
104
117
34

skipif mysql # not compatible
query I rowsort label-9324
SELECT CAST ( ( col2 ) AS INTEGER ) + col0 AS col2 FROM tab2
----
104
117
34

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab0 cor2
----
3645 values hashing to 2566f3fa788816c8bfc482e730aaed74

onlyif mysql # use DIV operator for integer division
query I rowsort label-9326
SELECT DISTINCT + - cor0.col2 + col2 DIV col1 + 23 * col0 FROM tab0 AS cor0
----
1965
519
804

skipif mysql # not compatible
query I rowsort label-9326
SELECT DISTINCT + - cor0.col2 + col2 / col1 + 23 * col0 FROM tab0 AS cor0
----
1965
519
804

query I rowsort
SELECT ALL 60 FROM tab1 cor0
----
60
60
60

query I rowsort
SELECT + - ( 60 ) - col2 * + col2 * col1 FROM tab0 cor0
----
-157
-611944
-93714

query I rowsort
SELECT DISTINCT 15 * col0 + col0 * - ( - cor0.col0 ) AS col0 FROM tab1 AS cor0
----
5056
54
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-9330
SELECT ( 24 ) + cor0.col2 - - cor0.col0 DIV - col1 AS col1 FROM tab0 AS cor0
----
106
25
57

skipif mysql # not compatible
query I rowsort label-9330
SELECT ( 24 ) + cor0.col2 - - cor0.col0 / - col1 AS col1 FROM tab0 AS cor0
----
106
25
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9331
SELECT DISTINCT 57 DIV col1 FROM tab1 AS cor0
----
2
4
5

skipif mysql # not compatible
query I rowsort label-9331
SELECT DISTINCT 57 / col1 FROM tab1 AS cor0
----
2
4
5

query I rowsort
SELECT ALL - 61 * - col1 + - col0 FROM tab2 AS cor0
----
1884
3521
958

query I rowsort
SELECT DISTINCT - col2 * - col2 + col0 AS col0 FROM tab0 cor0
----
1113
36
6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-9334
SELECT col0 DIV cor0.col1 AS col0 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-9334
SELECT col0 / cor0.col1 AS col0 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT - cor0.col2 + col2 * cor0.col0 AS col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL col0 + col2 * - ( - 49 + - col1 ) FROM tab1 AS cor0
----
3427
4053
6032

onlyif mysql # use DIV operator for integer division
query I rowsort label-9337
SELECT DISTINCT - - col0 + + col1 * + ( + col1 ) DIV + col1 AS col1 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-9337
SELECT DISTINCT - - col0 + + col1 * + ( + col1 ) / + col1 AS col1 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9338
SELECT + 98 DIV col1 FROM tab1 AS cor0
----
3
7
9

skipif mysql # not compatible
query I rowsort label-9338
SELECT + 98 / col1 FROM tab1 AS cor0
----
3
7
9

query I rowsort
SELECT - - col0 + - col0 * col1 + col0 AS col2 FROM tab0 AS cor0
----
-2016
-3325
-7921

query I rowsort
SELECT DISTINCT - col0 * + col1 * + col1 AS col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT + col1 * 13 FROM tab0 AS cor0
----
1118
1183
1261

query I rowsort
SELECT col0 + 36 AS col0 FROM tab0
----
125
60
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9343
SELECT DISTINCT + col0 + CAST( - 80 AS SIGNED ) + - col2 * col2 FROM tab1
----
-2993
-3265
-9216

skipif mysql # not compatible
query I rowsort label-9343
SELECT DISTINCT + col0 + CAST ( - 80 AS INTEGER ) + - col2 * col2 FROM tab1
----
-2993
-3265
-9216

query I rowsort
SELECT DISTINCT col2 * - ( 62 ) + + col1 AS col1 FROM tab2
----
-1553
-1643
-2339

query I rowsort
SELECT col2 * 38 AS col0 FROM tab2 AS cor0
----
1026
1444
988

query I rowsort
SELECT 85 AS col0 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to e4cf94cf0cc632acff30ad1dac617cb7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - 59 col0 FROM tab2 AS cor0
----
-21
-32
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * ( cor0.col2 ) * cor0.col1 col0 FROM tab0 AS cor0
----
611884
93654
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + col1 * + col0 col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL 99 + + col2 AS col1 FROM tab0 AS cor0
----
100
132
181

query I rowsort
SELECT - ( + col2 ) + + col1 + + cor0.col0 FROM tab2 AS cor0
----
11
111
58

query I rowsort
SELECT ALL col0 - ( col0 ) * - col1 AS col2 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT - - cor0.col0 * ( cor0.col2 ) + - ( - cor0.col2 ) FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT - ( col0 ) + col2 + - ( + col0 ) FROM tab0 AS cor0
----
-15
-69
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9355
SELECT DISTINCT + CAST( - col0 AS SIGNED ) + col1 * 60 * cor0.col0 FROM tab1 AS cor0
----
38336
4677
62320

skipif mysql # not compatible
query I rowsort label-9355
SELECT DISTINCT + CAST ( - col0 AS INTEGER ) + col1 * 60 * cor0.col0 FROM tab1 AS cor0
----
38336
4677
62320

query I rowsort
SELECT - - col2 + 41 + + col0 FROM tab2 AS cor0
----
145
158
75

query I rowsort
SELECT + ( ( col0 - - ( - col1 ) - - cor0.col0 ) ) + col1 * - 79 - col2 FROM tab1 AS cor0
----
-2128
-729
-976

query I rowsort
SELECT DISTINCT 38 * col2 FROM tab0 cor0
----
1254
3116
38

query I rowsort
SELECT DISTINCT col2 * ( col0 ) + + col1 AS col1 FROM tab0 AS cor0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-9360
SELECT ALL + col2 - - col0 DIV col1 col0 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9360
SELECT ALL + col2 - - col0 / col1 col0 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL - col2 + + 4 FROM tab0
----
-29
-78
3

query I rowsort
SELECT - col2 + col1 + 12 AS col1 FROM tab0
----
108
21
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9363
SELECT col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9363
SELECT col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * ( + col1 ) AS col0 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - col2 * - CAST ( 66 AS REAL ) col0 FROM tab0
----
2178
5412
66

query I rowsort
SELECT ALL + tab0.col1 + - ( - cor0.col2 ) AS col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 193f02533a54aa725386e300dcc85182

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * 35 col2 FROM tab2 AS cor0
----
-245
-2730
-2765

onlyif mysql # use DIV operator for integer division
query I rowsort label-9368
SELECT + cor0.col0 + col1 DIV - col1 + col2 AS col2 FROM tab1 AS cor0
----
120
175
56

skipif mysql # not compatible
query I rowsort label-9368
SELECT + cor0.col0 + col1 / - col1 + col2 AS col2 FROM tab1 AS cor0
----
120
175
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-9369
SELECT - - col2 DIV + col1 + - col2 * col2 AS col0 FROM tab1 AS cor0
----
-2914
-3244
-9209

skipif mysql # not compatible
query I rowsort label-9369
SELECT - - col2 / + col1 + - col2 * col2 AS col0 FROM tab1 AS cor0
----
-2914
-3244
-9209

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col0 * + col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT ALL + col2 * 67 AS col2 FROM tab1
----
3618
3819
6432

query I rowsort
SELECT ALL + ( 89 ) * + col2 FROM tab2
----
2314
2403
3382

onlyif mysql # use DIV operator for integer division
query I rowsort label-9373
SELECT ALL - cor0.col2 DIV col0 + - col2 AS col0 FROM tab1 cor0
----
-57
-72
-97

skipif mysql # not compatible
query I rowsort label-9373
SELECT ALL - cor0.col2 / col0 + - col2 AS col0 FROM tab1 cor0
----
-57
-72
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9374
SELECT 14 DIV col0 + col2 * - ( ( + col0 ) ) * tab1.col0 col2 FROM tab1
----
-233472
-482
-614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9374
SELECT 14 / col0 + col2 * - ( ( + col0 ) ) * tab1.col0 col2 FROM tab1
----
-233472
-482
-614400

query I rowsort
SELECT ALL + col1 * 48 AS col2 FROM tab2
----
1488
2832
816

query I rowsort
SELECT ALL + 29 AS col1 FROM tab2
----
29
29
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-9377
SELECT DISTINCT - CAST( + col0 AS SIGNED ) DIV - col0 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-9377
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) / - col0 FROM tab1
----
1

query I rowsort
SELECT - - cor0.col2 * + col1 - - col0 AS col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) AS col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - 29 + + col1 AS col0 FROM tab1 AS cor0
----
-16
-19
-3

query I rowsort
SELECT - cor0.col0 * + col2 + 86 * col0 * + col0 FROM tab0 AS cor0
----
105315
48744
673908

query I rowsort
SELECT - col1 * - cor0.col2 - - 24 * col0 FROM tab0 AS cor0
----
3414
937
9598

query I rowsort
SELECT 54 + col0 FROM tab1 AS cor0
----
118
134
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9384
SELECT - col2 * - col0 - - CAST( NULL AS SIGNED ) * col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9384
SELECT - col2 * - col0 - - CAST ( NULL AS INTEGER ) * col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9385
SELECT - col1 * col2 / col2 + - col2 * - col2 * CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9385
SELECT - col1 * col2 / col2 + - col2 * - col2 * CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 58 * col0 + - col2 * - col1 FROM tab1
----
1578
4282
5888

onlyif mysql # use DIV operator for integer division
query I rowsort label-9387
SELECT ALL col0 DIV - col2 col1 FROM tab0
----
-1
-35
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9387
SELECT ALL col0 / - col2 col1 FROM tab0
----
-1
-35
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - 46 ) col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
-46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9389
SELECT + col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9389
SELECT + col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor0.col2 + - 44 * + 20 AS col1 FROM tab1 AS cor0
----
-784
-823
-826

query I rowsort
SELECT + col1 + - col1 + - ( col2 ) * col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-9392
SELECT + + col0 DIV + ( + col2 ) + - col2 + - col2 FROM tab1 cor0
----
-108
-113
-192

skipif mysql # not compatible
query I rowsort label-9392
SELECT + + col0 / + ( + col2 ) + - col2 + - col2 FROM tab1 cor0
----
-108
-113
-192

query I rowsort
SELECT + + col1 + + col0 + - col2 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT + 53 * - col2 AS col0 FROM tab2
----
-1378
-1431
-2014

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col0 ) col1 FROM tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 * + col2 col2 FROM tab0
----
611884
93654
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * col0 - cor0.col0 col2 FROM tab0 AS cor0
----
2040
3360
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9398
SELECT col2 * - CAST( + col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-9398
SELECT col2 * - CAST ( + col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9399
SELECT DISTINCT - col1 * + CAST( col1 AS SIGNED ) + + col1 FROM tab2 AS cor0
----
-272
-3422
-930

skipif mysql # not compatible
query I rowsort label-9399
SELECT DISTINCT - col1 * + CAST ( col1 AS INTEGER ) + + col1 FROM tab2 AS cor0
----
-272
-3422
-930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + - col2 * cor0.col0 col0 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-9401
SELECT ALL + col1 DIV - CAST( + col0 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-9401
SELECT ALL + col1 / - CAST ( + col0 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-8
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9402
SELECT + 71 DIV col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-9402
SELECT + 71 / col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT + - 91 FROM tab0 cor0
----
-91
-91
-91

query I rowsort
SELECT - ( col2 ) * - cor0.col0 + - col2 * - col0 AS col2 FROM tab2 AS cor0
----
378
4056
6004

query I rowsort
SELECT - col0 + 52 AS col1 FROM tab0 cor0
----
-37
17
28

query I rowsort
SELECT ALL + - 93 FROM tab0, tab0 AS cor0, tab2, tab1 AS cor1
----
81 values hashing to 373608b5054d92c1128be0c71db4d4ed

query I rowsort
SELECT col0 * cor0.col0 + - 65 FROM tab2 AS cor0
----
-16
6019
6176

onlyif mysql # use DIV operator for integer division
query I rowsort label-9408
SELECT + cor0.col0 * 87 + 45 DIV col1 FROM tab0 AS cor0
----
2088
3045
7743

skipif mysql # not compatible
query I rowsort label-9408
SELECT + cor0.col0 * 87 + 45 / col1 FROM tab0 AS cor0
----
2088
3045
7743

query I rowsort
SELECT ALL - - col0 * + ( cor0.col0 ) FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT + - col1 + - col0 * + col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT ALL - - col0 * col2 AS col0 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-9412
SELECT ALL + col2 DIV + cor0.col1 - + 81 FROM tab2 AS cor0
----
-79
-81
-81

skipif mysql # not compatible
query I rowsort label-9412
SELECT ALL + col2 / + cor0.col1 - + 81 FROM tab2 AS cor0
----
-79
-81
-81

query I rowsort
SELECT - - col2 * ( + col1 ) FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9414
SELECT + + col1 * + col0 + ( + col2 ) DIV - col0 AS col1 FROM tab0 AS cor0
----
2063
3395
8099

skipif mysql # not compatible
query I rowsort label-9414
SELECT + + col1 * + col0 + ( + col2 ) / - col0 AS col1 FROM tab0 AS cor0
----
2063
3395
8099

query I rowsort
SELECT DISTINCT - col1 + - 59 FROM tab2 AS cor0
----
-118
-76
-90

query I rowsort
SELECT DISTINCT col0 * - col2 - + col2 FROM tab2 AS cor0
----
-2054
-216
-3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 * cor0.col2 col2 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT cor0.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-9419
SELECT DISTINCT + col0 + - CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
-24
19
62

skipif mysql # not compatible
query I rowsort label-9419
SELECT DISTINCT + col0 + - CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + + col2 + - 8 FROM tab2 AS cor0
----
18
19
30

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT + + 60 * + col0 AS col1 FROM tab1 AS cor0
----
180
3840
4800

onlyif mysql # use DIV operator for integer division
query I rowsort label-9423
SELECT - col0 DIV - 56 + + col2 * col1 AS col0 FROM tab2
----
1535
647
837

skipif mysql # not compatible
query I rowsort label-9423
SELECT - col0 / - 56 + + col2 * col1 AS col0 FROM tab2
----
1535
647
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-9424
SELECT ALL cor0.col2 - - col0 DIV col0 AS col1 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-9424
SELECT ALL cor0.col2 - - col0 / col0 AS col1 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT col1 * + col1 - + col2 * - 38 * - col2 FROM tab1 cor0
----
-110132
-123362
-350039

query I rowsort
SELECT ALL - col1 * col0 + - 21 AS col1 FROM tab2 AS cor0
----
-1364
-238
-4623

query I rowsort
SELECT - col0 + + col0 * + ( - 79 ) FROM tab2 AS cor0
----
-560
-6240
-6320

query I rowsort
SELECT 99 + col2 AS col0 FROM tab1 AS cor0
----
153
156
195

query I rowsort
SELECT ALL - 78 AS col0 FROM tab0
----
-78
-78
-78

query I rowsort
SELECT ALL - 65 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9431
SELECT + col2 + col0 - - CAST( col0 AS SIGNED ) AS col1 FROM tab0
----
260
71
81

skipif mysql # not compatible
query I rowsort label-9431
SELECT + col2 + col0 - - CAST ( col0 AS INTEGER ) AS col1 FROM tab0
----
260
71
81

query I rowsort
SELECT ALL col1 * - col1 - col1 AS col0 FROM tab2
----
-306
-3540
-992

query I rowsort
SELECT ( + col0 ) * + cor0.col2 * - col1 AS col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT + col1 * - col1 * col2 - col0 * + tab2.col0 FROM tab2
----
-17223
-25996
-96590

query I rowsort
SELECT ALL - tab0.col2 AS col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + cor0.col0 * col0 col2 FROM tab1 cor0
----
4153
63
6496

onlyif mysql # use DIV operator for integer division
query I rowsort label-9437
SELECT DISTINCT tab1.col0 * col0 * - col2 + col2 DIV tab1.col0 FROM tab1
----
-233472
-468
-614399

skipif mysql # not compatible
query I rowsort label-9437
SELECT DISTINCT tab1.col0 * col0 * - col2 + col2 / tab1.col0 FROM tab1
----
-233472
-468
-614399

query I rowsort
SELECT col0 * tab1.col0 + col1 AS col2 FROM tab1
----
35
4106
6413

query I rowsort
SELECT DISTINCT - 38 AS col0 FROM tab0
----
-38

query I rowsort
SELECT + tab1.col2 + col1 + col1 AS col2 FROM tab1
----
106
122
77

query I rowsort
SELECT - col2 * col0 + + col1 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT col2 + - tab0.col0 * col2 * col0 FROM tab0
----
-1224
-18975
-649440

onlyif mysql # use DIV operator for integer division
query I rowsort label-9443
SELECT DISTINCT + + col2 DIV + cor0.col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-9443
SELECT DISTINCT + + col2 / + cor0.col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT ALL - col1 + col0 + col1 * col0 AS col0 FROM tab1 AS cor0
----
1107
55
694

query I rowsort
SELECT DISTINCT - - cor0.col0 * - col2 + col2 AS col2 FROM tab1 cor0
----
-108
-3591
-7584

query I rowsort
SELECT - col0 * + col2 + - cor0.col2 * + col1 * - col1 AS col0 FROM tab0 cor0
----
243276
671744
9374

query I rowsort
SELECT DISTINCT - col0 - col1 * + col2 AS col2 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT - col0 * + col2 - - col0 AS col1 FROM tab1 cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT col2 * col1 * + cor0.col2 + + col1 FROM tab2 AS cor0
----
22630
24565
39943

query I rowsort
SELECT ALL col1 * - col2 * + col0 AS col1 FROM tab2 cor0
----
-119652
-51034
-5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab0, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT col0 + + col2 + col2 * - cor0.col0 * col2 AS col2 FROM tab0 AS cor0
----
-26079
-598265
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9453
SELECT DISTINCT ( ( col0 ) ) DIV - col0 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-9453
SELECT DISTINCT ( ( col0 ) ) / - col0 FROM tab1
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9454
SELECT CAST( + col0 AS SIGNED ) + col2 col1 FROM tab1
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9454
SELECT CAST ( + col0 AS INTEGER ) + col2 col1 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL - - col1 + col1 * - col0 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + 96 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query I rowsort
SELECT cor0.col0 * 64 AS col1 FROM tab2 AS cor0
----
448
4992
5056

query I rowsort
SELECT ALL 25 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9459
SELECT ALL - CAST( NULL AS DECIMAL ) + 88 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9459
SELECT ALL - CAST ( NULL AS REAL ) + 88 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 * + 16 AS col1 FROM tab0 cor0
----
-1376
-1456
-1552

query I rowsort
SELECT 46 * col2 FROM tab1 AS cor0
----
2484
2622
4416

query I rowsort
SELECT DISTINCT + + col2 * + col0 + - col2 AS col0 FROM tab0 cor0
----
34
7216
759

query I rowsort
SELECT - + 84 * + col2 AS col1 FROM tab0 AS cor0
----
-2772
-6888
-84

query I rowsort
SELECT ALL col2 + col0 * col2 * col0 FROM tab1 AS cor0
----
233529
540
614496

onlyif mysql # use DIV operator for integer division
query I rowsort label-9465
SELECT ALL + col2 DIV cor0.col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9465
SELECT ALL + col2 / cor0.col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col1 * - col1 - col1 FROM tab2
----
-306
-3540
-992

query I rowsort
SELECT + ( col2 + - col0 ) FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT 51 * + cor0.col0 AS col0 FROM tab2 AS cor0
----
357
3978
4029

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * col1 + col1 col2 FROM tab0 AS cor0
----
2150
3492
8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 47 * col1 col0 FROM tab0 AS cor0
----
-4042
-4277
-4559

query I rowsort
SELECT - - ( col2 ) + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - - 18 AS col0 FROM tab0 AS cor0
----
18
18
18

query I rowsort
SELECT ALL + cor0.col1 + + col2 * - col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT - 77 AS col0 FROM tab2 AS cor0
----
-77
-77
-77

query I rowsort
SELECT ALL 9 + - 52 AS col0 FROM tab0
----
-43
-43
-43

query I rowsort
SELECT + - 93 + 75 AS col1 FROM tab0, tab1, tab2 cor0
----
27 values hashing to 2dbe09d9295cfd52d854fefabf2cec4e

query I rowsort
SELECT DISTINCT ( col1 ) * col2 + 88 * - col0 AS col2 FROM tab1
----
-5062
-5792
1140

query I rowsort
SELECT ( + col0 ) + col2 FROM tab2
----
104
117
34

query I rowsort
SELECT - col2 * col2 + col2 * - col0 - col2 AS col2 FROM tab0 AS cor0
----
-14104
-1914
-37

query I rowsort
SELECT DISTINCT - col2 + 97 FROM tab0
----
15
64
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 52 + + col1 col1 FROM tab0
----
138
143
149

query I rowsort
SELECT ALL 6 + col1 AS col2 FROM tab2
----
23
37
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-9483
SELECT + col1 * - col0 DIV + col0 col0 FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9483
SELECT + col1 * - col0 / + col0 col0 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT + 73 * col1 FROM tab2
----
1241
2263
4307

onlyif mysql # use DIV operator for integer division
query I rowsort label-9485
SELECT + col0 + col2 DIV + tab1.col1 AS col2 FROM tab1
----
5
69
87

skipif mysql # not compatible
query I rowsort label-9485
SELECT + col0 + col2 / + tab1.col1 AS col2 FROM tab1
----
5
69
87

query I rowsort
SELECT ALL - cor0.col1 FROM tab1, tab2 cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT cor0.col2 * + cor0.col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - - col1 + - 79 * col0 FROM tab2 AS cor0
----
-522
-6103
-6224

query I rowsort
SELECT col2 + col0 * - 7 FROM tab2
----
-22
-515
-520

query I rowsort
SELECT 49 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT ALL - cor0.col2 + 98 FROM tab0 AS cor0
----
16
65
97

query I rowsort
SELECT ALL + col0 * cor0.col2 + col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT 15 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

query I rowsort
SELECT ALL 45 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT DISTINCT - tab0.col0 + - 80 + col0 AS col2 FROM tab0
----
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9496
SELECT - CAST( 95 AS SIGNED ) * col1 FROM tab1 cor0
----
-1235
-2470
-950

skipif mysql # not compatible
query I rowsort label-9496
SELECT - CAST ( 95 AS INTEGER ) * col1 FROM tab1 cor0
----
-1235
-2470
-950

query I rowsort
SELECT col0 * + col2 * col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT + + col2 * - 84 FROM tab1 AS cor0
----
-4536
-4788
-8064

query I rowsort
SELECT ALL ( col1 * + col2 ) AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ( 91 ) * col1 FROM tab0 AS cor0
----
7826
8281
8827

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9501
SELECT - - CAST( NULL AS SIGNED ) / cor0.col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9501
SELECT - - CAST ( NULL AS INTEGER ) / cor0.col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col0 + + cor0.col2 + col1 AS col2 FROM tab2 AS cor0
----
-24
51
7

query I rowsort
SELECT ALL - 67 AS col2 FROM tab0 cor0
----
-67
-67
-67

query I rowsort
SELECT DISTINCT tab2.col1 * + col1 FROM tab2
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9505
SELECT + 66 * + col1 * CAST( 9 AS SIGNED ) + + col2 * 87 col0 FROM tab0 AS cor0
----
53955
57705
61188

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9505
SELECT + 66 * + col1 * CAST ( 9 AS INTEGER ) + + col2 * 87 col0 FROM tab0 AS cor0
----
53955
57705
61188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( + 66 ) col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to a408108d423d7784b7d610cb779e515a

query I rowsort
SELECT cor0.col2 * cor0.col1 - - 44 FROM tab0 AS cor0
----
141
2882
7506

query I rowsort
SELECT + + 77 + col0 * cor0.col0 AS col1 FROM tab2 AS cor0
----
126
6161
6318

query I rowsort
SELECT - + cor0.col2 + col2 * ( + col1 ) AS col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT - 33 AS col2 FROM tab1, tab2 cor0
----
-33

query I rowsort
SELECT col1 * 32 + ( + col0 * - 38 ) FROM tab0 AS cor0
----
-470
1774
1840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * ( - col2 ) col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - cor0.col0 FROM tab2, tab0 cor0, tab1, tab2 AS cor1
----
81 values hashing to 26e45cd9fe71a2b90a8bdef20c88e70d

query I rowsort
SELECT ALL - 35 * + col2 - + 90 AS col2 FROM tab1
----
-1980
-2085
-3450

query I rowsort
SELECT 97 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 60 col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

query I rowsort
SELECT ALL 51 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

query I rowsort
SELECT ALL + 81 * tab2.col0 * col1 - + col1 AS col2 FROM tab2
----
108766
17546
372703

query I rowsort
SELECT ALL tab1.col2 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + + col1 + col1 + + col2 AS col2 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 * col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL 73 + tab2.col0 + ( - tab2.col0 ) * col1 * - ( + ( tab2.col2 ) ) FROM tab2
----
119803
51186
5939

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0, tab1 cor0, tab2 AS cor1
----
-3
-64
-80

query I rowsort
SELECT 55 * + col2 + 49 * col0 FROM tab0
----
1770
2991
8871

query I rowsort
SELECT ALL + col1 + 19 * col1 - - col0 FROM tab1 AS cor0
----
264
340
523

query I rowsort
SELECT + col2 * + 84 + - col0 FROM tab1 AS cor0
----
4533
4724
7984

query I rowsort
SELECT ALL - + cor0.col1 + 88 AS col1 FROM tab2 AS cor0
----
29
57
71

query I rowsort
SELECT DISTINCT col1 * + 34 AS col0 FROM tab0 AS cor0
----
2924
3094
3298

query I rowsort
SELECT + col2 + cor0.col2 * - col1 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL - col0 * + 74 FROM tab1 AS cor0
----
-222
-4736
-5920

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab1, tab0 cor2
----
3645 values hashing to 825c5bff5308aeedb3a0a28713da0683

query I rowsort
SELECT col2 + ( - 20 + - col2 ) FROM tab0 AS cor0
----
-20
-20
-20

query I rowsort
SELECT - + col1 - ( 73 * col2 + + col2 ) FROM tab1 AS cor0
----
-4022
-4228
-7117

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9534
SELECT DISTINCT col1 * CAST( 13 AS SIGNED ) FROM tab2 AS cor0
----
221
403
767

skipif mysql # not compatible
query I rowsort label-9534
SELECT DISTINCT col1 * CAST ( 13 AS INTEGER ) FROM tab2 AS cor0
----
221
403
767

query I rowsort
SELECT + - cor0.col1 + + col2 + col2 * col1 AS col2 FROM tab2 AS cor0
----
1501
667
833

query I rowsort
SELECT DISTINCT col2 * col1 * col1 FROM tab1 cor0
----
16224
36504
5700

skipif mysql # not compatible
query I rowsort
SELECT - col0 * CAST ( + 48 AS REAL ) FROM tab0 AS cor0
----
-1152
-1680
-4272

query I rowsort
SELECT ALL - + col2 * ( - col0 + + col1 ) AS col1 FROM tab2 AS cor0
----
-648
2356
494

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9539
SELECT col2 * CAST( + col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-9539
SELECT col2 * CAST ( + col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-9540
SELECT DISTINCT - - col1 * 63 DIV col1 FROM tab2 AS cor0
----
63

skipif mysql # not compatible
query I rowsort label-9540
SELECT DISTINCT - - col1 * 63 / col1 FROM tab2 AS cor0
----
63

query I rowsort
SELECT ALL - + cor0.col2 + + col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9542
SELECT + col2 + cor0.col1 * col0 + col1 DIV - col1 AS col2 FROM tab0 AS cor0
----
2096
3395
8180

skipif mysql # not compatible
query I rowsort label-9542
SELECT + col2 + cor0.col1 * col0 + col1 / - col1 AS col2 FROM tab0 AS cor0
----
2096
3395
8180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9543
SELECT - + CAST( NULL AS SIGNED ) / col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9543
SELECT - + CAST ( NULL AS INTEGER ) / col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - 29 ) + col1 AS col0 FROM tab0 AS cor0
----
57
62
68

query I rowsort
SELECT ALL - 11 + + col1 AS col2 FROM tab0 AS cor0
----
75
80
86

query I rowsort
SELECT ALL 85 * - col1 + - col1 + - 29 FROM tab1 AS cor0
----
-1147
-2265
-889

query I rowsort
SELECT DISTINCT - 13 * col2 FROM tab1 cor0
----
-1248
-702
-741

query I rowsort
SELECT DISTINCT - col1 * col2 + - col1 AS col2 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL col2 * col2 + + col0 * 6 AS col1 FROM tab0 AS cor0
----
1233
211
7258

query I rowsort
SELECT + + col2 * + 14 FROM tab1 AS cor0
----
1344
756
798

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 79 col2 FROM tab0 AS cor0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT ( + 65 ) AS col1 FROM tab0 AS cor0
----
65

query I rowsort
SELECT DISTINCT - + ( col1 ) * - col0 + 91 + + ( + col0 ) FROM tab0 AS cor0
----
2179
3521
8279

query I rowsort
SELECT ALL - - col2 + + col0 * - cor0.col1 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-9555
SELECT - 95 DIV + col1 col0 FROM tab1 AS cor0
----
-3
-7
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9555
SELECT - 95 / + col1 col0 FROM tab1 AS cor0
----
-3
-7
-9

query I rowsort
SELECT ALL - 14 + col0 AS col2 FROM tab2 AS cor0
----
-7
64
65

query I rowsort
SELECT DISTINCT - - col0 * col0 AS col1 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - 10 * - ( + col2 ) FROM tab0
----
10
330
820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 53 + - col2 col0 FROM tab1 AS cor0
----
-1
-4
-43

query I rowsort
SELECT - - cor0.col1 * - col2 + col1 * 19 AS col1 FROM tab0 cor0
----
-1204
-5733
1746

query I rowsort
SELECT ALL - 35 * + col0 + 10 AS col0 FROM tab0 AS cor0
----
-1215
-3105
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-9562
SELECT DISTINCT - - ( col2 ) DIV + 14 AS col1 FROM tab0 AS cor0
----
0
2
5

skipif mysql # not compatible
query I rowsort label-9562
SELECT DISTINCT - - ( col2 ) / + 14 AS col1 FROM tab0 AS cor0
----
0
2
5

query I rowsort
SELECT DISTINCT - + col2 * col0 + + col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + 44 + + col2 * + col1 FROM tab1 AS cor0
----
1292
1448
614

query I rowsort
SELECT DISTINCT col1 * col2 + + ( - 13 ) * cor0.col1 AS col0 FROM tab1 AS cor0
----
1066
1079
440

query I rowsort
SELECT - - cor0.col0 * - col2 + col2 AS col0 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT - col0 * - col1 + + ( col2 ) AS col1 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT col2 * + cor0.col2 + - 43 * cor0.col0 + col2 FROM tab1 AS cor0
----
2841
554
5872

query I rowsort
SELECT DISTINCT - - 43 AS col0 FROM tab1, tab0 AS cor0
----
43

query I rowsort
SELECT - - col1 + + 63 - + col1 FROM tab0 AS cor0
----
63
63
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-9571
SELECT DISTINCT - - col1 + col1 DIV + col0 FROM tab1 AS cor0
----
10
13
34

skipif mysql # not compatible
query I rowsort label-9571
SELECT DISTINCT - - col1 + col1 / + col0 FROM tab1 AS cor0
----
10
13
34

query I rowsort
SELECT - 8 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-7
25
74

query I rowsort
SELECT ALL + - 94 FROM tab0 AS cor0
----
-94
-94
-94

query I rowsort
SELECT ( - col1 * col1 + + col1 ) FROM tab2
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT + cor0.col0 * 36 AS col2 FROM tab0 AS cor0
----
1260
3204
864

query I rowsort
SELECT DISTINCT + 76 - col0 AS col2 FROM tab1 cor0
----
-4
12
73

query I rowsort
SELECT ALL + + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT col2 * - col2 * col1 FROM tab1
----
-119808
-32490
-75816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col0 * 45 col2 FROM tab0 AS cor0
----
1104
1610
4094

query I rowsort
SELECT + col0 * - 21 FROM tab2 AS cor0
----
-147
-1638
-1659

query I rowsort
SELECT - 47 + col0 FROM tab2 AS cor0
----
-40
31
32

query I rowsort
SELECT + col0 * - col1 * col2 AS col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT + col1 * + 94 FROM tab1
----
1222
2444
940

query I rowsort
SELECT ALL - 84 * - 86 FROM tab1, tab1 cor0
----
9 values hashing to a03a2bb3ff6fb01d1592bd526235ffc9

query I rowsort
SELECT cor0.col2 * ( + col0 ) AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - col2 + 68 * col2 FROM tab0 AS cor0
----
2211
5494
67

query I rowsort
SELECT + 59 * + col2 FROM tab1 AS cor0
----
3186
3363
5664

query I rowsort
SELECT ALL 1 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 2a004dce2d308bae163576f54ee1a3fc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col2 * ( col2 ) col1 FROM tab1 AS cor0
----
-2862
-3192
-9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-9590
SELECT - + cor0.col1 DIV col1 + + 98 DIV - col0 AS col2 FROM tab0 AS cor0
----
-2
-3
-5

skipif mysql # not compatible
query I rowsort label-9590
SELECT - + cor0.col1 / col1 + + 98 / - col0 AS col2 FROM tab0 AS cor0
----
-2
-3
-5

query I rowsort
SELECT ALL + - 90 * ( cor0.col0 ) FROM tab2, tab2 cor0
----
9 values hashing to 0873da4bd41fd13f4335562b4f865b12

query I rowsort
SELECT col2 * + col0 + col2 * - col1 AS col2 FROM tab0
----
-164
-2046
-62

query I rowsort
SELECT col1 * ( cor0.col1 * + col2 ) FROM tab1 AS cor0
----
16224
36504
5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col1 * - 58 col2 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to e310d9bf55423b107976e1555fa05094

onlyif mysql # use DIV operator for integer division
query I rowsort label-9595
SELECT DISTINCT 91 DIV col2 AS col0 FROM tab0
----
1
2
91

skipif mysql # not compatible
query I rowsort label-9595
SELECT DISTINCT 91 / col2 AS col0 FROM tab0
----
1
2
91

query I rowsort
SELECT DISTINCT + col2 + ( + col1 ) AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - - col0 - - ( + col0 ) FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL + + cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT - + col0 + + col0 * 59 * col2 + - 10 FROM tab2 AS cor0
----
11134
119564
177029

onlyif mysql # use DIV operator for integer division
query I rowsort label-9600
SELECT ALL cor0.col0 DIV cor0.col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-9600
SELECT ALL cor0.col0 / cor0.col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL + - col1 * 39 AS col2 FROM tab2 AS cor0
----
-1209
-2301
-663

query I rowsort
SELECT DISTINCT - col1 * col1 - col2 AS col2 FROM tab0 AS cor0
----
-7429
-8363
-9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-9603
SELECT ALL + CAST( 61 AS SIGNED ) DIV cor0.col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9603
SELECT ALL + CAST ( 61 AS INTEGER ) / cor0.col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - 78 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

onlyif mysql # use DIV operator for integer division
query I rowsort label-9605
SELECT ALL - col2 DIV 24 + col0 AS col2 FROM tab1
----
1
62
76

skipif mysql # not compatible
query I rowsort label-9605
SELECT ALL - col2 / 24 + col0 AS col2 FROM tab1
----
1
62
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9606
SELECT DISTINCT - + CAST( NULL AS SIGNED ) FROM tab0, tab1, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9606
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) FROM tab0, tab1, tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9607
SELECT CAST( 89 AS SIGNED ) * + tab0.col0 AS col0 FROM tab0
----
2136
3115
7921

skipif mysql # not compatible
query I rowsort label-9607
SELECT CAST ( 89 AS INTEGER ) * + tab0.col0 AS col0 FROM tab0
----
2136
3115
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-9608
SELECT - 33 DIV - 35 col0 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9608
SELECT - 33 / - 35 col0 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * - 89 AS col1 FROM tab1
----
-267
-5696
-7120

query I rowsort
SELECT ALL - - col1 - - col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT + 58 + + col0 * + 69 AS col1 FROM tab2 AS cor0
----
541
5440
5509

query I rowsort
SELECT DISTINCT - - cor0.col2 * col2 + + 61 AS col1 FROM tab1 AS cor0
----
2977
3310
9277

query I rowsort
SELECT DISTINCT - - 3 FROM tab2 cor0
----
3

query I rowsort
SELECT + cor0.col1 - cor0.col2 * - col2 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT + 48 * ( col0 ) FROM tab2
----
336
3744
3792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9616
SELECT + 38 DIV tab2.col0 AS col2 FROM tab2
----
0
0
5

skipif mysql # not compatible
query I rowsort label-9616
SELECT + 38 / tab2.col0 AS col2 FROM tab2
----
0
0
5

query I rowsort
SELECT DISTINCT + col0 * tab1.col0 - - col0 * col2 * - col2 FROM tab1
----
-203840
-730880
-8739

query I rowsort
SELECT + 7 * + col2 AS col1 FROM tab0
----
231
574
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9619
SELECT + 97 DIV tab0.col0 FROM tab0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-9619
SELECT + 97 / tab0.col0 FROM tab0
----
1
2
4

query I rowsort
SELECT - col2 - col0 * - 11 AS col0 FROM tab0
----
231
384
897

query I rowsort
SELECT DISTINCT - tab1.col1 * - cor0.col0 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 9dd217b6385bf38f78d8b6e6b7864578

query I rowsort
SELECT + col1 + - col0 + - 50 FROM tab0 AS cor0
----
-48
12
12

query I rowsort
SELECT col0 * col1 * col2 AS col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT - 62 * col0 FROM tab0 AS cor0
----
-1488
-2170
-5518

onlyif mysql # use DIV operator for integer division
query I rowsort label-9625
SELECT - col1 * - col2 + - 53 DIV 25 FROM tab0 AS cor0
----
2836
7460
95

skipif mysql # not compatible
query I rowsort label-9625
SELECT - col1 * - col2 + - 53 / 25 FROM tab0 AS cor0
----
2836
7460
95

query I rowsort
SELECT + - 14 * - col2 FROM tab2 AS cor0
----
364
378
532

query I rowsort
SELECT DISTINCT 67 * - 17 - - col0 FROM tab2 AS cor0
----
-1060
-1061
-1132

query I rowsort
SELECT ALL col0 * 44 AS col0 FROM tab2
----
308
3432
3476

query I rowsort
SELECT ALL - ( 54 ) + cor0.col0 FROM tab0 AS cor0
----
-19
-30
35

query I rowsort
SELECT DISTINCT - ( col2 ) + + col1 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT 57 AS col1 FROM tab2 cor0
----
57

query I rowsort
SELECT col2 + + ( + col1 * col1 + col1 ) AS col1 FROM tab2
----
1019
344
3566

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9633
SELECT col2 * + CAST( NULL AS SIGNED ) - 43 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9633
SELECT col2 * + CAST ( NULL AS INTEGER ) - 43 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * 59 FROM tab1
----
1534
590
767

query I rowsort
SELECT DISTINCT - 0 FROM tab1, tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT 37 FROM tab2, tab1 AS cor0, tab0, tab2 AS cor1
----
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-9637
SELECT DISTINCT 35 + - 52 * col2 DIV - ( - col0 ) FROM tab1
----
-11
-27
-901

skipif mysql # not compatible
query I rowsort label-9637
SELECT DISTINCT 35 + - 52 * col2 / - ( - col0 ) FROM tab1
----
-11
-27
-901

onlyif mysql # use DIV operator for integer division
query I rowsort label-9638
SELECT ALL - - 85 DIV col0 AS col2 FROM tab1 AS cor0
----
1
1
28

skipif mysql # not compatible
query I rowsort label-9638
SELECT ALL - - 85 / col0 AS col2 FROM tab1 AS cor0
----
1
1
28

query I rowsort
SELECT DISTINCT cor0.col0 * 43 FROM tab2 AS cor0
----
301
3354
3397

query I rowsort
SELECT - - col1 * - 9 * - col0 FROM tab1 AS cor0
----
5760
702
9360

query I rowsort
SELECT DISTINCT + + ( + 49 ) * col2 * ( - col0 ) FROM tab1 cor0
----
-178752
-376320
-7938

onlyif mysql # use DIV operator for integer division
query I rowsort label-9642
SELECT + col2 * 40 + - col1 DIV ( col1 ) col1 FROM tab2 AS cor0
----
1039
1079
1519

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9642
SELECT + col2 * 40 + - col1 / ( col1 ) col1 FROM tab2 AS cor0
----
1039
1079
1519

query I rowsort
SELECT - + col2 * col1 + col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT 75 + col1 FROM tab1 AS cor0
----
101
85
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * cor0.col1 col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT 88 * + tab0.col1 FROM tab0
----
7568
8008
8536

query I rowsort
SELECT ALL - col0 * - col0 + + tab1.col1 + 97 AS col1 FROM tab1
----
132
4203
6510

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 17 + col1 * + col2 + + col0 * + col0 col2 FROM tab2
----
6904
7635
903

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9649
SELECT cor0.col2 * - CAST( + 47 AS SIGNED ) FROM tab2 AS cor0
----
-1222
-1269
-1786

skipif mysql # not compatible
query I rowsort label-9649
SELECT cor0.col2 * - CAST ( + 47 AS INTEGER ) FROM tab2 AS cor0
----
-1222
-1269
-1786

query I rowsort
SELECT + col0 + - 72 AS col1 FROM tab2 AS cor0
----
-65
6
7

query I rowsort
SELECT + + col0 * + ( + col1 ) FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT 86 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT col2 * + ( + col1 * col0 ) FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-9654
SELECT + col0 + col0 DIV + col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-9654
SELECT + col0 + col0 / + col0 FROM tab0 AS cor0
----
25
36
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-9655
SELECT DISTINCT col0 DIV 30 + col0 FROM tab0 cor0
----
24
36
91

skipif mysql # not compatible
query I rowsort label-9655
SELECT DISTINCT col0 / 30 + col0 FROM tab0 cor0
----
24
36
91

query I rowsort
SELECT DISTINCT col1 * - cor0.col1 + cor0.col0 AS col0 FROM tab2 cor0
----
-210
-3403
-954

query I rowsort
SELECT - col1 * - ( ( col1 ) ) AS col2 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT ALL col1 + ( 52 ) FROM tab1 cor0
----
62
65
78

query I rowsort
SELECT ALL - col0 - - col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-9660
SELECT ALL + col0 * - ( + col1 ) + col0 + 95 DIV col2 FROM tab1 AS cor0
----
-575
-74
-960

skipif mysql # not compatible
query I rowsort label-9660
SELECT ALL + col0 * - ( + col1 ) + col0 + 95 / col2 FROM tab1 AS cor0
----
-575
-74
-960

query I rowsort
SELECT ALL + - col0 + - col0 + col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL col2 * - ( + col1 ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + - cor0.col0 + + 49 AS col2 FROM tab1 AS cor0
----
-15
-31
46

query I rowsort
SELECT ALL - col0 * 27 AS col0 FROM tab1 AS cor0
----
-1728
-2160
-81

query I rowsort
SELECT DISTINCT + col2 + ( - col1 ) * - col2 + col1 FROM tab2 cor0
----
1619
701
895

query I rowsort
SELECT ALL cor0.col0 * ( col0 ) + - col1 AS col0 FROM tab1 AS cor0
----
-17
4086
6387

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9667
SELECT - col2 + + CAST( + col0 + + col0 AS SIGNED ) FROM tab1 AS cor0
----
-48
64
71

skipif mysql # not compatible
query I rowsort label-9667
SELECT - col2 + + CAST ( + col0 + + col0 AS INTEGER ) FROM tab1 AS cor0
----
-48
64
71

query I rowsort
SELECT ALL col2 * 3 + col1 AS col0 FROM tab2 AS cor0
----
112
131
137

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 24 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

onlyif mysql # use DIV operator for integer division
query I rowsort label-9670
SELECT - - col1 + - ( col2 ) DIV - col0 FROM tab1 AS cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-9670
SELECT - - col1 + - ( col2 ) / - col0 FROM tab1 AS cor0
----
10
14
44

query I rowsort
SELECT ALL cor0.col0 + col1 AS col0 FROM tab0 cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-9672
SELECT - col1 DIV + cor0.col2 + + col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9672
SELECT - col1 / + cor0.col2 + + col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - col0 + + col2 * + col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT - + ( - col1 ) + ( col1 ) FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL ( 43 ) - - col0 * + tab2.col0 AS col2 FROM tab2
----
6127
6284
92

query I rowsort
SELECT DISTINCT + col1 + ( tab1.col0 ) - + col2 * + 96 FROM tab1
----
-5155
-5398
-9123

query I rowsort
SELECT + + cor0.col0 * col2 + ( col1 ) FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL - + cor0.col0 - + col1 AS col2 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-9679
SELECT ALL col1 + col0 DIV col2 AS col0 FROM tab1
----
11
13
26

skipif mysql # not compatible
query I rowsort label-9679
SELECT ALL col1 + col0 / col2 AS col0 FROM tab1
----
11
13
26

query I rowsort
SELECT + 52 + + col2 + col1 * - 9 FROM tab2
----
-200
-453
-63

query I rowsort
SELECT col0 + - col0 * - col0 * col0 FROM tab2 AS cor0
----
350
474630
493118

query I rowsort
SELECT ( col2 + col1 * + col0 ) FROM tab0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - 93 + + col2 FROM tab1
----
-36
-39
3

query I rowsort
SELECT ALL 91 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT DISTINCT + ( + col0 ) * - 42 AS col1 FROM tab2 AS cor0
----
-294
-3276
-3318

query I rowsort
SELECT DISTINCT col1 + col2 * - 64 FROM tab0
----
-2026
-5157
33

query I rowsort
SELECT + + cor0.col0 AS col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT col0 * col1 + + col1 AS col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT - + 20 AS col1 FROM tab0 AS cor0
----
-20
-20
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 5 col0 FROM tab1
----
5
5
5

query I rowsort
SELECT DISTINCT - 27 * col2 FROM tab0
----
-2214
-27
-891

query I rowsort
SELECT ALL 95 * + 1 AS col1 FROM tab2 AS cor0
----
95
95
95

query I rowsort
SELECT - col2 + col2 + col0 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + col0 * + col0 + + col1 FROM tab2 cor0
----
6143
6258
80

query I rowsort
SELECT 27 * - col0 FROM tab2 AS cor0
----
-189
-2106
-2133

query I rowsort
SELECT ALL - + cor0.col1 * - 84 AS col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to db0a8565182219efb32e514e953c268d

query I rowsort
SELECT - col1 * ( col0 * + tab2.col2 ) FROM tab2
----
-119652
-51034
-5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9698
SELECT DISTINCT - col2 * - CAST( - col2 AS SIGNED ) FROM tab0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-9698
SELECT DISTINCT - col2 * - CAST ( - col2 AS INTEGER ) FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT ALL 42 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 325aada2239b6fe1fe2d843515ae8c5e

query I rowsort
SELECT - col2 * col2 * 62 AS col0 FROM tab1
----
-180792
-201438
-571392

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * - col0 + + 93 * col0 col0 FROM tab2 cor0
----
10349
840
9282

query I rowsort
SELECT - + col0 * + col1 * - 63 + - col1 * - col0 FROM tab0 AS cor0
----
132096
217280
518336

query I rowsort
SELECT - cor0.col1 * 0 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - ( - 93 ) AS col0 FROM tab2 AS cor0
----
93
93
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-9705
SELECT - 84 * - col2 + - cor0.col2 DIV + ( col2 + + col1 ) FROM tab1 AS cor0
----
4536
4788
8064

skipif mysql # not compatible
query I rowsort label-9705
SELECT - 84 * - col2 + - cor0.col2 / + ( col2 + + col1 ) FROM tab1 AS cor0
----
4536
4788
8064

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - ( - col0 ) ) * ( 91 ) * + cor0.col0 col2 FROM tab1 AS cor0
----
372736
582400
819

query I rowsort
SELECT DISTINCT - col2 - + 37 * + col0 FROM tab2 AS cor0
----
-286
-2912
-2961

query I rowsort
SELECT col1 * - col1 + cor0.col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT 14 * cor0.col1 AS col0 FROM tab1 AS cor0
----
140
182
364

query I rowsort
SELECT cor0.col0 + - 52 FROM tab0, tab1 AS cor0
----
9 values hashing to 4dfe3346c8cae4740ffca8d5e7751b0b

query I rowsort
SELECT 74 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT DISTINCT + 43 + + cor0.col1 FROM tab2, tab0 AS cor0
----
129
134
140

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 2 col1 FROM tab1 AS cor0
----
-2
-2
-2

query I rowsort
SELECT - col1 + + ( + col2 ) FROM tab1
----
28
47
83

query I rowsort
SELECT col0 * col2 + cor0.col1 AS col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ( + col0 ) + col1 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT 50 * col0 AS col0 FROM tab2
----
350
3900
3950

onlyif mysql # use DIV operator for integer division
query I rowsort label-9718
SELECT ALL - 76 + col0 DIV col1 FROM tab1
----
-70
-70
-76

skipif mysql # not compatible
query I rowsort label-9718
SELECT ALL - 76 + col0 / col1 FROM tab1
----
-70
-70
-76

query I rowsort
SELECT ALL 82 + col0 + col0 AS col0 FROM tab1
----
210
242
88

query I rowsort
SELECT ALL + 25 + + col0 FROM tab2
----
103
104
32

query I rowsort
SELECT ALL - - 46 * - cor0.col0 + col0 AS col1 FROM tab0 AS cor0
----
-1080
-1575
-4005

query I rowsort
SELECT + + col2 - col0 * col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + col1 + 8 AS col1 FROM tab2 AS cor0
----
25
39
67

query I rowsort
SELECT DISTINCT + col2 - 24 AS col1 FROM tab1 AS cor0
----
30
33
72

query I rowsort
SELECT col1 + - 64 AS col0 FROM tab1 AS cor0
----
-38
-51
-54

onlyif mysql # use DIV operator for integer division
query I rowsort label-9726
SELECT DISTINCT + - ( col0 ) DIV col0 + + col0 * + col1 FROM tab0 AS cor0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-9726
SELECT DISTINCT + - ( col0 ) / col0 + + col0 * + col1 FROM tab0 AS cor0
----
2063
3394
8098

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9727
SELECT 56 * col2 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9727
SELECT 56 * col2 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( - col0 + tab1.col0 ) FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + 9 + col2 AS col2 FROM tab1 AS cor0
----
105
63
66

query I rowsort
SELECT DISTINCT + 85 * + col1 FROM tab0
----
7310
7735
8245

query I rowsort
SELECT DISTINCT + - 88 AS col0 FROM tab1 AS cor0
----
-88

query I rowsort
SELECT + + ( + col0 ) * + col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + 0 * col2 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT + col0 + cor0.col1 * 59 AS col2 FROM tab1 AS cor0
----
1537
654
847

onlyif mysql # use DIV operator for integer division
query I rowsort label-9735
SELECT ALL - 3 DIV + col1 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9735
SELECT ALL - 3 / + col1 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 * - col1 col0 FROM tab0 AS cor0
----
2064
3395
8099

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2, tab2 cor3
----
3645 values hashing to 7781e11d4a9fc844b7b93d320748f7c1

query I rowsort
SELECT + + cor0.col2 * col1 * - col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT + cor0.col2 * - 74 AS col1 FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to 96d9cb360e04be6ba49bac0a54b8cad8

query I rowsort
SELECT ALL + 85 * - col1 FROM tab1 AS cor0
----
-1105
-2210
-850

query I rowsort
SELECT - 60 - - col1 AS col1 FROM tab0
----
26
31
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-9742
SELECT DISTINCT + 95 DIV col1 + col0 AS col0 FROM tab2 AS cor0
----
10
79
84

skipif mysql # not compatible
query I rowsort label-9742
SELECT DISTINCT + 95 / col1 + col0 AS col0 FROM tab2 AS cor0
----
10
79
84

query I rowsort
SELECT col1 * + col2 * 81 + + col2 FROM tab1 AS cor0
----
101184
113778
46227

onlyif mysql # use DIV operator for integer division
query I rowsort label-9744
SELECT DISTINCT col0 * col2 + 41 DIV 17 AS col2 FROM tab1 AS cor0
----
164
3650
7682

skipif mysql # not compatible
query I rowsort label-9744
SELECT DISTINCT col0 * col2 + 41 / 17 AS col2 FROM tab1 AS cor0
----
164
3650
7682

query I rowsort
SELECT - col0 * - col1 + ( col1 ) AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - col1 * col1 * - ( + col1 * col1 ) + col1 AS col0 FROM tab2
----
12117420
83538
923552

query I rowsort
SELECT ( tab1.col2 ) + col2 AS col2 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL + col1 * col0 + 63 FROM tab1 AS cor0
----
1103
141
703

onlyif mysql # use DIV operator for integer division
query I rowsort label-9749
SELECT ALL + ( col0 + ( col2 ) ) DIV + col2 FROM tab1
----
1
1
2

skipif mysql # not compatible
query I rowsort label-9749
SELECT ALL + ( col0 + ( col2 ) ) / + col2 FROM tab1
----
1
1
2

query I rowsort
SELECT + col0 * + tab2.col1 + 22 FROM tab2
----
1365
239
4624

query I rowsort
SELECT - tab2.col1 + - col1 AS col2 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT ALL - 55 + col1 * + col2 + cor0.col1 FROM tab0 AS cor0
----
139
2869
7498

query I rowsort
SELECT DISTINCT - - col1 + 1 * + col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL + col2 + + col2 * + col2 AS col0 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT cor0.col2 * - col2 - - col2 FROM tab0 AS cor0
----
-1056
-6642
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * + col2 + col1 * - ( + col2 + col2 ) col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + 53 AS col0 FROM tab0 cor0
----
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9758
SELECT DISTINCT CAST( NULL AS DECIMAL ) - col0 * + col1 AS col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9758
SELECT DISTINCT CAST ( NULL AS REAL ) - col0 * + col1 AS col0 FROM tab0 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9759
SELECT CAST( - col0 AS SIGNED ) + col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

skipif mysql # not compatible
query I rowsort label-9759
SELECT CAST ( - col0 AS INTEGER ) + col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL - 82 * col2 AS col1 FROM tab1 AS cor0
----
-4428
-4674
-7872

onlyif mysql # use DIV operator for integer division
query I rowsort label-9761
SELECT ALL 93 * + col0 + - col2 DIV - col2 col0 FROM tab0 AS cor0
----
2233
3256
8278

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9761
SELECT ALL 93 * + col0 + - col2 / - col2 col0 FROM tab0 AS cor0
----
2233
3256
8278

query I rowsort
SELECT ALL 59 * col2 + - col0 * - 71 FROM tab2 cor0
----
2090
7072
7851

query I rowsort
SELECT DISTINCT - col2 * - cor0.col0 AS col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + 35 * - 23 FROM tab1 AS cor0
----
-805

query I rowsort
SELECT + ( 30 ) + - col2 * + col0 FROM tab0 AS cor0
----
-5
-7268
-762

query I rowsort
SELECT - col1 * - 78 AS col2 FROM tab0
----
6708
7098
7566

query I rowsort
SELECT ALL col0 - 7 FROM tab1
----
-4
57
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-9768
SELECT ALL col0 DIV col2 + ( col2 ) * col0 FROM tab1
----
162
3649
7680

skipif mysql # not compatible
query I rowsort label-9768
SELECT ALL col0 / col2 + ( col2 ) * col0 FROM tab1
----
162
3649
7680

query I rowsort
SELECT ALL - col0 + - tab1.col0 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT ALL - col0 - - tab2.col1 AS col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL col2 * + col0 - tab0.col0 AS col1 FROM tab0
----
0
7209
768

query I rowsort
SELECT DISTINCT + tab2.col2 + tab2.col0 FROM tab2
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9773
SELECT - - CAST( NULL AS SIGNED ) + col2 * + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9773
SELECT - - CAST ( NULL AS INTEGER ) + col2 * + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col0 FROM tab0 cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9775
SELECT ALL - ( - cor0.col1 ) DIV + cor0.col1 + 95 FROM tab2 AS cor0
----
96
96
96

skipif mysql # not compatible
query I rowsort label-9775
SELECT ALL - ( - cor0.col1 ) / + cor0.col1 + 95 FROM tab2 AS cor0
----
96
96
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9776
SELECT ALL - col2 DIV col1 + col1 * - tab1.col2 AS col1 FROM tab1
----
-1255
-1406
-575

skipif mysql # not compatible
query I rowsort label-9776
SELECT ALL - col2 / col1 + col1 * - tab1.col2 AS col1 FROM tab1
----
-1255
-1406
-575

query I rowsort
SELECT - ( - ( col0 ) ) * - col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + col0 * 47 AS col2 FROM tab2
----
329
3666
3713

query I rowsort
SELECT + col1 * + col0 * - col2 FROM tab2
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-9780
SELECT - cor0.col2 * + cor0.col2 + + col2 DIV col2 FROM tab0 AS cor0
----
-1088
-6723
0

skipif mysql # not compatible
query I rowsort label-9780
SELECT - cor0.col2 * + cor0.col2 + + col2 / col2 FROM tab0 AS cor0
----
-1088
-6723
0

query I rowsort
SELECT DISTINCT 71 + - cor0.col2 FROM tab1, tab1 AS cor0
----
-25
14
17

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - 91 AS REAL ) FROM tab2
----
91
91
91

query I rowsort
SELECT - 28 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to c3e7fa3d059fc708f03c60e9cef0c115

query I rowsort
SELECT - ( - 15 * + tab0.col0 ) + tab0.col2 * col1 FROM tab0
----
3198
622
8797

query I rowsort
SELECT 63 + - 32 FROM tab2
----
31
31
31

query I rowsort
SELECT ALL - cor0.col1 * col0 + col0 - cor0.col2 AS col0 FROM tab2 AS cor0
----
-1302
-237
-4550

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col0 + col1 col2 FROM tab0 AS cor0
----
134
167
269

onlyif mysql # use DIV operator for integer division
query I rowsort label-9788
SELECT + - col0 * col1 + col1 * col2 DIV + col1 FROM tab1 cor0
----
-24
-583
-944

skipif mysql # not compatible
query I rowsort label-9788
SELECT + - col0 * col1 + col1 * col2 / + col1 FROM tab1 cor0
----
-24
-583
-944

query I rowsort
SELECT - + col1 * + cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
-636056
-753571
-912673

query I rowsort
SELECT DISTINCT ( col0 ) + col0 AS col1 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT col0 * - col0 + + col0 AS col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT ALL 46 * + col0 + col0 FROM tab1 AS cor0
----
141
3008
3760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 col2 FROM tab0 AS cor0
----
-26
-26
-26

query I rowsort
SELECT DISTINCT col2 * col1 - - cor0.col2 * col2 AS col1 FROM tab2 cor0
----
1566
2090
2210

query I rowsort
SELECT + col2 * - cor0.col2 + col1 * col2 FROM tab1 AS cor0
----
-1512
-2679
-7968

query I rowsort
SELECT ALL - 51 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
-18
-50
31

query I rowsort
SELECT - col2 + + col1 * col1 AS col0 FROM tab0 cor0
----
7363
8199
9408

query I rowsort
SELECT col2 + col2 + col2 * - col1 FROM tab2
----
-1482
-570
-783

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col2 * col0 col1 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT ALL - col0 + - 1 FROM tab1 AS cor0
----
-4
-65
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9801
SELECT DISTINCT - col2 * CAST( NULL AS SIGNED ) * + 79 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9801
SELECT DISTINCT - col2 * CAST ( NULL AS INTEGER ) * + 79 AS col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9802
SELECT ALL + col2 DIV + 53 AS col2 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9802
SELECT ALL + col2 / + 53 AS col2 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + col0 + + 88 AS col2 FROM tab2 AS cor0
----
166
167
95

query I rowsort
SELECT ALL - + col0 + col2 * col2 AS col2 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT + ( - col2 ) * col2 + col1 + - col0 AS col0 FROM tab0 AS cor0
----
-1027
-6722
61

query I rowsort
SELECT + + 96 * 55 + + col1 FROM tab0 AS cor0
----
5366
5371
5377

query I rowsort
SELECT + 47 + col1 AS col0 FROM tab2 AS cor0
----
106
64
78

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab2, tab1 cor2
----
3645 values hashing to 9b60cb1db2fb2fa5700b0e572b4b6546

query I rowsort
SELECT ALL + col2 + - 93 - col2 FROM tab2
----
-93
-93
-93

query I rowsort
SELECT - 78 + col0 AS col2 FROM tab2 AS cor0
----
-71
0
1

query I rowsort
SELECT ( + 93 ) + - cor0.col0 FROM tab1 AS cor0
----
13
29
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-9812
SELECT + + 72 - + col1 DIV col2 FROM tab0 AS cor0
----
-25
70
71

skipif mysql # not compatible
query I rowsort label-9812
SELECT + + 72 - + col1 / col2 FROM tab0 AS cor0
----
-25
70
71

query I rowsort
SELECT + col1 * 50 + + col1 FROM tab1 AS cor0
----
1326
510
663

query I rowsort
SELECT - cor0.col2 + + 84 * ( col2 * ( - col1 ) ) FROM tab1 AS cor0
----
-104928
-117990
-47937

onlyif mysql # use DIV operator for integer division
query I rowsort label-9815
SELECT col0 + + col0 DIV col0 AS col1 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-9815
SELECT col0 + + col0 / col0 AS col1 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT DISTINCT + col0 + - ( + col1 ) * col2 FROM tab0 AS cor0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-9817
SELECT DISTINCT + col1 DIV - col1 + - col0 AS col0 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-9817
SELECT DISTINCT + col1 / - col1 + - col0 AS col0 FROM tab1 AS cor0
----
-4
-65
-81

query I rowsort
SELECT DISTINCT - col0 * - 39 AS col1 FROM tab2 AS cor0
----
273
3042
3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 89 col0 FROM tab2, tab2 AS cor0
----
89

query I rowsort
SELECT ALL - 20 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to f1cccb95c90889319e7a51e4ae9475bb

query I rowsort
SELECT 48 * col0 * + col2 FROM tab1
----
175104
368640
7776

query I rowsort
SELECT cor0.col0 * - 48 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to dd629622b93bd94cc2fe909691e695e1

query I rowsort
SELECT + col1 + cor0.col0 * + 56 FROM tab1 AS cor0
----
194
3594
4493

query I rowsort
SELECT DISTINCT 42 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
42

query I rowsort
SELECT + col1 + cor0.col0 * + ( + col0 + col2 ) AS col1 FROM tab0 AS cor0
----
1357
1454
15310

query I rowsort
SELECT - 31 - + col1 AS col0 FROM tab2
----
-48
-62
-90

query I rowsort
SELECT col2 * tab2.col0 + col2 AS col1 FROM tab2
----
2054
216
3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9828
SELECT + - cor0.col0 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9828
SELECT + - cor0.col0 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 + - ( - 50 ) * - cor0.col2 FROM tab0 cor0
----
-1564
-4009
47

query I rowsort
SELECT + col1 + col0 * col1 * - col1 FROM tab0 AS cor0
----
-177418
-329218
-736918

query I rowsort
SELECT + - col1 * + col0 + 94 AS col2 FROM tab1 AS cor0
----
-546
-946
16

query I rowsort
SELECT ALL - - col1 * + ( - 55 * col1 ) + col0 * col0 FROM tab0 AS cor0
----
-406204
-447534
-516270

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-9834
SELECT DISTINCT - 32 + + col1 DIV + col2 FROM tab1
----
-32

skipif mysql # not compatible
query I rowsort label-9834
SELECT DISTINCT - 32 + + col1 / + col2 FROM tab1
----
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + 53 + - col0 * + col1 col0 FROM tab0
----
-1540
-3382
-792

query I rowsort
SELECT - col2 * - tab2.col1 + + col2 AS col1 FROM tab2
----
1560
684
864

query I rowsort
SELECT ( col0 ) + + col2 * + col1 AS col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + col2 * + col1 + col1 * 18 * 88 AS col2 FROM tab0 AS cor0
----
139062
151606
153745

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col1 ) col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT + 87 * 59 + col0 FROM tab1 AS cor0
----
5136
5197
5213

query I rowsort
SELECT - - 80 AS col1 FROM tab1 AS cor0
----
80
80
80

query I rowsort
SELECT DISTINCT + cor0.col2 * col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT ALL - ( + col0 ) * + col2 * - ( - col2 ) FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT + 27 * + col1 AS col0 FROM tab0 cor0
----
2322
2457
2619

query I rowsort
SELECT - 46 + col1 FROM tab2 AS cor0
----
-15
-29
13

query I rowsort
SELECT ALL 76 * + col2 AS col1 FROM tab2
----
1976
2052
2888

query I rowsort
SELECT + cor1.col0 + - tab2.col1 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 9988d482f94d4a436a2fe6e0568c1c30

query I rowsort
SELECT - ( col1 ) * col2 + - 75 * + 59 FROM tab1
----
-4995
-5673
-5829

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 30 col1 FROM tab2, tab0 AS cor0
----
-30

onlyif mysql # use DIV operator for integer division
query I rowsort label-9850
SELECT + - ( + col2 ) DIV + col2 + + 3 FROM tab1 AS cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-9850
SELECT + - ( + col2 ) / + col2 + + 3 FROM tab1 AS cor0
----
2
2
2

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
86
91
97

query I rowsort
SELECT ALL + col2 + cor0.col1 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT col1 + cor0.col0 * + col0 AS col2 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT DISTINCT + col0 + - col1 + - col0 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ( - 14 ) AS col1 FROM tab2 AS cor0
----
-14
-14
-14

query I rowsort
SELECT - + cor0.col1 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT DISTINCT + 86 AS col1 FROM tab0, tab0 AS cor0
----
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-9858
SELECT - ( col1 ) DIV + col1 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9858
SELECT - ( col1 ) / + col1 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL cor0.col0 + col0 * col2 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL + + col0 + + col2 + col1 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT ALL + - col1 - + cor0.col0 AS col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT - 96 * - col1 AS col0 FROM tab1 AS cor0
----
1248
2496
960

query I rowsort
SELECT col1 + - col2 * ( + col1 * + cor0.col2 ) AS col0 FROM tab2 AS cor0
----
-22568
-24531
-39825

onlyif mysql # use DIV operator for integer division
query I rowsort label-9864
SELECT ALL col1 DIV + ( col1 ) + 98 AS col2 FROM tab1
----
99
99
99

skipif mysql # not compatible
query I rowsort label-9864
SELECT ALL col1 / + ( col1 ) + 98 AS col2 FROM tab1
----
99
99
99

query I rowsort
SELECT DISTINCT + - col1 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9866
SELECT - cor0.col2 DIV col0 col2 FROM tab2 AS cor0
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9866
SELECT - cor0.col2 / col0 col2 FROM tab2 AS cor0
----
-3
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9867
SELECT + - col0 * CAST( NULL AS SIGNED ) + ( - col1 ) * col2 * col0 col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9867
SELECT + - col0 * CAST ( NULL AS INTEGER ) + ( - col1 ) * col2 * col0 col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - cor0.col2 * + 63 FROM tab1 AS cor0
----
3402
3591
6048

query I rowsort
SELECT + col0 - + col1 * + ( col2 ) AS col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT + col2 * + ( + 73 ) + col1 AS col2 FROM tab1 AS cor0
----
3968
4171
7021

query I rowsort
SELECT DISTINCT cor0.col2 + + 51 FROM tab0 AS cor0
----
133
52
84

query I rowsort
SELECT col0 * ( col0 ) + col2 AS col1 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT - col2 * 64 + + col0 * col1 * 75 FROM tab0 AS cor0
----
152688
254561
602177

query I rowsort
SELECT - col2 * col0 - col0 AS col0 FROM tab0 AS cor0
----
-70
-7387
-816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9875
SELECT col0 + CAST( col1 AS SIGNED ) * + col1 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9875
SELECT col0 + CAST ( col1 AS INTEGER ) * + col1 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * + 14 AS col0 FROM tab0 cor0
----
1148
14
462

query I rowsort
SELECT + - 22 * + tab2.col0 + 90 AS col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 9dd620476d31c64ef74543efa4a03e51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9878
SELECT ALL - col1 * ( + 26 ) + + col0 / - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9878
SELECT ALL - col1 * ( + 26 ) + + col0 / - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * + 3 FROM tab1 AS cor0
----
192
240
9

query I rowsort
SELECT ALL - + col1 + - 77 + col1 FROM tab0 AS cor0
----
-77
-77
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-9881
SELECT DISTINCT - - cor0.col2 - CAST( col2 AS SIGNED ) DIV cor0.col1 FROM tab2 AS cor0
----
26
27
36

skipif mysql # not compatible
query I rowsort label-9881
SELECT DISTINCT - - cor0.col2 - CAST ( col2 AS INTEGER ) / cor0.col1 FROM tab2 AS cor0
----
26
27
36

query I rowsort
SELECT 59 + + cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 9bd299632a86b2bad2ad2e0d84346696

query I rowsort
SELECT DISTINCT - cor0.col1 * + 22 + + col1 AS col2 FROM tab1 cor0
----
-210
-273
-546

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col1 FROM tab1 cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9885
SELECT + col0 + 62 DIV - col2 AS col0 FROM tab1
----
2
63
80

skipif mysql # not compatible
query I rowsort label-9885
SELECT + col0 + 62 / - col2 AS col0 FROM tab1
----
2
63
80

query I rowsort
SELECT col1 + - 38 AS col2 FROM tab0
----
48
53
59

query I rowsort
SELECT - col1 + - 2 * col0 FROM tab1
----
-138
-173
-32

query I rowsort
SELECT 32 - + col0 FROM tab1 AS cor0
----
-32
-48
29

query I rowsort
SELECT - ( ( + col1 ) ) - cor0.col0 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-9890
SELECT + col2 DIV col2 - col2 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-9890
SELECT + col2 / col2 - col2 FROM tab0 AS cor0
----
-32
-81
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9891
SELECT DISTINCT + CAST( 38 AS SIGNED ) + col2 FROM tab2 AS cor0
----
64
65
76

skipif mysql # not compatible
query I rowsort label-9891
SELECT DISTINCT + CAST ( 38 AS INTEGER ) + col2 FROM tab2 AS cor0
----
64
65
76

query I rowsort
SELECT ALL col0 * - col2 + cor0.col1 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9893
SELECT DISTINCT + CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9893
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT + - ( col1 ) + + col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * + col2 + col2 FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT col0 + col1 * col1 AS col1 FROM tab1
----
164
249
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-9897
SELECT ALL + col0 DIV + col1 + + col0 DIV - col0 FROM tab1
----
-1
5
5

skipif mysql # not compatible
query I rowsort label-9897
SELECT ALL + col0 / + col1 + + col0 / - col0 FROM tab1
----
-1
5
5

query I rowsort
SELECT DISTINCT col2 * + col2 - 40 FROM tab1
----
2876
3209
9176

query I rowsort
SELECT + 68 FROM tab1, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT ( col2 * tab1.col0 + - col1 ) FROM tab1
----
136
3638
7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 84 - col1 col2 FROM tab2 AS cor0
----
25
53
67

query I rowsort
SELECT - - col1 * ( cor0.col0 ) AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + + 26 * col1 + + cor0.col1 FROM tab0 AS cor0
----
2322
2457
2619

query I rowsort
SELECT + 67 * - cor0.col0 - + col1 * ( - col1 ) AS col0 FROM tab0 AS cor0
----
2318
5788
7064

query I rowsort
SELECT ALL cor0.col1 + + 25 FROM tab2 AS cor0
----
42
56
84

query I rowsort
SELECT ALL - + 61 + - col2 FROM tab0 AS cor0
----
-143
-62
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9907
SELECT ALL + - CAST( NULL AS SIGNED ) - - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9907
SELECT ALL + - CAST ( NULL AS INTEGER ) - - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9908
SELECT + col2 * - CAST( NULL AS SIGNED ) AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9908
SELECT + col2 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col2 * ( col0 ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col2 + - 65 * 88 AS col1 FROM tab1 AS cor0
----
-5774
-5777
-5816

query I rowsort
SELECT DISTINCT + col0 - + col2 * col1 AS col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL + - cor0.col0 * - col2 + - col1 FROM tab2 cor0
----
158
1969
2985

query I rowsort
SELECT ALL cor0.col1 * 4 - col1 AS col0 FROM tab0 AS cor0
----
258
273
291

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9914
SELECT ALL col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9914
SELECT ALL col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 + ( col2 ) * cor0.col1 AS col0 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-9916
SELECT cor0.col1 DIV - col0 + - col0 + col0 AS col1 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-9916
SELECT cor0.col1 / - col0 + - col0 + col0 AS col1 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT - col2 + col2 + - col2 AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT cor0.col0 * col0 + col2 AS col2 FROM tab1 AS cor0
----
4153
63
6496

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NULL > + col2 + col0 * + col0 / + col2 OR NOT NULL < NULL
----

query I rowsort
SELECT cor0.col0 + - cor0.col1 * col0 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
-1247
-179
-4465

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + col2 col0 FROM tab0 cor0 WHERE NOT ( NULL ) NOT IN ( + col0 )
----

query I rowsort
SELECT + col1 * + col2 + cor0.col2 + - col1 FROM tab2 AS cor0
----
1501
667
833

onlyif mysql # use DIV operator for integer division
query I rowsort label-9923
SELECT ALL - col1 DIV + col0 AS col2 FROM tab1
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-9923
SELECT ALL - col1 / + col0 AS col2 FROM tab1
----
-8
0
0

query I rowsort
SELECT + 56 * - col2 * - col1 + col2 AS col1 FROM tab2
----
36214
46899
85930

query I rowsort
SELECT ALL + + col1 + + col0 - col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - cor0.col1 * + cor0.col0 * + col0 AS col2 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT tab0.col1 * - col1 + col1 AS col0 FROM tab0
----
-7310
-8190
-9312

query III rowsort
SELECT * FROM tab1 WHERE NULL > ( col0 / col2 + col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9929
SELECT + col1 + col1 DIV tab1.col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9929
SELECT + col1 + col1 / tab1.col2 FROM tab1
----
10
13
26

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col0 > NULL
----

query I rowsort
SELECT col1 * col1 + tab1.col1 FROM tab1
----
110
182
702

query I rowsort
SELECT + col2 + + col0 * - col2 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT - col2 * col1 * col2 + - ( col2 ) * + 37 AS col0 FROM tab1
----
-123360
-34599
-77814

query I rowsort
SELECT 42 - col1 AS col1 FROM tab0
----
-44
-49
-55

onlyif mysql # use DIV operator for integer division
query I rowsort label-9935
SELECT ALL + + 43 DIV + col1 FROM tab1 AS cor0
----
1
3
4

skipif mysql # not compatible
query I rowsort label-9935
SELECT ALL + + 43 / + col1 FROM tab1 AS cor0
----
1
3
4

query I rowsort
SELECT 52 + + col2 FROM tab0 AS cor0
----
134
53
85

query I rowsort
SELECT DISTINCT - col1 + col0 * - col1 * + col1 AS col0 FROM tab2
----
-22848
-271577
-6758

query I rowsort
SELECT col0 + + tab1.col0 AS col1 FROM tab1
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9939
SELECT ALL col2 DIV - col2 + + tab0.col1 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-9939
SELECT ALL col2 / - col2 + + tab0.col1 FROM tab0
----
85
90
96

query I rowsort
SELECT DISTINCT - col1 * - col0 + + tab0.col0 * col1 + tab0.col0 * - col0 AS col2 FROM tab0 WHERE NOT NULL BETWEEN NULL AND - col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9941
SELECT DISTINCT - col1 DIV - col0 + + col0 FROM tab2
----
11
78
79

skipif mysql # not compatible
query I rowsort label-9941
SELECT DISTINCT - col1 / - col0 + + col0 FROM tab2
----
11
78
79

query I rowsort
SELECT ALL - col1 FROM tab2 WHERE - col1 * + col1 IN ( - col0 * - col2 )
----

query I rowsort
SELECT + col2 * col0 + - col0 + col1 FROM tab2 AS cor0
----
2009
213
2940

query I rowsort
SELECT - col0 + - col1 * col0 + col2 * col0 FROM tab1 AS cor0
----
2944
6560
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-9945
SELECT cor0.col1 * + col0 DIV + col0 + + cor0.col0 + - col2 DIV col1 AS col0 FROM tab2 AS cor0
----
137
38
94

skipif mysql # not compatible
query I rowsort label-9945
SELECT cor0.col1 * + col0 / + col0 + + cor0.col0 + - col2 / col1 AS col0 FROM tab2 AS cor0
----
137
38
94

query I rowsort
SELECT ALL col2 + col1 - col0 FROM tab0
----
63
84
95

query I rowsort
SELECT tab1.col2 - col0 * col1 * + col0 FROM tab1
----
-180
-40903
-83104

query I rowsort
SELECT ALL - col0 - + col0 AS col2 FROM tab0 WHERE - col1 + col2 NOT BETWEEN ( - col2 ) AND ( col2 )
----
-48
-70

query I rowsort
SELECT ALL col1 + - col2 * - tab2.col1 + + col0 AS col2 FROM tab2
----
1671
742
875

query I rowsort
SELECT ALL + tab1.col0 * + col1 * col0 FROM tab1
----
234
40960
83200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - col0 * + col2 + col0 * col1 col1 FROM tab1
----
-2998
-58
-6627

onlyif mysql # use DIV operator for integer division
query I rowsort label-9952
SELECT DISTINCT tab2.col2 DIV + col0 + - tab2.col0 AS col2 FROM tab2
----
-4
-78
-79

skipif mysql # not compatible
query I rowsort label-9952
SELECT DISTINCT tab2.col2 / + col0 + - tab2.col0 AS col2 FROM tab2
----
-4
-78
-79

query I rowsort
SELECT DISTINCT col2 FROM tab1 WHERE NOT NULL BETWEEN ( NULL ) AND col2
----

query I rowsort
SELECT DISTINCT - col1 * col1 AS col2 FROM tab1
----
-100
-169
-676

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL <> - col0 + + col2
----

query I rowsort
SELECT col0 * + tab0.col2 * - col2 AS col1 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT + tab0.col0 * col1 + col1 * + col0 FROM tab0
----
16198
4128
6790

query I rowsort
SELECT ALL 4 - + col2 AS col1 FROM tab2
----
-22
-23
-34

query I rowsort
SELECT ALL - + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT - - col2 - - 52 FROM tab0 AS cor0
----
134
53
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9961
SELECT DISTINCT 35 DIV tab0.col2 + - ( + col0 + col2 ) AS col2 FROM tab0
----
-1
-171
-56

skipif mysql # not compatible
query I rowsort label-9961
SELECT DISTINCT 35 / tab0.col2 + - ( + col0 + col2 ) AS col2 FROM tab0
----
-1
-171
-56

query I rowsort
SELECT DISTINCT - 34 + col2 FROM tab2
----
-7
-8
4

query I rowsort
SELECT + col1 * + 94 * + col2 + col2 AS col0 FROM tab2 AS cor0
----
144222
60762
78705

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9964
SELECT - col0 * CAST( col2 AS SIGNED ) * col0 FROM tab1
----
-233472
-486
-614400

skipif mysql # not compatible
query I rowsort label-9964
SELECT - col0 * CAST ( col2 AS INTEGER ) * col0 FROM tab1
----
-233472
-486
-614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-9965
SELECT + col1 + + 86 DIV col1 AS col0 FROM tab1
----
18
19
29

skipif mysql # not compatible
query I rowsort label-9965
SELECT + col1 + + 86 / col1 AS col0 FROM tab1
----
18
19
29

query I rowsort
SELECT - ( + 78 ) AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

query I rowsort
SELECT ALL + col2 * col1 - 61 FROM tab1 AS cor0
----
1187
1343
509

query I rowsort
SELECT - col0 * - 55 * - col1 AS col2 FROM tab2 AS cor0
----
-11935
-253110
-73865

query I rowsort
SELECT ALL cor0.col2 * col2 - + 74 * - col0 FROM tab2 AS cor0
----
1247
6448
7290

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9970
SELECT ALL - + col2 / CAST( NULL AS SIGNED ) + - 6 * col2 / - ( col2 * + cor0.col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9970
SELECT ALL - + col2 / CAST ( NULL AS INTEGER ) + - 6 * col2 / - ( col2 * + cor0.col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 * - col1 + + col2 FROM tab1 cor0
----
-24
-583
-944

query I rowsort
SELECT cor0.col2 * - col0 + + col2 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL - col1 * tab0.col2 * col2 FROM tab0
----
-611884
-93654
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - ( - col2 ) col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL ( - 66 + - col2 ) FROM tab0
----
-148
-67
-99

query I rowsort
SELECT DISTINCT + + col0 * - ( - col0 ) AS col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + cor2.col1 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab1, tab1 AS cor2
----
243 values hashing to de2705ff0bb8b4f714dafb07497c6119

onlyif mysql # use DIV operator for integer division
query I rowsort label-9978
SELECT ALL - col2 DIV - col2 + + col0 AS col1 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-9978
SELECT ALL - col2 / - col2 + + col0 AS col1 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT 17 * col1 AS col2 FROM tab1 AS cor0
----
170
221
442

onlyif mysql # use DIV operator for integer division
query I rowsort label-9980
SELECT DISTINCT - col1 - cor0.col0 DIV + col0 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-9980
SELECT DISTINCT - col1 - cor0.col0 / + col0 FROM tab1 AS cor0
----
-11
-14
-27

query I rowsort
SELECT ALL - - col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - + cor0.col1 - col1 AS col1 FROM tab1 cor0
----
-20
-26
-52

query I rowsort
SELECT ALL - - ( - col2 ) + col1 * col2 FROM tab1 cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT - 15 * + col0 AS col1 FROM tab1 AS cor0
----
-1200
-45
-960

query I rowsort
SELECT 5 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT DISTINCT - cor0.col2 * col0 + 94 FROM tab0 cor0
----
-698
-7204
59

query I rowsort
SELECT ALL - - 62 * + col1 + col1 - - col1 AS col2 FROM tab0 AS cor0
----
5504
5824
6208

query I rowsort
SELECT ALL - col2 + + col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ( col0 ) * 57 FROM tab2 AS cor0
----
399
4446
4503

query I rowsort
SELECT DISTINCT - 20 * + col0 * - 9 FROM tab1
----
11520
14400
540

onlyif mysql # use DIV operator for integer division
query I rowsort label-9991
SELECT + col1 + col0 DIV + 80 FROM tab1 AS cor0
----
10
14
26

skipif mysql # not compatible
query I rowsort label-9991
SELECT + col1 + col0 / + 80 FROM tab1 AS cor0
----
10
14
26

query I rowsort
SELECT DISTINCT + + col0 + + col2 * 95 AS col2 FROM tab2 AS cor0
----
2548
2572
3689

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT - col2 * 93 AS col0 FROM tab1 AS cor0
----
-5022
-5301
-8928

onlyif mysql # use DIV operator for integer division
query I rowsort label-9995
SELECT - col1 DIV + 30 AS col1 FROM tab2 cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-9995
SELECT - col1 / + 30 AS col1 FROM tab2 cor0
----
-1
-1
0

query I rowsort
SELECT cor0.col0 * 68 + col2 * col0 - col2 * + col0 * col2 FROM tab0 AS cor0
----
-23712
-585086
2380

query I rowsort
SELECT + + col1 + 81 * + col0 AS col0 FROM tab0 AS cor0
----
2030
2932
7300

onlyif mysql # use DIV operator for integer division
query I rowsort label-9998
SELECT - - col2 + col0 * ( col0 ) DIV + cor0.col2 AS col1 FROM tab0 AS cor0
----
1226
178
50

skipif mysql # not compatible
query I rowsort label-9998
SELECT - - col2 + col0 * ( col0 ) / + cor0.col2 AS col1 FROM tab0 AS cor0
----
1226
178
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-9999
SELECT DISTINCT col0 DIV + col2 col0 FROM tab0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9999
SELECT DISTINCT col0 / + col2 col0 FROM tab0
----
0
1
35

