sqllogictest

Artifact [35b3c82ef3]
Login

Artifact 35b3c82ef302346e6e67115d417a150483055070:


hash-threshold 8

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

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

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

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

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

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

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-0
SELECT ALL col0 / 82 AS col0 FROM tab0
----
0
0
1

query I rowsort
SELECT + 86 + - cor0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to efa5e34b59c4c16910f8f801f7808e44

query I rowsort
SELECT - col0 * col0 * - cor0.col0 FROM tab1 AS cor0
----
262144
27
512000

query I rowsort
SELECT ALL - col1 * + col2 * col1 + col0 AS col2 FROM tab1 AS cor0
----
-16144
-36501
-5636

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

skipif mysql # not compatible
query I rowsort label-4
SELECT + + cor0.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-5
SELECT - 27 * cor0.col2 * CAST( - 29 AS SIGNED ) FROM tab2 AS cor0
----
20358
21141
29754

skipif mysql # not compatible
query I rowsort label-5
SELECT - 27 * cor0.col2 * CAST ( - 29 AS INTEGER ) FROM tab2 AS cor0
----
20358
21141
29754

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

query I rowsort
SELECT ALL 99 * + col1 + col0 + + 25 FROM tab2 AS cor0
----
1787
3101
5944

query I rowsort
SELECT - 93 + - col0 * col2 AS col0 FROM tab1 cor0
----
-255
-3741
-7773

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

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

query I rowsort
SELECT cor0.col2 + - col0 * - col1 * col1 FROM tab0 AS cor0
----
177537
329316
737091

query I rowsort
SELECT + col1 + + 32 AS col2 FROM tab1 cor0
----
42
45
58

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

query I rowsort
SELECT - cor1.col0 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT 57 + + col2 * - col1 FROM tab1 AS cor0
----
-1191
-1347
-513

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

query I rowsort
SELECT - cor0.col1 * cor1.col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d6e251a4a6d3e8483c15062bde9b3abb

onlyif mysql # use DIV operator for integer division
query I rowsort label-17
SELECT ALL col0 + col2 DIV col1 AS col1 FROM tab2 cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-17
SELECT ALL col0 + col2 / col1 AS col1 FROM tab2 cor0
----
7
78
81

query I rowsort
SELECT ALL - 42 + + cor0.col0 FROM tab1 AS cor0
----
-39
22
38

query I rowsort
SELECT ALL + - cor0.col2 * 5 * col1 - 20 AS col0 FROM tab2 AS cor0
----
-3250
-4205
-7690

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

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

query I rowsort
SELECT DISTINCT 46 * col0 FROM tab0 cor0
----
1104
1610
4094

query I rowsort
SELECT 38 + + 6 * col2 FROM tab0 AS cor0
----
236
44
530

query I rowsort
SELECT ALL - cor0.col0 * col0 + - col0 * 85 * + col1 FROM tab1 AS cor0
----
-58496
-6639
-94800

query I rowsort
SELECT 49 + - col1 FROM tab0 AS cor0
----
-37
-42
-48

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

query I rowsort
SELECT ( 75 ) * cor0.col2 * - col0 AS col1 FROM tab2 AS cor0
----
-14175
-152100
-225150

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

query I rowsort
SELECT + col0 * - 48 AS col1 FROM tab2
----
-336
-3744
-3792

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

query I rowsort
SELECT DISTINCT + ( ( + col1 ) ) AS col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + col1 * - 51 FROM tab1 AS cor0
----
-1326
-510
-663

query I rowsort
SELECT + 23 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 546d49aa433406dd83ea19885588e658

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-35
SELECT DISTINCT CAST( 65 AS SIGNED ) * - col1 + col1 FROM tab0
----
-5504
-5824
-6208

skipif mysql # not compatible
query I rowsort label-35
SELECT DISTINCT CAST ( 65 AS INTEGER ) * - col1 + col1 FROM tab0
----
-5504
-5824
-6208

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

query I rowsort
SELECT - col1 * - ( col2 + + ( - col1 ) ) FROM tab2 AS cor0
----
-124
-1947
357

query I rowsort
SELECT - ( cor0.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-39
SELECT CAST( NULL AS SIGNED ) + 88 col0 FROM tab2
----
NULL
NULL
NULL

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

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

query I rowsort
SELECT - 30 + - 59 FROM tab2 cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 924a74d31360fa4301c953b423a4710e

onlyif mysql # use DIV operator for integer division
query I rowsort label-42
SELECT - 43 DIV - col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-42
SELECT - 43 / - col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-43
SELECT - ( + col0 ) DIV 36 + - col1 * - col1 DIV col1 FROM tab0
----
86
89
97

skipif mysql # not compatible
query I rowsort label-43
SELECT - ( + col0 ) / 36 + - col1 * - col1 / col1 FROM tab0
----
86
89
97

skipif mysql # not compatible
query I rowsort
SELECT tab1.col2 - CAST ( ( col1 ) AS REAL ) AS col2 FROM tab1
----
28
47
83

query I rowsort
SELECT DISTINCT col0 + ( 62 + tab0.col1 ) * - ( - col1 ) FROM tab0
----
12752
14012
15458

query I rowsort
SELECT - col0 * - 60 AS col0 FROM tab0
----
1440
2100
5340

query I rowsort
SELECT - 19 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 0fbbff28a7b63c37b01cf369f9325662

query I rowsort
SELECT ALL - col0 * - 20 FROM tab2
----
140
1560
1580

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 12 * + col2 FROM tab0
----
12
396
984

query I rowsort
SELECT col2 * 69 + - col1 * 57 * col0 AS col2 FROM tab2
----
-10506
-260520
-73929

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

query I rowsort
SELECT - tab1.col0 * - col1 * ( 75 ) AS col1 FROM tab1
----
48000
5850
78000

query I rowsort
SELECT + 78 * + col2 FROM tab2
----
2028
2106
2964

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

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

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

query I rowsort
SELECT DISTINCT 80 * col2 + ( ( + tab0.col1 ) ) FROM tab0
----
177
2726
6651

onlyif mysql # use DIV operator for integer division
query I rowsort label-62
SELECT 98 * col0 * + col2 + col1 DIV col1 FROM tab0
----
3431
715205
77617

skipif mysql # not compatible
query I rowsort label-62
SELECT 98 * col0 * + col2 + col1 / col1 FROM tab0
----
3431
715205
77617

query I rowsort
SELECT DISTINCT - 94 * col2 + ( + 93 * + col2 ) + 61 * + 8 * col1 FROM tab2
----
15101
28766
8258

query I rowsort
SELECT ALL - 57 * col0 FROM tab1 AS cor0
----
-171
-3648
-4560

query I rowsort
SELECT DISTINCT + - 66 * - col2 FROM tab2 AS cor0
----
1716
1782
2508

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

query I rowsort
SELECT col0 + col2 - - ( col0 + col1 ) * - col0 FROM tab2 cor0
----
-10582
-232
-7467

query I rowsort
SELECT ALL + col0 + ( - 82 + - col0 ) FROM tab1
----
-82
-82
-82

query I rowsort
SELECT ALL + 99 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT 64 + cor0.col1 * 40 FROM tab0, tab0 AS cor0
----
9 values hashing to 2bf6971efb34d46e2bdf9db13b4dfe98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 58 col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT ALL col0 + + 40 FROM tab1
----
104
120
43

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

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

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

query I rowsort
SELECT 78 * - ( + col1 ) + cor0.col2 * col0 FROM tab1 AS cor0
----
-1866
2868
6666

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

query I rowsort
SELECT + ( + 87 ) AS col2 FROM tab0 AS cor0
----
87
87
87

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col2 + cor0.col1 col2 FROM tab1 AS cor0
----
-2890
-3239
-9203

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

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

skipif mysql # not compatible
query I rowsort label-83
SELECT ALL - CAST ( NULL AS INTEGER ) / - 32 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col1 ) + - col0 col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT 1 * col0 + - col1 FROM tab2
----
-24
19
62

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

skipif mysql # not compatible
query I rowsort label-87
SELECT DISTINCT CAST ( NULL AS REAL ) + cor0.col1 FROM tab1 AS cor0
----
NULL

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

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

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

skipif mysql # not compatible
query I rowsort label-90
SELECT ALL - ( + 50 ) / col2 AS col0 FROM tab0 AS cor0
----
-1
-50
0

query I rowsort
SELECT DISTINCT 19 + 57 * col0 FROM tab0 AS cor0
----
1387
2014
5092

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

query I rowsort
SELECT DISTINCT - 96 + col0 AS col1 FROM tab0 AS cor0
----
-61
-7
-72

query I rowsort
SELECT + - 46 * - col0 FROM tab0 cor0
----
1104
1610
4094

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

query I rowsort
SELECT ALL cor0.col2 * + col0 * cor0.col1 + col1 FROM tab1 AS cor0
----
36490
4238
99853

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-98
SELECT DISTINCT - - 89 + col2 + + col1 DIV - col2 AS col0 FROM tab0 AS cor0
----
-7
120
170

skipif mysql # not compatible
query I rowsort label-98
SELECT DISTINCT - - 89 + col2 + + col1 / - col2 AS col0 FROM tab0 AS cor0
----
-7
120
170

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

skipif mysql # not compatible
query I rowsort label-99
SELECT DISTINCT - col2 * + CAST ( - cor0.col2 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT cor0.col2 - - 88 FROM tab2 AS cor0
----
114
115
126

onlyif mysql # use DIV operator for integer division
query I rowsort label-101
SELECT ALL cor0.col0 DIV - CAST( col1 AS SIGNED ) + col1 * col0 AS col0 FROM tab1 cor0
----
1034
634
78

skipif mysql # not compatible
query I rowsort label-101
SELECT ALL cor0.col0 / - CAST ( col1 AS INTEGER ) + col1 * col0 AS col0 FROM tab1 cor0
----
1034
634
78

query I rowsort
SELECT DISTINCT + col2 * 0 - - col2 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + - col1 + - 12 FROM tab0 AS cor0
----
-103
-109
-98

query I rowsort
SELECT DISTINCT - col2 + - col0 - - ( - col0 ) FROM tab0 AS cor0
----
-260
-71
-81

query I rowsort
SELECT col0 + + col0 + - col2 * + col1 FROM tab1 cor0
----
-1088
-1398
-442

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * 33 * col2 col1 FROM tab0 AS cor0
----
-246246
-3201
-93654

query I rowsort
SELECT ALL + cor0.col1 + 86 FROM tab1 AS cor0
----
112
96
99

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-108
SELECT - col0 / + 98 col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 + 85 AS col0 FROM tab2 AS cor0
----
26
54
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-110
SELECT + - col0 DIV col1 + col0 FROM tab1 cor0
----
3
58
74

skipif mysql # not compatible
query I rowsort label-110
SELECT + - col0 / col1 + col0 FROM tab1 cor0
----
3
58
74

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

query I rowsort
SELECT - 49 * 17 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to 6b82f5d653d7875d9aeb00479a712ece

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

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

skipif mysql # not compatible
query I rowsort label-114
SELECT + col1 + CAST ( ( + col2 ) * - col1 AS INTEGER ) FROM tab0 AS cor0
----
-2752
-7371
0

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-116
SELECT + CAST( - 8 AS SIGNED ) + - col1 AS col1 FROM tab0 AS cor0
----
-105
-94
-99

skipif mysql # not compatible
query I rowsort label-116
SELECT + CAST ( - 8 AS INTEGER ) + - col1 AS col1 FROM tab0 AS cor0
----
-105
-94
-99

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-118
SELECT DISTINCT + col1 DIV - 66 + + col2 FROM tab2 cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-118
SELECT DISTINCT + col1 / - 66 + + col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL - 19 * col2 AS col1 FROM tab1
----
-1026
-1083
-1824

query I rowsort
SELECT + col1 + - cor0.col1 + 39 FROM tab1 cor0
----
39
39
39

query I rowsort
SELECT + + col1 * - 56 FROM tab2 cor0
----
-1736
-3304
-952

query I rowsort
SELECT ( + tab0.col2 ) AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

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

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

query I rowsort
SELECT DISTINCT ( ( - col2 ) + 93 ) * col2 FROM tab1
----
-288
2052
2106

query I rowsort
SELECT 54 * + col1 + col1 * - col0 FROM tab1 AS cor0
----
-100
-338
1326

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

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

query I rowsort
SELECT 65 + - col2 FROM tab2 AS cor0
----
27
38
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-129
SELECT ALL + CAST( - 39 AS SIGNED ) + col0 FROM tab0 cor0
----
-15
-4
50

skipif mysql # not compatible
query I rowsort label-129
SELECT ALL + CAST ( - 39 AS INTEGER ) + col0 FROM tab0 cor0
----
-15
-4
50

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

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

skipif mysql # not compatible
query I rowsort label-131
SELECT DISTINCT - cor0.col0 / ( col0 * col1 ) AS col0 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col2 ) + col2 * + col0 col0 FROM tab1 AS cor0
----
108
3591
7584

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

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

query I rowsort
SELECT ALL - 58 * + col0 + - col1 + col1 AS col1 FROM tab0 AS cor0
----
-1392
-2030
-5162

query I rowsort
SELECT ALL - 58 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to de0811e670e75d2aeeb657e32bddb0c0

query I rowsort
SELECT ALL cor1.col2 * ( - 90 ) FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 2412f50893840271effaac76335fcb57

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

query I rowsort
SELECT col0 * - col2 + col0 * 54 * - col1 FROM tab0 AS cor0
----
-112248
-183365
-444644

query I rowsort
SELECT - + 34 - col1 FROM tab0 AS cor0
----
-120
-125
-131

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

query I rowsort
SELECT ALL - ( col1 ) + ( + 7 ) * - col1 FROM tab0 cor0
----
-688
-728
-776

query I rowsort
SELECT - col0 - + col2 * col1 * col0 AS col2 FROM tab0 AS cor0
----
-3430
-664207
-68136

query I rowsort
SELECT - 50 + col2 + + ( cor0.col0 ) FROM tab0 AS cor0
----
-14
121
7

query I rowsort
SELECT + 13 + cor0.col2 FROM tab2 AS cor0
----
39
40
51

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

query I rowsort
SELECT ALL - ( col2 ) * + 35 - + ( - col0 ) FROM tab0 AS cor0
----
-1131
-2781
0

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

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

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

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

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

query I rowsort
SELECT + col1 * - 57 + cor0.col2 AS col0 FROM tab2 AS cor0
----
-1740
-3337
-931

query I rowsort
SELECT DISTINCT col0 * 16 + - 37 FROM tab0 cor0
----
1387
347
523

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + 83 col2 FROM tab1 AS cor0
----
57
70
73

query I rowsort
SELECT DISTINCT 59 - col1 AS col2 FROM tab1
----
33
46
49

query I rowsort
SELECT - 7 * + tab0.col1 AS col0 FROM tab0
----
-602
-637
-679

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

query I rowsort
SELECT ALL - 66 + cor0.col1 * col0 FROM tab0 AS cor0
----
1998
3329
8033

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

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

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

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

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

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

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

query I rowsort
SELECT - ( - 87 ) AS col0 FROM tab1 AS cor0
----
87
87
87

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * 29 col0 FROM tab1 cor0
----
1856
2320
87

query I rowsort
SELECT DISTINCT col0 * ( + 18 ) + + col1 AS col1 FROM tab1 AS cor0
----
1162
1453
80

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

query I rowsort
SELECT - 24 * + col2 - col0 AS col1 FROM tab0
----
-2057
-59
-816

query I rowsort
SELECT ALL + + col2 * 16 AS col0 FROM tab2 AS cor0
----
416
432
608

query I rowsort
SELECT + col2 + + 83 FROM tab1 cor0
----
137
140
179

query I rowsort
SELECT DISTINCT + col1 + col1 + + col2 * + col1 * col0 FROM tab2 cor0
----
119770
51068
5921

query I rowsort
SELECT DISTINCT + col2 - 71 FROM tab0 AS cor0
----
-38
-70
11

query I rowsort
SELECT - - 57 * 73 FROM tab2 AS cor0
----
4161
4161
4161

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

query I rowsort
SELECT 13 FROM tab2, tab2 cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + ( 86 ) + - col2 col2 FROM tab2
----
-1500
-2693
-5100

query I rowsort
SELECT + 50 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-184
SELECT ALL + 66 DIV col1 AS col2 FROM tab1 AS cor0
----
2
5
6

skipif mysql # not compatible
query I rowsort label-184
SELECT ALL + 66 / col1 AS col2 FROM tab1 AS cor0
----
2
5
6

query I rowsort
SELECT DISTINCT - - 71 AS col2 FROM tab1 cor0
----
71

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

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

query I rowsort
SELECT ALL 54 - 16 FROM tab0
----
38
38
38

query I rowsort
SELECT + 55 * col0 + col0 AS col2 FROM tab1
----
168
3584
4480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 88 * + col1 * - col1 - col1 * - col2 col1 FROM tab0
----
653686
736190
828089

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

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

query I rowsort
SELECT ALL 58 * col0 * col1 AS col1 FROM tab2 AS cor0
----
12586
266916
77894

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 + - 1 FROM tab0, tab0 AS cor0
----
0
32
81

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

skipif mysql # not compatible
query I rowsort label-197
SELECT ALL ( + col0 ) * CAST ( col2 + + col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT ALL 53 + - tab2.col2 + col0 AS col1 FROM tab2
----
105
33
94

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

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

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

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

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

query I rowsort
SELECT DISTINCT 83 AS col1 FROM tab1, tab1 AS cor0
----
83

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

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

query I rowsort
SELECT ALL - col1 + - 73 FROM tab0
----
-159
-164
-170

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

skipif mysql # not compatible
query I rowsort label-208
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - 12 AS col2 FROM tab1
----
NULL

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

query I rowsort
SELECT col1 * - 69 FROM tab1
----
-1794
-690
-897

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-213
SELECT DISTINCT + col0 + - col1 DIV + col1 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-213
SELECT DISTINCT + col0 + - col1 / + col1 FROM tab1 AS cor0
----
2
63
79

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

query I rowsort
SELECT DISTINCT 72 + - 99 * cor0.col2 * col1 FROM tab2 AS cor0
----
-151794
-63882
-82791

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 67 * col2 col1 FROM tab2 AS cor0
----
1742
1809
2546

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

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

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

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

query I rowsort
SELECT DISTINCT 34 AS col0 FROM tab1 AS cor0
----
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col2 + col1 col0 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT - 32 + col1 AS col1 FROM tab0 AS cor0
----
54
59
65

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-226
SELECT DISTINCT - col2 DIV col0 + col2 FROM tab2 cor0
----
24
26
38

skipif mysql # not compatible
query I rowsort label-226
SELECT DISTINCT - col2 / col0 + col2 FROM tab2 cor0
----
24
26
38

query I rowsort
SELECT DISTINCT col1 * + 36 - - col2 AS col2 FROM tab0
----
3129
3358
3493

query I rowsort
SELECT - col0 + 58 FROM tab1
----
-22
-6
55

query I rowsort
SELECT 3 * - col1 FROM tab1 AS cor0
----
-30
-39
-78

query I rowsort
SELECT - cor0.col0 + col1 * - col0 - + cor0.col0 FROM tab1 AS cor0
----
-1200
-768
-84

query I rowsort
SELECT + col0 + 66 FROM tab1 AS cor0
----
130
146
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-232
SELECT 23 * col2 + cor0.col1 DIV 71 AS col1 FROM tab1 AS cor0
----
1242
1311
2208

skipif mysql # not compatible
query I rowsort label-232
SELECT 23 * col2 + cor0.col1 / 71 AS col1 FROM tab1 AS cor0
----
1242
1311
2208

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-234
SELECT DISTINCT + 55 DIV col1 + + col1 - col2 * col2 * + ( col1 ) FROM tab1 AS cor0
----
-119791
-32475
-75788

skipif mysql # not compatible
query I rowsort label-234
SELECT DISTINCT + 55 / col1 + + col1 - col2 * col2 * + ( col1 ) FROM tab1 AS cor0
----
-119791
-32475
-75788

query I rowsort
SELECT DISTINCT + + col2 * + col2 * col0 + col1 FROM tab2 AS cor0
----
114093
5134
52787

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

query I rowsort
SELECT DISTINCT + 90 + - tab0.col0 * + col1 AS col1 FROM tab0
----
-1974
-3305
-8009

query I rowsort
SELECT DISTINCT ( col1 * + tab0.col0 ) FROM tab0
----
2064
3395
8099

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-240
SELECT - CAST( 20 AS SIGNED ) AS col2 FROM tab1
----
-20
-20
-20

skipif mysql # not compatible
query I rowsort label-240
SELECT - CAST ( 20 AS INTEGER ) AS col2 FROM tab1
----
-20
-20
-20

query I rowsort
SELECT + 96 * tab1.col1 AS col1 FROM tab1
----
1248
2496
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-242
SELECT DISTINCT - tab2.col2 DIV col1 AS col0 FROM tab2
----
-2
0

skipif mysql # not compatible
query I rowsort label-242
SELECT DISTINCT - tab2.col2 / col1 AS col0 FROM tab2
----
-2
0

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

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

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

query I rowsort
SELECT DISTINCT 61 * col2 FROM tab1
----
3294
3477
5856

query I rowsort
SELECT cor0.col2 * 38 FROM tab1 AS cor0
----
2052
2166
3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-247
SELECT col1 + ( + col1 ) DIV - col1 + + 77 AS col2 FROM tab0
----
162
167
173

skipif mysql # not compatible
query I rowsort label-247
SELECT col1 + ( + col1 ) / - col1 + + 77 AS col2 FROM tab0
----
162
167
173

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + col2 + 22 * - col0 col0 FROM tab1 cor0
----
1841
2850
7456

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

query I rowsort
SELECT + col2 + ( - 8 ) FROM tab1
----
46
49
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-251
SELECT ALL - tab2.col2 DIV - 76 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-251
SELECT ALL - tab2.col2 / - 76 FROM tab2
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-252
SELECT CAST( 19 AS SIGNED ) FROM tab2, tab2 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

skipif mysql # not compatible
query I rowsort label-252
SELECT CAST ( 19 AS INTEGER ) FROM tab2, tab2 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

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

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

query I rowsort
SELECT 95 * col2 + col0 - - col0 FROM tab2 AS cor0
----
2579
2626
3768

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-256
SELECT ALL - col1 + + 81 + col2 * CAST( + 48 * col1 AS SIGNED ) AS col0 FROM tab0
----
136219
358166
4640

skipif mysql # not compatible
query I rowsort label-256
SELECT ALL - col1 + + 81 + col2 * CAST ( + 48 * col1 AS INTEGER ) AS col0 FROM tab0
----
136219
358166
4640

onlyif mysql # use DIV operator for integer division
query I rowsort label-257
SELECT ALL + 85 DIV - tab1.col1 + col0 + - ( 42 ) * + col0 FROM tab1
----
-126
-2632
-3286

skipif mysql # not compatible
query I rowsort label-257
SELECT ALL + 85 / - tab1.col1 + col0 + - ( 42 ) * + col0 FROM tab1
----
-126
-2632
-3286

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

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

query I rowsort
SELECT DISTINCT - 20 + cor0.col1 AS col0 FROM tab0 AS cor0
----
66
71
77

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-263
SELECT - ( + col1 ) + - cor0.col1 DIV + col1 FROM tab0 AS cor0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-263
SELECT - ( + col1 ) + - cor0.col1 / + col1 FROM tab0 AS cor0
----
-87
-92
-98

query I rowsort
SELECT DISTINCT - col0 * 82 * + cor0.col0 FROM tab0 AS cor0
----
-100450
-47232
-649522

query I rowsort
SELECT + 30 + col2 * - col2 AS col2 FROM tab2 AS cor0
----
-1414
-646
-699

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

query I rowsort
SELECT 64 + 58 - - col2 * 8 AS col2 FROM tab2 AS cor0
----
330
338
426

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + - 55 col1 FROM tab0 AS cor0
----
-137
-56
-88

query I rowsort
SELECT DISTINCT 16 * 85 FROM tab1 AS cor0
----
1360

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-271
SELECT - cor0.col2 * - col2 + + cor0.col2 DIV - cor0.col2 + col1 FROM tab1 AS cor0
----
2941
3258
9228

skipif mysql # not compatible
query I rowsort label-271
SELECT - cor0.col2 * - col2 + + cor0.col2 / - cor0.col2 + col1 FROM tab1 AS cor0
----
2941
3258
9228

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

query I rowsort
SELECT + 67 + col1 AS col2 FROM tab1 cor0
----
77
80
93

query I rowsort
SELECT DISTINCT + 79 + + col0 * - col0 AS col2 FROM tab1 AS cor0
----
-4017
-6321
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-275
SELECT ALL 50 DIV col1 + col0 AS col2 FROM tab1 AS cor0
----
4
69
83

skipif mysql # not compatible
query I rowsort label-275
SELECT ALL 50 / col1 + col0 AS col2 FROM tab1 AS cor0
----
4
69
83

query I rowsort
SELECT ALL 16 * - cor0.col1 + + col0 AS col0 FROM tab0 AS cor0
----
-1352
-1367
-1517

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

query I rowsort
SELECT ALL - 41 + - col2 * + col0 AS col2 FROM tab2 AS cor0
----
-2069
-230
-3043

query I rowsort
SELECT DISTINCT col1 * 5 + col2 FROM tab0 AS cor0
----
463
486
537

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-281
SELECT ALL + col2 DIV ( col1 ) + - col1 * col2 FROM tab2 AS cor0
----
-1534
-644
-837

skipif mysql # not compatible
query I rowsort label-281
SELECT ALL + col2 / ( col1 ) + - col1 * col2 FROM tab2 AS cor0
----
-1534
-644
-837

query I rowsort
SELECT ALL + ( - ( cor0.col2 ) ) FROM tab1, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + + 41 col2 FROM tab2 AS cor0
----
100
58
72

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

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

query I rowsort
SELECT DISTINCT - col1 * + ( + col1 ) * - col0 + - col2 * 48 FROM tab2 cor0
----
21007
270270
5431

onlyif mysql # use DIV operator for integer division
query I rowsort label-287
SELECT ALL + + col2 DIV col1 + - 23 FROM tab0 AS cor0
----
-23
-23
-23

skipif mysql # not compatible
query I rowsort label-287
SELECT ALL + + col2 / col1 + - 23 FROM tab0 AS cor0
----
-23
-23
-23

query I rowsort
SELECT 49 * cor0.col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 760be3f29a9dd5baaac57a8231f74d90

query I rowsort
SELECT ALL 87 + - col2 + - ( - col2 * + cor0.col2 ) AS col1 FROM tab2 AS cor0
----
1493
737
789

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

query I rowsort
SELECT ALL - + 15 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 1172c9a62bdad7db0def9205c06ee1f2

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

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

query I rowsort
SELECT ALL - col0 * col0 + - col0 FROM tab2 AS cor0
----
-56
-6162
-6320

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

query I rowsort
SELECT - + col0 * + col0 - - col1 FROM tab2 AS cor0
----
-18
-6025
-6224

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

query I rowsort
SELECT DISTINCT - cor0.col2 - col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT ALL 72 * - col0 FROM tab2 AS cor0
----
-504
-5616
-5688

query I rowsort
SELECT + col2 + + col1 * 90 FROM tab0 AS cor0
----
7773
8272
8731

query I rowsort
SELECT ALL 53 * col0 + 3 * col1 AS col2 FROM tab1 AS cor0
----
237
3422
4279

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-302
SELECT ALL + 69 * col0 + CAST( + col0 AS SIGNED ) * - col0 AS col1 FROM tab2 AS cor0
----
-702
-790
434

skipif mysql # not compatible
query I rowsort label-302
SELECT ALL + 69 * col0 + CAST ( + col0 AS INTEGER ) * - col0 AS col1 FROM tab2 AS cor0
----
-702
-790
434

query I rowsort
SELECT col1 * col2 + 38 FROM tab2 AS cor0
----
1572
684
875

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col0 + 23 + - 75 FROM tab1 AS cor0
----
-43
4044
6348

query I rowsort
SELECT - - col2 * 39 AS col2 FROM tab1 AS cor0
----
2106
2223
3744

query I rowsort
SELECT ALL col2 * - col2 * + 93 + + col0 AS col2 FROM tab2 AS cor0
----
-134213
-62790
-67790

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

query I rowsort
SELECT - 14 FROM tab1, tab1 cor0, tab1 cor1
----
27 values hashing to c2bf0e2420d22cd58d7ee3b30827afcc

onlyif mysql # use DIV operator for integer division
query I rowsort label-309
SELECT DISTINCT col0 DIV + col1 + col0 AS col0 FROM tab1 AS cor0
----
3
70
86

skipif mysql # not compatible
query I rowsort label-309
SELECT DISTINCT col0 / + col1 + col0 AS col0 FROM tab1 AS cor0
----
3
70
86

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

query I rowsort
SELECT - ( col1 ) + col0 FROM tab0
----
-2
-62
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-312
SELECT ALL - CAST( 45 AS SIGNED ) + col1 FROM tab0 AS cor0
----
41
46
52

skipif mysql # not compatible
query I rowsort label-312
SELECT ALL - CAST ( 45 AS INTEGER ) + col1 FROM tab0 AS cor0
----
41
46
52

query I rowsort
SELECT col1 * 16 AS col0 FROM tab0 AS cor0
----
1376
1456
1552

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 ) col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT ( cor2.col0 ) FROM tab1, tab0 cor0, tab1 AS cor1, tab1 AS cor2
----
3
64
80

query I rowsort
SELECT 96 * col0 AS col1 FROM tab0
----
2304
3360
8544

query I rowsort
SELECT DISTINCT - 30 + col2 * col1 + - col0 FROM tab0 cor0
----
2784
32
7343

query I rowsort
SELECT ALL col0 - col2 * ( - col1 ) AS col0 FROM tab1 AS cor0
----
1328
1407
634

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-322
SELECT + 36 * + col2 + - col0 DIV - 60 FROM tab2 AS cor0
----
1369
937
972

skipif mysql # not compatible
query I rowsort label-322
SELECT + 36 * + col2 + - col0 / - 60 FROM tab2 AS cor0
----
1369
937
972

query I rowsort
SELECT DISTINCT - + 61 * + cor0.col1 + 34 * 22 AS col2 FROM tab1 AS cor0
----
-45
-838
138

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-327
SELECT ALL col2 DIV col2 - ( + 52 * col2 ) AS col2 FROM tab0 AS cor0
----
-1715
-4263
-51

skipif mysql # not compatible
query I rowsort label-327
SELECT ALL col2 / col2 - ( + 52 * col2 ) AS col2 FROM tab0 AS cor0
----
-1715
-4263
-51

query I rowsort
SELECT + ( + col1 ) + + 68 * col0 FROM tab1 AS cor0
----
230
4362
5453

query I rowsort
SELECT DISTINCT - 0 * 45 + col1 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-330
SELECT + 16 DIV + col2 + col2 * col1 + col2 AS col2 FROM tab0
----
114
2871
7544

skipif mysql # not compatible
query I rowsort label-330
SELECT + 16 / + col2 + col2 * col1 + col2 AS col2 FROM tab0
----
114
2871
7544

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

query I rowsort
SELECT + 54 + col0 AS col2 FROM tab0
----
143
78
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-333
SELECT DISTINCT - 92 DIV + col1 + + col1 FROM tab1
----
1
23
6

skipif mysql # not compatible
query I rowsort label-333
SELECT DISTINCT - 92 / + col1 + + col1 FROM tab1
----
1
23
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-334
SELECT CAST( col0 AS SIGNED ) + col2 + - col1 * 78 FROM tab1
----
-1971
-659
-838

skipif mysql # not compatible
query I rowsort label-334
SELECT CAST ( col0 AS INTEGER ) + col2 + - col1 * 78 FROM tab1
----
-1971
-659
-838

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + ( + tab0.col1 ) col2 FROM tab0
----
110
132
180

query I rowsort
SELECT + 95 * col1 FROM tab1 AS cor0
----
1235
2470
950

query I rowsort
SELECT + 36 * - cor0.col1 + + 29 * - col1 - - col1 * ( 39 ) FROM tab2 AS cor0
----
-1534
-442
-806

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

query I rowsort
SELECT ALL + ( - col0 ) * - col1 - 58 AS col1 FROM tab2
----
1285
159
4544

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

query I rowsort
SELECT 24 * col2 * 11 + 38 + - col1 FROM tab1
----
14268
15076
25369

query I rowsort
SELECT ALL - 72 * + col1 + + col2 FROM tab2
----
-1186
-2205
-4222

query I rowsort
SELECT DISTINCT + 32 + col1 AS col1 FROM tab2
----
49
63
91

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

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

query I rowsort
SELECT ALL + 59 * - cor0.col1 FROM tab0 AS cor0
----
-5074
-5369
-5723

onlyif mysql # use DIV operator for integer division
query I rowsort label-346
SELECT ALL - 61 DIV col1 AS col1 FROM tab1 AS cor0
----
-2
-4
-6

skipif mysql # not compatible
query I rowsort label-346
SELECT ALL - 61 / col1 AS col1 FROM tab1 AS cor0
----
-2
-4
-6

query I rowsort
SELECT DISTINCT - - 69 AS col0 FROM tab0 cor0
----
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-348
SELECT 15 DIV col0 - - 3 * col2 FROM tab2 cor0
----
114
78
83

skipif mysql # not compatible
query I rowsort label-348
SELECT 15 / col0 - - 3 * col2 FROM tab2 cor0
----
114
78
83

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

query I rowsort
SELECT - cor0.col2 * - 80 AS col2 FROM tab2 AS cor0
----
2080
2160
3040

query I rowsort
SELECT DISTINCT - tab0.col2 FROM tab0, tab1 cor0, tab0 AS cor1
----
-1
-33
-82

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

query I rowsort
SELECT 13 + + 51 * - col2 AS col0 FROM tab0 AS cor0
----
-1670
-38
-4169

query I rowsort
SELECT DISTINCT - 18 + - col1 AS col2 FROM tab2 AS cor0
----
-35
-49
-77

query I rowsort
SELECT ALL tab2.col1 * + 5 AS col2 FROM tab2
----
155
295
85

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

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

query I rowsort
SELECT - 81 * - 49 FROM tab0 AS cor0
----
3969
3969
3969

query I rowsort
SELECT + ( 1 ) + col1 * + cor0.col1 FROM tab2 AS cor0
----
290
3482
962

query I rowsort
SELECT col2 * 68 AS col0 FROM tab0 AS cor0
----
2244
5576
68

query I rowsort
SELECT - col1 * + 79 FROM tab2 AS cor0
----
-1343
-2449
-4661

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

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

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

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

query I rowsort
SELECT DISTINCT + - col1 * 37 AS col1 FROM tab0 AS cor0
----
-3182
-3367
-3589

query I rowsort
SELECT - 31 + col1 * col0 FROM tab2 AS cor0
----
1312
186
4571

query I rowsort
SELECT ALL + ( 40 ) * + cor0.col1 FROM tab1 AS cor0
----
1040
400
520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col2 * tab1.col2 + + tab1.col0 col1 FROM tab1
----
2893
3303
9283

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

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

skipif mysql # not compatible
query I rowsort label-368
SELECT ALL + col2 / - col1 FROM tab2
----
-2
0
0

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

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

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

query III rowsort
SELECT * FROM tab2 cor0 WHERE - col2 * - col1 + col2 + - col1 > ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-372
SELECT DISTINCT col0 DIV tab0.col2 - col2 AS col2 FROM tab0
----
-33
-81
34

skipif mysql # not compatible
query I rowsort label-372
SELECT DISTINCT col0 / tab0.col2 - col2 AS col2 FROM tab0
----
-33
-81
34

query III rowsort
SELECT * FROM tab0 WHERE ( NULL ) <> ( + tab0.col0 / + col1 + col2 * - col0 )
----

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

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

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

query I rowsort
SELECT ALL + col2 * + col2 + col0 * - col1 AS col2 FROM tab2
----
-3926
101
512

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

query I rowsort
SELECT col2 * col0 * - col0 FROM tab0
----
-1225
-19008
-649522

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

query I rowsort
SELECT DISTINCT + col2 * + tab0.col0 + - col2 * col1 FROM tab0
----
-164
-2046
-62

query I rowsort
SELECT ALL col1 * - col0 AS col0 FROM tab2 WHERE col1 BETWEEN NULL AND NULL
----

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

query I rowsort
SELECT ALL col0 FROM tab2 WHERE NOT - col1 BETWEEN ( col2 / col1 ) AND NULL
----
7
78
79

query III rowsort
SELECT * FROM tab0 WHERE col0 BETWEEN NULL AND ( NULL )
----

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - col0 col2 FROM tab2
----
-49
-6084
-6241

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1, tab0 AS cor0 WHERE NOT NULL = NULL
----

query I rowsort
SELECT col0 AS col1 FROM tab2 AS cor0 WHERE NOT - col1 IN ( col0 * col1 )
----
7
78
79

query I rowsort
SELECT ALL cor0.col0 + col2 - col0 * col0 AS col0 FROM tab1 cor0
----
-3975
-6224
48

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab0 WHERE NULL BETWEEN + col2 AND NULL
----

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * ( 59 ) * - col0 col0 FROM tab0 AS cor0
----
-2065
-430582
-46728

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

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

query I rowsort
SELECT DISTINCT - col2 + col2 * col0 FROM tab2 cor0
----
162
2002
2964

query I rowsort
SELECT ALL - col1 * + 97 AS col2 FROM tab0 cor0
----
-8342
-8827
-9409

query I rowsort
SELECT DISTINCT - col0 * + 55 AS col2 FROM tab2 AS cor0
----
-385
-4290
-4345

query I rowsort
SELECT ALL - + col2 + 12 * 26 AS col0 FROM tab1 AS cor0
----
216
255
258

query I rowsort
SELECT ALL col1 * ( + 88 ) FROM tab0 AS cor0
----
7568
8008
8536

query I rowsort
SELECT ALL col0 * tab0.col2 + + ( 34 + - col1 ) FROM tab0
----
-28
7241
740

query I rowsort
SELECT + tab2.col0 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL 86 + - col0 * - col1 FROM tab2
----
1429
303
4688

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

query I rowsort
SELECT - col0 * col0 * + 35 + + col1 FROM tab0
----
-20074
-277144
-42778

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

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

query I rowsort
SELECT ALL + + col1 * 56 AS col0 FROM tab2 cor0
----
1736
3304
952

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col0 col0 FROM tab2
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-416
SELECT DISTINCT + col0 + col0 DIV - col0 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-416
SELECT DISTINCT + col0 + col0 / - col0 FROM tab1
----
2
63
79

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

query I rowsort
SELECT - col2 - col0 * - col2 AS col0 FROM tab1
----
108
3591
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-419
SELECT ALL - col2 DIV + tab0.col2 + + col0 - col1 * + col1 AS col1 FROM tab0
----
-7373
-8193
-9375

skipif mysql # not compatible
query I rowsort label-419
SELECT ALL - col2 / + tab0.col2 + + col0 - col1 * + col1 AS col1 FROM tab0
----
-7373
-8193
-9375

onlyif mysql # use DIV operator for integer division
query I rowsort label-420
SELECT + col1 * col0 + + tab0.col2 DIV - col0 col0 FROM tab0
----
2063
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-420
SELECT + col1 * col0 + + tab0.col2 / - col0 col0 FROM tab0
----
2063
3395
8099

query I rowsort
SELECT DISTINCT - tab2.col2 + col1 + col0 FROM tab2
----
11
111
58

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

query I rowsort
SELECT + col1 FROM tab1 WHERE col1 + col2 <> - col2 + col0
----
10
13
26

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

query I rowsort
SELECT ALL col0 * tab0.col1 * + col0 FROM tab0
----
118825
49536
720811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - tab1.col1 + col1 col1 FROM tab1
----
110
182
702

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

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

query I rowsort
SELECT + 73 * - col0 FROM tab0 AS cor0
----
-1752
-2555
-6497

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 13 + 62 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

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

query I rowsort
SELECT DISTINCT - col2 * + col2 * 68 + + cor0.col1 + - col1 * - ( 68 ) AS col0 FROM tab2 cor0
----
-41897
-47433
-97019

query I rowsort
SELECT + + col0 * col1 + - 41 + - col0 AS col0 FROM tab0 cor0
----
1999
3319
7969

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1 WHERE ( - col0 ) IN ( col2 )
----

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

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

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

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

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

query I rowsort
SELECT - + 54 * col2 + - col1 FROM tab0 AS cor0
----
-151
-1868
-4519

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

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

query I rowsort
SELECT DISTINCT - col0 + + 45 * col0 AS col2 FROM tab2
----
308
3432
3476

query I rowsort
SELECT col0 + + 48 FROM tab0
----
137
72
83

query I rowsort
SELECT ALL + tab0.col1 * + col1 * + col0 + tab0.col2 AS col1 FROM tab0
----
177537
329316
737091

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col1 col0 FROM tab1
----
20
26
52

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

query I rowsort
SELECT ALL - col2 * col2 * col0 FROM tab1
----
-207936
-737280
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-447
SELECT DISTINCT col1 DIV 3 AS col2 FROM tab2
----
10
19
5

skipif mysql # not compatible
query I rowsort label-447
SELECT DISTINCT col1 / 3 AS col2 FROM tab2
----
10
19
5

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * - 24 col2 FROM tab0 AS cor0
----
-2136
-576
-840

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

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

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

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

query I rowsort
SELECT ALL ( 62 ) + - col1 * col0 FROM tab1 AS cor0
----
-16
-578
-978

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 25 * + col0 * col1 + + col0 * col1 - + col2 col1 FROM tab2 AS cor0
----
119626
34880
5615

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

query I rowsort
SELECT ALL 78 - - 11 FROM tab1 AS cor0
----
89
89
89

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

skipif mysql # not compatible
query I rowsort label-457
SELECT - - ( + col2 ) / + col0 + - col2 FROM tab0 cor0
----
-1
-32
-82

query I rowsort
SELECT - - 29 * + col1 AS col1 FROM tab0 AS cor0
----
2494
2639
2813

query I rowsort
SELECT ALL + 34 * col2 + - col0 * + col0 FROM tab2 AS cor0
----
-4949
-5200
869

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-460
SELECT - - col0 / + col2 col2 FROM tab0 AS cor0
----
0
1
35

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

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

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

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

query I rowsort
SELECT DISTINCT col1 + + 82 * + col2 + - col0 AS col0 FROM tab0 AS cor0
----
144
2768
6726

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

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

query I rowsort
SELECT ALL col1 * + cor0.col1 - + col1 AS col2 FROM tab1 AS cor0
----
156
650
90

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

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

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

query I rowsort
SELECT + + col2 + - 74 AS col2 FROM tab2 AS cor0
----
-36
-47
-48

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

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

query I rowsort
SELECT - col1 * col2 + - 92 AS col0 FROM tab2 AS cor0
----
-1626
-738
-929

query I rowsort
SELECT - cor0.col0 + cor0.col1 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 023677f2362ebf8bd60cb629f4090df4

query I rowsort
SELECT ALL - 43 * - col2 * ( - 93 ) AS col1 FROM tab1 cor0
----
-215946
-227943
-383904

query I rowsort
SELECT ALL + 95 * + col1 + + ( + col0 + cor0.col2 ) FROM tab1 cor0
----
1071
1411
2527

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 ALL - + 81 * col1 FROM tab2 AS cor0
----
-1377
-2511
-4779

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 96 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query I rowsort
SELECT - + col2 * col1 + 54 AS col0 FROM tab1 AS cor0
----
-1194
-1350
-516

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

query I rowsort
SELECT ALL + 52 AS col1 FROM tab2
----
52
52
52

query I rowsort
SELECT ALL - 96 AS col0 FROM tab1
----
-96
-96
-96

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

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

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

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

query I rowsort
SELECT ALL - - col0 * + col0 + 21 AS col2 FROM tab0 AS cor0
----
1246
597
7942

query I rowsort
SELECT DISTINCT 28 AS col0 FROM tab0 AS cor0
----
28

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

query I rowsort
SELECT DISTINCT col0 * + col2 + + 75 AS col1 FROM tab1
----
237
3723
7755

onlyif mysql # use DIV operator for integer division
query I rowsort label-493
SELECT DISTINCT col2 + 51 DIV - col0 FROM tab2
----
20
26
38

skipif mysql # not compatible
query I rowsort label-493
SELECT DISTINCT col2 + 51 / - col0 FROM tab2
----
20
26
38

query I rowsort
SELECT + tab2.col0 * 41 FROM tab2
----
287
3198
3239

query I rowsort
SELECT - col1 + ( + 58 ) AS col0 FROM tab2 AS cor0
----
-1
27
41

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

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

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

query I rowsort
SELECT col1 * + 87 + col0 FROM tab0 AS cor0
----
7506
8006
8474

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 + - cor0.col1 + - col0 col0 FROM tab0 cor0
----
-105
-153
-83

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

skipif mysql # not compatible
query I rowsort label-501
SELECT - CAST ( + col1 AS INTEGER ) + cor0.col2 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

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

query I rowsort
SELECT - - cor0.col2 * - 4 AS col2 FROM tab0 AS cor0
----
-132
-328
-4

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

query I rowsort
SELECT DISTINCT 65 AS col1 FROM tab2 cor0
----
65

query I rowsort
SELECT DISTINCT - col1 * - 86 FROM tab0 AS cor0
----
7396
7826
8342

query I rowsort
SELECT DISTINCT cor0.col1 + col0 * col0 * 52 AS col0 FROM tab2 AS cor0
----
2579
316427
324549

query I rowsort
SELECT - 50 * col1 AS col0 FROM tab1 AS cor0
----
-1300
-500
-650

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-510
SELECT ALL - 54 + col1 DIV + col0 FROM tab2 AS cor0
----
-50
-54
-54

skipif mysql # not compatible
query I rowsort label-510
SELECT ALL - 54 + col1 / + col0 FROM tab2 AS cor0
----
-50
-54
-54

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

query I rowsort
SELECT ALL - cor0.col1 * + 60 FROM tab0 AS cor0
----
-5160
-5460
-5820

query I rowsort
SELECT ALL - 29 * - col1 + + col1 AS col2 FROM tab1 AS cor0
----
300
390
780

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

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

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

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

query I rowsort
SELECT DISTINCT - ( + col0 ) + 69 AS col0 FROM tab1 AS cor0
----
-11
5
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-519
SELECT ALL + col0 * col1 DIV - col2 + 35 AS col1 FROM tab0 AS cor0
----
-27
-3360
-63

skipif mysql # not compatible
query I rowsort label-519
SELECT ALL + col0 * col1 / - col2 + 35 AS col1 FROM tab0 AS cor0
----
-27
-3360
-63

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

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

query I rowsort
SELECT ALL - col2 + + 22 FROM tab0
----
-11
-60
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col1 ) * + col0 * + col1 col2 FROM tab2 AS cor0
----
22831
271518
6727

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

query I rowsort
SELECT ALL - 69 * col1 + + col2 FROM tab0 AS cor0
----
-5901
-6197
-6692

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

skipif mysql # not compatible
query I rowsort label-526
SELECT ALL cor0.col2 / col1 FROM tab0 cor0
----
0
0
0

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

query I rowsort
SELECT 37 * col2 * col1 + col1 FROM tab2
----
23919
31000
56817

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

query I rowsort
SELECT DISTINCT col1 * 55 + + col0 * col1 AS col1 FROM tab1
----
1190
1508
1755

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * ( 67 ) + col2 * - ( ( col1 ) * + col2 ) col0 FROM tab0 AS cor0
----
-605921
-92046
2248

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

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

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

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

query I rowsort
SELECT DISTINCT + ( - tab1.col2 + col2 ) * + col2 AS col2 FROM tab1
----
0

query I rowsort
SELECT - ( col1 + col1 ) * 80 * + tab1.col2 AS col0 FROM tab1
----
-199680
-224640
-91200

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

query I rowsort
SELECT ALL 37 * tab0.col0 * - tab0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 975bfd72ee5177aef906ba373b13f9c8

query I rowsort
SELECT ALL - col0 * col2 * - col0 + - col0 AS col1 FROM tab1
----
233408
483
614320

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

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

query I rowsort
SELECT ALL tab2.col0 + - ( + 5 ) AS col2 FROM tab2
----
2
73
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 7 + + col0 * + col2 col1 FROM tab1 AS cor0
----
169
3655
7687

query I rowsort
SELECT ALL 22 + col1 * - 49 FROM tab2 AS cor0
----
-1497
-2869
-811

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

query I rowsort
SELECT DISTINCT 71 * - col0 AS col2 FROM tab1 cor0
----
-213
-4544
-5680

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

query I rowsort
SELECT ALL + 64 * + col0 AS col1 FROM tab2 AS cor0
----
448
4992
5056

query I rowsort
SELECT DISTINCT col2 * + cor0.col1 * + ( 70 * + col2 ) AS col1 FROM tab0 AS cor0
----
42831880
6555780
6790

query I rowsort
SELECT 30 * col2 FROM tab1 AS cor0
----
1620
1710
2880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 * + col0 col0 FROM tab0 AS cor0
----
-1157
-312
-455

query I rowsort
SELECT + 74 + - 83 AS col1 FROM tab2
----
-9
-9
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-556
SELECT col0 DIV col1 + - col0 AS col1 FROM tab1
----
-3
-58
-74

skipif mysql # not compatible
query I rowsort label-556
SELECT col0 / col1 + - col0 AS col1 FROM tab1
----
-3
-58
-74

query I rowsort
SELECT ALL col1 * col1 * - col2 + col2 AS col0 FROM tab2
----
-10944
-25920
-90480

query I rowsort
SELECT col0 + 2 AS col0 FROM tab2 AS cor0
----
80
81
9

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

query I rowsort
SELECT ALL - 84 + - cor0.col0 * ( - 5 ) * col0 FROM tab1 AS cor0
----
-39
20396
31916

query I rowsort
SELECT DISTINCT - 94 * - col2 + 41 FROM tab1 cor0
----
5117
5399
9065

query I rowsort
SELECT 50 * col0 AS col0 FROM tab2 AS cor0
----
350
3900
3950

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

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

query I rowsort
SELECT ALL - col1 * + 54 + col2 * - col2 + - col1 * 26 AS col0 FROM tab0
----
-14004
-7761
-7969

query I rowsort
SELECT ALL + col1 + 98 FROM tab0
----
184
189
195

onlyif mysql # use DIV operator for integer division
query I rowsort label-566
SELECT DISTINCT 30 DIV 43 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-566
SELECT DISTINCT 30 / 43 FROM tab1
----
0

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-568
SELECT DISTINCT + col1 * - col1 + + cor0.col2 DIV 82 FROM tab0 AS cor0
----
-7396
-8280
-9409

skipif mysql # not compatible
query I rowsort label-568
SELECT DISTINCT + col1 * - col1 + + cor0.col2 / 82 FROM tab0 AS cor0
----
-7396
-8280
-9409

query I rowsort
SELECT 66 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 897b6122ac98340b78905f39d81897fc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 38 * - col1 col2 FROM tab1
----
-380
-494
-988

query I rowsort
SELECT - 75 FROM tab0, tab2 AS cor0
----
9 values hashing to 258bc565c64924d905a55eaaa6e57547

query I rowsort
SELECT + 62 * - 13 FROM tab1 AS cor0
----
-806
-806
-806

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-574
SELECT DISTINCT - 98 + - col1 DIV + col1 AS col2 FROM tab2 AS cor0
----
-99

skipif mysql # not compatible
query I rowsort label-574
SELECT DISTINCT - 98 + - col1 / + col1 AS col2 FROM tab2 AS cor0
----
-99

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

query I rowsort
SELECT ALL + + col0 * + 18 FROM tab1 cor0
----
1152
1440
54

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

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

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

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

query I rowsort
SELECT + col0 + - 92 AS col1 FROM tab0 AS cor0
----
-3
-57
-68

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

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

query I rowsort
SELECT DISTINCT - 0 * cor0.col0 AS col0 FROM tab1, tab2 AS cor0
----
0

query I rowsort
SELECT + - 39 + + 1 + col2 FROM tab2 AS cor0
----
-11
-12
0

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

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

query I rowsort
SELECT - 59 + + cor0.col2 FROM tab2 AS cor0
----
-21
-32
-33

query I rowsort
SELECT DISTINCT + + col1 * col0 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
1027
52
630

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-590
SELECT ALL CAST( + tab1.col0 AS SIGNED ) AS col1 FROM tab1, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

skipif mysql # not compatible
query I rowsort label-590
SELECT ALL CAST ( + tab1.col0 AS INTEGER ) AS col1 FROM tab1, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT - cor1.col2 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - col0 * + col0 - - col1 FROM tab2 AS cor0
----
-18
-6025
-6224

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

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

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

query I rowsort
SELECT DISTINCT - tab1.col0 + - col0 + - 48 FROM tab1
----
-176
-208
-54

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

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

query I rowsort
SELECT ALL 77 AS col0 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

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

query I rowsort
SELECT tab0.col1 * 58 FROM tab0
----
4988
5278
5626

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

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

query I rowsort
SELECT - 61 FROM tab0, tab1 AS cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT - col0 * + 8 + - 97 FROM tab0 AS cor0
----
-289
-377
-809

skipif mysql # not compatible
query I rowsort
SELECT ALL - col1 + - CAST ( - col2 AS REAL ) * col1 FROM tab2 cor0
----
1475
629
806

query I rowsort
SELECT col0 + + 42 * col0 AS col0 FROM tab2 AS cor0
----
301
3354
3397

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

query I rowsort
SELECT col2 - col2 * col2 FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT - col0 - 27 * col2 * + col1 FROM tab2
----
-17521
-22606
-41496

query I rowsort
SELECT cor0.col0 * 23 AS col0 FROM tab1 AS cor0
----
1472
1840
69

query I rowsort
SELECT 44 * + 32 FROM tab0
----
1408
1408
1408

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0, tab2 AS cor0, tab0 cor1
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT DISTINCT ( 63 ) FROM tab1
----
63

query I rowsort
SELECT ( + col2 ) + col2 AS col1 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT ALL 80 * 31 FROM tab1
----
2480
2480
2480

query I rowsort
SELECT + - col2 * col2 + 48 AS col0 FROM tab2 AS cor0
----
-1396
-628
-681

query I rowsort
SELECT - cor0.col1 * col2 + 72 AS col2 FROM tab1 AS cor0
----
-1176
-1332
-498

query I rowsort
SELECT ALL + 94 + + col0 FROM tab0
----
118
129
183

query I rowsort
SELECT 56 * col2 + + col0 * 62 FROM tab1 AS cor0
----
10336
3210
7160

onlyif mysql # use DIV operator for integer division
query I rowsort label-620
SELECT - cor0.col0 + cor0.col2 DIV col0 FROM tab0 AS cor0
----
-23
-35
-89

skipif mysql # not compatible
query I rowsort label-620
SELECT - cor0.col0 + cor0.col2 / col0 FROM tab0 AS cor0
----
-23
-35
-89

query I rowsort
SELECT - col0 * - col0 + + 99 AS col2 FROM tab0 cor0
----
1324
675
8020

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-625
SELECT + ( - tab2.col0 ) * + CAST ( - 12 AS INTEGER ) + + col2 FROM tab2
----
111
962
986

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

query I rowsort
SELECT 40 AS col1 FROM tab1, tab0, tab2 cor0
----
27 values hashing to e4d10f7d6c34a281f524e45e82ebd2a0

query I rowsort
SELECT ( - col0 + 83 * col1 ) AS col0 FROM tab1
----
2155
766
999

query I rowsort
SELECT 28 * - col0 - - col1 FROM tab1 cor0
----
-1782
-2227
-58

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

query I rowsort
SELECT 30 * col0 - col2 FROM tab2 AS cor0
----
183
2314
2332

query I rowsort
SELECT DISTINCT + 81 + col2 FROM tab1 AS cor0
----
135
138
177

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * - col1 + ( col1 ) * col0 col0 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT - col2 + - col1 - 64 AS col2 FROM tab2 AS cor0
----
-119
-122
-149

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

skipif mysql # not compatible
query I rowsort label-635
SELECT ALL + col0 * + CAST ( 10 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
240
350
890

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

query I rowsort
SELECT DISTINCT col2 * 5 AS col0 FROM tab2 AS cor0
----
130
135
190

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

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

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

query I rowsort
SELECT DISTINCT - col1 * - 19 AS col2 FROM tab2 cor0
----
1121
323
589

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

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

query I rowsort
SELECT ALL col0 * - cor0.col2 + + col2 + col0 AS col2 FROM tab2 AS cor0
----
-155
-1924
-2885

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

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

query I rowsort
SELECT DISTINCT - - col1 + - 23 AS col2 FROM tab2 AS cor0
----
-6
36
8

query I rowsort
SELECT col2 * 39 * + 32 + + col0 FROM tab0 AS cor0
----
102425
1283
41208

query I rowsort
SELECT ALL - + cor0.col1 + 6 AS col2 FROM tab2 cor0
----
-11
-25
-53

query I rowsort
SELECT - col1 * - col1 - col2 * col0 FROM tab1 AS cor0
----
-3548
-7511
514

query I rowsort
SELECT - + col1 * - 47 FROM tab0 AS cor0
----
4042
4277
4559

query I rowsort
SELECT col2 * 3 * - col0 FROM tab2 cor0
----
-567
-6084
-9006

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 + col1 * + col2 col2 FROM tab2 AS cor0
----
1533
645
836

query I rowsort
SELECT col0 * - 69 FROM tab2 AS cor0
----
-483
-5382
-5451

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

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

query I rowsort
SELECT ALL - 1 + - col0 - col0 * ( + 95 ) FROM tab2 AS cor0
----
-673
-7489
-7585

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col1 ) + col0 col2 FROM tab0 AS cor0
----
110
132
180

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

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

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

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

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

query I rowsort
SELECT ALL - 96 + col1 AS col0 FROM tab2 AS cor0
----
-37
-65
-79

query I rowsort
SELECT + col2 * 68 AS col0 FROM tab1
----
3672
3876
6528

query I rowsort
SELECT - 29 FROM tab2, tab1 AS cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

query I rowsort
SELECT DISTINCT - cor1.col1 + - 21 * + 94 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-1991
-2005
-2033

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

skipif mysql # not compatible
query I rowsort label-668
SELECT ALL ( - col0 ) / col0 AS col0 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT ALL - - col1 + + 19 AS col1 FROM tab0 AS cor0
----
105
110
116

query I rowsort
SELECT DISTINCT + + col0 * col2 * + col0 FROM tab0 cor0
----
1225
19008
649522

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

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

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

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

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

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

query I rowsort
SELECT ALL - 90 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
-2970
-7380
-90

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

query I rowsort
SELECT tab1.col1 + - 20 * col2 FROM tab1
----
-1054
-1130
-1907

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

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

query I rowsort
SELECT col1 * col2 + - 35 AS col1 FROM tab2 AS cor0
----
1499
611
802

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

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

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

query I rowsort
SELECT ALL - + col1 + col0 * - 56 FROM tab0 AS cor0
----
-1430
-2057
-5075

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-685
SELECT + col0 * col2 + col1 DIV col0 col2 FROM tab1 AS cor0
----
170
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-685
SELECT + col0 * col2 + col1 / col0 col2 FROM tab1 AS cor0
----
170
3648
7680

query I rowsort
SELECT ALL - col0 * 17 FROM tab1 cor0
----
-1088
-1360
-51

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

query I rowsort
SELECT DISTINCT - + col2 + 87 AS col0 FROM tab2 AS cor0
----
49
60
61

query I rowsort
SELECT ALL + col0 * - cor0.col2 + col0 + col1 FROM tab2 AS cor0
----
-151
-1891
-2906

query I rowsort
SELECT col0 + ( - col1 ) * col0 * + 2 FROM tab0 AS cor0
----
-16109
-4104
-6755

query I rowsort
SELECT ALL + 77 - + tab2.col0 AS col0 FROM tab2
----
-1
-2
70

query I rowsort
SELECT ALL + 5 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 6797d40099023779b89feb627d94a3e7

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

query I rowsort
SELECT - col1 * + ( ( col0 ) ) + col2 + col1 AS col2 FROM tab0 AS cor0
----
-1945
-3297
-7926

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

skipif mysql # not compatible
query I rowsort label-695
SELECT col1 / col0 - - col2 FROM tab2 AS cor0
----
26
31
38

query I rowsort
SELECT ALL 15 FROM tab2, tab2 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col1 + - 26 * col2 + - col0 col1 FROM tab0
----
-2130
-796
36

query I rowsort
SELECT - - 74 * - col0 * - col2 + - col0 AS col0 FROM tab1 AS cor0
----
11985
269888
568240

query I rowsort
SELECT - 66 + 19 FROM tab2 AS cor0
----
-47
-47
-47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-701
SELECT + - CAST( col0 AS SIGNED ) + col1 * 29 AS col0 FROM tab2 AS cor0
----
1633
414
892

skipif mysql # not compatible
query I rowsort label-701
SELECT + - CAST ( col0 AS INTEGER ) + col1 * 29 AS col0 FROM tab2 AS cor0
----
1633
414
892

onlyif mysql # use DIV operator for integer division
query I rowsort label-702
SELECT cor0.col1 DIV - 56 + + cor0.col2 * - col0 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-702
SELECT cor0.col1 / - 56 + + cor0.col2 * - col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-703
SELECT + 97 + 92 DIV col1 AS col1 FROM tab2 AS cor0
----
102
98
99

skipif mysql # not compatible
query I rowsort label-703
SELECT + 97 + 92 / col1 AS col1 FROM tab2 AS cor0
----
102
98
99

query I rowsort
SELECT + 27 FROM tab1, tab0, tab2 cor0, tab2
----
81 values hashing to 092918b9163061e291041d594b1a402a

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

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

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

query I rowsort
SELECT + ( + 99 ) FROM tab2
----
99
99
99

query I rowsort
SELECT + ( 49 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

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

query I rowsort
SELECT ALL - col0 * tab2.col1 AS col0 FROM tab2
----
-1343
-217
-4602

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

query I rowsort
SELECT - col0 * - col1 * + col0 + + col1 AS col0 FROM tab1 AS cor0
----
260
40970
83213

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

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

query I rowsort
SELECT - - col0 * col2 * col0 - col0 AS col2 FROM tab1 AS cor0
----
233408
483
614320

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-719
SELECT - + col1 + - col1 / col0 col1 FROM tab0 AS cor0
----
-89
-92
-99

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

query I rowsort
SELECT DISTINCT - - col1 * cor0.col1 + - col1 * - cor0.col2 AS col0 FROM tab0 cor0
----
10234
15743
9506

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

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND col2
----

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2, tab0 cor0
----
1
33
82

query I rowsort
SELECT DISTINCT 1 AS col1 FROM tab0
----
1

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

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

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

query I rowsort
SELECT col2 * - col0 + - col0 * + col1 AS col0 FROM tab1
----
-240
-4288
-8720

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

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

query I rowsort
SELECT col0 + col0 - + col1 FROM tab0
----
-27
-38
87

query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 - 40 FROM tab1 cor0
----
-140
-209
-716

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

query I rowsort
SELECT ALL 61 * col2 AS col0 FROM tab1 AS cor0
----
3294
3477
5856

onlyif mysql # use DIV operator for integer division
query I rowsort label-738
SELECT DISTINCT - col2 + + tab1.col1 DIV + col0 AS col2 FROM tab1
----
-46
-57
-96

skipif mysql # not compatible
query I rowsort label-738
SELECT DISTINCT - col2 + + tab1.col1 / + col0 AS col2 FROM tab1
----
-46
-57
-96

query I rowsort
SELECT ALL col1 * col0 AS col1 FROM tab2 WHERE NOT NULL < col0
----

query I rowsort
SELECT + col2 FROM tab1 WHERE + col2 * col2 NOT BETWEEN col2 * col1 + col0 AND col0
----
54
57
96

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

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

query I rowsort
SELECT col0 * col0 FROM tab1 WHERE NULL <= col2
----

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

query I rowsort
SELECT + col0 + col1 * col1 + col1 * - col2 FROM tab2
----
-278
131
2025

query III rowsort
SELECT ALL * FROM tab0 WHERE ( NULL ) <= - col2 + col2
----

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

query I rowsort
SELECT 63 + col0 AS col0 FROM tab0
----
152
87
98

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col0 * + col2 col2 FROM tab1
----
-108
-3591
-7584

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

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

query I rowsort
SELECT col2 * + col2 + + col0 AS col1 FROM tab0
----
1113
36
6813

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

query I rowsort
SELECT tab1.col2 + + col1 * col2 + col2 FROM tab1
----
1440
1512
684

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-764
SELECT DISTINCT - col1 + + col2 / - col0 AS col2 FROM tab2
----
-17
-34
-59

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

query I rowsort
SELECT DISTINCT + col2 - col1 * + col1 AS col2 FROM tab2
----
-251
-3455
-934

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

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

query I rowsort
SELECT + col1 FROM tab1 WHERE NOT + col0 <> NULL
----

query I rowsort
SELECT + col2 FROM tab2 WHERE ( - col0 * col2 ) NOT IN ( - col0 )
----
26
27
38

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL <= + col1 / + col1
----

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

query I rowsort
SELECT ALL col2 FROM tab2 WHERE NOT NULL <= - tab2.col2 + col2 * col0 + col1 / - col2
----

query I rowsort
SELECT - col1 FROM tab2 WHERE - col2 * - col1 NOT IN ( col2 * col0 + col2 - col2 )
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - 42 * - col1 * ( + col1 ) + col0 AS col2 FROM tab1
----
28395
4264
7178

query I rowsort
SELECT DISTINCT + col1 + col0 * + col2 * ( - col0 ) AS col0 FROM tab2
----
-1292
-158125
-237141

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 94 + - col0 + + col2 * col1 col1 FROM tab2
----
1550
661
924

query I rowsort
SELECT 49 * + col0 FROM tab1
----
147
3136
3920

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

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

query I rowsort
SELECT ALL - 86 * col1 AS col0 FROM tab2 AS cor0
----
-1462
-2666
-5074

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

query I rowsort
SELECT ALL - - col1 * + 17 FROM tab0 AS cor0
----
1462
1547
1649

query I rowsort
SELECT DISTINCT - + col1 + 49 FROM tab2 AS cor0
----
-10
18
32

query I rowsort
SELECT DISTINCT + col1 * - 12 + col0 * - col0 FROM tab1 AS cor0
----
-321
-4216
-6556

query I rowsort
SELECT ALL - col0 + 61 * 75 FROM tab1 AS cor0
----
4495
4511
4572

query I rowsort
SELECT + col0 + 63 + + col1 FROM tab0 AS cor0
----
173
195
243

query I rowsort
SELECT + 97 + col2 * + tab1.col2 FROM tab1
----
3013
3346
9313

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

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

query I rowsort
SELECT + col1 + ( - col0 + cor0.col2 ) FROM tab1 AS cor0
----
29
3
77

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

query I rowsort
SELECT - 41 - col2 FROM tab1 AS cor0
----
-137
-95
-98

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

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

query I rowsort
SELECT - 97 * col1 - cor0.col0 * 70 AS col1 FROM tab1 AS cor0
----
-2732
-5450
-6861

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

query I rowsort
SELECT DISTINCT + + col0 + col0 + col1 FROM tab0 AS cor0
----
134
167
269

query I rowsort
SELECT + col1 * + 22 AS col1 FROM tab2 AS cor0
----
1298
374
682

onlyif mysql # use DIV operator for integer division
query I rowsort label-799
SELECT ALL col1 * - col2 DIV col2 AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-799
SELECT ALL col1 * - col2 / col2 AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 54 * - 66 + + col1 col0 FROM tab2 cor0
----
3581
3595
3623

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

query I rowsort
SELECT ALL - 58 * 69 FROM tab0 AS cor0
----
-4002
-4002
-4002

query I rowsort
SELECT DISTINCT + 58 * col2 FROM tab1 AS cor0
----
3132
3306
5568

query I rowsort
SELECT ALL - + 79 + - col1 * - cor0.col2 FROM tab1 cor0
----
1169
1325
491

query I rowsort
SELECT DISTINCT + + 10 + - col0 AS col1 FROM tab0 cor0
----
-14
-25
-79

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-807
SELECT - 47 DIV - col1 AS col0 FROM tab2 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-807
SELECT - 47 / - col1 AS col0 FROM tab2 AS cor0
----
0
1
2

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

query I rowsort
SELECT DISTINCT 32 * col0 AS col1 FROM tab2 cor0
----
224
2496
2528

query I rowsort
SELECT ALL - + 72 * + col1 AS col0 FROM tab2 AS cor0
----
-1224
-2232
-4248

skipif mysql # not compatible
query I rowsort
SELECT - - ( - col2 ) * CAST ( col2 AS REAL ) FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT 73 * - col1 * col2 AS col2 FROM tab2 AS cor0
----
-111982
-47158
-61101

query I rowsort
SELECT - ( + col0 ) - 78 AS col2 FROM tab1 AS cor0
----
-142
-158
-81

query I rowsort
SELECT + ( col0 ) + col1 + + 83 FROM tab0
----
193
215
263

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-816
SELECT + tab0.col2 / tab0.col1 - - col0 col2 FROM tab0
----
24
35
89

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

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

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

query I rowsort
SELECT + 0 * - cor0.col0 * 61 - cor0.col0 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( col1 ) * ( - col2 ) + + col2 * - ( 51 ) col2 FROM tab2 AS cor0
----
-2214
-2584
-2860

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

query I rowsort
SELECT + col1 * - 75 AS col2 FROM tab2 AS cor0
----
-1275
-2325
-4425

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

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

skipif mysql # not compatible
query I rowsort label-827
SELECT 97 / ( + col2 * ( - col2 ) ) FROM tab1 AS cor0
----
0
0
0

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

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

query I rowsort
SELECT DISTINCT - 77 * - col0 AS col2 FROM tab1
----
231
4928
6160

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

query I rowsort
SELECT DISTINCT - 24 - col2 * col2 FROM tab2 AS cor0
----
-1468
-700
-753

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

query I rowsort
SELECT ALL - - col0 + 88 AS col2 FROM tab2 AS cor0
----
166
167
95

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

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

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

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

query I rowsort
SELECT 99 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 87 col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

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

skipif mysql # not compatible
query I rowsort label-840
SELECT - col1 + - CAST ( - col0 AS INTEGER ) * - col2 FROM tab2 AS cor0
----
-2087
-220
-3019

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-844
SELECT CAST( col2 AS SIGNED ) * col0 DIV cor0.col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-844
SELECT CAST ( col2 AS INTEGER ) * col0 / cor0.col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT 0 + - 68 * col2 FROM tab0 AS cor0
----
-2244
-5576
-68

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

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

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

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

query I rowsort
SELECT 10 * cor0.col0 AS col0 FROM tab2 AS cor0
----
70
780
790

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

query I rowsort
SELECT ALL - 33 AS col2 FROM tab2
----
-33
-33
-33

query I rowsort
SELECT ALL - col2 + col0 * ( 5 * col0 ) FROM tab2 AS cor0
----
218
30394
31167

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

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

query I rowsort
SELECT ( col2 ) * col1 + - col1 FROM tab2
----
1475
629
806

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

skipif mysql # not compatible
query I rowsort label-856
SELECT col0 * col2 * + CAST ( col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT 24 + + cor0.col0 * + 6 AS col0 FROM tab2 AS cor0
----
492
498
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-858
SELECT DISTINCT - cor0.col1 + - col0 DIV col0 AS col1 FROM tab2 AS cor0
----
-18
-32
-60

skipif mysql # not compatible
query I rowsort label-858
SELECT DISTINCT - cor0.col1 + - col0 / col0 AS col1 FROM tab2 AS cor0
----
-18
-32
-60

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-861
SELECT DISTINCT - col0 * - 73 + col0 + col1 DIV ( + col2 ) FROM tab0 AS cor0
----
1778
2687
6587

skipif mysql # not compatible
query I rowsort label-861
SELECT DISTINCT - col0 * - 73 + col0 + col1 / ( + col2 ) FROM tab0 AS cor0
----
1778
2687
6587

query I rowsort
SELECT ALL + cor0.col1 * - 8 AS col2 FROM tab0 AS cor0
----
-688
-728
-776

query I rowsort
SELECT col1 + - ( + cor0.col1 ) * col2 FROM tab0 cor0
----
-2752
-7371
0

query I rowsort
SELECT - ( - col1 ) + + col0 AS col2 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL + 93 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT DISTINCT 94 * tab1.col0 * - 56 AS col1 FROM tab1
----
-15792
-336896
-421120

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

query I rowsort
SELECT - + col1 * 71 FROM tab2 AS cor0
----
-1207
-2201
-4189

query I rowsort
SELECT col2 + 90 * cor0.col2 AS col0 FROM tab1 AS cor0
----
4914
5187
8736

query I rowsort
SELECT ALL + col0 - + 15 * + 12 FROM tab2 AS cor0
----
-101
-102
-173

query I rowsort
SELECT ALL + col0 * ( + 22 ) * - col1 + 17 AS col1 FROM tab2 AS cor0
----
-101227
-29529
-4757

query I rowsort
SELECT ALL + - col1 + - col1 + col0 * + col0 FROM tab2 cor0
----
-13
5966
6207

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

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

query I rowsort
SELECT ALL 25 FROM tab1, tab2 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-875
SELECT col1 * + 37 + col0 DIV - col1 AS col2 FROM tab1
----
364
475
962

skipif mysql # not compatible
query I rowsort label-875
SELECT col1 * + 37 + col0 / - col1 AS col2 FROM tab1
----
364
475
962

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

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

query I rowsort
SELECT + + 68 * + cor0.col0 FROM tab0 AS cor0
----
1632
2380
6052

query I rowsort
SELECT DISTINCT + 21 * cor0.col0 AS col2 FROM tab2 AS cor0
----
147
1638
1659

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

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

query I rowsort
SELECT - 74 * col0 + - cor0.col1 AS col2 FROM tab2 cor0
----
-549
-5831
-5863

query I rowsort
SELECT 88 * - col1 + - col0 * - ( - col2 ) * + col2 FROM tab0
----
-33704
-606444
-8571

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

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

query I rowsort
SELECT + 18 + tab0.col2 - col2 AS col0 FROM tab0
----
18
18
18

query I rowsort
SELECT ALL - 10 * col1 * col0 + col0 FROM tab2
----
-13351
-2163
-45942

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

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

query I rowsort
SELECT DISTINCT - ( col2 ) + + ( - ( + col2 ) ) * - ( col0 ) FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT ALL + col1 - col1 * - ( col0 ) * col1 AS col2 FROM tab0 AS cor0
----
177590
329412
737100

query I rowsort
SELECT DISTINCT - ( col2 ) + ( - ( col2 ) ) FROM tab1 AS cor0
----
-108
-114
-192

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

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

query I rowsort
SELECT - col1 * col0 * + 32 AS col1 FROM tab2 AS cor0
----
-147264
-42976
-6944

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

query I rowsort
SELECT 16 * + col0 FROM tab1 AS cor0
----
1024
1280
48

query I rowsort
SELECT DISTINCT 38 - + col0 AS col0 FROM tab1 AS cor0
----
-26
-42
35

query I rowsort
SELECT + - col2 * + col2 + - 89 AS col0 FROM tab2 AS cor0
----
-1533
-765
-818

query I rowsort
SELECT ALL + - 34 * - col0 + cor0.col2 FROM tab2 cor0
----
265
2678
2724

onlyif mysql # use DIV operator for integer division
query I rowsort label-900
SELECT + - 56 DIV col2 + + 61 FROM tab1 AS cor0
----
60
61
61

skipif mysql # not compatible
query I rowsort label-900
SELECT + - 56 / col2 + + 61 FROM tab1 AS cor0
----
60
61
61

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

query I rowsort
SELECT - + 27 * - col0 + - col0 FROM tab2 AS cor0
----
182
2028
2054

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

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

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

skipif mysql # not compatible
query I rowsort label-904
SELECT CAST ( - col2 AS INTEGER ) * + col1 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT tab2.col0 * + 66 AS col2 FROM tab2
----
462
5148
5214

onlyif mysql # use DIV operator for integer division
query I rowsort label-906
SELECT DISTINCT - tab1.col0 DIV + col1 + - col2 * col1 * + ( 56 ) FROM tab1
----
-31926
-69894
-78624

skipif mysql # not compatible
query I rowsort label-906
SELECT DISTINCT - tab1.col0 / + col1 + - col2 * col1 * + ( 56 ) FROM tab1
----
-31926
-69894
-78624

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 31 * 99 col0 FROM tab2
----
3069
3069
3069

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 ) * col0 + - 76 col2 FROM tab2 cor0
----
1267
141
4526

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

query I rowsort
SELECT DISTINCT 52 + + cor0.col1 FROM tab1 AS cor0
----
62
65
78

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

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

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

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

query I rowsort
SELECT - tab2.col1 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT DISTINCT - col0 * 5 AS col2 FROM tab0 AS cor0
----
-120
-175
-445

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

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

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

query I rowsort
SELECT ALL - col0 * + 89 * - col2 FROM tab1 AS cor0
----
14418
324672
683520

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + 56 col2 FROM tab0 AS cor0
----
142
147
153

query I rowsort
SELECT DISTINCT - + cor0.col1 * - 12 - - col2 FROM tab0 AS cor0
----
1065
1165
1174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * col0 col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + col1 * + col0 * 28 AS col2 FROM tab0
----
226772
57792
95060

query I rowsort
SELECT DISTINCT + tab0.col0 * 44 AS col2 FROM tab0
----
1056
1540
3916

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

query I rowsort
SELECT - col1 * 0 + col1 - + col0 FROM tab2 AS cor0
----
-19
-62
24

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

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

query I rowsort
SELECT ALL cor0.col1 * 2 AS col0 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT 77 * - ( col1 ) FROM tab2 AS cor0
----
-1309
-2387
-4543

query I rowsort
SELECT ALL + 59 + col0 FROM tab0 AS cor0
----
148
83
94

query I rowsort
SELECT + col1 + cor0.col2 + + col2 AS col0 FROM tab0 AS cor0
----
152
255
99

query I rowsort
SELECT + 49 + col0 AS col1 FROM tab0 AS cor0
----
138
73
84

query I rowsort
SELECT 29 + col0 AS col1 FROM tab1 AS cor0
----
109
32
93

query I rowsort
SELECT - 92 * col0 AS col0 FROM tab1 cor0
----
-276
-5888
-7360

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

query I rowsort
SELECT DISTINCT - - 90 + 71 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
161

query I rowsort
SELECT ALL 93 * col2 AS col0 FROM tab0 AS cor0
----
3069
7626
93

query I rowsort
SELECT - 76 * + col0 + + cor0.col1 FROM tab2 cor0
----
-501
-5869
-5987

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

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

query I rowsort
SELECT DISTINCT - col2 + + col1 * 86 AS col2 FROM tab1 AS cor0
----
1022
2182
803

query I rowsort
SELECT DISTINCT - col1 + + col0 * ( + ( col1 ) ) FROM tab1 AS cor0
----
1027
52
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-945
SELECT - CAST( + col0 AS SIGNED ) DIV col0 + col0 * tab1.col2 DIV + col1 AS col0 FROM tab1
----
363
5
589

skipif mysql # not compatible
query I rowsort label-945
SELECT - CAST ( + col0 AS INTEGER ) / col0 + col0 * tab1.col2 / + col1 AS col0 FROM tab1
----
363
5
589

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-947
SELECT DISTINCT col2 * col2 DIV - col0 AS col1 FROM tab2
----
-104
-18
-8

skipif mysql # not compatible
query I rowsort label-947
SELECT DISTINCT col2 * col2 / - col0 AS col1 FROM tab2
----
-104
-18
-8

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-950
SELECT - col2 + + 70 DIV - col0 + col0 FROM tab0
----
-11
32
7

skipif mysql # not compatible
query I rowsort label-950
SELECT - col2 + + 70 / - col0 + col0 FROM tab0
----
-11
32
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 cor1
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

query I rowsort
SELECT - col2 * + 40 AS col1 FROM tab2
----
-1040
-1080
-1520

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

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

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

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

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

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

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

query I rowsort
SELECT - 94 + col2 FROM tab2 AS cor0
----
-56
-67
-68

query I rowsort
SELECT 67 FROM tab2, tab1 cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-962
SELECT - CAST( - 6 AS SIGNED ) * + col1 AS col0 FROM tab1 cor0
----
156
60
78

skipif mysql # not compatible
query I rowsort label-962
SELECT - CAST ( - 6 AS INTEGER ) * + col1 AS col0 FROM tab1 cor0
----
156
60
78

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

query I rowsort
SELECT + 30 + col2 * col1 FROM tab2 AS cor0
----
1564
676
867

query I rowsort
SELECT + col2 * 29 AS col1 FROM tab1 cor0
----
1566
1653
2784

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

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

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

query I rowsort
SELECT + col0 + - 4 + - col2 FROM tab1 cor0
----
-20
-55
3

query I rowsort
SELECT + - 96 + - col1 * + cor0.col1 FROM tab1 AS cor0
----
-196
-265
-772

query I rowsort
SELECT DISTINCT + col1 * ( col1 * - col2 + + 86 ) FROM tab2 cor0
----
-23281
-85432
-9520

query I rowsort
SELECT DISTINCT + col0 * + 86 + col1 AS col2 FROM tab0 AS cor0
----
2150
3107
7745

query I rowsort
SELECT ALL + 49 * + col0 FROM tab1 AS cor0
----
147
3136
3920

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

query I rowsort
SELECT DISTINCT - 9 * - 27 + + col0 * col0 AS col2 FROM tab1 AS cor0
----
252
4339
6643

query I rowsort
SELECT ALL - col0 * 24 + - col0 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT + 95 + ( + col0 ) AS col2 FROM tab1 cor0
----
159
175
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-978
SELECT DISTINCT + 5 DIV 93 + + col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-978
SELECT DISTINCT + 5 / 93 + + col1 FROM tab0 AS cor0
----
86
91
97

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

query I rowsort
SELECT - + ( - 23 ) + col1 FROM tab2 AS cor0
----
40
54
82

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

query I rowsort
SELECT col1 + 99 AS col1 FROM tab2 AS cor0
----
116
130
158

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

query I rowsort
SELECT ALL col2 + col2 * + 27 FROM tab2 cor0
----
1064
728
756

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

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

query I rowsort
SELECT + col1 * - cor0.col0 * - cor0.col1 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT - col2 + + col0 * 34 AS col2 FROM tab1 AS cor0
----
2119
2624
48

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

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

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

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

query I rowsort
SELECT col1 + - 37 FROM tab0
----
49
54
60

query I rowsort
SELECT ALL + col0 * - 59 + ( col1 ) AS col1 FROM tab1 AS cor0
----
-151
-3766
-4707

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-995
SELECT ALL - col1 DIV + 88 AS col1 FROM tab0 cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-995
SELECT ALL - col1 / + 88 AS col1 FROM tab0 cor0
----
-1
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 745d1c3a09d935465cad552325c5c945

query I rowsort
SELECT - col0 * - col0 * col1 - col2 AS col0 FROM tab1 AS cor0
----
180
40903
83104

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

query I rowsort
SELECT tab1.col0 - - 35 * col0 AS col2 FROM tab1
----
108
2304
2880

query I rowsort
SELECT DISTINCT 47 FROM tab2 cor0
----
47

query I rowsort
SELECT ALL 77 * - col1 + + cor0.col2 AS col0 FROM tab1 AS cor0
----
-1948
-713
-905

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1002
SELECT DISTINCT + CAST( col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-1002
SELECT DISTINCT + CAST ( col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + col2 + 98 * col0 AS col0 FROM tab1 AS cor0
----
348
6329
7936

query I rowsort
SELECT + col0 * - col1 - - col1 FROM tab1 cor0
----
-1027
-52
-630

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

query I rowsort
SELECT DISTINCT col2 + + 10 AS col1 FROM tab1
----
106
64
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-1007
SELECT DISTINCT + col1 * col0 + tab1.col2 DIV - col1 FROM tab1
----
1033
635
76

skipif mysql # not compatible
query I rowsort label-1007
SELECT DISTINCT + col1 * col0 + tab1.col2 / - col1 FROM tab1
----
1033
635
76

query I rowsort
SELECT ALL col1 + + 11 + 9 * col1 FROM tab2
----
181
321
601

query I rowsort
SELECT DISTINCT - col0 * + col0 + + col0 - 92 FROM tab0 AS cor0
----
-1282
-644
-7924

query I rowsort
SELECT - 61 * col2 FROM tab2 AS cor0
----
-1586
-1647
-2318

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

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

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

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

query I rowsort
SELECT col1 * ( - col1 ) * - col0 - cor0.col1 * col2 AS col2 FROM tab2 cor0
----
22185
269984
5890

query I rowsort
SELECT + + col2 * + 53 AS col0 FROM tab1 cor0
----
2862
3021
5088

query I rowsort
SELECT ALL ( - col1 ) * col0 + 5 FROM tab0
----
-2059
-3390
-8094

query I rowsort
SELECT ALL + 65 + - col0 * + 52 AS col0 FROM tab1
----
-3263
-4095
-91

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

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

query I rowsort
SELECT - col2 * 79 - 20 AS col1 FROM tab2 cor0
----
-2074
-2153
-3022

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1022
SELECT col2 * tab1.col0 DIV + col0 + col1 FROM tab1
----
109
67
80

skipif mysql # not compatible
query I rowsort label-1022
SELECT col2 * tab1.col0 / + col0 + col1 FROM tab1
----
109
67
80

query I rowsort
SELECT + - 79 + - col0 FROM tab0 AS cor0
----
-103
-114
-168

onlyif mysql # use DIV operator for integer division
query I rowsort label-1024
SELECT - col1 + col1 DIV col2 FROM tab0 AS cor0
----
-84
-90
0

skipif mysql # not compatible
query I rowsort label-1024
SELECT - col1 + col1 / col2 FROM tab0 AS cor0
----
-84
-90
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1025
SELECT ALL + col2 + + col2 + - col0 DIV 45 AS col1 FROM tab0 cor0
----
163
2
66

skipif mysql # not compatible
query I rowsort label-1025
SELECT ALL + col2 + + col2 + - col0 / 45 AS col1 FROM tab0 cor0
----
163
2
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1026
SELECT CAST( ( col2 ) AS SIGNED ) + cor0.col1 AS col2 FROM tab2 AS cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-1026
SELECT CAST ( ( col2 ) AS INTEGER ) + cor0.col1 AS col2 FROM tab2 AS cor0
----
55
58
85

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

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

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

query I rowsort
SELECT + col2 * 19 FROM tab2 AS cor0
----
494
513
722

skipif mysql # not compatible
query I rowsort
SELECT col0 + - CAST ( - col1 * col2 AS REAL ) FROM tab2
----
1612
725
844

query I rowsort
SELECT DISTINCT ( + ( + col0 ) + - 59 ) AS col2 FROM tab2
----
-52
19
20

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * 83 col2 FROM tab0 AS cor0
----
7138
7553
8051

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

query I rowsort
SELECT DISTINCT - col2 + - col1 * col0 + col1 AS col2 FROM tab2 AS cor0
----
-1364
-213
-4569

query I rowsort
SELECT - + cor0.col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT ALL 29 * - 55 AS col0 FROM tab2
----
-1595
-1595
-1595

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

skipif mysql # not compatible
query I rowsort label-1040
SELECT ALL - col0 / - 69 FROM tab0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - 22 * col0 col2 FROM tab1
----
140800
198
90112

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

query I rowsort
SELECT DISTINCT - 42 * col2 FROM tab2
----
-1092
-1134
-1596

query I rowsort
SELECT - ( col2 ) - - col2 FROM tab1
----
0
0
0

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

query I rowsort
SELECT 48 + cor0.col1 * - col2 FROM tab2 AS cor0
----
-1486
-598
-789

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

query I rowsort
SELECT - - 58 * + col1 * col0 AS col0 FROM tab0 AS cor0
----
119712
196910
469742

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

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

query I rowsort
SELECT DISTINCT col1 * + 32 FROM tab2
----
1888
544
992

query I rowsort
SELECT + 53 FROM tab2, tab1 cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT + + cor0.col1 * + cor0.col1 + - col1 * + col0 FROM tab1 AS cor0
----
-540
-871
598

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

query I rowsort
SELECT col1 * - col2 + 94 * col1 AS col1 FROM tab0 AS cor0
----
1092
5246
9021

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + 22 col1 FROM tab1 AS cor0
----
102
25
86

query I rowsort
SELECT - col2 - - 79 * 72 FROM tab0 AS cor0
----
5606
5655
5687

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

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

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

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

query I rowsort
SELECT + + col2 * ( cor0.col0 + - cor0.col2 * + ( 93 ) ) FROM tab1 AS cor0
----
-271026
-298509
-849408

query I rowsort
SELECT ALL - col1 - 53 FROM tab0 AS cor0
----
-139
-144
-150

query I rowsort
SELECT ALL + col2 * col1 * - ( col1 ) AS col1 FROM tab2 AS cor0
----
-10982
-25947
-90506

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

query I rowsort
SELECT col1 * col0 + + cor0.col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + - col0 + 79 FROM tab0 AS cor0
----
-10
44
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * + col0 + col0 col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT 24 * + cor0.col0 AS col1 FROM tab2, tab0, tab0 AS cor0
----
2136
576
840

query I rowsort
SELECT ALL + col0 * + 68 + + col1 FROM tab0 AS cor0
----
1718
2477
6143

query I rowsort
SELECT DISTINCT col2 + + 56 AS col1 FROM tab0 AS cor0
----
138
57
89

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

query I rowsort
SELECT + col1 + cor0.col1 * 28 * col2 FROM tab0 AS cor0
----
209027
2813
79550

onlyif mysql # use DIV operator for integer division
query I rowsort label-1075
SELECT + + col1 DIV col2 + cor0.col0 FROM tab0 AS cor0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-1075
SELECT + + col1 / col2 + cor0.col0 FROM tab0 AS cor0
----
132
26
90

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

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

query I rowsort
SELECT 27 * + ( - col1 ) FROM tab0 AS cor0
----
-2322
-2457
-2619

query I rowsort
SELECT DISTINCT - ( - 45 ) + - col1 FROM tab1 AS cor0
----
19
32
35

query I rowsort
SELECT col2 * 90 AS col2 FROM tab0 AS cor0
----
2970
7380
90

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

query I rowsort
SELECT - tab2.col0 * - 78 * - 46 + + tab2.col0 * tab2.col1 * - col0 AS col0 FROM tab2
----
-26635
-389549
-638820

query I rowsort
SELECT 12 * + col1 FROM tab2
----
204
372
708

onlyif mysql # use DIV operator for integer division
query I rowsort label-1084
SELECT DISTINCT 56 DIV tab1.col1 - col0 FROM tab1
----
-1
-59
-76

skipif mysql # not compatible
query I rowsort label-1084
SELECT DISTINCT 56 / tab1.col1 - col0 FROM tab1
----
-1
-59
-76

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

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

query I rowsort
SELECT DISTINCT + ( 42 ) * col0 FROM tab0
----
1008
1470
3738

query I rowsort
SELECT ALL 91 FROM tab2, tab2 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

onlyif mysql # use DIV operator for integer division
query I rowsort label-1088
SELECT - tab0.col2 - tab0.col2 DIV col0 FROM tab0
----
-1
-34
-82

skipif mysql # not compatible
query I rowsort label-1088
SELECT - tab0.col2 - tab0.col2 / col0 FROM tab0
----
-1
-34
-82

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

query I rowsort
SELECT DISTINCT + col1 + + col0 + ( col2 + + tab1.col0 ) FROM tab1
----
195
269
86

query I rowsort
SELECT - tab2.col1 FROM tab2, tab1 AS cor0, tab1 cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

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

query I rowsort
SELECT + 65 + + col0 AS col2 FROM tab2 AS cor0
----
143
144
72

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

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

query I rowsort
SELECT cor0.col2 + + col1 + - cor0.col1 * 5 AS col1 FROM tab2 AS cor0
----
-210
-30
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col0 + - tab0.col1 col0 FROM tab0
----
-131
-77
-98

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

query I rowsort
SELECT + 15 - tab1.col2 AS col1 FROM tab1
----
-39
-42
-81

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

query I rowsort
SELECT ALL col0 * col0 + tab1.col1 * - col0 + col1 AS col0 FROM tab1
----
-43
3466
5373

query I rowsort
SELECT ALL + 3 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT ALL - cor0.col1 * 21 * + col1 FROM tab2 AS cor0
----
-20181
-6069
-73101

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col2 * 96 AS col1 FROM tab2 AS cor0
----
-2496
-2592
-3648

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

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

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

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

query I rowsort
SELECT ALL col2 + col2 * - col1 * + 63 AS col1 FROM tab0 cor0
----
-178761
-470024
-6110

query I rowsort
SELECT ALL cor0.col2 * col0 * col0 + col1 AS col0 FROM tab0 AS cor0
----
1322
19094
649613

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

skipif mysql # not compatible
query I rowsort label-1113
SELECT ALL 25 / col1 AS col2 FROM tab1 AS cor0
----
0
1
2

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1115
SELECT ALL 24 + - cor0.col2 DIV + col2 + 17 FROM tab0 AS cor0
----
40
40
40

skipif mysql # not compatible
query I rowsort label-1115
SELECT ALL 24 + - cor0.col2 / + col2 + 17 FROM tab0 AS cor0
----
40
40
40

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

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

query I rowsort
SELECT + col0 * - col1 + col1 + col2 AS col1 FROM tab0 AS cor0
----
-1945
-3297
-7926

query I rowsort
SELECT DISTINCT - + 31 + - col0 FROM tab0 cor0
----
-120
-55
-66

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

query I rowsort
SELECT ALL + 90 * - col2 FROM tab0 AS cor0
----
-2970
-7380
-90

query I rowsort
SELECT ALL + 62 * col0 + + col1 + + col1 AS col2 FROM tab1 AS cor0
----
238
3988
4986

query I rowsort
SELECT ALL + + col1 * col1 + - 59 FROM tab2 AS cor0
----
230
3422
902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 94 * - col2 col2 FROM tab1 cor0
----
5076
5358
9024

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

query I rowsort
SELECT - col0 + col2 * + col2 - col0 AS col2 FROM tab1 AS cor0
----
2910
3121
9056

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

query I rowsort
SELECT DISTINCT + 86 * + col1 AS col2 FROM tab1 AS cor0
----
1118
2236
860

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

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

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

query I rowsort
SELECT ALL - ( tab0.col0 ) * + tab0.col1 * 24 FROM tab0
----
-194376
-49536
-81480

query I rowsort
SELECT col1 + 96 AS col1 FROM tab1
----
106
109
122

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( 7 * col1 ) col1 FROM tab2
----
119
217
413

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

query I rowsort
SELECT ALL - 3 * - col0 + + 69 FROM tab0 AS cor0
----
141
174
336

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 + + col0 col0 FROM tab2 AS cor0
----
22
93
94

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

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

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

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

query IIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 CROSS JOIN tab2 WHERE NULL >= ( NULL )
----

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( - 41 AS REAL ) FROM tab2 AS cor0
----
41
41
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-1141
SELECT DISTINCT - col1 + - col0 DIV - col1 col0 FROM tab2 AS cor0
----
-13
-31
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1141
SELECT DISTINCT - col1 + - col0 / - col1 col0 FROM tab2 AS cor0
----
-13
-31
-58

query I rowsort
SELECT col0 * + 2 + col1 + + 13 * col2 AS col0 FROM tab2 AS cor0
----
396
553
669

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 52 * cor0.col1 col2 FROM tab2 AS cor0
----
1612
3068
884

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

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

query I rowsort
SELECT ALL + cor1.col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

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

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

skipif mysql # not compatible
query I rowsort label-1148
SELECT DISTINCT - col2 / - 93 AS col1 FROM tab0
----
0

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

query I rowsort
SELECT + col2 + - cor0.col0 + 38 * - col2 AS col0 FROM tab1 cor0
----
-2001
-2173
-3632

query I rowsort
SELECT ALL - col2 * 33 FROM tab2 AS cor0
----
-1254
-858
-891

query I rowsort
SELECT - 14 * 28 AS col2 FROM tab2 AS cor0
----
-392
-392
-392

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

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

query I rowsort
SELECT DISTINCT + col0 + 53 AS col1 FROM tab1
----
117
133
56

query I rowsort
SELECT col2 * - 74 + col2 * - col2 FROM tab2
----
-2600
-2727
-4256

query I rowsort
SELECT + col1 * 77 + col2 AS col2 FROM tab1
----
1097
2056
827

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

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

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

query I rowsort
SELECT DISTINCT + 39 + 29 * - col0 + 19 FROM tab2 AS cor0
----
-145
-2204
-2233

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 21 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

query I rowsort
SELECT 87 AS col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

onlyif mysql # use DIV operator for integer division
query I rowsort label-1166
SELECT DISTINCT + - col2 DIV col1 + 89 AS col1 FROM tab2 AS cor0
----
87
89

skipif mysql # not compatible
query I rowsort label-1166
SELECT DISTINCT + - col2 / col1 + 89 AS col1 FROM tab2 AS cor0
----
87
89

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

query I rowsort
SELECT ALL - 42 * col1 AS col0 FROM tab1 AS cor0
----
-1092
-420
-546

query I rowsort
SELECT ALL 15 + col1 * 41 + + col0 FROM tab2 AS cor0
----
1293
2512
791

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

query I rowsort
SELECT DISTINCT 73 + - col1 * col1 * col0 + 43 FROM tab2
----
-22715
-271402
-6611

query I rowsort
SELECT - 11 - + col2 * + col0 AS col2 FROM tab1
----
-173
-3659
-7691

query I rowsort
SELECT ALL + ( 24 ) FROM tab0, tab2, tab2 cor0
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - - 87 col1 FROM tab1
----
23
7
84

query I rowsort
SELECT ALL - col2 + col1 * 16 FROM tab2 AS cor0
----
234
469
918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * 94 - - col0 * col2 col1 FROM tab1 AS cor0
----
16704
5238
9006

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

query I rowsort
SELECT + col0 + + 11 AS col2 FROM tab0 AS cor0
----
100
35
46

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

query I rowsort
SELECT - - col1 * cor0.col1 - + 52 * col1 FROM tab0 AS cor0
----
2924
3549
4365

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

query I rowsort
SELECT col0 * col2 * 44 - + cor0.col1 AS col2 FROM tab1 AS cor0
----
160502
337907
7102

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

query I rowsort
SELECT - col0 * - 74 + - cor0.col1 * col0 FROM tab1 AS cor0
----
144
4096
4880

query I rowsort
SELECT + - col1 * - cor0.col1 * 98 + col0 AS col1 FROM tab0 AS cor0
----
724832
811627
922117

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col0 + col2 col0 FROM tab0
----
253
37
90

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

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

query I rowsort
SELECT 22 * col1 * + tab2.col0 + col0 + tab2.col2 AS col2 FROM tab2
----
101348
29663
4808

onlyif mysql # use DIV operator for integer division
query I rowsort label-1189
SELECT DISTINCT - - col2 + + col0 DIV - 61 FROM tab0 AS cor0
----
1
33
81

skipif mysql # not compatible
query I rowsort label-1189
SELECT DISTINCT - - col2 + + col0 / - 61 FROM tab0 AS cor0
----
1
33
81

query I rowsort
SELECT DISTINCT 11 + - col1 FROM tab2
----
-20
-48
-6

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * + 99 col2 FROM tab2 cor0
----
-2574
-2673
-3762

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1194
SELECT col1 DIV CAST( + 35 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-1194
SELECT col1 / CAST ( + 35 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
2
2
2

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

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

query I rowsort
SELECT ALL - + col2 * - 50 - 42 FROM tab0 AS cor0
----
1608
4058
8

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 + col1 * 47 col1 FROM tab1 AS cor0
----
1276
527
707

query I rowsort
SELECT + - col0 * + 21 * col2 FROM tab2 AS cor0
----
-3969
-42588
-63042

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + ( + cor0.col1 + col2 ) col0 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT DISTINCT + - cor0.col2 * 61 AS col1 FROM tab0 AS cor0
----
-2013
-5002
-61

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1207
SELECT 12 DIV + 69 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1207
SELECT 12 / + 69 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 * ( cor0.col0 ) * col2 + col0 AS col2 FROM tab1 cor0
----
233536
489
614480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 13 * col1 * + cor0.col2 col2 FROM tab2 AS cor0
----
10881
19942
8398

query I rowsort
SELECT DISTINCT ( + ( cor0.col1 ) ) AS col0 FROM tab2 AS cor0
----
17
31
59

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1212
SELECT ALL col0 DIV ( col2 + + tab0.col2 * - 60 ) FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1212
SELECT ALL col0 / ( col2 + + tab0.col2 * - 60 ) FROM tab0
----
0
0
0

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

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

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

query I rowsort
SELECT ALL col0 * - 15 + - col0 + col2 AS col1 FROM tab1 AS cor0
----
-1184
-967
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1216
SELECT DISTINCT - - 23 + col2 DIV col0 FROM tab1 AS cor0
----
23
24
41

skipif mysql # not compatible
query I rowsort label-1216
SELECT DISTINCT - - 23 + col2 / col0 FROM tab1 AS cor0
----
23
24
41

query I rowsort
SELECT DISTINCT + - 33 - col2 AS col0 FROM tab1 cor0
----
-129
-87
-90

query I rowsort
SELECT DISTINCT 49 * 52 AS col0 FROM tab0
----
2548

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1222
SELECT ALL + col0 + col1 DIV 9 FROM tab2 AS cor0
----
10
80
84

skipif mysql # not compatible
query I rowsort label-1222
SELECT ALL + col0 + col1 / 9 FROM tab2 AS cor0
----
10
80
84

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1225
SELECT DISTINCT col0 * col0 DIV col2 + 20 AS col2 FROM tab1 AS cor0
----
20
86
91

skipif mysql # not compatible
query I rowsort label-1225
SELECT DISTINCT col0 * col0 / col2 + 20 AS col2 FROM tab1 AS cor0
----
20
86
91

query I rowsort
SELECT + - 61 * + col1 AS col1 FROM tab2 AS cor0
----
-1037
-1891
-3599

query I rowsort
SELECT - col0 * + cor0.col2 + ( cor0.col1 ) * - col1 FROM tab0 AS cor0
----
-15579
-8188
-9444

query I rowsort
SELECT - ( - col1 ) + 91 FROM tab2 AS cor0
----
108
122
150

query I rowsort
SELECT ( - 82 ) FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to ce62f59690969f4492d78eb57c3181f0

query I rowsort
SELECT + + 80 * + col0 FROM tab2 AS cor0
----
560
6240
6320

query I rowsort
SELECT + cor1.col2 + 0 * + cor1.col0 AS col2 FROM tab0 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

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

query I rowsort
SELECT ALL cor1.col2 * + 75 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b7d4a7e4c85ddc797126197f8c0adf7d

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col0 + col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT 16 + + col2 FROM tab1 AS cor0
----
112
70
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-1236
SELECT ALL - 9 DIV cor0.col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1236
SELECT ALL - 9 / cor0.col1 FROM tab0 cor0
----
0
0
0

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

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

query I rowsort
SELECT ALL - + col2 + col0 + col1 * col1 AS col1 FROM tab0 AS cor0
----
7387
8288
9443

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1242
SELECT DISTINCT + col0 / 67 + col2 * cor0.col0 + col0 AS col0 FROM tab0 cor0
----
70
7388
816

query I rowsort
SELECT + 30 FROM tab1 cor0
----
30
30
30

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

query I rowsort
SELECT ALL col1 + + 90 FROM tab1 AS cor0
----
100
103
116

query I rowsort
SELECT - 75 AS col2 FROM tab0 AS cor0
----
-75
-75
-75

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

query I rowsort
SELECT DISTINCT - ( + col0 ) + cor0.col0 * - 78 FROM tab2 AS cor0
----
-553
-6162
-6241

query I rowsort
SELECT 65 * + cor0.col0 * + col1 AS col2 FROM tab0 AS cor0
----
134160
220675
526435

query I rowsort
SELECT ALL + col1 * 79 AS col1 FROM tab0 AS cor0
----
6794
7189
7663

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

query I rowsort
SELECT ALL 82 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1255
SELECT - 61 DIV 29 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to ec11209ab257030053484fc13a1f6d17

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1255
SELECT - 61 / 29 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to ec11209ab257030053484fc13a1f6d17

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1260
SELECT - ( col2 ) * tab2.col2 DIV 62 AS col2 FROM tab2
----
-10
-11
-23

skipif mysql # not compatible
query I rowsort label-1260
SELECT - ( col2 ) * tab2.col2 / 62 AS col2 FROM tab2
----
-10
-11
-23

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 23 * - cor0.col1 col1 FROM tab1 AS cor0
----
230
299
598

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1263
SELECT ALL CAST( - col0 AS SIGNED ) + + cor0.col2 * + 10 AS col1 FROM tab2 AS cor0
----
182
263
301

skipif mysql # not compatible
query I rowsort label-1263
SELECT ALL CAST ( - col0 AS INTEGER ) + + cor0.col2 * + 10 AS col1 FROM tab2 AS cor0
----
182
263
301

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 48 + - col2 * - 20 col0 FROM tab2 AS cor0
----
568
588
808

query I rowsort
SELECT + 66 + col1 * col2 AS col2 FROM tab1 AS cor0
----
1314
1470
636

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col2 * col0 col0 FROM tab2 AS cor0
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col0 ) * cor0.col0 col1 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1269
SELECT - col1 DIV col2 - - 70 FROM tab0 AS cor0
----
-27
68
69

skipif mysql # not compatible
query I rowsort label-1269
SELECT - col1 / col2 - - 70 FROM tab0 AS cor0
----
-27
68
69

query I rowsort
SELECT - - col0 - + col2 * col0 * 63 FROM tab2 AS cor0
----
-11900
-127686
-189047

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

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

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

query I rowsort
SELECT + 80 + col0 - + col1 * - cor0.col0 FROM tab0 cor0
----
2168
3510
8268

query I rowsort
SELECT - - 89 * col1 + col0 - - col2 * col1 FROM tab2 AS cor0
----
2238
3603
6863

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

skipif mysql # not compatible
query I rowsort label-1275
SELECT col2 * col1 + CAST ( - col1 AS INTEGER ) - + tab0.col2 * 13 FROM tab0
----
-13
2323
6305

query I rowsort
SELECT ALL + col0 + col1 - 22 * tab2.col2 FROM tab2
----
-435
-556
-740

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

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

query I rowsort
SELECT ALL + col0 * - 30 AS col0 FROM tab2 AS cor0
----
-210
-2340
-2370

query I rowsort
SELECT DISTINCT - cor0.col2 + ( col2 ) * col1 * 18 FROM tab1 AS cor0
----
10203
22368
25218

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1281
SELECT ALL + cor0.col0 DIV CAST( + 57 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1281
SELECT ALL + cor0.col0 / CAST ( + 57 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT DISTINCT + + col0 * - 67 + + col1 * - col1 FROM tab2 AS cor0
----
-1430
-5582
-8707

query I rowsort
SELECT - col2 * + ( + 47 * col2 ) + - 44 AS col0 FROM tab1 cor0
----
-137096
-152747
-433196

skipif mysql # not compatible
query I rowsort
SELECT + + col0 * CAST ( 82 AS REAL ) FROM tab1 AS cor0
----
246
5248
6560

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col1 + + col0 * - col2 col1 FROM tab2 AS cor0
----
-1026
-3562
-3648

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

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

skipif mysql # not compatible
query I rowsort label-1288
SELECT ALL col0 / + tab1.col2 FROM tab1
----
0
0
1

query I rowsort
SELECT DISTINCT - 95 * - col0 FROM tab0
----
2280
3325
8455

query I rowsort
SELECT - cor0.col0 * col0 * 49 + + col0 FROM tab2 AS cor0
----
-2394
-298038
-305730

query I rowsort
SELECT ALL + + col1 * 6 + col1 * + col2 AS col0 FROM tab1 AS cor0
----
1326
1560
630

query I rowsort
SELECT 76 * col0 FROM tab1
----
228
4864
6080

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1295
SELECT CAST( 83 AS SIGNED ) + col0 FROM tab0 AS cor0
----
107
118
172

skipif mysql # not compatible
query I rowsort label-1295
SELECT CAST ( 83 AS INTEGER ) + col0 FROM tab0 AS cor0
----
107
118
172

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

query I rowsort
SELECT ALL 17 * + col1 + - col1 FROM tab0 AS cor0
----
1376
1456
1552

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

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

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

query I rowsort
SELECT DISTINCT col0 * 33 FROM tab1
----
2112
2640
99

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1306
SELECT tab0.col2 DIV CAST( + 32 AS SIGNED ) AS col0 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-1306
SELECT tab0.col2 / CAST ( + 32 AS INTEGER ) AS col0 FROM tab0
----
0
1
2

query I rowsort
SELECT ALL 59 FROM tab0, tab1 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT - 36 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 3bcd07d22b62d2042b499253b1c13d9e

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 + 79 * + 13 * - col0 col0 FROM tab1
----
-3107
-65738
-82173

query I rowsort
SELECT 17 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

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

query I rowsort
SELECT + 43 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

onlyif mysql # use DIV operator for integer division
query I rowsort label-1314
SELECT - ( - col1 ) DIV + col2 + col1 * - col1 FROM tab0 AS cor0
----
-7394
-8280
-9312

skipif mysql # not compatible
query I rowsort label-1314
SELECT - ( - col1 ) / + col2 + col1 * - col1 FROM tab0 AS cor0
----
-7394
-8280
-9312

query I rowsort
SELECT + ( 48 ) * - col2 + + col0 * col2 AS col1 FROM tab1 cor0
----
-2430
3072
912

onlyif mysql # use DIV operator for integer division
query I rowsort label-1316
SELECT DISTINCT + tab0.col0 * col2 + col0 DIV + col0 FROM tab0
----
36
7299
793

skipif mysql # not compatible
query I rowsort label-1316
SELECT DISTINCT + tab0.col0 * col2 + col0 / + col0 FROM tab0
----
36
7299
793

query I rowsort
SELECT ALL ( col1 ) + col1 AS col1 FROM tab0
----
172
182
194

query I rowsort
SELECT ALL + 20 * - 57 - + col0 FROM tab2 AS cor0
----
-1147
-1218
-1219

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

skipif mysql # not compatible
query I rowsort label-1319
SELECT + + CAST ( 47 AS INTEGER ) + col1 + - 96 AS col0 FROM tab1 AS cor0
----
-23
-36
-39

query I rowsort
SELECT ALL + ( + col0 ) + - col1 + - col1 FROM tab0 AS cor0
----
-148
-159
-93

query I rowsort
SELECT DISTINCT - 77 + + col0 AS col0 FROM tab0 AS cor0
----
-42
-53
12

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

query I rowsort
SELECT ALL col1 * 39 + col0 AS col1 FROM tab1 AS cor0
----
1017
454
587

onlyif mysql # use DIV operator for integer division
query I rowsort label-1324
SELECT DISTINCT - cor0.col2 DIV cor0.col0 - col1 AS col1 FROM tab2 AS cor0
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort label-1324
SELECT DISTINCT - cor0.col2 / cor0.col0 - col1 AS col1 FROM tab2 AS cor0
----
-17
-34
-59

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1326
SELECT ALL CAST( ( + col2 ) AS SIGNED ) FROM tab1 cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-1326
SELECT ALL CAST ( ( + col2 ) AS INTEGER ) FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT - + 42 * col2 + + col1 - col0 AS col2 FROM tab0 AS cor0
----
-1324
-3442
20

query I rowsort
SELECT - + 93 * cor1.col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 71a6d7b6bc9860893da82b5ecb91faa3

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1329
SELECT col0 / col0 + - 34 col2 FROM tab1 AS cor0
----
-33
-33
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - col2 * + col2 col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT DISTINCT + 35 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
1890
1995
3360

query I rowsort
SELECT + col0 * - col2 + ( cor0.col2 ) AS col0 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT + - col2 + 35 AS col2 FROM tab2 cor0
----
-3
8
9

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

query I rowsort
SELECT col0 * ( - col1 * col1 ) AS col0 FROM tab2 AS cor0
----
-22831
-271518
-6727

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

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

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

query I rowsort
SELECT DISTINCT col0 * col1 * + col0 AS col2 FROM tab2 AS cor0
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-1340
SELECT DISTINCT - cor0.col2 DIV - col1 + 91 AS col1 FROM tab1 AS cor0
----
93
96
98

skipif mysql # not compatible
query I rowsort label-1340
SELECT DISTINCT - cor0.col2 / - col1 + 91 AS col1 FROM tab1 AS cor0
----
93
96
98

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

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

query I rowsort
SELECT + col1 * 76 FROM tab1 cor0
----
1976
760
988

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

query I rowsort
SELECT ALL - + col1 * + 7 + 52 FROM tab1 AS cor0
----
-130
-18
-39

query I rowsort
SELECT DISTINCT - - col2 * ( 69 ) + col0 FROM tab2 cor0
----
1870
1872
2701

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

skipif mysql # not compatible
query I rowsort label-1346
SELECT + cor0.col2 / - ( - cor0.col2 ) FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - col2 + col0 + - 98 AS col2 FROM tab0 AS cor0
----
-107
-64
-91

query I rowsort
SELECT ALL - col1 - 8 * + col0 FROM tab2 AS cor0
----
-649
-683
-87

query I rowsort
SELECT DISTINCT cor0.col1 * - 56 AS col2 FROM tab0 AS cor0
----
-4816
-5096
-5432

query I rowsort
SELECT ALL + col0 * - ( ( col1 ) ) + cor0.col1 AS col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT - - col1 - 71 * col1 * + col0 FROM tab1 AS cor0
----
-45430
-5512
-73827

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

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

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

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

query I rowsort
SELECT DISTINCT - 37 * tab2.col1 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
-1147
-2183
-629

query I rowsort
SELECT DISTINCT 63 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 cor2, tab2 AS cor3
----
63

query I rowsort
SELECT DISTINCT - - col2 * cor0.col2 + 84 AS col2 FROM tab0 AS cor0
----
1173
6808
85

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

query I rowsort
SELECT ALL + 55 FROM tab2, tab2 cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

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

query I rowsort
SELECT + 8 * col2 + + col0 * - 25 AS col0 FROM tab1
----
-1144
-1232
357

query I rowsort
SELECT + - 16 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 71c8b08964ab47ce12158975c0ee1fd9

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

query I rowsort
SELECT 7 * + col0 + - col1 FROM tab1
----
-5
438
547

query I rowsort
SELECT DISTINCT col0 + + col0 * 28 * - ( + col1 ) AS col2 FROM tab2
----
-128778
-37525
-6069

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

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

query I rowsort
SELECT ALL + - 63 FROM tab0 cor0
----
-63
-63
-63

query I rowsort
SELECT - + 77 - col0 FROM tab2 AS cor0
----
-155
-156
-84

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

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

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

skipif mysql # not compatible
query I rowsort label-1371
SELECT + CAST ( + 3 AS INTEGER ) * + col2 AS col2 FROM tab0 AS cor0
----
246
3
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1372
SELECT - CAST( + col2 AS SIGNED ) * - cor0.col0 + + col1 * - 78 FROM tab0 AS cor0
----
-5916
-7531
200

skipif mysql # not compatible
query I rowsort label-1372
SELECT - CAST ( + col2 AS INTEGER ) * - cor0.col0 + + col1 * - 78 FROM tab0 AS cor0
----
-5916
-7531
200

onlyif mysql # use DIV operator for integer division
query I rowsort label-1373
SELECT + col0 + - 32 * + col0 - + cor0.col1 * + col0 DIV + cor0.col0 FROM tab2 AS cor0
----
-2466
-2477
-248

skipif mysql # not compatible
query I rowsort label-1373
SELECT + col0 + - 32 * + col0 - + cor0.col1 * + col0 / + cor0.col0 FROM tab2 AS cor0
----
-2466
-2477
-248

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

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

query I rowsort
SELECT - col0 * + 79 + cor0.col1 AS col2 FROM tab1 AS cor0
----
-211
-5046
-6307

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1377
SELECT ALL CAST( 60 AS SIGNED ) * col2 FROM tab0
----
1980
4920
60

skipif mysql # not compatible
query I rowsort label-1377
SELECT ALL CAST ( 60 AS INTEGER ) * col2 FROM tab0
----
1980
4920
60

query I rowsort
SELECT + - 64 * + col2 * 34 AS col1 FROM tab2 AS cor0
----
-56576
-58752
-82688

onlyif mysql # use DIV operator for integer division
query I rowsort label-1379
SELECT cor0.col0 * - col2 + - 7 + - col1 DIV + col0 AS col1 FROM tab2 AS cor0
----
-200
-2035
-3009

skipif mysql # not compatible
query I rowsort label-1379
SELECT cor0.col0 * - col2 + - 7 + - col1 / + col0 AS col1 FROM tab2 AS cor0
----
-200
-2035
-3009

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1381
SELECT ALL + ( col0 ) DIV - CAST( + 83 AS SIGNED ) FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1381
SELECT ALL + ( col0 ) / - CAST ( + 83 AS INTEGER ) FROM tab0 AS cor0
----
-1
0
0

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

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

query I rowsort
SELECT ALL 60 FROM tab1, tab1 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT 52 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 76100d10f51995d20efdeb657e444d3c

onlyif mysql # use DIV operator for integer division
query I rowsort label-1386
SELECT DISTINCT - - col2 DIV col1 + - 17 * col0 FROM tab0 cor0
----
-1513
-408
-595

skipif mysql # not compatible
query I rowsort label-1386
SELECT DISTINCT - - col2 / col1 + - 17 * col0 FROM tab0 cor0
----
-1513
-408
-595

query I rowsort
SELECT ALL - - col2 * + ( cor0.col1 ) - col1 FROM tab2 AS cor0
----
1475
629
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-1388
SELECT ALL + CAST( cor0.col0 AS SIGNED ) DIV col2 AS col0 FROM tab1 AS cor0
----
0
0
1

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

query I rowsort
SELECT ALL - col1 * cor0.col2 + - col0 * - col1 - col0 FROM tab1 AS cor0
----
-1329
-288
6

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

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

query I rowsort
SELECT ALL + ( 99 ) FROM tab0
----
99
99
99

query I rowsort
SELECT - col0 * 76 AS col1 FROM tab1
----
-228
-4864
-6080

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

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

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

query I rowsort
SELECT ALL 36 AS col1 FROM tab1 cor0
----
36
36
36

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

query I rowsort
SELECT 2 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT ALL 36 FROM tab2, tab0 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + col0 AS REAL ) + col0 AS col0 FROM tab1 AS cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1400
SELECT DISTINCT 81 DIV + col2 + + col1 FROM tab1
----
11
13
27

skipif mysql # not compatible
query I rowsort label-1400
SELECT DISTINCT 81 / + col2 + + col1 FROM tab1
----
11
13
27

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

query I rowsort
SELECT ALL 74 * + col1 AS col0 FROM tab0
----
6364
6734
7178

query I rowsort
SELECT - - 23 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-63
-68
-74

query I rowsort
SELECT 17 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT - + 42 + col0 + + 85 FROM tab0 AS cor0
----
132
67
78

query I rowsort
SELECT - col0 + cor0.col1 + col1 FROM tab1 AS cor0
----
-44
-54
49

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

query I rowsort
SELECT + + col2 * 61 AS col0 FROM tab1 AS cor0
----
3294
3477
5856

query I rowsort
SELECT + + col2 * 65 AS col1 FROM tab2 AS cor0
----
1690
1755
2470

query I rowsort
SELECT - col0 * 82 FROM tab0 cor0
----
-1968
-2870
-7298

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

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

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

query I rowsort
SELECT col2 + + col1 * + 8 FROM tab1 AS cor0
----
137
200
262

query I rowsort
SELECT ALL - - 47 * cor0.col1 + + col0 * ( cor0.col2 ) AS col1 FROM tab1 AS cor0
----
1384
4118
8291

query I rowsort
SELECT + + 17 FROM tab2 cor0
----
17
17
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-1417
SELECT DISTINCT + + col0 DIV + col0 + + col2 * 95 + + col2 AS col1 FROM tab2 AS cor0
----
2497
2593
3649

skipif mysql # not compatible
query I rowsort label-1417
SELECT DISTINCT + + col0 / + col0 + + col2 * 95 + + col2 AS col1 FROM tab2 AS cor0
----
2497
2593
3649

onlyif mysql # use DIV operator for integer division
query I rowsort label-1418
SELECT ALL col1 DIV col1 + col0 * cor0.col0 AS col0 FROM tab1 AS cor0
----
10
4097
6401

skipif mysql # not compatible
query I rowsort label-1418
SELECT ALL col1 / col1 + col0 * cor0.col0 AS col0 FROM tab1 AS cor0
----
10
4097
6401

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 + + col2 col2 FROM tab2 cor0
----
25
26
37

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

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

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

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

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

query I rowsort
SELECT - 54 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

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

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) + col0 + + 62 AS col1 FROM tab1 AS cor0
----
136
155
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-1428
SELECT ALL + - 22 DIV 60 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1428
SELECT ALL + - 22 / 60 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 77 + + col1 AS col0 FROM tab0 AS cor0
----
163
168
174

query I rowsort
SELECT ALL ( - 74 ) * col1 + ( + col0 ) FROM tab1 cor0
----
-1921
-676
-882

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

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

query I rowsort
SELECT DISTINCT + ( - ( + col2 ) ) * + col1 * + col2 + - col2 AS col2 FROM tab1 AS cor0
----
-119904
-32547
-75870

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

query I rowsort
SELECT ALL 47 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1, tab2 cor0, tab0 cor1
----
972 values hashing to 58757c5bbbd4217c03cf2ac0b6126e55

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

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

query I rowsort
SELECT col1 * - col0 + + col1 * col0 + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT ( 91 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

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

query I rowsort
SELECT DISTINCT + col0 * col1 + + tab1.col0 + + col2 AS col1 FROM tab1
----
1216
135
761

onlyif mysql # use DIV operator for integer division
query I rowsort label-1442
SELECT DISTINCT + col2 * 15 + 60 DIV col0 FROM tab2
----
390
413
570

skipif mysql # not compatible
query I rowsort label-1442
SELECT DISTINCT + col2 * 15 + 60 / col0 FROM tab2
----
390
413
570

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

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

skipif mysql # not compatible
query I rowsort label-1444
SELECT ALL CAST ( NULL AS INTEGER ) / + 79 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 63 + col0 * col0 FROM tab0 cor0
----
1288
639
7984

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

query I rowsort
SELECT ALL - - cor0.col0 * + 95 FROM tab0 AS cor0
----
2280
3325
8455

query I rowsort
SELECT DISTINCT 56 + + col2 * col0 AS col1 FROM tab2 AS cor0
----
2084
245
3058

query I rowsort
SELECT ALL + 62 * - col0 * col1 + col1 AS col2 FROM tab2 AS cor0
----
-13423
-285265
-83249

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

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

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

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

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

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

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

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

query I rowsort
SELECT - - 61 * 98 FROM tab1 AS cor0
----
5978
5978
5978

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1458
SELECT ( col0 ) * col2 + + ( - col2 + col2 ) DIV + ( col2 ) FROM tab1
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-1458
SELECT ( col0 ) * col2 + + ( - col2 + col2 ) / + ( col2 ) FROM tab1
----
162
3648
7680

query I rowsort
SELECT - 58 * + col2 + - col0 * - col0 FROM tab2
----
-1517
4037
4576

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

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

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

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

query I rowsort
SELECT + col0 * 44 FROM tab0 AS cor0
----
1056
1540
3916

query I rowsort
SELECT ALL ( cor0.col2 ) * ( + 73 ) * - col0 FROM tab1 AS cor0
----
-11826
-266304
-560640

query I rowsort
SELECT DISTINCT + 85 - - col2 AS col0 FROM tab1 AS cor0
----
139
142
181

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

query I rowsort
SELECT ALL + + col1 * col2 * col0 + - ( + col0 ) * col0 FROM tab1 AS cor0
----
32384
4203
93440

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

query I rowsort
SELECT - col0 * col1 + + 20 FROM tab1 AS cor0
----
-1020
-58
-620

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

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

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

query I rowsort
SELECT - cor0.col2 + col2 * - col2 AS col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL + col0 * + col0 + + col0 AS col1 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT - - cor0.col0 + + 10 FROM tab0 AS cor0
----
34
45
99

query I rowsort
SELECT DISTINCT + col1 + - col0 + + col2 FROM tab1
----
29
3
77

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1478
SELECT DISTINCT + col0 * - CAST( 78 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-546
-6084
-6162

skipif mysql # not compatible
query I rowsort label-1478
SELECT DISTINCT + col0 * - CAST ( 78 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-546
-6084
-6162

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

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

query I rowsort
SELECT DISTINCT + col1 - 39 * 80 AS col1 FROM tab0 AS cor0
----
-3023
-3029
-3034

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1484
SELECT - col1 + CAST( + 46 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-40
-45
-51

skipif mysql # not compatible
query I rowsort label-1484
SELECT - col1 + CAST ( + 46 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-40
-45
-51

query I rowsort
SELECT ALL + col0 + col2 * 98 AS col0 FROM tab0 cor0
----
133
3258
8125

query I rowsort
SELECT - col2 * 22 + + col0 FROM tab0 AS cor0
----
-1715
-702
13

query I rowsort
SELECT DISTINCT - - 91 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
2366
2457
3458

query I rowsort
SELECT ALL 55 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT col0 * ( 49 + - col1 ) FROM tab2
----
-780
126
2528

query I rowsort
SELECT ALL col2 * 71 FROM tab2
----
1846
1917
2698

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

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

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

query I rowsort
SELECT + 96 * 14 FROM tab0 cor0
----
1344
1344
1344

query I rowsort
SELECT - cor0.col0 + + cor0.col2 - - cor0.col1 FROM tab0 AS cor0
----
63
84
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-1496
SELECT + - 55 * + cor0.col0 * cor0.col2 + col1 - + col1 DIV col0 AS col0 FROM tab0 AS cor0
----
-1830
-401300
-43477

skipif mysql # not compatible
query I rowsort label-1496
SELECT + - 55 * + cor0.col0 * cor0.col2 + col1 - + col1 / col0 AS col0 FROM tab0 AS cor0
----
-1830
-401300
-43477

query I rowsort
SELECT + 51 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
-1326
-510
-663

query I rowsort
SELECT + 22 * + col0 FROM tab0 AS cor0
----
1958
528
770

onlyif mysql # use DIV operator for integer division
query I rowsort label-1499
SELECT ALL col2 * col1 DIV CAST( + col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
10
13
26

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1500
SELECT ALL col0 DIV col1 + col1 FROM tab2
----
21
31
60

skipif mysql # not compatible
query I rowsort label-1500
SELECT ALL col0 / col1 + col1 FROM tab2
----
21
31
60

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

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

query I rowsort
SELECT - tab0.col0 * 47 FROM tab0, tab0 AS cor0
----
9 values hashing to 8c4c0e3dfc44d87faccc12bff7bad5bf

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

query I rowsort
SELECT + 80 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

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

query I rowsort
SELECT DISTINCT + col1 - - ( 86 * - col2 ) FROM tab1 cor0
----
-4618
-4892
-8243

query I rowsort
SELECT ALL - cor1.col1 * + 63 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 727559296eb3cde53fae38266ab5c3d7

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + 43 * 39 col2 FROM tab0
----
1580
1586
1591

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1513
SELECT ALL - CAST( NULL AS DECIMAL ) FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1513
SELECT ALL - CAST ( NULL AS REAL ) FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + col0 * + ( + 42 ) + col0 AS col2 FROM tab1
----
129
2752
3440

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1516
SELECT DISTINCT CAST( + col1 * col1 AS SIGNED ) AS col1 FROM tab1
----
100
169
676

skipif mysql # not compatible
query I rowsort label-1516
SELECT DISTINCT CAST ( + col1 * col1 AS INTEGER ) AS col1 FROM tab1
----
100
169
676

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1518
SELECT col2 * col0 DIV + col1 AS col0 FROM tab1
----
364
590
6

skipif mysql # not compatible
query I rowsort label-1518
SELECT col2 * col0 / + col1 AS col0 FROM tab1
----
364
590
6

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

query I rowsort
SELECT ALL 80 * col1 + col0 FROM tab0 AS cor0
----
6904
7369
7795

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 * col0 col0 FROM tab2 AS cor0
----
364
4056
4108

query I rowsort
SELECT ( - 22 ) * col2 FROM tab0
----
-1804
-22
-726

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

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

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

query I rowsort
SELECT - tab0.col0 - 35 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 518432159dfd47d25bb7b8420dc72034

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

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

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

query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - col0 * + col1 - + col0 * ( + col2 + 7 ) * col0 AS col2 FROM tab0 cor0
----
-13195
-25104
-713068

query I rowsort
SELECT ALL + 75 + + col2 * col2 - - 22 AS col1 FROM tab1 AS cor0
----
3013
3346
9313

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

query I rowsort
SELECT + 59 + + col2 FROM tab0 cor0
----
141
60
92

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1535
SELECT + - col0 * - col2 + + col2 DIV - col1 FROM tab1 AS cor0
----
160
3643
7673

skipif mysql # not compatible
query I rowsort label-1535
SELECT + - col0 * - col2 + + col2 / - col1 FROM tab1 AS cor0
----
160
3643
7673

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1536
SELECT - + col2 / cor0.col1 col2 FROM tab2 AS cor0
----
-2
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1537
SELECT DISTINCT - col0 + - col0 DIV col2 + col2 col2 FROM tab0
----
-69
-8
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1537
SELECT DISTINCT - col0 + - col0 / col2 + col2 col2 FROM tab0
----
-69
-8
9

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

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

query I rowsort
SELECT ALL col2 + col0 + col2 AS col0 FROM tab0
----
253
37
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col0 * + col0 col0 FROM tab1
----
35
4106
6413

query I rowsort
SELECT DISTINCT + col0 + - col0 * - col1 * + col0 FROM tab0
----
118860
49560
720900

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

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

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

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

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

query I rowsort
SELECT 64 * col0 - + col1 AS col0 FROM tab1 AS cor0
----
166
4086
5107

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 - col0 * - cor0.col1 * - col2 col1 FROM tab2 AS cor0
----
-119574
-50955
-5852

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col1 + + col2 col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL col1 * col1 + - col0 * - col1 AS col1 FROM tab1 AS cor0
----
1209
740
754

query I rowsort
SELECT ( 41 ) AS col1 FROM tab2
----
41
41
41

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

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

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

query I rowsort
SELECT ALL 3 * col1 * + col2 - col0 * col0 * col2 AS col0 FROM tab0
----
-10494
-627136
-934

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

query I rowsort
SELECT ALL - - 56 + col0 * col0 + + col2 * cor0.col2 FROM tab1 cor0
----
15672
2981
7401

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

query I rowsort
SELECT DISTINCT + col2 * col1 - col2 * - col1 FROM tab2 AS cor0
----
1292
1674
3068

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( - 50 + + col0 AS REAL ) * col1 AS col2 FROM tab0
----
-3549
1455
2236

query I rowsort
SELECT DISTINCT + 75 * 72 AS col2 FROM tab2
----
5400

query I rowsort
SELECT 65 - tab1.col2 AS col2 FROM tab1
----
-31
11
8

query I rowsort
SELECT DISTINCT - col0 * - col1 * + col2 + col2 AS col1 FROM tab1
----
36537
4266
99936

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * col1 + col2 + col0 col0 FROM tab2 AS cor0
----
-1226
-183
-4498

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

query I rowsort
SELECT - - 91 + col0 AS col2 FROM tab1 AS cor0
----
155
171
94

query I rowsort
SELECT + 9 + col2 * col0 AS col2 FROM tab2 AS cor0
----
198
2037
3011

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

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

query I rowsort
SELECT - col1 * col2 * col2 + col1 AS col0 FROM tab1
----
-119795
-32480
-75790

query I rowsort
SELECT DISTINCT + col2 + - col0 * col0 - - col1 AS col1 FROM tab0
----
-1127
-457
-7748

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1577
SELECT ALL col2 DIV col1 col2 FROM tab1
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1577
SELECT ALL col2 / col1 col2 FROM tab1
----
2
5
7

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

skipif mysql # not compatible
query I rowsort label-1578
SELECT tab2.col1 / - col1 FROM tab2
----
-1
-1
-1

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE - col0 * col1 - + col0 <= - tab2.col0 * + tab2.col0
----
7
31
27

query I rowsort
SELECT - col0 * col2 * col0 + tab2.col0 AS col1 FROM tab2
----
-1316
-158106
-237079

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col1 * col2 col2 FROM tab0
----
611884
93654
97

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

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

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

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

query I rowsort
SELECT col1 * col1 + - col0 AS col1 FROM tab2
----
210
3403
954

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

query I rowsort
SELECT - col0 * - col0 * + tab0.col2 + - col0 FROM tab0
----
1190
18984
649433

onlyif mysql # use DIV operator for integer division
query I rowsort label-1589
SELECT DISTINCT + tab0.col0 * col2 + + col2 DIV - col2 FROM tab0
----
34
7297
791

skipif mysql # not compatible
query I rowsort label-1589
SELECT DISTINCT + tab0.col0 * col2 + + col2 / - col2 FROM tab0
----
34
7297
791

query I rowsort
SELECT ALL col1 * col0 * col2 + + tab0.col0 FROM tab0
----
3430
664207
68136

query I rowsort
SELECT ALL - col1 * col1 + - col1 * - col2 AS col0 FROM tab0
----
-4558
-819
-9312

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

query I rowsort
SELECT DISTINCT col2 + col1 * - col0 * + tab2.col1 AS col2 FROM tab2
----
-22793
-271492
-6700

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

query I rowsort
SELECT col0 * - col0 * col2 + - col1 FROM tab0
----
-1322
-19094
-649613

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

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

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

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

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

query I rowsort
SELECT + cor0.col2 * col1 - col0 * col0 AS col1 FROM tab0 AS cor0
----
-1128
-459
2262

query I rowsort
SELECT ALL - cor0.col2 * col2 - col0 FROM tab0 AS cor0
----
-1113
-36
-6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-1603
SELECT DISTINCT col1 + + col1 DIV col1 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-1603
SELECT DISTINCT col1 + + col1 / col1 FROM tab0 AS cor0
----
87
92
98

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

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

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

query I rowsort
SELECT DISTINCT - 64 + col0 * col2 AS col2 FROM tab2 AS cor0
----
125
1964
2938

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 + col2 col2 FROM tab2 AS cor0
----
55
56
67

query I rowsort
SELECT ALL + - 87 + col2 FROM tab1 AS cor0
----
-30
-33
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 83 * + col1 col0 FROM tab2 AS cor0
----
-1411
-2573
-4897

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

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

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

query I rowsort
SELECT col0 + cor0.col2 - 92 AS col2 FROM tab0 AS cor0
----
-35
-56
79

query I rowsort
SELECT + col2 + + 36 + col2 FROM tab1 AS cor0
----
144
150
228

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

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

query I rowsort
SELECT DISTINCT + + col0 * 27 AS col0 FROM tab2 AS cor0
----
189
2106
2133

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

skipif mysql # not compatible
query I rowsort label-1619
SELECT - - col1 / 88 AS col0 FROM tab0 AS cor0
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + 73 col0 FROM tab0 AS cor0
----
-9
40
72

query I rowsort
SELECT 14 + ( col1 ) FROM tab0 AS cor0
----
100
105
111

query I rowsort
SELECT + - 11 * col0 AS col0 FROM tab1 AS cor0
----
-33
-704
-880

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

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

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

query I rowsort
SELECT + 0 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT - 97 * cor0.col0 AS col1 FROM tab0, tab2 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to 3f1fef89ccac88d33255e1ec8f1df290

query I rowsort
SELECT ALL 75 * col2 + col0 AS col0 FROM tab2
----
2028
2032
2929

query I rowsort
SELECT ALL - col2 * col1 + - col0 * - col0 FROM tab1 AS cor0
----
-1395
3526
5152

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

query I rowsort
SELECT 0 * - col1 - col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT 98 * + 77 - - cor0.col2 AS col1 FROM tab2 AS cor0
----
7572
7573
7584

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

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

query I rowsort
SELECT DISTINCT - 51 + col0 AS col1 FROM tab2 AS cor0
----
-44
27
28

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

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

query I rowsort
SELECT - col2 + 93 FROM tab0 AS cor0
----
11
60
92

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

query I rowsort
SELECT DISTINCT col2 * 99 FROM tab0 AS cor0
----
3267
8118
99

query I rowsort
SELECT ALL - + 5 * + col2 FROM tab1 AS cor0
----
-270
-285
-480

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

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

query I rowsort
SELECT DISTINCT - - col1 + + 16 + + col2 AS col0 FROM tab0 AS cor0
----
114
135
189

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

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

skipif mysql # not compatible
query I rowsort label-1644
SELECT + col1 / + 49 FROM tab0 AS cor0
----
1
1
1

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

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

query I rowsort
SELECT DISTINCT + cor0.col1 * 22 AS col2 FROM tab1, tab2, tab2 AS cor0
----
1298
374
682

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

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

skipif mysql # not compatible
query I rowsort label-1648
SELECT ALL - col1 - + ( col2 ) / col1 AS col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT ALL col1 - 82 * + 48 FROM tab0
----
-3839
-3845
-3850

query I rowsort
SELECT DISTINCT + ( 5 ) FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
5

query I rowsort
SELECT DISTINCT col2 * col1 + + col1 AS col2 FROM tab1
----
1261
1430
580

query I rowsort
SELECT DISTINCT col2 * - col0 + col2 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT - 82 * + col0 FROM tab2
----
-574
-6396
-6478

query I rowsort
SELECT + 44 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT ( - col2 ) * - 75 * col0 + - col0 - 74 * + col0 * col1 AS col1 FROM tab2 AS cor0
----
-188526
-1890
125689

query I rowsort
SELECT + col1 + col1 * col2 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + col2 + col0 + + 61 * cor0.col1 AS col0 FROM tab1 cor0
----
1643
731
969

query I rowsort
SELECT DISTINCT + 80 + col0 FROM tab0 AS cor0
----
104
115
169

query I rowsort
SELECT ALL col1 * 46 AS col1 FROM tab0 AS cor0
----
3956
4186
4462

query I rowsort
SELECT + col1 * - col0 + + col1 FROM tab1 cor0
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT - cor0.col1 + - ( 24 ) FROM tab1 AS cor0
----
-34
-37
-50

query I rowsort
SELECT + col1 * col0 * + col1 AS col0 FROM tab2 cor0
----
22831
271518
6727

query I rowsort
SELECT DISTINCT col2 * 91 AS col1 FROM tab2 AS cor0
----
2366
2457
3458

query I rowsort
SELECT + col2 * ( ( col0 ) * col1 ) FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT ALL - col0 * + 76 AS col0 FROM tab2
----
-532
-5928
-6004

query I rowsort
SELECT DISTINCT - - col0 * + col2 + col0 * 28 AS col2 FROM tab1 AS cor0
----
246
5440
9920

query I rowsort
SELECT - - ( + col1 ) * col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - 51 + + ( col0 + - ( cor0.col0 ) ) * col1 FROM tab1 AS cor0
----
-51
-51
-51

query I rowsort
SELECT ALL + ( 17 ) + col2 * + 97 FROM tab0 AS cor0
----
114
3218
7971

query I rowsort
SELECT DISTINCT + col2 * + col0 * cor0.col1 + - col1 * 22 FROM tab1 AS cor0
----
36260
3640
99554

query I rowsort
SELECT ALL - 36 + col0 AS col1 FROM tab0 AS cor0
----
-1
-12
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1672
SELECT ALL CAST( 68 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
68
68
68

skipif mysql # not compatible
query I rowsort label-1672
SELECT ALL CAST ( 68 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
68
68
68

query I rowsort
SELECT - 27 * - col0 AS col0 FROM tab1 AS cor0
----
1728
2160
81

query I rowsort
SELECT DISTINCT + 78 AS col2 FROM tab0 AS cor0
----
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1675
SELECT DISTINCT col0 DIV - col1 FROM tab1 AS cor0
----
-6
0

skipif mysql # not compatible
query I rowsort label-1675
SELECT DISTINCT col0 / - col1 FROM tab1 AS cor0
----
-6
0

query I rowsort
SELECT - - 22 * col1 + + 30 FROM tab0 AS cor0
----
1922
2032
2164

query I rowsort
SELECT DISTINCT + col1 * col2 * ( col0 ) FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT ALL ( + cor0.col1 ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + - 2 FROM tab2 AS cor0
----
-2

query I rowsort
SELECT + ( + col2 ) * 99 + - 7 AS col1 FROM tab1 AS cor0
----
5339
5636
9497

query I rowsort
SELECT ALL + 28 + col2 * - 29 FROM tab1 AS cor0
----
-1538
-1625
-2756

query I rowsort
SELECT + - 4 * + col1 - col2 AS col1 FROM tab2 AS cor0
----
-106
-151
-262

query I rowsort
SELECT ALL 84 * col1 * - cor0.col1 + - col2 AS col2 FROM tab1 AS cor0
----
-14292
-56838
-8457

query I rowsort
SELECT - ( cor0.col1 ) * - col1 + col0 AS col1 FROM tab0 AS cor0
----
7420
8370
9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-1685
SELECT DISTINCT col2 * col0 + - col1 DIV - 96 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-1685
SELECT DISTINCT col2 * col0 + - col1 / - 96 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + col1 * + col0 - cor0.col2 * col2 AS col2 FROM tab0 AS cor0
----
1375
3394
975

query I rowsort
SELECT 36 * + col0 + - col2 FROM tab1
----
2247
2784
54

query I rowsort
SELECT DISTINCT + 52 + - col1 * - col2 * + col0 FROM tab2 AS cor0
----
119704
51086
5911

onlyif mysql # use DIV operator for integer division
query I rowsort label-1689
SELECT ALL - 52 DIV + col0 FROM tab0 cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-1689
SELECT ALL - 52 / + col0 FROM tab0 cor0
----
-1
-2
0

query I rowsort
SELECT DISTINCT cor0.col1 + - col1 * + 84 FROM tab0 AS cor0
----
-7138
-7553
-8051

query I rowsort
SELECT DISTINCT - 9 FROM tab1 AS cor0
----
-9

query I rowsort
SELECT DISTINCT 94 * col1 FROM tab1
----
1222
2444
940

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1693
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-1693
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0, tab0 AS cor1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1694
SELECT - - cor0.col1 DIV col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1694
SELECT - - cor0.col1 / col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ALL 98 * cor0.col1 FROM tab0 cor0
----
8428
8918
9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1696
SELECT DISTINCT 42 + - cor0.col2 * + CAST( col0 AS SIGNED ) * col1 col2 FROM tab1 AS cor0
----
-36438
-4170
-99798

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1696
SELECT DISTINCT 42 + - cor0.col2 * + CAST ( col0 AS INTEGER ) * col1 col2 FROM tab1 AS cor0
----
-36438
-4170
-99798

query I rowsort
SELECT 0 * + col1 FROM tab0 AS cor0
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab1 cor1, tab0 AS cor2
----
972 values hashing to e84152c0bf436177d3b3d80e42832d4f

query I rowsort
SELECT ALL - 16 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 6a726f8493b62c5d4e1dd657007160c3

query I rowsort
SELECT - ( - col0 ) * - ( cor0.col0 ) + col2 AS col0 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT + cor0.col0 * - cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col2 * tab0.col1 * - 65 FROM tab0
----
184470
485030
6305

query I rowsort
SELECT + col1 * col0 - col1 * col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * - col2 + cor0.col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + cor0.col0 * - 81 FROM tab1 AS cor0
----
-243
-5184
-6480

query I rowsort
SELECT DISTINCT col0 * tab2.col0 + col1 FROM tab2
----
6143
6258
80

query I rowsort
SELECT - col0 * col2 * + 77 FROM tab2
----
-14553
-156156
-231154

query I rowsort
SELECT col0 * col0 * col1 - - col0 * - 11 FROM tab2
----
105228
1442
358098

query I rowsort
SELECT DISTINCT + 76 + + col2 AS col2 FROM tab0 AS cor0
----
109
158
77

query I rowsort
SELECT - col2 + col2 * col1 * col2 AS col0 FROM tab2 cor0
----
22572
24510
39858

query I rowsort
SELECT col0 * - ( - col1 ) * - col1 + col1 FROM tab0
----
-177418
-329218
-736918

onlyif mysql # use DIV operator for integer division
query I rowsort label-1712
SELECT - tab2.col2 * col0 + col1 DIV col0 col2 FROM tab2
----
-185
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1712
SELECT - tab2.col2 * col0 + col1 / col0 col2 FROM tab2
----
-185
-2028
-3002

query I rowsort
SELECT ALL + col0 * ( - col2 ) + col2 AS col0 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT col0 * + 47 + - 12 AS col2 FROM tab0
----
1116
1633
4171

query I rowsort
SELECT DISTINCT - col0 + 91 FROM tab1
----
11
27
88

query I rowsort
SELECT + ( - tab0.col1 * col2 + 10 * + 38 ) FROM tab0
----
-2458
-7082
283

query I rowsort
SELECT DISTINCT col1 * - 97 FROM tab0 AS cor0
----
-8342
-8827
-9409

query I rowsort
SELECT DISTINCT - + cor0.col1 + 84 AS col1 FROM tab0 AS cor0
----
-13
-2
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1719
SELECT ALL - 19 + - col0 DIV cor0.col0 FROM tab1 AS cor0
----
-20
-20
-20

skipif mysql # not compatible
query I rowsort label-1719
SELECT ALL - 19 + - col0 / cor0.col0 FROM tab1 AS cor0
----
-20
-20
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 - + col2 col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - + 59 AS col2 FROM tab1 AS cor0
----
-59
-59
-59

query I rowsort
SELECT DISTINCT 20 + ( col2 ) FROM tab0 AS cor0
----
102
21
53

query I rowsort
SELECT ALL - - col2 * col0 - + col2 AS col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT - col1 - 97 FROM tab2 AS cor0
----
-114
-128
-156

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * cor0.col0 col1 FROM tab1 AS cor0
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + - col0 + - col0 col0 FROM tab1 AS cor0
----
-64
-71
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + 20 col1 FROM tab1 AS cor0
----
30
33
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-1728
SELECT + 69 DIV + col0 col2 FROM tab2
----
0
0
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1728
SELECT + 69 / + col0 col2 FROM tab2
----
0
0
9

query I rowsort
SELECT DISTINCT - col2 * col0 * 48 FROM tab1
----
-175104
-368640
-7776

query I rowsort
SELECT + col2 + tab1.col0 * 28 FROM tab1
----
138
1849
2336

query I rowsort
SELECT ALL col0 + + col2 * - col2 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT col0 * + ( 29 ) FROM tab2
----
203
2262
2291

query I rowsort
SELECT DISTINCT 62 AS col0 FROM tab1, tab2 AS cor0
----
62

query I rowsort
SELECT ALL - 69 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to ca5f4bc365dc2c6b14187d6ffc83a01d

query I rowsort
SELECT cor0.col2 * - 9 FROM tab2 cor0
----
-234
-243
-342

query I rowsort
SELECT + col1 * - col0 + + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT + cor0.col1 + + ( ( - col0 ) ) FROM tab0 AS cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-1738
SELECT + col2 DIV col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1738
SELECT + col2 / col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL + 70 * - cor0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to be1ff594f014e408d3b7bcbcd96cc22f

onlyif mysql # use DIV operator for integer division
query I rowsort label-1740
SELECT DISTINCT + col0 * - tab2.col1 + col0 DIV + 96 AS col0 FROM tab2
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-1740
SELECT DISTINCT + col0 * - tab2.col1 + col0 / + 96 AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - ( - 16 ) * tab2.col2 FROM tab2
----
416
432
608

query I rowsort
SELECT ALL - 91 * cor0.col1 FROM tab1 AS cor0
----
-1183
-2366
-910

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1743
SELECT DISTINCT - - CAST( NULL AS SIGNED ) / col0 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1743
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) / col0 AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL 15 + - col2 * cor0.col1 FROM tab1 AS cor0
----
-1233
-1389
-555

query I rowsort
SELECT ALL - col0 + ( col2 ) * + col0 AS col0 FROM tab1 cor0
----
159
3584
7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1746
SELECT ALL - 99 * col1 - CAST( - ( col2 ) AS SIGNED ) * + ( cor0.col2 ) AS col0 FROM tab2 AS cor0
----
-2340
-239
-5165

skipif mysql # not compatible
query I rowsort label-1746
SELECT ALL - 99 * col1 - CAST ( - ( col2 ) AS INTEGER ) * + ( cor0.col2 ) AS col0 FROM tab2 AS cor0
----
-2340
-239
-5165

query I rowsort
SELECT - ( - col1 ) - - col2 FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 5 col1 FROM tab2
----
5
5
5

query I rowsort
SELECT - col1 * col0 - 34 FROM tab1 AS cor0
----
-1074
-112
-674

query I rowsort
SELECT DISTINCT col1 * - col2 + tab2.col2 - + 38 AS col1 FROM tab2
----
-1546
-646
-848

query I rowsort
SELECT - col2 + tab1.col2 + + col2 * - tab1.col0 AS col1 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - col2 - - col2 FROM tab0
----
0

query I rowsort
SELECT 84 + + col2 * col1 - - col2 * + col2 AS col2 FROM tab2
----
1650
2174
2294

query I rowsort
SELECT ALL + col0 * + tab0.col1 AS col1 FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-1755
SELECT - + 21 DIV col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1755
SELECT - + 21 / col2 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1756
SELECT + col2 + - col1 DIV - 93 AS col2 FROM tab0 AS cor0
----
2
33
82

skipif mysql # not compatible
query I rowsort label-1756
SELECT + col2 + - col1 / - 93 AS col2 FROM tab0 AS cor0
----
2
33
82

query I rowsort
SELECT - - 30 AS col0 FROM tab0 AS cor0
----
30
30
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-1758
SELECT - - col0 DIV + 67 + + 23 DIV cor0.col1 AS col1 FROM tab1 AS cor0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-1758
SELECT - - col0 / + 67 + + 23 / cor0.col1 AS col1 FROM tab1 AS cor0
----
0
2
2

query I rowsort
SELECT ALL - cor0.col0 * ( col2 ) AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-1760
SELECT DISTINCT 16 DIV - 17 col1 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1760
SELECT DISTINCT 16 / - 17 col1 FROM tab1
----
0

query I rowsort
SELECT col2 * + col0 * - col1 - + col0 AS col2 FROM tab2
----
-119730
-51113
-5866

query I rowsort
SELECT DISTINCT + + col1 + 29 AS col0 FROM tab2 AS cor0
----
46
60
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-1763
SELECT DISTINCT + - ( - col2 ) DIV cor0.col1 - + col0 FROM tab2 AS cor0
----
-7
-77
-78

skipif mysql # not compatible
query I rowsort label-1763
SELECT DISTINCT + - ( - col2 ) / cor0.col1 - + col0 FROM tab2 AS cor0
----
-7
-77
-78

query I rowsort
SELECT ALL 47 FROM tab1, tab2 AS cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT + col2 * + 49 * + col1 + + col0 FROM tab2 cor0
----
31733
41020
75244

query I rowsort
SELECT DISTINCT + ( col1 ) + col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT cor0.col0 * - col0 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + - 91 + + col1 * - col0 AS col2 FROM tab0 AS cor0
----
-2155
-3486
-8190

query I rowsort
SELECT ALL col1 * 95 * - col2 FROM tab0
----
-269610
-708890
-9215

query I rowsort
SELECT ALL 24 FROM tab1, tab2 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT DISTINCT - - col2 * + col1 + col1 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ( + 14 + - col2 ) AS col2 FROM tab0
----
-19
-68
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-1773
SELECT DISTINCT - ( + col2 ) DIV - col2 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-1773
SELECT DISTINCT - ( + col2 ) / - col2 FROM tab1
----
1

query I rowsort
SELECT 58 AS col0 FROM tab2 cor0
----
58
58
58

query I rowsort
SELECT DISTINCT - 81 + cor0.col2 * - 93 AS col2 FROM tab2, tab2 AS cor0
----
-2499
-2592
-3615

query I rowsort
SELECT + 47 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT col0 + col2 + col0 FROM tab2
----
182
196
41

query I rowsort
SELECT ALL + 21 FROM tab0, tab1 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

query I rowsort
SELECT DISTINCT + 99 * col0 + - col0 FROM tab0
----
2352
3430
8722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 + col1 col1 FROM tab2
----
21
35
63

query I rowsort
SELECT - 14 * col1 * + col1 FROM tab2
----
-13454
-4046
-48734

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col2 ) + col2 col2 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL + + col2 - - col1 * col2 AS col1 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT + 79 + + cor0.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 3a35b3eb13156514ce6822d08335b841

query I rowsort
SELECT DISTINCT - 18 * col0 FROM tab2 AS cor0
----
-126
-1404
-1422

query I rowsort
SELECT - ( col0 ) + + col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT + 82 FROM tab1 cor0
----
82

query I rowsort
SELECT - ( ( + col0 ) ) FROM tab2
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-1789
SELECT + + ( - col1 ) - col1 DIV 73 col1 FROM tab2 cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1789
SELECT + + ( - col1 ) - col1 / 73 col1 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + + cor0.col0 - + cor0.col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT cor0.col2 + col1 * - 11 * cor0.col1 FROM tab1 AS cor0
----
-1043
-1763
-7382

query I rowsort
SELECT DISTINCT 65 * - col0 AS col2 FROM tab2 AS cor0
----
-455
-5070
-5135

query I rowsort
SELECT + + col1 + col1 * - 38 FROM tab1 AS cor0
----
-370
-481
-962

query I rowsort
SELECT + 43 * + col1 * + ( col1 ) AS col0 FROM tab1
----
29068
4300
7267

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1795
SELECT ALL + + col1 / CAST( NULL AS DECIMAL ) + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1795
SELECT ALL + + col1 / CAST ( NULL AS REAL ) + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * col2 * col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL - + col2 * - 0 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - col1 * 83 + - col1 - col1 FROM tab0 AS cor0
----
-7310
-7735
-8245

query I rowsort
SELECT ALL - col0 * + ( - col1 ) * col0 + col1 FROM tab1 AS cor0
----
260
40970
83213

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + + ( - cor0.col2 ) - - col1 col0 FROM tab1 cor0
----
-111
-163
-31

query I rowsort
SELECT ALL - col0 + - col0 * 32 AS col1 FROM tab1 AS cor0
----
-2112
-2640
-99

query I rowsort
SELECT - col0 * 70 * col0 AS col0 FROM tab1 AS cor0
----
-286720
-448000
-630

query I rowsort
SELECT ALL - + col2 * + col2 AS col1 FROM tab0 cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-1804
SELECT ALL + cor0.col1 DIV - col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-1804
SELECT ALL + cor0.col1 / - col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT + col2 * + 89 FROM tab0 AS cor0
----
2937
7298
89

query I rowsort
SELECT DISTINCT + - col1 * - ( + 52 ) FROM tab1 AS cor0
----
1352
520
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1807
SELECT - col0 * CAST( col0 AS SIGNED ) * col1 AS col0 FROM tab0
----
-118825
-49536
-720811

skipif mysql # not compatible
query I rowsort label-1807
SELECT - col0 * CAST ( col0 AS INTEGER ) * col1 AS col0 FROM tab0
----
-118825
-49536
-720811

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col2 * + CAST ( + col0 AS REAL ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT tab0.col2 + - 72 AS col0 FROM tab0, tab1, tab0 AS cor0
----
-39
-71
10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1810
SELECT DISTINCT + col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1810
SELECT DISTINCT + col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - col0 * - col2 + - col0 AS col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT + + col2 + + cor0.col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + - col1 * + 62 AS col2 FROM tab1 cor0
----
-1612
-620
-806

query I rowsort
SELECT ALL - col1 + ( col1 ) FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - cor0.col2 col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col1 + + col1 * - col2 AS col2 FROM tab2 cor0
----
-1593
-663
-868

query I rowsort
SELECT - - 11 * col2 FROM tab2 AS cor0
----
286
297
418

query I rowsort
SELECT - 67 * cor0.col0 FROM tab2 cor0
----
-469
-5226
-5293

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1819
SELECT DISTINCT + CAST( NULL AS SIGNED ) - + col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1819
SELECT DISTINCT + CAST ( NULL AS INTEGER ) - + col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + ( cor0.col0 ) * - col2 AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT + ( 72 ) AS col2 FROM tab1 AS cor0
----
72
72
72

query I rowsort
SELECT - 98 * cor0.col1 FROM tab2 cor0
----
-1666
-3038
-5782

onlyif mysql # use DIV operator for integer division
query I rowsort label-1823
SELECT col2 + 2 DIV + col0 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-1823
SELECT col2 + 2 / + col0 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL 98 * col0 FROM tab0 cor0
----
2352
3430
8722

query I rowsort
SELECT - col2 * cor0.col1 AS col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + cor0.col0 + + col2 * 77 + - col0 * - cor0.col0 FROM tab2 AS cor0
----
2135
8164
9246

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1827
SELECT DISTINCT col0 * col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1827
SELECT DISTINCT col0 * col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + + col1 * + col1 * - col1 + col1 AS col2 FROM tab2 AS cor0
----
-205320
-29760
-4896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 52 * - col0 col2 FROM tab0 AS cor0
----
-1248
-1820
-4628

query I rowsort
SELECT DISTINCT + col1 * col1 * + 15 FROM tab0 AS cor0
----
110940
124215
141135

onlyif mysql # use DIV operator for integer division
query I rowsort label-1831
SELECT ALL col2 DIV + col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1831
SELECT ALL col2 / + col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT + + ( - cor0.col0 ) * col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - col1 * - col2 + - 39 FROM tab2 AS cor0
----
1495
607
798

query I rowsort
SELECT + + col0 * col0 AS col0 FROM tab0 cor0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1835
SELECT ALL + 97 * + col1 + tab0.col1 * CAST( NULL AS SIGNED ) + - col0 / col0 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1835
SELECT ALL + 97 * + col1 + tab0.col1 * CAST ( NULL AS INTEGER ) + - col0 / col0 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 + + col2 * 8 AS col0 FROM tab2 AS cor0
----
130
209
225

query I rowsort
SELECT - col1 * - col0 * 56 AS col2 FROM tab1
----
35840
4368
58240

query I rowsort
SELECT col2 - col1 * + tab2.col0 AS col1 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT ALL - 30 * col0 + cor0.col0 * - cor0.col2 + col1 AS col1 FROM tab0 AS cor0
----
-1426
-9877
-988

query I rowsort
SELECT - + col0 + + ( - 71 ) AS col2 FROM tab0 cor0
----
-106
-160
-95

query I rowsort
SELECT ALL - col1 * - col2 * cor0.col0 + + col0 - 42 AS col1 FROM tab2 AS cor0
----
119688
51071
5824

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 + - col2 col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT col2 + - ( col1 ) * + col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL - + cor0.col0 * col0 AS col1 FROM tab2 cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-1845
SELECT - + col2 DIV cor0.col2 + + col2 AS col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-1845
SELECT - + col2 / cor0.col2 + + col2 AS col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT - cor0.col1 * - col2 + col2 AS col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL - col2 * 13 FROM tab1 AS cor0
----
-1248
-702
-741

query I rowsort
SELECT DISTINCT + ( + col2 ) * - col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT + - col2 * - ( col1 ) + + col0 AS col0 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-1850
SELECT - 0 DIV col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1850
SELECT - 0 / col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL col1 FROM tab2 WHERE NOT ( col1 ) > col0 * + col1 - - col2
----
17
31
59

query I rowsort
SELECT tab1.col0 * + col1 AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL tab0.col1 AS col1 FROM tab0 WHERE ( + col1 * + col2 ) < NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1854
SELECT col0 + col1 * tab2.col2 DIV - col1 FROM tab2
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-1854
SELECT col0 + col1 * tab2.col2 / - col1 FROM tab2
----
-20
41
52

query I rowsort
SELECT + col2 / + col2 AS col1 FROM tab0 WHERE NOT ( NULL ) IN ( col1 * col2 + col0 )
----

query I rowsort
SELECT ALL + col1 + + tab0.col0 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col2 FROM tab2 WHERE - col2 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT - col0 * tab1.col0 * + tab1.col1 + + col0 + + col2 FROM tab1
----
-177
-40839
-83024

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col0 * col0 col2 FROM tab0
----
-1190
-552
-7832

query I rowsort
SELECT ALL + col2 * col1 + col2 * col1 FROM tab2
----
1292
1674
3068

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col2 - + col2 col0 FROM tab1
----
1152
1350
513

query I rowsort
SELECT + col2 - + col2 * col1 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT tab0.col2 * + col0 + tab0.col1 FROM tab0
----
132
7389
878

query I rowsort
SELECT ALL col0 * + col2 + tab0.col2 AS col0 FROM tab0
----
36
7380
825

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT tab1.col2 BETWEEN col0 AND NULL
----
64
10
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col2 + col2 col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - col2 * col1 + - col1 * - col1 FROM tab1 WHERE NULL NOT BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - tab1.col2 col1 FROM tab1 WHERE - col2 * col2 IN ( tab1.col0 )
----

query I rowsort
SELECT ALL - col0 * + col2 + + tab0.col2 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT tab2.col2 * col2 + col0 - + tab2.col2 AS col0 FROM tab2
----
1485
709
728

query I rowsort
SELECT DISTINCT + col1 * - col0 * col0 + col0 AS col0 FROM tab0
----
-118790
-49512
-720722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 + col2 col1 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT + - cor0.col2 + - col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT + ( col0 ) * - ( + col1 ) + col0 AS col0 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT 56 * col1 + + ( + col2 ) FROM tab0 AS cor0
----
4849
5178
5433

query I rowsort
SELECT + - 62 * + col1 AS col1 FROM tab0 AS cor0
----
-5332
-5642
-6014

query I rowsort
SELECT ALL + cor0.col1 * col1 + 39 - + col0 FROM tab0 AS cor0
----
7411
8231
9413

query I rowsort
SELECT - col0 * 90 + - col1 FROM tab2
----
-661
-7079
-7127

query I rowsort
SELECT ALL ( - 3 ) FROM tab0
----
-3
-3
-3

query I rowsort
SELECT ALL ( col0 ) * - col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + 58 + col1 * 17 * + 8 AS col1 FROM tab2
----
2370
4274
8082

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col0 col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT DISTINCT - - ( + col2 ) + 31 - + cor0.col1 FROM tab1 AS cor0
----
114
59
78

query I rowsort
SELECT ALL - col0 + col1 + + col0 AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - col2 + + col0 * + col2 AS col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT - col1 + 1 - 0 AS col2 FROM tab2
----
-16
-30
-58

query I rowsort
SELECT DISTINCT - tab0.col1 * col0 + col1 AS col0 FROM tab0
----
-1978
-3298
-8008

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab0, tab0 cor1, tab2 AS cor2
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

onlyif mysql # use DIV operator for integer division
query I rowsort label-1889
SELECT - col1 + col1 DIV col1 AS col0 FROM tab0 cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-1889
SELECT - col1 + col1 / col1 AS col0 FROM tab0 cor0
----
-85
-90
-96

query I rowsort
SELECT + - col0 * ( col2 ) + - col1 * col2 AS col2 FROM tab2 AS cor0
----
-1026
-3562
-3648

query I rowsort
SELECT col1 + ( - tab2.col1 ) AS col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1892
SELECT DISTINCT + col1 - col0 DIV col1 AS col1 FROM tab2 cor0
----
13
31
58

skipif mysql # not compatible
query I rowsort label-1892
SELECT DISTINCT + col1 - col0 / col1 AS col1 FROM tab2 cor0
----
13
31
58

query I rowsort
SELECT + col2 + ( col2 ) FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT DISTINCT + + col0 * cor0.col0 + cor0.col0 FROM tab2 cor0
----
56
6162
6320

query I rowsort
SELECT ALL 36 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT ALL ( cor0.col1 ) * + col1 + + 24 AS col0 FROM tab2 AS cor0
----
313
3505
985

query I rowsort
SELECT DISTINCT + ( + col2 ) * + col2 + col2 + col2 FROM tab0 AS cor0
----
1155
3
6888

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 773bb916e463ebc075d701108532badb

query I rowsort
SELECT DISTINCT col2 * + col0 AS col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL 80 + + col2 FROM tab1 AS cor0
----
134
137
176

query I rowsort
SELECT 54 + + cor0.col0 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
1397
271
4656

query I rowsort
SELECT + cor0.col2 * - col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ( cor0.col2 ) * - col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - 26 * - col0 FROM tab1 AS cor0
----
1664
2080
78

query I rowsort
SELECT ALL col1 + col0 AS col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ( - col2 ) * col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 * + col2 col0 FROM tab0 AS cor0
----
231
574
7

query I rowsort
SELECT tab1.col1 * + col1 + col0 * + tab1.col0 FROM tab1
----
4196
6569
685

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1909
SELECT ALL - CAST( 2 AS SIGNED ) + col2 + - col2 * + col2 FROM tab1 AS cor0
----
-2864
-3194
-9122

skipif mysql # not compatible
query I rowsort label-1909
SELECT ALL - CAST ( 2 AS INTEGER ) + col2 + - col2 * + col2 FROM tab1 AS cor0
----
-2864
-3194
-9122

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * + ( col0 ) col1 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1911
SELECT - + CAST( + col1 AS SIGNED ) + - col2 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

skipif mysql # not compatible
query I rowsort label-1911
SELECT - + CAST ( + col1 AS INTEGER ) + - col2 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col0 AS REAL ) * - col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - ( - 38 ) * + col0 AS col1 FROM tab1 AS cor0
----
114
2432
3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1914
SELECT + CAST( NULL AS SIGNED ) * - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1914
SELECT + CAST ( NULL AS INTEGER ) * - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 40 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

onlyif mysql # use DIV operator for integer division
query I rowsort label-1916
SELECT - col0 DIV + 60 AS col2 FROM tab2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-1916
SELECT - col0 / + 60 AS col2 FROM tab2
----
-1
-1
0

query I rowsort
SELECT + col2 * col2 - - 10 AS col0 FROM tab0
----
1099
11
6734

query I rowsort
SELECT DISTINCT + col0 * col1 * col0 + - col2 FROM tab2
----
106059
1492
358930

onlyif mysql # use DIV operator for integer division
query I rowsort label-1919
SELECT ( 89 ) + - col2 DIV - col2 AS col0 FROM tab0
----
90
90
90

skipif mysql # not compatible
query I rowsort label-1919
SELECT ( 89 ) + - col2 / - col2 AS col0 FROM tab0
----
90
90
90

query I rowsort
SELECT ALL 42 + 62 FROM tab1
----
104
104
104

query I rowsort
SELECT DISTINCT + 8 * - col2 AS col2 FROM tab2 AS cor0
----
-208
-216
-304

query I rowsort
SELECT - - ( ( col2 ) ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT col2 * + col2 * - col1 + + col2 FROM tab1 AS cor0
----
-119712
-32433
-75762

query I rowsort
SELECT col2 * col1 + + col0 AS col0 FROM tab0
----
132
2862
7551

query I rowsort
SELECT + ( + col0 ) + - col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT col0 * - col1 * col1 AS col2 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT + col1 * col0 * col2 AS col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT + col2 + + col2 * col1 FROM tab1
----
1344
1458
627

query I rowsort
SELECT ALL - col0 FROM tab0 WHERE NULL = NULL
----

query I rowsort
SELECT ALL + col1 + + col0 FROM tab2 WHERE + col1 <= NULL
----

query I rowsort
SELECT DISTINCT col0 + - col0 AS col1 FROM tab1
----
0

query I rowsort
SELECT col0 * cor0.col1 + col2 * col1 AS col2 FROM tab0 AS cor0
----
15561
3492
4902

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE ( - col2 ) IN ( col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + tab0.col0 col0 FROM tab0
----
178
48
70

query I rowsort
SELECT - col1 * col2 * col2 AS col1 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT ALL col0 * col2 + col2 FROM tab2
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-1937
SELECT + tab2.col2 DIV tab2.col0 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-1937
SELECT + tab2.col2 / tab2.col0 FROM tab2
----
0
0
3

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 + col1 * - col0 * + col2 AS col1 FROM tab0 AS cor0
----
-3394
-657394
-67023

onlyif mysql # use DIV operator for integer division
query I rowsort label-1939
SELECT ALL + cor0.col2 DIV col0 AS col1 FROM tab2 cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-1939
SELECT ALL + cor0.col2 / col0 AS col1 FROM tab2 cor0
----
0
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-1940
SELECT DISTINCT - cor0.col1 + col0 + + col1 DIV col1 AS col1 FROM tab2 AS cor0
----
-23
20
63

skipif mysql # not compatible
query I rowsort label-1940
SELECT DISTINCT - cor0.col1 + col0 + + col1 / col1 AS col1 FROM tab2 AS cor0
----
-23
20
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col2 + - tab0.col0 * col2 col0 FROM tab0
----
-34
-574
297

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL NOT IN ( col1 ) AND - col2 + col0 NOT IN ( + col1 - + col0 * col1 * col0 )
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1943
SELECT ALL col0 * - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1943
SELECT ALL col0 * - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - 47 col1 FROM tab0
----
-1128
-1645
-4183

query I rowsort
SELECT + col1 + ( col1 ) FROM tab2 AS cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col1 * + col0 col1 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT DISTINCT - col0 * 89 FROM tab2
----
-623
-6942
-7031

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1948
SELECT + + CAST( + col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-1948
SELECT + + CAST ( + col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - 0 * 93 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 7 - tab1.col0 * + tab1.col0 AS col0 FROM tab1
----
-2
-4089
-6393

query I rowsort
SELECT - col2 + - ( + col2 + col1 ) FROM tab2 AS cor0
----
-111
-85
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) - - cor0.col1 col1 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT - 31 * col1 AS col2 FROM tab1 AS cor0
----
-310
-403
-806

query I rowsort
SELECT ALL cor0.col2 * + 66 AS col1 FROM tab2 cor0
----
1716
1782
2508

query I rowsort
SELECT + + col2 + + cor0.col1 * col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL 61 * 66 * - col2 AS col2 FROM tab1 AS cor0
----
-217404
-229482
-386496

query I rowsort
SELECT DISTINCT + 8 AS col2 FROM tab0 AS cor0
----
8

query I rowsort
SELECT ALL ( + col2 + col0 ) FROM tab1
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 + cor0.col1 * ( 27 * - col2 ) col0 FROM tab1 AS cor0
----
-15400
-33709
-37934

query I rowsort
SELECT + - cor0.col2 + - col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT + col2 * cor0.col0 * col2 + + col0 + col0 FROM tab1 cor0
----
208064
737440
8754

query I rowsort
SELECT - cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + + col1 + ( + col1 ) * col2 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1964
SELECT CAST( NULL AS DECIMAL ) AS col1 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-1964
SELECT CAST ( NULL AS REAL ) AS col1 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # use DIV operator for integer division
query I rowsort label-1965
SELECT col0 + - col0 DIV - 9 FROM tab1
----
3
71
88

skipif mysql # not compatible
query I rowsort label-1965
SELECT col0 + - col0 / - 9 FROM tab1
----
3
71
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1966
SELECT ALL - cor0.col2 + + CAST( NULL AS DECIMAL ) * col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1966
SELECT ALL - cor0.col2 + + CAST ( NULL AS REAL ) * col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1967
SELECT ALL col0 DIV cor0.col0 + col1 + - col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1967
SELECT ALL col0 / cor0.col0 + col1 + - col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT + cor0.col1 * col1 + col0 + + col1 FROM tab1 AS cor0
----
174
262
705

query I rowsort
SELECT ALL - + col2 * - 17 FROM tab0 AS cor0
----
1394
17
561

query I rowsort
SELECT + - col1 + 50 FROM tab0 cor0
----
-36
-41
-47

query I rowsort
SELECT + - cor0.col1 AS col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT ALL + - col2 + cor0.col1 * 90 FROM tab0 AS cor0
----
7707
8108
8729

query I rowsort
SELECT DISTINCT + cor0.col1 + col2 + 46 FROM tab0 cor0
----
144
165
219

query I rowsort
SELECT cor0.col1 + ( col0 ) * - col0 AS col2 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT ALL - col0 + ( + cor0.col2 ) AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col0 * col1 + col1 * + cor0.col0 FROM tab0 AS cor0
----
16198
4128
6790

query I rowsort
SELECT ALL ( col2 ) * + col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL 56 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT + col0 * cor0.col0 + 64 AS col1 FROM tab0 AS cor0
----
1289
640
7985

query I rowsort
SELECT DISTINCT cor3.col2 AS col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2 AS cor2, tab0 AS cor3
----
1
33
82

query I rowsort
SELECT col1 * tab1.col1 * + col2 AS col2 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT + 65 * - col2 + col2 FROM tab1 cor0
----
-3456
-3648
-6144

onlyif mysql # use DIV operator for integer division
query I rowsort label-1983
SELECT - + col2 DIV + col1 + col2 * + cor0.col0 col2 FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1983
SELECT - + col2 / + col1 + col2 * + cor0.col0 col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + - 25 AS col1 FROM tab1 AS cor0
----
-25

onlyif mysql # use DIV operator for integer division
query I rowsort label-1985
SELECT - ( tab2.col1 ) DIV + tab2.col0 AS col2 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-1985
SELECT - ( tab2.col1 ) / + tab2.col0 AS col2 FROM tab2
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 + - col2 col2 FROM tab2
----
1508
608
810

query I rowsort
SELECT DISTINCT - 11 + col0 AS col0 FROM tab2 cor0
----
-4
67
68

query I rowsort
SELECT DISTINCT - col0 * cor0.col2 + + col2 AS col0 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT + col1 * 56 + col2 FROM tab1 AS cor0
----
1510
617
824

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - 74 ) col0 FROM tab2 AS cor0
----
-74
-74
-74

query I rowsort
SELECT + - col1 * 64 + - col1 AS col1 FROM tab1 AS cor0
----
-1690
-650
-845

query I rowsort
SELECT DISTINCT + 13 AS col0 FROM tab0 cor0
----
13

query I rowsort
SELECT - - 87 * col0 + + col1 + col0 * col2 FROM tab2 AS cor0
----
829
8873
9892

query I rowsort
SELECT - - 90 + - 49 * cor0.col1 FROM tab1 cor0
----
-1184
-400
-547

query I rowsort
SELECT ALL - + ( - col2 ) AS col1 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT + ( + col1 ) * col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT 23 * col2 AS col2 FROM tab0 AS cor0
----
1886
23
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-1998
SELECT ALL + ( col2 ) DIV col2 + - 92 + + col1 FROM tab0 cor0
----
-5
0
6

skipif mysql # not compatible
query I rowsort label-1998
SELECT ALL + ( col2 ) / col2 + - 92 + + col1 FROM tab0 cor0
----
-5
0
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1999
SELECT DISTINCT - col1 - + col2 DIV 39 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-1999
SELECT DISTINCT - col1 - + col2 / 39 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + 99 * - col2 FROM tab1 cor0
----
-5346
-5643
-9504

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 58 * - col1 col1 FROM tab2 AS cor0
----
-1798
-3422
-986

query I rowsort
SELECT ALL + + cor0.col1 + cor0.col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-2003
SELECT - col1 DIV + 37 AS col1 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2003
SELECT - col1 / + 37 AS col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 * - 35 * - 91 AS col2 FROM tab0 AS cor0
----
273910
289835
308945

onlyif mysql # use DIV operator for integer division
query I rowsort label-2005
SELECT col1 DIV - cor0.col1 + + col0 - cor0.col2 AS col1 FROM tab0 AS cor0
----
-10
33
6

skipif mysql # not compatible
query I rowsort label-2005
SELECT col1 / - cor0.col1 + + col0 - cor0.col2 AS col1 FROM tab0 AS cor0
----
-10
33
6

query I rowsort
SELECT + col1 + 63 + ( col2 ) FROM tab1
----
130
143
172

query I rowsort
SELECT DISTINCT - cor0.col0 * + ( 82 ) + + col0 * col1 AS col0 FROM tab1 AS cor0
----
-168
-4608
-5520

query I rowsort
SELECT + col2 - + cor0.col1 * col1 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT + col2 * 50 + col2 FROM tab1 cor0
----
2754
2907
4896

query I rowsort
SELECT DISTINCT - col0 * + 4 AS col0 FROM tab0 AS cor0
----
-140
-356
-96

query I rowsort
SELECT ALL + col0 * + 64 FROM tab1 AS cor0
----
192
4096
5120

onlyif mysql # use DIV operator for integer division
query I rowsort label-2012
SELECT DISTINCT - - cor0.col0 + + col2 DIV col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-2012
SELECT DISTINCT - - cor0.col0 + + col2 / col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT ALL cor0.col0 * + 61 + + col2 * col0 AS col0 FROM tab1 AS cor0
----
12560
345
7552

onlyif mysql # use DIV operator for integer division
query I rowsort label-2014
SELECT - ( col2 ) DIV cor0.col2 + + ( col0 ) * - cor0.col1 * col2 FROM tab1 AS cor0
----
-36481
-4213
-99841

skipif mysql # not compatible
query I rowsort label-2014
SELECT - ( col2 ) / cor0.col2 + + ( col0 ) * - cor0.col1 * col2 FROM tab1 AS cor0
----
-36481
-4213
-99841

query I rowsort
SELECT col1 + col1 - col2 AS col2 FROM tab1
----
-2
-37
-70

query I rowsort
SELECT tab0.col1 + - col2 * + col0 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT ALL - col0 + + col1 AS col2 FROM tab1
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-2018
SELECT + + 6 + + 50 DIV col2 col2 FROM tab1 AS cor0
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2018
SELECT + + 6 + + 50 / col2 col2 FROM tab1 AS cor0
----
6
6
6

query I rowsort
SELECT - 65 * - 38 AS col1 FROM tab1 AS cor0
----
2470
2470
2470

query I rowsort
SELECT + col1 * + 4 - cor0.col2 AS col1 FROM tab0 AS cor0
----
282
311
387

onlyif mysql # use DIV operator for integer division
query I rowsort label-2021
SELECT DISTINCT col0 + + 37 DIV col1 + + col0 FROM tab1
----
131
162
7

skipif mysql # not compatible
query I rowsort label-2021
SELECT DISTINCT col0 + + 37 / col1 + + col0 FROM tab1
----
131
162
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2022
SELECT ALL col1 DIV - ( ( - col2 ) ) + ( - 49 ) AS col1 FROM tab1
----
-49
-49
-49

skipif mysql # not compatible
query I rowsort label-2022
SELECT ALL col1 / - ( ( - col2 ) ) + ( - 49 ) AS col1 FROM tab1
----
-49
-49
-49

query I rowsort
SELECT col0 + 55 + - col1 FROM tab0
----
-7
-7
53

query I rowsort
SELECT ALL tab0.col1 + ( + tab0.col1 ) * - col2 * tab0.col0 + col1 AS col1 FROM tab0
----
-3201
-663936
-67940

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2025
SELECT DISTINCT tab1.col1 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2025
SELECT DISTINCT tab1.col1 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

query I rowsort
SELECT ALL + col0 + - ( + 21 ) + + col0 AS col1 FROM tab0
----
157
27
49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2027
SELECT CAST( NULL AS SIGNED ) + + 42 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2027
SELECT CAST ( NULL AS INTEGER ) + + 42 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - 78 FROM tab0 cor0
----
-78
-78
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2029
SELECT CAST( NULL AS SIGNED ) * + ( col0 ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2029
SELECT CAST ( NULL AS INTEGER ) * + ( col0 ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col1 * - 51 FROM tab0 cor0 CROSS JOIN tab1, tab0 AS cor1
----
27 values hashing to c5e2e5b6b219386deef111ccad4e20e8

query I rowsort
SELECT DISTINCT - tab1.col2 + + col2 * - col0 * col0 FROM tab1
----
-233529
-540
-614496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2032
SELECT ALL CAST( 46 AS SIGNED ) AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

skipif mysql # not compatible
query I rowsort label-2032
SELECT ALL CAST ( 46 AS INTEGER ) AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT - col0 * + 26 + tab1.col1 AS col2 FROM tab1
----
-1654
-2067
-52

query I rowsort
SELECT 66 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT ALL - + 24 AS col1 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to f2e40f6e5cdbc2877843191cb261975f

query I rowsort
SELECT DISTINCT - + ( + cor0.col1 ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2037
SELECT DISTINCT - col2 - 57 * + col0 * CAST( - col0 AS SIGNED ) col1 FROM tab0 cor0
----
32799
451415
69824

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2037
SELECT DISTINCT - col2 - 57 * + col0 * CAST ( - col0 AS INTEGER ) col1 FROM tab0 cor0
----
32799
451415
69824

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2038
SELECT - CAST( - 3 AS SIGNED ) + col1 FROM tab0 cor0
----
100
89
94

skipif mysql # not compatible
query I rowsort label-2038
SELECT - CAST ( - 3 AS INTEGER ) + col1 FROM tab0 cor0
----
100
89
94

query I rowsort
SELECT DISTINCT + col2 * - col0 * col1 AS col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-2040
SELECT + tab2.col1 * tab2.col1 + col1 DIV - 39 FROM tab2
----
289
3480
961

skipif mysql # not compatible
query I rowsort label-2040
SELECT + tab2.col1 * tab2.col1 + col1 / - 39 FROM tab2
----
289
3480
961

query I rowsort
SELECT ALL 92 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c64cb7a81da51f4be0b6906a223e8817

query I rowsort
SELECT - col1 * col1 * + cor0.col1 FROM tab2 AS cor0
----
-205379
-29791
-4913

onlyif mysql # use DIV operator for integer division
query I rowsort label-2043
SELECT ALL col1 + col2 DIV col0 FROM tab1 AS cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-2043
SELECT ALL col1 + col2 / col0 FROM tab1 AS cor0
----
10
14
44

query I rowsort
SELECT DISTINCT + + col1 + 52 AS col0 FROM tab2 AS cor0
----
111
69
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2045
SELECT - col1 + + CAST( - 18 AS SIGNED ) * col0 FROM tab0 AS cor0
----
-1693
-518
-727

skipif mysql # not compatible
query I rowsort label-2045
SELECT - col1 + + CAST ( - 18 AS INTEGER ) * col0 FROM tab0 AS cor0
----
-1693
-518
-727

query I rowsort
SELECT ALL - col0 - col0 * - cor0.col2 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT DISTINCT + cor0.col0 + 53 AS col0 FROM tab0 AS cor0
----
142
77
88

query I rowsort
SELECT - col2 + - col1 * 83 FROM tab1 AS cor0
----
-1175
-2212
-887

query I rowsort
SELECT + col2 * ( col1 ) AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - col2 * - col1 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT - 61 AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 80442609e72d8c1c7f1c6175b1d2eac8

query I rowsort
SELECT + 9 - col1 * - col0 FROM tab0
----
2073
3404
8108

query I rowsort
SELECT ALL - 48 * cor0.col0 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 69108e626b3950ccdac16e7b02910c0f

query I rowsort
SELECT 93 * tab1.col0 - + 97 * - 35 AS col2 FROM tab1
----
10835
3674
9347

query I rowsort
SELECT 8 - col0 FROM tab2
----
-70
-71
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2056
SELECT + tab1.col1 DIV + col1 - col1 AS col0 FROM tab1
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-2056
SELECT + tab1.col1 / + col1 - col1 AS col0 FROM tab1
----
-12
-25
-9

query I rowsort
SELECT DISTINCT tab2.col0 * + ( - tab2.col0 ) FROM tab2, tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT 98 * + cor0.col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 2aa9d2475d78021b64ee018c9d7e99f9

query I rowsort
SELECT DISTINCT + 11 AS col1 FROM tab2, tab1 AS cor0
----
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-2060
SELECT + col2 DIV 10 FROM tab0
----
0
3
8

skipif mysql # not compatible
query I rowsort label-2060
SELECT + col2 / 10 FROM tab0
----
0
3
8

query I rowsort
SELECT - - 21 AS col0 FROM tab0 cor0
----
21
21
21

query I rowsort
SELECT - col2 * ( col0 ) AS col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col1 * col1 - + col0 FROM tab2
----
210
3403
954

query I rowsort
SELECT ALL ( 44 ) + col0 AS col0 FROM tab2
----
122
123
51

query I rowsort
SELECT ALL - + cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT - 3 + cor0.col0 AS col2 FROM tab2 AS cor0
----
4
75
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2067
SELECT DISTINCT - - CAST( col1 AS SIGNED ) + col2 FROM tab1 cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-2067
SELECT DISTINCT - - CAST ( col1 AS INTEGER ) + col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL 62 * col2 * - col2 + - cor0.col2 - col2 FROM tab2 AS cor0
----
-41964
-45252
-89604

query I rowsort
SELECT - col0 * 1 + cor0.col1 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2070
SELECT DISTINCT + ( - 6 ) * col2 + CAST( + cor0.col2 AS SIGNED ) FROM tab0 AS cor0
----
-165
-410
-5

skipif mysql # not compatible
query I rowsort label-2070
SELECT DISTINCT + ( - 6 ) * col2 + CAST ( + cor0.col2 AS INTEGER ) FROM tab0 AS cor0
----
-165
-410
-5

query I rowsort
SELECT DISTINCT + 72 - col0 FROM tab0 AS cor0
----
-17
37
48

query I rowsort
SELECT + - 26 AS col2 FROM tab0 cor0
----
-26
-26
-26

query I rowsort
SELECT ALL col1 + + 77 FROM tab2
----
108
136
94

query I rowsort
SELECT DISTINCT ( + 35 * col1 ) + ( - col2 ) FROM tab0
----
2977
3103
3394

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col1 FROM tab1, tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + 71 + col0 FROM tab2
----
149
150
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2077
SELECT - CAST( col2 AS SIGNED ) * - col0 * + col1 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

skipif mysql # not compatible
query I rowsort label-2077
SELECT - CAST ( col2 AS INTEGER ) * - col0 * + col1 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT - + col2 * col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2079
SELECT + - CAST( NULL AS SIGNED ) + cor0.col0 - col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2079
SELECT + - CAST ( NULL AS INTEGER ) + cor0.col0 - col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2080
SELECT ALL - 81 + 1 DIV col0 AS col1 FROM tab2 AS cor0
----
-81
-81
-81

skipif mysql # not compatible
query I rowsort label-2080
SELECT ALL - 81 + 1 / col0 AS col1 FROM tab2 AS cor0
----
-81
-81
-81

query I rowsort
SELECT + 72 + - col2 + col1 AS col2 FROM tab2
----
105
51
76

query I rowsort
SELECT col2 * 2 AS col0 FROM tab1
----
108
114
192

query I rowsort
SELECT + 20 - cor0.col2 FROM tab1 cor0
----
-34
-37
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-2084
SELECT DISTINCT + col2 + 40 DIV cor0.col2 FROM tab0 AS cor0
----
34
41
82

skipif mysql # not compatible
query I rowsort label-2084
SELECT DISTINCT + col2 + 40 / cor0.col2 FROM tab0 AS cor0
----
34
41
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2085
SELECT + cor0.col0 * col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2085
SELECT + cor0.col0 * col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 34 + + col2 AS col1 FROM tab2 AS cor0
----
60
61
72

query I rowsort
SELECT ALL + col1 + - col2 AS col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL col1 + - cor0.col0 * 83 FROM tab0 AS cor0
----
-1906
-2808
-7296

query I rowsort
SELECT ALL + - 22 - + col0 * + col2 FROM tab2 AS cor0
----
-2050
-211
-3024

query I rowsort
SELECT + + 61 * col2 + 11 FROM tab0 cor0
----
2024
5013
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-2091
SELECT DISTINCT + col0 DIV + col0 AS col2 FROM tab2 cor0
----
1

skipif mysql # not compatible
query I rowsort label-2091
SELECT DISTINCT + col0 / + col0 AS col2 FROM tab2 cor0
----
1

query I rowsort
SELECT DISTINCT + - 17 * col2 + + ( col0 ) AS col1 FROM tab1 AS cor0
----
-1552
-905
-915

onlyif mysql # use DIV operator for integer division
query I rowsort label-2093
SELECT DISTINCT - - 84 DIV - cor0.col1 FROM tab1 AS cor0
----
-3
-6
-8

skipif mysql # not compatible
query I rowsort label-2093
SELECT DISTINCT - - 84 / - cor0.col1 FROM tab1 AS cor0
----
-3
-6
-8

query I rowsort
SELECT DISTINCT - + 19 AS col0 FROM tab2 cor0
----
-19

query I rowsort
SELECT ALL - col1 + + col0 * col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT col0 + + col2 * + cor0.col2 * 10 FROM tab2 AS cor0
----
14519
6838
7297

query I rowsort
SELECT col1 * cor0.col2 + + ( + ( - col1 ) * col1 ) AS col1 FROM tab2 cor0
----
-124
-1947
357

onlyif mysql # use DIV operator for integer division
query I rowsort label-2098
SELECT ALL 14 DIV col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2098
SELECT ALL 14 / col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - + 70 * + cor0.col2 + + ( ( cor0.col1 ) ) AS col0 FROM tab2 AS cor0
----
-1761
-1859
-2643

query I rowsort
SELECT DISTINCT ( + col1 ) + - col0 * col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL - 43 + cor0.col2 FROM tab0 AS cor0
----
-10
-42
39

query I rowsort
SELECT DISTINCT - col2 + + col0 * + col0 * col0 FROM tab1 AS cor0
----
-27
262087
511904

query I rowsort
SELECT - - cor0.col0 * cor0.col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - 67 * col2 - cor0.col0 AS col1 FROM tab2 AS cor0
----
-1816
-1820
-2625

query I rowsort
SELECT + 41 * - col1 FROM tab2 AS cor0
----
-1271
-2419
-697

query I rowsort
SELECT - col2 * 35 FROM tab2 AS cor0
----
-1330
-910
-945

query I rowsort
SELECT ALL 73 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT DISTINCT - col0 + + 58 FROM tab0 AS cor0
----
-31
23
34

query I rowsort
SELECT ALL + col1 * col1 AS col2 FROM tab1 cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-2110
SELECT + col0 DIV 36 AS col1 FROM tab1 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2110
SELECT + col0 / 36 AS col1 FROM tab1 AS cor0
----
0
1
2

query I rowsort
SELECT - col0 + + ( - ( cor0.col1 ) ) * - 75 FROM tab0 AS cor0
----
6426
6736
7240

query I rowsort
SELECT ALL - col2 + 36 FROM tab1 AS cor0
----
-18
-21
-60

query I rowsort
SELECT ALL 84 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

onlyif mysql # use DIV operator for integer division
query I rowsort label-2114
SELECT - + cor0.col2 + + cor0.col0 DIV + col1 FROM tab2 AS cor0
----
-25
-27
-34

skipif mysql # not compatible
query I rowsort label-2114
SELECT - + cor0.col2 + + cor0.col0 / + col1 FROM tab2 AS cor0
----
-25
-27
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2115
SELECT CAST( + col0 AS SIGNED ) AS col0 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2115
SELECT CAST ( + col0 AS INTEGER ) AS col0 FROM tab0 cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2116
SELECT + col0 * CAST( - col1 AS SIGNED ) * - tab2.col0 FROM tab2
----
106097
1519
358956

skipif mysql # not compatible
query I rowsort label-2116
SELECT + col0 * CAST ( - col1 AS INTEGER ) * - tab2.col0 FROM tab2
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-2117
SELECT DISTINCT - tab2.col2 * + tab2.col1 DIV col1 AS col0 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-2117
SELECT DISTINCT - tab2.col2 * + tab2.col1 / col1 AS col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT + tab1.col0 * 17 + - col2 + + col1 AS col0 FROM tab1
----
1041
1277
23

query I rowsort
SELECT ALL col0 - 68 FROM tab2
----
-61
10
11

query I rowsort
SELECT ALL col1 * - col1 * col1 + col0 FROM tab0
----
-636032
-753482
-912638

onlyif mysql # use DIV operator for integer division
query I rowsort label-2121
SELECT col0 * 87 - cor0.col1 DIV - col0 AS col2 FROM tab1 AS cor0
----
269
5568
6960

skipif mysql # not compatible
query I rowsort label-2121
SELECT col0 * 87 - cor0.col1 / - col0 AS col2 FROM tab1 AS cor0
----
269
5568
6960

query I rowsort
SELECT - col2 * col1 * + col2 + + col1 AS col0 FROM tab1 AS cor0
----
-119795
-32480
-75790

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2123
SELECT - tab0.col1 * + col1 / + CAST( NULL AS SIGNED ) + ( + col0 ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2123
SELECT - tab0.col1 * + col1 / + CAST ( NULL AS INTEGER ) + ( + col0 ) FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2124
SELECT ALL - col2 DIV col0 + - 69 DIV - 12 col2 FROM tab0
----
4
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2124
SELECT ALL - col2 / col0 + - 69 / - 12 col2 FROM tab0
----
4
5
5

query I rowsort
SELECT 95 * + col2 + col0 * + 96 AS col2 FROM tab1
----
11559
16800
5418

query I rowsort
SELECT DISTINCT col1 * col0 + col2 AS col1 FROM tab1
----
1136
132
697

query I rowsort
SELECT - col2 + + col1 + ( + col1 ) FROM tab2
----
-4
35
92

query I rowsort
SELECT ALL + col1 + col0 * ( + col1 ) FROM tab1
----
104
1053
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col2 ) + ( + col0 ) + - tab0.col0 col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT + ( - col1 ) + + ( col0 ) AS col2 FROM tab2
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2131
SELECT ALL + col2 DIV - col0 + 45 AS col2 FROM tab1
----
27
44
45

skipif mysql # not compatible
query I rowsort label-2131
SELECT ALL + col2 / - col0 + 45 AS col2 FROM tab1
----
27
44
45

query I rowsort
SELECT ALL + + cor0.col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2133
SELECT DISTINCT tab0.col1 DIV - col0 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2133
SELECT DISTINCT tab0.col1 / - col0 FROM tab0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - cor0.col2 + + 86 col1 FROM tab2 AS cor0
----
86

query I rowsort
SELECT col0 + + 82 AS col2 FROM tab1 AS cor0
----
146
162
85

query I rowsort
SELECT ALL col1 * + ( + col0 ) AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - col2 * ( col1 ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - - col2 + ( cor0.col0 ) FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + col2 + - 29 * 70 FROM tab2 AS cor0
----
-1992
-2003
-2004

query I rowsort
SELECT ALL cor0.col2 + col2 * - col0 FROM tab1 AS cor0
----
-108
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-2141
SELECT DISTINCT + + col2 DIV 54 + + col1 * + col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-2141
SELECT DISTINCT + + col2 / 54 + + col1 * + col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - col2 * - cor0.col1 + cor0.col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-2143
SELECT + col0 + - col2 DIV col0 AS col2 FROM tab2 AS cor0
----
4
78
79

skipif mysql # not compatible
query I rowsort label-2143
SELECT + col0 + - col2 / col0 AS col2 FROM tab2 AS cor0
----
4
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2144
SELECT DISTINCT col0 DIV ( - 56 ) + col2 FROM tab1 AS cor0
----
54
56
95

skipif mysql # not compatible
query I rowsort label-2144
SELECT DISTINCT col0 / ( - 56 ) + col2 FROM tab1 AS cor0
----
54
56
95

query I rowsort
SELECT ALL - col2 * + 29 + col0 AS col1 FROM tab1 AS cor0
----
-1563
-1589
-2704

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2146
SELECT DISTINCT - CAST( col2 AS SIGNED ) AS col0 FROM tab2 cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-2146
SELECT DISTINCT - CAST ( col2 AS INTEGER ) AS col0 FROM tab2 cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + 93 * - col0 col0 FROM tab1 AS cor0
----
-225
-5895
-7344

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * cor0.col0 col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT 91 + + 38 FROM tab2 AS cor0
----
129
129
129

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 42 * - col0 col0 FROM tab0 AS cor0
----
1008
1470
3738

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2151
SELECT + CAST( + col2 AS SIGNED ) + col1 * - cor0.col2 col1 FROM tab0 AS cor0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2151
SELECT + CAST ( + col2 AS INTEGER ) + col1 * - cor0.col2 col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT 67 * + col2 * col2 + + ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
450590
68
72996

query I rowsort
SELECT DISTINCT - - col2 - - 98 * + col0 AS col1 FROM tab0 AS cor0
----
2385
3431
8804

query I rowsort
SELECT + + cor0.col2 + 38 FROM tab2 AS cor0
----
64
65
76

query I rowsort
SELECT ALL + + 0 + col0 AS col0 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2156
SELECT + ( col2 ) * CAST( NULL AS DECIMAL ) - + 63 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2156
SELECT + ( col2 ) * CAST ( NULL AS REAL ) - + 63 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 38 + - cor0.col2 * - col0 col0 FROM tab0 AS cor0
----
-3
7260
754

query I rowsort
SELECT - + 17 * col1 - - col1 FROM tab0 AS cor0
----
-1376
-1456
-1552

query I rowsort
SELECT DISTINCT + col1 - - col0 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - col1 * col2 - - col0 * col0 FROM tab1 AS cor0
----
-1395
3526
5152

query I rowsort
SELECT DISTINCT - - 50 AS col0 FROM tab1 AS cor0
----
50

query I rowsort
SELECT DISTINCT - 58 + - cor2.col2 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1, tab0, tab1 cor2
----
-112
-115
-154

query I rowsort
SELECT ALL - - 50 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

onlyif mysql # use DIV operator for integer division
query I rowsort label-2164
SELECT ALL + 10 DIV col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2164
SELECT ALL + 10 / col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2165
SELECT + + col0 DIV cor0.col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2165
SELECT + + col0 / cor0.col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT - col2 + + ( - 43 + col2 ) * - col0 FROM tab0 AS cor0
----
-3553
1469
207

query I rowsort
SELECT + col2 * ( - 11 ) FROM tab0 AS cor0
----
-11
-363
-902

query I rowsort
SELECT + + 68 FROM tab1 AS cor0
----
68
68
68

query I rowsort
SELECT ALL + 72 AS col1 FROM tab0 cor0
----
72
72
72

query I rowsort
SELECT ALL - 7 FROM tab1, tab2 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 * 5 * - cor0.col0 col2 FROM tab1, tab1 cor0
----
9 values hashing to ad10a93b86b66592f18928595f5cf60e

query I rowsort
SELECT + 88 + + col2 * - col2 + - 2 * col2 AS col0 FROM tab2 AS cor0
----
-1432
-640
-695

query I rowsort
SELECT col0 + col0 * + col2 + col2 FROM tab1 AS cor0
----
219
3769
7856

query I rowsort
SELECT col0 + + col2 * col1 * 53 AS col2 FROM tab1
----
30274
66224
74415

query I rowsort
SELECT + - 84 * col0 FROM tab0 AS cor0
----
-2016
-2940
-7476

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2176
SELECT - + ( + col1 ) + + CAST( NULL AS SIGNED ) / - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2176
SELECT - + ( + col1 ) + + CAST ( NULL AS INTEGER ) / - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 70 AS col2 FROM tab0
----
-70

query I rowsort
SELECT ALL + 24 * col0 AS col1 FROM tab1
----
1536
1920
72

query I rowsort
SELECT - col1 + 79 AS col1 FROM tab2
----
20
48
62

query I rowsort
SELECT DISTINCT + col2 + + col1 * 44 AS col0 FROM tab1 AS cor0
----
1198
497
668

onlyif mysql # use DIV operator for integer division
query I rowsort label-2181
SELECT DISTINCT + col2 DIV 49 col2 FROM tab1 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2181
SELECT DISTINCT + col2 / 49 col2 FROM tab1 AS cor0
----
1

query I rowsort
SELECT + - col1 * - col1 + + col2 * + col0 * 82 FROM tab1 AS cor0
----
13960
299236
629929

query I rowsort
SELECT DISTINCT - col0 * - col1 + col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL - col1 * col0 * tab1.col1 AS col2 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT + - col1 * 68 FROM tab1 AS cor0
----
-1768
-680
-884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2186
SELECT DISTINCT + CAST( NULL AS SIGNED ) + col0 AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2186
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col0 AS col1 FROM tab1 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2187
SELECT DISTINCT - CAST( col2 AS SIGNED ) * - col2 + - col2 * col1 AS col0 FROM tab1 AS cor0
----
1512
2679
7968

skipif mysql # not compatible
query I rowsort label-2187
SELECT DISTINCT - CAST ( col2 AS INTEGER ) * - col2 + - col2 * col1 AS col0 FROM tab1 AS cor0
----
1512
2679
7968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2188
SELECT + CAST( + 67 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
67
67
67

skipif mysql # not compatible
query I rowsort label-2188
SELECT + CAST ( + 67 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
67
67
67

query I rowsort
SELECT - 83 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to d55748f39f403ec273099c0d87b0bfbb

query I rowsort
SELECT ALL + tab2.col2 * - tab2.col0 * 16 + col2 + col0 AS col2 FROM tab2
----
-2990
-32344
-47915

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2191
SELECT DISTINCT - col1 * - CAST( NULL AS SIGNED ) + - tab2.col0 AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-2191
SELECT DISTINCT - col1 * - CAST ( NULL AS INTEGER ) + - tab2.col0 AS col2 FROM tab2
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2192
SELECT - CAST( NULL AS SIGNED ) * - 25 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2192
SELECT - CAST ( NULL AS INTEGER ) * - 25 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - col1 * + 88 + + col1 + - col1 FROM tab2
----
-1496
-2728
-5192

query I rowsort
SELECT DISTINCT - col0 + + ( col0 ) FROM tab0
----
0

query I rowsort
SELECT col1 - + 38 * col1 AS col2 FROM tab1
----
-370
-481
-962

query I rowsort
SELECT + col0 * col0 + col2 FROM tab0
----
1226
609
8003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 33 col2 FROM tab0 AS cor0
----
33

query I rowsort
SELECT + - 14 * + col1 AS col1 FROM tab0 AS cor0
----
-1204
-1274
-1358

query I rowsort
SELECT col0 * col0 * + col0 - - 80 * - col0 AS col1 FROM tab0 cor0
----
11904
40075
697849

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2200
SELECT col1 + - col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2200
SELECT col1 + - col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2201
SELECT 45 DIV cor0.col2 FROM tab0 AS cor0
----
0
1
45

skipif mysql # not compatible
query I rowsort label-2201
SELECT 45 / cor0.col2 FROM tab0 AS cor0
----
0
1
45

query I rowsort
SELECT DISTINCT + ( tab0.col0 * col1 ) AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT 56 + col2 * - col2 * 53 AS col1 FROM tab0 cor0
----
-356316
-57661
3

query I rowsort
SELECT + - ( - col1 ) FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT - - col0 + col0 * + col2 FROM tab0 cor0
----
70
7387
816

query I rowsort
SELECT + col0 * col0 * + col0 + - col2 FROM tab1 AS cor0
----
-27
262087
511904

onlyif mysql # use DIV operator for integer division
query I rowsort label-2207
SELECT DISTINCT - 64 - - col2 DIV 22 FROM tab2
----
-63

skipif mysql # not compatible
query I rowsort label-2207
SELECT DISTINCT - 64 - - col2 / 22 FROM tab2
----
-63

query I rowsort
SELECT - 7 * + col1 - + 62 FROM tab0
----
-664
-699
-741

query I rowsort
SELECT col1 * tab2.col0 + col1 + + col1 AS col1 FROM tab2
----
1377
279
4720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2210
SELECT DISTINCT + col1 - - col0 / CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2210
SELECT DISTINCT + col1 - - col0 / CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL

query I rowsort
SELECT + col2 * col1 * + col1 FROM tab0 cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT - col1 + - col2 * + 46 AS col1 FROM tab2 AS cor0
----
-1255
-1273
-1765

query I rowsort
SELECT DISTINCT 59 - col2 AS col1 FROM tab1
----
-37
2
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2214
SELECT ( col2 ) + - CAST( NULL AS DECIMAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2214
SELECT ( col2 ) + - CAST ( NULL AS REAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 9 col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to ebef7303942834ca1e6ca8604ec18a07

query I rowsort
SELECT ALL + col0 + 7 AS col0 FROM tab1 AS cor0
----
10
71
87

query I rowsort
SELECT + 13 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2218
SELECT DISTINCT - - col2 * - CAST( + col1 * cor0.col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

skipif mysql # not compatible
query I rowsort label-2218
SELECT DISTINCT - - col2 * - CAST ( + col1 * cor0.col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * ( - col2 ) + col0 col0 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT DISTINCT cor0.col2 + 59 FROM tab0 cor0
----
141
60
92

query I rowsort
SELECT ALL + col0 * - col2 + col0 FROM tab2
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col0 + - cor0.col2 col2 FROM tab0 AS cor0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-2223
SELECT DISTINCT + + col1 * + col2 + - col2 * col1 DIV col1 AS col1 FROM tab2 cor0
----
1508
608
810

skipif mysql # not compatible
query I rowsort label-2223
SELECT DISTINCT + + col1 * + col2 + - col2 * col1 / col1 AS col1 FROM tab2 cor0
----
1508
608
810

onlyif mysql # use DIV operator for integer division
query I rowsort label-2224
SELECT ALL cor0.col0 - 15 DIV 4 FROM tab0 AS cor0
----
21
32
86

skipif mysql # not compatible
query I rowsort label-2224
SELECT ALL cor0.col0 - 15 / 4 FROM tab0 AS cor0
----
21
32
86

query I rowsort
SELECT - - col2 + + 45 * col2 AS col2 FROM tab2 AS cor0
----
1196
1242
1748

query I rowsort
SELECT DISTINCT - col0 + 98 * + col0 FROM tab0 AS cor0
----
2328
3395
8633

query I rowsort
SELECT + col2 * 17 + + col0 FROM tab0 cor0
----
1483
52
585

query I rowsort
SELECT DISTINCT + cor0.col2 * - col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + - col0 * col2 + - cor0.col2 col0 FROM tab2 cor0
----
-2080
-243
-3078

query I rowsort
SELECT + - col1 * 58 - col0 FROM tab2 AS cor0
----
-1065
-1805
-3500

onlyif mysql # use DIV operator for integer division
query I rowsort label-2231
SELECT DISTINCT + col0 DIV col1 + cor0.col1 + col0 * + col0 AS col1 FROM tab0 AS cor0
----
1322
662
8012

skipif mysql # not compatible
query I rowsort label-2231
SELECT DISTINCT + col0 / col1 + cor0.col1 + col0 * + col0 AS col1 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT ALL - col2 * + cor0.col2 * col2 AS col0 FROM tab0 AS cor0
----
-1
-35937
-551368

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - - col1 col0 FROM tab1 cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2234
SELECT - col2 * - col1 + 33 DIV - col0 FROM tab0 AS cor0
----
2837
7462
97

skipif mysql # not compatible
query I rowsort label-2234
SELECT - col2 * - col1 + 33 / - col0 FROM tab0 AS cor0
----
2837
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2235
SELECT ALL + col0 * + CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-2235
SELECT ALL + col0 * + CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT 34 + + col2 FROM tab2
----
60
61
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * - col0 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + + 88 * 54 AS col2 FROM tab2 AS cor0
----
4752
4752
4752

query I rowsort
SELECT ALL 54 + + ( - col2 ) * cor0.col2 AS col2 FROM tab1 AS cor0
----
-2862
-3195
-9162

query I rowsort
SELECT DISTINCT - col0 * 93 + + col2 FROM tab1 AS cor0
----
-225
-5895
-7344

query I rowsort
SELECT DISTINCT + 7 AS col0 FROM tab2 AS cor0
----
7

query I rowsort
SELECT + col2 * + cor0.col1 + + col0 * col1 + + cor0.col2 FROM tab1 AS cor0
----
1267
1536
2384

query I rowsort
SELECT - cor0.col2 * 45 AS col1 FROM tab1 AS cor0
----
-2430
-2565
-4320

query I rowsort
SELECT DISTINCT - - 55 + - col1 + col0 FROM tab2 AS cor0
----
117
31
74

query I rowsort
SELECT + cor0.col2 + + col0 * + col2 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
207993
737376
8802

query I rowsort
SELECT ALL - 33 + - col0 * + col2 AS col1 FROM tab2 AS cor0
----
-2061
-222
-3035

query I rowsort
SELECT DISTINCT + 36 - + col0 FROM tab1 AS cor0
----
-28
-44
33

query I rowsort
SELECT ALL - ( - col1 ) + col2 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL col1 * col2 - col2 AS col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT - 67 + - col1 - + col0 FROM tab2 AS cor0
----
-105
-163
-204

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( tab1.col2 ) col2 FROM tab1
----
54
57
96

query I rowsort
SELECT - 24 + + cor0.col1 * + col2 FROM tab1 AS cor0
----
1224
1380
546

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 70 col0 FROM tab2 cor0
----
-70
-70
-70

query I rowsort
SELECT - - 31 * col1 AS col0 FROM tab0 AS cor0
----
2666
2821
3007

query I rowsort
SELECT + 78 - - col1 * col0 FROM tab1 AS cor0
----
1118
156
718

query I rowsort
SELECT DISTINCT - + cor0.col2 + - 71 AS col2 FROM tab0 AS cor0
----
-104
-153
-72

onlyif mysql # use DIV operator for integer division
query I rowsort label-2257
SELECT DISTINCT col1 DIV ( col2 ) + cor0.col0 AS col1 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-2257
SELECT DISTINCT col1 / ( col2 ) + cor0.col0 AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL col2 + + ( cor0.col2 ) AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT - col0 + + 10 FROM tab2
----
-68
-69
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2260
SELECT + CAST( col0 AS SIGNED ) + - col1 * 41 * col2 AS col1 FROM tab1 AS cor0
----
-23306
-51088
-57561

skipif mysql # not compatible
query I rowsort label-2260
SELECT + CAST ( col0 AS INTEGER ) + - col1 * 41 * col2 AS col1 FROM tab1 AS cor0
----
-23306
-51088
-57561

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2261
SELECT DISTINCT CAST( + 92 AS SIGNED ) AS col0 FROM tab1, tab1 cor0 CROSS JOIN tab0
----
92

skipif mysql # not compatible
query I rowsort label-2261
SELECT DISTINCT CAST ( + 92 AS INTEGER ) AS col0 FROM tab1, tab1 cor0 CROSS JOIN tab0
----
92

query I rowsort
SELECT + col0 + - col0 + col2 AS col0 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT col1 * col1 + cor0.col2 FROM tab0 AS cor0
----
7429
8363
9410

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2264
SELECT + CAST( cor0.col1 AS SIGNED ) + col0 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-2264
SELECT + CAST ( cor0.col1 AS INTEGER ) + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - + cor0.col1 - + col2 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT + - col1 * - col0 + + cor0.col0 AS col0 FROM tab1 cor0
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-2267
SELECT DISTINCT + - col0 DIV + 10 + cor0.col1 + - 57 * + col0 FROM tab1 AS cor0
----
-145
-3644
-4555

skipif mysql # not compatible
query I rowsort label-2267
SELECT DISTINCT + - col0 / + 10 + cor0.col1 + - 57 * + col0 FROM tab1 AS cor0
----
-145
-3644
-4555

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT DISTINCT col2 * col2 + + col1 + - ( + 72 + - col1 ) * - tab1.col2 AS col0 FROM tab1
----
14893
5426
6793

query I rowsort
SELECT DISTINCT cor0.col0 - col1 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT ALL - tab1.col1 * - col2 AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT - - col1 + + col2 AS col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT ALL - col2 + - 73 + 66 FROM tab0 AS cor0
----
-40
-8
-89

query I rowsort
SELECT DISTINCT - + col0 - + cor0.col2 * col0 AS col0 FROM tab2 AS cor0
----
-196
-2106
-3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2275
SELECT + col0 + CAST( NULL AS SIGNED ) * ( col0 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2275
SELECT + col0 + CAST ( NULL AS INTEGER ) * ( col0 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * 80 AS col0 FROM tab1 AS cor0
----
4320
4560
7680

query I rowsort
SELECT DISTINCT col2 * col0 + col2 * + col1 AS col2 FROM tab0 AS cor0
----
132
14760
3630

query I rowsort
SELECT DISTINCT + col2 + 31 * + col2 AS col0 FROM tab1 AS cor0
----
1728
1824
3072

query I rowsort
SELECT ALL col2 + + col1 * + cor0.col0 + col1 FROM tab1 AS cor0
----
1149
158
707

query I rowsort
SELECT ALL + - col2 + col2 * + col1 AS col2 FROM tab0 AS cor0
----
2805
7380
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2281
SELECT ALL col2 + - CAST( NULL AS SIGNED ) * + col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2281
SELECT ALL col2 + - CAST ( NULL AS INTEGER ) * + col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 59 + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ffcbc18df78cf8249af8bdc0d59931aa

query I rowsort
SELECT DISTINCT - + col1 * - col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL + col1 * col0 AS col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL - col1 * - 40 FROM tab0
----
3440
3640
3880

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1, tab1 AS cor0, tab1 cor1
----
-10
-13
-26

query I rowsort
SELECT 18 + col2 * col2 FROM tab1 AS cor0
----
2934
3267
9234

query I rowsort
SELECT - + 20 * + col1 AS col1 FROM tab1 AS cor0
----
-200
-260
-520

query I rowsort
SELECT + + col0 * 47 FROM tab0 AS cor0
----
1128
1645
4183

query I rowsort
SELECT ALL - - cor0.col0 * col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2291
SELECT + ( cor0.col0 ) DIV col0 AS col2 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2291
SELECT + ( cor0.col0 ) / col0 AS col2 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT + col1 + 28 AS col1 FROM tab0 cor0
----
114
119
125

query I rowsort
SELECT ALL col2 + tab0.col2 - ( col2 * + col0 + + tab0.col2 ) FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT col2 + + col1 + tab1.col2 * col1 AS col1 FROM tab1
----
1357
1484
637

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 * - cor0.col0 col0 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2296
SELECT - 89 DIV cor0.col2 - - col2 AS col0 FROM tab0 AS cor0
----
-88
31
81

skipif mysql # not compatible
query I rowsort label-2296
SELECT - 89 / cor0.col2 - - col2 AS col0 FROM tab0 AS cor0
----
-88
31
81

query I rowsort
SELECT DISTINCT tab0.col1 + 24 * - col1 FROM tab0
----
-1978
-2093
-2231

query I rowsort
SELECT - col1 + + col0 - - col2 AS col0 FROM tab1 AS cor0
----
111
163
31

query I rowsort
SELECT DISTINCT col1 + 31 FROM tab1 AS cor0
----
41
44
57

query I rowsort
SELECT + - col2 * 36 + - col0 FROM tab1 AS cor0
----
-1947
-2116
-3536

query I rowsort
SELECT ALL + col1 * 52 + - col2 * + col1 FROM tab2 AS cor0
----
1534
238
775

query I rowsort
SELECT ALL + col0 + - 89 FROM tab0 AS cor0
----
-54
-65
0

query I rowsort
SELECT DISTINCT ( col2 ) * col1 AS col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT - ( - 22 ) * col0 FROM tab0 AS cor0
----
1958
528
770

query I rowsort
SELECT DISTINCT ( 87 ) * col1 FROM tab1 AS cor0
----
1131
2262
870

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + - 43 * cor0.col1 FROM tab0 AS cor0
----
-3698
-3913
-4171

query I rowsort
SELECT ALL - cor0.col1 * - 63 FROM tab0 AS cor0
----
5418
5733
6111

query I rowsort
SELECT ALL + + col0 * - col0 AS col2 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT - col0 * + col2 + col2 * + col1 FROM tab0 cor0
----
164
2046
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 90 * col2 col2 FROM tab1 cor0
----
-4860
-5130
-8640

query I rowsort
SELECT DISTINCT - 40 + col2 AS col0 FROM tab0 AS cor0
----
-39
-7
42

query I rowsort
SELECT DISTINCT - - col0 + + cor0.col1 * + col0 FROM tab0 cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 65 * col2 col0 FROM tab0
----
2145
5330
65

query I rowsort
SELECT col2 - col1 * - col1 FROM tab2
----
327
3507
988

query I rowsort
SELECT + col2 * 66 - col2 * 43 FROM tab0
----
1886
23
759

query I rowsort
SELECT col2 + + col1 * col1 AS col0 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT 24 * col0 FROM tab1
----
1536
1920
72

query I rowsort
SELECT ALL - + col0 + + col2 * ( cor0.col2 ) AS col1 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT - - col2 * col2 * col0 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT ALL + + cor0.col2 AS col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL + 9 + + col0 FROM tab1 AS cor0
----
12
73
89

query I rowsort
SELECT ALL 61 * - col0 AS col0 FROM tab1 cor0
----
-183
-3904
-4880

query I rowsort
SELECT DISTINCT cor0.col2 * + col1 + 81 AS col2 FROM tab2 AS cor0
----
1615
727
918

query I rowsort
SELECT - 75 - - col1 FROM tab2
----
-16
-44
-58

query I rowsort
SELECT + col0 * 57 AS col1 FROM tab0 cor0
----
1368
1995
5073

query I rowsort
SELECT DISTINCT 26 * + col2 AS col0 FROM tab0
----
2132
26
858

query I rowsort
SELECT ALL - 3 + - col2 FROM tab1 AS cor0
----
-57
-60
-99

query I rowsort
SELECT ALL + ( + col2 ) AS col2 FROM tab1
----
54
57
96

query I rowsort
SELECT - col2 + - col0 * ( - tab2.col2 ) FROM tab2
----
162
2002
2964

query I rowsort
SELECT ALL 35 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( + 85 AS REAL ) FROM tab2, tab1 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2333
SELECT ALL CAST( NULL AS SIGNED ) * col1 - + col1 * + cor0.col0 * - 46 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2333
SELECT ALL CAST ( NULL AS INTEGER ) * col1 - + col1 * + cor0.col0 * - 46 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2334
SELECT DISTINCT + 77 + - col0 DIV col1 AS col1 FROM tab1 AS cor0
----
71
77

skipif mysql # not compatible
query I rowsort label-2334
SELECT DISTINCT + 77 + - col0 / col1 AS col1 FROM tab1 AS cor0
----
71
77

query I rowsort
SELECT + 67 + - col1 FROM tab1 AS cor0
----
41
54
57

query I rowsort
SELECT ALL - + 42 + - 52 FROM tab2 AS cor0
----
-94
-94
-94

query I rowsort
SELECT DISTINCT 52 * + col0 FROM tab1 AS cor0
----
156
3328
4160

query I rowsort
SELECT + - col0 + + col0 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - ( 34 ) + col1 FROM tab0 AS cor0
----
120
125
131

query I rowsort
SELECT + ( 76 ) AS col2 FROM tab2 AS cor0
----
76
76
76

query I rowsort
SELECT ALL 12 + + col0 AS col2 FROM tab1 AS cor0
----
15
76
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-2342
SELECT ALL col1 DIV + col1 + 15 * col2 DIV + col2 AS col1 FROM tab1
----
16
16
16

skipif mysql # not compatible
query I rowsort label-2342
SELECT ALL col1 / + col1 + 15 * col2 / + col2 AS col1 FROM tab1
----
16
16
16

query I rowsort
SELECT ALL - col2 + 55 FROM tab2
----
17
28
29

query I rowsort
SELECT DISTINCT + - col0 + - col0 * col0 AS col2 FROM tab1 AS cor0
----
-12
-4160
-6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-2345
SELECT col0 + col2 DIV cor0.col0 FROM tab1 AS cor0
----
21
64
81

skipif mysql # not compatible
query I rowsort label-2345
SELECT col0 + col2 / cor0.col0 FROM tab1 AS cor0
----
21
64
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-2346
SELECT ALL cor0.col1 DIV + cor0.col1 + col1 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-2346
SELECT ALL cor0.col1 / + cor0.col1 + col1 FROM tab0 AS cor0
----
87
92
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2347
SELECT - + col0 DIV 87 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2347
SELECT - + col0 / 87 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2348
SELECT + - col0 + col1 DIV col1 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-2348
SELECT + - col0 + col1 / col1 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT - + col2 * 90 + - col1 AS col2 FROM tab2 AS cor0
----
-2399
-2461
-3437

query I rowsort
SELECT ALL + 92 + 58 * col2 * col1 AS col1 FROM tab1 cor0
----
33152
72476
81524

query I rowsort
SELECT 61 AS col2 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

query I rowsort
SELECT + + col2 * - 92 * ( col0 ) AS col0 FROM tab2 AS cor0
----
-17388
-186576
-276184

query I rowsort
SELECT DISTINCT - - col0 * + ( col2 ) + col0 * col0 FROM tab1 AS cor0
----
14080
171
7744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 * ( 44 ) * cor0.col1 + - ( 24 * col1 ) col0 FROM tab0 AS cor0
----
323360
362180
411668

onlyif mysql # use DIV operator for integer division
query I rowsort label-2355
SELECT ALL col0 DIV col2 AS col0 FROM tab1 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2355
SELECT ALL col0 / col2 AS col0 FROM tab1 cor0
----
0
0
1

query I rowsort
SELECT ALL - col2 * col1 + col0 * - 39 AS col1 FROM tab0 AS cor0
----
-10933
-1462
-3774

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col1 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + 50 - col1 * - col2 AS col0 FROM tab0 cor0
----
147
2888
7512

query I rowsort
SELECT ALL tab0.col0 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT - cor0.col0 + - 26 AS col2 FROM tab0, tab1, tab0 cor0
----
-115
-50
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 65 col2 FROM tab0 AS cor0
----
65
65
65

query I rowsort
SELECT + 73 * tab2.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 16904f09a58f8a5e61fe067c938b7df7

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-2364
SELECT - + col1 + cor0.col0 DIV col0 AS col2 FROM tab2 AS cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-2364
SELECT - + col1 + cor0.col0 / col0 AS col2 FROM tab2 AS cor0
----
-16
-30
-58

query I rowsort
SELECT DISTINCT + - 73 + + col2 FROM tab1 cor0
----
-16
-19
23

query I rowsort
SELECT + col2 * + col2 + - ( col0 ) AS col2 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT ALL - 51 AS col2 FROM tab0 cor0
----
-51
-51
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-2368
SELECT DISTINCT - col2 DIV - col2 AS col1 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-2368
SELECT DISTINCT - col2 / - col2 AS col1 FROM tab1 AS cor0
----
1

query I rowsort
SELECT DISTINCT + col2 + cor0.col1 * - ( - col0 ) AS col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL + 56 AS col0 FROM tab2 AS cor0
----
56
56
56

query I rowsort
SELECT - 78 * cor0.col1 FROM tab0 cor0
----
-6708
-7098
-7566

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 col2 FROM tab1, tab0 cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT ALL ( col0 ) + - col0 * - col1 + tab2.col0 AS col1 FROM tab2
----
1501
231
4758

query I rowsort
SELECT + col2 + col2 + 74 AS col2 FROM tab2 AS cor0
----
126
128
150

onlyif mysql # use DIV operator for integer division
query I rowsort label-2375
SELECT + col1 + - col0 DIV ( + col0 ) FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-2375
SELECT + col1 + - col0 / ( + col0 ) FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT + cor0.col1 - 44 FROM tab2, tab1 AS cor0
----
9 values hashing to 1fcbeea51ff1a54e32ba22049d06e072

query I rowsort
SELECT col2 + + cor0.col0 + col0 AS col0 FROM tab0 AS cor0
----
260
71
81

query I rowsort
SELECT + cor0.col0 + + ( col1 ) * col1 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT col2 + col1 * 49 AS col0 FROM tab2 AS cor0
----
1546
2917
871

query I rowsort
SELECT ALL + 93 * 50 AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 554f55fd7a63a72edf423bdea7ebb6be

query I rowsort
SELECT DISTINCT 1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
1

query I rowsort
SELECT col2 * cor0.col0 + + 43 AS col0 FROM tab1 AS cor0
----
205
3691
7723

query I rowsort
SELECT - col0 * - ( + col0 ) AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - col0 * 20 + + 51 AS col2 FROM tab2 AS cor0
----
-1509
-1529
-89

query I rowsort
SELECT - - col0 * ( + col0 ) FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - cor0.col2 * 44 + col1 AS col2 FROM tab0 AS cor0
----
-1366
-3517
53

query I rowsort
SELECT DISTINCT + col2 + ( - 50 ) FROM tab1 cor0
----
4
46
7

query I rowsort
SELECT + col1 * 31 AS col2 FROM tab0 AS cor0
----
2666
2821
3007

onlyif mysql # use DIV operator for integer division
query I rowsort label-2389
SELECT ALL + col2 DIV + col1 + col2 FROM tab1
----
103
56
62

skipif mysql # not compatible
query I rowsort label-2389
SELECT ALL + col2 / + col1 + col2 FROM tab1
----
103
56
62

query I rowsort
SELECT + ( + col2 ) + + col1 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col1 ) + col2 * col1 col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT - - col0 - col0 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2393
SELECT col2 DIV + col1 + CAST( col0 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-2393
SELECT col2 / + col1 + CAST ( col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
5
69
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2394
SELECT ALL + CAST( 66 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
66
66
66

skipif mysql # not compatible
query I rowsort label-2394
SELECT ALL + CAST ( 66 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
66
66
66

query I rowsort
SELECT 99 + 3 FROM tab0 AS cor0
----
102
102
102

onlyif mysql # use DIV operator for integer division
query I rowsort label-2396
SELECT DISTINCT - 12 * cor0.col0 - + cor0.col2 DIV + ( col1 ) FROM tab1 AS cor0
----
-38
-773
-967

skipif mysql # not compatible
query I rowsort label-2396
SELECT DISTINCT - 12 * cor0.col0 - + cor0.col2 / + ( col1 ) FROM tab1 AS cor0
----
-38
-773
-967

query I rowsort
SELECT DISTINCT + col1 * ( + col1 * ( - col0 ) ) + col0 - ( 26 ) AS col0 FROM tab0 AS cor0
----
-177506
-329306
-736946

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 53 col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
53

query I rowsort
SELECT DISTINCT 99 * - tab0.col0 FROM tab0, tab0 AS cor0
----
-2376
-3465
-8811

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2400
SELECT ALL + CAST( + col0 AS SIGNED ) * - col0 + 20 FROM tab2 AS cor0
----
-29
-6064
-6221

skipif mysql # not compatible
query I rowsort label-2400
SELECT ALL + CAST ( + col0 AS INTEGER ) * - col0 + 20 FROM tab2 AS cor0
----
-29
-6064
-6221

query I rowsort
SELECT DISTINCT 70 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-1680
-2450
-6230

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 * 18 col2 FROM tab1 AS cor0
----
792
792
792

query I rowsort
SELECT + + col1 + + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL + ( - col2 * - col1 ) + + ( col1 ) FROM tab0
----
194
2924
7553

query I rowsort
SELECT - 1 * - cor0.col0 * col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col0 + col0 * + 59 FROM tab2 AS cor0
----
406
4524
4582

query I rowsort
SELECT - cor0.col0 * + cor0.col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - col2 * + 84 AS col1 FROM tab0 AS cor0
----
-2772
-6888
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2409
SELECT cor0.col2 * + CAST( + col0 + col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
1566
4218
8928

skipif mysql # not compatible
query I rowsort label-2409
SELECT cor0.col2 * + CAST ( + col0 + col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
1566
4218
8928

query I rowsort
SELECT - col0 + - 80 * - 1 * + col0 FROM tab0 AS cor0
----
1896
2765
7031

query I rowsort
SELECT + col1 * ( + col1 ) FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + tab0.col1 AS col1 FROM tab0, tab2, tab1 AS cor0
----
86
91
97

query I rowsort
SELECT 99 * col0 AS col1 FROM tab0
----
2376
3465
8811

onlyif mysql # use DIV operator for integer division
query I rowsort label-2414
SELECT ALL - cor0.col1 * 21 - - 33 DIV cor0.col0 FROM tab0 AS cor0
----
-1805
-1911
-2037

skipif mysql # not compatible
query I rowsort label-2414
SELECT ALL - cor0.col1 * 21 - - 33 / cor0.col0 FROM tab0 AS cor0
----
-1805
-1911
-2037

query I rowsort
SELECT ALL + - col2 * 96 * 48 AS col0 FROM tab0 AS cor0
----
-152064
-377856
-4608

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * - col2 * - col0 + + col2 col1 FROM tab0 AS cor0
----
-3394
-664036
-68079

query I rowsort
SELECT DISTINCT + col0 + - col0 * col0 AS col1 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT DISTINCT + col0 + 78 FROM tab0 AS cor0
----
102
113
167

query I rowsort
SELECT + col2 * + ( col2 ) FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL cor0.col1 * ( + col1 ) FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 * - 22 * - tab2.col2 col0 FROM tab2
----
4158
44616
66044

query I rowsort
SELECT - col2 * 88 * - col2 FROM tab2
----
127072
59488
64152

query I rowsort
SELECT DISTINCT col0 * 57 AS col2 FROM tab1
----
171
3648
4560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2424
SELECT ALL + col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2424
SELECT ALL + col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 + + ( + 82 ) * + col2 FROM tab2 cor0
----
2191
2245
3133

query I rowsort
SELECT DISTINCT col1 * - ( col2 ) AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort
SELECT - - CAST ( col0 AS REAL ) * col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - - 85 AS col0 FROM tab0 AS cor0
----
85
85
85

query I rowsort
SELECT DISTINCT col1 * + 40 AS col0 FROM tab0 AS cor0
----
3440
3640
3880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col1 ) * + col0 col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2431
SELECT DISTINCT cor0.col0 DIV - 73 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2431
SELECT DISTINCT cor0.col0 / - 73 FROM tab0 AS cor0
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2432
SELECT - col2 - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2432
SELECT - col2 - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * 47 FROM tab1
----
2538
2679
4512

query I rowsort
SELECT + tab2.col2 + + col0 * col1 FROM tab2
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-2435
SELECT col1 * - tab0.col2 + + col2 DIV + col1 AS col2 FROM tab0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-2435
SELECT col1 * - tab0.col2 + + col2 / + col1 AS col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + + 19 AS col2 FROM tab2 cor0
----
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-2437
SELECT - col2 DIV + col0 - cor0.col1 * - 43 * - col2 AS col2 FROM tab1 AS cor0
----
-24510
-53665
-60390

skipif mysql # not compatible
query I rowsort label-2437
SELECT - col2 / + col0 - cor0.col1 * - 43 * - col2 AS col2 FROM tab1 AS cor0
----
-24510
-53665
-60390

onlyif mysql # use DIV operator for integer division
query I rowsort label-2438
SELECT ALL + 85 + cor0.col1 DIV 74 FROM tab1 AS cor0
----
85
85
85

skipif mysql # not compatible
query I rowsort label-2438
SELECT ALL + 85 + cor0.col1 / 74 FROM tab1 AS cor0
----
85
85
85

query I rowsort
SELECT - col2 * + cor0.col1 - col1 * col0 AS col1 FROM tab0 AS cor0
----
-15561
-3492
-4902

query I rowsort
SELECT + col2 * col1 + col0 * col0 AS col1 FROM tab1 AS cor0
----
1413
4666
7648

query I rowsort
SELECT ALL - col0 * col2 + - ( 46 ) FROM tab0 AS cor0
----
-7344
-81
-838

query I rowsort
SELECT 57 + - col2 * + 80 FROM tab0 AS cor0
----
-23
-2583
-6503

query I rowsort
SELECT - 58 - - col2 * 0 FROM tab2 AS cor0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT + col2 * col0 + 52 AS col1 FROM tab1 AS cor0
----
214
3700
7732

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2445
SELECT + - cor0.col2 * col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2445
SELECT + - cor0.col2 * col2 + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * - col0 + + col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT DISTINCT - 46 FROM tab1, tab0 AS cor0
----
-46

onlyif mysql # use DIV operator for integer division
query I rowsort label-2448
SELECT ALL col2 - - ( col2 ) DIV col0 AS col0 FROM tab0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-2448
SELECT ALL col2 - - ( col2 ) / col0 AS col0 FROM tab0
----
1
34
82

query I rowsort
SELECT DISTINCT 0 * - cor0.col0 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2450
SELECT - + cor0.col1 DIV + col0 + - CAST( col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-26
-31
-38

skipif mysql # not compatible
query I rowsort label-2450
SELECT - + cor0.col1 / + col0 + - CAST ( col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-26
-31
-38

query I rowsort
SELECT 23 * - col2 - ( col1 * - col1 ) FROM tab0 AS cor0
----
6395
6637
9386

onlyif mysql # use DIV operator for integer division
query I rowsort label-2452
SELECT ALL tab2.col1 DIV col1 + - 85 + - col2 * - col1 AS col0 FROM tab2
----
1450
562
753

skipif mysql # not compatible
query I rowsort label-2452
SELECT ALL tab2.col1 / col1 + - 85 + - col2 * - col1 AS col0 FROM tab2
----
1450
562
753

query I rowsort
SELECT - - ( cor1.col0 ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # use DIV operator for integer division
query I rowsort label-2454
SELECT + tab1.col1 + - col2 - + 84 DIV tab1.col1 FROM tab1
----
-31
-55
-89

skipif mysql # not compatible
query I rowsort label-2454
SELECT + tab1.col1 + - col2 - + 84 / tab1.col1 FROM tab1
----
-31
-55
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2455
SELECT 82 DIV - col1 AS col1 FROM tab1 AS cor0
----
-3
-6
-8

skipif mysql # not compatible
query I rowsort label-2455
SELECT 82 / - col1 AS col1 FROM tab1 AS cor0
----
-3
-6
-8

query I rowsort
SELECT DISTINCT tab1.col2 + col2 * + col2 AS col1 FROM tab1
----
2970
3306
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 * + 60 col2 FROM tab0
----
1980
4920
60

query I rowsort
SELECT - col1 + - ( col0 ) FROM tab0
----
-110
-132
-180

query I rowsort
SELECT ALL - cor1.col0 AS col2 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT ALL + 40 AS col1 FROM tab1
----
40
40
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-2461
SELECT + cor0.col0 + - col2 DIV col0 col1 FROM tab0 AS cor0
----
23
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2461
SELECT + cor0.col0 + - col2 / col0 col1 FROM tab0 AS cor0
----
23
35
89

query I rowsort
SELECT DISTINCT - 40 AS col1 FROM tab1, tab0 AS cor0
----
-40

query I rowsort
SELECT ALL + 18 * - col2 + col1 FROM tab1 cor0
----
-1016
-1715
-946

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( - 7 AS REAL ) col0 FROM tab1
----
7
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + col2 col1 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2466
SELECT ALL + ( + col2 ) + CAST( NULL AS SIGNED ) * - ( col1 ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2466
SELECT ALL + ( + col2 ) + CAST ( NULL AS INTEGER ) * - ( col1 ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 89 * col1 + 37 AS col2 FROM tab2 AS cor0
----
-1476
-2722
-5214

query I rowsort
SELECT DISTINCT - 41 + col0 AS col0 FROM tab1 AS cor0
----
-38
23
39

query I rowsort
SELECT + + 92 * col1 FROM tab2 AS cor0
----
1564
2852
5428

query I rowsort
SELECT DISTINCT 12 * - col2 AS col1 FROM tab1 AS cor0
----
-1152
-648
-684

query I rowsort
SELECT + cor0.col1 * - col1 + - 22 FROM tab0 AS cor0
----
-7418
-8303
-9431

skipif mysql # not compatible
query I rowsort
SELECT ALL - col0 + - col2 * ( cor0.col0 ) - - CAST ( col1 + - col0 AS REAL ) FROM tab0 AS cor0
----
-7385
-754
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-2473
SELECT col2 DIV + col1 + - col0 - col1 AS col2 FROM tab2 AS cor0
----
-137
-38
-94

skipif mysql # not compatible
query I rowsort label-2473
SELECT col2 / + col1 + - col0 - col1 AS col2 FROM tab2 AS cor0
----
-137
-38
-94

query I rowsort
SELECT + col1 + 12 + - col0 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
144
7401
890

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-2476
SELECT ALL col1 * - CAST( col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-2476
SELECT ALL col1 * - CAST ( col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-2477
SELECT DISTINCT cor0.col0 * col1 DIV 6 FROM tab2 AS cor0
----
223
36
767

skipif mysql # not compatible
query I rowsort label-2477
SELECT DISTINCT cor0.col0 * col1 / 6 FROM tab2 AS cor0
----
223
36
767

query I rowsort
SELECT 95 + - col0 * - col2 FROM tab0 cor0
----
130
7393
887

query I rowsort
SELECT ALL + 49 * + col1 AS col0 FROM tab0 cor0
----
4214
4459
4753

query I rowsort
SELECT 81 * col2 AS col1 FROM tab0 AS cor0
----
2673
6642
81

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ( 40 ) FROM tab0 cor0
----
40
40
40

query I rowsort
SELECT - col1 + tab0.col0 * col2 + col0 FROM tab0
----
-27
7296
730

query I rowsort
SELECT col1 * - col2 - - col1 FROM tab1 cor0
----
-1235
-1378
-560

query I rowsort
SELECT - - ( col1 ) + col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT - + col0 - 88 FROM tab2 AS cor0
----
-166
-167
-95

query I rowsort
SELECT DISTINCT ( + col1 ) * col0 - - 32 AS col2 FROM tab0
----
2096
3427
8131

query I rowsort
SELECT - - col1 * 13 * + col2 + + cor0.col1 * + col2 AS col0 FROM tab0 AS cor0
----
104468
1358
39732

query I rowsort
SELECT ALL col2 + + col1 * col1 * col0 AS col0 FROM tab2
----
22869
271544
6754

query I rowsort
SELECT DISTINCT - col2 * - 34 * - 94 + col2 * tab0.col0 AS col1 FROM tab0
----
-104676
-254774
-3161

query I rowsort
SELECT col1 * + col2 + cor0.col0 * col1 AS col1 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT + - 44 FROM tab1 AS cor0
----
-44
-44
-44

query I rowsort
SELECT ALL col1 * 78 FROM tab1
----
1014
2028
780

query I rowsort
SELECT DISTINCT + + 57 FROM tab0 cor0
----
57

query I rowsort
SELECT DISTINCT - - 67 FROM tab0, tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-2496
SELECT + ( + col1 ) DIV col0 AS col1 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-2496
SELECT + ( + col1 ) / col0 AS col1 FROM tab1
----
0
0
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2497
SELECT col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2497
SELECT col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab0, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT + 46 + + col2 * col0 * + col0 FROM tab1
----
233518
532
614446

query I rowsort
SELECT 98 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

onlyif mysql # use DIV operator for integer division
query I rowsort label-2501
SELECT ALL - col2 * col0 DIV col1 col1 FROM tab0
----
-80
-9
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2501
SELECT ALL - col2 * col0 / col1 col1 FROM tab0
----
-80
-9
0

query I rowsort
SELECT 88 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT ALL + col0 * + 48 FROM tab1 AS cor0
----
144
3072
3840

query I rowsort
SELECT + + col0 + + col2 + 51 FROM tab0 AS cor0
----
108
222
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2505
SELECT DISTINCT col1 * - col2 * - CAST( NULL AS SIGNED ) + col2 / - col1 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2505
SELECT DISTINCT col1 * - col2 * - CAST ( NULL AS INTEGER ) + col2 / - col1 AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2506
SELECT ALL ( cor0.col0 ) DIV 21 + 47 + col0 AS col0 FROM tab0 AS cor0
----
140
72
83

skipif mysql # not compatible
query I rowsort label-2506
SELECT ALL ( cor0.col0 ) / 21 + 47 + col0 AS col0 FROM tab0 AS cor0
----
140
72
83

query I rowsort
SELECT ALL - 8 + cor0.col1 FROM tab0 AS cor0
----
78
83
89

query I rowsort
SELECT ALL - 61 * col0 AS col2 FROM tab0 AS cor0
----
-1464
-2135
-5429

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 AS col0 FROM tab0 cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-2510
SELECT col0 + cor0.col2 + col0 DIV - cor0.col0 FROM tab2 AS cor0
----
103
116
33

skipif mysql # not compatible
query I rowsort label-2510
SELECT col0 + cor0.col2 + col0 / - cor0.col0 FROM tab2 AS cor0
----
103
116
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-2511
SELECT 56 DIV col2 AS col1 FROM tab0 AS cor0
----
0
1
56

skipif mysql # not compatible
query I rowsort label-2511
SELECT 56 / col2 AS col1 FROM tab0 AS cor0
----
0
1
56

query I rowsort
SELECT ALL + ( - col1 ) * - cor0.col1 * - col0 AS col0 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT + - ( + col2 ) * col2 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT - col0 + col1 * - 52 * ( col0 * col2 ) FROM tab2 AS cor0
----
-2653847
-304675
-6221982

query I rowsort
SELECT + cor1.col1 FROM tab0, tab1, tab0 AS cor0, tab1 AS cor1
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT DISTINCT + 31 * + col2 * - col2 FROM tab1
----
-100719
-285696
-90396

onlyif mysql # use DIV operator for integer division
query I rowsort label-2517
SELECT - 12 DIV col2 + - 52 * cor0.col1 + cor0.col2 col1 FROM tab0 AS cor0
----
-4439
-4650
-5055

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2517
SELECT - 12 / col2 + - 52 * cor0.col1 + cor0.col2 col1 FROM tab0 AS cor0
----
-4439
-4650
-5055

query I rowsort
SELECT ALL 43 * + col1 FROM tab1 AS cor0
----
1118
430
559

onlyif mysql # use DIV operator for integer division
query I rowsort label-2519
SELECT DISTINCT - - col1 + - col2 * col2 DIV cor0.col1 FROM tab2 AS cor0
----
-67
48
8

skipif mysql # not compatible
query I rowsort label-2519
SELECT DISTINCT - - col1 + - col2 * col2 / cor0.col1 FROM tab2 AS cor0
----
-67
48
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-2520
SELECT - col0 * col1 + - col1 + col0 DIV cor0.col0 FROM tab1 AS cor0
----
-103
-1052
-649

skipif mysql # not compatible
query I rowsort label-2520
SELECT - col0 * col1 + - col1 + col0 / cor0.col0 FROM tab1 AS cor0
----
-103
-1052
-649

query I rowsort
SELECT - - col0 + col0 * col1 + - col1 AS col2 FROM tab0 AS cor0
----
2002
3333
8097

query I rowsort
SELECT + - col1 * - 62 FROM tab0 AS cor0
----
5332
5642
6014

query I rowsort
SELECT DISTINCT - - col2 * - col2 AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL + col2 + + ( + col2 ) * + col1 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-2525
SELECT + - cor0.col1 DIV + col1 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2525
SELECT + - cor0.col1 / + col1 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + ( + col1 ) + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + ( col0 ) + + col2 + col0 AS col2 FROM tab0 AS cor0
----
260
71
81

query I rowsort
SELECT DISTINCT + ( + 49 ) * col2 * col1 FROM tab2 AS cor0
----
31654
41013
75166

query I rowsort
SELECT ALL + - 13 AS col1 FROM tab0 AS cor0
----
-13
-13
-13

onlyif mysql # use DIV operator for integer division
query I rowsort label-2530
SELECT - tab1.col0 DIV col2 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2530
SELECT - tab1.col0 / col2 FROM tab1
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2531
SELECT DISTINCT + tab2.col2 DIV 85 col0 FROM tab2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2531
SELECT DISTINCT + tab2.col2 / 85 col0 FROM tab2
----
0

query I rowsort
SELECT ALL - 87 + 26 AS col1 FROM tab2
----
-61
-61
-61

query I rowsort
SELECT - ( col0 ) * col0 + col2 + col0 FROM tab0
----
-1189
-519
-7750

query I rowsort
SELECT - col1 + tab1.col1 * + col2 FROM tab1
----
1235
1378
560

query I rowsort
SELECT DISTINCT + tab0.col0 * col2 + col0 * - col2 FROM tab0
----
0

query I rowsort
SELECT + col1 - col2 * - tab2.col1 AS col2 FROM tab2
----
1593
663
868

query I rowsort
SELECT col1 + - ( - col1 ) * - ( - col1 ) FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT - 4 FROM tab1, tab2 AS cor0
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

query I rowsort
SELECT ALL 12 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT ALL tab1.col1 + ( + col1 * col1 ) AS col2 FROM tab1
----
110
182
702

query I rowsort
SELECT DISTINCT + 32 + - ( cor0.col1 ) FROM tab1 AS cor0
----
19
22
6

query I rowsort
SELECT ALL - col2 - + col1 AS col2 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT + 95 * - col0 AS col0 FROM tab1 AS cor0
----
-285
-6080
-7600

query I rowsort
SELECT cor0.col0 * 94 FROM tab2, tab2 AS cor0
----
9 values hashing to fe51505b9810a540072688ce59832aa0

query I rowsort
SELECT 20 * + col0 FROM tab2
----
140
1560
1580

onlyif mysql # use DIV operator for integer division
query I rowsort label-2546
SELECT + - ( col0 ) DIV + 95 + - col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-2546
SELECT + - ( col0 ) / + 95 + - col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL + - 80 FROM tab1 cor0
----
-80
-80
-80

query I rowsort
SELECT 94 + - col2 * + 6 FROM tab1 AS cor0
----
-230
-248
-482

query I rowsort
SELECT + - cor0.col2 * col0 * col1 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
-119574
-50955
-5852

query I rowsort
SELECT ALL + - col0 * cor0.col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - + ( + col0 ) FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - cor0.col0 * - cor1.col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6a95e15f430b2932fa5393d3187190ee

query I rowsort
SELECT DISTINCT cor0.col0 * 7 + + 28 FROM tab1 AS cor0
----
476
49
588

query I rowsort
SELECT ALL - col2 * + 77 AS col1 FROM tab1
----
-4158
-4389
-7392

query I rowsort
SELECT DISTINCT - col2 - - ( col1 ) FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT DISTINCT - col1 * + col2 * - col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT ALL - + col2 * + col2 * ( col1 ) + + 52 FROM tab0 AS cor0
----
-45
-611832
-93602

query I rowsort
SELECT DISTINCT - - col2 - + ( - 59 ) * col2 AS col1 FROM tab0 AS cor0
----
1980
4920
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2559
SELECT + - col0 * - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2559
SELECT + - col0 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * - 6 FROM tab0 AS cor0
----
-516
-546
-582

query I rowsort
SELECT - col1 * + ( - cor0.col0 * - cor0.col0 ) - ( cor0.col0 ) AS col0 FROM tab1 AS cor0
----
-237
-41024
-83280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 71 col0 FROM tab1 AS cor0
----
-71

query I rowsort
SELECT DISTINCT - 1 * col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL ( + col2 ) * + col2 + + ( cor0.col0 ) + - cor0.col2 FROM tab0 AS cor0
----
1080
35
6731

query I rowsort
SELECT + col0 * - col2 - col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT + ( - 48 ) + col1 * - ( ( - cor0.col1 ) ) FROM tab1 AS cor0
----
121
52
628

query I rowsort
SELECT DISTINCT - - ( - col1 ) * col0 + + ( col1 ) FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col1 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - + 3 - - col2 FROM tab2 cor0
----
23
24
35

query I rowsort
SELECT DISTINCT col1 * 2 AS col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL - + 42 + col1 FROM tab2 AS cor0
----
-11
-25
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-2572
SELECT - + CAST( - col1 AS SIGNED ) DIV col0 - + 85 AS col2 FROM tab2 AS cor0
----
-81
-85
-85

skipif mysql # not compatible
query I rowsort label-2572
SELECT - + CAST ( - col1 AS INTEGER ) / col0 - + 85 AS col2 FROM tab2 AS cor0
----
-81
-85
-85

query I rowsort
SELECT ALL col0 * - col0 * + col0 FROM tab1 AS cor0
----
-262144
-27
-512000

query I rowsort
SELECT DISTINCT col1 * col0 - 62 AS col1 FROM tab1
----
16
578
978

query I rowsort
SELECT - col2 - - 48 AS col1 FROM tab0
----
-34
15
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2576
SELECT DISTINCT col2 - - CAST( - col1 AS SIGNED ) * + col2 * - 0 AS col1 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2576
SELECT DISTINCT col2 - - CAST ( - col1 AS INTEGER ) * + col2 * - 0 AS col1 FROM tab2
----
26
27
38

query I rowsort
SELECT ALL - col1 + - col2 * col1 AS col1 FROM tab1 cor0
----
-1261
-1430
-580

onlyif mysql # use DIV operator for integer division
query I rowsort label-2578
SELECT ALL - col2 DIV col1 + - col1 FROM tab1 AS cor0
----
-15
-20
-28

skipif mysql # not compatible
query I rowsort label-2578
SELECT ALL - col2 / col1 + - col1 FROM tab1 AS cor0
----
-15
-20
-28

query I rowsort
SELECT + - col1 * - 98 - col1 AS col0 FROM tab1 AS cor0
----
1261
2522
970

query I rowsort
SELECT tab1.col1 * col1 + - col1 + col2 AS col1 FROM tab1
----
147
252
704

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 94 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

onlyif mysql # use DIV operator for integer division
query I rowsort label-2582
SELECT DISTINCT col0 - 4 DIV col2 FROM tab0
----
24
31
89

skipif mysql # not compatible
query I rowsort label-2582
SELECT DISTINCT col0 - 4 / col2 FROM tab0
----
24
31
89

query I rowsort
SELECT + - col1 * ( - cor0.col2 ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col1 * + 21 + 51 * + col1 AS col0 FROM tab0 cor0
----
2580
2730
2910

query I rowsort
SELECT - 95 + col0 * ( - 38 ) * - col2 AS col0 FROM tab0
----
1235
277229
30001

query I rowsort
SELECT col2 + col1 * 79 FROM tab2
----
1381
2476
4687

query I rowsort
SELECT col1 * ( - col0 ) AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT 57 * 69 FROM tab2, tab2 cor0
----
9 values hashing to fc2f7a02418f6f92504ab8577f18970f

query I rowsort
SELECT + tab0.col1 * ( 22 ) AS col2 FROM tab0
----
1892
2002
2134

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2590
SELECT - - col0 * + CAST( 22 AS SIGNED ) col0 FROM tab2 AS cor0
----
154
1716
1738

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2590
SELECT - - col0 * + CAST ( 22 AS INTEGER ) col0 FROM tab2 AS cor0
----
154
1716
1738

query I rowsort
SELECT DISTINCT - col2 + 84 * - col0 AS col1 FROM tab1 AS cor0
----
-306
-5433
-6816

query I rowsort
SELECT DISTINCT - col1 * 44 FROM tab1 AS cor0
----
-1144
-440
-572

query I rowsort
SELECT DISTINCT + col0 * + 16 FROM tab0
----
1424
384
560

query I rowsort
SELECT + ( + 43 ) AS col2 FROM tab0
----
43
43
43

query I rowsort
SELECT ( 4 ) + - col0 * + col1 FROM tab0
----
-2060
-3391
-8095

query I rowsort
SELECT ALL 20 + + col0 * col0 FROM tab2 AS cor0
----
6104
6261
69

query I rowsort
SELECT - tab1.col1 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT ALL + - 7 + + cor1.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to eca0d238d9ebace069257a69374b8bee

query I rowsort
SELECT - + col0 - col0 * ( + col2 ) AS col2 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT ALL cor0.col2 + - col1 AS col2 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL - 22 + + col1 * col1 - - col2 * + col1 AS col2 FROM tab2 AS cor0
----
1776
4993
913

onlyif mysql # use DIV operator for integer division
query I rowsort label-2602
SELECT + 16 DIV + col1 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2602
SELECT + 16 / + col1 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2603
SELECT ALL col1 + - col0 DIV + cor0.col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2603
SELECT ALL col1 + - col0 / + cor0.col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2604
SELECT ALL + cor0.col1 * - col1 / - CAST( NULL AS DECIMAL ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2604
SELECT ALL + cor0.col1 * - col1 / - CAST ( NULL AS REAL ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - col1 + - col2 ) AS col0 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT - + 72 * - col2 AS col2 FROM tab1 AS cor0
----
3888
4104
6912

query I rowsort
SELECT col1 - + col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort
SELECT col0 + - col2 * CAST ( col1 AS REAL ) FROM tab1
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-2609
SELECT - col0 + 47 DIV col0 FROM tab2 AS cor0
----
-1
-78
-79

skipif mysql # not compatible
query I rowsort label-2609
SELECT - col0 + 47 / col0 FROM tab2 AS cor0
----
-1
-78
-79

query I rowsort
SELECT - col2 * col0 + - col1 FROM tab0 AS cor0
----
-132
-7389
-878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col0 * + cor0.col1 - cor0.col0 * - ( ( col0 ) ) col1 FROM tab1 AS cor0
----
-32384
-4203
-93440

query I rowsort
SELECT tab2.col2 + + 15 + + col1 * col2 FROM tab2
----
1575
699
879

query I rowsort
SELECT cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2614
SELECT + col0 - + CAST( NULL AS SIGNED ) * col0 * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2614
SELECT + col0 - + CAST ( NULL AS INTEGER ) * col0 * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + ( - col1 * - col0 ) FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2616
SELECT ALL - col1 DIV - ( + 41 ) + - col0 FROM tab2 AS cor0
----
-7
-77
-79

skipif mysql # not compatible
query I rowsort label-2616
SELECT ALL - col1 / - ( + 41 ) + - col0 FROM tab2 AS cor0
----
-7
-77
-79

query I rowsort
SELECT DISTINCT - col1 + - ( col1 ) FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT ALL + - col1 + col0 * col1 AS col0 FROM tab2 AS cor0
----
1326
186
4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2619
SELECT ALL - col0 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2619
SELECT ALL - col0 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col1 * 40 FROM tab1 AS cor0
----
-1040
-400
-520

query I rowsort
SELECT - + 71 * + col2 FROM tab0 AS cor0
----
-2343
-5822
-71

query I rowsort
SELECT DISTINCT 36 * + tab0.col1 + col1 AS col0 FROM tab0
----
3182
3367
3589

query I rowsort
SELECT + 91 * col2 FROM tab1 AS cor0
----
4914
5187
8736

query I rowsort
SELECT ( col0 ) + + col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT - ( - col2 ) * col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2626
SELECT col0 DIV col0 + col2 AS col1 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-2626
SELECT col0 / col0 + col2 AS col1 FROM tab0 AS cor0
----
2
34
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2627
SELECT DISTINCT + + col0 DIV - col1 + + col0 AS col0 FROM tab1 AS cor0
----
3
58
74

skipif mysql # not compatible
query I rowsort label-2627
SELECT DISTINCT + + col0 / - col1 + + col0 AS col0 FROM tab1 AS cor0
----
3
58
74

query I rowsort
SELECT 68 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 7ff6433dda3248dce73040b2c590f3da

query I rowsort
SELECT - - 22 * col0 * + ( - col2 ) FROM tab2 cor0
----
-4158
-44616
-66044

query I rowsort
SELECT 87 * col1 AS col2 FROM tab1 cor0
----
1131
2262
870

query I rowsort
SELECT 58 + + 69 * + cor0.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 1a099f37061e414e1fc850cd12f377d0

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
3645 values hashing to 825c5bff5308aeedb3a0a28713da0683

query I rowsort
SELECT + col0 + + col1 + - col1 AS col2 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2634
SELECT DISTINCT col2 + col1 DIV col0 AS col1 FROM tab1
----
57
62
96

skipif mysql # not compatible
query I rowsort label-2634
SELECT DISTINCT col2 + col1 / col0 AS col1 FROM tab1
----
57
62
96

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL IN ( + col2 )
----

query I rowsort
SELECT ALL + col0 * col2 * - col2 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT col0 FROM tab2 WHERE NOT NULL IN ( - col1 * + col0 / col2 )
----

query I rowsort
SELECT DISTINCT - col1 * tab0.col1 + col2 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT col0 + tab0.col1 * col0 AS col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT + col1 FROM tab2 WHERE + col2 IN ( + col2 )
----
17
31
59

query I rowsort
SELECT ALL - tab2.col0 * + col2 + + col2 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT col1 * - tab1.col1 AS col1 FROM tab1
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - tab2.col2 col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT + - cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col0 * col1 + + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-2646
SELECT - col2 * col0 DIV tab0.col1 FROM tab0
----
-80
-9
0

skipif mysql # not compatible
query I rowsort label-2646
SELECT - col2 * col0 / tab0.col1 FROM tab0
----
-80
-9
0

query I rowsort
SELECT DISTINCT - col0 * + col0 + col1 + - col2 AS col0 FROM tab2
----
-45
-6051
-6262

query I rowsort
SELECT tab2.col1 + col1 + + col0 FROM tab2
----
113
196
69

query I rowsort
SELECT DISTINCT col0 * - col1 + cor0.col0 FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT - col1 + + col0 * + col1 AS col0 FROM tab2 WHERE ( + col2 ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT - col1 * + col2 + - col0 AS col0 FROM tab1
----
-1328
-1407
-634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col1 * col1 + + tab2.col2 * col0 + col1 col0 FROM tab2
----
-25727
-7963
-88419

query I rowsort
SELECT col2 + cor0.col1 - col2 * col0 FROM tab1 AS cor0
----
-3581
-7571
-82

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT col2 * col0 NOT IN ( - col1 + col0 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT col1 * col2 IN ( + col1 / tab0.col2 )
----
24
86
33
89
91
82

query I rowsort
SELECT tab2.col1 * col2 + col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT DISTINCT col2 + + col0 FROM tab2 WHERE NULL <> + col2
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL IN ( + tab0.col1 )
----

query I rowsort
SELECT col2 - tab2.col0 AS col1 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL - col0 + + col1 * - col1 AS col0 FROM tab0
----
-7420
-8370
-9444

query I rowsort
SELECT DISTINCT tab2.col1 + + col2 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT col0 * - col0 + col0 AS col1 FROM tab1
----
-4032
-6
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-2663
SELECT - col1 * col2 DIV col2 + col2 FROM tab1
----
28
47
83

skipif mysql # not compatible
query I rowsort label-2663
SELECT - col1 * col2 / col2 + col2 FROM tab1
----
28
47
83

query I rowsort
SELECT + col0 + cor0.col2 * - cor0.col2 - col0 * col0 * + col2 FROM tab1 AS cor0
----
-236657
-3399
-623536

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col2 + tab1.col0 col2 FROM tab1
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-2666
SELECT DISTINCT col1 * col0 DIV col0 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2666
SELECT DISTINCT col1 * col0 / col0 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2667
SELECT DISTINCT - col0 DIV + col2 col0 FROM tab0
----
-1
-35
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2667
SELECT DISTINCT - col0 / + col2 col0 FROM tab0
----
-1
-35
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2668
SELECT ALL col0 * - col2 DIV tab0.col2 AS col1 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-2668
SELECT ALL col0 * - col2 / tab0.col2 AS col1 FROM tab0
----
-24
-35
-89

query III rowsort
SELECT * FROM tab0 WHERE NOT - col2 - + col2 * + col1 * col0 BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2670
SELECT ALL col2 * tab1.col2 DIV + col1 FROM tab1
----
112
324
708

skipif mysql # not compatible
query I rowsort label-2670
SELECT ALL col2 * tab1.col2 / + col1 FROM tab1
----
112
324
708

query I rowsort
SELECT - + ( cor0.col2 ) - cor0.col0 AS col1 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT 53 + + cor0.col1 * col0 FROM tab0 AS cor0
----
2117
3448
8152

onlyif mysql # use DIV operator for integer division
query I rowsort label-2673
SELECT ALL - ( + 89 ) DIV col2 AS col1 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2673
SELECT ALL - ( + 89 ) / col2 AS col1 FROM tab1 AS cor0
----
-1
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2674
SELECT ALL + CAST( NULL AS SIGNED ) * - col1 + + col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2674
SELECT ALL + CAST ( NULL AS INTEGER ) * - col1 + + col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0, tab1 cor1, tab2 AS cor2
----
972 values hashing to e610acd60f342127e6cdba18673d9f0e

query I rowsort
SELECT - 64 + + 39 * col1 + + col0 FROM tab1
----
390
523
953

query I rowsort
SELECT + tab1.col2 * + col0 + col2 AS col1 FROM tab1
----
216
3705
7776

query I rowsort
SELECT ALL 68 + + col0 FROM tab1
----
132
148
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-2679
SELECT ALL 2 DIV 11 + col2 AS col2 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2679
SELECT ALL 2 / 11 + col2 AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT 22 + col1 * col1 FROM tab0 cor0
----
7418
8303
9431

query I rowsort
SELECT DISTINCT + ( + col2 ) + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2682
SELECT ( col2 ) * cor0.col2 - - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2682
SELECT ( col2 ) * cor0.col2 - - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( col1 ) * + col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT tab1.col2 + - col0 * + tab1.col1 AS col2 FROM tab1
----
-24
-583
-944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2685
SELECT col0 * col1 - - CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2685
SELECT col0 * col1 - - CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + 11 - - tab0.col2 FROM tab0
----
12
44
93

query I rowsort
SELECT tab2.col2 * + tab2.col2 + - 23 AS col0 FROM tab2
----
1421
653
706

query I rowsort
SELECT DISTINCT cor0.col1 * - col2 AS col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + col2 + col2 * 19 AS col2 FROM tab1 AS cor0
----
1080
1140
1920

query I rowsort
SELECT DISTINCT - - col1 * col2 + + 87 FROM tab1 cor0
----
1335
1491
657

onlyif mysql # use DIV operator for integer division
query I rowsort label-2691
SELECT DISTINCT col2 DIV - col2 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-2691
SELECT DISTINCT col2 / - col2 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
53
56
95

query I rowsort
SELECT + col1 * 13 + - col0 AS col2 FROM tab1 AS cor0
----
335
66
89

query I rowsort
SELECT ALL - + cor0.col1 + - 66 - col2 FROM tab2 AS cor0
----
-121
-124
-151

query I rowsort
SELECT ALL + col0 + ( + 36 ) * - col1 AS col2 FROM tab1 cor0
----
-296
-388
-933

query I rowsort
SELECT ALL col0 + cor0.col2 + + col2 * + col2 AS col0 FROM tab0 AS cor0
----
1146
37
6895

query I rowsort
SELECT ALL - col0 * + col1 + 33 + cor0.col0 FROM tab1 AS cor0
----
-42
-543
-927

query I rowsort
SELECT DISTINCT + + col2 + ( + col0 ) FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + - col0 + + 81 * + 57 FROM tab0 AS cor0
----
4528
4582
4593

query I rowsort
SELECT ALL + col2 * + cor0.col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT cor0.col1 * + col1 + 97 FROM tab1 AS cor0
----
197
266
773

query I rowsort
SELECT ALL - - col2 * + 65 + + col0 * + cor0.col1 FROM tab0 AS cor0
----
13429
3460
4209

query I rowsort
SELECT - - ( + col0 ) AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - col1 * col2 * + col2 AS col1 FROM tab0 cor0
----
-611884
-93654
-97

query I rowsort
SELECT + 63 * + col0 FROM tab0 AS cor0
----
1512
2205
5607

query I rowsort
SELECT DISTINCT - ( + ( col1 ) ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - - cor0.col1 * col2 + + col2 AS col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2707
SELECT - CAST( 50 AS SIGNED ) * - col0 FROM tab0 AS cor0
----
1200
1750
4450

skipif mysql # not compatible
query I rowsort label-2707
SELECT - CAST ( 50 AS INTEGER ) * - col0 FROM tab0 AS cor0
----
1200
1750
4450

query I rowsort
SELECT - + 5 + - col1 - - col1 FROM tab1 cor0
----
-5
-5
-5

query I rowsort
SELECT DISTINCT - ( - col0 ) * - tab1.col0 FROM tab1
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2710
SELECT col2 DIV 39 AS col0 FROM tab0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-2710
SELECT col2 / 39 AS col0 FROM tab0
----
0
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-2711
SELECT 95 DIV + 60 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2711
SELECT 95 / + 60 AS col2 FROM tab0
----
1
1
1

query I rowsort
SELECT + col0 + - 12 * col1 * col1 AS col0 FROM tab0 AS cor0
----
-112873
-88728
-99283

query I rowsort
SELECT cor0.col1 * - 30 AS col0 FROM tab2 AS cor0
----
-1770
-510
-930

query I rowsort
SELECT ALL + + col1 * + 23 FROM tab0 cor0
----
1978
2093
2231

query I rowsort
SELECT ALL col1 + col0 * - col0 + + cor0.col1 * cor0.col1 FROM tab1 AS cor0
----
-3986
-6218
693

onlyif mysql # use DIV operator for integer division
query I rowsort label-2716
SELECT + 13 DIV col0 + - col1 FROM tab2
----
-17
-30
-59

skipif mysql # not compatible
query I rowsort label-2716
SELECT + 13 / col0 + - col1 FROM tab2
----
-17
-30
-59

query I rowsort
SELECT tab1.col2 * col2 * + ( + col1 * + tab1.col2 ) FROM tab1
----
11501568
1851930
4094064

query I rowsort
SELECT DISTINCT + 41 AS col1 FROM tab1
----
41

query I rowsort
SELECT ALL - 35 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

query I rowsort
SELECT tab2.col1 + col1 * col2 FROM tab2
----
1593
663
868

query I rowsort
SELECT - col2 * 65 AS col0 FROM tab1 AS cor0
----
-3510
-3705
-6240

query I rowsort
SELECT - - col0 * - cor0.col0 + 54 * col0 FROM tab2 AS cor0
----
-1872
-1975
329

onlyif mysql # use DIV operator for integer division
query I rowsort label-2723
SELECT DISTINCT + col0 + col1 DIV 75 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-2723
SELECT DISTINCT + col0 + col1 / 75 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT ALL ( - 70 ) AS col2 FROM tab1, tab1 cor0
----
9 values hashing to 35707a5d99c98b2657c084a50ff1b073

onlyif mysql # use DIV operator for integer division
query I rowsort label-2725
SELECT ALL + col2 DIV cor0.col2 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2725
SELECT ALL + col2 / cor0.col2 AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + - col0 * - 60 FROM tab2 AS cor0
----
420
4680
4740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 + - col0 col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT + col0 + + col1 * - col1 AS col1 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT ALL + + col2 + + col2 * col0 AS col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT + col1 * col2 + + col0 * - col0 AS col2 FROM tab0 AS cor0
----
-1128
-459
2262

query I rowsort
SELECT ALL col1 - - col0 * col0 * col0 FROM tab1 AS cor0
----
262154
512013
53

query I rowsort
SELECT ALL + 51 * - tab1.col1 AS col0 FROM tab1
----
-1326
-510
-663

onlyif mysql # use DIV operator for integer division
query I rowsort label-2733
SELECT - + 75 DIV col2 - + col1 AS col0 FROM tab1 AS cor0
----
-11
-13
-27

skipif mysql # not compatible
query I rowsort label-2733
SELECT - + 75 / col2 - + col1 AS col0 FROM tab1 AS cor0
----
-11
-13
-27

query I rowsort
SELECT + col2 + + col2 * + col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT - 59 * col0 + col2 AS col0 FROM tab1 AS cor0
----
-123
-3719
-4624

onlyif mysql # use DIV operator for integer division
query I rowsort label-2736
SELECT ALL cor0.col1 DIV + col0 + col1 DIV + col1 + col1 AS col1 FROM tab0 AS cor0
----
100
90
93

skipif mysql # not compatible
query I rowsort label-2736
SELECT ALL cor0.col1 / + col0 + col1 / + col1 + col1 AS col1 FROM tab0 AS cor0
----
100
90
93

query I rowsort
SELECT ( + col0 ) * - col1 + - col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT - cor0.col2 + col1 FROM tab2 cor0
----
-21
33
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2739
SELECT + cor0.col0 - CAST( col0 + col0 * + col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-2739
SELECT + cor0.col0 - CAST ( col0 + col0 * + col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2740
SELECT ALL - col1 DIV 47 + col1 FROM tab0 AS cor0
----
85
90
95

skipif mysql # not compatible
query I rowsort label-2740
SELECT ALL - col1 / 47 + col1 FROM tab0 AS cor0
----
85
90
95

query I rowsort
SELECT DISTINCT col1 * - col2 + col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL - col0 + 81 * - col1 AS col1 FROM tab0 AS cor0
----
-6990
-7460
-7892

query I rowsort
SELECT + 49 - + col2 FROM tab2
----
11
22
23

query I rowsort
SELECT col0 + - col0 + col1 * + ( - tab0.col1 ) AS col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT + 59 AS col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT + 76 * + col1 FROM tab1 AS cor0
----
1976
760
988

query I rowsort
SELECT + col0 + - col2 + + col2 AS col0 FROM tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 * ( + 10 ) col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 41bb55132a35faf7962d281277863aaa

query I rowsort
SELECT + 48 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT ALL + col0 + - col0 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * ( - cor0.col1 ) * + col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT ALL cor0.col1 + col2 AS col0 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT - col1 + 77 AS col0 FROM tab0 cor0
----
-14
-20
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2754
SELECT DISTINCT - col1 * + CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-2754
SELECT DISTINCT - col1 * + CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - cor0.col1 * + 87 + cor0.col0 + + col1 AS col2 FROM tab0 AS cor0
----
-7372
-7737
-8307

query I rowsort
SELECT ALL - - col0 - + ( col2 ) AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + 72 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

onlyif mysql # use DIV operator for integer division
query I rowsort label-2758
SELECT + cor0.col0 DIV col2 AS col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-2758
SELECT + cor0.col0 / col2 AS col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT - col0 + 27 + col2 AS col1 FROM tab2 AS cor0
----
-14
-25
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-2760
SELECT - col1 DIV col0 - cor0.col2 AS col2 FROM tab1 cor0
----
-57
-62
-96

skipif mysql # not compatible
query I rowsort label-2760
SELECT - col1 / col0 - cor0.col2 AS col2 FROM tab1 cor0
----
-57
-62
-96

query I rowsort
SELECT col2 * col0 + 28 + + col2 FROM tab2 AS cor0
----
2082
244
3068

query I rowsort
SELECT ALL + col1 * 77 AS col1 FROM tab0 cor0
----
6622
7007
7469

query I rowsort
SELECT ALL + - col0 * 14 * - cor0.col2 + 82 AS col2 FROM tab1 AS cor0
----
107602
2350
51154

query I rowsort
SELECT DISTINCT + ( 66 ) FROM tab1 AS cor0
----
66

query I rowsort
SELECT DISTINCT + + 88 AS col0 FROM tab2 AS cor0
----
88

query I rowsort
SELECT - ( col0 ) + + col2 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL - + ( col0 ) + col0 - + 2 FROM tab2 AS cor0
----
-2
-2
-2

query I rowsort
SELECT DISTINCT + - 21 - - 56 AS col2 FROM tab0 AS cor0
----
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2769
SELECT DISTINCT - + CAST( 4 AS SIGNED ) * + col2 FROM tab1 AS cor0
----
-216
-228
-384

skipif mysql # not compatible
query I rowsort label-2769
SELECT DISTINCT - + CAST ( 4 AS INTEGER ) * + col2 FROM tab1 AS cor0
----
-216
-228
-384

query I rowsort
SELECT col1 + 71 AS col1 FROM tab2 AS cor0
----
102
130
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-2771
SELECT ALL + 22 * col2 DIV cor0.col1 + - col2 AS col2 FROM tab1 AS cor0
----
-9
66
68

skipif mysql # not compatible
query I rowsort label-2771
SELECT ALL + 22 * col2 / cor0.col1 + - col2 AS col2 FROM tab1 AS cor0
----
-9
66
68

query I rowsort
SELECT DISTINCT + col1 + col1 * col0 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL - + col2 - col2 AS col1 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT ALL - - col2 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT - cor0.col1 + 42 * + cor0.col1 AS col0 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to c4ac02dfdd20f5175849c68fd21eab29

query I rowsort
SELECT ALL - 29 * - col2 - - ( col1 * + col2 ) AS col1 FROM tab2 AS cor0
----
1620
1748
2288

query I rowsort
SELECT cor1.col1 * cor0.col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 95981a80d3d59cb4fd463f4a7ad46da1

query I rowsort
SELECT - cor1.col2 AS col0 FROM tab2, tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) - - col2 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT - ( + col0 ) * col2 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + col2 + + col0 * ( + 48 ) FROM tab1 AS cor0
----
198
3129
3936

onlyif mysql # use DIV operator for integer division
query I rowsort label-2782
SELECT ALL + + col0 DIV col0 AS col2 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2782
SELECT ALL + + col0 / col0 AS col2 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + + cor0.col2 + cor0.col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT - + 61 AS col0 FROM tab2 AS cor0
----
-61
-61
-61

query I rowsort
SELECT + col0 * + col0 * ( + col0 ) FROM tab1 AS cor0
----
262144
27
512000

query I rowsort
SELECT - col2 * + cor0.col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + + col1 * - col2 + col1 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT cor0.col1 * col1 - cor0.col0 * - 22 FROM tab1 AS cor0
----
1508
1929
742

query I rowsort
SELECT - + 68 AS col1 FROM tab0 AS cor0
----
-68
-68
-68

query I rowsort
SELECT ALL - 70 * - col0 AS col1 FROM tab0 cor0
----
1680
2450
6230

query I rowsort
SELECT DISTINCT + 70 + col0 FROM tab0 AS cor0
----
105
159
94

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab0 cor1, tab2, tab2 AS cor2
----
3645 values hashing to 17ceecc141378b185d60a17e53464c26

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab0 AS cor1, tab1, tab0 cor2
----
3645 values hashing to 5d94dfd9164033b5a92f743be8139ecc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col1 * col1 col2 FROM tab1 AS cor0
----
164
249
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-2795
SELECT + col0 DIV + 14 AS col0 FROM tab1 AS cor0
----
0
4
5

skipif mysql # not compatible
query I rowsort label-2795
SELECT + col0 / + 14 AS col0 FROM tab1 AS cor0
----
0
4
5

query I rowsort
SELECT DISTINCT 77 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
77

query I rowsort
SELECT DISTINCT + col2 * + col1 + + cor0.col2 * col1 + - col1 FROM tab1 cor0
----
1130
2483
2782

query I rowsort
SELECT DISTINCT + 69 + - cor0.col1 FROM tab1 AS cor0
----
43
56
59

query I rowsort
SELECT ALL - 12 + - 91 * col1 AS col1 FROM tab1 AS cor0
----
-1195
-2378
-922

query I rowsort
SELECT col1 * tab0.col0 * col1 AS col1 FROM tab0
----
177504
329315
737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + ( - col1 ) + col1 col2 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2802
SELECT col2 DIV 23 + + col0 * + CAST( - col0 + - col0 AS SIGNED ) * + col0 FROM tab0
----
-1409935
-27647
-85750

skipif mysql # not compatible
query I rowsort label-2802
SELECT col2 / 23 + + col0 * + CAST ( - col0 + - col0 AS INTEGER ) * + col0 FROM tab0
----
-1409935
-27647
-85750

query I rowsort
SELECT DISTINCT 16 AS col0 FROM tab2, tab2 cor0
----
16

query I rowsort
SELECT ( col1 ) * col1 * ( col1 + tab1.col0 ) FROM tab1
----
15717
19604
7400

query I rowsort
SELECT ALL + tab1.col1 * 38 AS col2 FROM tab1
----
380
494
988

query I rowsort
SELECT DISTINCT + 64 + col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1470
-582
-773

query I rowsort
SELECT ALL col2 * + 39 FROM tab0 AS cor0
----
1287
3198
39

query I rowsort
SELECT DISTINCT 57 FROM tab0, tab0 AS cor0
----
57

query I rowsort
SELECT cor1.col0 * + cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cf1383d310e5e3e19470e0b8dc064d0c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 50 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to c7432a968c8352c12996dfa54dd4b9e8

query I rowsort
SELECT ALL cor0.col1 + - 46 + cor0.col0 AS col2 FROM tab0 AS cor0
----
134
64
86

query I rowsort
SELECT DISTINCT + + col2 + + col2 AS col1 FROM tab0 AS cor0
----
164
2
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2813
SELECT - CAST( - 81 AS SIGNED ) + - col1 FROM tab0 AS cor0
----
-10
-16
-5

skipif mysql # not compatible
query I rowsort label-2813
SELECT - CAST ( - 81 AS INTEGER ) + - col1 FROM tab0 AS cor0
----
-10
-16
-5

query I rowsort
SELECT col2 + col2 * + 75 * + col2 FROM tab0 cor0
----
504382
76
81708

query I rowsort
SELECT DISTINCT cor1.col1 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + cor0.col0 * + col0 col0 FROM tab1 cor0
----
-17
4086
6387

query I rowsort
SELECT + col0 * col0 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT + 66 + col1 * col2 * - col0 AS col1 FROM tab0 AS cor0
----
-3329
-664052
-68046

onlyif mysql # use DIV operator for integer division
query I rowsort label-2819
SELECT - cor0.col0 + ( + 4 ) * + col1 DIV - ( - col1 ) FROM tab2 AS cor0
----
-3
-74
-75

skipif mysql # not compatible
query I rowsort label-2819
SELECT - cor0.col0 + ( + 4 ) * + col1 / - ( - col1 ) FROM tab2 AS cor0
----
-3
-74
-75

query I rowsort
SELECT + - col0 * - col0 * col2 AS col0 FROM tab2 AS cor0
----
1323
158184
237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-2821
SELECT tab0.col2 + tab0.col1 DIV tab0.col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 4e38fc6b47215ebf2977521cfccf0db7

skipif mysql # not compatible
query I rowsort label-2821
SELECT tab0.col2 + tab0.col1 / tab0.col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 4e38fc6b47215ebf2977521cfccf0db7

query I rowsort
SELECT DISTINCT - 6 AS col0 FROM tab0
----
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2823
SELECT + col0 DIV 82 AS col0 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2823
SELECT + col0 / 82 AS col0 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL + col0 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2826
SELECT DISTINCT - + col1 DIV + 2 AS col2 FROM tab2 AS cor0
----
-15
-29
-8

skipif mysql # not compatible
query I rowsort label-2826
SELECT DISTINCT - + col1 / + 2 AS col2 FROM tab2 AS cor0
----
-15
-29
-8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2827
SELECT DISTINCT - + col0 / CAST( NULL AS SIGNED ) + col2 AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2827
SELECT DISTINCT - + col0 / CAST ( NULL AS INTEGER ) + col2 AS col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT + cor0.col2 * 80 + cor0.col1 * col1 + + col0 FROM tab1 AS cor0
----
4724
4999
7929

query I rowsort
SELECT DISTINCT + - col2 * 25 FROM tab1 AS cor0
----
-1350
-1425
-2400

query I rowsort
SELECT ALL col2 * + ( tab2.col2 ) * - col2 FROM tab2
----
-17576
-19683
-54872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 99 * col1 col0 FROM tab2 AS cor0
----
-1683
-3069
-5841

query I rowsort
SELECT + - col1 + - col2 AS col2 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT col2 - col1 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT - 84 + + 55 * col2 AS col0 FROM tab2 AS cor0
----
1346
1401
2006

query I rowsort
SELECT DISTINCT + - ( + col1 ) FROM tab2 cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 * + col0 col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL col2 + + col0 AS col1 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL tab1.col0 + + 17 FROM tab1
----
20
81
97

query I rowsort
SELECT ALL col0 * 95 * + 24 + - col0 FROM tab0
----
202831
54696
79765

query I rowsort
SELECT ALL + col0 * col2 + + 36 * ( col1 ) + 80 FROM tab0 AS cor0
----
10654
3607
3968

query I rowsort
SELECT - col0 + - cor0.col2 * col2 * + col1 FROM tab0 AS cor0
----
-132
-611973
-93678

query I rowsort
SELECT + col2 + col0 - + col0 AS col0 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2843
SELECT 10 * col0 + + col1 DIV cor0.col2 AS col2 FROM tab0 AS cor0
----
242
447
891

skipif mysql # not compatible
query I rowsort label-2843
SELECT 10 * col0 + + col1 / cor0.col2 AS col2 FROM tab0 AS cor0
----
242
447
891

onlyif mysql # use DIV operator for integer division
query I rowsort label-2844
SELECT ALL - 64 DIV + cor0.col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2844
SELECT ALL - 64 / + cor0.col1 FROM tab0 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + 82 col1 FROM tab2
----
574
6396
6478

query I rowsort
SELECT ALL - col2 * 97 AS col0 FROM tab0
----
-3201
-7954
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2847
SELECT ALL ( tab1.col0 ) DIV + col0 AS col1 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2847
SELECT ALL ( tab1.col0 ) / + col0 AS col1 FROM tab1
----
1
1
1

query I rowsort
SELECT + 31 + 58 AS col1 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

query I rowsort
SELECT + + col0 * + cor0.col2 - col1 FROM tab0 AS cor0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-2850
SELECT + - 67 + col1 DIV - col0 AS col1 FROM tab0 AS cor0
----
-68
-69
-70

skipif mysql # not compatible
query I rowsort label-2850
SELECT + - 67 + col1 / - col0 AS col1 FROM tab0 AS cor0
----
-68
-69
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) + ( + 57 * - col1 ) - - col1 * col1 col0 FROM tab1 AS cor0
----
-534
-652
-809

query I rowsort
SELECT + - col0 - col2 * - 70 AS col0 FROM tab0 AS cor0
----
2286
35
5651

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * + col0 col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - + ( + col0 ) + col1 FROM tab0 AS cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2855
SELECT ALL 54 * 44 + col0 DIV col1 FROM tab1 AS cor0
----
2376
2382
2382

skipif mysql # not compatible
query I rowsort label-2855
SELECT ALL 54 * 44 + col0 / col1 FROM tab1 AS cor0
----
2376
2382
2382

query I rowsort
SELECT DISTINCT + col0 * col0 - + col1 AS col2 FROM tab2 cor0
----
18
6025
6224

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2858
SELECT ALL + - ( col2 ) + - col2 * - col0 DIV + col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2858
SELECT ALL + - ( col2 ) + - col2 * - col0 / + col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2859
SELECT + - 19 DIV col0 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2859
SELECT + - 19 / col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 + - 73 FROM tab0 AS cor0
----
-106
-155
-74

query I rowsort
SELECT + ( 41 ) AS col2 FROM tab1 cor0
----
41
41
41

query I rowsort
SELECT DISTINCT - col2 * col0 AS col0 FROM tab2 cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-2863
SELECT ALL + + 65 * - col0 + - col1 DIV 21 FROM tab1 AS cor0
----
-196
-4160
-5200

skipif mysql # not compatible
query I rowsort label-2863
SELECT ALL + + 65 * - col0 + - col1 / 21 FROM tab1 AS cor0
----
-196
-4160
-5200

onlyif mysql # use DIV operator for integer division
query I rowsort label-2864
SELECT col0 + ( col1 ) * col1 DIV - 41 FROM tab2
----
-16
-6
72

skipif mysql # not compatible
query I rowsort label-2864
SELECT col0 + ( col1 ) * col1 / - 41 FROM tab2
----
-16
-6
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-2865
SELECT ALL col0 DIV + 86 col2 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2865
SELECT ALL col0 / + 86 col2 FROM tab2
----
0
0
0

query I rowsort
SELECT ( + 58 ) FROM tab0, tab2 AS cor0
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

query I rowsort
SELECT DISTINCT - col0 * - tab2.col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - 64 - - col0 FROM tab0
----
-29
-40
25

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2 AS cor2
----
3645 values hashing to e3826bc27970dd1a441a9cd4c13b096d

query I rowsort
SELECT ALL + col2 - tab0.col2 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - ( col2 ) * col1 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - + ( + col1 ) + + col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL + 22 FROM tab0 cor0
----
22
22
22

query I rowsort
SELECT DISTINCT + - cor0.col0 * - col1 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2875
SELECT + - 12 DIV + cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2875
SELECT + - 12 / + cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 66 * + 33 FROM tab0 cor0
----
-2178

onlyif mysql # use DIV operator for integer division
query I rowsort label-2877
SELECT DISTINCT + + col1 * + col1 DIV col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2877
SELECT DISTINCT + + col1 * + col1 / col1 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) * col2 col1 FROM tab1 cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 43 * - cor0.col1 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 2ff4c08fc60430b67daf5f05366431dc

onlyif mysql # use DIV operator for integer division
query I rowsort label-2880
SELECT - ( - 99 ) DIV col1 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2880
SELECT - ( - 99 ) / col1 AS col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2881
SELECT - col2 DIV + col1 + ( - 23 ) DIV + col1 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-2881
SELECT - col2 / + col1 + ( - 23 ) / + col1 FROM tab2
----
-3
0
0

query I rowsort
SELECT col0 + col1 * - col1 AS col0 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT DISTINCT 66 AS col2 FROM tab1
----
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + - col2 col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - + col2 * col2 + - 92 AS col2 FROM tab0 AS cor0
----
-1181
-6816
-93

query I rowsort
SELECT tab0.col2 * + ( + col1 * + tab0.col0 ) + + 83 FROM tab0
----
3478
664201
68195

query I rowsort
SELECT ALL - col0 + col2 * - col2 FROM tab2 AS cor0
----
-1523
-736
-754

query I rowsort
SELECT DISTINCT + - col1 + + col1 * 64 AS col1 FROM tab1 AS cor0
----
1638
630
819

onlyif mysql # use DIV operator for integer division
query I rowsort label-2889
SELECT - col0 DIV - 64 + + 78 * col0 FROM tab2 AS cor0
----
546
6085
6163

skipif mysql # not compatible
query I rowsort label-2889
SELECT - col0 / - 64 + + 78 * col0 FROM tab2 AS cor0
----
546
6085
6163

query I rowsort
SELECT ALL 70 FROM tab0, tab0 cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

query I rowsort
SELECT ALL + - col1 + + cor0.col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2892
SELECT DISTINCT - + col2 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2892
SELECT DISTINCT - + col2 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col1 + + col0 * 93 FROM tab1 AS cor0
----
305
5962
7453

query I rowsort
SELECT DISTINCT col2 * - col1 - - col2 * - col1 FROM tab0 AS cor0
----
-14924
-194
-5676

query I rowsort
SELECT col1 + 34 AS col0 FROM tab1 AS cor0
----
44
47
60

query I rowsort
SELECT ALL + - col1 * - ( + col1 ) + col0 AS col0 FROM tab2 AS cor0
----
3559
368
968

onlyif mysql # use DIV operator for integer division
query I rowsort label-2897
SELECT DISTINCT - + col1 + ( col1 ) DIV - col1 FROM tab2 AS cor0
----
-18
-32
-60

skipif mysql # not compatible
query I rowsort label-2897
SELECT DISTINCT - + col1 + ( col1 ) / - col1 FROM tab2 AS cor0
----
-18
-32
-60

query I rowsort
SELECT ALL + + col2 * col1 - + col2 AS col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT - cor0.col1 + col0 * + cor0.col2 FROM tab0 AS cor0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-2900
SELECT DISTINCT + - col2 DIV 89 AS col1 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2900
SELECT DISTINCT + - col2 / 89 AS col1 FROM tab1 AS cor0
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2901
SELECT ALL cor0.col0 * + CAST( - col1 AS SIGNED ) FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-2901
SELECT ALL cor0.col0 * + CAST ( - col1 AS INTEGER ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + cor0.col2 + - col2 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2903
SELECT + col0 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2903
SELECT + col0 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - col0 ) * col1 AS col1 FROM tab0 cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col0 - col2 col1 FROM tab1 AS cor0
----
-25
-3
17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2906
SELECT ALL - + CAST( col0 AS SIGNED ) * + col2 - col2 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3040

skipif mysql # not compatible
query I rowsort label-2906
SELECT ALL - + CAST ( col0 AS INTEGER ) * + col2 - col2 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT - 61 * col0 + + col0 * + col2 + col2 AS col1 FROM tab2 AS cor0
----
-1779
-211
-2704

query I rowsort
SELECT - + 3 * - col2 FROM tab2 AS cor0
----
114
78
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col0 col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + ( col0 ) + - col2 * 97 FROM tab1 AS cor0
----
-5235
-5465
-9232

query I rowsort
SELECT ALL - col0 + col0 * - 63 * 15 AS col1 FROM tab1 AS cor0
----
-2838
-60544
-75680

query I rowsort
SELECT + col2 * + col2 * + col1 + col1 - - col0 FROM tab1 AS cor0
----
119901
32564
75845

onlyif mysql # use DIV operator for integer division
query I rowsort label-2913
SELECT ALL cor0.col1 DIV col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2913
SELECT ALL cor0.col1 / col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2914
SELECT ALL cor0.col0 + col2 DIV ( ( col0 ) * + 9 ) FROM tab1 AS cor0
----
5
64
80

skipif mysql # not compatible
query I rowsort label-2914
SELECT ALL cor0.col0 + col2 / ( ( col0 ) * + 9 ) FROM tab1 AS cor0
----
5
64
80

query I rowsort
SELECT DISTINCT - ( 75 ) FROM tab2, tab2 cor0, tab0 AS cor1
----
-75

onlyif mysql # use DIV operator for integer division
query I rowsort label-2916
SELECT - 45 + + col2 DIV col1 FROM tab1 AS cor0
----
-38
-40
-43

skipif mysql # not compatible
query I rowsort label-2916
SELECT - 45 + + col2 / col1 FROM tab1 AS cor0
----
-38
-40
-43

query I rowsort
SELECT ALL - - 85 * cor0.col1 FROM tab0 AS cor0
----
7310
7735
8245

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2918
SELECT ALL col1 + - CAST( - 57 AS SIGNED ) FROM tab1 AS cor0
----
67
70
83

skipif mysql # not compatible
query I rowsort label-2918
SELECT ALL col1 + - CAST ( - 57 AS INTEGER ) FROM tab1 AS cor0
----
67
70
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * ( col0 ) + + col1 col2 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT - 39 + + col0 * col2 FROM tab1
----
123
3609
7641

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 69 + col1 col1 FROM tab2
----
100
128
86

query I rowsort
SELECT - tab2.col1 - 54 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 2559a49b2b8c3c5e05149eeeed4f1826

onlyif mysql # use DIV operator for integer division
query I rowsort label-2923
SELECT DISTINCT col0 DIV col0 + - tab0.col2 * 56 * + tab0.col1 col2 FROM tab0
----
-158927
-417871
-5431

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2923
SELECT DISTINCT col0 / col0 + - tab0.col2 * 56 * + tab0.col1 col2 FROM tab0
----
-158927
-417871
-5431

query I rowsort
SELECT ALL + col1 + tab1.col0 * 37 FROM tab1
----
137
2378
2973

query I rowsort
SELECT ALL 18 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 903ac227935c1532300db45a8537c595

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 96 col0 FROM tab0 AS cor0
----
96
96
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2927
SELECT - 57 DIV - col1 FROM tab1 cor0
----
2
4
5

skipif mysql # not compatible
query I rowsort label-2927
SELECT - 57 / - col1 FROM tab1 cor0
----
2
4
5

query I rowsort
SELECT + 46 * col2 * - col2 FROM tab0 AS cor0
----
-309304
-46
-50094

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2929
SELECT DISTINCT tab0.col1 * + CAST( - 1 * col2 AS SIGNED ) FROM tab0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-2929
SELECT DISTINCT tab0.col1 * + CAST ( - 1 * col2 AS INTEGER ) FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT 99 FROM tab0, tab1, tab1 AS cor0, tab0 AS cor1
----
81 values hashing to c841a8d826151b422ecdb71db0250739

query I rowsort
SELECT ALL col0 - 65 FROM tab2 AS cor0
----
-58
13
14

query I rowsort
SELECT DISTINCT + 26 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
26

query I rowsort
SELECT DISTINCT + col1 * 46 * - col0 FROM tab1
----
-29440
-3588
-47840

query I rowsort
SELECT col1 * 78 * - 60 AS col1 FROM tab1
----
-121680
-46800
-60840

query I rowsort
SELECT DISTINCT + cor0.col2 + col1 * col2 AS col1 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2936
SELECT DISTINCT col0 * + CAST( col2 AS SIGNED ) + col0 FROM tab2 AS cor0
----
196
2106
3081

skipif mysql # not compatible
query I rowsort label-2936
SELECT DISTINCT col0 * + CAST ( col2 AS INTEGER ) + col0 FROM tab2 AS cor0
----
196
2106
3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + 29 - col0 col1 FROM tab1 AS cor0
----
226
297
751

query I rowsort
SELECT + col1 * + ( + col2 ) + col1 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col2 + + col1 col1 FROM tab1 cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-2940
SELECT 4 DIV cor0.col1 + cor0.col1 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-2940
SELECT 4 / cor0.col1 + cor0.col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT 71 + col0 AS col0 FROM tab0 AS cor0
----
106
160
95

query I rowsort
SELECT ALL + + ( col1 ) + + col0 AS col1 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2943
SELECT DISTINCT - CAST( col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-2943
SELECT DISTINCT - CAST ( col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + 60 + 76 + col2 * + col1 AS col1 FROM tab0 AS cor0
----
233
2974
7598

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2945
SELECT + + CAST( + col1 AS SIGNED ) + - col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-2945
SELECT + + CAST ( + col1 AS INTEGER ) + - col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + + 60 + cor0.col2 AS col0 FROM tab0 AS cor0
----
142
61
93

query I rowsort
SELECT + col0 - 20 * + col1 * - col1 AS col0 FROM tab2 AS cor0
----
19227
5859
69698

query I rowsort
SELECT + 20 * - col1 - cor0.col2 FROM tab1 cor0
----
-257
-356
-574

query I rowsort
SELECT - ( col2 ) + - col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL col1 * 66 - col2 FROM tab0
----
5643
5924
6401

onlyif mysql # use DIV operator for integer division
query I rowsort label-2951
SELECT col1 + + 70 + + tab1.col1 DIV + col1 AS col1 FROM tab1
----
81
84
97

skipif mysql # not compatible
query I rowsort label-2951
SELECT col1 + + 70 + + tab1.col1 / + col1 AS col1 FROM tab1
----
81
84
97

query I rowsort
SELECT - col2 * cor0.col0 - + col1 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT ALL col2 * - col0 * 32 FROM tab2 AS cor0
----
-6048
-64896
-96064

query I rowsort
SELECT DISTINCT - + col1 * - col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ( - cor0.col2 ) + col0 * + 77 AS col2 FROM tab2 AS cor0
----
512
5980
6045

query I rowsort
SELECT ALL + 83 AS col1 FROM tab2 cor0
----
83
83
83

query I rowsort
SELECT + cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col0 AS REAL ) AS col0 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL - 94 + + col0 FROM tab2 AS cor0
----
-15
-16
-87

query I rowsort
SELECT - ( col0 ) + + 24 AS col0 FROM tab1 AS cor0
----
-40
-56
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-2961
SELECT DISTINCT + 84 * col2 * + col0 + + col2 DIV col0 AS col0 FROM tab2 AS cor0
----
15879
170352
252168

skipif mysql # not compatible
query I rowsort label-2961
SELECT DISTINCT + 84 * col2 * + col0 + + col2 / col0 AS col0 FROM tab2 AS cor0
----
15879
170352
252168

query I rowsort
SELECT col1 * - 63 AS col1 FROM tab0
----
-5418
-5733
-6111

query I rowsort
SELECT cor0.col2 * 12 FROM tab1 AS cor0
----
1152
648
684

query I rowsort
SELECT + col1 * + ( - col2 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + col1 * col0 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT - col2 * 45 FROM tab0 AS cor0
----
-1485
-3690
-45

query I rowsort
SELECT + + col2 * ( + ( col1 ) ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + + col1 + - ( + 46 ) * + col0 FROM tab2 AS cor0
----
-291
-3529
-3617

query I rowsort
SELECT - 82 * col2 AS col0 FROM tab1 cor0
----
-4428
-4674
-7872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 57 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 520dc393896969e02a72ab6c5d92126b

query I rowsort
SELECT 39 * + col2 FROM tab0 AS cor0
----
1287
3198
39

query I rowsort
SELECT 41 FROM tab0, tab0 cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT - col0 * col2 * + col2 AS col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT + col0 AS col2 FROM tab1 AS cor0 WHERE NULL IN ( col0 )
----

query I rowsort
SELECT ALL tab1.col1 * - tab1.col0 + col2 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT ALL col2 AS col1 FROM tab0 cor0 WHERE NULL NOT IN ( col1 )
----

query I rowsort
SELECT + col0 * col1 + + col2 FROM tab2 AS cor0
----
1381
244
4628

query III rowsort
SELECT ALL * FROM tab1 cor0 WHERE NULL NOT BETWEEN ( + cor0.col0 ) AND col1 * col0
----

query I rowsort
SELECT ALL col0 + + col2 * col2 * col2 AS col2 FROM tab2 AS cor0
----
17654
19690
54951

query I rowsort
SELECT DISTINCT col1 * + cor0.col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col2 AS col2 FROM tab2 WHERE NULL <> NULL
----

query I rowsort
SELECT - tab1.col2 + - col2 AS col1 FROM tab1
----
-108
-114
-192

onlyif mysql # use DIV operator for integer division
query I rowsort label-2983
SELECT col2 DIV - tab0.col0 AS col2 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2983
SELECT col2 / - tab0.col0 AS col2 FROM tab0
----
-1
0
0

query I rowsort
SELECT col1 + col1 + col2 AS col2 FROM tab1 WHERE NULL IN ( - col0 )
----

query I rowsort
SELECT - col1 * + tab2.col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - tab2.col0 + col2 * + col0 AS col0 FROM tab2
----
182
1950
2923

query I rowsort
SELECT DISTINCT col0 * - col0 * col2 + + tab0.col2 FROM tab0
----
-1224
-18975
-649440

query I rowsort
SELECT DISTINCT col1 - + col1 AS col0 FROM tab0
----
0

query I rowsort
SELECT DISTINCT col1 + col1 * + col2 AS col0 FROM tab2
----
1593
663
868

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( NULL ) NOT IN ( - col1 )
----

query I rowsort
SELECT DISTINCT + col0 * col2 * - col2 AS col0 FROM tab2 WHERE ( + col0 ) NOT IN ( col2 )
----
-114076
-5103
-52728

query I rowsort
SELECT ALL col0 AS col0 FROM tab1 WHERE NOT col1 NOT IN ( col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2993
SELECT ALL tab0.col2 - + col1 DIV - tab0.col0 AS col0 FROM tab0
----
3
36
83

skipif mysql # not compatible
query I rowsort label-2993
SELECT ALL tab0.col2 - + col1 / - tab0.col0 AS col0 FROM tab0
----
3
36
83

query I rowsort
SELECT ALL - + col1 + + col2 * + cor0.col2 * - col0 FROM tab1 AS cor0
----
-207946
-737293
-8774

query I rowsort
SELECT - - col2 + col1 * col0 AS col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT cor0.col1 * col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2997
SELECT + cor0.col2 DIV + col1 - + col0 DIV + cor0.col1 AS col0 FROM tab1 cor0
----
-1
1
2

skipif mysql # not compatible
query I rowsort label-2997
SELECT + cor0.col2 / + col1 - + col0 / + cor0.col1 AS col0 FROM tab1 cor0
----
-1
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col2 col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL col0 - + col1 AS col0 FROM tab0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3000
SELECT - col2 * + col0 + col1 + + col1 DIV col1 AS col2 FROM tab1
----
-135
-3637
-7666

skipif mysql # not compatible
query I rowsort label-3000
SELECT - col2 * + col0 + col1 + + col1 / col1 AS col2 FROM tab1
----
-135
-3637
-7666

query I rowsort
SELECT DISTINCT col2 - col2 * col0 AS col2 FROM tab2
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-3002
SELECT ALL - col1 * col1 - - col2 DIV col0 FROM tab0
----
-7395
-8281
-9409

skipif mysql # not compatible
query I rowsort label-3002
SELECT ALL - col1 * col1 - - col2 / col0 FROM tab0
----
-7395
-8281
-9409

query I rowsort
SELECT col0 * col2 - cor0.col1 AS col1 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT ALL + col2 + + col0 * col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT col0 * - col2 * - col2 + tab1.col2 FROM tab1
----
207993
737376
8802

query I rowsort
SELECT DISTINCT + col0 + col1 + - col1 * - col1 FROM tab0
----
7506
8461
9541

query I rowsort
SELECT tab1.col1 + col0 + col1 AS col1 FROM tab1
----
106
55
84

query I rowsort
SELECT DISTINCT + tab1.col2 + col0 + col0 FROM tab1
----
185
256
60

query I rowsort
SELECT col1 + col2 * tab0.col2 AS col1 FROM tab0
----
1175
6815
98

query I rowsort
SELECT + col1 + tab0.col0 + col0 * tab0.col0 AS col0 FROM tab0
----
1357
686
8101

query I rowsort
SELECT DISTINCT tab2.col1 AS col1 FROM tab1, tab1 AS cor0 CROSS JOIN tab2 WHERE NOT NULL <= - cor0.col0
----

query I rowsort
SELECT DISTINCT + col2 * col1 + col0 * + col2 FROM tab0
----
132
14760
3630

query I rowsort
SELECT - col2 - + 74 FROM tab1 AS cor0
----
-128
-131
-170

query I rowsort
SELECT col2 * 25 AS col0 FROM tab2 AS cor0
----
650
675
950

query I rowsort
SELECT cor0.col1 * + ( + 16 * - col2 ) + + col0 * + col1 AS col1 FROM tab0 AS cor0
----
-111293
-43344
1843

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3016
SELECT - col2 * + CAST( NULL AS SIGNED ) + + col1 + - col0 / + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3016
SELECT - col2 * + CAST ( NULL AS INTEGER ) + + col1 + - col0 / + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2, tab1, tab1 AS cor0, tab1 cor1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3018
SELECT ALL + tab1.col1 + + col1 * CAST( NULL AS SIGNED ) + col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3018
SELECT ALL + tab1.col1 + + col1 * CAST ( NULL AS INTEGER ) + col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 76 * - col0 * + col0 + + col0 AS col1 FROM tab0
----
-43752
-601907
-93065

query I rowsort
SELECT DISTINCT ( + col2 ) * col2 + + 52 AS col0 FROM tab2
----
1496
728
781

query I rowsort
SELECT DISTINCT - col1 * ( col2 ) AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - cor0.col2 + - 3 * - col0 AS col2 FROM tab2 AS cor0
----
-6
199
208

query I rowsort
SELECT - cor0.col1 * ( + 99 ) + col0 FROM tab0 AS cor0
----
-8490
-8920
-9568

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3024
SELECT ALL - col2 / CAST( NULL AS DECIMAL ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3024
SELECT ALL - col2 / CAST ( NULL AS REAL ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * col2 * 24 AS col1 FROM tab1 AS cor0
----
13680
29952
33696

query I rowsort
SELECT ALL col1 * - ( 38 ) FROM tab2 cor0
----
-1178
-2242
-646

onlyif mysql # use DIV operator for integer division
query I rowsort label-3027
SELECT + + col1 DIV 73 + + 29 + col2 AS col0 FROM tab1 AS cor0
----
125
83
86

skipif mysql # not compatible
query I rowsort label-3027
SELECT + + col1 / 73 + + 29 + col2 AS col0 FROM tab1 AS cor0
----
125
83
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-3028
SELECT + tab1.col0 - + col1 DIV - col0 AS col1 FROM tab1
----
11
64
80

skipif mysql # not compatible
query I rowsort label-3028
SELECT + tab1.col0 - + col1 / - col0 AS col1 FROM tab1
----
11
64
80

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( NULL ) IN ( col0 * tab0.col1 )
----

query I rowsort
SELECT - col1 + + col2 * col1 AS col2 FROM tab1
----
1235
1378
560

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT - col1 IN ( - col2 / + col1 + col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT - col2 * + col2 * - col2 + - col1 AS col2 FROM tab0
----
-96
35851
551277

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT col0 IN ( - col0 * tab0.col2 * - col0 + - col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT tab0.col2 * + tab0.col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT col1 * tab0.col1 + col1 AS col0 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT - tab0.col2 * col0 AS col1 FROM tab0 WHERE NOT NULL < col2 * col1 / col0
----

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) >= NULL
----

query I rowsort
SELECT + tab2.col2 - col1 * col0 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT tab0.col0 + - tab0.col0 FROM tab0
----
0

query I rowsort
SELECT DISTINCT col0 + - col0 * + col1 FROM tab2
----
-1264
-210
-4524

query III rowsort
SELECT * FROM tab0 WHERE col1 NOT IN ( col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query III rowsort
SELECT * FROM tab2 WHERE NOT - col1 IN ( col1 + col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-3043
SELECT + 79 - - col2 * ( + 19 ) DIV cor0.col0 FROM tab0 cor0
----
105
79
96

skipif mysql # not compatible
query I rowsort label-3043
SELECT + 79 - - col2 * ( + 19 ) / cor0.col0 FROM tab0 cor0
----
105
79
96

query I rowsort
SELECT ALL + - col0 * + col1 + col1 AS col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT - - col2 + - col1 * - col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3046
SELECT ALL col2 * - col0 - col1 * col2 DIV - cor0.col2 FROM tab1 AS cor0
----
-136
-3638
-7667

skipif mysql # not compatible
query I rowsort label-3046
SELECT ALL col2 * - col0 - col1 * col2 / - cor0.col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL - col2 * + col0 + col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT - ( col0 ) * + 45 + col1 AS col1 FROM tab1 AS cor0
----
-109
-2870
-3587

query I rowsort
SELECT - + col2 + + 57 - col0 FROM tab2 AS cor0
----
-47
-60
23

query I rowsort
SELECT - col0 + 25 * - col0 - + col0 AS col1 FROM tab1 AS cor0
----
-1728
-2160
-81

query I rowsort
SELECT + col1 + + ( 41 ) * - col0 FROM tab2 AS cor0
----
-256
-3139
-3222

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - 66 col0 FROM tab2 AS cor0
----
-28
-39
-40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3053
SELECT col0 * - CAST( col1 AS SIGNED ) + + col0 + cor0.col1 FROM tab2 AS cor0
----
-1247
-179
-4465

skipif mysql # not compatible
query I rowsort label-3053
SELECT col0 * - CAST ( col1 AS INTEGER ) + + col0 + cor0.col1 FROM tab2 AS cor0
----
-1247
-179
-4465

query I rowsort
SELECT cor0.col2 + col0 * 2 AS col0 FROM tab0 AS cor0
----
260
71
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3055
SELECT + col0 + CAST( NULL AS SIGNED ) / - 64 - - col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3055
SELECT + col0 + CAST ( NULL AS INTEGER ) / - 64 - - col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3056
SELECT col2 - + CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3056
SELECT col2 - + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3057
SELECT ALL + - col1 + col2 DIV + col2 FROM tab1 cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-3057
SELECT ALL + - col1 + col2 / + col2 FROM tab1 cor0
----
-12
-25
-9

query I rowsort
SELECT - - cor0.col0 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + cor0.col2 AS REAL ) + cor0.col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + - 62 + - cor0.col1 * col0 AS col1 FROM tab2 AS cor0
----
-1405
-279
-4664

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3061
SELECT ALL + + CAST( NULL AS SIGNED ) + - col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3061
SELECT ALL + + CAST ( NULL AS INTEGER ) + - col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * 10 AS col0 FROM tab2
----
170
310
590

query I rowsort
SELECT + 85 AS col0 FROM tab2 cor0
----
85
85
85

query I rowsort
SELECT col0 + col1 * - 40 AS col0 FROM tab1 AS cor0
----
-1037
-336
-440

onlyif mysql # use DIV operator for integer division
query I rowsort label-3065
SELECT ( col0 ) DIV - 9 AS col2 FROM tab1 AS cor0
----
-7
-8
0

skipif mysql # not compatible
query I rowsort label-3065
SELECT ( col0 ) / - 9 AS col2 FROM tab1 AS cor0
----
-7
-8
0

query I rowsort
SELECT 37 * col1 FROM tab2 AS cor0
----
1147
2183
629

query I rowsort
SELECT - 61 * + col1 FROM tab2 AS cor0
----
-1037
-1891
-3599

onlyif mysql # use DIV operator for integer division
query I rowsort label-3068
SELECT ALL - - col0 DIV - col1 AS col1 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-3068
SELECT ALL - - col0 / - col1 AS col1 FROM tab2 cor0
----
-1
-4
0

query I rowsort
SELECT cor0.col0 * - 47 FROM tab0, tab1 cor0
----
9 values hashing to c82f431296c5019a6e5e717f7af69f65

query I rowsort
SELECT ALL + - cor0.col0 * + col0 + col2 AS col1 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT ALL + col0 + col2 * - col2 AS col0 FROM tab1
----
-2913
-3185
-9136

query I rowsort
SELECT ALL col0 - + col0 * col0 FROM tab1
----
-4032
-6
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-3073
SELECT - col1 DIV + col0 - col2 AS col0 FROM tab1
----
-57
-62
-96

skipif mysql # not compatible
query I rowsort label-3073
SELECT - col1 / + col0 - col2 AS col0 FROM tab1
----
-57
-62
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3074
SELECT + col1 - - col2 DIV col1 AS col0 FROM tab1
----
15
20
28

skipif mysql # not compatible
query I rowsort label-3074
SELECT + col1 - - col2 / col1 AS col0 FROM tab1
----
15
20
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-3075
SELECT + col2 DIV tab2.col1 + + col0 FROM tab2
----
7
78
81

skipif mysql # not compatible
query I rowsort label-3075
SELECT + col2 / tab2.col1 + + col0 FROM tab2
----
7
78
81

query I rowsort
SELECT ALL + col0 * tab1.col2 + col1 - tab1.col0 AS col0 FROM tab1
----
185
3594
7613

query I rowsort
SELECT ALL + cor0.col0 - + cor0.col2 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 4646ed87e8cc5aacb51f9b4e472c3c4b

onlyif mysql # use DIV operator for integer division
query I rowsort label-3078
SELECT + col2 DIV col1 + col2 * col2 FROM tab0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-3078
SELECT + col2 / col1 + col2 * col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT ALL col0 + 11 * col0 FROM tab0
----
1068
288
420

query I rowsort
SELECT ALL ( - 56 ) + tab1.col0 AS col2 FROM tab1
----
-53
24
8

query I rowsort
SELECT DISTINCT + 30 * cor0.col0 FROM tab2 AS cor0
----
210
2340
2370

query I rowsort
SELECT DISTINCT + 92 AS col2 FROM tab2
----
92

query I rowsort
SELECT ALL + col1 * + cor0.col2 * - col2 AS col2 FROM tab1 AS cor0
----
-119808
-32490
-75816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * - col0 + - col0 col0 FROM tab1 cor0
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-3085
SELECT ALL col1 + col2 DIV - cor0.col2 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-3085
SELECT ALL col1 + col2 / - cor0.col2 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT DISTINCT - + 7 * - cor0.col2 * col1 AS col0 FROM tab1 AS cor0
----
3990
8736
9828

query I rowsort
SELECT ALL - ( col0 ) * + col2 + col1 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - 83 + - col0 * + col1 FROM tab2
----
-1426
-300
-4685

query I rowsort
SELECT 96 * + col0 * col0 + + col0 * col0 + + col2 FROM tab1
----
397369
620896
927

query I rowsort
SELECT ALL - 77 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3091
SELECT DISTINCT CAST( NULL AS DECIMAL ) + col1 AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-3091
SELECT DISTINCT CAST ( NULL AS REAL ) + col1 AS col2 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT - ( - ( - tab1.col1 ) * ( - 19 ) ) + - col1 FROM tab1
----
180
234
468

query I rowsort
SELECT DISTINCT col0 + + tab1.col2 * col2 AS col2 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT ALL + col1 + + 76 * + tab1.col0 AS col2 FROM tab1
----
254
4874
6093

query I rowsort
SELECT ALL + ( col0 ) - cor0.col1 * col2 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0, tab2, tab0 AS cor0
----
86
91
97

query I rowsort
SELECT 82 + - col1 * - col2 + col2 * col0 AS col2 FROM tab1
----
1648
4300
9010

query I rowsort
SELECT 96 + + col2 + col0 AS col0 FROM tab0
----
132
153
267

query I rowsort
SELECT DISTINCT - cor0.col0 + col0 * col2 AS col1 FROM tab2 AS cor0
----
182
1950
2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3100
SELECT - 3 * ( - col2 * - 98 ) - 51 * col1 * CAST( ( col0 ) * - CAST( NULL AS SIGNED ) AS DECIMAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3100
SELECT - 3 * ( - col2 * - 98 ) - 51 * col1 * CAST ( ( col0 ) * - CAST ( NULL AS INTEGER ) AS REAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( cor0.col2 ) + col0 * - col0 AS col0 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT - ( col2 ) * ( + col0 ) + - col1 FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-3103
SELECT ALL + + 12 * - col0 * col2 + + col2 DIV col1 FROM tab0 AS cor0
----
-420
-87576
-9504

skipif mysql # not compatible
query I rowsort label-3103
SELECT ALL + + 12 * - col0 * col2 + + col2 / col1 FROM tab0 AS cor0
----
-420
-87576
-9504

query I rowsort
SELECT DISTINCT col0 - + col0 FROM tab1 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3105
SELECT DISTINCT - col2 - col2 DIV col2 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-3105
SELECT DISTINCT - col2 - col2 / col2 FROM tab0 AS cor0
----
-2
-34
-83

query I rowsort
SELECT - - col1 + col1 * col1 AS col2 FROM tab0 cor0
----
7482
8372
9506

query I rowsort
SELECT ALL + - ( + col2 ) * col2 + col0 FROM tab2 AS cor0
----
-1365
-598
-722

onlyif mysql # use DIV operator for integer division
query I rowsort label-3108
SELECT - + col1 DIV col1 + col1 AS col1 FROM tab2 AS cor0
----
16
30
58

skipif mysql # not compatible
query I rowsort label-3108
SELECT - + col1 / col1 + col1 AS col1 FROM tab2 AS cor0
----
16
30
58

query I rowsort
SELECT ALL - ( - tab2.col2 ) * - col1 + col0 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT ALL - ( col0 ) + + col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL + - col1 + cor0.col2 - col2 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3112
SELECT - col2 + col1 DIV col0 FROM tab2 AS cor0
----
-23
-26
-38

skipif mysql # not compatible
query I rowsort label-3112
SELECT - col2 + col1 / col0 FROM tab2 AS cor0
----
-23
-26
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3113
SELECT DISTINCT + col0 + col2 DIV + 93 AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3113
SELECT DISTINCT + col0 + col2 / + 93 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + 95 + + col1 FROM tab0 AS cor0
----
181
186
192

query I rowsort
SELECT DISTINCT + cor0.col0 * col1 + - ( cor0.col1 + col1 ) FROM tab2 AS cor0
----
1309
155
4484

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3116
SELECT DISTINCT - - cor0.col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3116
SELECT DISTINCT - - cor0.col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + col2 * 18 AS col2 FROM tab0 AS cor0
----
1476
18
594

query I rowsort
SELECT DISTINCT tab0.col0 + col2 + col0 * col2 FROM tab0
----
71
7469
849

query I rowsort
SELECT + col2 * 32 AS col0 FROM tab1 AS cor0
----
1728
1824
3072

query I rowsort
SELECT DISTINCT - + col1 * - ( cor0.col2 ) - col0 FROM tab2 cor0
----
1456
567
830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3121
SELECT - + cor0.col1 + - CAST( NULL AS DECIMAL ) * cor0.col1 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-3121
SELECT - + cor0.col1 + - CAST ( NULL AS REAL ) * cor0.col1 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + + col1 * col0 * col0 AS col2 FROM tab1 AS cor0
----
237
41024
83280

query I rowsort
SELECT - col0 + + 16 * 92 FROM tab1 cor0
----
1392
1408
1469

onlyif mysql # use DIV operator for integer division
query I rowsort label-3124
SELECT ALL - + col2 + ( - 73 + col2 ) DIV - col2 AS col1 FROM tab0 AS cor0
----
-32
-82
71

skipif mysql # not compatible
query I rowsort label-3124
SELECT ALL - + col2 + ( - 73 + col2 ) / - col2 AS col1 FROM tab0 AS cor0
----
-32
-82
71

query I rowsort
SELECT ALL + col0 * ( + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT col0 - 78 FROM tab1 AS cor0
----
-14
-75
2

query I rowsort
SELECT ALL + 8 * cor0.col1 FROM tab0 AS cor0
----
688
728
776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * 83 col2 FROM tab2 cor0
----
2158
2241
3154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + + 86 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to a0080faff0b9518a9e8bbf99d8c96cc1

query I rowsort
SELECT DISTINCT - - ( ( col0 ) ) FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3131
SELECT col1 * + col2 + 80 + - col1 DIV 96 FROM tab1
----
1328
1484
650

skipif mysql # not compatible
query I rowsort label-3131
SELECT col1 * + col2 + 80 + - col1 / 96 FROM tab1
----
1328
1484
650

query I rowsort
SELECT - 2 * col0 AS col0 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-3133
SELECT - - col2 DIV col0 AS col2 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3133
SELECT - - col2 / col0 AS col2 FROM tab1 AS cor0
----
0
1
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-3134
SELECT - + col2 DIV 43 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-3134
SELECT - + col2 / 43 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL 47 * + col1 AS col2 FROM tab2 AS cor0
----
1457
2773
799

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 84 * - col1 + + col2 col1 FROM tab1 AS cor0
----
-2130
-783
-996

query I rowsort
SELECT DISTINCT - cor0.col2 * 90 AS col1 FROM tab0 AS cor0
----
-2970
-7380
-90

query I rowsort
SELECT ALL + col0 * 16 FROM tab1 AS cor0
----
1024
1280
48

query I rowsort
SELECT + + col2 * 54 + - col1 FROM tab2 AS cor0
----
1345
1427
2035

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 57 col2 FROM tab1 AS cor0
----
57

query I rowsort
SELECT DISTINCT + col1 * + col0 * 8 FROM tab0
----
16512
27160
64792

query I rowsort
SELECT + cor0.col2 * 54 AS col0 FROM tab0 AS cor0
----
1782
4428
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 * - col1 col1 FROM tab2
----
-1258
-2294
-4366

onlyif mysql # use DIV operator for integer division
query I rowsort label-3144
SELECT ALL col1 DIV - col0 + - col1 + - tab0.col1 FROM tab0
----
-175
-183
-196

skipif mysql # not compatible
query I rowsort label-3144
SELECT ALL col1 / - col0 + - col1 + - tab0.col1 FROM tab0
----
-175
-183
-196

query I rowsort
SELECT DISTINCT col1 * 48 + - col0 * col0 FROM tab2
----
-3252
-5425
1439

query I rowsort
SELECT DISTINCT ( - col0 ) * + col2 + - 35 AS col2 FROM tab0
----
-70
-7333
-827

onlyif mysql # use DIV operator for integer division
query I rowsort label-3147
SELECT DISTINCT + cor0.col1 DIV cor0.col1 AS col1 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3147
SELECT DISTINCT + cor0.col1 / cor0.col1 AS col1 FROM tab2 AS cor0
----
1

query I rowsort
SELECT + col2 + - col0 - + col0 AS col0 FROM tab1 AS cor0
----
-64
-71
48

query I rowsort
SELECT - col2 + col2 + col0 AS col2 FROM tab2
----
7
78
79

query I rowsort
SELECT col0 * + col2 + + tab0.col2 AS col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2, tab1 cor0
----
10
13
26

query I rowsort
SELECT + col0 + + ( col1 ) AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT cor0.col0 * 44 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 9847f2526dfea8a925da728484e9378b

query I rowsort
SELECT DISTINCT + + col1 * col0 + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT - cor0.col0 + - ( 39 ) FROM tab1 cor0
----
-103
-119
-42

query I rowsort
SELECT ALL + col1 + + 51 AS col2 FROM tab2 cor0
----
110
68
82

query I rowsort
SELECT ALL + - col1 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL + col2 * 87 AS col2 FROM tab1 AS cor0
----
4698
4959
8352

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 + + col2 * ( col2 ) col0 FROM tab2 AS cor0
----
1473
705
758

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col2 ) * col0 col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT 65 FROM tab1 cor0
----
65
65
65

query I rowsort
SELECT + - col2 * + col2 + ( col1 ) AS col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT + - col1 - ( - cor0.col0 ) FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + - col2 * - col2 - - col1 * col1 FROM tab0 AS cor0
----
15005
8485
9410

query I rowsort
SELECT - 15 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 1172c9a62bdad7db0def9205c06ee1f2

query I rowsort
SELECT - 29 * tab2.col1 FROM tab2
----
-1711
-493
-899

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0, tab1 cor1, tab2, tab0 AS cor2
----
3645 values hashing to 5acb69cde71208fe580e10b8b669428e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3168
SELECT + + CAST( NULL AS SIGNED ) * col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3168
SELECT + + CAST ( NULL AS INTEGER ) * col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + + col0 * + cor0.col1 * + col2 FROM tab2 AS cor0
----
119730
51113
5866

query I rowsort
SELECT 28 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT tab2.col0 + + 84 FROM tab2
----
162
163
91

query I rowsort
SELECT - 14 * col2 AS col0 FROM tab0 AS cor0
----
-1148
-14
-462

query I rowsort
SELECT - col0 * col1 * + col2 + tab2.col1 * tab2.col1 FROM tab2
----
-116171
-4898
-50745

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 36 col0 FROM tab2
----
36
36
36

query I rowsort
SELECT 32 FROM tab2, tab1 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 * col1 col0 FROM tab1
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3177
SELECT col2 + col0 + + CAST( NULL AS DECIMAL ) * col2 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3177
SELECT col2 + col0 + + CAST ( NULL AS REAL ) * col2 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col1 * - col2 * col1 + + col1 FROM tab0 AS cor0
----
-243982
-678951
-9312

query I rowsort
SELECT ALL 98 AS col1 FROM tab2 AS cor0
----
98
98
98

query I rowsort
SELECT DISTINCT + - col0 * + cor0.col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT 80 AS col2 FROM tab2, tab0 cor0
----
80

query I rowsort
SELECT + col2 * + 0 * - tab1.col1 FROM tab1
----
0
0
0

query I rowsort
SELECT + tab0.col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT col2 - - col1 AS col0 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 34 col1 FROM tab0
----
-34
-34
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-3186
SELECT ALL + col0 DIV - col0 AS col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3186
SELECT ALL + col0 / - col0 AS col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT - col2 - col1 * - col1 AS col1 FROM tab2
----
251
3455
934

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col2 col0 FROM tab2
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3189
SELECT - CAST( NULL AS SIGNED ) FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3189
SELECT - CAST ( NULL AS INTEGER ) FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + col2 * 40 * col2 AS col2 FROM tab0
----
268960
40
43560

onlyif mysql # use DIV operator for integer division
query I rowsort label-3191
SELECT ALL - 29 + + col2 DIV col0 + - CAST( col1 * col2 + col2 AS SIGNED ) FROM tab0 AS cor0
----
-127
-2899
-7573

skipif mysql # not compatible
query I rowsort label-3191
SELECT ALL - 29 + + col2 / col0 + - CAST ( col1 * col2 + col2 AS INTEGER ) FROM tab0 AS cor0
----
-127
-2899
-7573

onlyif mysql # use DIV operator for integer division
query I rowsort label-3192
SELECT ALL col0 * col0 + + col2 DIV 44 + col1 DIV - col1 FROM tab1 AS cor0
----
4096
6401
9

skipif mysql # not compatible
query I rowsort label-3192
SELECT ALL col0 * col0 + + col2 / 44 + col1 / - col1 FROM tab1 AS cor0
----
4096
6401
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 88 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

onlyif mysql # use DIV operator for integer division
query I rowsort label-3194
SELECT + col0 DIV ( + col0 + col0 ) AS col2 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3194
SELECT + col0 / ( + col0 + col0 ) AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT ( - 26 ) FROM tab0, tab1 AS cor0
----
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + 16 col2 FROM tab2 AS cor0
----
33
47
75

query I rowsort
SELECT col2 * col2 * + col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT ALL + col2 - ( + 73 ) * col2 * - 67 AS col0 FROM tab0
----
161436
401144
4892

query I rowsort
SELECT - col1 + 62 AS col0 FROM tab1 AS cor0
----
36
49
52

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 CROSS JOIN tab0 WHERE ( NULL ) NOT IN ( + cor0.col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3201
SELECT - ( col1 ) + col0 * col0 + + 72 DIV col0 FROM tab1 AS cor0
----
4087
6387
7

skipif mysql # not compatible
query I rowsort label-3201
SELECT - ( col1 ) + col0 * col0 + + 72 / col0 FROM tab1 AS cor0
----
4087
6387
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col1 * - col0 col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + - col0 * col2 + col1 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-3548
-7511
514

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) * col0 + col2 * col2 + + col0 col1 FROM tab1 AS cor0
----
16976
3081
6961

query I rowsort
SELECT + - 27 + - 15 * col0 + 96 AS col1 FROM tab0 AS cor0
----
-1266
-291
-456

query I rowsort
SELECT + - cor0.col0 + - col2 - 81 FROM tab1 AS cor0
----
-138
-202
-257

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + cor0.col2 ) col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT ALL 78 + col2 - 91 FROM tab1
----
41
44
83

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3210
SELECT col0 + + ( + 59 ) * + col1 + CAST( - col2 AS SIGNED ) FROM tab1
----
1483
597
751

skipif mysql # not compatible
query I rowsort label-3210
SELECT col0 + + ( + 59 ) * + col1 + CAST ( - col2 AS INTEGER ) FROM tab1
----
1483
597
751

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + col2 + + col0 col0 FROM tab2
----
130
155
61

query I rowsort
SELECT DISTINCT - - col2 * ( + 94 ) AS col1 FROM tab2 AS cor0
----
2444
2538
3572

query I rowsort
SELECT ALL - col2 * - 9 FROM tab1 AS cor0
----
486
513
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-3214
SELECT DISTINCT - cor0.col2 * 2 DIV 94 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3214
SELECT DISTINCT - cor0.col2 * 2 / 94 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT 49 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-3216
SELECT DISTINCT + col0 + col2 DIV ( col1 ) FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-3216
SELECT DISTINCT + col0 + col2 / ( col1 ) FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT - col0 - + col0 * - 72 FROM tab2 AS cor0
----
497
5538
5609

query I rowsort
SELECT + col1 + - cor0.col2 - - col0 * cor0.col0 FROM tab0 AS cor0
----
1321
629
7930

skipif mysql # not compatible
query I rowsort
SELECT CAST ( 63 * col1 AS REAL ) FROM tab1
----
1638
630
819

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3220
SELECT CAST( - col1 AS SIGNED ) - - col0 FROM tab0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-3220
SELECT CAST ( - col1 AS INTEGER ) - - col0 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT ALL tab0.col2 * + 33 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 3edd0924fd9381055d05c5a8fc081e0d

query I rowsort
SELECT + col1 * col2 - col1 FROM tab1
----
1235
1378
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3224
SELECT ALL CAST( - col1 AS SIGNED ) * + col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-3224
SELECT ALL CAST ( - col1 AS INTEGER ) * + col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - 88 + + 73 FROM tab1 AS cor0
----
-15

query I rowsort
SELECT - ( ( tab2.col2 ) ) + tab2.col1 FROM tab2
----
-21
33
4

query I rowsort
SELECT DISTINCT + + col0 + + col0 AS col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL + - col2 + cor0.col2 + col2 AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + 35 + - col1 * cor0.col1 FROM tab2 AS cor0
----
-254
-3446
-926

query I rowsort
SELECT ALL col0 + + col2 + - col2 AS col2 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + col1 col0 FROM tab1 AS cor0
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 49 col1 FROM tab1 cor0
----
-49

query I rowsort
SELECT ALL + + 31 + cor0.col1 * - col1 FROM tab1 AS cor0
----
-138
-645
-69

query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col2 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT ALL + 40 * - col2 FROM tab2 AS cor0
----
-1040
-1080
-1520

query I rowsort
SELECT DISTINCT + - col1 + col1 + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT 12 * col0 + col2 + - col2 AS col2 FROM tab1 AS cor0
----
36
768
960

query I rowsort
SELECT ALL - col1 + col2 * col1 * col1 FROM tab0 AS cor0
----
243982
678951
9312

query I rowsort
SELECT ALL 20 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT 33 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

query I rowsort
SELECT 78 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

query I rowsort
SELECT ALL col2 * - col2 - + 97 FROM tab0 AS cor0
----
-1186
-6821
-98

query I rowsort
SELECT ALL - - col1 + - cor0.col2 * 34 AS col2 FROM tab2 AS cor0
----
-1275
-825
-887

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col1 col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0, tab1, tab0 cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT col0 + col2 * - col1 FROM tab0 cor0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-3247
SELECT - + col0 * + 16 + + col2 DIV - col2 AS col0 FROM tab1 AS cor0
----
-1025
-1281
-49

skipif mysql # not compatible
query I rowsort label-3247
SELECT - + col0 * + 16 + + col2 / - col2 AS col0 FROM tab1 AS cor0
----
-1025
-1281
-49

query I rowsort
SELECT col2 + col0 * col0 FROM tab2 cor0
----
6110
6279
76

query I rowsort
SELECT ALL - col1 + - col2 * + cor0.col2 * + col0 AS col0 FROM tab1 AS cor0
----
-207946
-737293
-8774

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( 82 ) * col0 col0 FROM tab0 AS cor0
----
-1968
-2870
-7298

query I rowsort
SELECT ALL - col1 * 26 FROM tab2 AS cor0
----
-1534
-442
-806

query I rowsort
SELECT ALL 81 FROM tab2, tab1 AS cor0
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

query I rowsort
SELECT ALL + + col0 * - 22 * - col0 AS col1 FROM tab2 AS cor0
----
1078
133848
137302

query I rowsort
SELECT + col1 * col1 * - cor0.col1 AS col1 FROM tab2 cor0
----
-205379
-29791
-4913

query I rowsort
SELECT DISTINCT - col2 * 15 - col1 AS col0 FROM tab0 AS cor0
----
-112
-1321
-581

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3256
SELECT DISTINCT + CAST( cor0.col1 AS SIGNED ) + col0 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-3256
SELECT DISTINCT + CAST ( cor0.col1 AS INTEGER ) + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT col0 * col1 + 43 FROM tab1
----
1083
121
683

query I rowsort
SELECT ALL - tab2.col0 + ( - col1 ) AS col1 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT + - 41 * col1 * col1 AS col0 FROM tab2 cor0
----
-11849
-142721
-39401

query I rowsort
SELECT 11 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
12
44
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3261
SELECT + - 34 + + col0 DIV col1 AS col2 FROM tab2 cor0
----
-30
-33
-34

skipif mysql # not compatible
query I rowsort label-3261
SELECT + - 34 + + col0 / col1 AS col2 FROM tab2 cor0
----
-30
-33
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3262
SELECT + + 28 + col2 * CAST( - col1 AS SIGNED ) * + col2 AS col2 FROM tab0 AS cor0
----
-611856
-69
-93626

skipif mysql # not compatible
query I rowsort label-3262
SELECT + + 28 + col2 * CAST ( - col1 AS INTEGER ) * + col2 AS col2 FROM tab0 AS cor0
----
-611856
-69
-93626

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) + col0 col2 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3264
SELECT DISTINCT + col2 DIV col2 AS col1 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-3264
SELECT DISTINCT + col2 / col2 AS col1 FROM tab1
----
1

query I rowsort
SELECT - 63 FROM tab0, tab2 cor0
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

query I rowsort
SELECT ALL col0 * - ( - col1 + - col2 ) FROM tab2
----
406
4345
6630

onlyif mysql # use DIV operator for integer division
query I rowsort label-3267
SELECT + ( - col1 ) DIV + col1 AS col2 FROM tab2 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3267
SELECT + ( - col1 ) / + col1 AS col2 FROM tab2 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + - col0 + + col1 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL + - ( 22 ) AS col0 FROM tab2 AS cor0
----
-22
-22
-22

query I rowsort
SELECT 84 * ( + col1 ) FROM tab1 AS cor0
----
1092
2184
840

query I rowsort
SELECT DISTINCT 16 * cor0.col1 AS col1 FROM tab0 cor0
----
1376
1456
1552

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3272
SELECT DISTINCT CAST( NULL AS SIGNED ) + 38 col1 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3272
SELECT DISTINCT CAST ( NULL AS INTEGER ) + 38 col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3273
SELECT - CAST( NULL AS DECIMAL ) + cor0.col0 * cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3273
SELECT - CAST ( NULL AS REAL ) + cor0.col0 * cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * - 50 AS col0 FROM tab1 cor0
----
-2700
-2850
-4800

query I rowsort
SELECT DISTINCT tab2.col0 AS col1 FROM tab2, tab1, tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 - col2 col1 FROM tab1
----
-216
-3705
-7776

query I rowsort
SELECT ALL - col2 * 80 + + 13 FROM tab2
----
-2067
-2147
-3027

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 12 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT - col0 + 95 * - col1 AS col0 FROM tab1 AS cor0
----
-1014
-1315
-2473

query I rowsort
SELECT - ( - col0 ) + + col0 FROM tab2 AS cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + col2 AS REAL ) * - col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT cor0.col2 + - col1 * ( + col1 ) * cor0.col2 AS col1 FROM tab1 AS cor0
----
-16128
-36450
-5643

query I rowsort
SELECT + col2 * col0 + - col1 AS col0 FROM tab1 cor0
----
136
3638
7667

query I rowsort
SELECT - col1 + ( + col2 ) + + col0 AS col1 FROM tab0 AS cor0
----
-29
-61
80

query I rowsort
SELECT + - col2 * 30 + col1 FROM tab0 AS cor0
----
-2369
-904
67

query I rowsort
SELECT cor0.col2 * - col0 + + col1 AS col1 FROM tab1 cor0
----
-136
-3638
-7667

query I rowsort
SELECT + cor0.col1 * col0 + - 17 AS col1 FROM tab2 cor0
----
1326
200
4585

query I rowsort
SELECT - col2 * + cor0.col1 + col2 * + col0 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT DISTINCT + col1 * cor0.col2 + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT - - col1 * + col0 + - col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT + col0 + 35 FROM tab1 AS cor0
----
115
38
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - 62 + col1 + + col0 col0 FROM tab2 AS cor0
----
1712
1749
2452

query I rowsort
SELECT ALL - cor0.col1 - 24 AS col2 FROM tab0 AS cor0
----
-110
-115
-121

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + cor0.col1 col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - col1 * + col0 * 75 + col2 AS col1 FROM tab1 cor0
----
-47943
-5796
-77904

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3296
SELECT + col0 / CAST( NULL AS SIGNED ) + + col1 * + col2 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3296
SELECT + col0 / CAST ( NULL AS INTEGER ) + + col1 * + col2 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 * - col2 + + col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL cor0.col2 * 39 * col0 + cor0.col1 AS col2 FROM tab0 AS cor0
----
1462
284713
30974

onlyif mysql # use DIV operator for integer division
query I rowsort label-3299
SELECT DISTINCT + col1 DIV - 14 AS col1 FROM tab0 AS cor0
----
-6

skipif mysql # not compatible
query I rowsort label-3299
SELECT DISTINCT + col1 / - 14 AS col1 FROM tab0 AS cor0
----
-6

query I rowsort
SELECT + + col0 + + col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT ( 47 ) FROM tab0, tab1 AS cor0
----
47

query I rowsort
SELECT col0 * 80 + col1 * + col2 FROM tab1
----
1644
5690
7648

query I rowsort
SELECT 24 - - col1 AS col2 FROM tab0 AS cor0
----
110
115
121

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - cor0.col2 ) * - col0 col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT - col1 * col0 + ( - 76 ) FROM tab2 AS cor0
----
-1419
-293
-4678

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + - col2 col2 FROM tab0 AS cor0
----
-119
-173
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + cor0.col1 * col0 col1 FROM tab0 cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT col2 * - col2 * - col0 FROM tab1
----
207936
737280
8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-3309
SELECT col0 + + col0 + + ( col0 ) DIV col2 col1 FROM tab0
----
105
179
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3309
SELECT col0 + + col0 + + ( col0 ) / col2 col1 FROM tab0
----
105
179
48

query I rowsort
SELECT col0 + + col0 - - col0 FROM tab0
----
105
267
72

query I rowsort
SELECT DISTINCT + + col0 * ( col2 ) FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3312
SELECT ALL - col0 * - CAST( - col1 AS SIGNED ) * col2 + col1 AS col2 FROM tab2 AS cor0
----
-119593
-51017
-5828

skipif mysql # not compatible
query I rowsort label-3312
SELECT ALL - col0 * - CAST ( - col1 AS INTEGER ) * col2 + col1 AS col2 FROM tab2 AS cor0
----
-119593
-51017
-5828

query I rowsort
SELECT + ( - cor0.col2 ) * 4 + - col2 AS col2 FROM tab1 AS cor0
----
-270
-285
-480

query I rowsort
SELECT ALL 39 + col1 - + col2 * col1 FROM tab0
----
-2713
-7332
39

query I rowsort
SELECT + col0 * 7 AS col1 FROM tab2 AS cor0
----
49
546
553

query I rowsort
SELECT + 89 AS col1 FROM tab2 cor0
----
89
89
89

query I rowsort
SELECT ALL cor0.col2 * 74 AS col1 FROM tab2 AS cor0
----
1924
1998
2812

query I rowsort
SELECT DISTINCT + + ( cor0.col0 ) + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - 77 * - col0 AS col0 FROM tab1 cor0
----
231
4928
6160

query I rowsort
SELECT ALL + 80 + col0 FROM tab2 AS cor0
----
158
159
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-3321
SELECT col0 + col2 DIV - col1 FROM tab2
----
7
77
78

skipif mysql # not compatible
query I rowsort label-3321
SELECT col0 + col2 / - col1 FROM tab2
----
7
77
78

query I rowsort
SELECT + ( + tab0.col1 ) + - col1 * 9 AS col1 FROM tab0
----
-688
-728
-776

query I rowsort
SELECT tab2.col1 * col1 + + col1 AS col2 FROM tab2
----
306
3540
992

query I rowsort
SELECT DISTINCT + 99 * + 4 AS col0 FROM tab0
----
396

query I rowsort
SELECT DISTINCT + 47 AS col0 FROM tab1
----
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3326
SELECT + col0 + col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3326
SELECT + col0 + col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 - col0 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT col1 * 60 * + col2 AS col0 FROM tab0
----
170280
447720
5820

query I rowsort
SELECT DISTINCT + ( ( - col2 ) ) FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3330
SELECT ALL + cor0.col0 * col0 - col1 * col2 DIV + 54 AS col0 FROM tab0 AS cor0
----
1224
524
7783

skipif mysql # not compatible
query I rowsort label-3330
SELECT ALL + cor0.col0 * col0 - col1 * col2 / + 54 AS col0 FROM tab0 AS cor0
----
1224
524
7783

query I rowsort
SELECT ALL - 74 * - col1 AS col0 FROM tab0
----
6364
6734
7178

query I rowsort
SELECT + col2 * ( 13 ) + + col1 + col0 AS col0 FROM tab2 AS cor0
----
389
475
590

query I rowsort
SELECT ALL - cor0.col0 + + 89 * 28 AS col2 FROM tab1 AS cor0
----
2412
2428
2489

query I rowsort
SELECT DISTINCT ( - tab1.col1 ) + col1 FROM tab1
----
0

query I rowsort
SELECT DISTINCT tab0.col2 AS col0 FROM tab0, tab2 cor0, tab2 AS cor1
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3336
SELECT ALL col0 DIV col1 + + col2 * + col2 AS col1 FROM tab2
----
1448
677
729

skipif mysql # not compatible
query I rowsort label-3336
SELECT ALL col0 / col1 + + col2 * + col2 AS col1 FROM tab2
----
1448
677
729

query I rowsort
SELECT - + cor0.col1 AS col0 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT + + col2 * + col2 + - 14 * + col2 + + ( 22 ) AS col2 FROM tab2 AS cor0
----
334
373
934

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3339
SELECT col2 * + CAST( + col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-3339
SELECT col2 * + CAST ( + col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + col2 * + 79 FROM tab2 AS cor0
----
2054
2133
3002

query I rowsort
SELECT ALL + col1 * col2 * ( col1 * col0 ) + + col0 + + col1 FROM tab1
----
109541
1298013
364874

query I rowsort
SELECT ALL - 4 * col2 + - 85 AS col0 FROM tab0
----
-217
-413
-89

query I rowsort
SELECT ALL col0 * + col2 + - col1 FROM tab1
----
136
3638
7667

query I rowsort
SELECT ALL 94 + tab0.col0 FROM tab0
----
118
129
183

query I rowsort
SELECT 94 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT + col1 - 1 AS col2 FROM tab0
----
85
90
96

query I rowsort
SELECT ALL - col0 * + 56 FROM tab1 cor0
----
-168
-3584
-4480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * + cor0.col1 col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + col2 * - ( col0 ) AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + col1 * - 97 FROM tab2 AS cor0
----
-1649
-3007
-5723

query I rowsort
SELECT ALL - cor0.col1 * + col2 + col0 + + col1 FROM tab1 cor0
----
-1155
-1375
-496

query I rowsort
SELECT - + col1 * + col2 + col0 FROM tab2 AS cor0
----
-1456
-567
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-3353
SELECT ALL - + col2 DIV col2 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3353
SELECT ALL - + col2 / col2 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT tab1.col0 * - 29 AS col0 FROM tab1
----
-1856
-2320
-87

query I rowsort
SELECT col0 + col0 * + col2 AS col1 FROM tab0
----
70
7387
816

query I rowsort
SELECT tab0.col2 * ( col2 ) * col2 FROM tab0
----
1
35937
551368

onlyif mysql # use DIV operator for integer division
query I rowsort label-3357
SELECT ALL col2 DIV - col0 AS col2 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-3357
SELECT ALL col2 / - col0 AS col2 FROM tab2
----
-3
0
0

query I rowsort
SELECT - 96 FROM tab0, tab2 AS cor0
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT col2 * 8 AS col1 FROM tab0
----
264
656
8

query I rowsort
SELECT + col1 * ( - col1 + col0 ) AS col2 FROM tab0
----
-182
-5332
-6014

query I rowsort
SELECT + 7 * + cor1.col0 AS col0 FROM tab2, tab0, tab2 AS cor0, tab2 AS cor1
----
81 values hashing to 6abf63445915edeb7a2c0b2cd275f4bc

onlyif mysql # use DIV operator for integer division
query I rowsort label-3362
SELECT ALL col0 + - 26 DIV col0 FROM tab1 cor0
----
-5
64
80

skipif mysql # not compatible
query I rowsort label-3362
SELECT ALL col0 + - 26 / col0 FROM tab1 cor0
----
-5
64
80

query I rowsort
SELECT ALL col0 + 51 FROM tab0 AS cor0
----
140
75
86

query I rowsort
SELECT DISTINCT + + 47 * + col1 FROM tab2 AS cor0
----
1457
2773
799

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + cor0.col1 * + cor0.col0 col1 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-3366
SELECT ALL - col1 + - 7 DIV + col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-3366
SELECT ALL - col1 + - 7 / + col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT 79 * + col1 AS col2 FROM tab1 AS cor0
----
1027
2054
790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 7 * + 92 col0 FROM tab1 cor0
----
644
644
644

query I rowsort
SELECT - col1 + - col2 * col1 AS col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT - + col0 + + 65 FROM tab1 AS cor0
----
-15
1
62

query I rowsort
SELECT - col2 * col2 + col2 * + cor0.col1 FROM tab2 AS cor0
----
-798
108
858

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-3373
SELECT col2 DIV + cor0.col2 - col2 * - col0 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-3373
SELECT col2 / + cor0.col2 - col2 * - col0 col1 FROM tab0 AS cor0
----
36
7299
793

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col2 * 74 FROM tab2 cor0
----
1983
2029
2829

query I rowsort
SELECT DISTINCT - col1 * - col1 + - col2 * col2 + col2 FROM tab1 AS cor0
----
-2186
-3092
-8951

query I rowsort
SELECT ALL + ( - col0 ) - - col1 * col0 AS col1 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT - col2 * cor0.col0 + 53 * col1 FROM tab0 AS cor0
----
-2475
3766
5106

query I rowsort
SELECT - + 55 + + col2 FROM tab0 AS cor0
----
-22
-54
27

query I rowsort
SELECT + col0 + + col2 * - col0 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT col2 + col2 * - cor0.col1 * col1 FROM tab2 AS cor0
----
-10944
-25920
-90480

query I rowsort
SELECT + 49 FROM tab0, tab2 cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT ALL - col0 * 46 + - col1 AS col0 FROM tab0 AS cor0
----
-1190
-1707
-4185

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 59 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

onlyif mysql # use DIV operator for integer division
query I rowsort label-3384
SELECT DISTINCT - 53 DIV - col0 + 50 FROM tab1
----
50
67

skipif mysql # not compatible
query I rowsort label-3384
SELECT DISTINCT - 53 / - col0 + 50 FROM tab1
----
50
67

query I rowsort
SELECT - col1 * - col1 + - 52 FROM tab0
----
7344
8229
9357

query I rowsort
SELECT - 13 + cor0.col1 FROM tab2 cor0
----
18
4
46

query I rowsort
SELECT - - col0 * col1 + col2 * - col0 * - col0 + col1 FROM tab1 AS cor0
----
234122
590
615453

query I rowsort
SELECT + col0 * + 75 FROM tab2
----
525
5850
5925

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col2 + - col1 ) * col1 col2 FROM tab1
----
1079
470
728

query I rowsort
SELECT DISTINCT 82 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
82

query I rowsort
SELECT DISTINCT + col1 * col2 + 97 * 36 * tab1.col1 AS col1 FROM tab1
----
35490
46644
92196

query I rowsort
SELECT ALL - - 54 AS col1 FROM tab0 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3393
SELECT - CAST( NULL AS DECIMAL ) col2 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3393
SELECT - CAST ( NULL AS REAL ) col2 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + tab2.col1 * ( 4 + tab2.col2 ) FROM tab2
----
1770
714
961

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab0 cor1, tab2 AS cor2, tab1 AS cor3
----
3645 values hashing to 4c5172baaab682f997bd09d2b5cf0d22

query I rowsort
SELECT DISTINCT + 63 + 27 AS col1 FROM tab2, tab0 AS cor0
----
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3397
SELECT - - CAST( - col0 AS SIGNED ) * - col0 FROM tab1 AS cor0
----
4096
6400
9

skipif mysql # not compatible
query I rowsort label-3397
SELECT - - CAST ( - col0 AS INTEGER ) * - col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + - cor0.col0 * - col0 + col1 + + 81 FROM tab0 AS cor0
----
1403
743
8093

query I rowsort
SELECT + - ( - col1 ) * cor0.col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + col0 * + cor0.col2 - + col0 AS col0 FROM tab0 cor0
----
0
7209
768

query I rowsort
SELECT + 93 - col0 FROM tab0 AS cor0
----
4
58
69

query I rowsort
SELECT DISTINCT + 90 - tab1.col1 AS col0 FROM tab1
----
64
77
80

query I rowsort
SELECT + ( + col1 ) * - col1 * + 16 + - col2 * col0 + + col1 FROM tab0
----
-119042
-139703
-150482

query I rowsort
SELECT + - 37 + - col1 FROM tab0 AS cor0
----
-123
-128
-134

query I rowsort
SELECT DISTINCT - 56 - col2 * tab1.col0 AS col0 FROM tab1
----
-218
-3704
-7736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 30 * col2 col1 FROM tab1 AS cor0
----
1620
1710
2880

query I rowsort
SELECT ALL - col2 + col1 * 16 AS col0 FROM tab0 AS cor0
----
1343
1374
1551

query I rowsort
SELECT ALL - 10 AS col0 FROM tab0, tab0 cor0, tab1 cor1
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT col2 + col2 AS col1 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT DISTINCT - 75 + col1 * col1 AS col1 FROM tab1 AS cor0
----
25
601
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-3411
SELECT + col1 DIV + col1 + + ( col0 ) + col0 DIV + col1 AS col2 FROM tab1 AS cor0
----
4
71
87

skipif mysql # not compatible
query I rowsort label-3411
SELECT + col1 / + col1 + + ( col0 ) + col0 / + col1 AS col2 FROM tab1 AS cor0
----
4
71
87

query I rowsort
SELECT col2 + cor0.col0 * + col2 + cor0.col0 * col0 FROM tab0 AS cor0
----
1261
1401
15301

query I rowsort
SELECT - col0 + - col0 * + tab2.col1 AS col2 FROM tab2
----
-1422
-224
-4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3414
SELECT - col2 * ( col2 ) DIV - col0 + col2 AS col1 FROM tab0
----
1
157
78

skipif mysql # not compatible
query I rowsort label-3414
SELECT - col2 * ( col2 ) / - col0 + col2 AS col1 FROM tab0
----
1
157
78

query I rowsort
SELECT ALL - + col1 * col0 + - col1 AS col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL + 25 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2c77240b60ac01c717a5ed5d0165f450

query I rowsort
SELECT ALL col0 - ( 58 + - cor0.col0 ) FROM tab2 AS cor0
----
-44
100
98

query I rowsort
SELECT col0 * + 87 AS col2 FROM tab2 AS cor0
----
609
6786
6873

query I rowsort
SELECT ALL cor0.col0 * + cor0.col1 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to 815fccd4c3d372b28d3f3fb103025775

query I rowsort
SELECT ALL - cor0.col1 * + col1 AS col2 FROM tab1 cor0
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( + 19 AS REAL ) + col1 * CAST ( ( + col0 ) AS INTEGER ) * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-119671
-51053
-5878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 - cor0.col0 * - col2 col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT - col2 * 29 AS col2 FROM tab1 AS cor0
----
-1566
-1653
-2784

query I rowsort
SELECT ALL - 89 * col1 FROM tab0 AS cor0
----
-7654
-8099
-8633

query I rowsort
SELECT - 54 * col2 + - col1 FROM tab1 AS cor0
----
-2942
-3088
-5197

query I rowsort
SELECT DISTINCT + + col1 * col0 + + col0 AS col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT - - 16 - col1 * + col1 FROM tab0 AS cor0
----
-7380
-8265
-9393

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3428
SELECT - - CAST( NULL AS SIGNED ) * - 5 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3428
SELECT - - CAST ( NULL AS INTEGER ) * - 5 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( + ( col2 ) ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + col1 * col2 - 67 FROM tab2
----
1467
579
770

onlyif mysql # use DIV operator for integer division
query I rowsort label-3431
SELECT ALL col1 DIV 35 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3431
SELECT ALL col1 / 35 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * 2 + - 70 + col0 * - col1 FROM tab2 cor0
----
-1489
-341
-4724

query I rowsort
SELECT + col2 * col1 + - 50 FROM tab1 AS cor0
----
1198
1354
520

query I rowsort
SELECT DISTINCT + col1 + 49 FROM tab1 AS cor0
----
59
62
75

query I rowsort
SELECT - col1 * - col2 + col0 AS col1 FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3436
SELECT ALL - col1 * + CAST( NULL AS SIGNED ) * 95 - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3436
SELECT ALL - col1 * + CAST ( NULL AS INTEGER ) * 95 - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + ( ( - col2 ) ) AS col0 FROM tab1 AS cor0
----
-109
-67
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 + col0 col2 FROM tab2 AS cor0
----
6
77
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3439
SELECT CAST( NULL AS SIGNED ) * + 44 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3439
SELECT CAST ( NULL AS INTEGER ) * + 44 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 69 AS col0 FROM tab1 AS cor0
----
69
69
69

query I rowsort
SELECT DISTINCT col1 * 82 AS col0 FROM tab1 AS cor0
----
1066
2132
820

query I rowsort
SELECT ALL - ( - ( col0 ) ) AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - 84 AS col1 FROM tab1, tab2 cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to aaabc1266a1bb4f477091ffbc243c849

query I rowsort
SELECT DISTINCT cor1.col0 + cor1.col1 AS col1 FROM tab0, tab0 AS cor0, tab0 cor1
----
110
132
180

query I rowsort
SELECT DISTINCT - col1 + - col2 - - ( col0 ) FROM tab0 AS cor0
----
-63
-84
-95

query I rowsort
SELECT - col1 * cor0.col2 - - 35 FROM tab0 AS cor0
----
-2803
-62
-7427

query I rowsort
SELECT DISTINCT cor0.col1 - col0 AS col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL 32 * + col0 FROM tab1 AS cor0
----
2048
2560
96

query I rowsort
SELECT ALL + col0 * + col2 + ( 93 * + col2 ) AS col1 FROM tab0 AS cor0
----
128
14924
3861

query I rowsort
SELECT 78 * col0 AS col0 FROM tab0
----
1872
2730
6942

query I rowsort
SELECT ( col2 ) * ( + col2 ) FROM tab0
----
1
1089
6724

query I rowsort
SELECT + - 6 + + cor0.col1 FROM tab0 AS cor0
----
80
85
91

query I rowsort
SELECT + col1 + + col2 * col2 AS col1 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT ALL - col0 * ( + cor0.col0 ) + col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT ALL - col1 * + ( + cor0.col0 + col0 ) * col1 AS col2 FROM tab1 AS cor0
----
-12800
-27040
-4056

query I rowsort
SELECT ALL col2 + col0 * tab2.col1 AS col1 FROM tab2
----
1381
244
4628

query I rowsort
SELECT - + cor0.col2 * 50 AS col2 FROM tab1 AS cor0
----
-2700
-2850
-4800

query I rowsort
SELECT DISTINCT - 32 + col2 * 58 + col0 FROM tab0
----
1906
4813
61

query I rowsort
SELECT col2 * + 75 FROM tab0
----
2475
6150
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3460
SELECT - col2 * - CAST( NULL AS SIGNED ) col0 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3460
SELECT - col2 * - CAST ( NULL AS INTEGER ) col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 90 + 78 AS col2 FROM tab0 AS cor0
----
168
168
168

query I rowsort
SELECT ALL + 36 * - 98 AS col0 FROM tab0, tab2, tab1 AS cor0, tab1
----
81 values hashing to 68bbed387712bd41f67497e32616316a

query I rowsort
SELECT DISTINCT - - col1 * cor0.col0 - + col2 * - col2 FROM tab0 AS cor0
----
14823
3153
3396

onlyif mysql # use DIV operator for integer division
query I rowsort label-3464
SELECT ALL + col2 + col1 DIV + cor0.col0 FROM tab0 AS cor0
----
3
36
83

skipif mysql # not compatible
query I rowsort label-3464
SELECT ALL + col2 + col1 / + cor0.col0 FROM tab0 AS cor0
----
3
36
83

query I rowsort
SELECT + col2 * + col2 * + 33 + - col2 * col1 AS col0 FROM tab2 cor0
----
20774
23220
47006

query I rowsort
SELECT DISTINCT + col1 * ( + 2 ) FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT 38 * col0 FROM tab0
----
1330
3382
912

query I rowsort
SELECT - 37 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to ed4644af7729c2425ea6cc3d84c6504f

onlyif mysql # use DIV operator for integer division
query I rowsort label-3469
SELECT ALL col2 * 72 DIV - tab1.col0 AS col0 FROM tab1
----
-1296
-64
-86

skipif mysql # not compatible
query I rowsort label-3469
SELECT ALL col2 * 72 / - tab1.col0 AS col0 FROM tab1
----
-1296
-64
-86

query I rowsort
SELECT + 31 * - col0 FROM tab0 AS cor0
----
-1085
-2759
-744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * col0 * col0 col1 FROM tab2 AS cor0
----
343
474552
493039

query I rowsort
SELECT ( cor0.col0 ) + cor1.col1 * + 13 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to d4f2c2fcd054d6f9fd86c589af2c7475

onlyif mysql # use DIV operator for integer division
query I rowsort label-3473
SELECT + ( col0 ) DIV ( - col1 ) AS col2 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-3473
SELECT + ( col0 ) / ( - col1 ) AS col2 FROM tab2
----
-1
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3474
SELECT + + col1 + col0 DIV - col0 AS col0 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-3474
SELECT + + col1 + col0 / - col0 AS col0 FROM tab0 AS cor0
----
85
90
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3475
SELECT ALL + 77 * col1 DIV - col1 FROM tab2
----
-77
-77
-77

skipif mysql # not compatible
query I rowsort label-3475
SELECT ALL + 77 * col1 / - col1 FROM tab2
----
-77
-77
-77

query I rowsort
SELECT DISTINCT - + 10 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-70
-780
-790

query I rowsort
SELECT - ( + col2 ) * - col1 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * cor0.col2 col0 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT col0 * - col1 * col0 FROM tab0 cor0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT - - col1 * cor0.col1 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT + + col0 + col2 * - col1 + col1 AS col2 FROM tab0 AS cor0
----
-2728
-7282
35

query I rowsort
SELECT + 13 + + col0 * col2 FROM tab1
----
175
3661
7693

query I rowsort
SELECT DISTINCT - 73 * col1 - col0 AS col0 FROM tab1
----
-1029
-1901
-794

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 29 - col1 col1 FROM tab0 AS cor0
----
-115
-120
-126

query I rowsort
SELECT - 72 * - col0 FROM tab2
----
504
5616
5688

onlyif mysql # use DIV operator for integer division
query I rowsort label-3486
SELECT col0 - 71 DIV - col1 AS col2 FROM tab1
----
5
71
85

skipif mysql # not compatible
query I rowsort label-3486
SELECT col0 - 71 / - col1 AS col2 FROM tab1
----
5
71
85

query I rowsort
SELECT DISTINCT + ( col2 ) - - col1 AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL 21 - - col0 FROM tab1
----
101
24
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col0 * tab1.col0 ) + - col1 * + col2 col1 FROM tab1
----
-1395
3526
5152

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col1 - col2 col0 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT - - 95 AS col2 FROM tab1 AS cor0
----
95
95
95

query I rowsort
SELECT DISTINCT - 99 AS col1 FROM tab1 AS cor0
----
-99

skipif mysql # not compatible
query I rowsort
SELECT ALL - col1 * - col2 + ( 80 ) * col1 + CAST ( col2 AS REAL ) FROM tab1 AS cor0
----
1427
2384
3538

query I rowsort
SELECT DISTINCT + + col1 * col0 + - col1 * + 95 AS col0 FROM tab2 AS cor0
----
-1003
-272
-2728

query I rowsort
SELECT ( cor0.col2 ) * col1 FROM tab1 cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-3496
SELECT DISTINCT col2 + col2 + col2 DIV - col1 FROM tab0 cor0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-3496
SELECT DISTINCT col2 + col2 + col2 / - col1 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT ALL + ( - col1 ) - + ( - col2 ) * col1 FROM tab1 AS cor0
----
1235
1378
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3498
SELECT DISTINCT CAST( 21 AS SIGNED ) col2 FROM tab0
----
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3498
SELECT DISTINCT CAST ( 21 AS INTEGER ) col2 FROM tab0
----
21

query I rowsort
SELECT + + col1 * + 2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL - 76 - tab0.col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 25752b882b0e4ea96fd3a620090c11e5

query I rowsort
SELECT DISTINCT - 64 AS col0 FROM tab0
----
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-3502
SELECT DISTINCT + + col2 DIV + 93 col0 FROM tab1 AS cor0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3502
SELECT DISTINCT + + col2 / + 93 col0 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT DISTINCT col0 * 15 FROM tab0 AS cor0
----
1335
360
525

query I rowsort
SELECT DISTINCT 96 FROM tab2, tab2 AS cor0
----
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 * + 61 col1 FROM tab1
----
10309
41236
6100

query I rowsort
SELECT + cor0.col1 * 2 AS col1 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3507
SELECT DISTINCT - CAST( - col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-3507
SELECT DISTINCT - CAST ( - col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - + ( col2 ) * col0 + - cor0.col0 AS col2 FROM tab1 cor0
----
-165
-3712
-7760

query I rowsort
SELECT ALL + col0 - - col0 FROM tab0 cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 72 * + col0 col0 FROM tab0 AS cor0
----
1728
2520
6408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * 45 + + col2 col2 FROM tab2 AS cor0
----
342
3536
3593

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col1 + - col1 * cor0.col0 * - CAST ( 68 AS REAL ) AS col1 FROM tab2 AS cor0
----
14787
312995
91341

query I rowsort
SELECT ALL + - col2 + + 92 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
222
5831
7264

query I rowsort
SELECT DISTINCT ( col1 ) * cor0.col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL 65 FROM tab0 cor0
----
65
65
65

query I rowsort
SELECT DISTINCT tab0.col0 * + ( col2 ) * + col0 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT ALL + tab2.col0 * col0 * - col2 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT DISTINCT + 70 FROM tab1, tab1 cor0
----
70

query I rowsort
SELECT ALL - col2 + 57 FROM tab1
----
-39
0
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3520
SELECT ALL CAST( NULL AS SIGNED ) * tab1.col2 - col0 * ( col0 + col0 ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3520
SELECT ALL CAST ( NULL AS INTEGER ) * tab1.col2 - col0 * ( col0 + col0 ) FROM tab1
----
NULL
NULL
NULL

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0 CROSS JOIN tab2, tab0, tab1 AS cor1
----
3645 values hashing to b8435223668db186a5012e4112253f28

query I rowsort
SELECT ALL + 89 AS col2 FROM tab2, tab2 cor0 CROSS JOIN tab0
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 - + col0 * col2 col0 FROM tab1
----
-108
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-3524
SELECT ALL - ( cor0.col0 ) + + col1 DIV - col0 AS col1 FROM tab0 AS cor0
----
-27
-37
-90

skipif mysql # not compatible
query I rowsort label-3524
SELECT ALL - ( cor0.col0 ) + + col1 / - col0 AS col1 FROM tab0 AS cor0
----
-27
-37
-90

query I rowsort
SELECT ALL cor0.col2 * col1 * col1 FROM tab0 cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT ( - col2 ) - + col2 * - col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT - + col0 * 49 FROM tab0 AS cor0
----
-1176
-1715
-4361

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3528
SELECT ALL - CAST( NULL AS DECIMAL ) * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3528
SELECT ALL - CAST ( NULL AS REAL ) * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 89 * 87 * cor0.col1 + col2 * - col0 FROM tab0 AS cor0
----
665106
697315
751036

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3530
SELECT - CAST( NULL AS SIGNED ) / + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3530
SELECT - CAST ( NULL AS INTEGER ) / + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * - 2 AS col0 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT ALL + - 19 + + 19 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 17 col2 FROM tab2
----
-17
-17
-17

query I rowsort
SELECT + col0 * tab1.col2 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT + 42 * tab1.col2 + + col2 * 43 FROM tab1
----
4590
4845
8160

query I rowsort
SELECT col1 * col1 * + 82 AS col2 FROM tab2
----
23698
285442
78802

query I rowsort
SELECT DISTINCT 85 + col2 AS col0 FROM tab1
----
139
142
181

query I rowsort
SELECT col1 + + col1 * - col0 + col1 AS col2 FROM tab0 AS cor0
----
-1892
-3201
-7917

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 39 * cor0.col1 col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-3354
-3549
-3783

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0, tab2 cor1, tab0 AS cor2
----
972 values hashing to 380241bbc503a31e70494611a87ffd99

query I rowsort
SELECT col1 + ( col2 ) FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 + col1 col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT col1 + - col1 * col0 AS col1 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT + col0 + - 49 AS col1 FROM tab2
----
-42
29
30

query I rowsort
SELECT DISTINCT + - col1 + - ( col2 ) FROM tab0 AS cor0
----
-119
-173
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3546
SELECT ALL + col2 * col1 + col1 DIV + col2 FROM tab0 AS cor0
----
194
2840
7463

skipif mysql # not compatible
query I rowsort label-3546
SELECT ALL + col2 * col1 + col1 / + col2 FROM tab0 AS cor0
----
194
2840
7463

query I rowsort
SELECT ALL + 10 + col2 * tab2.col0 * - col2 + col1 FROM tab2
----
-114049
-5062
-52659

query I rowsort
SELECT + ( cor0.col0 ) * - col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ( col2 ) + + col1 * + col2 FROM tab2 cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - cor0.col1 * - col0 + col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT + 12 * + col2 FROM tab2 cor0
----
312
324
456

onlyif mysql # use DIV operator for integer division
query I rowsort label-3552
SELECT ALL 40 DIV - cor0.col1 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-3552
SELECT ALL 40 / - cor0.col1 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT tab2.col1 * col1 - col2 FROM tab2
----
251
3455
934

query I rowsort
SELECT 87 * 99 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 94f43102defe5f502b69183c8d2a0729

query I rowsort
SELECT DISTINCT + + col1 * + 25 - col0 FROM tab0 AS cor0
----
2126
2186
2390

query I rowsort
SELECT DISTINCT - + col0 - + col2 AS col1 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT cor0.col2 * - ( col0 ) AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + col1 + 31 * - col1 FROM tab0 AS cor0
----
-2580
-2730
-2910

onlyif mysql # use DIV operator for integer division
query I rowsort label-3559
SELECT ALL + col2 DIV - 99 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3559
SELECT ALL + col2 / - 99 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 89 * + col0 + + col0 AS col2 FROM tab0 AS cor0
----
-2112
-3080
-7832

query I rowsort
SELECT ALL + + col2 + + 74 FROM tab0 cor0
----
107
156
75

query I rowsort
SELECT + + 9 * + col1 * + col2 + col0 FROM tab1 AS cor0
----
11312
12639
5194

query I rowsort
SELECT DISTINCT col2 * + 20 + col1 * cor0.col0 FROM tab1 cor0
----
1158
1780
2960

query I rowsort
SELECT ALL + col0 * - col2 - col1 AS col0 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT - 13 * + col1 - col1 AS col2 FROM tab1 AS cor0
----
-140
-182
-364

onlyif mysql # use DIV operator for integer division
query I rowsort label-3566
SELECT ALL - 91 DIV + col1 col1 FROM tab2 AS cor0
----
-1
-2
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3566
SELECT ALL - 91 / + col1 col1 FROM tab2 AS cor0
----
-1
-2
-5

query I rowsort
SELECT - - 41 + col0 * + col1 FROM tab1 AS cor0
----
1081
119
681

query I rowsort
SELECT 45 * + col1 - col0 AS col0 FROM tab2 AS cor0
----
1388
2577
686

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3569
SELECT DISTINCT - - CAST( ( col1 ) AS SIGNED ) + col2 * - col2 AS col2 FROM tab1 AS cor0
----
-2890
-3239
-9203

skipif mysql # not compatible
query I rowsort label-3569
SELECT DISTINCT - - CAST ( ( col1 ) AS INTEGER ) + col2 * - col2 AS col2 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT ALL - - ( + cor0.col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - 19 + cor0.col2 * col2 * - col2 FROM tab1 AS cor0
----
-157483
-185212
-884755

query I rowsort
SELECT + 59 - col0 AS col2 FROM tab1 AS cor0
----
-21
-5
56

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT col1 - - ( col0 ) FROM tab2
----
137
38
96

query I rowsort
SELECT - col1 * ( + col2 ) * + col1 + ( - col2 * col1 + - col0 ) AS col2 FROM tab1
----
-17552
-37911
-6334

query I rowsort
SELECT tab2.col1 + + ( 97 ) - col1 * ( col0 ) * tab2.col1 FROM tab2
----
-22717
-271362
-6599

query I rowsort
SELECT ( col1 ) * cor0.col1 + - col2 FROM tab1 AS cor0
----
43
622
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 64 + + col2 col2 FROM tab0 AS cor0
----
146
65
97

query I rowsort
SELECT DISTINCT + col0 * - col2 + + col1 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT - - 71 * - 78 FROM tab0 cor0
----
-5538

query I rowsort
SELECT - 97 AS col1 FROM tab1
----
-97
-97
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3582
SELECT col2 DIV 4 AS col1 FROM tab0
----
0
20
8

skipif mysql # not compatible
query I rowsort label-3582
SELECT col2 / 4 AS col1 FROM tab0
----
0
20
8

query I rowsort
SELECT 12 * - col1 * + col0 FROM tab1
----
-12480
-7680
-936

query I rowsort
SELECT + col2 - + col0 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL 27 * - cor0.col1 + col1 AS col2 FROM tab2 AS cor0
----
-1534
-442
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * 27 - col0 * - col2 col0 FROM tab1 AS cor0
----
3918
8031
864

query I rowsort
SELECT cor0.col2 * 74 FROM tab0 AS cor0
----
2442
6068
74

query I rowsort
SELECT + ( 59 ) * col2 AS col2 FROM tab1 AS cor0
----
3186
3363
5664

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 67 - - col0 col2 FROM tab0 AS cor0
----
-32
-43
22

query I rowsort
SELECT col1 + - col0 * - 36 AS col0 FROM tab1 AS cor0
----
134
2314
2893

onlyif mysql # use DIV operator for integer division
query I rowsort label-3591
SELECT ALL 72 DIV + ( + col0 ) + + CAST( col0 AS SIGNED ) FROM tab0
----
27
37
89

skipif mysql # not compatible
query I rowsort label-3591
SELECT ALL 72 / + ( + col0 ) + + CAST ( col0 AS INTEGER ) FROM tab0
----
27
37
89

query I rowsort
SELECT DISTINCT - 65 + - 47 * col0 FROM tab0
----
-1193
-1710
-4248

query I rowsort
SELECT col2 * cor0.col1 - 55 * col0 * col0 AS col2 FROM tab0 AS cor0
----
-28842
-428193
-67278

onlyif mysql # use DIV operator for integer division
query I rowsort label-3594
SELECT ALL - col0 DIV col0 + col0 col1 FROM tab1
----
2
63
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3594
SELECT ALL - col0 / col0 + col0 col1 FROM tab1
----
2
63
79

query I rowsort
SELECT ALL 66 + - 98 FROM tab0
----
-32
-32
-32

query I rowsort
SELECT DISTINCT - col2 + col1 * + col0 FROM tab2
----
1305
190
4576

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 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + + col0 + col0 * - cor0.col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT + + col1 + ( cor0.col1 ) FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT col2 + - 76 * col0 AS col1 FROM tab0 AS cor0
----
-1791
-2659
-6682

query I rowsort
SELECT - tab2.col2 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT col2 + col2 * - ( + ( col1 ) ) AS col0 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT + + 62 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT DISTINCT cor0.col0 * col0 + col1 * - col2 FROM tab2 AS cor0
----
-788
4550
5595

query I rowsort
SELECT ALL + + col1 * + ( + 5 ) AS col0 FROM tab0 AS cor0
----
430
455
485

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col0 * + col2 + col1 col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT col2 * + 96 FROM tab2 cor0
----
2496
2592
3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-3608
SELECT ALL - + col2 DIV + col0 + 40 - + col1 DIV - 78 col2 FROM tab0 AS cor0
----
40
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3608
SELECT ALL - + col2 / + col0 + 40 - + col1 / - 78 col2 FROM tab0 AS cor0
----
40
41
41

query I rowsort
SELECT - + col1 + 22 AS col1 FROM tab0 AS cor0
----
-64
-69
-75

query I rowsort
SELECT DISTINCT 61 * + col2 FROM tab2
----
1586
1647
2318

onlyif mysql # use DIV operator for integer division
query I rowsort label-3611
SELECT ALL + col1 DIV - col1 AS col2 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3611
SELECT ALL + col1 / - col1 AS col2 FROM tab2
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3612
SELECT 48 DIV cor0.col0 AS col2 FROM tab1 AS cor0
----
0
0
16

skipif mysql # not compatible
query I rowsort label-3612
SELECT 48 / cor0.col0 AS col2 FROM tab1 AS cor0
----
0
0
16

query I rowsort
SELECT - col1 * col1 - col1 AS col2 FROM tab0
----
-7482
-8372
-9506

query I rowsort
SELECT + cor0.col0 + 52 FROM tab0 AS cor0
----
141
76
87

query I rowsort
SELECT - col1 + - col2 + + col0 AS col1 FROM tab1
----
-29
-3
-77

query I rowsort
SELECT - - col0 - - 10 FROM tab2 cor0
----
17
88
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - cor0.col2 col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + + col0 * - 99 + col0 AS col2 FROM tab0 AS cor0
----
-2352
-3430
-8722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3619
SELECT + col1 * CAST( - col1 AS SIGNED ) - - cor0.col1 AS col0 FROM tab1 cor0
----
-156
-650
-90

skipif mysql # not compatible
query I rowsort label-3619
SELECT + col1 * CAST ( - col1 AS INTEGER ) - - cor0.col1 AS col0 FROM tab1 cor0
----
-156
-650
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-3620
SELECT + col1 * col1 + + col1 - + col1 DIV - col0 FROM tab0 AS cor0
----
7485
8373
9508

skipif mysql # not compatible
query I rowsort label-3620
SELECT + col1 * col1 + + col1 - + col1 / - col0 FROM tab0 AS cor0
----
7485
8373
9508

query I rowsort
SELECT + col1 * - cor0.col1 - + col0 AS col1 FROM tab2 AS cor0
----
-3559
-368
-968

query I rowsort
SELECT - cor0.col0 - ( + col1 + - col0 ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL col2 + col1 * col2 * + col0 AS col0 FROM tab2 AS cor0
----
119678
51072
5886

query I rowsort
SELECT + + ( col2 ) + - col2 * col0 FROM tab1 cor0
----
-108
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-3625
SELECT + 31 DIV col0 + col1 AS col1 FROM tab1 AS cor0
----
10
13
36

skipif mysql # not compatible
query I rowsort label-3625
SELECT + 31 / col0 + col1 AS col1 FROM tab1 AS cor0
----
10
13
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-3626
SELECT + + 40 + - col1 DIV col0 FROM tab0 AS cor0
----
37
38
39

skipif mysql # not compatible
query I rowsort label-3626
SELECT + + 40 + - col1 / col0 FROM tab0 AS cor0
----
37
38
39

query I rowsort
SELECT ALL + col0 + col1 AS col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL tab1.col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2
----
3645 values hashing to cc4f069e61d0cc52f433f9e8c0058808

query I rowsort
SELECT DISTINCT col1 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 * + col0 col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL cor0.col1 + - col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 + col2 * - 42 AS col2 FROM tab0 AS cor0
----
-1410
-3533
-77

query I rowsort
SELECT 17 * col0 FROM tab0 AS cor0
----
1513
408
595

query I rowsort
SELECT - col2 * - col0 + - ( - col0 ) * col1 * - 50 FROM tab2 AS cor0
----
-10661
-228072
-64148

query I rowsort
SELECT + + col1 * + col0 * ( + col2 ) AS col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL - 98 * - col1 + - 35 AS col2 FROM tab2 AS cor0
----
1631
3003
5747

query I rowsort
SELECT + tab0.col2 * + 77 AS col0 FROM tab0
----
2541
6314
77

query I rowsort
SELECT DISTINCT 98 FROM tab2, tab2 AS cor0
----
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3640
SELECT + 87 DIV col1 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3640
SELECT + 87 / col1 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT + - col2 * - 65 FROM tab2 AS cor0
----
1690
1755
2470

onlyif mysql # use DIV operator for integer division
query I rowsort label-3642
SELECT DISTINCT - col1 + - 91 DIV + col1 - col1 * + col1 * - col2 AS col0 FROM tab0 AS cor0
----
243981
678950
9312

skipif mysql # not compatible
query I rowsort label-3642
SELECT DISTINCT - col1 + - 91 / + col1 - col1 * + col1 * - col2 AS col0 FROM tab0 AS cor0
----
243981
678950
9312

query I rowsort
SELECT DISTINCT + col1 * - col2 - + ( col0 ) FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT DISTINCT col1 + + ( - cor0.col1 ) FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3645
SELECT ( + 20 ) DIV col2 FROM tab0 AS cor0
----
0
0
20

skipif mysql # not compatible
query I rowsort label-3645
SELECT ( + 20 ) / col2 FROM tab0 AS cor0
----
0
0
20

query I rowsort
SELECT DISTINCT - col0 + ( - col1 ) * + ( - 82 ) FROM tab0 cor0
----
7028
7373
7919

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3647
SELECT + - CAST( NULL AS DECIMAL ) * col0 + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3647
SELECT + - CAST ( NULL AS REAL ) * col0 + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( + 15 ) * - col2 AS col1 FROM tab2 AS cor0
----
-390
-405
-570

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT - ( - 79 ) + col0 AS col2 FROM tab2 AS cor0
----
157
158
86

query I rowsort
SELECT ALL + 27 * - col0 AS col0 FROM tab0 AS cor0
----
-2403
-648
-945

onlyif mysql # use DIV operator for integer division
query I rowsort label-3652
SELECT ALL col0 DIV - ( tab2.col0 ) FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3652
SELECT ALL col0 / - ( tab2.col0 ) FROM tab2
----
-1
-1
-1

query I rowsort
SELECT col2 + ( tab0.col0 ) FROM tab0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - col0 col1 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT ALL - col0 * + 13 + + col2 AS col1 FROM tab1
----
-775
-944
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3656
SELECT + CAST( + col0 AS SIGNED ) * + col2 AS col2 FROM tab2 cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-3656
SELECT + CAST ( + col0 AS INTEGER ) * + col2 AS col2 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3657
SELECT ALL CAST( ( - col1 ) AS SIGNED ) * - col2 AS col2 FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-3657
SELECT ALL CAST ( ( - col1 ) AS INTEGER ) * - col2 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT 66 + + 2 + col2 * + col1 FROM tab0
----
165
2906
7530

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3659
SELECT CAST( NULL AS SIGNED ) FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3659
SELECT CAST ( NULL AS INTEGER ) FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + - cor0.col0 * - col2 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT - col0 * 96 + col0 FROM tab2 AS cor0
----
-665
-7410
-7505

query I rowsort
SELECT + - cor0.col1 - 3 AS col1 FROM tab1 AS cor0
----
-13
-16
-29

query I rowsort
SELECT - col0 - ( col2 ) AS col1 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT - col1 + + 47 FROM tab1 cor0
----
21
34
37

query I rowsort
SELECT ALL - col1 + - 16 + + col1 AS col2 FROM tab1 AS cor0
----
-16
-16
-16

query I rowsort
SELECT cor0.col0 * col2 + - col0 AS col2 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT DISTINCT + + cor0.col2 + - 44 FROM tab1 AS cor0
----
10
13
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3668
SELECT ALL + cor0.col2 * CAST( NULL AS SIGNED ) + + col0 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3668
SELECT ALL + cor0.col2 * CAST ( NULL AS INTEGER ) + + col0 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col2 * 4 + 89 * - col0 + ( col2 * col1 ) FROM tab1 AS cor0
----
-4898
-5488
1353

query I rowsort
SELECT + col0 * + 15 AS col0 FROM tab0 cor0
----
1335
360
525

query I rowsort
SELECT tab1.col2 * - tab1.col2 + - col1 + col0 * col0 * 43 AS col1 FROM tab1
----
-2555
172869
265971

query I rowsort
SELECT ALL 86 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT ALL - col1 * tab0.col2 + col0 FROM tab0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-3674
SELECT + ( - col1 ) DIV - col2 + ( col1 ) col1 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3674
SELECT + ( - col1 ) / - col2 + ( col1 ) col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT 66 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3676
SELECT ALL - cor0.col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3676
SELECT ALL - cor0.col0 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 - col0 col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL + 98 FROM tab1, tab2 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT + col2 * + col1 * + 56 AS col0 FROM tab2 AS cor0
----
36176
46872
85904

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3680
SELECT ALL CAST( 86 + col0 AS SIGNED ) AS col2 FROM tab0
----
110
121
175

skipif mysql # not compatible
query I rowsort label-3680
SELECT ALL CAST ( 86 + col0 AS INTEGER ) AS col2 FROM tab0
----
110
121
175

query I rowsort
SELECT + 65 * + col0 AS col1 FROM tab1 AS cor0
----
195
4160
5200

query I rowsort
SELECT DISTINCT - 99 FROM tab2, tab1, tab1 AS cor0
----
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-3683
SELECT ALL - 47 DIV - col0 + + col0 AS col1 FROM tab1 AS cor0
----
18
64
80

skipif mysql # not compatible
query I rowsort label-3683
SELECT ALL - 47 / - col0 + + col0 AS col1 FROM tab1 AS cor0
----
18
64
80

query I rowsort
SELECT DISTINCT - col1 * col1 + cor0.col2 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT 73 AS col1 FROM tab1 AS cor0
----
73

query I rowsort
SELECT DISTINCT + - col0 * col0 + ( col2 ) * - col0 FROM tab1 AS cor0
----
-14080
-171
-7744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + 73 col2 FROM tab0
----
-16
38
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-3688
SELECT col0 - + col0 DIV col1 AS col1 FROM tab1
----
3
58
74

skipif mysql # not compatible
query I rowsort label-3688
SELECT col0 - + col0 / col1 AS col1 FROM tab1
----
3
58
74

query I rowsort
SELECT + col0 * ( + 54 ) AS col2 FROM tab0 AS cor0
----
1296
1890
4806

query I rowsort
SELECT DISTINCT - 68 AS col0 FROM tab1
----
-68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3691
SELECT CAST( col0 AS SIGNED ) AS col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3691
SELECT CAST ( col0 AS INTEGER ) AS col2 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 92 col2 FROM tab1
----
-4968
-5244
-8832

query I rowsort
SELECT ( + 11 ) * + tab0.col1 AS col2 FROM tab0
----
1001
1067
946

query I rowsort
SELECT - 66 + 42 FROM tab2 AS cor0
----
-24
-24
-24

query I rowsort
SELECT 20 + col0 AS col1 FROM tab0 AS cor0
----
109
44
55

query I rowsort
SELECT ( col1 ) * 63 FROM tab1 cor0
----
1638
630
819

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3697
SELECT ( cor0.col1 ) + CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3697
SELECT ( cor0.col1 ) + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * - col1 * tab2.col0 AS col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT + - 36 + col0 FROM tab2 AS cor0
----
-29
42
43

query I rowsort
SELECT ( col1 ) + - col1 AS col2 FROM tab2
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3701
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - 81 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3701
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - 81 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + cor1.col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ALL - col1 + + cor0.col1 * - col2 AS col0 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT - 12 - col2 AS col2 FROM tab1 AS cor0
----
-108
-66
-69

query I rowsort
SELECT ALL ( + ( cor0.col2 ) ) + - col2 * + col2 * - col0 FROM tab2 cor0
----
114114
5130
52754

onlyif mysql # use DIV operator for integer division
query I rowsort label-3706
SELECT DISTINCT - - col1 * col2 - col0 DIV + ( col0 ) AS col1 FROM tab1 AS cor0
----
1247
1403
569

skipif mysql # not compatible
query I rowsort label-3706
SELECT DISTINCT - - col1 * col2 - col0 / + ( col0 ) AS col1 FROM tab1 AS cor0
----
1247
1403
569

query I rowsort
SELECT DISTINCT - - 52 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - 7 col2 FROM tab0
----
17
28
82

query I rowsort
SELECT - 12 * + tab2.col2 + col2 AS col0 FROM tab2
----
-286
-297
-418

query I rowsort
SELECT col2 * + 36 * col2 + - 8 AS col0 FROM tab1
----
104968
116956
331768

query I rowsort
SELECT ALL - 86 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

query I rowsort
SELECT - cor0.col2 + - col2 * col2 AS col2 FROM tab2 cor0
----
-1482
-702
-756

query I rowsort
SELECT ( col1 * + col1 ) FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + tab1.col1 AS col0 FROM tab1, tab2 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - 25 * col2 FROM tab2
----
-650
-675
-950

query I rowsort
SELECT + col0 * - col1 + - 8 FROM tab2 AS cor0
----
-1351
-225
-4610

query I rowsort
SELECT DISTINCT - tab1.col0 * - col1 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT - + col1 + col1 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3719
SELECT DISTINCT - col2 + - col2 DIV - ( + col2 ) FROM tab1
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-3719
SELECT DISTINCT - col2 + - col2 / - ( + col2 ) FROM tab1
----
-53
-56
-95

query I rowsort
SELECT + 12 AS col1 FROM tab2
----
12
12
12

query I rowsort
SELECT DISTINCT col0 * - col2 * col1 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - col0 * - col1 - - col2 AS col0 FROM tab1
----
1136
132
697

query I rowsort
SELECT + - col0 * + 81 AS col2 FROM tab1 AS cor0
----
-243
-5184
-6480

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 cor1, tab2, tab1 AS cor2, tab0
----
13122 values hashing to dabf81f4a30601e552d2b6b2034a0b30

query I rowsort
SELECT DISTINCT tab2.col2 + + col2 AS col0 FROM tab2
----
52
54
76

query I rowsort
SELECT ALL col1 * + col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3727
SELECT DISTINCT col0 DIV + cor0.col0 + - col2 * col0 * col2 FROM tab0 AS cor0
----
-26135
-34
-598435

skipif mysql # not compatible
query I rowsort label-3727
SELECT DISTINCT col0 / + cor0.col0 + - col2 * col0 * col2 FROM tab0 AS cor0
----
-26135
-34
-598435

onlyif mysql # use DIV operator for integer division
query I rowsort label-3728
SELECT - col2 * + cor0.col2 + col0 DIV + col2 AS col0 FROM tab1 AS cor0
----
-2916
-3248
-9216

skipif mysql # not compatible
query I rowsort label-3728
SELECT - col2 * + cor0.col2 + col0 / + col2 AS col0 FROM tab1 AS cor0
----
-2916
-3248
-9216

query I rowsort
SELECT + cor0.col2 + 16 * + 70 * col1 FROM tab0 AS cor0
----
102002
108641
96353

query I rowsort
SELECT DISTINCT col0 * col2 * - col2 + - col0 FROM tab2 AS cor0
----
-114155
-5110
-52806

query I rowsort
SELECT - col0 + 19 FROM tab0 AS cor0
----
-16
-5
-70

query I rowsort
SELECT ALL col0 * ( col2 ) * - col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT + col1 + + 78 * + 28 AS col2 FROM tab1 AS cor0
----
2194
2197
2210

query I rowsort
SELECT + - col2 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL col1 + 25 * col2 FROM tab2
----
706
709
967

query I rowsort
SELECT ALL col1 + 21 FROM tab0
----
107
112
118

query I rowsort
SELECT col2 * 70 + col1 AS col1 FROM tab1
----
3806
4000
6733

query I rowsort
SELECT ALL - col0 + - 52 * + col0 AS col2 FROM tab0 AS cor0
----
-1272
-1855
-4717

query I rowsort
SELECT + col1 * + ( col2 ) AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + cor0.col1 + 23 FROM tab2 cor0
----
40
54
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3741
SELECT DISTINCT + col0 * - CAST( - col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-3741
SELECT DISTINCT + col0 * - CAST ( - col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT cor0.col0 + ( col2 ) AS col1 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3743
SELECT + col1 DIV + col0 + - col0 * col2 + col1 col0 FROM tab0 AS cor0
----
-703
-7206
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3743
SELECT + col1 / + col0 + - col0 * col2 + col1 col0 FROM tab0 AS cor0
----
-703
-7206
64

query I rowsort
SELECT ( - col2 ) + - cor0.col1 + + col0 FROM tab2 AS cor0
----
-51
-7
24

query I rowsort
SELECT DISTINCT - - 21 * - col2 AS col2 FROM tab0 AS cor0
----
-1722
-21
-693

query I rowsort
SELECT DISTINCT + + cor0.col0 + + col2 * col0 + ( 37 * + col1 ) FROM tab0 AS cor0
----
10754
3659
3998

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3747
SELECT ALL + CAST( col0 AS SIGNED ) * + col0 + col0 AS col1 FROM tab1 AS cor0
----
12
4160
6480

skipif mysql # not compatible
query I rowsort label-3747
SELECT ALL + CAST ( col0 AS INTEGER ) * + col0 + col0 AS col1 FROM tab1 AS cor0
----
12
4160
6480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3748
SELECT - CAST( NULL AS SIGNED ) / - col1 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-3748
SELECT - CAST ( NULL AS INTEGER ) / - col1 col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3749
SELECT DISTINCT + + CAST( 41 AS SIGNED ) * - col0 * + ( - col2 ) FROM tab1 AS cor0
----
149568
314880
6642

skipif mysql # not compatible
query I rowsort label-3749
SELECT DISTINCT + + CAST ( 41 AS INTEGER ) * - col0 * + ( - col2 ) FROM tab1 AS cor0
----
149568
314880
6642

query I rowsort
SELECT col2 + 18 + col0 * - col2 FROM tab0 AS cor0
----
-16
-7198
-741

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3751
SELECT ALL - CAST( 12 AS SIGNED ) * col1 AS col0 FROM tab0 AS cor0
----
-1032
-1092
-1164

skipif mysql # not compatible
query I rowsort label-3751
SELECT ALL - CAST ( 12 AS INTEGER ) * col1 AS col0 FROM tab0 AS cor0
----
-1032
-1092
-1164

onlyif mysql # use DIV operator for integer division
query I rowsort label-3752
SELECT ( col2 ) DIV col1 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-3752
SELECT ( col2 ) / col1 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT - 93 * - col2 + col1 FROM tab2 AS cor0
----
2477
2542
3551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3754
SELECT ALL + col0 * - CAST( - 3 AS SIGNED ) + - tab0.col2 AS col2 FROM tab0
----
104
185
39

skipif mysql # not compatible
query I rowsort label-3754
SELECT ALL + col0 * - CAST ( - 3 AS INTEGER ) + - tab0.col2 AS col2 FROM tab0
----
104
185
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3755
SELECT - col2 - CAST( - 65 AS SIGNED ) FROM tab0
----
-17
32
64

skipif mysql # not compatible
query I rowsort label-3755
SELECT - col2 - CAST ( - 65 AS INTEGER ) FROM tab0
----
-17
32
64

query I rowsort
SELECT col0 * 89 - col0 FROM tab0
----
2112
3080
7832

query I rowsort
SELECT ALL tab2.col1 + col2 * 19 * + col1 AS col1 FROM tab2
----
12291
15934
29205

query I rowsort
SELECT DISTINCT 58 * col1 FROM tab0 AS cor0
----
4988
5278
5626

query I rowsort
SELECT + - 52 + col0 AS col0 FROM tab1 AS cor0
----
-49
12
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * 46 col2 FROM tab0 AS cor0
----
1104
1610
4094

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 + cor0.col2 * + col2 + 97 col1 FROM tab1 AS cor0
----
2959
3289
9217

query I rowsort
SELECT ALL + col0 + cor0.col1 * + col2 AS col2 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-3763
SELECT - 28 - cor0.col1 DIV col1 AS col1 FROM tab2 AS cor0
----
-29
-29
-29

skipif mysql # not compatible
query I rowsort label-3763
SELECT - 28 - cor0.col1 / col1 AS col1 FROM tab2 AS cor0
----
-29
-29
-29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col1 ) * ( - ( + cor0.col2 ) ) + - col1 col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT + + col2 * cor0.col2 + col0 AS col1 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT DISTINCT - + 79 + - col2 FROM tab2 cor0
----
-105
-106
-117

query I rowsort
SELECT ALL + + col0 - col1 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL + 55 * cor0.col0 FROM tab0 AS cor0
----
1320
1925
4895

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3769
SELECT + tab0.col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3769
SELECT + tab0.col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT col2 + col0 * 39 AS col1 FROM tab1
----
171
2553
3216

query I rowsort
SELECT DISTINCT - - 26 * + col0 AS col0 FROM tab1 AS cor0
----
1664
2080
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 15 ) col2 FROM tab1
----
15
15
15

query I rowsort
SELECT ALL + + 89 * + col1 AS col2 FROM tab2 AS cor0
----
1513
2759
5251

query I rowsort
SELECT DISTINCT + col0 + + cor0.col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT 13 * col0 * - 96 AS col1 FROM tab2 AS cor0
----
-8736
-97344
-98592

query I rowsort
SELECT ALL + - 16 + + col2 AS col1 FROM tab1 AS cor0
----
38
41
80

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + ( cor0.col1 ) + - CAST ( - col1 AS REAL ) * col0 * + col0 AS col0 FROM tab2 AS cor0
----
106114
1550
359015

query I rowsort
SELECT ALL - col0 - col2 * col0 AS col1 FROM tab2
----
-196
-2106
-3081

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col2 + + CAST ( + col2 AS REAL ) AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL - col0 * + 26 FROM tab2 AS cor0
----
-182
-2028
-2054

query I rowsort
SELECT - + col2 * - ( col1 ) AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + col1 + + ( - col2 ) FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT ALL + cor0.col1 * + col1 AS col0 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT - col2 + col2 - - 99 FROM tab1
----
99
99
99

query I rowsort
SELECT ALL - col2 * + cor0.col1 + col1 FROM tab2 cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT - + col1 * - col2 + + cor0.col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

onlyif mysql # use DIV operator for integer division
query I rowsort label-3788
SELECT ALL + col2 * + col0 * col0 + col2 DIV - col1 - + col2 AS col2 FROM tab2 cor0
----
1296
158158
237118

skipif mysql # not compatible
query I rowsort label-3788
SELECT ALL + col2 * + col0 * col0 + col2 / - col1 - + col2 AS col2 FROM tab2 cor0
----
1296
158158
237118

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 * col1 col0 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3790
SELECT ALL + - cor0.col1 * + col1 + + col1 DIV - col0 - + cor0.col0 FROM tab1 AS cor0
----
-164
-249
-687

skipif mysql # not compatible
query I rowsort label-3790
SELECT ALL + - cor0.col1 * + col1 + + col1 / - col0 - + cor0.col0 FROM tab1 AS cor0
----
-164
-249
-687

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 - col2 FROM tab2 AS cor0
----
-327
-3507
-988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col2 + col2 col0 FROM tab0 cor0
----
-1056
-6642
0

query I rowsort
SELECT + col2 * col2 * + cor0.col1 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 WHERE NOT + col1 NOT IN ( col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * col1 col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + - col1 * + cor0.col2 + - cor0.col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT - col0 * col0 + col2 * col2 + - col1 FROM tab1 AS cor0
----
-857
2803
2881

query I rowsort
SELECT + + col0 * col1 + - col1 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT DISTINCT col0 + + col0 AS col2 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT DISTINCT - col1 * tab1.col1 + + col2 + tab1.col0 * - col2 FROM tab1
----
-3691
-7753
-784

query I rowsort
SELECT DISTINCT - col0 * + col2 + col0 + tab2.col1 FROM tab2
----
-151
-1891
-2906

query I rowsort
SELECT - 37 * col2 AS col2 FROM tab2
----
-1406
-962
-999

query I rowsort
SELECT col0 * - col2 + + tab0.col2 * - col0 * + col2 FROM tab0
----
-26928
-605734
-70

query I rowsort
SELECT tab1.col2 + col0 * col0 AS col0 FROM tab1
----
4153
63
6496

query I rowsort
SELECT - col0 * + tab1.col0 AS col1 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT tab1.col0 * - col0 * + col0 + col0 AS col0 FROM tab1
----
-24
-262080
-511920

query I rowsort
SELECT DISTINCT + col2 * col1 * col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT DISTINCT - col2 * - col1 * col2 AS col1 FROM tab0
----
611884
93654
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3809
SELECT - col0 + col1 * - col2 + cor0.col1 DIV - col2 FROM tab1 cor0
----
-1328
-1407
-634

skipif mysql # not compatible
query I rowsort label-3809
SELECT - col0 + col1 * - col2 + cor0.col1 / - col2 FROM tab1 cor0
----
-1328
-1407
-634

query I rowsort
SELECT + 70 + cor0.col0 + + col2 * - 27 FROM tab0 AS cor0
----
-2055
-797
78

query I rowsort
SELECT ALL - col0 + col0 * - col1 AS col0 FROM tab1
----
-1120
-704
-81

query I rowsort
SELECT + col0 + - col1 + 92 FROM tab1 cor0
----
146
159
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-3813
SELECT tab1.col1 * - tab1.col2 + + tab1.col2 * - tab1.col0 DIV - col0 AS col1 FROM tab1
----
-1152
-1350
-513

skipif mysql # not compatible
query I rowsort label-3813
SELECT tab1.col1 * - tab1.col2 + + tab1.col2 * - tab1.col0 / - col0 AS col1 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT tab1.col2 + col0 * + col0 AS col2 FROM tab1
----
4153
63
6496

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1 WHERE NOT NULL < NULL
----

query I rowsort
SELECT ALL - col0 AS col2 FROM tab1 WHERE col2 IN ( col2 * col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3817
SELECT col2 - col1 DIV tab1.col0 AS col1 FROM tab1
----
46
57
96

skipif mysql # not compatible
query I rowsort label-3817
SELECT col2 - col1 / tab1.col0 AS col1 FROM tab1
----
46
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col2 * - col0 col2 FROM tab1 WHERE NOT NULL < - col1
----

query I rowsort
SELECT col2 * - col0 + + col1 * col2 FROM tab0
----
164
2046
62

query I rowsort
SELECT ALL + col0 * - col1 * col0 + + col1 * col1 FROM tab1
----
-40860
-83031
442

query I rowsort
SELECT ALL + 53 * + col2 AS col0 FROM tab0
----
1749
4346
53

query I rowsort
SELECT ALL - col2 * tab1.col2 * ( col0 ) AS col1 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT 98 FROM tab1, tab0, tab2 cor0
----
98

query I rowsort
SELECT ALL - col0 * + tab1.col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + col0 - col0 / - col2 FROM tab2 WHERE NOT ( col1 ) <> NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3826
SELECT col1 DIV col1 + col2 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-3826
SELECT col1 / col1 + col2 FROM tab1
----
55
58
97

query III rowsort
SELECT * FROM tab2 WHERE NOT + col0 + col2 <= - col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-3828
SELECT tab0.col0 DIV - col1 + + col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3828
SELECT tab0.col0 / - col1 + + col0 FROM tab0
----
24
35
89

query I rowsort
SELECT - col0 * + col0 - + col2 FROM tab2 AS cor0
----
-6110
-6279
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-3830
SELECT DISTINCT cor0.col1 DIV col1 - col1 * - col0 FROM tab1 AS cor0
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-3830
SELECT DISTINCT cor0.col1 / col1 - col1 * - col0 FROM tab1 AS cor0
----
1041
641
79

query I rowsort
SELECT DISTINCT col0 * col0 - col0 FROM tab2 AS cor0
----
42
6006
6162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + cor0.col1 * cor0.col1 + col1 * col0 col1 FROM tab0 AS cor0 WHERE NOT + col0 + + col2 NOT IN ( col2 + - col1 * - cor0.col2 )
----

query I rowsort
SELECT ALL col2 / col2 FROM tab1 WHERE ( col1 ) NOT BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 + + col0 * col0 + tab0.col2 col2 FROM tab0
----
1261
633
8092

query I rowsort
SELECT ALL tab2.col1 * - col1 * col0 FROM tab2
----
-22831
-271518
-6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-3836
SELECT col0 * + col2 + tab2.col2 DIV + col1 FROM tab2
----
189
2028
3004

skipif mysql # not compatible
query I rowsort label-3836
SELECT col0 * + col2 + tab2.col2 / + col1 FROM tab2
----
189
2028
3004

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col0 FROM tab0 WHERE NOT ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL tab1.col0 * col0 / - col2 FROM tab1 WHERE ( col0 / + col0 ) = NULL
----

query III rowsort
SELECT * FROM tab0 WHERE NOT ( - col2 ) >= - col2 / col2
----
24
86
33
89
91
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3840
SELECT col2 + col1 DIV - col1 FROM tab2
----
25
26
37

skipif mysql # not compatible
query I rowsort label-3840
SELECT col2 + col1 / - col1 FROM tab2
----
25
26
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-3841
SELECT - tab1.col0 DIV - col1 AS col2 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-3841
SELECT - tab1.col0 / - col1 AS col2 FROM tab1
----
0
6
6

query I rowsort
SELECT DISTINCT + tab2.col0 + - col0 * col1 AS col0 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT col0 + - col1 * col0 + col1 * + col1 FROM tab0
----
271
5356
6049

query I rowsort
SELECT ALL col1 * + col0 * col2 AS col0 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT ALL col2 + + tab0.col1 + + tab0.col1 FROM tab0
----
195
205
264

query I rowsort
SELECT ALL tab1.col0 + tab1.col2 - col1 AS col2 FROM tab1
----
111
163
31

query I rowsort
SELECT + + cor0.col2 * col1 + + col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL col2 * col2 * cor0.col0 + cor0.col0 + + col2 AS col1 FROM tab1 AS cor0
----
208057
737456
8805

query I rowsort
SELECT + - cor0.col0 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT ALL + cor0.col1 * + col1 + + 62 AS col0 FROM tab1 AS cor0
----
162
231
738

query I rowsort
SELECT - 60 + col1 FROM tab0
----
26
31
37

query I rowsort
SELECT + col0 * col0 + col2 AS col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL + col1 + - ( - col1 * col0 ) AS col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT - cor0.col1 + - ( col0 ) * cor0.col1 AS col1 FROM tab0 cor0
----
-2150
-3492
-8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col1 * ( col2 ) col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col2 + - 71 FROM tab2 AS cor0
----
-33
-44
-45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3857
SELECT DISTINCT - + col1 + + CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3857
SELECT DISTINCT - + col1 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL

query I rowsort
SELECT + cor0.col2 * 43 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to ee721a23e251261c22e7528d8775b679

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - 94 ) col0 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7eeab220fc6bbc2fb3fa4aef8600159f

query I rowsort
SELECT ALL + 59 AS col2 FROM tab2
----
59
59
59

query I rowsort
SELECT + 74 + - 40 AS col2 FROM tab1 cor0
----
34
34
34

query I rowsort
SELECT ALL + 87 AS col2 FROM tab0 cor0
----
87
87
87

query I rowsort
SELECT - + 69 + cor0.col1 * - cor0.col0 - + 23 FROM tab0 AS cor0
----
-2156
-3487
-8191

query I rowsort
SELECT ALL + ( - col2 ) * col0 FROM tab2 cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3865
SELECT - ( col1 ) DIV cor0.col0 - col1 DIV col2 AS col1 FROM tab0 AS cor0
----
-2
-5
-99

skipif mysql # not compatible
query I rowsort label-3865
SELECT - ( col1 ) / cor0.col0 - col1 / col2 AS col1 FROM tab0 AS cor0
----
-2
-5
-99

query I rowsort
SELECT - 25 AS col1 FROM tab2 AS cor0
----
-25
-25
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 43 + col2 col2 FROM tab1 AS cor0
----
11
14
53

query I rowsort
SELECT DISTINCT - + 89 FROM tab1 AS cor0
----
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3869
SELECT ALL + col0 DIV 76 AS col0 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3869
SELECT ALL + col0 / 76 AS col0 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT ALL + 67 * 64 FROM tab0, tab0 AS cor0
----
9 values hashing to 9ba6532bed8b35bd66fdce28a308c5c5

query I rowsort
SELECT - cor1.col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * tab0.col1 * 13 col2 FROM tab0
----
107653
122317
96148

query I rowsort
SELECT ALL - col2 * + 83 FROM tab1
----
-4482
-4731
-7968

query I rowsort
SELECT + ( cor0.col0 ) AS col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT + col2 - + col2 * + col2 FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT col0 * + 92 + + col2 - 64 FROM tab1
----
266
5881
7392

query I rowsort
SELECT col2 * - col2 * col0 + - col1 AS col2 FROM tab0 cor0
----
-132
-26222
-598527

query I rowsort
SELECT + col1 + + ( col2 ) AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + 37 + col0 + col0 AS col0 FROM tab1
----
165
197
43

query I rowsort
SELECT 87 + cor0.col1 * - cor0.col0 FROM tab1 AS cor0
----
-553
-953
9

query I rowsort
SELECT ( col0 ) + + col2 * - 38 FROM tab1 AS cor0
----
-2049
-2102
-3568

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3882
SELECT CAST( + col1 * col2 AS SIGNED ) FROM tab0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-3882
SELECT CAST ( + col1 * col2 AS INTEGER ) FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3883
SELECT - ( - col1 ) * - tab0.col1 * + col0 + - col1 DIV + col2 - + tab0.col0 FROM tab0
----
-177530
-329447
-737099

skipif mysql # not compatible
query I rowsort label-3883
SELECT - ( - col1 ) * - tab0.col1 * + col0 + - col1 / + col2 - + tab0.col0 FROM tab0
----
-177530
-329447
-737099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3884
SELECT DISTINCT col0 DIV col2 - + col1 FROM tab1
----
-13
-26
-9

skipif mysql # not compatible
query I rowsort label-3884
SELECT DISTINCT col0 / col2 - + col1 FROM tab1
----
-13
-26
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3885
SELECT DISTINCT CAST( - col0 AS SIGNED ) + col2 - tab1.col2 DIV + col0 FROM tab1
----
-7
15
33

skipif mysql # not compatible
query I rowsort label-3885
SELECT DISTINCT CAST ( - col0 AS INTEGER ) + col2 - tab1.col2 / + col0 FROM tab1
----
-7
15
33

query I rowsort
SELECT + col2 * + col0 + col0 AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT cor0.col0 - + col1 FROM tab0 AS cor0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col0 col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + col2 * col1 * + col2 AS col2 FROM tab2 AS cor0
----
22599
24548
39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 56 col1 FROM tab0 cor0
----
-56
-56
-56

query I rowsort
SELECT DISTINCT col0 * + ( col1 * col1 ) + tab1.col0 - col1 AS col2 FROM tab1
----
13587
2005
6454

onlyif mysql # use DIV operator for integer division
query I rowsort label-3892
SELECT col0 DIV - 31 AS col1 FROM tab1
----
-2
-2
0

skipif mysql # not compatible
query I rowsort label-3892
SELECT col0 / - 31 AS col1 FROM tab1
----
-2
-2
0

query I rowsort
SELECT DISTINCT - col0 + col1 + col2 * col1 AS col1 FROM tab2
----
1515
584
861

query I rowsort
SELECT - ( + col1 ) * cor0.col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT col1 + + 87 + tab0.col2 * col1 FROM tab0
----
281
3011
7640

query I rowsort
SELECT + 54 * ( col2 ) AS col0 FROM tab2
----
1404
1458
2052

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 + col2 + col0 + - col1 FROM tab1
----
111
163
31

query I rowsort
SELECT DISTINCT - col0 + - 56 * col1 * + col1 - + col1 AS col0 FROM tab1
----
-37885
-5674
-9557

query I rowsort
SELECT - 84 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
2772
6888
84

query I rowsort
SELECT - - col2 * + col1 * col1 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
244092
679131
9444

query I rowsort
SELECT DISTINCT + 90 FROM tab0 cor0
----
90

query I rowsort
SELECT ALL - cor1.col0 AS col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

onlyif mysql # use DIV operator for integer division
query I rowsort label-3904
SELECT DISTINCT - col2 * col0 + col0 DIV + col2 FROM tab1
----
-162
-3647
-7680

skipif mysql # not compatible
query I rowsort label-3904
SELECT DISTINCT - col2 * col0 + col0 / + col2 FROM tab1
----
-162
-3647
-7680

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

onlyif mysql # use DIV operator for integer division
query I rowsort label-3906
SELECT + 99 * - col1 + col1 + col1 DIV + col0 FROM tab0
----
-8425
-8917
-9504

skipif mysql # not compatible
query I rowsort label-3906
SELECT + 99 * - col1 + col1 + col1 / + col0 FROM tab0
----
-8425
-8917
-9504

onlyif mysql # use DIV operator for integer division
query I rowsort label-3907
SELECT - + cor0.col2 * + col0 + + col0 DIV - col2 - col1 * + cor0.col0 FROM tab0 AS cor0
----
-15398
-2856
-3465

skipif mysql # not compatible
query I rowsort label-3907
SELECT - + cor0.col2 * + col0 + + col0 / - col2 - col1 * + cor0.col0 FROM tab0 AS cor0
----
-15398
-2856
-3465

query I rowsort
SELECT DISTINCT - + col2 * - cor0.col0 AS col2 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3909
SELECT DISTINCT + col1 DIV col2 + + cor0.col1 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-3909
SELECT DISTINCT + col1 / col2 + + cor0.col1 FROM tab0 AS cor0
----
194
88
92

query I rowsort
SELECT DISTINCT - col2 + col1 * - col1 AS col0 FROM tab1 AS cor0
----
-157
-265
-730

onlyif mysql # use DIV operator for integer division
query I rowsort label-3911
SELECT DISTINCT - - 43 DIV col1 + - col2 AS col2 FROM tab1 AS cor0
----
-53
-93

skipif mysql # not compatible
query I rowsort label-3911
SELECT DISTINCT - - 43 / col1 + - col2 AS col2 FROM tab1 AS cor0
----
-53
-93

query I rowsort
SELECT col0 * + cor0.col1 + - col2 * col2 AS col1 FROM tab0 cor0
----
1375
3394
975

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * - cor0.col1 col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 9fc71e55d98c21fc68f4af540b1d7651

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col2 * col2 col1 FROM tab2
----
17576
19683
54872

query I rowsort
SELECT DISTINCT cor0.col1 * ( 8 ) + col0 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-1207
-4130
31

query I rowsort
SELECT ALL - - cor0.col2 * + ( col2 ) FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - - col2 * 91 FROM tab0 AS cor0
----
3003
7462
91

query I rowsort
SELECT DISTINCT - + col1 + - col2 + + 78 * - col2 FROM tab1 AS cor0
----
-4292
-4513
-7597

query I rowsort
SELECT DISTINCT + + col1 + - 6 FROM tab1 AS cor0
----
20
4
7

query I rowsort
SELECT ALL 66 + col0 FROM tab1 AS cor0
----
130
146
69

query I rowsort
SELECT ALL - col1 * col0 + col1 AS col0 FROM tab2 cor0
----
-1326
-186
-4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3922
SELECT CAST( + 24 AS SIGNED ) + - col0 * + col1 AS col0 FROM tab2 AS cor0
----
-1319
-193
-4578

skipif mysql # not compatible
query I rowsort label-3922
SELECT CAST ( + 24 AS INTEGER ) + - col0 * + col1 AS col0 FROM tab2 AS cor0
----
-1319
-193
-4578

query I rowsort
SELECT ALL - + col0 * col2 + + col1 + col2 * cor0.col0 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - ( - cor0.col1 ) * col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + + col0 + + col1 + + col2 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT DISTINCT 57 + - col0 AS col2 FROM tab1 AS cor0
----
-23
-7
54

query I rowsort
SELECT col2 + - 64 * - col1 AS col2 FROM tab0
----
5537
5906
6209

query I rowsort
SELECT col1 * col0 * 65 AS col0 FROM tab0
----
134160
220675
526435

onlyif mysql # use DIV operator for integer division
query I rowsort label-3929
SELECT DISTINCT + col1 DIV 33 FROM tab0
----
2

skipif mysql # not compatible
query I rowsort label-3929
SELECT DISTINCT + col1 / 33 FROM tab0
----
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-3930
SELECT DISTINCT cor0.col2 DIV - 53 AS col2 FROM tab2, tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-3930
SELECT DISTINCT cor0.col2 / - 53 AS col2 FROM tab2, tab1 AS cor0
----
-1

query I rowsort
SELECT ALL col2 * + ( col2 ) AS col1 FROM tab2
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3932
SELECT ALL - - col1 + - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3932
SELECT ALL - - col1 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 88 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT ALL + col0 * ( + cor0.col1 ) FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3935
SELECT ALL - + CAST( - col2 AS SIGNED ) FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-3935
SELECT ALL - + CAST ( - col2 AS INTEGER ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - ( col1 ) + - cor0.col2 AS col1 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT - + ( - col0 ) * + col0 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3938
SELECT - cor0.col2 DIV col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-3938
SELECT - cor0.col2 / col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT 48 * col0 FROM tab0 AS cor0
----
1152
1680
4272

query I rowsort
SELECT + 6 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + col0 col2 FROM tab1
----
121
176
57

query I rowsort
SELECT + col0 + - col0 * 47 + col0 AS col0 FROM tab2
----
-315
-3510
-3555

query I rowsort
SELECT + ( - 17 ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 490d008f3fb5b70d3971cfc6d84503f4

query I rowsort
SELECT ALL - col1 * - col1 + col2 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
15579
8188
9444

query I rowsort
SELECT DISTINCT 77 - + col1 * - col1 AS col2 FROM tab1 cor0
----
177
246
753

query I rowsort
SELECT + + col0 + - col2 AS col0 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT + 62 - col0 AS col2 FROM tab0 AS cor0
----
-27
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3948
SELECT ALL + col2 * col1 + 4 DIV col1 FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-3948
SELECT ALL + col2 * col1 + 4 / col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + 64 * + col0 FROM tab0 AS cor0
----
1536
2240
5696

query I rowsort
SELECT + ( - col0 ) + col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT cor0.col1 + + col0 * - col1 AS col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL + 12 + + cor0.col0 + 33 FROM tab2 AS cor0
----
123
124
52

query I rowsort
SELECT col1 + - col0 + - col2 * col0 * col2 AS col1 FROM tab2 AS cor0
----
-114138
-5079
-52747

query I rowsort
SELECT - col1 * ( - cor0.col2 ) + - col2 + - col0 AS col2 FROM tab0 cor0
----
2781
61
7291

query I rowsort
SELECT - col2 * + 46 + 24 FROM tab0 AS cor0
----
-1494
-22
-3748

query I rowsort
SELECT + col0 + - col2 * - col1 AS col0 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-3957
SELECT ALL + 67 DIV - col1 + CAST( col2 AS SIGNED ) * - col0 * ( - col0 + - col0 ) FROM tab1
----
1228795
466938
970

skipif mysql # not compatible
query I rowsort label-3957
SELECT ALL + 67 / - col1 + CAST ( col2 AS INTEGER ) * - col0 * ( - col0 + - col0 ) FROM tab1
----
1228795
466938
970

query I rowsort
SELECT + - col2 * + 88 * + col0 + + cor0.col1 FROM tab1 AS cor0
----
-14230
-321014
-675827

query I rowsort
SELECT col2 + 77 FROM tab2 AS cor0
----
103
104
115

query I rowsort
SELECT + col2 - - col1 AS col2 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3961
SELECT col2 - CAST( - col2 AS SIGNED ) FROM tab1 cor0
----
108
114
192

skipif mysql # not compatible
query I rowsort label-3961
SELECT col2 - CAST ( - col2 AS INTEGER ) FROM tab1 cor0
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-3962
SELECT ALL col1 DIV col1 + col2 AS col2 FROM tab2
----
27
28
39

skipif mysql # not compatible
query I rowsort label-3962
SELECT ALL col1 / col1 + col2 AS col2 FROM tab2
----
27
28
39

query I rowsort
SELECT - cor0.col2 + - ( - col0 + + cor0.col1 ) AS col2 FROM tab1 AS cor0
----
-29
-3
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-3964
SELECT + col1 DIV ( + col2 ) + - col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-3964
SELECT + col1 / ( + col2 ) + - col2 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3965
SELECT - cor0.col2 + col0 DIV - col0 AS col0 FROM tab0 cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-3965
SELECT - cor0.col2 + col0 / - col0 AS col0 FROM tab0 cor0
----
-2
-34
-83

query I rowsort
SELECT ALL + ( + col1 ) * col0 + col1 * - 73 FROM tab2 AS cor0
----
-2046
102
295

query I rowsort
SELECT + - 81 FROM tab2, tab1 AS cor0
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

query I rowsort
SELECT cor1.col1 AS col2 FROM tab2, tab2 cor0, tab0 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT 82 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 99920d9f7cd9cdccef99cfa459ae6944

query I rowsort
SELECT ALL - col2 + - col1 * 36 + col1 FROM tab0
----
-3043
-3267
-3396

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3971
SELECT - tab1.col0 * col2 * CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3971
SELECT - tab1.col0 * col2 * CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - ( - col2 ) * - col2 + - col2 AS col2 FROM tab2 cor0
----
-1482
-702
-756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - cor0.col1 + - col0 col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT col1 * col0 - col0 AS col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT 98 + 50 AS col2 FROM tab0 AS cor0
----
148
148
148

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 33 * col1 + col0 * - 60 col1 FROM tab1 AS cor0
----
-3510
-4371
678

query I rowsort
SELECT DISTINCT col2 + 68 FROM tab0 AS cor0
----
101
150
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-3978
SELECT - col0 - col1 DIV col0 AS col1 FROM tab2 AS cor0
----
-11
-78
-79

skipif mysql # not compatible
query I rowsort label-3978
SELECT - col0 - col1 / col0 AS col1 FROM tab2 AS cor0
----
-11
-78
-79

query I rowsort
SELECT - 19 FROM tab2, tab0 AS cor0, tab1 cor1
----
27 values hashing to 0fbbff28a7b63c37b01cf369f9325662

query I rowsort
SELECT ALL + 44 AS col2 FROM tab1 cor0
----
44
44
44

query I rowsort
SELECT DISTINCT + + col2 * + col0 * cor0.col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT + cor0.col0 + + cor0.col0 * + col1 + - col1 FROM tab2 AS cor0
----
1405
193
4621

query I rowsort
SELECT ALL col0 + + col0 * + 90 FROM tab0
----
2184
3185
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3984
SELECT col1 DIV + col2 + ( - col2 ) FROM tab0 cor0
----
-31
-81
96

skipif mysql # not compatible
query I rowsort label-3984
SELECT col1 / + col2 + ( - col2 ) FROM tab0 cor0
----
-31
-81
96

query I rowsort
SELECT ALL - - col2 + + col1 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL + cor0.col1 * cor0.col2 FROM tab1 cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 89 col1 FROM tab0 AS cor0
----
-89

query I rowsort
SELECT - cor0.col2 * + col0 AS col1 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col1 - - ( + col0 * col0 ) AS col2 FROM tab2
----
6143
6258
80

query I rowsort
SELECT DISTINCT - col1 * cor0.col2 + + 3 + - col0 AS col0 FROM tab0 AS cor0
----
-129
-2859
-7548

query I rowsort
SELECT + col0 + - cor0.col2 * col2 * col0 FROM tab0 AS cor0
----
-26112
-598347
0

query I rowsort
SELECT ALL + col0 - ( - 31 ) FROM tab0 cor0
----
120
55
66

query I rowsort
SELECT ALL + col1 * 30 AS col2 FROM tab0 AS cor0
----
2580
2730
2910

query I rowsort
SELECT + 48 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT DISTINCT - + col0 - 42 * col1 AS col2 FROM tab0 AS cor0
----
-3636
-3911
-4109

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 56 * - col2 col2 FROM tab0 AS cor0
----
-1848
-4592
-56

query I rowsort
SELECT ALL - - ( - col0 ) + - col2 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT - col1 * + col2 + + col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL + ( col0 ) - - cor0.col1 AS col0 FROM tab0 AS cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + - col1 col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL - - ( + cor0.col1 ) * + col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - + 12 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-11
21
70

query I rowsort
SELECT col2 * - col0 - - cor0.col0 FROM tab1 AS cor0
----
-159
-3584
-7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4004
SELECT - CAST( NULL AS DECIMAL ) / ( - col0 ) + col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4004
SELECT - CAST ( NULL AS REAL ) / ( - col0 ) + col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 49 * + col0 FROM tab1 cor0
----
-147
-3136
-3920

query I rowsort
SELECT 78 * - col1 * col1 + + col0 - + col1 AS col1 FROM tab0 cor0
----
-576950
-645920
-733964

query I rowsort
SELECT DISTINCT - - col0 * - col1 AS col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - + 84 * 70 AS col0 FROM tab1 AS cor0
----
-5880
-5880
-5880

query I rowsort
SELECT ALL 63 * 80 FROM tab2 AS cor0
----
5040
5040
5040

query I rowsort
SELECT ALL - col1 - - ( + col0 ) FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - cor2.col2 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to c569638e8a09ff819458d62ddbde994c

query I rowsort
SELECT DISTINCT - col0 + 21 AS col1 FROM tab0 AS cor0
----
-14
-3
-68

query I rowsort
SELECT - 48 * - col0 AS col2 FROM tab2 AS cor0
----
336
3744
3792

query I rowsort
SELECT ALL ( col0 ) * + col1 + ( col0 ) - + col1 FROM tab1 cor0
----
1107
55
694

query I rowsort
SELECT - + 86 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-2064
-3010
-7654

query I rowsort
SELECT ALL + 79 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

query I rowsort
SELECT DISTINCT - tab1.col1 - + col1 AS col0 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT col2 * col1 + - tab2.col0 + + ( - col2 ) * + col2 * ( - col0 + - col0 ) FROM tab2
----
106912
11036
228719

query I rowsort
SELECT + 3 + col2 FROM tab2
----
29
30
41

query I rowsort
SELECT + tab2.col2 * - col2 + col0 + ( + ( + tab2.col2 ) + - col1 * col0 ) FROM tab2
----
-2670
-5174
-912

query I rowsort
SELECT - cor0.col2 - cor0.col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT + 78 - - cor0.col0 FROM tab0 AS cor0
----
102
113
167

query I rowsort
SELECT DISTINCT - col2 * - 68 * col1 - + col1 AS col0 FROM tab1
----
38750
84851
95446

query I rowsort
SELECT ALL - 61 FROM tab0, tab1 AS cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 27 col2 FROM tab1
----
27
27
27

query I rowsort
SELECT DISTINCT + 30 FROM tab0, tab1 AS cor0
----
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-4027
SELECT DISTINCT col1 DIV + col2 + - tab0.col0 FROM tab0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-4027
SELECT DISTINCT col1 / + col2 + - tab0.col0 FROM tab0
----
-22
-88
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4028
SELECT + col1 + - col2 DIV col2 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-4028
SELECT + col1 + - col2 / col2 FROM tab1
----
12
25
9

query I rowsort
SELECT DISTINCT col0 * - 18 AS col0 FROM tab1 AS cor0
----
-1152
-1440
-54

query I rowsort
SELECT ALL + col2 + ( - col1 + - col1 ) AS col2 FROM tab1 AS cor0
----
2
37
70

query I rowsort
SELECT ALL + col0 * - col2 + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT - cor0.col0 + - col0 AS col2 FROM tab0 cor0
----
-178
-48
-70

query I rowsort
SELECT DISTINCT + + col1 + 51 * 99 * + col2 - + 29 FROM tab2 AS cor0
----
131304
136325
191850

query I rowsort
SELECT + 20 * + col2 AS col1 FROM tab0
----
1640
20
660

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4035
SELECT ALL CAST( NULL AS SIGNED ) * - 21 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4035
SELECT ALL CAST ( NULL AS INTEGER ) * - 21 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL - col2 + + col1 + + col0 AS col0 FROM tab1
----
-25
-3
17

query I rowsort
SELECT DISTINCT tab1.col0 * col1 + + col0 AS col1 FROM tab1
----
1120
704
81

query I rowsort
SELECT DISTINCT - 30 + - col1 * - 62 + - col2 FROM tab0
----
5269
5530
5983

query I rowsort
SELECT 38 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

query I rowsort
SELECT ALL - + col0 * ( + 42 + col2 ) AS col2 FROM tab0 AS cor0
----
-11036
-1505
-1800

query I rowsort
SELECT col2 + + col0 + cor0.col1 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT ALL + - cor0.col1 * col2 * col1 FROM tab2 AS cor0
----
-10982
-25947
-90506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4043
SELECT DISTINCT + col2 + CAST( 23 AS SIGNED ) FROM tab1 AS cor0
----
119
77
80

skipif mysql # not compatible
query I rowsort label-4043
SELECT DISTINCT + col2 + CAST ( 23 AS INTEGER ) FROM tab1 AS cor0
----
119
77
80

query I rowsort
SELECT col2 * 57 FROM tab0 AS cor0
----
1881
4674
57

query I rowsort
SELECT cor0.col1 + - 53 AS col2 FROM tab2 cor0
----
-22
-36
6

query I rowsort
SELECT DISTINCT + col0 * 65 AS col2 FROM tab1 AS cor0
----
195
4160
5200

query I rowsort
SELECT - ( cor0.col2 ) * - ( cor0.col2 ) FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4048
SELECT col1 + col1 * CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4048
SELECT col1 + col1 * CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * - cor0.col2 + + ( - col2 ) FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT + + 54 + - cor0.col2 FROM tab0 AS cor0
----
-28
21
53

query I rowsort
SELECT col0 * - 53 AS col1 FROM tab1
----
-159
-3392
-4240

query I rowsort
SELECT ALL 25 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4053
SELECT ALL + 43 DIV col1 AS col2 FROM tab1
----
1
3
4

skipif mysql # not compatible
query I rowsort label-4053
SELECT ALL + 43 / col1 AS col2 FROM tab1
----
1
3
4

query I rowsort
SELECT DISTINCT 27 + - tab0.col2 FROM tab0
----
-55
-6
26

query I rowsort
SELECT + tab1.col0 AS col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4056
SELECT ALL CAST( + 17 AS SIGNED ) + col2 * 20 FROM tab0
----
1657
37
677

skipif mysql # not compatible
query I rowsort label-4056
SELECT ALL CAST ( + 17 AS INTEGER ) + col2 * 20 FROM tab0
----
1657
37
677

query I rowsort
SELECT ( - 60 ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

query I rowsort
SELECT + - cor0.col2 * - col0 + - cor0.col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT + cor0.col0 + + col0 AS col1 FROM tab2 AS cor0
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col2 * + col2 col0 FROM tab2 AS cor0
----
1461
735
760

onlyif mysql # use DIV operator for integer division
query I rowsort label-4061
SELECT - ( cor0.col0 ) DIV + ( - 28 ) + col0 FROM tab1 AS cor0
----
3
66
82

skipif mysql # not compatible
query I rowsort label-4061
SELECT - ( cor0.col0 ) / + ( - 28 ) + col0 FROM tab1 AS cor0
----
3
66
82

query I rowsort
SELECT ALL + col0 * + col1 AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL - 37 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to ed4644af7729c2425ea6cc3d84c6504f

query I rowsort
SELECT 40 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col2 col2 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + col1 * 86 FROM tab0 AS cor0
----
7396
7826
8342

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4067
SELECT DISTINCT - col2 + CAST( + ( col0 ) * + col1 AS SIGNED ) + 58 AS col0 FROM tab0 AS cor0
----
2089
3452
8075

skipif mysql # not compatible
query I rowsort label-4067
SELECT DISTINCT - col2 + CAST ( + ( col0 ) * + col1 AS INTEGER ) + 58 AS col0 FROM tab0 AS cor0
----
2089
3452
8075

query I rowsort
SELECT ALL - cor0.col0 * 91 - + col1 * col2 FROM tab0 AS cor0
----
-15561
-3282
-5022

query I rowsort
SELECT ALL + col0 + - ( - col0 ) * col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL 39 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

query I rowsort
SELECT + 13 + + col1 * col1 FROM tab0 AS cor0
----
7409
8294
9422

query I rowsort
SELECT DISTINCT + col1 * - 30 * + col2 AS col2 FROM tab2 cor0
----
-19380
-25110
-46020

onlyif mysql # use DIV operator for integer division
query I rowsort label-4073
SELECT ALL - - 9 DIV col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4073
SELECT ALL - - 9 / col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4074
SELECT - cor0.col2 + col1 DIV + col2 FROM tab0 cor0
----
-31
-81
96

skipif mysql # not compatible
query I rowsort label-4074
SELECT - cor0.col2 + col1 / + col2 FROM tab0 cor0
----
-31
-81
96

query I rowsort
SELECT DISTINCT - col1 * 42 FROM tab1
----
-1092
-420
-546

query I rowsort
SELECT col0 * + ( col2 ) AS col2 FROM tab0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 70 col1 FROM tab0 AS cor0
----
70
70
70

query I rowsort
SELECT + 35 + - col0 AS col2 FROM tab0 AS cor0
----
-54
0
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-4079
SELECT - 94 DIV - col1 AS col1 FROM tab1 AS cor0
----
3
7
9

skipif mysql # not compatible
query I rowsort label-4079
SELECT - 94 / - col1 AS col1 FROM tab1 AS cor0
----
3
7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4080
SELECT 47 DIV col2 FROM tab0
----
0
1
47

skipif mysql # not compatible
query I rowsort label-4080
SELECT 47 / col2 FROM tab0
----
0
1
47

query I rowsort
SELECT 3 * col0 AS col1 FROM tab2
----
21
234
237

query I rowsort
SELECT + + col1 * + 76 FROM tab0 AS cor0
----
6536
6916
7372

query I rowsort
SELECT + - ( - ( + col1 ) ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ( + 19 ) * + col0 FROM tab2 AS cor0
----
133
1482
1501

query I rowsort
SELECT 30 + - col1 AS col2 FROM tab2 AS cor0
----
-1
-29
13

query I rowsort
SELECT - col2 - col2 * col0 * col2 FROM tab2 cor0
----
-114114
-5130
-52754

query I rowsort
SELECT 13 * + 38 AS col2 FROM tab0
----
494
494
494

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL + col0 * + col1 AS col2 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL 38 AS col1 FROM tab1
----
38
38
38

query I rowsort
SELECT - + col2 + + 71 FROM tab1 AS cor0
----
-25
14
17

query I rowsort
SELECT + tab2.col1 + 73 FROM tab2
----
104
132
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4093
SELECT + ( 62 ) DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4093
SELECT + ( 62 ) / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col1 * + 3 AS col0 FROM tab2 AS cor0
----
177
51
93

query I rowsort
SELECT 87 + + ( + col2 ) AS col2 FROM tab2 AS cor0
----
113
114
125

query I rowsort
SELECT DISTINCT col0 * + 51 FROM tab2
----
357
3978
4029

query I rowsort
SELECT ALL - col0 + - col2 AS col1 FROM tab1 cor0
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4098
SELECT - 13 DIV - cor0.col1 col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4098
SELECT - 13 / - cor0.col1 col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT col2 + ( + 78 ) + - col2 AS col0 FROM tab2
----
78
78
78

query I rowsort
SELECT - col2 + col2 - + col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col1 + - col0 * col1 * col1 FROM tab0
----
-177418
-329218
-736918

query I rowsort
SELECT + col0 * - 97 + ( + col0 ) - - ( - 33 + - col2 * col0 ) AS col2 FROM tab1 AS cor0
----
-15393
-483
-9825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4103
SELECT DISTINCT ( cor0.col1 ) + cor0.col2 + + CAST( 61 AS SIGNED ) FROM tab1, tab0, tab1 AS cor0
----
128
141
170

skipif mysql # not compatible
query I rowsort label-4103
SELECT DISTINCT ( cor0.col1 ) + cor0.col2 + + CAST ( 61 AS INTEGER ) FROM tab1, tab0, tab1 AS cor0
----
128
141
170

query I rowsort
SELECT col0 * + ( col2 ) AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - - 8 AS col0 FROM tab2 AS cor0
----
8
8
8

query I rowsort
SELECT 37 * - col1 FROM tab1 AS cor0
----
-370
-481
-962

onlyif mysql # use DIV operator for integer division
query I rowsort label-4107
SELECT ALL cor0.col2 DIV col2 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4107
SELECT ALL cor0.col2 / col2 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT 57 * - col2 FROM tab0 AS cor0
----
-1881
-4674
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4109
SELECT DISTINCT + + 68 * col0 + - 22 DIV col1 FROM tab0 AS cor0
----
1632
2380
6052

skipif mysql # not compatible
query I rowsort label-4109
SELECT DISTINCT + + 68 * col0 + - 22 / col1 FROM tab0 AS cor0
----
1632
2380
6052

query I rowsort
SELECT + 93 * col2 AS col0 FROM tab1 AS cor0
----
5022
5301
8928

query I rowsort
SELECT DISTINCT col2 + - col2 * + col0 AS col1 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-4112
SELECT + 3 DIV col2 col2 FROM tab0 AS cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4112
SELECT + 3 / col2 col2 FROM tab0 AS cor0
----
0
0
3

query I rowsort
SELECT ALL + 92 * + col1 AS col1 FROM tab2 cor0
----
1564
2852
5428

onlyif mysql # use DIV operator for integer division
query I rowsort label-4114
SELECT ALL col2 DIV col2 + col1 AS col2 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-4114
SELECT ALL col2 / col2 + col1 AS col2 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT ALL - + 35 * - col1 FROM tab0 AS cor0
----
3010
3185
3395

onlyif mysql # use DIV operator for integer division
query I rowsort label-4116
SELECT DISTINCT 89 DIV + cor0.col2 AS col1 FROM tab0 AS cor0
----
1
2
89

skipif mysql # not compatible
query I rowsort label-4116
SELECT DISTINCT 89 / + cor0.col2 AS col1 FROM tab0 AS cor0
----
1
2
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( cor0.col0 ) col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT 19 * - col0 AS col1 FROM tab0
----
-1691
-456
-665

query I rowsort
SELECT ALL + cor0.col0 * - col2 + 31 AS col1 FROM tab2 cor0
----
-158
-1997
-2971

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0, tab1 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 1c1b1a313871216b88e662d7d3078b12

query I rowsort
SELECT DISTINCT - col2 * col2 * ( col0 ) AS col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-4122
SELECT ALL - + 94 DIV - col1 AS col0 FROM tab1 AS cor0
----
3
7
9

skipif mysql # not compatible
query I rowsort label-4122
SELECT ALL - + 94 / - col1 AS col0 FROM tab1 AS cor0
----
3
7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + tab0.col0 col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT + 45 + - 83 FROM tab2, tab1 AS cor0, tab2 cor1
----
-38

query I rowsort
SELECT ALL + cor0.col0 - - col2 * + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT + - 80 + - col2 FROM tab2 AS cor0
----
-106
-107
-118

onlyif mysql # use DIV operator for integer division
query I rowsort label-4127
SELECT ALL - 32 + 36 DIV - cor1.col2 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0, tab0 cor2
----
243 values hashing to d9fd2e91495773df58bea6b9a2a13d6a

skipif mysql # not compatible
query I rowsort label-4127
SELECT ALL - 32 + 36 / - cor1.col2 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0, tab0 cor2
----
243 values hashing to d9fd2e91495773df58bea6b9a2a13d6a

onlyif mysql # use DIV operator for integer division
query I rowsort label-4128
SELECT DISTINCT - + 43 + + col0 DIV + 2 AS col2 FROM tab0 AS cor0
----
-26
-31
1

skipif mysql # not compatible
query I rowsort label-4128
SELECT DISTINCT - + 43 + + col0 / + 2 AS col2 FROM tab0 AS cor0
----
-26
-31
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col0 col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT - col0 * col1 + col2 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
-1267
-163
-4550

query I rowsort
SELECT DISTINCT + + col1 + + col0 * col0 AS col2 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT + cor0.col1 * col1 + + col2 AS col1 FROM tab0 AS cor0
----
7429
8363
9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * cor0.col0 col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + - col1 * + col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - 10 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT DISTINCT - col1 + + cor0.col2 * - col2 * - col1 - - col0 FROM tab1 AS cor0
----
119875
32544
75793

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4137
SELECT ALL - CAST( NULL AS DECIMAL ) + + 1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4137
SELECT ALL - CAST ( NULL AS REAL ) + + 1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col2 + 93 * + cor0.col0 FROM tab2 AS cor0
----
678
7280
7385

query I rowsort
SELECT DISTINCT + - col0 * - col1 + + col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL - - ( 9 ) * - col2 + + col2 - col0 AS col1 FROM tab1 AS cor0
----
-435
-520
-848

query I rowsort
SELECT col1 + 17 FROM tab2 AS cor0
----
34
48
76

query I rowsort
SELECT ALL + - 38 * cor0.col1 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
-25688
-3800
-6422

query I rowsort
SELECT ALL - col1 + + cor0.col2 * col1 - + col1 AS col1 FROM tab2 AS cor0
----
1416
612
775

query I rowsort
SELECT - ( + col2 ) * - cor0.col2 + col0 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL col2 * - col1 + col0 * + cor0.col2 FROM tab1 AS cor0
----
-1242
3078
6432

query I rowsort
SELECT + - cor0.col0 + col2 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + tab2.col1 + 51 * - col1 - tab2.col2 AS col2 FROM tab2
----
-1577
-2976
-888

onlyif mysql # use DIV operator for integer division
query I rowsort label-4148
SELECT - tab1.col0 DIV 43 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-4148
SELECT - tab1.col0 / 43 FROM tab1
----
-1
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4149
SELECT DISTINCT col2 + CAST( NULL AS SIGNED ) * col0 / - col1 - 24 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4149
SELECT DISTINCT col2 + CAST ( NULL AS INTEGER ) * col0 / - col1 - 24 FROM tab0
----
NULL

query I rowsort
SELECT + ( + col1 ) - col1 * col0 AS col0 FROM tab2 cor0
----
-1326
-186
-4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-4151
SELECT ALL ( col2 ) DIV col0 AS col2 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-4151
SELECT ALL ( col2 ) / col0 AS col2 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT DISTINCT - 39 AS col1 FROM tab2, tab2 AS cor0 CROSS JOIN tab1, tab0 cor1
----
-39

query I rowsort
SELECT + col1 * - col1 * col1 - - tab2.col1 FROM tab2
----
-205320
-29760
-4896

query I rowsort
SELECT DISTINCT col1 * + cor0.col1 + col2 * + col2 AS col1 FROM tab2 cor0
----
1690
1733
4157

query I rowsort
SELECT - - cor0.col2 + - 34 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 29460fd5a2f997098ff032cab5b8d598

query I rowsort
SELECT ALL - ( + col1 ) * + cor0.col1 * col1 FROM tab1 cor0
----
-1000
-17576
-2197

query I rowsort
SELECT + ( + col1 ) AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 * - 13 AS col2 FROM tab2, tab0 AS cor0
----
1246
336
490

query I rowsort
SELECT + cor0.col0 * - col2 + - col0 FROM tab0 AS cor0
----
-70
-7387
-816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col0 - + col1 col1 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT + col0 * + col1 * + tab0.col1 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT - col2 - - col0 * + col1 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT + col1 + + col0 * + col1 + + col2 * + col0 * + col0 FROM tab0 AS cor0
----
21158
4717
657712

query I rowsort
SELECT DISTINCT - col2 * tab2.col2 + - col0 * tab2.col0 FROM tab2
----
-6760
-7685
-778

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE ( col1 ) <= ( NULL ) OR NULL >= NULL
----

query I rowsort
SELECT - col0 * + col0 + col0 FROM tab2 AS cor0
----
-42
-6006
-6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-4167
SELECT + + col1 * col2 DIV + cor0.col1 + col2 * + col2 AS col0 FROM tab0 AS cor0
----
1122
2
6806

skipif mysql # not compatible
query I rowsort label-4167
SELECT + + col1 * col2 / + cor0.col1 + col2 * + col2 AS col0 FROM tab0 AS cor0
----
1122
2
6806

query III rowsort
SELECT * FROM tab1 WHERE NOT tab1.col2 * - col2 BETWEEN NULL AND NULL AND NOT - col2 > NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col0 * - tab1.col1 col2 FROM tab1
----
1120
704
81

query I rowsort
SELECT - col1 * col1 * - cor0.col1 FROM tab2 AS cor0
----
205379
29791
4913

query I rowsort
SELECT - - col1 * cor0.col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT col1 * - col0 * - col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT ALL + + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT - col0 * - col1 - col1 FROM tab0 cor0
----
1978
3298
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) * col1 col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL cor0.col2 * + col0 * - col2 + col2 FROM tab0 AS cor0
----
-26103
-34
-598354

query I rowsort
SELECT + + 80 + - col2 * col1 AS col0 FROM tab0 AS cor0
----
-17
-2758
-7382

query I rowsort
SELECT - col0 AS col1 FROM tab0 WHERE NOT ( + col0 ) = col1
----
-24
-35
-89

query I rowsort
SELECT tab2.col1 + - col1 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 + col1 * col0 AS col0 FROM tab2
----
1264
210
4524

query I rowsort
SELECT DISTINCT col2 - tab1.col1 FROM tab1
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col2 col0 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL col2 FROM tab1 WHERE ( NULL ) BETWEEN NULL AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT ( NULL ) > col2 * + col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 / col2 col1 FROM tab0 WHERE NOT NULL NOT IN ( - col2 * + col0 + col1 * col0 )
----

query I rowsort
SELECT DISTINCT col2 * - tab1.col0 * col1 + tab1.col2 FROM tab1
----
-36423
-4158
-99744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 * col0 * col0 col2 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT ALL tab2.col1 + - tab2.col1 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT - col1 + col0 * + col2 FROM tab0
----
-62
706
7207

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL NOT IN ( - col2 + col0 )
----

query I rowsort
SELECT + col1 + + tab1.col1 AS col2 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT col0 * col2 * + col0 + - col1 AS col2 FROM tab0
----
1128
18922
649431

query I rowsort
SELECT ALL + tab1.col2 AS col2 FROM tab1 WHERE NULL BETWEEN col1 + + col0 * + col0 AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4194
SELECT - col2 + tab1.col2 DIV - col1 AS col2 FROM tab1
----
-103
-56
-62

skipif mysql # not compatible
query I rowsort label-4194
SELECT - col2 + tab1.col2 / - col1 AS col2 FROM tab1
----
-103
-56
-62

query I rowsort
SELECT ALL col2 * + col2 + + col0 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT ALL - col2 + - col1 AS col1 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT + col2 FROM tab1 WHERE NOT col1 * col1 BETWEEN col2 * - col1 AND col1 / col1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - col1 col2 FROM tab1
----
0

query I rowsort
SELECT col0 - cor0.col0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 * col1 AS col0 FROM tab0 AS cor0 WHERE - col2 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT - col0 + - col0 + col1 * - col1 AS col0 FROM tab1 AS cor0
----
-228
-329
-682

query I rowsort
SELECT - col2 + + col0 + cor0.col1 * col0 FROM tab1 AS cor0
----
1024
27
647

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col2 FROM tab1 WHERE NOT ( NULL ) NOT IN ( col2 - - col0 )
----

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT NULL <= ( - col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4205
SELECT ALL cor0.col2 DIV col1 + col1 AS col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4205
SELECT ALL cor0.col2 / col1 + col1 AS col0 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 68 col1 FROM tab2 AS cor0
----
-68
-68
-68

query I rowsort
SELECT ALL - + col0 * + 67 - col1 AS col2 FROM tab0 cor0
----
-1694
-2442
-6054

query I rowsort
SELECT ALL 26 + col1 - + col0 * col2 AS col0 FROM tab2 AS cor0
----
-132
-1943
-2959

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4209
SELECT DISTINCT CAST( - col2 AS SIGNED ) + + col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4209
SELECT DISTINCT CAST ( - col2 AS INTEGER ) + + col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + - col2 + + col0 AS col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT - cor0.col0 + col1 * + col1 FROM tab0 AS cor0
----
7372
8192
9374

query I rowsort
SELECT DISTINCT + - cor0.col0 + - 30 AS col0 FROM tab2 AS cor0
----
-108
-109
-37

query I rowsort
SELECT col0 * + ( + col2 ) AS col1 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4214
SELECT ALL + tab0.col2 DIV + col2 + 80 AS col1 FROM tab0
----
81
81
81

skipif mysql # not compatible
query I rowsort label-4214
SELECT ALL + tab0.col2 / + col2 + 80 AS col1 FROM tab0
----
81
81
81

query I rowsort
SELECT DISTINCT + 21 * + col1 FROM tab0 AS cor0
----
1806
1911
2037

query I rowsort
SELECT - - 81 FROM tab0 AS cor0
----
81
81
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4217
SELECT ALL - - 91 DIV + col2 + col2 FROM tab1 AS cor0
----
55
58
96

skipif mysql # not compatible
query I rowsort label-4217
SELECT ALL - - 91 / + col2 + col2 FROM tab1 AS cor0
----
55
58
96

query I rowsort
SELECT DISTINCT - 24 - ( col2 + col2 * 24 ) AS col0 FROM tab2 AS cor0
----
-674
-699
-974

onlyif mysql # use DIV operator for integer division
query I rowsort label-4219
SELECT cor0.col2 DIV + 58 + col1 * 75 FROM tab1 AS cor0
----
1950
750
976

skipif mysql # not compatible
query I rowsort label-4219
SELECT cor0.col2 / + 58 + col1 * 75 FROM tab1 AS cor0
----
1950
750
976

query I rowsort
SELECT DISTINCT - - col0 * - 98 + col0 FROM tab0 AS cor0
----
-2328
-3395
-8633

query I rowsort
SELECT ALL col0 + col0 * cor0.col0 FROM tab1 AS cor0
----
12
4160
6480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4222
SELECT + CAST( NULL AS SIGNED ) - - tab1.col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4222
SELECT + CAST ( NULL AS INTEGER ) - - tab1.col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab1.col0 * - ( - col0 ) FROM tab1
----
4096
6400
9

query I rowsort
SELECT - col1 + - col2 AS col0 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT - 2 FROM tab0 cor0
----
-2

query I rowsort
SELECT ALL - 24 + - col2 FROM tab0 AS cor0
----
-106
-25
-57

query I rowsort
SELECT - col1 + col1 * - col0 AS col2 FROM tab0
----
-2150
-3492
-8190

query I rowsort
SELECT DISTINCT - col0 + cor0.col0 * + ( col1 + col2 ) * col0 FROM tab1 cor0
----
274368
697520
717

query I rowsort
SELECT + + cor0.col1 * ( col2 ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + col2 * col2 AS col1 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT ALL + col2 + 46 FROM tab0 AS cor0
----
128
47
79

query I rowsort
SELECT ALL + col1 * + tab2.col0 - + col0 AS col1 FROM tab2
----
1264
210
4524

query I rowsort
SELECT ALL + col1 * - col2 AS col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL tab2.col0 * - ( col2 ) + col0 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT 38 * + 39 FROM tab2, tab0 AS cor0
----
9 values hashing to 952d11f807d45303768cb2e0aafbabbe

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4236
SELECT ALL + CAST( 26 AS SIGNED ) FROM tab2, tab0 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

skipif mysql # not compatible
query I rowsort label-4236
SELECT ALL + CAST ( 26 AS INTEGER ) FROM tab2, tab0 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT 59 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT DISTINCT - + col0 * 8 FROM tab1 AS cor0
----
-24
-512
-640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * col0 col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL col0 * ( - tab0.col1 ) + col2 AS col1 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT - col1 + col1 * - col0 AS col0 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT col1 + - 64 FROM tab2
----
-33
-47
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL col0 * + ( col0 ) * + col0 AS col2 FROM tab1 AS cor0
----
262144
27
512000

query I rowsort
SELECT ALL - + col2 + col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4246
SELECT DISTINCT cor0.col1 + + col0 DIV col0 AS col2 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-4246
SELECT DISTINCT cor0.col1 + + col0 / col0 AS col2 FROM tab2 AS cor0
----
18
32
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4247
SELECT ALL + cor0.col0 + - CAST( NULL AS SIGNED ) * 44 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4247
SELECT ALL + cor0.col0 + - CAST ( NULL AS INTEGER ) * 44 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4248
SELECT DISTINCT col1 + 78 DIV ( + col2 ) + - tab1.col1 AS col2 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-4248
SELECT DISTINCT col1 + 78 / ( + col2 ) + - tab1.col1 AS col2 FROM tab1
----
0
1

query I rowsort
SELECT 94 FROM tab1, tab1 cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT DISTINCT 7 FROM tab0, tab2 cor0
----
7

query I rowsort
SELECT DISTINCT - 86 + - col2 AS col1 FROM tab2 AS cor0
----
-112
-113
-124

query I rowsort
SELECT ALL + ( + cor0.col1 ) + col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT + 15 * 36 * col2 FROM tab2 cor0
----
14040
14580
20520

query I rowsort
SELECT DISTINCT - + 45 * + 92 FROM tab1 AS cor0
----
-4140

query I rowsort
SELECT - ( 2 ) * col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT + ( + col1 ) * col1 FROM tab1
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4257
SELECT - CAST( 80 AS SIGNED ) AS col1 FROM tab0
----
-80
-80
-80

skipif mysql # not compatible
query I rowsort label-4257
SELECT - CAST ( 80 AS INTEGER ) AS col1 FROM tab0
----
-80
-80
-80

query I rowsort
SELECT + 83 * col2 + + cor0.col0 FROM tab1 AS cor0
----
4485
4795
8048

query I rowsort
SELECT ALL - cor0.col0 FROM tab1, tab0 cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

onlyif mysql # use DIV operator for integer division
query I rowsort label-4260
SELECT 35 DIV + 69 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4260
SELECT 35 / + 69 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - col0 col2 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - cor0.col2 + - col2 * - cor0.col2 FROM tab1 cor0
----
2862
3192
9120

query I rowsort
SELECT + 81 + + col1 FROM tab1
----
107
91
94

query I rowsort
SELECT 12 * - tab2.col2 + - 79 AS col0 FROM tab2
----
-391
-403
-535

query I rowsort
SELECT ALL + 49 + + cor0.col2 AS col1 FROM tab1 cor0
----
103
106
145

query I rowsort
SELECT ALL 89 + col2 * + tab1.col1 AS col2 FROM tab1
----
1337
1493
659

query I rowsort
SELECT DISTINCT + col1 + col0 * col1 AS col1 FROM tab0 cor0
----
2150
3492
8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4268
SELECT ALL - ( col0 ) * - CAST( col0 AS SIGNED ) + col1 + - col2 FROM tab2 AS cor0
----
53
6117
6220

skipif mysql # not compatible
query I rowsort label-4268
SELECT ALL - ( col0 ) * - CAST ( col0 AS INTEGER ) + col1 + - col2 FROM tab2 AS cor0
----
53
6117
6220

query I rowsort
SELECT DISTINCT 37 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-4270
SELECT - col1 + cor0.col1 DIV - ( col0 ) FROM tab1 AS cor0
----
-10
-13
-34

skipif mysql # not compatible
query I rowsort label-4270
SELECT - col1 + cor0.col1 / - ( col0 ) FROM tab1 AS cor0
----
-10
-13
-34

query I rowsort
SELECT DISTINCT - col0 + + cor0.col2 + + col1 * - col0 FROM tab1 AS cor0
----
-1024
-27
-647

query I rowsort
SELECT + col1 + 88 AS col1 FROM tab0 AS cor0
----
174
179
185

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + 18 col2 FROM tab1 AS cor0
----
180
234
468

onlyif mysql # use DIV operator for integer division
query I rowsort label-4274
SELECT DISTINCT - - col0 DIV + ( + col0 ) FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4274
SELECT DISTINCT - - col0 / + ( + col0 ) FROM tab2 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * - 24 col2 FROM tab2 AS cor0
----
168
1872
1896

onlyif mysql # use DIV operator for integer division
query I rowsort label-4276
SELECT col0 DIV 54 AS col0 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4276
SELECT col0 / 54 AS col0 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT ALL + cor0.col2 + - col2 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col1 - + 93 * col2 AS col2 FROM tab2 AS cor0
----
-2359
-2480
-3517

query I rowsort
SELECT DISTINCT - col0 * col1 AS col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT col0 + col2 * 76 * cor0.col0 FROM tab1 AS cor0
----
12315
277312
583760

query I rowsort
SELECT ALL + col0 + 19 * 19 AS col0 FROM tab1 AS cor0
----
364
425
441

query I rowsort
SELECT DISTINCT col1 * + tab1.col1 - - ( col0 ) * col0 * col0 AS col2 FROM tab1
----
262244
512169
703

query I rowsort
SELECT + col0 + + col1 * col2 + 59 FROM tab0
----
191
2921
7610

query I rowsort
SELECT 14 + - col0 + - tab1.col0 AS col2 FROM tab1
----
-114
-146
8

query I rowsort
SELECT col0 * col2 * col1 AS col1 FROM tab2 cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-4286
SELECT col0 DIV 74 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4286
SELECT col0 / 74 FROM tab1 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4287
SELECT DISTINCT + + col1 * col1 DIV ( col2 * col2 ) + - CAST( + col0 AS SIGNED ) * - col0 + 45 col2 FROM tab0 AS cor0
----
10679
627
7967

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4287
SELECT DISTINCT + + col1 * col1 / ( col2 * col2 ) + - CAST ( + col0 AS INTEGER ) * - col0 + 45 col2 FROM tab0 AS cor0
----
10679
627
7967

query I rowsort
SELECT - + 19 * col2 AS col0 FROM tab0 AS cor0
----
-1558
-19
-627

query I rowsort
SELECT DISTINCT + + col2 * - col0 + + col0 * cor0.col0 FROM tab1 AS cor0
----
-1280
-153
448

onlyif mysql # use DIV operator for integer division
query I rowsort label-4290
SELECT + col1 DIV + 68 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4290
SELECT + col1 / + 68 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * 69 col1 FROM tab1 AS cor0
----
-1794
-690
-897

onlyif mysql # use DIV operator for integer division
query I rowsort label-4292
SELECT - - col2 * col2 DIV col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4292
SELECT - - col2 * col2 / col2 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4293
SELECT - col0 DIV + cor0.col2 AS col0 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4293
SELECT - col0 / + cor0.col2 AS col0 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT col2 * + tab1.col2 + - ( tab1.col2 ) * + col1 FROM tab1
----
1512
2679
7968

query I rowsort
SELECT + 63 * col2 * - cor0.col1 + + col2 AS col0 FROM tab0 AS cor0
----
-178761
-470024
-6110

query I rowsort
SELECT ALL + col2 * 30 + col0 FROM tab2 cor0
----
1219
817
858

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4297
SELECT + CAST( - col1 AS SIGNED ) + + col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4297
SELECT + CAST ( - col1 AS INTEGER ) + + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + col2 + + col1 * col1 AS col2 FROM tab0 AS cor0
----
7429
8363
9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-4299
SELECT 72 + - col0 DIV - col0 FROM tab0 AS cor0
----
73
73
73

skipif mysql # not compatible
query I rowsort label-4299
SELECT 72 + - col0 / - col0 FROM tab0 AS cor0
----
73
73
73

query I rowsort
SELECT ALL + cor0.col1 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-4301
SELECT ALL cor0.col2 DIV col0 + col0 FROM tab2 AS cor0
----
10
78
79

skipif mysql # not compatible
query I rowsort label-4301
SELECT ALL cor0.col2 / col0 + col0 FROM tab2 AS cor0
----
10
78
79

query I rowsort
SELECT + ( col2 ) * col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ( 81 ) AS col2 FROM tab2 AS cor0
----
81
81
81

query I rowsort
SELECT ALL col2 * col1 + + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + + ( + col2 ) * - col1 + ( + ( cor0.col1 ) ) FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT + ( col2 ) * col0 + + col1 AS col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT + + col1 * col1 * - col1 + ( - 76 ) FROM tab2 AS cor0
----
-205455
-29867
-4989

onlyif mysql # use DIV operator for integer division
query I rowsort label-4308
SELECT + 78 DIV 73 + col0 * + col1 FROM tab0 AS cor0
----
2065
3396
8100

skipif mysql # not compatible
query I rowsort label-4308
SELECT + 78 / 73 + col0 * + col1 FROM tab0 AS cor0
----
2065
3396
8100

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * + col0 col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - 76 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d90b4aa5f03b4a149aa925c4a88acca0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4311
SELECT ALL - col2 + + col1 DIV + ( cor0.col1 * - col1 ) FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-4311
SELECT ALL - col2 + + col1 / + ( cor0.col1 * - col1 ) FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - cor0.col1 + cor0.col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col0 + + cor0.col2 * col2 * - col1 AS col0 FROM tab2 cor0
----
-22592
-24469
-39806

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + 1 * col2 AS REAL ) AS col2 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL 56 * col1 FROM tab2
----
1736
3304
952

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + tab2.col2 ) col1 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT + ( - ( col1 ) ) FROM tab0
----
-86
-91
-97

query I rowsort
SELECT + ( - 81 ) FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

query I rowsort
SELECT ALL 99 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT - ( + col2 ) * + col1 AS col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col1 * + col2 + - col1 AS col2 FROM tab2
----
1475
629
806

query I rowsort
SELECT col0 * 53 FROM tab0
----
1272
1855
4717

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab2 AS cor1, tab0, tab0 cor2
----
3645 values hashing to a5677c50b23f70287df35c2388a1c9bf

query I rowsort
SELECT DISTINCT col2 + - 1 * + 36 FROM tab2
----
-10
-9
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-4325
SELECT DISTINCT - tab0.col2 DIV - ( col2 + tab0.col0 ) FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-4325
SELECT DISTINCT - tab0.col2 / - ( col2 + tab0.col0 ) FROM tab0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4326
SELECT DISTINCT + col1 + CAST( col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-4326
SELECT DISTINCT + col1 + CAST ( col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - 73 * - 20 FROM tab1, tab1 AS cor0
----
9 values hashing to 181755e648027b77522e781451148a5f

query I rowsort
SELECT ALL + col0 - col0 * - col2 AS col2 FROM tab2
----
196
2106
3081

query I rowsort
SELECT ( col0 ) + col1 + + tab0.col0 * col1 AS col2 FROM tab0
----
2174
3527
8279

query I rowsort
SELECT DISTINCT col1 - + 72 AS col0 FROM tab0
----
14
19
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4331
SELECT CAST( + 1 AS SIGNED ) * + col0 * + col1 FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-4331
SELECT CAST ( + 1 AS INTEGER ) * + col0 * + col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT 29 * + 10 AS col1 FROM tab1
----
290
290
290

query I rowsort
SELECT tab0.col2 * - ( col1 ) FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + 58 AS col1 FROM tab1
----
58
58
58

query I rowsort
SELECT - ( - cor0.col0 ) * cor0.col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - 76 - col1 * col1 AS col0 FROM tab2 AS cor0
----
-1037
-3557
-365

query I rowsort
SELECT + - col2 + col0 * + col1 AS col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT col0 + - 70 * tab0.col0 FROM tab0
----
-1656
-2415
-6141

query I rowsort
SELECT ALL + col0 * + ( col0 ) + + col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL col0 + + col0 AS col1 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT DISTINCT col1 + - 10 - col1 FROM tab0 AS cor0
----
-10

onlyif mysql # use DIV operator for integer division
query I rowsort label-4342
SELECT ALL + col0 * col0 + col2 DIV + col1 + + 87 * ( col1 * - 46 ) FROM tab1 AS cor0
----
-104041
-35919
-45619

skipif mysql # not compatible
query I rowsort label-4342
SELECT ALL + col0 * col0 + col2 / + col1 + + 87 * ( col1 * - 46 ) FROM tab1 AS cor0
----
-104041
-35919
-45619

query I rowsort
SELECT - - col2 + cor0.col0 * - col1 * col1 FROM tab0 AS cor0
----
-177471
-329314
-736927

onlyif mysql # use DIV operator for integer division
query I rowsort label-4344
SELECT DISTINCT + + col1 DIV - col2 + - col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-4344
SELECT DISTINCT + + col1 / - col2 + - col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + col2 * + col2 * col0 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-62
26050
598345

query I rowsort
SELECT DISTINCT - 98 FROM tab1 cor0
----
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4347
SELECT - cor0.col0 DIV + col0 + cor0.col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-4347
SELECT - cor0.col0 / + col0 + cor0.col2 FROM tab0 AS cor0
----
0
32
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4348
SELECT DISTINCT - - ( - col0 ) + col2 DIV col2 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-4348
SELECT DISTINCT - - ( - col0 ) + col2 / col2 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

query I rowsort
SELECT DISTINCT + + ( col0 ) * - col0 + - col1 FROM tab1 AS cor0
----
-35
-4106
-6413

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4350
SELECT ALL CAST( 48 AS SIGNED ) * col1 FROM tab1 AS cor0
----
1248
480
624

skipif mysql # not compatible
query I rowsort label-4350
SELECT ALL CAST ( 48 AS INTEGER ) * col1 FROM tab1 AS cor0
----
1248
480
624

query I rowsort
SELECT ALL + + 27 * col2 FROM tab1 cor0
----
1458
1539
2592

query I rowsort
SELECT DISTINCT 57 AS col0 FROM tab2, tab1 AS cor0
----
57

query I rowsort
SELECT + 33 * 26 FROM tab0 AS cor0
----
858
858
858

query I rowsort
SELECT 65 + + col2 * col0 AS col0 FROM tab1 AS cor0
----
227
3713
7745

query I rowsort
SELECT ALL - col2 * - cor0.col1 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 - cor0.col2 col1 FROM tab2 AS cor0
----
-6
5
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4357
SELECT + col2 DIV col0 - - col0 FROM tab2 AS cor0
----
10
78
79

skipif mysql # not compatible
query I rowsort label-4357
SELECT + col2 / col0 - - col0 FROM tab2 AS cor0
----
10
78
79

query I rowsort
SELECT DISTINCT + col2 + + tab0.col2 AS col1 FROM tab0
----
164
2
66

query III rowsort
SELECT ALL * FROM tab2 WHERE ( NULL ) BETWEEN col0 AND - col2
----

query I rowsort
SELECT DISTINCT - col1 * - col1 + - col2 AS col2 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT DISTINCT + col0 + - col1 * col1 + col0 * col0 FROM tab2 AS cor0
----
-905
2681
6031

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4362
SELECT DISTINCT - - col0 * + col1 + - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4362
SELECT DISTINCT - - col0 * + col1 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL col1 FROM tab0 WHERE NOT ( col1 * col2 ) < col2 * col2
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4364
SELECT + 21 + col0 DIV ( col0 ) + - col0 FROM tab1
----
-42
-58
19

skipif mysql # not compatible
query I rowsort label-4364
SELECT + 21 + col0 / ( col0 ) + - col0 FROM tab1
----
-42
-58
19

query I rowsort
SELECT - + col1 + - col2 * col1 AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col1 * 76 FROM tab2 AS cor0
----
-1254
-2329
-4458

query I rowsort
SELECT - col0 * - col1 * - col1 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT col1 * col0 + - ( col2 ) FROM tab2
----
1305
190
4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 - + col1 * + 17 col2 FROM tab2
----
-210
-520
-925

query I rowsort
SELECT - 97 * + col0 AS col2 FROM tab2
----
-679
-7566
-7663

query I rowsort
SELECT + cor0.col1 + - col2 - col1 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4372
SELECT DISTINCT col2 + col0 DIV col0 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4372
SELECT DISTINCT col2 + col0 / col0 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT + col0 * cor0.col1 + + col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL col0 - + col1 * col0 AS col0 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT tab1.col2 + 66 FROM tab1
----
120
123
162

onlyif mysql # use DIV operator for integer division
query I rowsort label-4376
SELECT tab0.col2 DIV 56 + 34 + col1 AS col0 FROM tab0
----
120
126
131

skipif mysql # not compatible
query I rowsort label-4376
SELECT tab0.col2 / 56 + 34 + col1 AS col0 FROM tab0
----
120
126
131

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 91 col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT DISTINCT - + col2 + - col0 AS col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT col0 + cor0.col0 AS col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT + col2 + - 65 FROM tab1 AS cor0
----
-11
-8
31

query I rowsort
SELECT ALL col1 * col2 * + col1 AS col1 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT 61 + col0 FROM tab1
----
125
141
64

query I rowsort
SELECT ( col2 + - col2 ) AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col0 * 12 + + col2 FROM tab1 AS cor0
----
1056
825
90

query I rowsort
SELECT DISTINCT 86 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1 cor2
----
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4386
SELECT ALL + CAST( col1 AS SIGNED ) * col0 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-4386
SELECT ALL + CAST ( col1 AS INTEGER ) * col0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4387
SELECT + col2 + col0 * col2 DIV - 18 FROM tab1
----
-145
-330
45

skipif mysql # not compatible
query I rowsort label-4387
SELECT + col2 + col0 * col2 / - 18 FROM tab1
----
-145
-330
45

query I rowsort
SELECT DISTINCT 39 * col2 FROM tab1
----
2106
2223
3744

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col0 AS REAL ) * + tab1.col1 + 30 * + 94 AS col0 FROM tab1
----
1780
2180
2742

query I rowsort
SELECT - 44 + + col2 AS col0 FROM tab2 cor0
----
-17
-18
-6

query I rowsort
SELECT DISTINCT - + col1 + col2 * col1 FROM tab0 AS cor0
----
0
2752
7371

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * + col1 col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + 29 + + col0 * 68 FROM tab0 AS cor0
----
1661
2409
6081

query I rowsort
SELECT ALL - col2 + - col0 * 40 FROM tab1 AS cor0
----
-174
-2617
-3296

onlyif mysql # use DIV operator for integer division
query I rowsort label-4395
SELECT + col0 DIV - col1 AS col2 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-4395
SELECT + col0 / - col1 AS col2 FROM tab2 cor0
----
-1
-4
0

query I rowsort
SELECT DISTINCT + 3 * cor0.col2 AS col0 FROM tab2 AS cor0
----
114
78
81

query I rowsort
SELECT + 67 * - col2 AS col1 FROM tab2 AS cor0
----
-1742
-1809
-2546

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col2 ) col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + 25 + - col1 AS col0 FROM tab1 AS cor0
----
-1
12
15

query I rowsort
SELECT DISTINCT - 6 AS col2 FROM tab1 cor0
----
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4401
SELECT col0 + - col2 DIV - col1 FROM tab1
----
5
69
87

skipif mysql # not compatible
query I rowsort label-4401
SELECT col0 + - col2 / - col1 FROM tab1
----
5
69
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4402
SELECT - + CAST( 85 AS SIGNED ) + - col2 * ( col0 ) AS col0 FROM tab1 AS cor0
----
-247
-3733
-7765

skipif mysql # not compatible
query I rowsort label-4402
SELECT - + CAST ( 85 AS INTEGER ) + - col2 * ( col0 ) AS col0 FROM tab1 AS cor0
----
-247
-3733
-7765

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab0, tab2 cor0, tab2 AS cor1
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 ) * + col2 + + 15 * col1 col2 FROM tab0 AS cor0
----
-5359
1454
201

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4405
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4405
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + col0 * + cor0.col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL + 38 + - col1 AS col0 FROM tab1
----
12
25
28

query I rowsort
SELECT ALL + 34 + col2 + col1 AS col2 FROM tab1 AS cor0
----
101
114
143

query I rowsort
SELECT DISTINCT - 86 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
-86

query I rowsort
SELECT + + col1 * + col0 + 49 AS col2 FROM tab2 AS cor0
----
1392
266
4651

query I rowsort
SELECT col1 + + col1 * + col2 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT - + col2 * ( + col0 ) FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col1 * 2 AS col0 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT - col0 * 16 + cor0.col0 FROM tab0 AS cor0
----
-1335
-360
-525

query I rowsort
SELECT cor0.col2 + + 32 AS col0 FROM tab2 AS cor0
----
58
59
70

query I rowsort
SELECT cor0.col1 - - ( 41 ) AS col0 FROM tab2 AS cor0
----
100
58
72

query I rowsort
SELECT - col2 * 81 + + col1 AS col1 FROM tab1
----
-4348
-4607
-7763

query I rowsort
SELECT DISTINCT - tab1.col0 + + tab1.col1 * - col1 FROM tab1
----
-164
-249
-679

query I rowsort
SELECT col0 + + col0 * 34 + col1 AS col0 FROM tab1
----
131
2250
2813

query I rowsort
SELECT col0 + + col1 * + 0 AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT + col2 - + col1 AS col2 FROM tab1
----
28
47
83

query I rowsort
SELECT DISTINCT 44 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
44

query I rowsort
SELECT DISTINCT 51 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
51

query I rowsort
SELECT DISTINCT - col1 - - tab0.col2 AS col1 FROM tab0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col0 col1 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT ALL - col2 + col1 * - 80 * - col1 AS col2 FROM tab0 AS cor0
----
591647
662398
752719

query I rowsort
SELECT - cor0.col0 * + ( col0 ) AS col2 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT cor0.col1 * 23 + + col1 FROM tab0 cor0
----
2064
2184
2328

query I rowsort
SELECT - col1 + + col0 + - col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + + col1 + - col2 * - col0 + + col2 FROM tab2 AS cor0
----
2113
247
3057

query I rowsort
SELECT 34 + 27 + col2 FROM tab2 AS cor0
----
87
88
99

query I rowsort
SELECT DISTINCT + 87 + col0 AS col0 FROM tab2 AS cor0
----
165
166
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-4433
SELECT ALL col1 * col2 + + col2 DIV + 23 AS col0 FROM tab2 AS cor0
----
1535
647
838

skipif mysql # not compatible
query I rowsort label-4433
SELECT ALL col1 * col2 + + col2 / + 23 AS col0 FROM tab2 AS cor0
----
1535
647
838

query I rowsort
SELECT - col0 * + 83 AS col1 FROM tab1 cor0
----
-249
-5312
-6640

query I rowsort
SELECT + - cor0.col1 + 72 FROM tab1 AS cor0
----
46
59
62

query I rowsort
SELECT DISTINCT 53 * - col2 AS col0 FROM tab1 AS cor0
----
-2862
-3021
-5088

query I rowsort
SELECT DISTINCT 54 AS col2 FROM tab2, tab2 AS cor0, tab0 cor1
----
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4438
SELECT tab1.col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4438
SELECT tab1.col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 76 FROM tab1, tab0 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT ALL + + 17 * - col2 FROM tab2 AS cor0
----
-442
-459
-646

query I rowsort
SELECT - col1 * col1 * + col1 AS col0 FROM tab1 AS cor0
----
-1000
-17576
-2197

query I rowsort
SELECT ALL + - col1 + + col0 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL col1 * + col0 + - col2 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT DISTINCT - 16 - col1 AS col1 FROM tab1 AS cor0
----
-26
-29
-42

query I rowsort
SELECT - 59 * + col0 AS col2 FROM tab1
----
-177
-3776
-4720

query I rowsort
SELECT - col1 + - 61 FROM tab0 AS cor0
----
-147
-152
-158

query I rowsort
SELECT cor0.col2 + 14 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 5ae2bd83f81f991899cb411f09518787

query I rowsort
SELECT + col0 + 8 FROM tab0
----
32
43
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4449
SELECT + col2 * + col1 DIV - col1 AS col2 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-4449
SELECT + col2 * + col1 / - col1 AS col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL + - 88 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to eb8cbefa7d831e1a0183e919e2caef32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - 5 * - col0 col1 FROM tab2
----
-1085
-23010
-6715

query I rowsort
SELECT DISTINCT col1 - col2 * col0 AS col2 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT ALL + ( - col2 ) * ( col1 ) AS col0 FROM tab0 cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4454
SELECT DISTINCT + col2 * - cor0.col1 DIV col1 col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4454
SELECT DISTINCT + col2 * - cor0.col1 / col1 col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + - 39 + - col2 - 22 FROM tab2 AS cor0
----
-87
-88
-99

query I rowsort
SELECT - + 61 * col1 + col2 AS col1 FROM tab0 cor0
----
-5213
-5469
-5916

query I rowsort
SELECT col2 * 86 FROM tab2
----
2236
2322
3268

onlyif mysql # use DIV operator for integer division
query I rowsort label-4458
SELECT + - col1 + + col0 DIV + col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-4458
SELECT + - col1 + + col0 / + col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT col1 * col0 * col0 + col2 * + col1 - col0 * col1 * col0 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4460
SELECT 67 + col2 DIV - col0 FROM tab2
----
64
67
67

skipif mysql # not compatible
query I rowsort label-4460
SELECT 67 + col2 / - col0 FROM tab2
----
64
67
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-4461
SELECT col0 DIV + 97 col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4461
SELECT col0 / + 97 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT - 14 AS col0 FROM tab2
----
-14
-14
-14

query I rowsort
SELECT col1 + 54 + - col0 FROM tab1
----
-13
0
77

query I rowsort
SELECT DISTINCT - tab1.col2 + - col2 * col1 FROM tab1
----
-1344
-1458
-627

query I rowsort
SELECT DISTINCT + col0 + + tab2.col1 AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL + 25 * col0 + + 88 AS col2 FROM tab2 AS cor0
----
2038
2063
263

query I rowsort
SELECT DISTINCT + + col2 - col0 AS col1 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4468
SELECT + CAST( NULL AS SIGNED ) * 81 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4468
SELECT + CAST ( NULL AS INTEGER ) * 81 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - ( - tab2.col1 * - 66 ) + col2 AS col2 FROM tab2
----
-1084
-2019
-3868

query I rowsort
SELECT DISTINCT + ( + 42 ) * - cor1.col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
-2268
-2394
-4032

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 91 * - col1 col0 FROM tab1 AS cor0
----
-1183
-2366
-910

onlyif mysql # use DIV operator for integer division
query I rowsort label-4472
SELECT ALL col2 + cor0.col0 DIV 83 AS col0 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-4472
SELECT ALL col2 + cor0.col0 / 83 AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + ( - col0 ) + 29 AS col2 FROM tab1 AS cor0
----
-35
-51
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4474
SELECT ALL + col0 * col1 * CAST( col1 AS SIGNED ) + col1 FROM tab0 cor0
----
177590
329412
737100

skipif mysql # not compatible
query I rowsort label-4474
SELECT ALL + col0 * col1 * CAST ( col1 AS INTEGER ) + col1 FROM tab0 cor0
----
177590
329412
737100

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 98 + col1 col0 FROM tab2 AS cor0
----
115
129
157

onlyif mysql # use DIV operator for integer division
query I rowsort label-4476
SELECT DISTINCT - + col0 * - col2 - 23 DIV 86 AS col1 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-4476
SELECT DISTINCT - + col0 * - col2 - 23 / 86 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + 89 + col2 FROM tab0 AS cor0
----
122
171
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 38 col1 FROM tab0 AS cor0
----
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4479
SELECT col0 DIV - 85 + - col1 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-4479
SELECT col0 / - 85 + - col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT DISTINCT col0 * col2 * col2 AS col2 FROM tab0
----
26136
35
598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-4481
SELECT col1 DIV col0 + + 72 AS col1 FROM tab0
----
73
74
75

skipif mysql # not compatible
query I rowsort label-4481
SELECT col1 / col0 + + 72 AS col1 FROM tab0
----
73
74
75

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT cor1.col0 + cor0.col1 * cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 29f069df3f8796e601d6aa83cb905cfd

query I rowsort
SELECT ALL col0 * + col2 * - col2 + col1 FROM tab1 AS cor0
----
-207926
-737267
-8722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4485
SELECT + col0 + - CAST( NULL AS SIGNED ) / + col0 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4485
SELECT + col0 + - CAST ( NULL AS INTEGER ) / + col0 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4486
SELECT - + cor0.col0 + - CAST( + col1 AS SIGNED ) DIV cor0.col1 FROM tab0 cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-4486
SELECT - + cor0.col0 + - CAST ( + col1 AS INTEGER ) / cor0.col1 FROM tab0 cor0
----
-25
-36
-90

query I rowsort
SELECT DISTINCT + col1 * - cor0.col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + + col2 * col1 + + col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT - col1 + + 55 FROM tab1 cor0
----
29
42
45

query I rowsort
SELECT - - cor0.col0 * - 44 FROM tab1 cor0
----
-132
-2816
-3520

query I rowsort
SELECT ( + 26 ) * col0 FROM tab0 AS cor0
----
2314
624
910

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4492
SELECT DISTINCT - CAST( NULL AS SIGNED ) / - 80 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4492
SELECT DISTINCT - CAST ( NULL AS INTEGER ) / - 80 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + - CAST ( col2 AS REAL ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4494
SELECT ALL + + ( col1 ) * col1 DIV col2 FROM tab0 AS cor0
----
100
224
9409

skipif mysql # not compatible
query I rowsort label-4494
SELECT ALL + + ( col1 ) * col1 / col2 FROM tab0 AS cor0
----
100
224
9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4495
SELECT DISTINCT - - CAST( NULL AS SIGNED ) + 14 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4495
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) + 14 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL 80 * + 28 FROM tab2 AS cor0
----
2240
2240
2240

query I rowsort
SELECT - - 1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + - cor0.col2 + col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 55 FROM tab2 AS cor0
----
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 14 ) * col1 col0 FROM tab1 AS cor0
----
140
182
364

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4501
SELECT DISTINCT CAST( col0 AS SIGNED ) AS col1 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4501
SELECT DISTINCT CAST ( col0 AS INTEGER ) AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL + ( + col0 ) + + col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + ( 34 ) AS col0 FROM tab0 cor0
----
34

query I rowsort
SELECT ALL - ( - col2 ) * - col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4505
SELECT ALL - CAST( col2 AS SIGNED ) AS col0 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-4505
SELECT ALL - CAST ( col2 AS INTEGER ) AS col0 FROM tab1
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4506
SELECT ( - col1 ) + col2 DIV col0 FROM tab1 AS cor0
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-4506
SELECT ( - col1 ) + col2 / col0 FROM tab1 AS cor0
----
-10
-12
-8

query I rowsort
SELECT DISTINCT - ( - col2 ) + + col2 * + col0 * 27 FROM tab1 AS cor0
----
207456
4428
98553

query I rowsort
SELECT + 42 * - col0 AS col0 FROM tab1 cor0
----
-126
-2688
-3360

query I rowsort
SELECT DISTINCT + 18 AS col1 FROM tab0, tab1 cor0, tab1, tab1 AS cor1
----
18

query I rowsort
SELECT ALL 87 * + 5 AS col0 FROM tab2
----
435
435
435

query I rowsort
SELECT ALL + col0 * col0 + + 12 AS col0 FROM tab1 AS cor0
----
21
4108
6412

query I rowsort
SELECT - - col2 * 49 * + col2 FROM tab0 AS cor0
----
329476
49
53361

query I rowsort
SELECT ALL + col2 + - col2 + + 84 * - col0 AS col0 FROM tab2 AS cor0
----
-588
-6552
-6636

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4514
SELECT ALL - - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4514
SELECT ALL - - CAST ( NULL AS REAL ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + col1 + col2 * - col2 AS col0 FROM tab2 AS cor0
----
-1427
-617
-698

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + ( - col1 ) col0 FROM tab0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col2 + col0 + col0 col1 FROM tab1 AS cor0
----
-2910
-3121
-9056

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 18 col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
-18

query I rowsort
SELECT DISTINCT col1 + cor0.col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4520
SELECT DISTINCT - - col2 DIV col1 + col1 AS col2 FROM tab2 AS cor0
----
19
31
59

skipif mysql # not compatible
query I rowsort label-4520
SELECT DISTINCT - - col2 / col1 + col1 AS col2 FROM tab2 AS cor0
----
19
31
59

query I rowsort
SELECT ALL - 31 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * cor0.col2 * 29 col2 FROM tab2 AS cor0
----
5481
58812
87058

query I rowsort
SELECT + + 62 + + col2 FROM tab2 cor0
----
100
88
89

query I rowsort
SELECT DISTINCT - cor0.col2 - + ( + col0 ) * - col0 AS col0 FROM tab0 AS cor0
----
1224
543
7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-4525
SELECT col0 + col2 DIV col0 FROM tab1 AS cor0
----
21
64
81

skipif mysql # not compatible
query I rowsort label-4525
SELECT col0 + col2 / col0 FROM tab1 AS cor0
----
21
64
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - 10 + 45 col2 FROM tab0 AS cor0
----
-195
-305
-845

query I rowsort
SELECT + 69 * - col2 + + ( + col0 ) AS col0 FROM tab0 AS cor0
----
-2253
-34
-5569

query I rowsort
SELECT + + 87 + col2 FROM tab0 AS cor0
----
120
169
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab0, tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ( 65 ) AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT ALL col2 * - 16 FROM tab1
----
-1536
-864
-912

query I rowsort
SELECT DISTINCT + tab2.col0 AS col0 FROM tab2, tab1, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL col0 * ( col2 ) AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL - 55 * col1 * col2 + 8 FROM tab1 AS cor0
----
-31342
-68632
-77212

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4535
SELECT CAST( - 81 AS SIGNED ) * + col2 + - cor0.col2 col0 FROM tab2 AS cor0
----
-2132
-2214
-3116

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4535
SELECT CAST ( - 81 AS INTEGER ) * + col2 + - cor0.col2 col0 FROM tab2 AS cor0
----
-2132
-2214
-3116

query I rowsort
SELECT - col2 + col1 * - col2 AS col2 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT DISTINCT - + ( col2 ) * + col1 + cor0.col2 - col2 * + col2 AS col2 FROM tab2 AS cor0
----
-1539
-2052
-2184

query I rowsort
SELECT + col1 * + col2 - - col1 * - 69 AS col1 FROM tab1 AS cor0
----
-120
-390
351

onlyif mysql # use DIV operator for integer division
query I rowsort label-4539
SELECT - + col1 + + col2 DIV - col0 col1 FROM tab1 AS cor0
----
-10
-14
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4539
SELECT - + col1 + + col2 / - col0 col1 FROM tab1 AS cor0
----
-10
-14
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - col2 + col1 ) * col1 col2 FROM tab1
----
-1079
-470
-728

query I rowsort
SELECT + col2 * col1 + + col2 * + col1 AS col1 FROM tab2 AS cor0
----
1292
1674
3068

query I rowsort
SELECT - 5 * col1 FROM tab2 cor0
----
-155
-295
-85

query I rowsort
SELECT DISTINCT + 2 * cor0.col1 + col2 * - 39 FROM tab1 AS cor0
----
-2054
-2203
-3718

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + + col0 col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - cor0.col0 * - col0 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-4546
SELECT ALL + cor0.col0 DIV - cor0.col1 AS col0 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-4546
SELECT ALL + cor0.col0 / - cor0.col1 AS col0 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT ALL - col2 * + col1 * 95 FROM tab0 AS cor0
----
-269610
-708890
-9215

query I rowsort
SELECT - 8 * col0 + + col1 - + col2 AS col1 FROM tab2 AS cor0
----
-52
-591
-653

query I rowsort
SELECT DISTINCT - 7 * + col1 * ( col1 + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
-11424
-56581
-8246

query I rowsort
SELECT 11 + + col2 FROM tab1 AS cor0
----
107
65
68

query I rowsort
SELECT ALL 31 + - col0 * + col0 FROM tab1 AS cor0
----
-4065
-6369
22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4552
SELECT + cor0.col2 * + CAST( + col1 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-4552
SELECT + cor0.col2 * + CAST ( + col1 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + col0 * - 85 + col2 FROM tab2
----
-568
-6604
-6677

query I rowsort
SELECT + col2 * cor0.col2 + ( col2 ) FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT - - col1 + - ( col0 ) * - col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + cor0.col0 + 27 AS col2 FROM tab1 AS cor0
----
107
30
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4557
SELECT - + col2 + + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4557
SELECT - + col2 + + CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * ( cor0.col2 ) AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT 87 * 23 FROM tab2 AS cor0
----
2001

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4560
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0, tab1 cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-4560
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0, tab1 cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT DISTINCT + 89 + - ( - col1 ) * col0 AS col1 FROM tab1 AS cor0
----
1129
167
729

query I rowsort
SELECT + + 37 + - col2 * col2 AS col2 FROM tab1 cor0
----
-2879
-3212
-9179

query I rowsort
SELECT ALL - + col1 * - ( col1 ) FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + col0 * + 84 FROM tab0 AS cor0
----
2016
2940
7476

query I rowsort
SELECT DISTINCT - - col2 - 51 AS col1 FROM tab2 AS cor0
----
-13
-24
-25

query I rowsort
SELECT ALL cor0.col1 + - 64 FROM tab1 AS cor0
----
-38
-51
-54

query I rowsort
SELECT col2 * - ( + 33 ) FROM tab2 AS cor0
----
-1254
-858
-891

query I rowsort
SELECT + + col0 * + 59 AS col0 FROM tab2 AS cor0
----
413
4602
4661

query I rowsort
SELECT DISTINCT col1 * + cor0.col0 + + col2 * col2 AS col2 FROM tab0 AS cor0
----
14823
3153
3396

query I rowsort
SELECT ALL 15 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 2 + col0 col0 FROM tab2
----
5
76
77

query I rowsort
SELECT + col2 * col2 + 17 + col0 AS col1 FROM tab2
----
1540
753
771

query I rowsort
SELECT DISTINCT 56 AS col0 FROM tab1, tab0 AS cor0
----
56

query I rowsort
SELECT DISTINCT - - col0 - col0 AS col2 FROM tab0 cor0
----
0

query I rowsort
SELECT ALL + col0 * col1 + col0 * + col2 AS col0 FROM tab0 cor0
----
15397
2856
3430

query I rowsort
SELECT DISTINCT + col2 * + col2 * col2 - col0 FROM tab2 AS cor0
----
17498
19676
54793

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * cor0.col2 col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort
SELECT ALL + col1 + + CAST ( col2 AS REAL ) + - col0 FROM tab2 AS cor0
----
-24
51
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4579
SELECT col2 + CAST( NULL AS SIGNED ) * - 30 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4579
SELECT col2 + CAST ( NULL AS INTEGER ) * - 30 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + ( - col2 * col2 ) + col0 * + tab1.col1 AS col2 FROM tab1
----
-2552
-2784
-8080

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 cor2
----
972 values hashing to 4634d10e8b6b37510bb99745aade36ab

query I rowsort
SELECT ALL + col0 + + 91 + - cor0.col0 AS col1 FROM tab2 AS cor0
----
91
91
91

query I rowsort
SELECT DISTINCT - tab0.col2 AS col0 FROM tab0, tab2 cor0
----
-1
-33
-82

query I rowsort
SELECT - + 93 + col1 + col0 * col0 FROM tab2 cor0
----
-13
6050
6165

query I rowsort
SELECT + + ( 1 ) + col1 FROM tab0 cor0
----
87
92
98

query I rowsort
SELECT DISTINCT ( + col1 ) + col1 FROM tab0
----
172
182
194

query I rowsort
SELECT 47 + col1 AS col1 FROM tab1 AS cor0
----
57
60
73

query I rowsort
SELECT col0 + cor0.col1 * + col1 * + 3 + col1 FROM tab0 AS cor0
----
22298
25023
28359

query I rowsort
SELECT + 87 + - cor0.col0 * - cor0.col1 FROM tab0 AS cor0
----
2151
3482
8186

query I rowsort
SELECT ALL - + col2 * col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + 88 * cor0.col1 FROM tab1 AS cor0
----
1144
2288
880

query I rowsort
SELECT ALL - - 36 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT - 64 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 100c625e45715c20368551989514ba64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 92 col0 FROM tab2 cor0
----
92
92
92

query I rowsort
SELECT ALL - + cor0.col2 + col0 + cor0.col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + + col1 * col1 + 21 FROM tab1 AS cor0
----
121
190
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) + 44 col1 FROM tab1 AS cor0
----
-20
-36
41

query I rowsort
SELECT ALL 79 + cor0.col2 FROM tab2 AS cor0
----
105
106
117

query I rowsort
SELECT DISTINCT - + 68 * col0 + - col2 AS col1 FROM tab1 cor0
----
-258
-4409
-5536

query I rowsort
SELECT DISTINCT cor0.col1 * col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT 9 * + col0 AS col1 FROM tab2 AS cor0
----
63
702
711

query I rowsort
SELECT + col2 * - 72 AS col0 FROM tab1 AS cor0
----
-3888
-4104
-6912

query I rowsort
SELECT tab1.col0 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0, tab2 AS cor1, tab2, tab1 cor2
----
3645 values hashing to a8d2ba8b8eb568b0a9a1771ccb0a8f23

query I rowsort
SELECT ALL - - col2 * - ( - col1 ) AS col1 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col2 AS REAL ) * col0 - cor0.col2 * 15 AS col1 FROM tab1 AS cor0
----
-4503
-9120
-972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( + col1 ) * col2 + col2 col2 FROM tab1 AS cor0
----
1344
1458
627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) * col0 col1 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT ( col1 ) + col0 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL col0 - - ( + tab0.col2 ) FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT + + cor0.col1 * + col1 AS col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + cor0.col0 * + cor0.col1 + col0 + - col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - 50 + col0 + + col2 * - col2 AS col2 FROM tab1
----
-2963
-3235
-9186

query I rowsort
SELECT DISTINCT col2 * cor0.col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT 19 * col1 + - col1 * + 41 FROM tab0 AS cor0
----
-1892
-2002
-2134

query I rowsort
SELECT - col2 * col0 + 52 FROM tab0 AS cor0
----
-7246
-740
17

query I rowsort
SELECT ALL 59 + 97 * col2 FROM tab0
----
156
3260
8013

query I rowsort
SELECT DISTINCT tab1.col1 + - ( - col1 ) FROM tab1
----
20
26
52

query I rowsort
SELECT 71 + - col2 FROM tab0 cor0
----
-11
38
70

query I rowsort
SELECT - - 88 * col0 FROM tab1 AS cor0
----
264
5632
7040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4621
SELECT - CAST( NULL AS SIGNED ) * - 96 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4621
SELECT - CAST ( NULL AS INTEGER ) * - 96 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4622
SELECT - + CAST( - 47 AS SIGNED ) + + col0 DIV + col0 FROM tab2 AS cor0
----
48
48
48

skipif mysql # not compatible
query I rowsort label-4622
SELECT - + CAST ( - 47 AS INTEGER ) + + col0 / + col0 FROM tab2 AS cor0
----
48
48
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-4623
SELECT + col2 DIV + col0 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4623
SELECT + col2 / + col0 FROM tab0 cor0
----
0
0
1

query I rowsort
SELECT ALL - - cor0.col1 + + col1 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-4625
SELECT cor0.col0 DIV col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-4625
SELECT cor0.col0 / col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT 82 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT + col1 * tab2.col0 AS col0 FROM tab2
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - 5 col0 FROM tab1
----
130
50
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab2, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT - - col2 + col0 * + col2 AS col0 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4631
SELECT - col2 * CAST( col2 AS SIGNED ) + + col1 AS col0 FROM tab2 AS cor0
----
-1427
-617
-698

skipif mysql # not compatible
query I rowsort label-4631
SELECT - col2 * CAST ( col2 AS INTEGER ) + + col1 AS col0 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) FROM tab0, tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - 56 * 71 + + col2 * + cor0.col1 AS col0 FROM tab0 AS cor0
----
-1138
-3879
3486

query I rowsort
SELECT ALL - 24 * - 26 FROM tab2 cor0
----
624
624
624

query I rowsort
SELECT DISTINCT ( cor0.col0 ) + + col0 AS col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT + 25 FROM tab1 cor0
----
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + col0 + col1 col0 FROM tab0 AS cor0
----
131
77
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 27 + 50 col2 FROM tab1
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col1 ) * + col1 col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL - ( + col0 + - tab1.col0 ) FROM tab1
----
0
0
0

query I rowsort
SELECT - ( tab1.col0 ) FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT ALL 57 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 220a93709e207779b34ef74b544764a5

query I rowsort
SELECT DISTINCT + col0 + col2 * ( - col1 ) FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT - col2 * ( - cor0.col0 ) AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - col0 * - ( col1 ) FROM tab1 cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4646
SELECT - + col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4646
SELECT - + col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 88 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT col1 + - col2 * - col2 + col1 AS col1 FROM tab0
----
1261
195
6906

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4649
SELECT DISTINCT - 23 + + col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4649
SELECT DISTINCT - 23 + + col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT col2 - col1 * 14 FROM tab2
----
-200
-407
-800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col0 * 37 col1 FROM tab0
----
-1330
-3382
-912

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2, tab1 AS cor3
----
3645 values hashing to 974a92f740f5f08d18564d29c05f7692

query I rowsort
SELECT DISTINCT + - cor0.col1 - + col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT col1 + - col0 * col0 AS col1 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT + + col0 * - 38 AS col1 FROM tab0 AS cor0
----
-1330
-3382
-912

query I rowsort
SELECT - - col0 + 83 AS col0 FROM tab0 AS cor0
----
107
118
172

query I rowsort
SELECT + col0 + - ( col0 ) AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * col0 + + col2 FROM tab2 AS cor0
----
1381
244
4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col2 * + 80 col1 FROM tab2
----
-2002
-2153
-2961

query I rowsort
SELECT + + 73 * + col2 AS col1 FROM tab1 cor0
----
3942
4161
7008

query I rowsort
SELECT DISTINCT 69 * col2 AS col1 FROM tab2 cor0
----
1794
1863
2622

query I rowsort
SELECT ALL + col1 * - col1 + - col2 AS col2 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT ALL - 25 * - col2 FROM tab0 AS cor0
----
2050
25
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-4664
SELECT + 99 * cor0.col0 + - col2 DIV + col1 col1 FROM tab0 AS cor0
----
2376
3465
8811

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4664
SELECT + 99 * cor0.col0 + - col2 / + col1 col1 FROM tab0 AS cor0
----
2376
3465
8811

query I rowsort
SELECT DISTINCT - 51 FROM tab2 cor0
----
-51

query I rowsort
SELECT ALL - - col0 * 11 AS col0 FROM tab2 AS cor0
----
77
858
869

query I rowsort
SELECT ALL + col0 * - 52 AS col1 FROM tab0 AS cor0
----
-1248
-1820
-4628

query I rowsort
SELECT DISTINCT + + col2 + cor0.col2 AS col2 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-4669
SELECT + cor0.col1 * col1 DIV - 96 FROM tab0 AS cor0
----
-77
-86
-98

skipif mysql # not compatible
query I rowsort label-4669
SELECT + cor0.col1 * col1 / - 96 FROM tab0 AS cor0
----
-77
-86
-98

query I rowsort
SELECT DISTINCT - tab1.col1 * + tab1.col0 * + col1 AS col1 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT col2 * col0 - col2 AS col2 FROM tab0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col0 - col2 col1 FROM tab0 WHERE NOT NULL <> NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4673
SELECT col2 * col1 DIV col2 AS col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4673
SELECT col2 * col1 / col2 AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT col0 * - col2 + - col1 * col1 FROM tab2
----
-1150
-3291
-5509

query I rowsort
SELECT ALL + col2 + + col0 * col1 + + col2 AS col0 FROM tab0
----
2130
3397
8263

onlyif mysql # use DIV operator for integer division
query I rowsort label-4676
SELECT DISTINCT + col2 DIV - col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-4676
SELECT DISTINCT + col2 / - col1 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT - col2 / col0 FROM tab0 WHERE ( col1 - - col1 ) = NULL
----

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) >= - col1 / - col0
----

query I rowsort
SELECT ALL + col2 + col2 * - col0 AS col0 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT - col2 * + col1 + col1 FROM tab1 WHERE ( col1 + col0 * - col0 * - col2 ) NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT DISTINCT + col0 FROM tab2 WHERE ( NULL ) NOT IN ( - col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - tab1.col2 + col0 * + col0 col0 FROM tab1
----
-2816
-2907
847

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 * + col0 * + col0 col0 FROM tab2
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-4684
SELECT + tab2.col0 * col1 + - col1 DIV - col1 AS col0 FROM tab2
----
1344
218
4603

skipif mysql # not compatible
query I rowsort label-4684
SELECT + tab2.col0 * col1 + - col1 / - col1 AS col0 FROM tab2
----
1344
218
4603

query III rowsort
SELECT ALL * FROM tab2 WHERE col1 BETWEEN NULL AND - col0 / + col0
----

query I rowsort
SELECT + tab1.col1 * + col0 AS col1 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col1 * + tab0.col1 + - col1 * + tab0.col2 col1 FROM tab0
----
174666
329218
729547

query I rowsort
SELECT ALL col0 + - col0 * - col2 FROM tab1
----
165
3712
7760

query I rowsort
SELECT ALL col0 * + col2 * + col2 AS col0 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT col2 * - col1 + col0 * - tab1.col0 FROM tab1 WHERE NOT NULL IN ( + col0 + col2 )
----

query I rowsort
SELECT col0 * col0 + col1 FROM tab1
----
35
4106
6413

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab2 WHERE NOT ( NULL ) NOT IN ( tab2.col1 )
----

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col0 AS REAL ) * col1 + + col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT - col2 * cor0.col0 * ( - col2 + col1 ) FROM tab2 AS cor0
----
-66924
-756
63042

query I rowsort
SELECT - + col2 + col2 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - ( col2 ) + 86 AS col0 FROM tab1 AS cor0
----
-10
29
32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4697
SELECT ALL ( col1 + + col2 ) * + CAST( col1 + + col2 AS SIGNED ) FROM tab0
----
14161
29929
9604

skipif mysql # not compatible
query I rowsort label-4697
SELECT ALL ( col1 + + col2 ) * + CAST ( col1 + + col2 AS INTEGER ) FROM tab0
----
14161
29929
9604

query I rowsort
SELECT - ( + 7 ) FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 82db7c0390abae7ccf4512b1302a6466

query I rowsort
SELECT - ( - col0 ) * + col1 + + 94 + - col2 * col1 FROM tab1
----
-114
-1232
164

query I rowsort
SELECT ALL - ( col1 ) * tab1.col1 + + col1 AS col2 FROM tab1
----
-156
-650
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4701
SELECT col1 * col2 + + CAST( NULL AS SIGNED ) * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4701
SELECT col1 * col2 + + CAST ( NULL AS INTEGER ) * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 44 + + col0 col1 FROM tab2 AS cor0
----
-37
34
35

query I rowsort
SELECT - 80 + - col1 FROM tab0 AS cor0
----
-166
-171
-177

query I rowsort
SELECT DISTINCT + cor0.col0 + col0 AS col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - col0 * col2 + + col0 * + 91 FROM tab1 cor0
----
-400
111
2176

onlyif mysql # use DIV operator for integer division
query I rowsort label-4706
SELECT ALL - 91 DIV + cor0.col0 AS col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-4706
SELECT ALL - 91 / + cor0.col0 AS col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 68 col1 FROM tab1, tab2 AS cor0
----
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 32 + + cor0.col2 col0 FROM tab1, tab1 AS cor0
----
128
86
89

query I rowsort
SELECT ALL tab0.col0 * - col0 + - col2 FROM tab0
----
-1226
-609
-8003

query I rowsort
SELECT DISTINCT - cor0.col0 + col2 * col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT - col2 * - 4 AS col2 FROM tab0 AS cor0
----
132
328
4

query I rowsort
SELECT + - col2 * + ( + col1 ) * - col2 AS col0 FROM tab0 AS cor0
----
611884
93654
97

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( + cor0.col2 AS REAL ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL + col2 + col1 * - col2 AS col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT + col1 - col2 * col1 * col1 AS col2 FROM tab2 AS cor0
----
-10965
-25916
-90447

query I rowsort
SELECT DISTINCT + 12 * + col2 * - col1 FROM tab0 AS cor0
----
-1164
-34056
-89544

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col0 col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + ( + ( col0 ) ) - - col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT + col2 * + 66 AS col2 FROM tab2
----
1716
1782
2508

query I rowsort
SELECT DISTINCT - ( 3 ) * col2 * + col2 FROM tab2
----
-2028
-2187
-4332

query I rowsort
SELECT + + 45 * 73 FROM tab2 AS cor0
----
3285
3285
3285

query I rowsort
SELECT + col2 * col1 + + col0 FROM tab0 cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-4723
SELECT + col1 + + col1 DIV ( 70 ) FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-4723
SELECT + col1 + + col1 / ( 70 ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT col0 * + cor0.col1 AS col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4726
SELECT - col1 * cor0.col0 DIV - col1 col1 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4726
SELECT - col1 * cor0.col0 / - col1 col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - + col2 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 * ( - 8 ) FROM tab1
----
-24
-512
-640

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1, tab2, tab0 AS cor0
----
86
91
97

query I rowsort
SELECT col1 + + col0 * - col0 AS col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT DISTINCT - + col1 * - col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ALL - - cor0.col0 * 28 FROM tab2 AS cor0
----
196
2184
2212

query I rowsort
SELECT ALL ( 99 ) + - cor0.col2 AS col2 FROM tab2 AS cor0
----
61
72
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + cor0.col1 col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT + 53 AS col2 FROM tab0, tab1 cor0, tab2 AS cor1, tab1 AS cor2
----
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col1 + col0 * + col1 col0 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT - + ( col0 ) * cor0.col2 * 9 + col0 AS col1 FROM tab0 AS cor0
----
-280
-65593
-7104

query I rowsort
SELECT col1 * + col1 + + 98 AS col1 FROM tab0 AS cor0
----
7494
8379
9507

onlyif mysql # use DIV operator for integer division
query I rowsort label-4739
SELECT DISTINCT ( tab0.col1 ) DIV col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-4739
SELECT DISTINCT ( tab0.col1 ) / col2 FROM tab0
----
1
2
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4740
SELECT ALL col0 * col2 + - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4740
SELECT ALL col0 * col2 + - CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 20 + col1 AS col0 FROM tab0 AS cor0
----
66
71
77

query I rowsort
SELECT cor1.col0 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + - 68 + - col0 AS col1 FROM tab0 AS cor0
----
-103
-157
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-4744
SELECT DISTINCT - col2 DIV - 74 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4744
SELECT DISTINCT - col2 / - 74 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + + col0 * col1 + cor0.col1 * col2 AS col1 FROM tab1 AS cor0
----
1210
1482
2288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4746
SELECT ALL + cor0.col2 * CAST( col2 AS SIGNED ) * - col0 AS col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

skipif mysql # not compatible
query I rowsort label-4746
SELECT ALL + cor0.col2 * CAST ( col2 AS INTEGER ) * - col0 AS col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL - col2 * + cor0.col0 + - col2 * cor0.col0 FROM tab2 AS cor0
----
-378
-4056
-6004

query I rowsort
SELECT col0 + + 92 FROM tab2 AS cor0
----
170
171
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4749
SELECT DISTINCT - col2 + CAST( col1 AS SIGNED ) AS col0 FROM tab2 cor0
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-4749
SELECT DISTINCT - col2 + CAST ( col1 AS INTEGER ) AS col0 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT ALL - col0 + + col0 * col2 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT ALL col1 * - tab2.col1 + + ( col0 * - col0 ) FROM tab2
----
-1010
-6530
-9565

onlyif mysql # use DIV operator for integer division
query I rowsort label-4752
SELECT DISTINCT - ( - col0 ) + tab0.col2 DIV col0 + col1 AS col1 FROM tab0
----
111
132
180

skipif mysql # not compatible
query I rowsort label-4752
SELECT DISTINCT - ( - col0 ) + tab0.col2 / col0 + col1 AS col1 FROM tab0
----
111
132
180

query I rowsort
SELECT DISTINCT - 19 AS col2 FROM tab0 AS cor0
----
-19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4754
SELECT - CAST( - col1 AS SIGNED ) + - col0 * ( - col2 ) + + col2 col0 FROM tab1 AS cor0
----
242
3715
7789

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4754
SELECT - CAST ( - col1 AS INTEGER ) + - col0 * ( - col2 ) + + col2 col0 FROM tab1 AS cor0
----
242
3715
7789

query I rowsort
SELECT + cor0.col1 * - 24 + col2 AS col0 FROM tab1 cor0
----
-183
-216
-570

query I rowsort
SELECT DISTINCT ( - col1 ) + col2 + + col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL 3 * + 28 AS col1 FROM tab0 AS cor0
----
84
84
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-4758
SELECT DISTINCT + 54 DIV - col2 + col0 AS col0 FROM tab1 AS cor0
----
2
64
80

skipif mysql # not compatible
query I rowsort label-4758
SELECT DISTINCT + 54 / - col2 + col0 AS col0 FROM tab1 AS cor0
----
2
64
80

query I rowsort
SELECT + col0 - - col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ALL + 81 + - col0 + col2 * ( - cor0.col0 ) * + col2 AS col2 FROM tab0 AS cor0
----
-26079
-598444
11

query I rowsort
SELECT + 12 * + ( + col0 ) AS col2 FROM tab0 AS cor0
----
1068
288
420

query I rowsort
SELECT col1 * col2 + - col0 AS col2 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT - + ( + col2 ) + + col2 - col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col2 * 1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL ( - 95 ) FROM tab2 AS cor0
----
-95
-95
-95

query I rowsort
SELECT + col1 * + tab2.col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT DISTINCT - col0 * + ( + col2 * col1 ) FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT + - col2 * - col0 + + col2 * col1 AS col2 FROM tab1 AS cor0
----
1566
4218
8928

query I rowsort
SELECT + - ( - col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4770
SELECT CAST( col1 AS SIGNED ) + cor0.col2 AS col2 FROM tab2 AS cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-4770
SELECT CAST ( col1 AS INTEGER ) + cor0.col2 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT col1 + - 77 FROM tab0 AS cor0
----
14
20
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4772
SELECT ALL + col1 + + CAST( + col2 AS SIGNED ) * - col2 + col0 FROM tab0
----
-6544
-979
131

skipif mysql # not compatible
query I rowsort label-4772
SELECT ALL + col1 + + CAST ( + col2 AS INTEGER ) * - col2 + col0 FROM tab0
----
-6544
-979
131

onlyif mysql # use DIV operator for integer division
query I rowsort label-4773
SELECT ALL tab2.col2 * - col1 DIV - col1 + col0 AS col0 FROM tab2
----
104
117
34

skipif mysql # not compatible
query I rowsort label-4773
SELECT ALL tab2.col2 * - col1 / - col1 + col0 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT col2 * 54 AS col2 FROM tab2 cor0
----
1404
1458
2052

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4775
SELECT DISTINCT - - col2 + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4775
SELECT DISTINCT - - col2 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT cor0.col1 - - 42 AS col2 FROM tab0, tab2 AS cor0
----
101
59
73

query I rowsort
SELECT - tab2.col0 * + tab2.col0 AS col2 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT - col2 * 15 * col1 AS col0 FROM tab0 AS cor0
----
-111930
-1455
-42570

query I rowsort
SELECT + col1 * + 29 * col1 AS col0 FROM tab0 AS cor0
----
214484
240149
272861

query I rowsort
SELECT DISTINCT + - ( + 5 ) + - col0 * + 84 - 76 AS col2 FROM tab1 AS cor0
----
-333
-5457
-6801

query I rowsort
SELECT ( col2 ) * + col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - col0 * + 89 + col2 FROM tab2 AS cor0
----
-596
-6916
-6993

query I rowsort
SELECT DISTINCT + col2 + 56 FROM tab0 AS cor0
----
138
57
89

query I rowsort
SELECT - - col1 * 47 FROM tab1 AS cor0
----
1222
470
611

query I rowsort
SELECT ALL 31 - col2 FROM tab0 AS cor0
----
-2
-51
30

query I rowsort
SELECT ALL - 90 * cor0.col1 FROM tab2 AS cor0
----
-1530
-2790
-5310

query I rowsort
SELECT DISTINCT + + ( + cor0.col1 ) * - col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col0 col2 FROM tab0 AS cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 47 + ( - col1 ) * ( + cor0.col2 ) col2 FROM tab0 AS cor0
----
-2791
-50
-7415

query I rowsort
SELECT 15 + + col1 + cor0.col1 FROM tab2 AS cor0
----
133
49
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - - col0 col1 FROM tab0
----
178
48
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4792
SELECT col0 - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4792
SELECT col0 - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT - col0 + - CAST ( + 77 + + col1 AS REAL ) * CAST ( col2 AS INTEGER ) AS col1 FROM tab2
----
-2923
-3614
-3651

query I rowsort
SELECT ALL col1 * 48 FROM tab1 AS cor0
----
1248
480
624

onlyif mysql # use DIV operator for integer division
query I rowsort label-4795
SELECT ALL - + col1 + + 42 DIV col2 AS col2 FROM tab0 AS cor0
----
-55
-85
-91

skipif mysql # not compatible
query I rowsort label-4795
SELECT ALL - + col1 + + 42 / col2 AS col2 FROM tab0 AS cor0
----
-55
-85
-91

query I rowsort
SELECT DISTINCT + ( col1 ) + - col0 * ( col0 ) FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT - + 0 * col1 + + col0 AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL ( col1 ) * - col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT 34 AS col2 FROM tab2 cor0
----
34

query I rowsort
SELECT DISTINCT - col2 + col2 * col0 * 91 AS col2 FROM tab2
----
17172
184522
273144

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + tab2.col1 + + tab2.col1 + - ( col1 ) col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT ALL - + 98 FROM tab2 AS cor0
----
-98
-98
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 83 * - col1 col1 FROM tab2 AS cor0
----
1411
2573
4897

query I rowsort
SELECT ALL - col1 * cor0.col1 * + ( - col0 * col1 ) AS col0 FROM tab1 AS cor0
----
175760
52728
64000

query I rowsort
SELECT DISTINCT + 25 + + col2 AS col1 FROM tab1 AS cor0
----
121
79
82

query I rowsort
SELECT DISTINCT - - col2 * cor0.col1 + 26 FROM tab0 AS cor0
----
123
2864
7488

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4807
SELECT ALL + - col0 + col0 + CAST( + col0 AS SIGNED ) * + col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-4807
SELECT ALL + - col0 + col0 + CAST ( + col0 AS INTEGER ) * + col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - + cor0.col0 + col0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 43 * - col2 + ( - ( + col1 ) * - col2 ) FROM tab2 AS cor0
----
1998
2280
2652

query I rowsort
SELECT 75 * col0 AS col0 FROM tab1 cor0
----
225
4800
6000

query I rowsort
SELECT DISTINCT + - col2 + - col1 + col0 * 61 * col0 AS col1 FROM tab1 AS cor0
----
249789
390291
469

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 + 22 * - cor0.col1 col0 FROM tab1 AS cor0
----
350
832
962

query I rowsort
SELECT - col2 + - ( - col1 ) + + col1 FROM tab2 cor0
----
-4
35
92

query I rowsort
SELECT DISTINCT col0 * cor0.col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + col0 * col2 * - 65 + + cor0.col1 AS col0 FROM tab2 cor0
----
-12254
-131761
-195113

query I rowsort
SELECT col0 * - col0 + col1 AS col1 FROM tab0 AS cor0
----
-1128
-490
-7830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4817
SELECT + + col1 + - CAST( NULL AS SIGNED ) / 12 col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4817
SELECT + + col1 + - CAST ( NULL AS INTEGER ) / 12 col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * col2 - cor0.col1 * col0 FROM tab1 AS cor0
----
-70
1326
208

query I rowsort
SELECT DISTINCT col0 + + ( col2 * col1 ) AS col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL + + col1 * - 70 AS col0 FROM tab2 AS cor0
----
-1190
-2170
-4130

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 - + ( col2 ) col1 FROM tab1 cor0
----
-108
-114
-192

query I rowsort
SELECT + col0 * 49 AS col1 FROM tab0 AS cor0
----
1176
1715
4361

query I rowsort
SELECT ALL col1 * 65 - - col0 FROM tab1 AS cor0
----
1693
714
925

query I rowsort
SELECT + cor0.col2 * + col1 + col2 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-4825
SELECT - col0 + - ( - col1 ) DIV col0 FROM tab0 AS cor0
----
-21
-33
-88

skipif mysql # not compatible
query I rowsort label-4825
SELECT - col0 + - ( - col1 ) / col0 FROM tab0 AS cor0
----
-21
-33
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-4826
SELECT - cor0.col2 DIV + col2 + + 34 FROM tab0 AS cor0
----
33
33
33

skipif mysql # not compatible
query I rowsort label-4826
SELECT - cor0.col2 / + col2 + + 34 FROM tab0 AS cor0
----
33
33
33

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 cor1, tab2 AS cor2, tab1 AS cor3
----
3645 values hashing to 40a052eaf1d698dbf3ba319dc3e245ee

query I rowsort
SELECT - col1 * - col1 + + tab2.col0 * + col2 + col0 * col0 FROM tab2
----
11593
1199
9532

onlyif mysql # use DIV operator for integer division
query I rowsort label-4829
SELECT col1 DIV 69 AS col2 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4829
SELECT col1 / 69 AS col2 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4830
SELECT - col0 DIV col0 + col1 FROM tab2 AS cor0
----
16
30
58

skipif mysql # not compatible
query I rowsort label-4830
SELECT - col0 / col0 + col1 FROM tab2 AS cor0
----
16
30
58

query I rowsort
SELECT DISTINCT - col2 * - 41 + 24 AS col2 FROM tab0 AS cor0
----
1377
3386
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4832
SELECT CAST( - col1 * - col2 AS SIGNED ) + 13 FROM tab0
----
110
2851
7475

skipif mysql # not compatible
query I rowsort label-4832
SELECT CAST ( - col1 * - col2 AS INTEGER ) + 13 FROM tab0
----
110
2851
7475

query I rowsort
SELECT ALL + 13 AS col2 FROM tab0, tab2 AS cor0, tab1, tab1 cor1
----
81 values hashing to b092e3fa17e78608cf120e97d1bfff67

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1, tab2 AS cor0 WHERE NULL = NULL
----

query I rowsort
SELECT ALL ( - col2 * - col2 + 10 ) AS col1 FROM tab1
----
2926
3259
9226

query I rowsort
SELECT ALL - 93 - col0 FROM tab1 AS cor0
----
-157
-173
-96

query I rowsort
SELECT DISTINCT 75 * - col1 FROM tab2 cor0
----
-1275
-2325
-4425

onlyif mysql # use DIV operator for integer division
query I rowsort label-4838
SELECT DISTINCT - 65 * col1 - + col2 DIV + cor0.col2 AS col2 FROM tab0 AS cor0
----
-5591
-5916
-6306

skipif mysql # not compatible
query I rowsort label-4838
SELECT DISTINCT - 65 * col1 - + col2 / + cor0.col2 AS col2 FROM tab0 AS cor0
----
-5591
-5916
-6306

query I rowsort
SELECT ALL + col1 * + cor0.col2 - col0 FROM tab1 AS cor0
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-4840
SELECT ALL + + 18 + - col0 * ( + cor0.col0 + col0 ) DIV 89 AS col0 FROM tab0 AS cor0
----
-160
-9
6

skipif mysql # not compatible
query I rowsort label-4840
SELECT ALL + + 18 + - col0 * ( + cor0.col0 + col0 ) / 89 AS col0 FROM tab0 AS cor0
----
-160
-9
6

query I rowsort
SELECT - ( col0 ) * - col2 + col1 AS col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL col2 - cor0.col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL - - ( - cor0.col0 ) * col2 * - 8 FROM tab2 AS cor0
----
1512
16224
24016

query I rowsort
SELECT - col0 + - col1 + + col1 * + col1 AS col0 FROM tab0 AS cor0
----
7286
8101
9277

query I rowsort
SELECT DISTINCT + - col1 * - col2 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - + ( col0 ) * cor0.col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT + - col1 + 62 AS col1 FROM tab1 AS cor0
----
36
49
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-4848
SELECT DISTINCT + + col2 * 57 + - col1 DIV ( col2 ) AS col1 FROM tab1 AS cor0
----
3078
3249
5472

skipif mysql # not compatible
query I rowsort label-4848
SELECT DISTINCT + + col2 * 57 + - col1 / ( col2 ) AS col1 FROM tab1 AS cor0
----
3078
3249
5472

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * tab1.col1 col2 FROM tab1
----
100
169
676

query I rowsort
SELECT DISTINCT cor0.col1 * + 40 AS col0 FROM tab0, tab1 cor0
----
1040
400
520

onlyif mysql # use DIV operator for integer division
query I rowsort label-4851
SELECT - 91 DIV col0 AS col1 FROM tab1
----
-1
-1
-30

skipif mysql # not compatible
query I rowsort label-4851
SELECT - 91 / col0 AS col1 FROM tab1
----
-1
-1
-30

query I rowsort
SELECT DISTINCT col2 + - ( col0 + col1 * col0 ) FROM tab0
----
-2055
-3429
-8106

query I rowsort
SELECT ALL col1 + col1 + 6 FROM tab1
----
26
32
58

query I rowsort
SELECT + col2 + - 36 FROM tab2 AS cor0
----
-10
-9
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-4855
SELECT DISTINCT + col0 + + 76 DIV + col1 col0 FROM tab1
----
5
71
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4855
SELECT DISTINCT + col0 + + 76 / + col1 col0 FROM tab1
----
5
71
85

query I rowsort
SELECT ALL - cor0.col1 * 5 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to e8340b26d808a189ae4a60f83ab20db5

query I rowsort
SELECT - col0 * tab1.col0 AS col1 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT col1 * + 81 + - col1 AS col1 FROM tab1
----
1040
2080
800

query I rowsort
SELECT col1 * - col1 + - col1 AS col1 FROM tab1 AS cor0
----
-110
-182
-702

query I rowsort
SELECT col0 * col1 * - col1 + + col2 AS col0 FROM tab2 AS cor0
----
-22793
-271492
-6700

query I rowsort
SELECT ALL col1 * - 3 + col1 + - col0 AS col0 FROM tab0
----
-196
-229
-271

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4862
SELECT + CAST( NULL AS DECIMAL ) FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4862
SELECT + CAST ( NULL AS REAL ) FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4863
SELECT DISTINCT col0 DIV - col1 + 1 - col1 FROM tab0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-4863
SELECT DISTINCT col0 / - col1 + 1 - col1 FROM tab0
----
-85
-90
-96

query I rowsort
SELECT - cor0.col0 * col0 - - col2 * col0 AS col2 FROM tab0 cor0
----
-1190
-623
216

query I rowsort
SELECT - - cor0.col1 + ( col0 ) AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL + - col1 * - col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - col2 + 44 AS col2 FROM tab1 cor0
----
-10
-13
-52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4868
SELECT DISTINCT col2 * CAST( - col0 AS SIGNED ) + col0 FROM tab2
----
-182
-1950
-2923

skipif mysql # not compatible
query I rowsort label-4868
SELECT DISTINCT col2 * CAST ( - col0 AS INTEGER ) + col0 FROM tab2
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 + 80 col2 FROM tab1 AS cor0
----
1328
1484
650

query I rowsort
SELECT col2 * ( + col2 ) + + 35 AS col2 FROM tab1 AS cor0
----
2951
3284
9251

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - col1 AS REAL ) + + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 4 AS col2 FROM tab1 AS cor0
----
-4

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab2 cor1, tab2 cor2
----
972 values hashing to 958533d1a7bf61199ed7c03eadf37f9a

query I rowsort
SELECT DISTINCT + ( + cor0.col1 ) * - cor0.col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col2 ) * - col1 * - col2 + cor0.col1 + col1 col2 FROM tab0 AS cor0
----
-611702
-93482
97

query I rowsort
SELECT ALL - col0 * col1 + col2 AS col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT + col0 + - 74 FROM tab2 AS cor0
----
-67
4
5

query I rowsort
SELECT - - ( - col1 ) * - 36 + col2 FROM tab1 AS cor0
----
417
564
990

query I rowsort
SELECT 33 + col1 FROM tab0
----
119
124
130

query I rowsort
SELECT col1 * + col1 - col2 FROM tab2
----
251
3455
934

onlyif mysql # use DIV operator for integer division
query I rowsort label-4881
SELECT 88 - col1 DIV tab2.col1 AS col1 FROM tab2
----
87
87
87

skipif mysql # not compatible
query I rowsort label-4881
SELECT 88 - col1 / tab2.col1 AS col1 FROM tab2
----
87
87
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-4882
SELECT + 45 DIV + col1 AS col2 FROM tab2 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4882
SELECT + 45 / + col1 AS col2 FROM tab2 AS cor0
----
0
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-4883
SELECT ALL - cor0.col2 * + cor0.col2 + col1 DIV + ( + col0 ) col2 FROM tab1 AS cor0
----
-2908
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4883
SELECT ALL - cor0.col2 * + cor0.col2 + col1 / + ( + col0 ) col2 FROM tab1 AS cor0
----
-2908
-3249
-9216

query I rowsort
SELECT DISTINCT + 38 AS col0 FROM tab2 cor0
----
38

query I rowsort
SELECT ALL - - cor0.col0 * - col1 + col1 * ( cor0.col1 * - ( col2 ) ) AS col1 FROM tab1 AS cor0
----
-17264
-36582
-6340

query I rowsort
SELECT ALL - col2 * cor0.col2 + col1 FROM tab0 cor0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4887
SELECT - col1 DIV - cor0.col1 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4887
SELECT - col1 / - cor0.col1 AS col2 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4888
SELECT DISTINCT - col2 + cor0.col2 * 20 + - col2 DIV - 94 FROM tab1 AS cor0
----
1026
1083
1825

skipif mysql # not compatible
query I rowsort label-4888
SELECT DISTINCT - col2 + cor0.col2 * 20 + - col2 / - 94 FROM tab1 AS cor0
----
1026
1083
1825

query I rowsort
SELECT DISTINCT - col2 * - col1 + + col1 * + cor0.col2 FROM tab0 AS cor0
----
14924
194
5676

query I rowsort
SELECT + + col0 - + col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4891
SELECT col2 DIV + col1 AS col2 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-4891
SELECT col2 / + col1 AS col2 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT ALL - col0 + + col2 * col0 AS col1 FROM tab0 AS cor0
----
0
7209
768

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + ( + 53 ) * col1 col0 FROM tab1 AS cor0
----
1432
587
785

onlyif mysql # use DIV operator for integer division
query I rowsort label-4894
SELECT DISTINCT - col1 * col2 DIV 5 AS col0 FROM tab0 AS cor0
----
-1492
-19
-567

skipif mysql # not compatible
query I rowsort label-4894
SELECT DISTINCT - col1 * col2 / 5 AS col0 FROM tab0 AS cor0
----
-1492
-19
-567

query I rowsort
SELECT - - col0 + ( 44 ) AS col0 FROM tab0 AS cor0
----
133
68
79

query I rowsort
SELECT DISTINCT + col2 * ( + cor0.col0 ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + col0 + cor0.col0 - - col2 FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT ALL cor0.col0 * - col0 + 94 FROM tab0 AS cor0
----
-1131
-482
-7827

query I rowsort
SELECT DISTINCT + col1 + col1 * cor0.col2 * cor0.col0 + + 43 FROM tab0 AS cor0
----
3535
664252
68241

query I rowsort
SELECT 54 - col1 FROM tab2
----
-5
23
37

query I rowsort
SELECT - tab2.col0 AS col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT + col1 * cor0.col2 + cor0.col1 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL - - 18 AS col1 FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT cor0.col2 + col2 * + 40 FROM tab0 AS cor0
----
1353
3362
41

query I rowsort
SELECT + 25 + + 64 + col0 FROM tab0
----
113
124
178

query I rowsort
SELECT ALL - col2 * col1 - col1 FROM tab0
----
-194
-2924
-7553

query I rowsort
SELECT ALL 17 + - col1 * + 96 AS col1 FROM tab2
----
-1615
-2959
-5647

query I rowsort
SELECT DISTINCT tab0.col1 AS col0 FROM tab0, tab2, tab1 AS cor0, tab0 cor1
----
86
91
97

query I rowsort
SELECT ALL 76 + + col1 * 45 * col1 FROM tab0
----
332896
372721
423481

query I rowsort
SELECT col1 + col0 + col1 AS col1 FROM tab2
----
113
196
69

query I rowsort
SELECT - tab0.col1 * - col1 + + col0 AS col2 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT + col1 + col0 * - 8 FROM tab2
----
-25
-565
-615

query I rowsort
SELECT DISTINCT + 83 * cor0.col2 FROM tab2, tab0 AS cor0
----
2739
6806
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 68 col1 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 6fbba7db5bccb533a35aa5125a231f88

query I rowsort
SELECT + col0 + ( tab0.col2 ) * + col0 AS col1 FROM tab0
----
70
7387
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - ( + tab1.col0 ) col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL cor2.col0 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT DISTINCT col1 * - ( + col0 ) AS col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + - col2 + + col0 * + col2 FROM tab1 AS cor0
----
108
3591
7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4920
SELECT ALL - CAST( - 67 AS SIGNED ) + col0 AS col0 FROM tab2 AS cor0
----
145
146
74

skipif mysql # not compatible
query I rowsort label-4920
SELECT ALL - CAST ( - 67 AS INTEGER ) + col0 AS col0 FROM tab2 AS cor0
----
145
146
74

query I rowsort
SELECT DISTINCT - col2 * ( + col0 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL 88 * + col1 AS col1 FROM tab1 AS cor0
----
1144
2288
880

query I rowsort
SELECT DISTINCT - + ( col2 ) * + col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - cor0.col0 * - 3 * col0 AS col0 FROM tab1 AS cor0
----
12288
19200
27

query I rowsort
SELECT DISTINCT + 1 * - 81 + col0 AS col1 FROM tab1 AS cor0
----
-1
-17
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4926
SELECT ( - col0 + + col2 ) DIV 4 FROM tab2
----
-10
-13
5

skipif mysql # not compatible
query I rowsort label-4926
SELECT ( - col0 + + col2 ) / 4 FROM tab2
----
-10
-13
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 19 * - 79 - - col2 col1 FROM tab1 cor0
----
1555
1558
1597

query I rowsort
SELECT DISTINCT + col1 + + col0 * - cor0.col1 * + col2 AS col2 FROM tab1 cor0
----
-36470
-4186
-99827

query I rowsort
SELECT ALL - - col1 * + 67 * col1 + ( - col1 ) FROM tab1 AS cor0
----
11310
45266
6690

query I rowsort
SELECT DISTINCT - col2 + 76 AS col1 FROM tab1 AS cor0
----
-20
19
22

onlyif mysql # use DIV operator for integer division
query I rowsort label-4931
SELECT ALL - 51 - 68 DIV - col1 AS col1 FROM tab1 AS cor0
----
-45
-46
-49

skipif mysql # not compatible
query I rowsort label-4931
SELECT ALL - 51 - 68 / - col1 AS col1 FROM tab1 AS cor0
----
-45
-46
-49

query I rowsort
SELECT DISTINCT + 53 * ( col2 ) FROM tab2 AS cor0
----
1378
1431
2014

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( ( col2 ) ) col2 FROM tab2
----
26
27
38

query I rowsort
SELECT ALL col0 * - ( col1 ) AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - 18 * + col1 FROM tab1 cor0
----
-180
-234
-468

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4936
SELECT + CAST( NULL AS SIGNED ) * + ( cor0.col2 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4936
SELECT + CAST ( NULL AS INTEGER ) * + ( cor0.col2 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + cor0.col0 + ( cor0.col0 ) * 99 AS col0 FROM tab2 AS cor0
----
686
7644
7742

query I rowsort
SELECT + cor0.col2 * col2 - + 48 AS col0 FROM tab1 AS cor0
----
2868
3201
9168

query I rowsort
SELECT 76 * col2 FROM tab0 AS cor0
----
2508
6232
76

query I rowsort
SELECT - + col1 * col2 AS col0 FROM tab0 cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * - col1 + 19 - cor0.col0 * cor0.col0 * 58 col1 FROM tab2 AS cor0
----
-2606
-348251
-360616

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col2 - + cor0.col1 * col1 * + col1 col2 FROM tab2 AS cor0
----
-205294
-29733
-4858

query I rowsort
SELECT DISTINCT col1 * + ( - col0 ) FROM tab2
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 89 * + col1 col0 FROM tab0 cor0
----
7654
8099
8633

query I rowsort
SELECT ALL col0 + ( + col0 ) FROM tab2 AS cor0
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-4946
SELECT DISTINCT - col2 + CAST( col1 AS SIGNED ) DIV - col0 col2 FROM tab0 AS cor0
----
-3
-36
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4946
SELECT DISTINCT - col2 + CAST ( col1 AS INTEGER ) / - col0 col2 FROM tab0 AS cor0
----
-3
-36
-83

query I rowsort
SELECT col2 * - col2 AS col0 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL + + col0 * + 78 AS col2 FROM tab0 AS cor0
----
1872
2730
6942

query I rowsort
SELECT ALL col2 * + 72 FROM tab0 AS cor0
----
2376
5904
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-4950
SELECT DISTINCT + col0 + - col0 DIV 1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4950
SELECT DISTINCT + col0 + - col0 / 1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT - 42 + + col1 AS col0 FROM tab1
----
-16
-29
-32

query I rowsort
SELECT col1 + col1 + col1 FROM tab0 cor0
----
258
273
291

query I rowsort
SELECT - - col1 * - 94 + 32 * col1 * + cor0.col1 FROM tab2 AS cor0
----
105846
27838
7650

query I rowsort
SELECT col0 * col0 + - col0 * - col1 AS col1 FROM tab0 AS cor0
----
16020
2640
4620

query I rowsort
SELECT + col2 * - 14 + col1 * + col0 FROM tab0
----
1602
3381
6951

query I rowsort
SELECT ( 6 ) AS col2 FROM tab1 AS cor0
----
6
6
6

query I rowsort
SELECT - cor0.col2 + + cor0.col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * col0 + + col0 + + col1 FROM tab2 AS cor0
----
-1247
-179
-4465

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col0 col0 FROM tab0
----
0

query I rowsort
SELECT + 55 + tab1.col2 * col1 FROM tab1
----
1303
1459
625

query I rowsort
SELECT ALL + - col2 + col1 * + col0 AS col1 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 + col0 AS col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ALL - col1 * + col2 * - col2 FROM tab2 cor0
----
22599
24548
39884

query I rowsort
SELECT 51 + + col1 * - cor0.col0 * + col2 FROM tab1 AS cor0
----
-36429
-4161
-99789

query I rowsort
SELECT - 33 - + col0 * - col2 * - col1 AS col1 FROM tab0 cor0
----
-3428
-664151
-68145

query I rowsort
SELECT 51 + cor0.col2 AS col2 FROM tab1 AS cor0
----
105
108
147

query I rowsort
SELECT DISTINCT + + col1 * - col2 + - col0 FROM tab0 cor0
----
-132
-2862
-7551

query I rowsort
SELECT ALL + col0 * + col0 + col1 * - col2 + cor0.col0 FROM tab2 AS cor0
----
-781
4628
5674

query I rowsort
SELECT ALL col0 + col1 + - col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col0 * + tab2.col0 * col1 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT DISTINCT + col2 + - col0 + col1 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT col0 + cor0.col1 * col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + + 1 * col2 * col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4975
SELECT ALL CAST( col1 AS SIGNED ) AS col2 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-4975
SELECT ALL CAST ( col1 AS INTEGER ) AS col2 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL + tab2.col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4977
SELECT DISTINCT CAST( col1 AS SIGNED ) * + col0 AS col1 FROM tab2
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-4977
SELECT DISTINCT CAST ( col1 AS INTEGER ) * + col0 AS col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL - ( ( - col2 ) ) FROM tab2
----
26
27
38

query I rowsort
SELECT - 62 - col1 * col0 AS col2 FROM tab0 AS cor0
----
-2126
-3457
-8161

query I rowsort
SELECT col1 + ( col0 ) AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + 77 AS col1 FROM tab0
----
77
77
77

query I rowsort
SELECT - ( col2 + tab1.col0 ) * col0 FROM tab1
----
-14080
-171
-7744

query I rowsort
SELECT DISTINCT ( - col2 * + col0 ) - - col0 * + col2 FROM tab0
----
0

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT col2 FROM tab2 AS cor0 WHERE NOT NULL NOT IN ( col2 )
----

query I rowsort
SELECT DISTINCT col2 * col2 * col1 AS col1 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT ALL tab2.col2 FROM tab2 AS cor0 CROSS JOIN tab2
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # use DIV operator for integer division
query I rowsort label-4988
SELECT DISTINCT tab1.col2 * + col1 + + col0 + - col1 DIV - col1 FROM tab1
----
1329
1408
635

skipif mysql # not compatible
query I rowsort label-4988
SELECT DISTINCT tab1.col2 * + col1 + + col0 + - col1 / - col1 FROM tab1
----
1329
1408
635

query I rowsort
SELECT DISTINCT - col2 * col0 + - col2 - - tab2.col1 AS col1 FROM tab2
----
-185
-1995
-3023

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col1 col1 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT tab0.col1 * + col1 * col2 - col1 * - col2 AS col2 FROM tab0
----
246906
686504
9506

query I rowsort
SELECT ALL + col1 * + col1 FROM tab1 WHERE NOT ( NULL ) NOT IN ( col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + tab0.col2 col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT col0 + + col0 - col2 FROM tab2
----
-13
120
130

onlyif mysql # use DIV operator for integer division
query I rowsort label-4995
SELECT ALL col1 DIV col2 - col1 DIV col0 AS col1 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-4995
SELECT ALL col1 / col2 - col1 / col0 AS col1 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT tab0.col2 + + tab0.col2 AS col1 FROM tab0
----
164
2
66

query I rowsort
SELECT ALL col1 + + col1 * - col0 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT ALL - tab0.col2 * col2 + - col1 * col1 + tab0.col0 * tab0.col1 FROM tab0
----
-6015
-6421
-6906

onlyif mysql # use DIV operator for integer division
query I rowsort label-4999
SELECT ALL col0 + col0 DIV + col2 + - col1 col2 FROM tab0
----
-1
-27
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4999
SELECT ALL col0 + col0 / + col2 + - col1 col2 FROM tab0
----
-1
-27
-62

query I rowsort
SELECT ALL - col2 + - col2 * col0 AS col0 FROM tab1
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT - + col0 * - cor0.col2 + col0 AS col1 FROM tab0 AS cor0
----
70
7387
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + col2 col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT col0 + cor0.col0 * col2 * col1 FROM tab1 AS cor0
----
36544
4215
99920

query I rowsort
SELECT ALL - col2 - + col0 FROM tab2 cor0
----
-104
-117
-34

query I rowsort
SELECT - col0 + col2 * cor0.col0 FROM tab2 AS cor0
----
182
1950
2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-5006
SELECT DISTINCT + - col2 DIV col0 AS col2 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-5006
SELECT DISTINCT + - col2 / col0 AS col2 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT + cor0.col2 * 40 FROM tab2 AS cor0
----
1040
1080
1520

query I rowsort
SELECT ALL + col0 * - ( cor0.col2 ) * col1 AS col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT - col1 - cor0.col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - 90 + + col0 FROM tab1
----
-10
-26
-87

query I rowsort
SELECT + ( col2 * - col1 ) - 79 AS col2 FROM tab0
----
-176
-2917
-7541

query I rowsort
SELECT col1 * - 34 AS col1 FROM tab2
----
-1054
-2006
-578

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5013
SELECT DISTINCT col0 - CAST( NULL AS SIGNED ) * + col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-5013
SELECT DISTINCT col0 - CAST ( NULL AS INTEGER ) * + col2 FROM tab1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5014
SELECT - col0 + - CAST( col0 AS SIGNED ) + + col0 * - col2 FROM tab2
----
-203
-2184
-3160

skipif mysql # not compatible
query I rowsort label-5014
SELECT - col0 + - CAST ( col0 AS INTEGER ) + + col0 * - col2 FROM tab2
----
-203
-2184
-3160

query I rowsort
SELECT + 53 * col2 + col1 AS col0 FROM tab2 AS cor0
----
1437
1462
2031

query I rowsort
SELECT DISTINCT - 98 * + col2 FROM tab1 cor0
----
-5292
-5586
-9408

query I rowsort
SELECT + ( col2 ) + + col2 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-5018
SELECT DISTINCT 73 DIV - col2 + col0 * col1 FROM tab1
----
1040
639
77

skipif mysql # not compatible
query I rowsort label-5018
SELECT DISTINCT 73 / - col2 + col0 * col1 FROM tab1
----
1040
639
77

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) + - col1 * + 64 * - col1 FROM tab2 AS cor0
----
18479
222725
61473

onlyif mysql # use DIV operator for integer division
query I rowsort label-5020
SELECT ALL col1 DIV col2 - ( + col1 ) * col2 FROM tab0 AS cor0
----
-2836
-7461
0

skipif mysql # not compatible
query I rowsort label-5020
SELECT ALL col1 / col2 - ( + col1 ) * col2 FROM tab0 AS cor0
----
-2836
-7461
0

query I rowsort
SELECT ALL 68 + - col2 * 17 AS col0 FROM tab1 AS cor0
----
-1564
-850
-901

query I rowsort
SELECT + - 16 FROM tab0 cor0
----
-16
-16
-16

query I rowsort
SELECT ALL - + 35 * + col2 FROM tab0 AS cor0
----
-1155
-2870
-35

query I rowsort
SELECT ALL - col0 * tab0.col1 + col2 AS col0 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT col0 * - col1 + - tab1.col1 FROM tab1
----
-104
-1053
-650

query I rowsort
SELECT ( + 5 ) AS col0 FROM tab2
----
5
5
5

query I rowsort
SELECT DISTINCT - col0 * + col2 - - col0 * col1 FROM tab1 AS cor0
----
-3008
-6640
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5028
SELECT ALL - ( - col2 ) * + CAST( + col2 AS SIGNED ) - + cor0.col1 * 50 AS col0 FROM tab1 AS cor0
----
1616
2749
8566

skipif mysql # not compatible
query I rowsort label-5028
SELECT ALL - ( - col2 ) * + CAST ( + col2 AS INTEGER ) - + cor0.col1 * 50 AS col0 FROM tab1 AS cor0
----
1616
2749
8566

query I rowsort
SELECT DISTINCT 42 + - cor0.col0 * + ( + 61 ) FROM tab2 AS cor0
----
-385
-4716
-4777

query I rowsort
SELECT DISTINCT - 63 + col1 + - col0 AS col2 FROM tab2 AS cor0
----
-125
-39
-82

query I rowsort
SELECT ALL - 78 * col0 AS col0 FROM tab0 AS cor0
----
-1872
-2730
-6942

query I rowsort
SELECT ALL col0 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5033
SELECT DISTINCT + cor0.col1 + col1 DIV ( - col0 ) FROM tab1 AS cor0
----
10
13
18

skipif mysql # not compatible
query I rowsort label-5033
SELECT DISTINCT + cor0.col1 + col1 / ( - col0 ) FROM tab1 AS cor0
----
10
13
18

query I rowsort
SELECT - 7 + + col2 * + col1 FROM tab0
----
2831
7455
90

skipif mysql # not compatible
query I rowsort
SELECT + col2 * + CAST ( + 67 AS REAL ) FROM tab0 AS cor0
----
2211
5494
67

query I rowsort
SELECT DISTINCT + 3 * - col2 * col2 FROM tab2
----
-2028
-2187
-4332

query I rowsort
SELECT tab0.col1 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - 46 * + col2 FROM tab0
----
-1518
-3772
-46

query I rowsort
SELECT - tab2.col1 * 21 FROM tab2, tab2 AS cor0
----
9 values hashing to a9e5e2583764024073881a3f58315eb6

query I rowsort
SELECT DISTINCT ( + 61 ) FROM tab0, tab2 AS cor0, tab1 AS cor1
----
61

query I rowsort
SELECT + col0 * - 29 FROM tab1 AS cor0
----
-1856
-2320
-87

query I rowsort
SELECT col0 + + 43 AS col0 FROM tab1 AS cor0
----
107
123
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col0 + col1 + - cor0.col1 * col0 col1 FROM tab1 AS cor0
----
-214
-4278
-8707

query I rowsort
SELECT + col2 + + cor0.col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL + 12 + - col0 AS col0 FROM tab2 cor0
----
-66
-67
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5046
SELECT - CAST( NULL AS DECIMAL ) + + ( cor0.col2 + + col0 ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5046
SELECT - CAST ( NULL AS REAL ) + + ( cor0.col2 + + col0 ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 65 FROM tab2, tab1 cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT + col0 + + 99 AS col0 FROM tab2
----
106
177
178

query I rowsort
SELECT - - col2 - - 29 * + col0 FROM tab2 AS cor0
----
2288
230
2329

query I rowsort
SELECT + 96 + + col0 * + cor0.col1 FROM tab0 AS cor0
----
2160
3491
8195

query I rowsort
SELECT - ( + 38 ) - + cor0.col1 * - 65 FROM tab0 AS cor0
----
5552
5877
6267

query I rowsort
SELECT - + 68 * - 69 FROM tab0 AS cor0
----
4692
4692
4692

query I rowsort
SELECT DISTINCT - + col0 * + 50 FROM tab1 AS cor0
----
-150
-3200
-4000

query I rowsort
SELECT DISTINCT col1 * - col0 * col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT + + col1 * 35 FROM tab0 AS cor0
----
3010
3185
3395

query I rowsort
SELECT ALL col1 * + col0 + col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT cor0.col1 + ( + col2 ) * 21 FROM tab2 AS cor0
----
598
605
815

query I rowsort
SELECT + 99 * col2 FROM tab0 cor0
----
3267
8118
99

query I rowsort
SELECT ALL + + 13 * - col2 * col2 FROM tab1 AS cor0
----
-119808
-37908
-42237

query I rowsort
SELECT + col0 * + col0 + + col2 + 9 FROM tab1 AS cor0
----
4162
6505
72

query I rowsort
SELECT 88 * col1 FROM tab0 AS cor0
----
7568
8008
8536

query I rowsort
SELECT DISTINCT - ( col1 ) * - col2 + + 97 * col2 + + col1 FROM tab2
----
3487
4115
4349

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab1, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - col2 + col1 * - ( col2 ) FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL ( + tab1.col0 * + col0 ) AS col2 FROM tab1
----
4096
6400
9

query I rowsort
SELECT col0 + tab1.col1 + 53 FROM tab1
----
127
146
82

query I rowsort
SELECT DISTINCT ( cor0.col2 ) - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5068
SELECT + col2 DIV col2 + - ( - 54 ) AS col0 FROM tab0 AS cor0
----
55
55
55

skipif mysql # not compatible
query I rowsort label-5068
SELECT + col2 / col2 + - ( - 54 ) AS col0 FROM tab0 AS cor0
----
55
55
55

query I rowsort
SELECT ALL + 50 + col2 - 69 AS col2 FROM tab1 cor0
----
35
38
77

query I rowsort
SELECT + col1 * + col0 + col2 AS col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT - col2 * col0 + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL col2 + - cor0.col1 AS col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT - col0 * cor0.col2 - col1 FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-5074
SELECT ALL - 48 + - col0 DIV 12 FROM tab0 AS cor0
----
-50
-50
-55

skipif mysql # not compatible
query I rowsort label-5074
SELECT ALL - 48 + - col0 / 12 FROM tab0 AS cor0
----
-50
-50
-55

query I rowsort
SELECT - ( - col1 ) + + col1 AS col2 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL + col0 - + col0 AS col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL + - 37 * col0 AS col2 FROM tab1 AS cor0
----
-111
-2368
-2960

onlyif mysql # use DIV operator for integer division
query I rowsort label-5078
SELECT col0 * col2 + 1 DIV + col1 AS col1 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-5078
SELECT col0 * col2 + 1 / + col1 AS col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + cor0.col0 col1 FROM tab0 AS cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col0 ) + - col2 col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL + col1 * col2 + + col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT col1 - tab2.col1 * col1 * col2 FROM tab2
----
-10965
-25916
-90447

query I rowsort
SELECT + cor0.col1 + 37 * col1 FROM tab0 AS cor0
----
3268
3458
3686

onlyif mysql # use DIV operator for integer division
query I rowsort label-5084
SELECT + + col1 DIV - 58 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5084
SELECT + + col1 / - 58 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * cor0.col1 * - col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT ALL - 42 FROM tab0, tab2 AS cor0
----
9 values hashing to 9894093f29c0defae91347934f060329

query I rowsort
SELECT DISTINCT 36 * - 82 FROM tab2 AS cor0
----
-2952

query I rowsort
SELECT ALL + + col0 * col0 AS col1 FROM tab0 cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5089
SELECT DISTINCT - + 73 * cor0.col1 DIV col0 + ( - col2 ) + + col0 * + col1 AS col1 FROM tab0 AS cor0
----
1770
3192
7943

skipif mysql # not compatible
query I rowsort label-5089
SELECT DISTINCT - + 73 * cor0.col1 / col0 + ( - col2 ) + + col0 * + col1 AS col1 FROM tab0 AS cor0
----
1770
3192
7943

query I rowsort
SELECT ALL - - col2 * - col0 + - col2 AS col1 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT ALL 5 AS col2 FROM tab2 AS cor0
----
5
5
5

query I rowsort
SELECT DISTINCT + - 52 + + col2 * + col1 AS col1 FROM tab0 AS cor0
----
2786
45
7410

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5093
SELECT DISTINCT - - CAST( NULL AS SIGNED ) * col0 + col1 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5093
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) * col0 + col1 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - 15 * col0 FROM tab2 AS cor0
----
-105
-1170
-1185

query I rowsort
SELECT ALL + + ( cor0.col2 ) AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - 72 * + cor0.col1 + - col2 FROM tab2 AS cor0
----
-1262
-2259
-4274

onlyif mysql # use DIV operator for integer division
query I rowsort label-5097
SELECT + 55 * col1 DIV - cor0.col1 FROM tab0 AS cor0
----
-55
-55
-55

skipif mysql # not compatible
query I rowsort label-5097
SELECT + 55 * col1 / - cor0.col1 FROM tab0 AS cor0
----
-55
-55
-55

query I rowsort
SELECT ALL cor0.col2 * col0 + + col1 AS col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL col0 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) * col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + ( col0 ) * col0 + col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT col0 + - 83 FROM tab1
----
-19
-3
-80

query I rowsort
SELECT DISTINCT 23 + cor0.col2 FROM tab1 AS cor0
----
119
77
80

query I rowsort
SELECT DISTINCT + 31 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
31

query I rowsort
SELECT DISTINCT + col1 * 66 AS col1 FROM tab2
----
1122
2046
3894

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2 AS cor2
----
3645 values hashing to 42d854e4c33cb5afd5528228bff9250d

onlyif mysql # use DIV operator for integer division
query I rowsort label-5107
SELECT col2 DIV - CAST( col0 AS SIGNED ) + col1 * + 57 * + col0 FROM tab0 AS cor0
----
117647
193515
461643

skipif mysql # not compatible
query I rowsort label-5107
SELECT col2 / - CAST ( col0 AS INTEGER ) + col1 * + 57 * + col0 FROM tab0 AS cor0
----
117647
193515
461643

query I rowsort
SELECT DISTINCT col2 + - col1 AS col2 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-5109
SELECT cor0.col1 + - ( col1 + - col2 ) DIV + col1 AS col1 FROM tab2 cor0
----
18
31
59

skipif mysql # not compatible
query I rowsort label-5109
SELECT cor0.col1 + - ( col1 + - col2 ) / + col1 AS col1 FROM tab2 cor0
----
18
31
59

query I rowsort
SELECT DISTINCT + col1 * - 4 + + 7 FROM tab0 AS cor0
----
-337
-357
-381

query I rowsort
SELECT ALL cor0.col0 + 7 * - col1 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
-51748
-57878
-65828

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5112
SELECT ALL - col0 * CAST( NULL AS SIGNED ) * - col1 + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5112
SELECT ALL - col0 * CAST ( NULL AS INTEGER ) * - col1 + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 + + 37 FROM tab1 cor0
----
101
117
40

query I rowsort
SELECT - col2 + 21 AS col2 FROM tab2 cor0
----
-17
-5
-6

query I rowsort
SELECT ALL - cor0.col0 * 53 + col1 AS col1 FROM tab0 AS cor0
----
-1186
-1758
-4626

query I rowsort
SELECT ALL - col1 * tab0.col0 * col1 + 82 FROM tab0
----
-177422
-329233
-736927

query I rowsort
SELECT ALL tab0.col1 + - col2 AS col2 FROM tab0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5118
SELECT - col0 * - CAST( NULL AS SIGNED ) + - col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5118
SELECT - col0 * - CAST ( NULL AS INTEGER ) + - col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 + - 86 FROM tab1
----
-22
-6
-83

query I rowsort
SELECT - col2 + 0 * col1 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT + col1 + + ( col0 ) AS col0 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col1 + ( col0 + + col1 ) * col1 col1 FROM tab1 AS cor0
----
1380
2249
832

query I rowsort
SELECT + + col1 * - cor0.col1 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL ( + tab2.col2 ) AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT 73 * col2 FROM tab0
----
2409
5986
73

query I rowsort
SELECT col2 * col0 + col2 * 29 + - cor0.col2 * col1 AS col1 FROM tab2 AS cor0
----
1248
135
3458

query I rowsort
SELECT ALL + 18 + - col0 FROM tab1 cor0
----
-46
-62
15

query I rowsort
SELECT + + 69 * col2 AS col2 FROM tab0 cor0
----
2277
5658
69

query I rowsort
SELECT + 6 + col0 + + col1 * col2 FROM tab1 cor0
----
1334
1413
640

query I rowsort
SELECT DISTINCT - - col2 * + col1 * - col1 AS col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT ALL + ( col0 ) + - cor0.col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + col0 + col1 * ( + cor0.col0 ) FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT cor1.col1 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT + col1 + + col1 * col1 AS col1 FROM tab2 AS cor0
----
306
3540
992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5135
SELECT DISTINCT - col1 + CAST( + col0 * col1 AS SIGNED ) FROM tab2 AS cor0
----
1326
186
4543

skipif mysql # not compatible
query I rowsort label-5135
SELECT DISTINCT - col1 + CAST ( + col0 * col1 AS INTEGER ) FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT + col2 - + 35 * col2 FROM tab2 AS cor0
----
-1292
-884
-918

query I rowsort
SELECT DISTINCT - col1 * + 25 FROM tab0 AS cor0
----
-2150
-2275
-2425

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 72 + + col0 + col1 col2 FROM tab1
----
-187
-4534
-5667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col1 + + col2 * col2 + cor0.col0 col2 FROM tab1 AS cor0
----
10544
3883
4323

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - cor0.col0 col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + 60 * - 61 * col0 AS col1 FROM tab1 AS cor0
----
-10980
-234240
-292800

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5142
SELECT ALL + + CAST( NULL AS SIGNED ) + - cor0.col2 * - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5142
SELECT ALL + + CAST ( NULL AS INTEGER ) + - cor0.col2 * - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 19 * - col0 AS col2 FROM tab0 AS cor0
----
1691
456
665

query I rowsort
SELECT + - ( col2 ) * - col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - tab1.col2 + 17 FROM tab1
----
-37
-40
-79

query I rowsort
SELECT ALL - 14 * col0 + col2 FROM tab0
----
-1164
-303
-489

query I rowsort
SELECT DISTINCT cor1.col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
10
13
26

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab0, tab2 cor0, tab1 AS cor1
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5149
SELECT ALL - col1 DIV 55 + + tab1.col1 AS col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5149
SELECT ALL - col1 / 55 + + tab1.col1 AS col2 FROM tab1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5150
SELECT + CAST( cor1.col0 AS SIGNED ) FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

skipif mysql # not compatible
query I rowsort label-5150
SELECT + CAST ( cor1.col0 AS INTEGER ) FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT col0 * + col0 + - col2 AS col1 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT + col2 * + col2 * - col2 FROM tab0 AS cor0
----
-1
-35937
-551368

query I rowsort
SELECT - col1 + - col2 + ( + col0 ) FROM tab0 AS cor0
----
-63
-84
-95

query I rowsort
SELECT col2 * col1 + col0 + - col2 FROM tab1 AS cor0
----
1232
1353
577

query I rowsort
SELECT DISTINCT + col1 + + 11 FROM tab1 AS cor0
----
21
24
37

query I rowsort
SELECT DISTINCT + 14 + col0 FROM tab0
----
103
38
49

query I rowsort
SELECT 33 AS col1 FROM tab0 AS cor0
----
33
33
33

query I rowsort
SELECT cor0.col0 + + tab1.col0 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to b9944e8264ba49a81db9322e4d2ec488

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - - 76 col1 FROM tab0 AS cor0
----
100
111
165

query I rowsort
SELECT + cor0.col0 * - tab2.col0 FROM tab2, tab0, tab0 cor0
----
27 values hashing to 5bf5dc8f967b91d3fa0086e9c50c21a8

query I rowsort
SELECT ALL ( 10 ) AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

onlyif mysql # use DIV operator for integer division
query I rowsort label-5162
SELECT + 82 DIV col0 AS col2 FROM tab1
----
1
1
27

skipif mysql # not compatible
query I rowsort label-5162
SELECT + 82 / col0 AS col2 FROM tab1
----
1
1
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-5163
SELECT ALL + col1 DIV 83 + col1 AS col0 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-5163
SELECT ALL + col1 / 83 + col1 AS col0 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5164
SELECT col1 DIV - ( + col1 ) FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5164
SELECT col1 / - ( + col1 ) FROM tab2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + - 19 * col2 FROM tab0 AS cor0
----
-1558
-19
-627

query I rowsort
SELECT - col0 * 89 + col1 AS col2 FROM tab1 AS cor0
----
-241
-5686
-7107

query I rowsort
SELECT ALL col2 * - cor0.col1 - 17 AS col0 FROM tab0 AS cor0
----
-114
-2855
-7479

query I rowsort
SELECT DISTINCT - col0 * - col0 * 92 + col0 FROM tab2 AS cor0
----
4515
559806
574251

query I rowsort
SELECT ALL - cor0.col2 - + col2 AS col1 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT - col0 + 21 AS col0 FROM tab2 AS cor0
----
-57
-58
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-5171
SELECT DISTINCT - col1 * col0 DIV - 79 FROM tab1 cor0
----
0
13
8

skipif mysql # not compatible
query I rowsort label-5171
SELECT DISTINCT - col1 * col0 / - 79 FROM tab1 cor0
----
0
13
8

query I rowsort
SELECT DISTINCT col0 * - 72 + 62 AS col0 FROM tab1 AS cor0
----
-154
-4546
-5698

query I rowsort
SELECT DISTINCT + col2 * + 30 * - col0 FROM tab2
----
-5670
-60840
-90060

query I rowsort
SELECT 77 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT + - col1 * - 30 FROM tab0 AS cor0
----
2580
2730
2910

query I rowsort
SELECT DISTINCT - col2 * - col1 + ( col1 ) FROM tab2 AS cor0
----
1593
663
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-5177
SELECT ALL col2 DIV 85 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5177
SELECT ALL col2 / 85 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 62 col0 FROM tab1
----
62
62
62

query I rowsort
SELECT cor0.col0 + + 45 * col0 FROM tab0 cor0
----
1104
1610
4094

query I rowsort
SELECT - col0 + - 31 FROM tab1 AS cor0
----
-111
-34
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * col1 col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - 85 * + col2 + - col1 * 14 FROM tab0 cor0
----
-1443
-4009
-8244

query I rowsort
SELECT - ( + col1 ) + col0 * + col1 * - 39 FROM tab1 AS cor0
----
-24970
-3068
-40573

query I rowsort
SELECT + + ( + 12 ) FROM tab1 AS cor0
----
12
12
12

query I rowsort
SELECT col1 + col0 + - ( col1 ) * + col0 AS col1 FROM tab1 cor0
----
-49
-566
-947

query I rowsort
SELECT + - 92 + cor0.col2 FROM tab2 AS cor0
----
-54
-65
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-5187
SELECT DISTINCT cor0.col0 * + col2 - + col1 * col0 DIV - col1 FROM tab0 AS cor0
----
70
7387
816

skipif mysql # not compatible
query I rowsort label-5187
SELECT DISTINCT cor0.col0 * + col2 - + col1 * col0 / - col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - ( + col0 ) * col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5189
SELECT ALL + 72 * col2 + CAST( NULL AS SIGNED ) * col1 + + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5189
SELECT ALL + 72 * col2 + CAST ( NULL AS INTEGER ) * col1 + + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - ( - 67 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * + 51 col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 400c37b6ecc2b05b786f59ba99b585f9

query I rowsort
SELECT + 46 * + col1 FROM tab1 AS cor0
----
1196
460
598

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 0 * col1 + + 72 * col1 col2 FROM tab2 AS cor0
----
1224
2232
4248

query I rowsort
SELECT DISTINCT 68 AS col2 FROM tab0 AS cor0
----
68

query I rowsort
SELECT DISTINCT + - cor0.col1 + - col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT - + 60 * + cor0.col2 FROM tab0 cor0
----
-1980
-4920
-60

query I rowsort
SELECT DISTINCT - 38 FROM tab1 cor0
----
-38

query I rowsort
SELECT ALL + + col0 + 40 AS col1 FROM tab2 AS cor0
----
118
119
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 + - col1 * - col0 + + col0 col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + col1 * + col0 + 47 AS col2 FROM tab0 AS cor0
----
2111
3442
8146

query I rowsort
SELECT - col0 + - ( col0 ) * - col0 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT DISTINCT - - col1 + + 3 AS col0 FROM tab0 AS cor0
----
100
89
94

query I rowsort
SELECT DISTINCT 76 AS col0 FROM tab1, tab2 AS cor0
----
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 23 + col1 col0 FROM tab2 AS cor0
----
40
54
82

query I rowsort
SELECT ALL + - col0 + + col2 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT + 97 * + col1 FROM tab2 AS cor0
----
1649
3007
5723

query I rowsort
SELECT + + col0 - - col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT col0 + col2 + cor0.col0 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT DISTINCT - ( - 62 ) * cor0.col2 FROM tab2 AS cor0
----
1612
1674
2356

query I rowsort
SELECT - col2 + 33 AS col0 FROM tab2 AS cor0
----
-5
6
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5211
SELECT col0 * + 35 + - col2 DIV tab2.col1 FROM tab2
----
245
2730
2763

skipif mysql # not compatible
query I rowsort label-5211
SELECT col0 * + 35 + - col2 / tab2.col1 FROM tab2
----
245
2730
2763

query I rowsort
SELECT + + col0 * + cor0.col2 * col1 + col2 * + col2 + 65 FROM tab0 AS cor0
----
3461
670907
69266

query I rowsort
SELECT + 87 * + col2 AS col1 FROM tab0 AS cor0
----
2871
7134
87

query I rowsort
SELECT DISTINCT 72 * cor0.col2 AS col0 FROM tab0 AS cor0
----
2376
5904
72

query I rowsort
SELECT DISTINCT - 69 AS col1 FROM tab1, tab2 cor0
----
-69

query I rowsort
SELECT ALL - col1 * col1 * - col0 + - col1 + 62 * tab0.col1 AS col1 FROM tab0
----
182750
335232
742560

query I rowsort
SELECT - cor1.col1 AS col0 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT DISTINCT ( 52 ) + - col1 FROM tab1
----
26
39
42

query I rowsort
SELECT + col1 * - 49 + - col2 AS col2 FROM tab2 cor0
----
-1546
-2917
-871

query I rowsort
SELECT + col1 * col0 + - col0 - - ( - 48 * - col0 ) AS col2 FROM tab2
----
5056
546
8268

query I rowsort
SELECT DISTINCT ( col0 ) + + col1 FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5222
SELECT - tab1.col0 DIV cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 64b037c1e42f5489b5df9e07f7573f9f

skipif mysql # not compatible
query I rowsort label-5222
SELECT - tab1.col0 / cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 64b037c1e42f5489b5df9e07f7573f9f

query I rowsort
SELECT ALL 66 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT ALL - col0 + tab0.col0 + + 67 FROM tab0
----
67
67
67

query I rowsort
SELECT ALL - col0 + ( 32 ) FROM tab1 AS cor0
----
-32
-48
29

query I rowsort
SELECT + col0 * - 72 FROM tab2 cor0
----
-504
-5616
-5688

query I rowsort
SELECT DISTINCT 77 AS col0 FROM tab1, tab1 AS cor0
----
77

query I rowsort
SELECT ALL - + tab0.col1 AS col2 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT + 90 * - 32 * col1 FROM tab2 AS cor0
----
-169920
-48960
-89280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 col1 FROM tab0
----
38
38
38

query I rowsort
SELECT 8 * + col2 + col0 FROM tab2 cor0
----
223
286
383

query I rowsort
SELECT + ( + cor0.col1 ) + col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT col2 + col2 + - col0 AS col2 FROM tab1
----
105
112
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col2 + col1 col1 FROM tab0
----
53
9
96

query I rowsort
SELECT tab0.col0 + + 58 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to f6f3465972467e1fd5e1ead438c6261f

query I rowsort
SELECT + 4 * col1 AS col1 FROM tab1
----
104
40
52

query I rowsort
SELECT ALL col2 + col2 * - ( - col2 ) AS col1 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT - col2 - col1 * - ( 79 ) FROM tab0 AS cor0
----
6761
7107
7662

query I rowsort
SELECT DISTINCT + - col0 + col1 * - ( + col1 + col0 * + 27 ) AS col2 FROM tab1 AS cor0
----
-17444
-2785
-28329

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col2 - cor0.col1 * + col2 col0 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT + col1 * 86 AS col0 FROM tab1 AS cor0
----
1118
2236
860

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5242
SELECT - + col1 * CAST( + col0 + col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-1054
-1989
-6136

skipif mysql # not compatible
query I rowsort label-5242
SELECT - + col1 * CAST ( + col0 + col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-1054
-1989
-6136

query I rowsort
SELECT DISTINCT col2 * 24 FROM tab1 AS cor0
----
1296
1368
2304

onlyif mysql # use DIV operator for integer division
query I rowsort label-5244
SELECT DISTINCT + cor0.col1 DIV col1 AS col1 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-5244
SELECT DISTINCT + cor0.col1 / col1 AS col1 FROM tab2 AS cor0
----
1

query I rowsort
SELECT + + col0 + + col2 * 63 * cor0.col1 FROM tab1 AS cor0
----
35974
78704
88455

query I rowsort
SELECT 74 + + tab0.col2 - + 54 * col1 * - col0 AS col0 FROM tab0
----
111563
183405
437502

query I rowsort
SELECT ALL - - 14 AS col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5248
SELECT + - col0 + CAST( NULL AS SIGNED ) * - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5248
SELECT + - col0 + CAST ( NULL AS INTEGER ) * - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * - ( - col1 ) AS col0 FROM tab0 AS cor0
----
2838
7462
97

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab0, tab1 cor2
----
3645 values hashing to e5255b2277726ba4514ff55622dec830

query I rowsort
SELECT - + col2 * - col0 - - 17 FROM tab1 AS cor0
----
179
3665
7697

query I rowsort
SELECT - - col2 * + col2 - col1 AS col1 FROM tab0 AS cor0
----
-96
1003
6633

onlyif mysql # use DIV operator for integer division
query I rowsort label-5253
SELECT ALL + col1 DIV - col2 AS col1 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-5253
SELECT ALL + col1 / - col2 AS col1 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT tab0.col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # use DIV operator for integer division
query I rowsort label-5255
SELECT DISTINCT col2 * col1 DIV col1 + - col0 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-5255
SELECT DISTINCT col2 * col1 / col1 + - col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + col1 - - 99 AS col2 FROM tab0 AS cor0
----
185
190
196

query I rowsort
SELECT col2 + - ( col1 + cor0.col0 ) AS col1 FROM tab0 AS cor0
----
-131
-77
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5258
SELECT - CAST( NULL AS DECIMAL ) - 58 * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5258
SELECT - CAST ( NULL AS REAL ) - 58 * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * + col2 + 86 FROM tab0
----
121
7384
878

query I rowsort
SELECT + col0 * 35 AS col2 FROM tab1 AS cor0
----
105
2240
2800

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5261
SELECT - + CAST( 63 AS SIGNED ) + col2 + - col0 col1 FROM tab1 AS cor0
----
-12
-47
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5261
SELECT - + CAST ( 63 AS INTEGER ) + col2 + - col0 col1 FROM tab1 AS cor0
----
-12
-47
-70

query I rowsort
SELECT + 95 + 26 * col1 AS col1 FROM tab2 AS cor0
----
1629
537
901

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - col2 AS REAL ) * col0 * col1 AS col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT 32 + 42 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT ALL col2 * - tab2.col2 AS col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT - + 61 FROM tab0, tab2, tab2 AS cor0, tab1
----
-61

query I rowsort
SELECT + - 51 * col1 FROM tab2 AS cor0
----
-1581
-3009
-867

query I rowsort
SELECT DISTINCT - + 50 + col2 + + col2 AS col0 FROM tab2 AS cor0
----
2
26
4

query I rowsort
SELECT ALL cor0.col0 + - col1 * + 40 * + col2 FROM tab0 AS cor0
----
-113496
-298391
-3845

query I rowsort
SELECT ALL 54 + + cor0.col0 FROM tab0 AS cor0
----
143
78
89

query I rowsort
SELECT ALL + ( + cor0.col1 ) + col2 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - cor0.col2 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT ALL 31 * + cor0.col1 FROM tab0 AS cor0
----
2666
2821
3007

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5274
SELECT col0 * - CAST( col2 AS SIGNED ) AS col1 FROM tab2
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-5274
SELECT col0 * - CAST ( col2 AS INTEGER ) AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT - - 71 * + col1 + + col1 AS col1 FROM tab1 AS cor0
----
1872
720
936

query I rowsort
SELECT DISTINCT + + 82 * col0 * cor0.col1 FROM tab2 AS cor0
----
110126
17794
377364

onlyif mysql # use DIV operator for integer division
query I rowsort label-5277
SELECT + col0 + cor0.col1 DIV cor0.col2 FROM tab0 cor0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-5277
SELECT + col0 + cor0.col1 / cor0.col2 FROM tab0 cor0
----
132
26
90

query I rowsort
SELECT ALL + - 34 + col0 * - col2 AS col1 FROM tab2 AS cor0
----
-2062
-223
-3036

onlyif mysql # use DIV operator for integer division
query I rowsort label-5279
SELECT DISTINCT - - col1 DIV col0 AS col0 FROM tab2 cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-5279
SELECT DISTINCT - - col1 / col0 AS col0 FROM tab2 cor0
----
0
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5280
SELECT ALL + - col1 + + col1 DIV col1 AS col0 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-5280
SELECT ALL + - col1 + + col1 / col1 AS col0 FROM tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT - + 51 AS col2 FROM tab1 AS cor0
----
-51
-51
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-5282
SELECT ALL + col0 DIV col1 AS col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-5282
SELECT ALL + col0 / col1 AS col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT DISTINCT + 55 AS col1 FROM tab0 AS cor0
----
55

query I rowsort
SELECT DISTINCT - - ( - col0 ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + ( col2 ) + + col2 AS col2 FROM tab0
----
164
2
66

query I rowsort
SELECT ALL col0 * + col1 + tab1.col0 FROM tab1
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5287
SELECT ALL col1 DIV + tab1.col2 + col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-5287
SELECT ALL col1 / + tab1.col2 + col2 FROM tab1
----
54
57
96

query I rowsort
SELECT ( col1 ) + - col2 AS col1 FROM tab2
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5289
SELECT ALL - 53 + 79 + col1 DIV - col2 FROM tab0
----
-71
24
25

skipif mysql # not compatible
query I rowsort label-5289
SELECT ALL - 53 + 79 + col1 / - col2 FROM tab0
----
-71
24
25

query I rowsort
SELECT 29 - ( col2 ) * + col0 FROM tab1
----
-133
-3619
-7651

query I rowsort
SELECT DISTINCT - ( - col0 ) + col0 * col2 AS col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT ALL 35 + 46 FROM tab1
----
81
81
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5293
SELECT + col0 DIV + col2 + col1 AS col0 FROM tab1 cor0
----
11
13
26

skipif mysql # not compatible
query I rowsort label-5293
SELECT + col0 / + col2 + col1 AS col0 FROM tab1 cor0
----
11
13
26

query I rowsort
SELECT ALL cor0.col0 + + 0 AS col1 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5295
SELECT - cor0.col2 DIV 93 + - cor0.col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-5295
SELECT - cor0.col2 / 93 + - cor0.col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - + col0 * 75 + col0 * - col2 FROM tab0 AS cor0
----
-13973
-2592
-2660

query I rowsort
SELECT DISTINCT + col1 + 57 AS col2 FROM tab0 AS cor0
----
143
148
154

query I rowsort
SELECT ALL col1 + - col0 + + col1 FROM tab1 cor0
----
-44
-54
49

query I rowsort
SELECT - col0 + ( - 31 ) FROM tab0 cor0
----
-120
-55
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-5300
SELECT ALL - col2 DIV + col0 - col1 FROM tab1 AS cor0
----
-10
-14
-44

skipif mysql # not compatible
query I rowsort label-5300
SELECT ALL - col2 / + col0 - col1 FROM tab1 AS cor0
----
-10
-14
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * cor0.col1 - col0 col0 FROM tab0 AS cor0
----
2040
3360
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-5302
SELECT DISTINCT + + col2 * 11 + 92 DIV - col2 + cor0.col1 * col2 AS col0 FROM tab0 cor0
----
16
3199
8363

skipif mysql # not compatible
query I rowsort label-5302
SELECT DISTINCT + + col2 * 11 + 92 / - col2 + cor0.col1 * col2 AS col0 FROM tab0 cor0
----
16
3199
8363

query I rowsort
SELECT cor0.col2 + + col2 AS col0 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT col1 * col0 + - col2 * col2 FROM tab0 AS cor0
----
1375
3394
975

query I rowsort
SELECT + 8 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

query I rowsort
SELECT + col2 * - 89 FROM tab1 cor0
----
-4806
-5073
-8544

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5307
SELECT + cor0.col2 * + CAST( NULL AS SIGNED ) - - 73 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5307
SELECT + cor0.col2 * + CAST ( NULL AS INTEGER ) - - 73 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * col1 + + col2 * - col0 AS col2 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT DISTINCT col0 + - 64 AS col2 FROM tab1
----
-61
0
16

query I rowsort
SELECT - col0 + + ( col0 ) * col1 + col2 FROM tab0 AS cor0
----
2073
3361
8092

onlyif mysql # use DIV operator for integer division
query I rowsort label-5311
SELECT tab0.col0 + - tab0.col2 DIV col0 + - col0 AS col0 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5311
SELECT tab0.col0 + - tab0.col2 / col0 + - col0 AS col0 FROM tab0
----
-1
0
0

query I rowsort
SELECT DISTINCT + col0 * col0 - col0 FROM tab0
----
1190
552
7832

query I rowsort
SELECT DISTINCT + col2 + - col0 * col2 * + col1 AS col2 FROM tab1
----
-36423
-4158
-99744

query I rowsort
SELECT DISTINCT tab1.col2 + col0 * - tab1.col1 AS col1 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT - col0 - col1 * + tab0.col1 * - col0 AS col1 FROM tab0
----
177480
329280
736920

query I rowsort
SELECT DISTINCT - - col1 - + col0 * col2 * - col2 FROM tab2 AS cor0
----
114093
5134
52787

query I rowsort
SELECT - + col0 + cor0.col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT + col1 + + col0 * col0 FROM tab2
----
6143
6258
80

query I rowsort
SELECT DISTINCT + col2 * - col1 + tab2.col1 FROM tab2
----
-1475
-629
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - tab2.col0 * tab2.col0 col0 FROM tab2
----
-6143
-6258
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + tab0.col2 col2 FROM tab0
----
164
2
66

query I rowsort
SELECT col0 * col2 * + col2 AS col2 FROM tab0
----
26136
35
598436

query I rowsort
SELECT DISTINCT - col1 + + col2 * col2 AS col0 FROM tab2
----
1427
617
698

query I rowsort
SELECT tab0.col1 + + col1 AS col2 FROM tab0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-5325
SELECT DISTINCT - + col2 DIV + col0 + - col0 * - col0 AS col2 FROM tab1 AS cor0
----
-9
4096
6399

skipif mysql # not compatible
query I rowsort label-5325
SELECT DISTINCT - + col2 / + col0 + - col0 * - col0 AS col2 FROM tab1 AS cor0
----
-9
4096
6399

onlyif mysql # use DIV operator for integer division
query I rowsort label-5326
SELECT + + col2 * col2 + col2 DIV + col2 AS col0 FROM tab0 AS cor0
----
1090
2
6725

skipif mysql # not compatible
query I rowsort label-5326
SELECT + + col2 * col2 + col2 / + col2 AS col0 FROM tab0 AS cor0
----
1090
2
6725

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 / + col1 - - col2 col1 FROM tab1 WHERE NOT NULL NOT BETWEEN col1 AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 + - col0 col1 FROM tab0 cor0
----
0

query I rowsort
SELECT ALL + - col0 * col2 + cor0.col1 * - col1 AS col0 FROM tab0 AS cor0
----
-15579
-8188
-9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-5330
SELECT ALL - col0 DIV col1 + col0 AS col1 FROM tab1 AS cor0
----
3
58
74

skipif mysql # not compatible
query I rowsort label-5330
SELECT ALL - col0 / col1 + col0 AS col1 FROM tab1 AS cor0
----
3
58
74

query I rowsort
SELECT ALL - - col0 + - col0 * + col1 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT - col2 * - col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT col0 + + col2 * - col2 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
-22592
-24469
-39806

query I rowsort
SELECT ALL - + col0 * cor0.col1 + - col2 * + col2 * col2 AS col2 FROM tab0 AS cor0
----
-3396
-38001
-559467

query I rowsort
SELECT ALL + cor0.col1 - + cor0.col0 FROM tab2 cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-5336
SELECT DISTINCT cor0.col0 DIV col1 FROM tab1 AS cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-5336
SELECT DISTINCT cor0.col0 / col1 FROM tab1 AS cor0
----
0
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5337
SELECT ALL - col0 + col2 DIV + col1 + + cor0.col0 col2 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5337
SELECT ALL - col0 + col2 / + col1 + + cor0.col0 col2 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 - - cor0.col2 * - col1 * + col1 col2 FROM tab2 AS cor0
----
-11061
-25954
-90584

query I rowsort
SELECT - cor0.col0 * col2 AS col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT col0 * col1 * col1 AS col0 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT DISTINCT col2 * - col0 - col0 AS col1 FROM tab0 cor0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT - col0 - col0 AS col1 FROM tab2 AS cor0
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-5343
SELECT - tab1.col1 * col2 DIV col1 + + col1 DIV + col2 AS col1 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-5343
SELECT - tab1.col1 * col2 / col1 + + col1 / + col2 AS col1 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + - col2 * - col2 col2 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT col0 * col2 - col1 * col0 FROM tab0 AS cor0
----
-1272
-3360
-801

onlyif mysql # use DIV operator for integer division
query I rowsort label-5346
SELECT - 75 * - col2 - ( 4 ) DIV col2 AS col0 FROM tab0 AS cor0
----
2475
6150
71

skipif mysql # not compatible
query I rowsort label-5346
SELECT - 75 * - col2 - ( 4 ) / col2 AS col0 FROM tab0 AS cor0
----
2475
6150
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-5347
SELECT ALL + cor0.col2 + cor0.col0 DIV col1 FROM tab2 AS cor0
----
27
27
42

skipif mysql # not compatible
query I rowsort label-5347
SELECT ALL + cor0.col2 + cor0.col0 / col1 FROM tab2 AS cor0
----
27
27
42

query I rowsort
SELECT - 97 + + col0 FROM tab1 cor0
----
-17
-33
-94

query I rowsort
SELECT DISTINCT 62 * - col2 AS col0 FROM tab0 cor0
----
-2046
-5084
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( + col0 ) col1 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5351
SELECT ( + cor0.col0 ) * CAST( + 9 AS SIGNED ) DIV - col0 + 22 + + ( - col0 ) AS col2 FROM tab2 AS cor0
----
-65
-66
6

skipif mysql # not compatible
query I rowsort label-5351
SELECT ( + cor0.col0 ) * CAST ( + 9 AS INTEGER ) / - col0 + 22 + + ( - col0 ) AS col2 FROM tab2 AS cor0
----
-65
-66
6

query I rowsort
SELECT - 16 * cor0.col1 * col0 FROM tab1 cor0
----
-10240
-1248
-16640

query I rowsort
SELECT ALL + 89 + col1 * - 31 AS col2 FROM tab2 AS cor0
----
-1740
-438
-872

onlyif mysql # use DIV operator for integer division
query I rowsort label-5354
SELECT + + col1 + - col1 DIV 30 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5354
SELECT + + col1 + - col1 / 30 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5355
SELECT tab1.col0 DIV - col1 + + col1 FROM tab1
----
26
4
7

skipif mysql # not compatible
query I rowsort label-5355
SELECT tab1.col0 / - col1 + + col1 FROM tab1
----
26
4
7

query I rowsort
SELECT DISTINCT - col0 + - tab1.col2 FROM tab1
----
-121
-176
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5357
SELECT - col0 * - col2 - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5357
SELECT - col0 * - col2 - CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 46 * col1 - 91 FROM tab0 cor0
----
3865
4095
4371

query I rowsort
SELECT 29 * col0 AS col1 FROM tab0 AS cor0
----
1015
2581
696

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col1 col1 FROM tab0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col1 + 91 col0 FROM tab1 cor0
----
120
165
184

query I rowsort
SELECT + cor0.col1 FROM tab1, tab2 cor0, tab0 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - 1 * col1 AS col0 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT - cor0.col0 * 39 FROM tab1, tab1 AS cor0
----
9 values hashing to fb973abdd9dc3da8f1087dd0ca70845f

query I rowsort
SELECT DISTINCT - cor1.col1 AS col1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT 99 FROM tab2, tab0 AS cor0, tab1 cor1
----
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5367
SELECT ALL CAST( + 33 AS SIGNED ) FROM tab0
----
33
33
33

skipif mysql # not compatible
query I rowsort label-5367
SELECT ALL CAST ( + 33 AS INTEGER ) FROM tab0
----
33
33
33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5368
SELECT DISTINCT CAST( + col2 AS SIGNED ) * + col2 + - 23 + col0 FROM tab2
----
1500
713
731

skipif mysql # not compatible
query I rowsort label-5368
SELECT DISTINCT CAST ( + col2 AS INTEGER ) * + col2 + - 23 + col0 FROM tab2
----
1500
713
731

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab1 AS cor1, tab2, tab1 cor2
----
3645 values hashing to 731e4a6549b312ba21c2e61ca9bede27

query I rowsort
SELECT - + 9 AS col2 FROM tab0 cor0
----
-9
-9
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col0 - - col2 col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL - cor0.col0 - 53 FROM tab0 AS cor0
----
-142
-77
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5373
SELECT + + cor0.col0 DIV - 93 col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5373
SELECT + + cor0.col0 / - 93 col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT 44 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT 76 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - 77 ) col0 FROM tab1 AS cor0
----
77
77
77

query I rowsort
SELECT ALL 92 - - col0 FROM tab0
----
116
127
181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 - + col1 col2 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT + 97 + col0 FROM tab2
----
104
175
176

query I rowsort
SELECT + 15 + + col1 FROM tab0
----
101
106
112

onlyif mysql # use DIV operator for integer division
query I rowsort label-5381
SELECT ( - tab2.col2 ) DIV - col0 AS col1 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-5381
SELECT ( - tab2.col2 ) / - col0 AS col1 FROM tab2
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col1 - 11 col2 FROM tab0 AS cor0
----
-108
-2849
-7473

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 * - 49 col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 5c0116f84196ca1ece6b5cbbf8e02677

query I rowsort
SELECT - ( - col0 ) * + 29 AS col2 FROM tab1 AS cor0
----
1856
2320
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5385
SELECT ALL + col1 * CAST( col2 AS SIGNED ) AS col2 FROM tab2 cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-5385
SELECT ALL + col1 * CAST ( col2 AS INTEGER ) AS col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT + + col0 + - col1 + col1 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
1315
1381
624

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab2 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to b050f98b2d07c1b092b73ecf6b5b347c

query I rowsort
SELECT - + 47 FROM tab0 AS cor0
----
-47
-47
-47

query I rowsort
SELECT col1 * + col1 * - col1 + - 89 + - col1 AS col1 FROM tab2 AS cor0
----
-205527
-29911
-5019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5390
SELECT + CAST( NULL AS SIGNED ) * + cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5390
SELECT + CAST ( NULL AS INTEGER ) * + cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + 15 + cor0.col1 * cor0.col1 * ( + col0 ) col0 FROM tab2 AS cor0
----
22767
271455
6735

query I rowsort
SELECT ALL - ( - tab1.col2 ) FROM tab1, tab0 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT col2 * ( + col0 ) * col0 FROM tab0
----
1225
19008
649522

skipif mysql # not compatible
query I rowsort
SELECT + col1 + CAST ( col1 AS REAL ) AS col2 FROM tab0
----
172
182
194

query I rowsort
SELECT col1 + + col2 * ( + col2 * 0 ) + - col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT col2 + - ( 87 ) * col0 * col0 + col1 AS col1 FROM tab2
----
-4205
-529223
-542912

query I rowsort
SELECT col2 - - col2 * col0 AS col2 FROM tab0
----
36
7380
825

query I rowsort
SELECT DISTINCT col2 + - ( 89 ) FROM tab2
----
-51
-62
-63

query I rowsort
SELECT col0 * 88 AS col0 FROM tab1
----
264
5632
7040

query I rowsort
SELECT - + col2 * - cor0.col2 + + 2 * - col0 * + 61 FROM tab1 AS cor0
----
-4559
-544
2550

query I rowsort
SELECT ALL + 69 AS col0 FROM tab0, tab2 AS cor0, tab0 cor1, tab2, tab0 AS cor2
----
243 values hashing to 82762d1f978d19c1dfb91e39310b5974

query I rowsort
SELECT + ( col0 ) * - col1 + - col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT col2 * - cor0.col1 + - col2 * 21 FROM tab1 cor0
----
-1767
-2538
-3264

query I rowsort
SELECT ALL + + 27 * + 41 AS col2 FROM tab1 AS cor0
----
1107
1107
1107

query I rowsort
SELECT + 98 + + 75 * + col1 FROM tab0 AS cor0
----
6548
6923
7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col1 * 63 col2 FROM tab2 AS cor0
----
1071
1953
3717

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + ( + cor0.col2 ) + + 53 col1 FROM tab1 cor0
----
161
167
245

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5409
SELECT CAST( NULL AS SIGNED ) * + col0 * - cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5409
SELECT CAST ( NULL AS INTEGER ) * + col0 * - cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 27 * col1 FROM tab1 AS cor0
----
270
351
702

query I rowsort
SELECT + - 61 * - col1 AS col2 FROM tab2 AS cor0
----
1037
1891
3599

query I rowsort
SELECT - col1 + cor0.col0 * - ( - col0 ) FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT cor0.col2 * + col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT + + col2 * col1 * - ( col0 + cor0.col1 ) AS col1 FROM tab0 AS cor0
----
-12804
-1343160
-312180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col1 * + col0 + + col1 col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-5416
SELECT col2 + col2 DIV + 91 AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5416
SELECT col2 + col2 / + 91 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + cor0.col0 + 92 * col0 FROM tab1 AS cor0
----
279
5952
7440

onlyif mysql # use DIV operator for integer division
query I rowsort label-5418
SELECT - - col1 DIV col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-5418
SELECT - - col1 / col0 AS col1 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT col0 * tab1.col1 * ( - tab1.col1 ) - tab1.col0 * - 99 AS col2 FROM tab1
----
-1731
-5600
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-5420
SELECT ALL + 39 DIV + col1 col2 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5420
SELECT ALL + 39 / + col1 col2 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * + 90 - - col0 * - col1 * col2 col1 FROM tab1 AS cor0
----
-101010
-37380
-6552

query I rowsort
SELECT ALL - col1 + + ( - 6 ) FROM tab1 AS cor0
----
-16
-19
-32

query I rowsort
SELECT ALL + - col2 + col1 * + col0 AS col0 FROM tab0 AS cor0
----
2031
3394
8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col2 + - 10 * + cor0.col0 - col0 col0 FROM tab0 AS cor0
----
-384
5745
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-5425
SELECT DISTINCT col2 DIV + ( + col1 * - col0 ) + 72 AS col1 FROM tab1 AS cor0
----
72

skipif mysql # not compatible
query I rowsort label-5425
SELECT DISTINCT col2 / + ( + col1 * - col0 ) + 72 AS col1 FROM tab1 AS cor0
----
72

query I rowsort
SELECT ALL - col2 * + 46 AS col1 FROM tab0 AS cor0
----
-1518
-3772
-46

query I rowsort
SELECT ALL - cor0.col2 * - col0 + col1 FROM tab0 cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT + + col2 + + col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT col1 + - 33 AS col1 FROM tab0 AS cor0
----
53
58
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-5430
SELECT ALL + col1 DIV col2 + cor0.col1 AS col1 FROM tab0 cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-5430
SELECT ALL + col1 / col2 + cor0.col1 AS col1 FROM tab0 cor0
----
194
88
92

query I rowsort
SELECT tab2.col1 + + col2 * 66 AS col2 FROM tab2
----
1775
1813
2525

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1, tab2, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL col1 * - col0 * col2 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + col1 + 84 FROM tab0
----
170
175
181

query I rowsort
SELECT - col2 + - ( col0 ) FROM tab1
----
-121
-176
-57

query I rowsort
SELECT DISTINCT - col1 + - 32 AS col1 FROM tab1 AS cor0
----
-42
-45
-58

query I rowsort
SELECT col1 + - 75 * - col2 - - col2 * 45 FROM tab0 AS cor0
----
217
4046
9931

query I rowsort
SELECT DISTINCT + cor0.col2 * 48 AS col0 FROM tab0 cor0
----
1584
3936
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-5439
SELECT - + col1 - col1 DIV col2 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5439
SELECT - + col1 - col1 / col2 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5440
SELECT DISTINCT + - col2 + ( col2 + - cor0.col2 ) * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5440
SELECT DISTINCT + - col2 + ( col2 + - cor0.col2 ) * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT col2 * - col2 + 33 FROM tab0 AS cor0
----
-1056
-6691
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-5442
SELECT col0 * + col2 - ( col0 ) * cor0.col2 DIV - col1 FROM tab0 AS cor0
----
35
7378
801

skipif mysql # not compatible
query I rowsort label-5442
SELECT col0 * + col2 - ( col0 ) * cor0.col2 / - col1 FROM tab0 AS cor0
----
35
7378
801

query I rowsort
SELECT DISTINCT col2 + ( + col1 ) AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL - col1 + + col1 * 59 * 46 - cor0.col2 AS col2 FROM tab2 AS cor0
----
160041
46083
84076

query I rowsort
SELECT - 0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT - 65 + col1 * - tab2.col2 AS col0 FROM tab2
----
-1599
-711
-902

query I rowsort
SELECT + ( col2 ) * col2 + + 12 * + 63 AS col0 FROM tab2 AS cor0
----
1432
1485
2200

query I rowsort
SELECT + col1 * + col1 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT ALL col1 * + col0 + 48 FROM tab1 AS cor0
----
1088
126
688

query I rowsort
SELECT DISTINCT - cor0.col0 - col0 AS col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT col2 * cor0.col2 * + col1 AS col1 FROM tab0 AS cor0
----
611884
93654
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5452
SELECT + col2 DIV col1 + - 30 FROM tab2
----
-28
-30
-30

skipif mysql # not compatible
query I rowsort label-5452
SELECT + col2 / col1 + - 30 FROM tab2
----
-28
-30
-30

query I rowsort
SELECT ALL + col0 * + col2 * + cor0.col2 + 89 FROM tab0 cor0
----
124
26225
598525

query I rowsort
SELECT ALL + 50 + col0 AS col2 FROM tab0 AS cor0
----
139
74
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - cor0.col0 col0 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - col1 col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT 69 + col0 * - 3 FROM tab2 AS cor0
----
-165
-168
48

query I rowsort
SELECT ALL - cor0.col2 * + 86 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 762020a85dd9be6c6221df9a65d34f18

query I rowsort
SELECT DISTINCT col1 + col0 * + cor0.col1 + - col1 * col1 * col2 FROM tab2 AS cor0
----
-25699
-85845
-9622

query I rowsort
SELECT ALL - col0 + tab1.col2 * + col0 FROM tab1
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-5461
SELECT ALL - col0 DIV - col1 + col2 FROM tab1
----
102
54
63

skipif mysql # not compatible
query I rowsort label-5461
SELECT ALL - col0 / - col1 + col2 FROM tab1
----
102
54
63

query I rowsort
SELECT col1 + - col0 FROM tab2 WHERE NOT col1 / col1 NOT IN ( col2 * + col0 * col2 )
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( col2 ) = - col0 + col0
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL = col0
----

query I rowsort
SELECT - col1 * + col0 + col0 * + col1 * - col0 + + col1 AS col2 FROM tab0 WHERE NOT - col0 * - col0 * + col0 IN ( - col2 )
----
-122123
-51514
-728819

query I rowsort
SELECT DISTINCT - col1 / + tab2.col2 AS col1 FROM tab2 WHERE NOT NULL < - col2
----

query I rowsort
SELECT ALL col2 * + col1 + - col2 FROM tab2
----
1508
608
810

query I rowsort
SELECT - col1 - tab1.col2 * col1 * + col1 FROM tab1
----
-16237
-36530
-5710

query I rowsort
SELECT DISTINCT col2 FROM tab0 WHERE ( NULL ) >= NULL
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL < - col0 * + col1
----

query I rowsort
SELECT ALL col0 * + col2 + + col1 FROM tab2 WHERE NULL >= NULL
----

query I rowsort
SELECT - 1 + + col1 * + col1 FROM tab1 AS cor0
----
168
675
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-5473
SELECT - col0 * col1 + - col1 DIV col0 FROM tab0 AS cor0
----
-2067
-3397
-8100

skipif mysql # not compatible
query I rowsort label-5473
SELECT - col0 * col1 + - col1 / col0 FROM tab0 AS cor0
----
-2067
-3397
-8100

query I rowsort
SELECT - col0 AS col2 FROM tab0 WHERE NULL >= NULL
----

query I rowsort
SELECT + col1 - tab1.col0 FROM tab1 WHERE NOT NULL NOT BETWEEN + col2 * + col2 * + col2 AND ( col2 + col2 )
----

query I rowsort
SELECT ALL col1 + tab2.col2 + + col0 FROM tab2
----
134
163
65

query I rowsort
SELECT ALL tab0.col2 * + tab0.col2 + col0 * col0 AS col0 FROM tab0
----
1226
14645
1665

query I rowsort
SELECT + tab2.col1 AS col2 FROM tab2 WHERE NOT col2 BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT + col0 + col2 * col0 FROM tab2
----
196
2106
3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-5480
SELECT ALL - cor0.col1 DIV + cor0.col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-5480
SELECT ALL - cor0.col1 / + cor0.col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT - col0 * - cor0.col2 + col0 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT - col1 + col1 + - tab1.col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ALL col1 * - col2 + + tab0.col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT + col1 * + col2 * col2 + + col1 AS col1 FROM tab0
----
194
611975
93740

query I rowsort
SELECT + col2 - - tab2.col1 * + col1 FROM tab2
----
327
3507
988

query I rowsort
SELECT ALL col1 * - col1 + - tab0.col0 * col2 AS col0 FROM tab0
----
-15579
-8188
-9444

query I rowsort
SELECT ALL - col2 - col1 AS col0 FROM tab1
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5488
SELECT + tab2.col2 DIV + tab2.col1 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5488
SELECT + tab2.col2 / + tab2.col1 FROM tab2
----
0
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-5489
SELECT DISTINCT col1 * col0 + - tab1.col0 DIV col2 FROM tab1
----
1040
639
78

skipif mysql # not compatible
query I rowsort label-5489
SELECT DISTINCT col1 * col0 + - tab1.col0 / col2 FROM tab1
----
1040
639
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5490
SELECT cor0.col0 DIV col1 col2 FROM tab1 AS cor0
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5490
SELECT cor0.col0 / col1 col2 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT + col0 - col1 FROM tab1 WHERE NOT ( NULL ) < + col1 / col1 + - col1
----

query I rowsort
SELECT - tab2.col1 + col2 AS col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT col2 * - col0 + - col2 AS col2 FROM tab0
----
-36
-7380
-825

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( + col0 * - col2 * + col1 ) IN ( + col1 * col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT + + ( - ( col2 ) ) * cor0.col0 - col1 FROM tab0 AS cor0
----
-132
-7389
-878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * ( col2 ) col0 FROM tab0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 5 + + col2 col2 FROM tab0 AS cor0
----
-174
-363
-87

query I rowsort
SELECT + ( - 37 ) AS col2 FROM tab1 cor0
----
-37
-37
-37

onlyif mysql # use DIV operator for integer division
query I rowsort label-5499
SELECT + + col0 DIV col1 AS col2 FROM tab1 cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-5499
SELECT + + col0 / col1 AS col2 FROM tab1 cor0
----
0
6
6

query I rowsort
SELECT ALL - col0 * col2 * - 42 FROM tab1
----
153216
322560
6804

onlyif mysql # use DIV operator for integer division
query I rowsort label-5501
SELECT DISTINCT + col1 + col1 * + 95 - col1 DIV + cor0.col1 FROM tab1 AS cor0
----
1247
2495
959

skipif mysql # not compatible
query I rowsort label-5501
SELECT DISTINCT + col1 + col1 * + 95 - col1 / + cor0.col1 FROM tab1 AS cor0
----
1247
2495
959

query I rowsort
SELECT + + col0 + + 10 AS col1 FROM tab2 AS cor0
----
17
88
89

query I rowsort
SELECT + col2 * col2 + col2 * - col2 AS col2 FROM tab0 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col1 + col2 * + col2 col2 FROM tab2 AS cor0
----
-108
-858
798

query I rowsort
SELECT + col1 * ( + col0 ) + col2 AS col2 FROM tab2 AS cor0
----
1381
244
4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + + cor0.col1 * + ( - col1 ) col2 FROM tab0 AS cor0
----
-7429
-8363
-9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-5507
SELECT - col2 DIV - 16 + col1 * + col0 FROM tab0 AS cor0
----
2066
3395
8104

skipif mysql # not compatible
query I rowsort label-5507
SELECT - col2 / - 16 + col1 * + col0 FROM tab0 AS cor0
----
2066
3395
8104

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5508
SELECT - col1 + CAST( NULL AS DECIMAL ) * - 68 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5508
SELECT - col1 + CAST ( NULL AS REAL ) * - 68 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 39 * col0 + + 41 AS col1 FROM tab0 AS cor0
----
1406
3512
977

onlyif mysql # use DIV operator for integer division
query I rowsort label-5510
SELECT DISTINCT - col1 DIV + cor0.col1 AS col0 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-5510
SELECT DISTINCT - col1 / + cor0.col1 AS col0 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT + col2 * - cor0.col0 + + cor0.col0 * + cor0.col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( - col1 ) + col0 * ( - col0 ) AS col0 FROM tab1
----
-4086
-6387
17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5513
SELECT col2 + + col1 + + CAST( - ( col0 ) + 2 AS SIGNED ) FROM tab1
----
31
5
79

skipif mysql # not compatible
query I rowsort label-5513
SELECT col2 + + col1 + + CAST ( - ( col0 ) + 2 AS INTEGER ) FROM tab1
----
31
5
79

query I rowsort
SELECT 23 * col2 * + col2 FROM tab2
----
15548
16767
33212

query I rowsort
SELECT 80 * + col0 * + 96 + tab1.col0 * col1 FROM tab1
----
23118
492160
615440

query I rowsort
SELECT col1 + col1 + col0 FROM tab2
----
113
196
69

query I rowsort
SELECT DISTINCT 4 + + col0 * col2 AS col2 FROM tab0
----
39
7302
796

query I rowsort
SELECT - + 85 * col0 FROM tab2 AS cor0
----
-595
-6630
-6715

query I rowsort
SELECT ALL - + col2 * col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + - cor0.col0 + - col0 AS col1 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT 76 - col1 FROM tab2 AS cor0
----
17
45
59

query I rowsort
SELECT + col1 + 32 * tab0.col1 FROM tab0
----
2838
3003
3201

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * 80 * ( + col1 ) col1 FROM tab0
----
591680
662480
752720

query I rowsort
SELECT cor0.col2 * col1 * - col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - 37 AS col0 FROM tab2 cor0
----
-37

query I rowsort
SELECT ALL 31 * - col1 + - col1 AS col0 FROM tab1 cor0
----
-320
-416
-832

query I rowsort
SELECT DISTINCT + - 36 + col2 FROM tab2 AS cor0
----
-10
-9
2

query I rowsort
SELECT ALL col0 + + 58 AS col0 FROM tab1 cor0
----
122
138
61

query I rowsort
SELECT - + 89 + - col2 * col2 FROM tab0 cor0
----
-1178
-6813
-90

query I rowsort
SELECT DISTINCT 22 * + col2 + col0 + ( + 59 ) AS col2 FROM tab0 AS cor0
----
116
1952
809

query I rowsort
SELECT ALL 86 * col1 AS col1 FROM tab0 AS cor0
----
7396
7826
8342

query I rowsort
SELECT DISTINCT + 74 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
74

query I rowsort
SELECT DISTINCT col0 * - 66 FROM tab0 AS cor0
----
-1584
-2310
-5874

query I rowsort
SELECT - 5 * + col1 AS col1 FROM tab2 AS cor0
----
-155
-295
-85

query I rowsort
SELECT DISTINCT - + ( + col2 ) * + col0 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT 6 AS col0 FROM tab0 AS cor0
----
6

query I rowsort
SELECT - + col0 + - 38 * col0 AS col2 FROM tab1 AS cor0
----
-117
-2496
-3120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col2 col0 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL ( - 65 ) * col2 FROM tab2 AS cor0
----
-1690
-1755
-2470

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + 74 ) col1 FROM tab2 cor0
----
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col0 + tab0.col1 ) * - col2 col1 FROM tab0
----
-132
-14760
-3630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5542
SELECT DISTINCT ( + col2 ) + - col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5542
SELECT DISTINCT ( + col2 ) + - col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5543
SELECT + col2 + - col0 DIV col0 FROM tab2 AS cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-5543
SELECT + col2 + - col0 / col0 FROM tab2 AS cor0
----
25
26
37

query I rowsort
SELECT ALL 13 + ( + col0 ) AS col2 FROM tab1 AS cor0
----
16
77
93

query I rowsort
SELECT + 88 * 74 * + cor0.col2 FROM tab0 cor0
----
214896
533984
6512

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 * - 40 col0 FROM tab2 AS cor0
----
1040
1080
1520

onlyif mysql # use DIV operator for integer division
query I rowsort label-5547
SELECT DISTINCT - - ( col2 ) DIV - cor0.col0 + col2 * ( col1 + 74 ) AS col0 FROM tab2 AS cor0
----
2832
3458

skipif mysql # not compatible
query I rowsort label-5547
SELECT DISTINCT - - ( col2 ) / - cor0.col0 + col2 * ( col1 + 74 ) AS col0 FROM tab2 AS cor0
----
2832
3458

query I rowsort
SELECT + cor1.col1 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT cor0.col0 * - col1 AS col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT col1 * cor0.col0 - col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT + - ( col0 ) * - col2 + 47 * col1 AS col2 FROM tab2 AS cor0
----
1646
3801
4801

query I rowsort
SELECT ALL + col2 - - cor0.col0 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL - 45 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT + col2 + - col2 * - ( cor0.col1 ) FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT + 94 + + col1 * ( - 11 ) FROM tab1 AS cor0
----
-16
-192
-49

query I rowsort
SELECT - col2 * - col2 + ( col1 ) + col1 AS col2 FROM tab0 AS cor0
----
1261
195
6906

query I rowsort
SELECT DISTINCT - + col0 + - ( + col2 ) * + cor0.col2 FROM tab2 AS cor0
----
-1523
-736
-754

query I rowsort
SELECT ALL + + col2 * + 51 + - 66 AS col0 FROM tab0 cor0
----
-15
1617
4116

query I rowsort
SELECT DISTINCT - cor0.col0 + + ( col2 ) AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT col0 + cor0.col0 + col2 AS col0 FROM tab0 AS cor0
----
260
71
81

query I rowsort
SELECT DISTINCT col1 * - col0 - - col2 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT + col2 * - col1 - col0 FROM tab2
----
-1612
-725
-844

onlyif mysql # use DIV operator for integer division
query I rowsort label-5563
SELECT ALL tab1.col0 + col2 DIV - tab1.col1 + + ( + col0 ) AS col0 FROM tab1
----
123
153
4

skipif mysql # not compatible
query I rowsort label-5563
SELECT ALL tab1.col0 + col2 / - tab1.col1 + + ( + col0 ) AS col0 FROM tab1
----
123
153
4

query I rowsort
SELECT DISTINCT + 98 + col1 FROM tab2
----
115
129
157

query I rowsort
SELECT DISTINCT - col1 + col1 + ( + ( col1 ) ) AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT - cor0.col2 + col2 AS col2 FROM tab1 cor0
----
0

query I rowsort
SELECT ALL + col1 * 87 + + 6 + - col0 AS col1 FROM tab1 AS cor0
----
1057
2265
812

query I rowsort
SELECT DISTINCT cor0.col2 - + col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL - col2 * tab2.col1 - + ( ( + col0 ) ) AS col1 FROM tab2
----
-1612
-725
-844

query I rowsort
SELECT DISTINCT - ( col0 ) - - ( + 19 + col0 ) AS col2 FROM tab2
----
19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5571
SELECT - + CAST( NULL AS SIGNED ) + + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5571
SELECT - + CAST ( NULL AS INTEGER ) + + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + - ( 5 ) * - col1 FROM tab2
----
123
182
321

query I rowsort
SELECT DISTINCT - col1 + - 79 * col0 * col1 FROM tab2 AS cor0
----
-106114
-17174
-363617

query I rowsort
SELECT - col0 + 40 + + 14 FROM tab0 cor0
----
-35
19
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-5575
SELECT + col0 DIV col0 + 57 * col2 * col1 FROM tab0
----
161767
425335
5530

skipif mysql # not compatible
query I rowsort label-5575
SELECT + col0 / col0 + 57 * col2 * col1 FROM tab0
----
161767
425335
5530

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5576
SELECT + CAST( 63 AS SIGNED ) FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 38764a6e696d1a6b5095e29ef84959c0

skipif mysql # not compatible
query I rowsort label-5576
SELECT + CAST ( 63 AS INTEGER ) FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 38764a6e696d1a6b5095e29ef84959c0

query I rowsort
SELECT ALL - col0 * col0 * + col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL - ( + 9 ) FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 3dfe689e16ce3a87877d40f349e6c7b5

query I rowsort
SELECT ALL col2 + + col1 + + col1 * - col0 FROM tab1 AS cor0
----
-573
-931
2

query I rowsort
SELECT + col0 + + 83 * col1 AS col0 FROM tab1 AS cor0
----
1159
2161
894

query I rowsort
SELECT + + cor0.col2 + 70 AS col2 FROM tab1 AS cor0
----
124
127
166

query I rowsort
SELECT col2 * + col2 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT DISTINCT - + col2 + + ( col0 ) FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - - col2 + col1 * - col0 AS col2 FROM tab0 cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-5585
SELECT - + ( 45 ) DIV + col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5585
SELECT - + ( 45 ) / + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + + col0 * 37 + + col2 * ( cor0.col1 + col1 ) * + col2 FROM tab0 AS cor0
----
1227061
1489
188196

query I rowsort
SELECT ALL 57 * - col2 * col1 AS col0 FROM tab0 cor0
----
-161766
-425334
-5529

onlyif mysql # use DIV operator for integer division
query I rowsort label-5588
SELECT 38 DIV + col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5588
SELECT 38 / + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 27 * + ( + col2 ) AS col1 FROM tab2 AS cor0
----
1026
702
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-5590
SELECT + 44 + + col2 DIV + ( col0 * + col0 ) FROM tab1 AS cor0
----
44
44
50

skipif mysql # not compatible
query I rowsort label-5590
SELECT + 44 + + col2 / + ( col0 * + col0 ) FROM tab1 AS cor0
----
44
44
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-5591
SELECT ALL - CAST( col1 AS SIGNED ) DIV col0 + 72 + - 83 FROM tab0
----
-12
-13
-14

skipif mysql # not compatible
query I rowsort label-5591
SELECT ALL - CAST ( col1 AS INTEGER ) / col0 + 72 + - 83 FROM tab0
----
-12
-13
-14

query I rowsort
SELECT 42 FROM tab0, tab0 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT ALL col1 + col0 + - col2 FROM tab1
----
-25
-3
17

query I rowsort
SELECT - - 46 * col2 AS col0 FROM tab2 AS cor0
----
1196
1242
1748

query I rowsort
SELECT + col0 * + col1 + + col2 * + col0 AS col0 FROM tab1 AS cor0
----
240
4288
8720

query I rowsort
SELECT ALL - 66 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
-2178
-5412
-66

query I rowsort
SELECT + - col2 * cor0.col2 + 43 AS col2 FROM tab2 AS cor0
----
-1401
-633
-686

onlyif mysql # use DIV operator for integer division
query I rowsort label-5598
SELECT ALL + col2 DIV col2 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-5598
SELECT ALL + col2 / col2 col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT col1 * col1 + col2 * - col1 FROM tab0 AS cor0
----
4558
819
9312

query I rowsort
SELECT - col2 - col2 AS col0 FROM tab0 cor0
----
-164
-2
-66

query I rowsort
SELECT col1 * col2 + ( + col0 ) + + col1 AS col1 FROM tab2 AS cor0
----
1671
742
875

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5602
SELECT - cor0.col2 * col1 + CAST( col2 AS SIGNED ) FROM tab2 AS cor0
----
-1508
-608
-810

skipif mysql # not compatible
query I rowsort label-5602
SELECT - cor0.col2 * col1 + CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT + 82 + cor0.col2 * + col1 AS col1 FROM tab0 AS cor0
----
179
2920
7544

onlyif mysql # use DIV operator for integer division
query I rowsort label-5604
SELECT col1 + col2 DIV cor0.col1 AS col2 FROM tab2 AS cor0
----
19
31
59

skipif mysql # not compatible
query I rowsort label-5604
SELECT col1 + col2 / cor0.col1 AS col2 FROM tab2 AS cor0
----
19
31
59

query I rowsort
SELECT ALL + 34 * col0 AS col0 FROM tab2
----
238
2652
2686

query I rowsort
SELECT col1 + - 24 * - col1 AS col2 FROM tab0 AS cor0
----
2150
2275
2425

query I rowsort
SELECT ALL col2 + - 30 * - cor0.col0 FROM tab2 AS cor0
----
2366
237
2408

query I rowsort
SELECT ALL - - col1 * 2 AS col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT + col2 + 62 * col1 AS col0 FROM tab0 AS cor0
----
5365
5724
6015

query I rowsort
SELECT + + 80 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

onlyif mysql # use DIV operator for integer division
query I rowsort label-5611
SELECT + 87 DIV col2 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5611
SELECT + 87 / col2 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT DISTINCT + tab2.col0 FROM tab2, tab1, tab2 cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5613
SELECT ALL CAST( NULL AS SIGNED ) * - 26 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5613
SELECT ALL CAST ( NULL AS INTEGER ) * - 26 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5614
SELECT DISTINCT cor0.col2 * cor0.col1 + CAST( NULL AS SIGNED ) FROM tab2, tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5614
SELECT DISTINCT cor0.col2 * cor0.col1 + CAST ( NULL AS INTEGER ) FROM tab2, tab0 cor0
----
NULL

query I rowsort
SELECT + 46 - - col2 AS col1 FROM tab2 AS cor0
----
72
73
84

query I rowsort
SELECT DISTINCT + tab0.col2 - col2 AS col2 FROM tab0
----
0

query I rowsort
SELECT DISTINCT + col0 * col1 + ( col1 * ( - col2 ) ) AS col0 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT ALL col2 + 73 AS col2 FROM tab1 AS cor0
----
127
130
169

query I rowsort
SELECT + col2 + ( + 72 ) FROM tab2 AS cor0
----
110
98
99

query I rowsort
SELECT ALL - + cor0.col1 + + 66 * 88 * + col1 AS col2 FROM tab1 AS cor0
----
150982
58070
75491

onlyif mysql # use DIV operator for integer division
query I rowsort label-5621
SELECT ALL - cor0.col0 DIV + col1 AS col1 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-5621
SELECT ALL - cor0.col0 / + col1 AS col1 FROM tab2 cor0
----
-1
-4
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5622
SELECT DISTINCT - col2 * CAST( col0 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-5622
SELECT DISTINCT - col2 * CAST ( col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - + 49 + cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
37
42
48

skipif mysql # not compatible
query I rowsort
SELECT + + CAST ( + col1 AS REAL ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL tab1.col2 * col0 * col1 FROM tab1
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-5626
SELECT DISTINCT + col1 * 93 DIV - 96 FROM tab1
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-5626
SELECT DISTINCT + col1 * 93 / - 96 FROM tab1
----
-12
-25
-9

query I rowsort
SELECT col0 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5628
SELECT + - col2 / CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5628
SELECT + - col2 / CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + ( 11 ) FROM tab1
----
107
65
68

query I rowsort
SELECT DISTINCT 77 AS col2 FROM tab1, tab1 AS cor0
----
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * col1 * - col1 + - col2 * cor0.col1 col0 FROM tab2 AS cor0
----
-23477
-273052
-7564

query I rowsort
SELECT ALL col0 + + cor0.col0 * - col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT + + ( col2 ) + 81 AS col0 FROM tab0 AS cor0
----
114
163
82

query I rowsort
SELECT DISTINCT 69 * cor0.col0 * col0 - 79 * - col2 * col1 FROM tab1 AS cor0
----
111537
327654
540192

query I rowsort
SELECT DISTINCT - col1 * - col1 + col2 AS col0 FROM tab1
----
157
265
730

query I rowsort
SELECT 30 + tab1.col1 - + col1 FROM tab1
----
30
30
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5637
SELECT - CAST( NULL AS SIGNED ) + - col0 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5637
SELECT - CAST ( NULL AS INTEGER ) + - col0 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 54 col2 FROM tab0
----
54
54
54

query I rowsort
SELECT + col0 * 12 + + cor0.col1 FROM tab0 AS cor0
----
1159
374
517

query I rowsort
SELECT DISTINCT 17 AS col2 FROM tab1
----
17

query I rowsort
SELECT 61 * + col0 AS col2 FROM tab1
----
183
3904
4880

query I rowsort
SELECT col0 * tab1.col2 * + 63 + ( + col2 ) AS col2 FROM tab1
----
10260
229881
483936

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 34 * cor0.col0 col2 FROM tab1 AS cor0
----
102
2176
2720

query I rowsort
SELECT DISTINCT col2 * col2 + - col0 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT ALL - col0 * col2 + - 98 FROM tab0 AS cor0
----
-133
-7396
-890

query I rowsort
SELECT + - col0 + - col2 * + 72 AS col1 FROM tab1 AS cor0
----
-3891
-4168
-6992

query I rowsort
SELECT DISTINCT + cor0.col0 + col2 * col2 FROM tab0 cor0
----
1113
36
6813

query I rowsort
SELECT + 58 * col1 + + col1 FROM tab0 AS cor0
----
5074
5369
5723

query I rowsort
SELECT 24 * - col1 + col2 * + col2 FROM tab0 AS cor0
----
-2327
-975
4540

query I rowsort
SELECT DISTINCT - + col2 + - col0 * 95 FROM tab0 AS cor0
----
-2313
-3326
-8537

query I rowsort
SELECT + + ( col1 ) * - 90 + 60 * col1 FROM tab1 cor0
----
-300
-390
-780

query I rowsort
SELECT DISTINCT + 26 + + tab2.col1 FROM tab2
----
43
57
85

query I rowsort
SELECT ALL + col0 * - col0 + + 27 * col2 * + col2 AS col0 FROM tab0
----
-1198
173627
28827

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5654
SELECT ALL 8 * col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5654
SELECT ALL 8 * col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * col0 + 75 AS col1 FROM tab0 cor0
----
-1989
-3320
-8024

query I rowsort
SELECT ALL col1 * col0 + col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5657
SELECT DISTINCT - - col1 * col1 DIV 48 FROM tab0 cor0
----
154
172
196

skipif mysql # not compatible
query I rowsort label-5657
SELECT DISTINCT - - col1 * col1 / 48 FROM tab0 cor0
----
154
172
196

query I rowsort
SELECT + 54 * col1 AS col1 FROM tab1 AS cor0
----
1404
540
702

query I rowsort
SELECT ALL - col2 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5660
SELECT ALL - - col2 / - col2 + - CAST( 45 AS SIGNED ) + - col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5660
SELECT ALL - - col2 / - col2 + - CAST ( 45 AS INTEGER ) + - col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 - col1 AS col1 FROM tab0 AS cor0
----
-172
-182
-194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5662
SELECT DISTINCT cor0.col1 * col1 - ( - col2 + + CAST( col1 AS SIGNED ) ) AS col0 FROM tab2 AS cor0
----
310
3448
957

skipif mysql # not compatible
query I rowsort label-5662
SELECT DISTINCT cor0.col1 * col1 - ( - col2 + + CAST ( col1 AS INTEGER ) ) AS col0 FROM tab2 AS cor0
----
310
3448
957

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * 65 * 87 + + col2 col1 FROM tab2 AS cor0
----
39612
441116
446783

query I rowsort
SELECT ALL - cor0.col2 + cor0.col0 - col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + - col2 * ( 98 ) + col0 FROM tab2 AS cor0
----
-2470
-2639
-3645

query I rowsort
SELECT + - cor0.col0 + - ( - col0 ) AS col2 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + cor0.col1 col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - col0 + col0 * cor0.col2 FROM tab0 cor0
----
0
7209
768

query I rowsort
SELECT + col1 + 78 AS col2 FROM tab0 AS cor0
----
164
169
175

query I rowsort
SELECT + - cor0.col0 + - cor0.col1 AS col2 FROM tab2 AS cor0
----
-137
-38
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - 25 * cor0.col1 col2 FROM tab1 cor0
----
-240
-312
-624

onlyif mysql # use DIV operator for integer division
query I rowsort label-5672
SELECT 34 DIV - col0 + - col2 AS col0 FROM tab2
----
-26
-31
-38

skipif mysql # not compatible
query I rowsort label-5672
SELECT 34 / - col0 + - col2 AS col0 FROM tab2
----
-26
-31
-38

query I rowsort
SELECT - - col2 * + 93 FROM tab0 AS cor0
----
3069
7626
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + 3 + - 88 col0 FROM tab2 AS cor0
----
-111
-112
-123

query I rowsort
SELECT DISTINCT - col0 * - ( col0 ) * col0 FROM tab0 AS cor0
----
13824
42875
704969

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5676
SELECT ALL col2 + + CAST( - col0 AS SIGNED ) * + col1 col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5676
SELECT ALL col2 + + CAST ( - col0 AS INTEGER ) * + col1 col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + 35 - - col2 col1 FROM tab2 AS cor0
----
-17
-6
55

query I rowsort
SELECT DISTINCT + + ( col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + ( col1 ) * cor0.col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + col0 + + 4 AS col0 FROM tab1 AS cor0
----
68
7
84

query I rowsort
SELECT + 64 * - col1 + col1 - + col2 FROM tab0 AS cor0
----
-5451
-5815
-6112

query I rowsort
SELECT DISTINCT + col2 * + col1 AS col0 FROM tab2 cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5683
SELECT DISTINCT 68 * + col1 * - col0 + + cor0.col2 * ( - col2 ) + - cor0.col2 DIV col2 col0 FROM tab1 AS cor0
----
-46770
-79937
-8221

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5683
SELECT DISTINCT 68 * + col1 * - col0 + + cor0.col2 * ( - col2 ) + - cor0.col2 / col2 col0 FROM tab1 AS cor0
----
-46770
-79937
-8221

query I rowsort
SELECT ALL col0 + - 43 + col1 FROM tab0
----
137
67
89

query I rowsort
SELECT 88 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT + col2 * col1 - + col1 * 81 AS col0 FROM tab2 AS cor0
----
-1674
-3245
-731

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5687
SELECT DISTINCT - CAST( NULL AS SIGNED ) + + ( - col1 ) * - col0 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5687
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + + ( - col1 ) * - col0 AS col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5688
SELECT - col0 + 0 DIV cor0.col0 col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5688
SELECT - col0 + 0 / cor0.col0 col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5689
SELECT ALL - + CAST( col2 AS SIGNED ) DIV - col1 AS col2 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5689
SELECT ALL - + CAST ( col2 AS INTEGER ) / - col1 AS col2 FROM tab1 AS cor0
----
2
5
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5690
SELECT DISTINCT + CAST( + col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-5690
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL 86 + + col0 AS col2 FROM tab2 AS cor0
----
164
165
93

query I rowsort
SELECT - col2 + - 15 FROM tab1 AS cor0
----
-111
-69
-72

query I rowsort
SELECT DISTINCT - - ( + col2 ) * col0 * col2 + - col0 * + col1 * ( ( + col1 ) ) AS col0 FROM tab1 AS cor0
----
201536
6720
723760

query I rowsort
SELECT ALL col0 * + 71 + col1 * ( cor0.col0 * col0 ) AS col1 FROM tab1 AS cor0
----
447
45504
88880

query I rowsort
SELECT - 74 * col1 + + ( col2 ) * - col0 FROM tab2 AS cor0
----
-2483
-4260
-6394

query I rowsort
SELECT col1 + col1 * + cor0.col1 FROM tab1 cor0
----
110
182
702

query I rowsort
SELECT DISTINCT + + col1 + + cor0.col1 AS col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT - + 68 * + col2 FROM tab2 AS cor0
----
-1768
-1836
-2584

query I rowsort
SELECT - tab2.col1 + + col0 * col1 + col0 * 51 AS col0 FROM tab2
----
5355
543
8521

query I rowsort
SELECT 63 * tab2.col2 FROM tab2
----
1638
1701
2394

query I rowsort
SELECT ALL + tab2.col2 + tab2.col1 * + tab2.col2 * - 11 + - col0 AS col0 FROM tab2
----
-16926
-7147
-9187

onlyif mysql # use DIV operator for integer division
query I rowsort label-5702
SELECT - - col2 DIV 95 + col0 DIV 29 FROM tab1 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-5702
SELECT - - col2 / 95 + col0 / 29 FROM tab1 AS cor0
----
0
2
3

query I rowsort
SELECT + + ( + 60 ) + col0 * col2 FROM tab1 AS cor0
----
222
3708
7740

query I rowsort
SELECT 13 * + col0 + - col1 FROM tab0 AS cor0
----
1066
226
358

query I rowsort
SELECT ALL tab0.col2 AS col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - col2 * + 69 FROM tab1
----
-3726
-3933
-6624

query I rowsort
SELECT DISTINCT 46 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * 34 col1 FROM tab2 cor0
----
-1054
-2006
-578

onlyif mysql # use DIV operator for integer division
query I rowsort label-5709
SELECT + col0 * col1 DIV + cor0.col0 col1 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5709
SELECT + col0 * col1 / + cor0.col0 col1 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5710
SELECT col2 + + col0 * - col0 + col0 DIV col0 AS col1 FROM tab1 cor0
----
-4038
-6303
46

skipif mysql # not compatible
query I rowsort label-5710
SELECT col2 + + col0 * - col0 + col0 / col0 AS col1 FROM tab1 cor0
----
-4038
-6303
46

query I rowsort
SELECT - 82 FROM tab1, tab2 AS cor0
----
9 values hashing to f800b0aad28b82b2deb67f7045c9a45c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5712
SELECT DISTINCT - CAST( col0 AS SIGNED ) * - col1 - - 32 FROM tab0 AS cor0
----
2096
3427
8131

skipif mysql # not compatible
query I rowsort label-5712
SELECT DISTINCT - CAST ( col0 AS INTEGER ) * - col1 - - 32 FROM tab0 AS cor0
----
2096
3427
8131

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col0 + + 26 * col1 col0 FROM tab0
----
-5555
1297
1660

query I rowsort
SELECT + + col1 + col1 FROM tab2 cor0
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5715
SELECT ALL col1 DIV - col0 + 8 DIV 72 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-5715
SELECT ALL col1 / - col0 + 8 / 72 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT DISTINCT - col0 * col1 - - 5 FROM tab1 AS cor0
----
-1035
-635
-73

query I rowsort
SELECT DISTINCT col0 + + col0 * cor0.col2 AS col1 FROM tab0 cor0
----
70
7387
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * cor0.col1 + col0 col1 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-5719
SELECT ALL + cor0.col1 DIV + col0 - - col0 * col2 AS col1 FROM tab0 AS cor0
----
37
7299
795

skipif mysql # not compatible
query I rowsort label-5719
SELECT ALL + cor0.col1 / + col0 - - col0 * col2 AS col1 FROM tab0 AS cor0
----
37
7299
795

query I rowsort
SELECT - + col1 * col1 + 13 * - col1 FROM tab1 cor0
----
-1014
-230
-338

query I rowsort
SELECT col0 + 28 * col2 FROM tab1 AS cor0
----
1515
1660
2768

onlyif mysql # use DIV operator for integer division
query I rowsort label-5722
SELECT + col2 * col1 DIV tab2.col0 AS col2 FROM tab2
----
119
19
8

skipif mysql # not compatible
query I rowsort label-5722
SELECT + col2 * col1 / tab2.col0 AS col2 FROM tab2
----
119
19
8

query I rowsort
SELECT DISTINCT - 96 FROM tab2, tab1 AS cor0
----
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + + col0 col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT col0 * col0 + + col1 AS col1 FROM tab0 AS cor0
----
1322
662
8012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 + + col2 col0 FROM tab0 cor0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col2 AS REAL ) - - col2 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 87 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 969f31ae779866644763e8a07f1ec501

query I rowsort
SELECT - col0 * + col1 * + col1 AS col2 FROM tab2
----
-22831
-271518
-6727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 * col2 col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - - col0 + ( + col2 ) * + cor0.col0 AS col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT 10 - 10 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to 87af467938ef355540b8de24db1bf3b8

query I rowsort
SELECT + 82 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 99920d9f7cd9cdccef99cfa459ae6944

query I rowsort
SELECT + ( - col0 ) + tab1.col1 * ( + col1 ) FROM tab1
----
36
673
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5736
SELECT + - col0 * CAST( col2 AS SIGNED ) + cor0.col1 FROM tab0 AS cor0
----
-706
-7207
62

skipif mysql # not compatible
query I rowsort label-5736
SELECT + - col0 * CAST ( col2 AS INTEGER ) + cor0.col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL - col0 * + 49 AS col2 FROM tab2 cor0
----
-343
-3822
-3871

query I rowsort
SELECT - tab1.col1 + + cor0.col2 AS col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to efedfe558be8ae4bf065663019286f1f

query I rowsort
SELECT DISTINCT + 66 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
66

query I rowsort
SELECT col2 * + tab1.col0 + - col1 * 7 FROM tab1
----
-20
3578
7589

query I rowsort
SELECT ALL - 19 + col0 AS col1 FROM tab1 AS cor0
----
-16
45
61

query I rowsort
SELECT DISTINCT - - col0 * col2 * + col1 - 5 * col0 FROM tab0 AS cor0
----
3220
663673
67992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 * 43 col0 FROM tab0 AS cor0
----
1008
1470
3738

query I rowsort
SELECT - cor0.col2 * col0 + - 14 FROM tab0 cor0
----
-49
-7312
-806

query I rowsort
SELECT - cor0.col2 * - cor0.col1 + - 64 AS col0 FROM tab2 AS cor0
----
1470
582
773

query I rowsort
SELECT DISTINCT + - col1 + - col2 * + col2 AS col1 FROM tab2 cor0
----
-1461
-735
-760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5747
SELECT ALL - + 23 - + col1 * CAST( cor0.col2 AS SIGNED ) FROM tab2 AS cor0
----
-1557
-669
-860

skipif mysql # not compatible
query I rowsort label-5747
SELECT ALL - + 23 - + col1 * CAST ( cor0.col2 AS INTEGER ) FROM tab2 AS cor0
----
-1557
-669
-860

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + cor0.col1 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 29 * col1 AS col2 FROM tab0 AS cor0
----
2494
2639
2813

query I rowsort
SELECT DISTINCT col0 * col1 + cor0.col2 * col2 AS col0 FROM tab0 AS cor0
----
14823
3153
3396

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5751
SELECT col2 + col0 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5751
SELECT col2 + col0 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + - col1 + + col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - - col1 * col1 * - ( ( - col1 ) ) AS col0 FROM tab2 AS cor0
----
205379
29791
4913

skipif mysql # not compatible
query I rowsort
SELECT ALL col2 + CAST ( - cor0.col1 AS REAL ) FROM tab2 AS cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * col2 - col0 * col1 col2 FROM tab1 AS cor0
----
-10256
-2994
-3889

query I rowsort
SELECT col2 * ( 84 * + col0 ) FROM tab0 AS cor0
----
2940
613032
66528

query I rowsort
SELECT DISTINCT + col2 + + 15 AS col1 FROM tab1 cor0
----
111
69
72

query I rowsort
SELECT DISTINCT col0 + - ( + col0 + col2 ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5759
SELECT ALL + + cor0.col2 * col2 + + col1 - cor0.col1 DIV - ( col0 + + cor0.col0 ) AS col2 FROM tab1 cor0
----
2946
3259
9229

skipif mysql # not compatible
query I rowsort label-5759
SELECT ALL + + cor0.col2 * col2 + + col1 - cor0.col1 / - ( col0 + + cor0.col0 ) AS col2 FROM tab1 cor0
----
2946
3259
9229

query I rowsort
SELECT ALL - - col0 + + col2 + + ( cor0.col2 ) * - col0 FROM tab1 cor0
----
-105
-3527
-7504

query I rowsort
SELECT - col2 - col0 * - col1 FROM tab1
----
24
583
944

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ( + ( col2 ) ) * col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - - cor0.col2 + col1 * + col0 * - 51 FROM tab1 AS cor0
----
-32583
-3924
-52944

query I rowsort
SELECT ALL + - ( - 62 ) * col1 FROM tab0 AS cor0
----
5332
5642
6014

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 46 col2 FROM tab2 AS cor0
----
-46
-46
-46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 66 * col0 + col1 col0 FROM tab0 AS cor0
----
-1498
-2213
-5783

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col2 * + col1 col0 FROM tab0 AS cor0
----
-2814
-62
-7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col1 ) col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL 71 * 52 FROM tab0
----
3692
3692
3692

query I rowsort
SELECT DISTINCT + col1 - col0 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT ALL + tab0.col2 + - 59 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to e7575b8560eb6a8371db874694e1558f

query I rowsort
SELECT + col2 + - col0 * - col2 * ( + 78 ) - + col1 AS col2 FROM tab0
----
2634
569235
61723

query I rowsort
SELECT + 94 * ( tab0.col1 + 9 ) FROM tab0
----
8930
9400
9964

onlyif mysql # use DIV operator for integer division
query I rowsort label-5775
SELECT ALL 76 DIV col1 + col2 AS col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5775
SELECT ALL 76 / col1 + col2 AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL - col2 * col2 + ( - col1 ) AS col2 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT DISTINCT + 28 + 25 + - col0 FROM tab0
----
-36
18
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-5778
SELECT ALL 13 DIV + cor0.col1 + - 0 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-5778
SELECT ALL 13 / + cor0.col1 + - 0 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 87 ) * - col1 + ( + col2 * col1 ) col0 FROM tab1
----
-300
-858
117

query I rowsort
SELECT - ( + col2 ) * tab1.col0 * + tab1.col1 FROM tab1
----
-36480
-4212
-99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col0 + ( col2 ) col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - 4 * col1 + + 44 + 69 AS col2 FROM tab1 AS cor0
----
61
73
9

query I rowsort
SELECT + - cor0.col0 * + col0 * + 36 FROM tab0 AS cor0
----
-20736
-285156
-44100

onlyif mysql # use DIV operator for integer division
query I rowsort label-5784
SELECT DISTINCT col0 * + col2 DIV col2 AS col2 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-5784
SELECT DISTINCT col0 * + col2 / col2 AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL - ( - col2 ) * + col1 AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT - 62 AS col1 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to d2579f9395350eda865ff3a2d38a74f6

query I rowsort
SELECT tab2.col1 * - col1 + 71 AS col2 FROM tab2
----
-218
-3410
-890

query I rowsort
SELECT - ( col2 ) + - ( col2 ) * + col2 + - tab2.col0 * - 44 * col0 FROM tab2
----
1400
266994
273122

query I rowsort
SELECT ALL - - col0 + col1 * + ( + col0 ) FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5790
SELECT DISTINCT + tab2.col2 - cor0.col1 DIV 67 col0 FROM tab2, tab0 AS cor0
----
25
26
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5790
SELECT DISTINCT + tab2.col2 - cor0.col1 / 67 col0 FROM tab2, tab0 AS cor0
----
25
26
37

query I rowsort
SELECT ALL - col2 + + col1 * col1 AS col1 FROM tab1 cor0
----
43
622
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + ( col2 ) * col0 col1 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT col1 * + col0 + - col2 FROM tab1 AS cor0
----
24
583
944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + tab1.col0 * + col0 col2 FROM tab1
----
234
40960
83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-5795
SELECT DISTINCT col2 DIV 70 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-5795
SELECT DISTINCT col2 / 70 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT DISTINCT - 41 * col1 FROM tab1 cor0
----
-1066
-410
-533

query I rowsort
SELECT + - 94 + col0 AS col2 FROM tab1 AS cor0
----
-14
-30
-91

query I rowsort
SELECT DISTINCT ( ( - col1 ) ) + - col0 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5799
SELECT + + CAST( + col0 AS SIGNED ) AS col1 FROM tab2 cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5799
SELECT + + CAST ( + col0 AS INTEGER ) AS col1 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL - 47 + col2 FROM tab1 AS cor0
----
10
49
7

query I rowsort
SELECT DISTINCT + + 42 + cor0.col2 AS col2 FROM tab1 AS cor0
----
138
96
99

query I rowsort
SELECT ALL 83 * - col2 AS col2 FROM tab1 AS cor0
----
-4482
-4731
-7968

query I rowsort
SELECT DISTINCT - ( - col2 ) * - col0 * - col1 FROM tab0 cor0
----
3395
664118
68112

query I rowsort
SELECT - col2 + - col0 * col1 AS col0 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT DISTINCT 5 * col1 + - col1 AS col0 FROM tab2 AS cor0
----
124
236
68

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( ( - col2 ) AS REAL ) + col2 / 83 FROM tab1 AS cor0
----
-54
-57
-95

query I rowsort
SELECT DISTINCT - col1 - + ( - col1 ) FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT 73 + 36 * col0 AS col1 FROM tab2 AS cor0
----
2881
2917
325

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 - - col1 col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT cor0.col0 * - col0 * - cor0.col1 FROM tab0 AS cor0
----
118825
49536
720811

query III rowsort
SELECT * FROM tab1 WHERE NOT ( col1 ) NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT - col0 FROM tab1 AS cor0 WHERE NOT ( + col0 * col0 * col1 ) IN ( + col1 )
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5813
SELECT ALL - col0 DIV col1 + tab1.col0 FROM tab1
----
3
58
74

skipif mysql # not compatible
query I rowsort label-5813
SELECT ALL - col0 / col1 + tab1.col0 FROM tab1
----
3
58
74

query I rowsort
SELECT DISTINCT + tab0.col2 * + tab0.col0 FROM tab0 WHERE + col1 + + col1 BETWEEN NULL AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5815
SELECT DISTINCT col1 + col2 DIV col2 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-5815
SELECT DISTINCT col1 + col2 / col2 FROM tab1
----
11
14
27

query I rowsort
SELECT col0 + + col1 * + tab1.col2 AS col2 FROM tab1
----
1328
1407
634

query I rowsort
SELECT DISTINCT + col1 * - col0 * - col1 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT DISTINCT - col1 + col2 * col2 AS col0 FROM tab1
----
2890
3239
9203

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE col0 <= ( - col1 )
----

query I rowsort
SELECT col1 * col1 + - col2 FROM tab1
----
43
622
73

query I rowsort
SELECT DISTINCT col2 * + col2 + - col0 * + col0 FROM tab2
----
-4797
-5408
680

query I rowsort
SELECT ALL + col1 - col0 AS col2 FROM tab2
----
-19
-62
24

query I rowsort
SELECT - col1 + - col2 * + col2 * col0 AS col0 FROM tab0 AS cor0
----
-132
-26222
-598527

onlyif mysql # use DIV operator for integer division
query I rowsort label-5824
SELECT + col2 + col0 DIV tab1.col2 FROM tab1
----
54
58
96

skipif mysql # not compatible
query I rowsort label-5824
SELECT + col2 + col0 / tab1.col2 FROM tab1
----
54
58
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 / tab1.col0 col0 FROM tab1 WHERE NULL IN ( tab1.col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col1 col2 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT ALL + col1 + col0 + - col1 * col0 AS col0 FROM tab1 cor0
----
-49
-566
-947

query I rowsort
SELECT ALL col0 + - 44 FROM tab1 cor0
----
-41
20
36

query I rowsort
SELECT ALL tab2.col2 AS col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT - col0 * - col0 * + cor0.col1 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT ALL col0 + + 79 + + col0 * col2 FROM tab1 cor0
----
244
3791
7839

query I rowsort
SELECT + - col2 * - ( + col2 ) + col2 AS col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT ALL 70 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 27 col1 FROM tab0
----
27

query I rowsort
SELECT ALL 62 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query I rowsort
SELECT col0 * col2 + col2 * col2 AS col1 FROM tab2
----
2704
4446
918

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5837
SELECT DISTINCT col2 / + CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5837
SELECT DISTINCT col2 / + CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL

query I rowsort
SELECT + col2 + - col1 * col2 FROM tab1
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-5839
SELECT ALL - col1 DIV - col1 + + col2 col2 FROM tab2
----
27
28
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5839
SELECT ALL - col1 / - col1 + + col2 col2 FROM tab2
----
27
28
39

query III rowsort
SELECT * FROM tab1 WHERE + col2 NOT IN ( - tab1.col0 - col0 * - tab1.col1 * col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT + col1 * tab0.col1 + - col2 AS col2 FROM tab0
----
7363
8199
9408

query III rowsort
SELECT * FROM tab0 WHERE NOT + col1 + col2 * - col2 * col0 <= ( col1 * col1 )
----

query I rowsort
SELECT ALL + tab0.col1 * - col1 * col0 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT + col1 + - col2 + - tab2.col0 AS col2 FROM tab2
----
-100
-3
-45

onlyif mysql # use DIV operator for integer division
query I rowsort label-5845
SELECT DISTINCT - tab0.col2 + col0 * + tab0.col0 + + tab0.col0 DIV tab0.col0 FROM tab0
----
1225
544
7840

skipif mysql # not compatible
query I rowsort label-5845
SELECT DISTINCT - tab0.col2 + col0 * + tab0.col0 + + tab0.col0 / tab0.col0 FROM tab0
----
1225
544
7840

query I rowsort
SELECT - col2 * + tab2.col1 * - tab2.col2 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT + 76 + - cor0.col2 FROM tab0 AS cor0
----
-6
43
75

query I rowsort
SELECT ALL + - tab1.col2 + tab1.col0 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to a62a6691988eb243604ec6133ae5eae4

query I rowsort
SELECT ALL col1 + + col2 * - col1 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * + col2 col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT col1 FROM tab0 WHERE ( + col0 ) > ( NULL )
----

query I rowsort
SELECT ALL + ( ( + tab0.col1 ) ) * - cor0.col2 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 38ae4ab6a8fdfcd855d57a73fb99e326

query I rowsort
SELECT cor2.col0 * 59 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 4d2a1b7df2ca0c38a7f96b3438bc4560

query I rowsort
SELECT - col1 * + 61 FROM tab0 AS cor0
----
-5246
-5551
-5917

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5855
SELECT ALL + col2 / - CAST( NULL AS SIGNED ) + 19 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5855
SELECT ALL + col2 / - CAST ( NULL AS INTEGER ) + 19 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5856
SELECT + col2 DIV - col2 + + col2 * - cor0.col2 AS col0 FROM tab0 cor0
----
-1090
-2
-6725

skipif mysql # not compatible
query I rowsort label-5856
SELECT + col2 / - col2 + + col2 * - cor0.col2 AS col0 FROM tab0 cor0
----
-1090
-2
-6725

onlyif mysql # use DIV operator for integer division
query I rowsort label-5857
SELECT ALL - col1 + - col0 DIV - cor0.col0 - + cor0.col2 * ( + col1 ) FROM tab0 AS cor0
----
-193
-2923
-7552

skipif mysql # not compatible
query I rowsort label-5857
SELECT ALL - col1 + - col0 / - cor0.col0 - + cor0.col2 * ( + col1 ) FROM tab0 AS cor0
----
-193
-2923
-7552

query I rowsort
SELECT ( 54 ) * col2 FROM tab0 AS cor0
----
1782
4428
54

query I rowsort
SELECT DISTINCT + col0 * 7 + col2 AS col1 FROM tab1 AS cor0
----
505
656
75

query I rowsort
SELECT ALL - ( + 86 * col1 ) FROM tab1
----
-1118
-2236
-860

query I rowsort
SELECT - 36 FROM tab2, tab1 AS cor0
----
9 values hashing to afecaf209e79e23b6674a73fffa3e837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 59 * 72 + - col1 * 48 col1 FROM tab1 AS cor0
----
3000
3624
3768

query I rowsort
SELECT DISTINCT + 11 * col1 FROM tab1 AS cor0
----
110
143
286

query I rowsort
SELECT ALL + 12 + + col0 * + col1 FROM tab1 AS cor0
----
1052
652
90

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( col0 AS REAL ) + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + ( col1 ) * + col1 + - ( + col0 ) * col1 FROM tab1 AS cor0
----
-540
-871
598

query I rowsort
SELECT - col0 * col1 + col1 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT cor0.col1 * col2 AS col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ALL 13 + col1 AS col0 FROM tab0 AS cor0
----
104
110
99

query I rowsort
SELECT DISTINCT - ( - col1 ) + 47 * col1 AS col2 FROM tab2 AS cor0
----
1488
2832
816

query I rowsort
SELECT - - col0 * col1 + 51 AS col1 FROM tab1 AS cor0
----
1091
129
691

query I rowsort
SELECT cor0.col0 - + col1 FROM tab0 cor0
----
-2
-62
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5873
SELECT DISTINCT - col1 * + CAST( - col1 AS SIGNED ) col1 FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5873
SELECT DISTINCT - col1 * + CAST ( - col1 AS INTEGER ) col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - col0 * col1 + ( col2 + ( - cor0.col1 ) ) AS col2 FROM tab0 AS cor0
----
-2117
-3491
-8108

query I rowsort
SELECT DISTINCT + col0 * col0 * 51 FROM tab0 AS cor0
----
29376
403971
62475

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5876
SELECT ALL + - col2 + + CAST( col1 * col1 AS SIGNED ) FROM tab1 AS cor0
----
43
622
73

skipif mysql # not compatible
query I rowsort label-5876
SELECT ALL + - col2 + + CAST ( col1 * col1 AS INTEGER ) FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT + col2 - - ( - col0 ) FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-5878
SELECT ALL - cor0.col1 * - cor0.col2 + col0 DIV - col0 FROM tab0 AS cor0
----
2837
7461
96

skipif mysql # not compatible
query I rowsort label-5878
SELECT ALL - cor0.col1 * - cor0.col2 + col0 / - col0 FROM tab0 AS cor0
----
2837
7461
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5879
SELECT DISTINCT col2 DIV - col1 - + col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-5879
SELECT DISTINCT col2 / - col1 - + col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - col2 + 26 AS col2 FROM tab0 AS cor0
----
-56
-7
25

query I rowsort
SELECT col1 - col1 * col2 AS col2 FROM tab0 cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL + col0 * - cor0.col1 + cor0.col1 * col2 FROM tab1 AS cor0
----
-70
1326
208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + cor0.col1 - + col1 col0 FROM tab2 cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5884
SELECT DISTINCT ( col1 ) * CAST( NULL AS SIGNED ) * col0 col0 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5884
SELECT DISTINCT ( col1 ) * CAST ( NULL AS INTEGER ) * col0 col0 FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5885
SELECT + col1 * - col2 DIV + col2 FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5885
SELECT + col1 * - col2 / + col2 FROM tab1
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5886
SELECT DISTINCT + col2 * 3 + + col1 DIV col1 + + col2 DIV 98 FROM tab2 cor0
----
115
79
82

skipif mysql # not compatible
query I rowsort label-5886
SELECT DISTINCT + col2 * 3 + + col1 / col1 + + col2 / 98 FROM tab2 cor0
----
115
79
82

query I rowsort
SELECT DISTINCT + col0 * col2 + - col0 + - col0 * ( + col0 ) AS col1 FROM tab2 AS cor0
----
-3318
-4134
133

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + ( 13 ) col0 FROM tab1 AS cor0
----
-1248
-702
-741

query I rowsort
SELECT DISTINCT + cor0.col0 * ( + col0 + + col0 * col1 ) AS col1 FROM tab0 AS cor0
----
120050
50112
728732

query I rowsort
SELECT 68 + + cor1.col2 + - 16 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 3da77159715619e4eb4b6f7a0301876d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + ( col2 ) ) * ( 63 ) col2 FROM tab1 AS cor0
----
3402
3591
6048

query I rowsort
SELECT DISTINCT col1 * - col0 * 82 + tab1.col2 AS col0 FROM tab1
----
-52423
-6342
-85184

query I rowsort
SELECT DISTINCT col0 + col2 * ( + col0 * 71 ) AS col1 FROM tab2
----
13426
144066
213221

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5894
SELECT ALL + col1 * CAST( - col2 AS SIGNED ) AS col0 FROM tab1
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-5894
SELECT ALL + col1 * CAST ( - col2 AS INTEGER ) AS col0 FROM tab1
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5895
SELECT - col2 DIV + col2 + - col2 AS col0 FROM tab0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-5895
SELECT - col2 / + col2 + - col2 AS col0 FROM tab0
----
-2
-34
-83

query I rowsort
SELECT col2 + col0 + + tab2.col2 AS col2 FROM tab2
----
130
155
61

query I rowsort
SELECT DISTINCT - tab1.col1 + ( - 73 ) AS col2 FROM tab1
----
-83
-86
-99

query I rowsort
SELECT DISTINCT col2 + - 31 * + col2 * col2 AS col1 FROM tab2
----
-20930
-22572
-44726

query I rowsort
SELECT ALL + col0 + - tab1.col0 + - 6 * col2 FROM tab1
----
-324
-342
-576

query I rowsort
SELECT - + 5 * - col1 FROM tab2 AS cor0
----
155
295
85

query I rowsort
SELECT - + col2 * cor0.col0 + - 25 FROM tab2 AS cor0
----
-2053
-214
-3027

query I rowsort
SELECT ALL - - col1 * col2 + + col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT ( col2 ) * - ( 55 ) FROM tab2 AS cor0
----
-1430
-1485
-2090

onlyif mysql # use DIV operator for integer division
query I rowsort label-5904
SELECT - - col1 + col2 DIV - col0 FROM tab1 AS cor0
----
10
12
8

skipif mysql # not compatible
query I rowsort label-5904
SELECT - - col1 + col2 / - col0 FROM tab1 AS cor0
----
10
12
8

query I rowsort
SELECT ALL - + 51 FROM tab2 cor0
----
-51
-51
-51

query I rowsort
SELECT ALL - col0 * col1 + 33 AS col2 FROM tab1 cor0
----
-1007
-45
-607

onlyif mysql # use DIV operator for integer division
query I rowsort label-5907
SELECT ALL + col0 * col1 DIV + 6 AS col0 FROM tab1 AS cor0
----
106
13
173

skipif mysql # not compatible
query I rowsort label-5907
SELECT ALL + col0 * col1 / + 6 AS col0 FROM tab1 AS cor0
----
106
13
173

onlyif mysql # use DIV operator for integer division
query I rowsort label-5908
SELECT col1 * - col2 + - col0 DIV col0 FROM tab1
----
-1249
-1405
-571

skipif mysql # not compatible
query I rowsort label-5908
SELECT col1 * - col2 + - col0 / col0 FROM tab1
----
-1249
-1405
-571

query I rowsort
SELECT ALL ( - col2 * col1 ) + - 94 * - col2 FROM tab0
----
-3
246
264

query I rowsort
SELECT col1 * - col2 * col2 - 82 AS col0 FROM tab1
----
-119890
-32572
-75898

query I rowsort
SELECT DISTINCT 43 * - ( + col0 ) + + ( col0 ) * col1 AS col0 FROM tab0
----
1032
1890
4272

query I rowsort
SELECT tab0.col1 FROM tab0, tab0 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT DISTINCT 56 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
56

query I rowsort
SELECT DISTINCT + 86 - - cor0.col2 AS col1 FROM tab2 AS cor0
----
112
113
124

query I rowsort
SELECT + col2 + col2 * 99 FROM tab2 AS cor0
----
2600
2700
3800

query I rowsort
SELECT ALL 25 + col0 * + 72 + 44 FROM tab2 AS cor0
----
5685
573
5757

query I rowsort
SELECT - - col1 + col0 * 62 * col0 FROM tab2 AS cor0
----
3069
377267
386959

query I rowsort
SELECT ALL - 26 * + cor0.col2 + col2 FROM tab2 AS cor0
----
-650
-675
-950

query I rowsort
SELECT - - 91 AS col2 FROM tab1 AS cor0
----
91
91
91

query I rowsort
SELECT ALL + col2 * cor0.col2 + col0 + 87 FROM tab0 AS cor0
----
1200
123
6900

query I rowsort
SELECT DISTINCT cor0.col1 * + col0 * + ( + ( col2 ) ) AS col2 FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT + 49 AS col0 FROM tab1
----
49
49
49

query I rowsort
SELECT ALL - 53 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to fee5c00ad71c23e23683a32c71fe6e7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - 8 * - col0 ) col2 FROM tab0
----
192
280
712

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5926
SELECT CAST( NULL AS SIGNED ) col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5926
SELECT CAST ( NULL AS INTEGER ) col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 44 AS col2 FROM tab1
----
44
44
44

query I rowsort
SELECT ALL col2 * 5 AS col0 FROM tab0
----
165
410
5

query I rowsort
SELECT + - cor0.col1 - - col0 * col2 AS col2 FROM tab0 cor0
----
-62
706
7207

query I rowsort
SELECT - + cor0.col1 - col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL 33 FROM tab2, tab1 cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT DISTINCT + tab2.col1 AS col0 FROM tab2, tab1, tab0 AS cor0
----
17
31
59

query I rowsort
SELECT - tab1.col1 + - ( col1 ) * - 46 FROM tab1
----
1170
450
585

query I rowsort
SELECT ALL cor0.col0 + - col0 AS col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL - 2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 20c9213316527d507e26425041e08387

onlyif mysql # use DIV operator for integer division
query I rowsort label-5936
SELECT DISTINCT + 16 + - col1 DIV + 21 FROM tab1
----
15
16

skipif mysql # not compatible
query I rowsort label-5936
SELECT DISTINCT + 16 + - col1 / + 21 FROM tab1
----
15
16

query I rowsort
SELECT - col0 * col0 + - col0 * cor0.col0 + ( + col1 ) FROM tab0 AS cor0
----
-1066
-15751
-2353

query I rowsort
SELECT - + col0 * ( - col0 ) + col2 * + col1 FROM tab2 AS cor0
----
6887
7618
886

query I rowsort
SELECT + ( + cor0.col1 ) AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL - ( - ( col1 ) ) AS col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT + ( 64 ) * col0 AS col1 FROM tab0 AS cor0
----
1536
2240
5696

query I rowsort
SELECT ALL - 60 * + col0 + - col2 FROM tab2 AS cor0
----
-447
-4706
-4778

query I rowsort
SELECT 82 AS col0 FROM tab2 AS cor0
----
82
82
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5944
SELECT + col0 + + col0 DIV col2 FROM tab1 AS cor0
----
3
65
80

skipif mysql # not compatible
query I rowsort label-5944
SELECT + col0 + + col0 / col2 FROM tab1 AS cor0
----
3
65
80

query I rowsort
SELECT + + ( + col2 ) * + col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT col2 * - 73 AS col2 FROM tab1
----
-3942
-4161
-7008

query I rowsort
SELECT - tab1.col0 * - ( + col0 ) FROM tab1
----
4096
6400
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5948
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5948
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + 0 * col2 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + 65 * cor0.col0 + col1 * col2 AS col1 FROM tab0 AS cor0
----
-2178
1278
1677

query I rowsort
SELECT ALL - col0 + col2 * col2 + + 10 FROM tab2 AS cor0
----
1375
608
732

query I rowsort
SELECT DISTINCT + col1 * + col1 * - tab0.col1 FROM tab0
----
-636056
-753571
-912673

query I rowsort
SELECT + 87 * col1 AS col2 FROM tab1 AS cor0
----
1131
2262
870

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5954
SELECT + - CAST( NULL AS SIGNED ) * ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5954
SELECT + - CAST ( NULL AS INTEGER ) * ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5955
SELECT 55 DIV col2 FROM tab0
----
0
1
55

skipif mysql # not compatible
query I rowsort label-5955
SELECT 55 / col2 FROM tab0
----
0
1
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-5956
SELECT col2 * col1 + col2 DIV + 42 + col0 FROM tab1
----
1330
1408
635

skipif mysql # not compatible
query I rowsort label-5956
SELECT col2 * col1 + col2 / + 42 + col0 FROM tab1
----
1330
1408
635

query I rowsort
SELECT ALL col0 * col1 + col2 FROM tab2
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-5958
SELECT DISTINCT col1 DIV - 26 col1 FROM tab0
----
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5958
SELECT DISTINCT col1 / - 26 col1 FROM tab0
----
-3

query I rowsort
SELECT DISTINCT col1 * ( + 29 + col1 ) FROM tab1
----
1430
390
546

query I rowsort
SELECT col1 - + col0 * + col0 AS col1 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT + col0 * + tab2.col1 + col1 + col0 AS col0 FROM tab2
----
1439
255
4739

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5962
SELECT DISTINCT + col1 + + col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5962
SELECT DISTINCT + col1 + + col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col0 * - col0 + 32 * + 53 + col0 * - col2 * - col0 AS col2 FROM tab2 AS cor0
----
153796
232613
2970

onlyif mysql # use DIV operator for integer division
query I rowsort label-5964
SELECT + ( col1 ) + + col1 DIV + col0 AS col2 FROM tab0 AS cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-5964
SELECT + ( col1 ) + + col1 / + col0 AS col2 FROM tab0 AS cor0
----
89
92
99

query I rowsort
SELECT ALL + 46 * + col2 FROM tab1 AS cor0
----
2484
2622
4416

onlyif mysql # use DIV operator for integer division
query I rowsort label-5966
SELECT + 60 DIV col0 col0 FROM tab1 cor0
----
0
0
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5966
SELECT + 60 / col0 col0 FROM tab1 cor0
----
0
0
20

query I rowsort
SELECT - - col1 + col1 * 69 FROM tab0 AS cor0
----
6020
6370
6790

query I rowsort
SELECT ALL + 50 + + col1 AS col1 FROM tab0 AS cor0
----
136
141
147

query I rowsort
SELECT cor0.col2 + - col0 * 7 * - ( col1 ) AS col1 FROM tab2 cor0
----
1546
32240
9439

query I rowsort
SELECT DISTINCT - 75 AS col2 FROM tab0 cor0
----
-75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5971
SELECT ALL + col2 * col1 * - CAST( - col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
244068
679042
9409

skipif mysql # not compatible
query I rowsort label-5971
SELECT ALL + col2 * col1 * - CAST ( - col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-5972
SELECT 79 + col0 DIV ( + col0 * col1 ) FROM tab0 AS cor0
----
79
79
79

skipif mysql # not compatible
query I rowsort label-5972
SELECT 79 + col0 / ( + col0 * col1 ) FROM tab0 AS cor0
----
79
79
79

query I rowsort
SELECT ALL - 83 AS col0 FROM tab0 AS cor0
----
-83
-83
-83

query I rowsort
SELECT ( 62 ) + + col1 AS col0 FROM tab0
----
148
153
159

query I rowsort
SELECT DISTINCT 51 AS col2 FROM tab1, tab0 AS cor0
----
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-5976
SELECT 4 DIV - 55 + + col1 * - col2 FROM tab0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-5976
SELECT 4 / - 55 + + col1 * - col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT 84 AS col2 FROM tab1 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT 81 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 * col2 col1 FROM tab0 AS cor0
----
2145
5330
65

query I rowsort
SELECT ALL + + col2 * - col2 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT ALL + col0 + col2 * col2 + col0 AS col2 FROM tab0
----
1137
6902
71

query I rowsort
SELECT - 53 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to fee5c00ad71c23e23683a32c71fe6e7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-5983
SELECT col2 + 57 * col2 DIV + col2 AS col1 FROM tab0 cor0
----
139
58
90

skipif mysql # not compatible
query I rowsort label-5983
SELECT col2 + 57 * col2 / + col2 AS col1 FROM tab0 cor0
----
139
58
90

query I rowsort
SELECT DISTINCT - ( 24 ) * col2 FROM tab0
----
-1968
-24
-792

query I rowsort
SELECT cor1.col1 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-5986
SELECT DISTINCT + 56 DIV + col2 + - col2 AS col1 FROM tab0 cor0
----
-32
-82
55

skipif mysql # not compatible
query I rowsort label-5986
SELECT DISTINCT + 56 / + col2 + - col2 AS col1 FROM tab0 cor0
----
-32
-82
55

query I rowsort
SELECT ALL - col1 * + col0 + col2 AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT ( col1 ) + - col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5989
SELECT + col0 * - col1 * - col2 + - col1 DIV + tab0.col1 FROM tab0
----
3394
664117
68111

skipif mysql # not compatible
query I rowsort label-5989
SELECT + col0 * - col1 * - col2 + - col1 / + tab0.col1 FROM tab0
----
3394
664117
68111

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col0 col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
24
35
89

query I rowsort
SELECT + col1 + 39 * col2 AS col1 FROM tab0 AS cor0
----
136
1373
3289

query I rowsort
SELECT ALL + 99 * - col0 + col1 + col2 AS col1 FROM tab2 AS cor0
----
-635
-7637
-7766

query I rowsort
SELECT ALL + - col1 + + 21 FROM tab0 AS cor0
----
-65
-70
-76

query I rowsort
SELECT DISTINCT + 25 + 91 + col1 FROM tab0 AS cor0
----
202
207
213

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 49 + ( + col1 ) col1 FROM tab2 AS cor0
----
-18
-32
10

query I rowsort
SELECT DISTINCT 69 AS col1 FROM tab2, tab1 AS cor0
----
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-5997
SELECT ALL - cor0.col0 DIV - col0 + - col1 * + col2 * + 25 AS col2 FROM tab2 AS cor0
----
-16149
-20924
-38349

skipif mysql # not compatible
query I rowsort label-5997
SELECT ALL - cor0.col0 / - col0 + - col1 * + col2 * + 25 AS col2 FROM tab2 AS cor0
----
-16149
-20924
-38349

query I rowsort
SELECT ALL - ( + col0 ) * col2 - cor0.col1 FROM tab0 AS cor0
----
-132
-7389
-878

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0 AS cor2
----
3645 values hashing to f99537dcc805430f79ac82ef70a4bd59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6000
SELECT ALL col1 + + col0 DIV col0 AS col2 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-6000
SELECT ALL col1 + + col0 / col0 AS col2 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT - 38 * - 21 * + col2 AS col2 FROM tab1 cor0
----
43092
45486
76608

query I rowsort
SELECT DISTINCT + + 69 * col0 AS col1 FROM tab2 cor0
----
483
5382
5451

query I rowsort
SELECT DISTINCT 22 + - ( - cor0.col0 ) AS col1 FROM tab0 AS cor0
----
111
46
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6004
SELECT ALL - CAST( 30 AS SIGNED ) * col2 col0 FROM tab1 cor0
----
-1620
-1710
-2880

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6004
SELECT ALL - CAST ( 30 AS INTEGER ) * col2 col0 FROM tab1 cor0
----
-1620
-1710
-2880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - 17 ) + col2 col2 FROM tab1 AS cor0
----
37
40
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6006
SELECT DISTINCT col2 DIV col1 + ( cor0.col1 ) AS col0 FROM tab2 AS cor0
----
19
31
59

skipif mysql # not compatible
query I rowsort label-6006
SELECT DISTINCT col2 / col1 + ( cor0.col1 ) AS col0 FROM tab2 AS cor0
----
19
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6007
SELECT ALL + cor0.col1 + - col0 DIV - col1 + 24 AS col1 FROM tab2 AS cor0
----
45
55
84

skipif mysql # not compatible
query I rowsort label-6007
SELECT ALL + cor0.col1 + - col0 / - col1 + 24 AS col1 FROM tab2 AS cor0
----
45
55
84

query I rowsort
SELECT DISTINCT - + col2 + + col1 * + cor0.col1 AS col0 FROM tab0 cor0
----
7363
8199
9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col2 * - col1 * + col2 col2 FROM tab0 AS cor0
----
-611802
-93621
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6010
SELECT + col0 * CAST( NULL AS DECIMAL ) * + col2 + + col1 + + 60 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6010
SELECT + col0 * CAST ( NULL AS REAL ) * + col2 + + col1 + + 60 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 18 * 95 + - col2 FROM tab1 AS cor0
----
1614
1653
1656

onlyif mysql # use DIV operator for integer division
query I rowsort label-6012
SELECT + col1 + ( tab1.col0 ) DIV + col2 FROM tab1
----
11
13
26

skipif mysql # not compatible
query I rowsort label-6012
SELECT + col1 + ( tab1.col0 ) / + col2 FROM tab1
----
11
13
26

query I rowsort
SELECT - ( 5 ) AS col2 FROM tab1 AS cor0
----
-5
-5
-5

query I rowsort
SELECT - 53 * col0 AS col1 FROM tab0 AS cor0
----
-1272
-1855
-4717

query I rowsort
SELECT ( + 40 ) FROM tab1 AS cor0
----
40
40
40

query I rowsort
SELECT DISTINCT col2 * + ( - col2 ) FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT ALL + + tab0.col1 AS col2 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL tab1.col2 * ( + tab1.col2 ) AS col0 FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-6019
SELECT tab0.col2 DIV + tab0.col1 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6019
SELECT tab0.col2 / + tab0.col1 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT col1 + - col2 * + col1 AS col0 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT ALL + col2 * + 57 + - col1 * - col1 FROM tab0
----
12955
9277
9466

query I rowsort
SELECT - col0 * ( - col1 ) * col2 AS col1 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT - + col2 + + ( col1 ) AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - - col1 * + ( - col1 ) + col2 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT ALL cor0.col2 + + 35 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to a6f5bd3c132ae500bfca6e845fb8129f

query I rowsort
SELECT DISTINCT col0 * 76 FROM tab0
----
1824
2660
6764

query I rowsort
SELECT - + col0 + ( 89 ) FROM tab0 AS cor0
----
0
54
65

query I rowsort
SELECT + 27 + 29 + - cor0.col1 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 7520bc572be8e6cd2da8d11bf81bc68a

query I rowsort
SELECT 99 AS col0 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to 05ea182fd6036c7f5e0ea08fc061cc67

query I rowsort
SELECT DISTINCT ( - col1 * tab1.col0 ) FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT + 16 + col0 FROM tab2
----
23
94
95

query I rowsort
SELECT DISTINCT col1 + col2 - + col0 FROM tab2 AS cor0
----
-24
51
7

query I rowsort
SELECT ALL - col2 + ( col0 ) FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT ALL - - cor0.col1 * - ( 2 ) FROM tab1, tab2 AS cor0
----
9 values hashing to 66e198acca624efd182aa551bb5de4c7

query I rowsort
SELECT ALL 84 AS col2 FROM tab2
----
84
84
84

query I rowsort
SELECT - cor0.col1 - col1 AS col0 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT + col0 * col2 + ( + 76 + col0 ) AS col0 FROM tab2 AS cor0
----
2182
272
3157

onlyif mysql # use DIV operator for integer division
query I rowsort label-6038
SELECT - col0 DIV + col1 FROM tab1 cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-6038
SELECT - col0 / + col1 FROM tab1 cor0
----
-6
-6
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * - col0 + col2 col2 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT - + 54 * + col0 + + col1 AS col2 FROM tab2 AS cor0
----
-347
-4153
-4249

onlyif mysql # use DIV operator for integer division
query I rowsort label-6041
SELECT - 39 + col0 DIV + CAST( + col2 + + col1 AS SIGNED ) FROM tab2 AS cor0
----
-38
-39
-39

skipif mysql # not compatible
query I rowsort label-6041
SELECT - 39 + col0 / + CAST ( + col2 + + col1 AS INTEGER ) FROM tab2 AS cor0
----
-38
-39
-39

query I rowsort
SELECT + - cor0.col2 + - col1 AS col2 FROM tab0 AS cor0
----
-119
-173
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 * - tab0.col0 + ( - tab0.col0 ) + col1 * + col2 * col1 col1 FROM tab0
----
10599
1328475
263052

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6044
SELECT CAST( NULL AS SIGNED ) * col2 + col2 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6044
SELECT CAST ( NULL AS INTEGER ) * col2 + col2 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor0.col2 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + tab1.col2 * + tab1.col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ( col1 ) * - col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT + 68 + col1 + + col1 FROM tab2
----
102
130
186

query I rowsort
SELECT DISTINCT tab2.col0 * col0 + + col1 AS col1 FROM tab2
----
6143
6258
80

query I rowsort
SELECT DISTINCT - 34 + + col1 FROM tab2
----
-17
-3
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-6051
SELECT ALL tab0.col2 DIV + col1 + - col1 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-6051
SELECT ALL tab0.col2 / + col1 + - col1 FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 * - col0 col0 FROM tab0
----
-1584
-2310
-5874

onlyif mysql # use DIV operator for integer division
query I rowsort label-6053
SELECT - - 2 + cor0.col2 DIV - ( + cor0.col0 ) FROM tab1 AS cor0
----
-16
1
2

skipif mysql # not compatible
query I rowsort label-6053
SELECT - - 2 + cor0.col2 / - ( + cor0.col0 ) FROM tab1 AS cor0
----
-16
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6054
SELECT DISTINCT + cor0.col2 + - col0 DIV ( - cor0.col0 * - col2 + + col1 ) FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6054
SELECT DISTINCT + cor0.col2 + - col0 / ( - cor0.col0 * - col2 + + col1 ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + 15 * - col1 AS col0 FROM tab2 AS cor0
----
-255
-465
-885

query I rowsort
SELECT DISTINCT + col0 * + col1 + 93 FROM tab0 AS cor0
----
2157
3488
8192

query I rowsort
SELECT ALL col0 + - 61 * col0 FROM tab1 AS cor0
----
-180
-3840
-4800

query I rowsort
SELECT DISTINCT + - col2 * 0 + 75 FROM tab2 AS cor0
----
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-6059
SELECT ALL + + col0 * cor0.col2 + 81 DIV - col1 AS col0 FROM tab0 cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-6059
SELECT ALL + + col0 * cor0.col2 + 81 / - col1 AS col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT cor0.col2 * col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6061
SELECT - col0 / + col0 + ( col1 + - CAST( NULL AS DECIMAL ) ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6061
SELECT - col0 / + col0 + ( col1 + - 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-6062
SELECT ALL - col1 * CAST( NULL AS SIGNED ) + col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6062
SELECT ALL - col1 * CAST ( NULL AS INTEGER ) + col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + ( col0 ) AS col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT 90 * + col1 AS col0 FROM tab2
----
1530
2790
5310

query I rowsort
SELECT - + col2 + + 39 * - 97 FROM tab0 AS cor0
----
-3784
-3816
-3865

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6066
SELECT ALL + col2 - CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6066
SELECT ALL + col2 - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6067
SELECT - - col1 + col1 DIV col2 AS col2 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-6067
SELECT - - col1 + col1 / col2 AS col2 FROM tab0 AS cor0
----
194
88
92

query I rowsort
SELECT - col0 + + 29 * - col1 FROM tab2 cor0
----
-1789
-572
-906

query I rowsort
SELECT - col2 + + 62 * - col0 AS col1 FROM tab1 cor0
----
-240
-4025
-5056

query I rowsort
SELECT - col0 * 64 FROM tab1 AS cor0
----
-192
-4096
-5120

query I rowsort
SELECT DISTINCT - 73 * cor0.col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
-219
-4672
-5840

query I rowsort
SELECT + 40 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT DISTINCT + + col0 * ( + col1 ) AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + + col0 + + ( + col0 ) * + col1 AS col1 FROM tab1 cor0
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col1 ) * col1 col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + + 11 + col2 FROM tab1 AS cor0
----
107
65
68

query I rowsort
SELECT ALL - ( 12 ) * - col1 FROM tab1 AS cor0
----
120
156
312

query I rowsort
SELECT + + 26 * col1 FROM tab0 AS cor0
----
2236
2366
2522

query I rowsort
SELECT DISTINCT + 21 * - col2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
-1080
-1140
-1920

query I rowsort
SELECT ALL + ( col2 ) * col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT - 5 AS col2 FROM tab1 AS cor0
----
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 * 28 col2 FROM tab0 AS cor0
----
2384
2459
2681

query I rowsort
SELECT 94 + - 56 * + col0 + col0 FROM tab0
----
-1226
-1831
-4801

query I rowsort
SELECT DISTINCT col1 - 99 FROM tab2
----
-40
-68
-82

query I rowsort
SELECT DISTINCT - col0 * + 33 AS col1 FROM tab2
----
-231
-2574
-2607

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6086
SELECT - CAST( + ( - col0 ) AS SIGNED ) * - 30 AS col1 FROM tab0
----
-1050
-2670
-720

skipif mysql # not compatible
query I rowsort label-6086
SELECT - CAST ( + ( - col0 ) AS INTEGER ) * - 30 AS col1 FROM tab0
----
-1050
-2670
-720

onlyif mysql # use DIV operator for integer division
query I rowsort label-6087
SELECT ALL - - col2 DIV ( + col0 ) AS col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-6087
SELECT ALL - - col2 / ( + col0 ) AS col0 FROM tab1 AS cor0
----
0
1
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6088
SELECT + - col2 * + CAST( + col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-6088
SELECT + - col2 * + CAST ( + col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - col2 * col0 + + col2 AS col1 FROM tab1 AS cor0
----
-108
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-6090
SELECT - col1 DIV ( 36 ) AS col1 FROM tab0 AS cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-6090
SELECT - col1 / ( 36 ) AS col1 FROM tab0 AS cor0
----
-2
-2
-2

query I rowsort
SELECT DISTINCT + col0 * + ( col0 ) AS col0 FROM tab2 AS cor0
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + 50 col1 FROM tab0 AS cor0
----
4300
4550
4850

query I rowsort
SELECT DISTINCT + + col1 * ( - 67 ) FROM tab0 AS cor0
----
-5762
-6097
-6499

onlyif mysql # use DIV operator for integer division
query I rowsort label-6094
SELECT - cor0.col0 + + 4 DIV - cor0.col1 col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6094
SELECT - cor0.col0 + + 4 / - cor0.col1 col2 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6095
SELECT DISTINCT + col1 + 0 DIV col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6095
SELECT DISTINCT + col1 + 0 / col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col1 * - col0 + - CAST ( + ( col1 ) AS REAL ) * col1 FROM tab2
----
-1178
-1632
-8083

query I rowsort
SELECT DISTINCT cor0.col1 + col2 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
2942
3259
9229

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6098
SELECT + col0 * + CAST( 48 AS SIGNED ) * + col0 FROM tab0 AS cor0
----
27648
380208
58800

skipif mysql # not compatible
query I rowsort label-6098
SELECT + col0 * + CAST ( 48 AS INTEGER ) * + col0 FROM tab0 AS cor0
----
27648
380208
58800

onlyif mysql # use DIV operator for integer division
query I rowsort label-6099
SELECT - - col0 DIV - ( col0 ) FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6099
SELECT - - col0 / - ( col0 ) FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + col0 * 5 AS col2 FROM tab1 AS cor0
----
15
320
400

query I rowsort
SELECT DISTINCT + col0 * - 73 FROM tab0 AS cor0
----
-1752
-2555
-6497

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - col1 * + col2 col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT - - 6 AS col1 FROM tab0 AS cor0
----
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab2, tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL col0 + - col1 * col1 + - 99 AS col1 FROM tab2 AS cor0
----
-1053
-309
-3502

query I rowsort
SELECT + + 95 + col1 FROM tab0 AS cor0
----
181
186
192

query I rowsort
SELECT ALL 72 AS col1 FROM tab2 cor0
----
72
72
72

query I rowsort
SELECT cor0.col0 + cor0.col0 + col2 * col2 AS col0 FROM tab0 AS cor0
----
1137
6902
71

query I rowsort
SELECT - ( col1 ) * - col1 * col2 AS col0 FROM tab2 AS cor0
----
10982
25947
90506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6110
SELECT cor1.col1 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6110
SELECT cor1.col1 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL col2 + 74 * col2 * col0 AS col0 FROM tab2
----
14013
150098
222186

query I rowsort
SELECT DISTINCT col0 + col1 * ( - ( - col1 ) ) AS col0 FROM tab1
----
164
249
679

query I rowsort
SELECT + cor0.col1 * col2 + - col1 FROM tab2 cor0
----
1475
629
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col2 col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 + ( col1 ) * - col1 AS col2 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6116
SELECT - col1 + col1 DIV col0 + + col0 * col0 FROM tab1
----
-9
4086
6387

skipif mysql # not compatible
query I rowsort label-6116
SELECT - col1 + col1 / col0 + + col0 * col0 FROM tab1
----
-9
4086
6387

query I rowsort
SELECT ALL - 4 + col1 * + col1 AS col2 FROM tab0 AS cor0
----
7392
8277
9405

query I rowsort
SELECT + ( col1 * - tab0.col1 ) FROM tab0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-6119
SELECT DISTINCT - col1 DIV col2 + col0 col1 FROM tab1 cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6119
SELECT DISTINCT - col1 / col2 + col0 col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + col2 * tab1.col2 AS col0 FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-6121
SELECT DISTINCT col1 + col1 DIV - col0 AS col0 FROM tab2 AS cor0
----
17
27
59

skipif mysql # not compatible
query I rowsort label-6121
SELECT DISTINCT col1 + col1 / - col0 AS col0 FROM tab2 AS cor0
----
17
27
59

query I rowsort
SELECT - 92 + - col2 + + col1 * - col2 AS col0 FROM tab2
----
-1652
-776
-956

query I rowsort
SELECT DISTINCT 17 + col1 FROM tab1
----
27
30
43

query I rowsort
SELECT col0 + + col0 + col0 FROM tab1
----
192
240
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + 34 + col1 * + col2 col2 FROM tab1
----
1506
2746
3968

query I rowsort
SELECT DISTINCT tab2.col2 + - col2 AS col1 FROM tab2
----
0

query I rowsort
SELECT DISTINCT - 81 * col2 + + col1 * + col0 FROM tab2
----
-1735
-1970
2496

query I rowsort
SELECT DISTINCT col1 + col2 * tab0.col1 * col2 AS col1 FROM tab0
----
194
611975
93740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 77 col2 FROM tab1 AS cor0
----
77
77
77

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) * col1 AS col0 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT ALL cor0.col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT + - 30 FROM tab0 cor0
----
-30

query I rowsort
SELECT - ( col2 ) + - col0 * + cor0.col0 - col2 FROM tab1 AS cor0
----
-117
-4210
-6592

query I rowsort
SELECT DISTINCT + col0 + col2 * - col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT - col1 + - col0 * col2 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT DISTINCT col2 + col0 * col1 * col0 AS col1 FROM tab1 AS cor0
----
288
41017
83296

query I rowsort
SELECT + 47 * - col2 + col2 AS col1 FROM tab1 AS cor0
----
-2484
-2622
-4416

query I rowsort
SELECT + + 54 + + col0 AS col1 FROM tab2 AS cor0
----
132
133
61

query I rowsort
SELECT ALL - col1 * col0 + col2 FROM tab1 cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT col0 * - col1 + + col2 + + col1 * cor0.col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + col0 + cor0.col2 * cor0.col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL - 7 + - col2 FROM tab2 AS cor0
----
-33
-34
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 + + col2 col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT 60 * - col0 - + col0 AS col2 FROM tab2 AS cor0
----
-427
-4758
-4819

onlyif mysql # use DIV operator for integer division
query I rowsort label-6145
SELECT DISTINCT + - cor0.col1 * - col2 + col1 DIV + col1 AS col0 FROM tab1 cor0
----
1249
1405
571

skipif mysql # not compatible
query I rowsort label-6145
SELECT DISTINCT + - cor0.col1 * - col2 + col1 / + col1 AS col0 FROM tab1 cor0
----
1249
1405
571

query I rowsort
SELECT 62 * cor0.col1 + - col2 FROM tab0 AS cor0
----
5299
5560
6013

query I rowsort
SELECT DISTINCT ( + col1 * col2 ) + - tab2.col1 * - col0 * - col2 FROM tab2
----
-118118
-5022
-50388

query I rowsort
SELECT DISTINCT + ( tab2.col2 ) + + col1 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT + ( + col1 * col0 ) + col2 - - col2 * - col1 FROM tab1
----
-112
-1272
127

query I rowsort
SELECT + ( - 60 ) + col0 FROM tab1
----
-57
20
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6151
SELECT tab0.col0 DIV col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6151
SELECT tab0.col0 / col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ( col2 ) * - cor0.col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 85 col1 FROM tab0, tab1 cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT - col0 * + 29 FROM tab1 AS cor0
----
-1856
-2320
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-6155
SELECT + col2 * + col1 + col2 + - col2 DIV ( - col1 + CAST( 79 AS SIGNED ) ) FROM tab0 AS cor0
----
2875
7550
98

skipif mysql # not compatible
query I rowsort label-6155
SELECT + col2 * + col1 + col2 + - col2 / ( - col1 + CAST ( 79 AS INTEGER ) ) FROM tab0 AS cor0
----
2875
7550
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6156
SELECT ALL + col0 DIV - col2 + + cor0.col1 - col1 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6156
SELECT ALL + col0 / - col2 + + cor0.col1 - col1 AS col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL col1 * - col2 * - tab2.col2 AS col2 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT - ( + col2 + + col1 ) AS col1 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT col2 + - col0 * - col0 FROM tab1
----
4153
63
6496

query I rowsort
SELECT 85 AS col2 FROM tab0
----
85
85
85

query I rowsort
SELECT DISTINCT + 23 + col0 AS col0 FROM tab2
----
101
102
30

query I rowsort
SELECT DISTINCT 88 FROM tab1, tab1 cor0
----
88

query I rowsort
SELECT DISTINCT + ( - tab0.col2 ) AS col2 FROM tab0, tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6164
SELECT ALL - 29 DIV + 89 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6164
SELECT ALL - 29 / + 89 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT 65 AS col1 FROM tab1
----
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 95 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT DISTINCT tab1.col0 + tab1.col1 FROM tab1
----
29
74
93

query I rowsort
SELECT + col1 * - col2 * col0 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT - col1 * - cor0.col0 - 3 FROM tab2 cor0
----
1340
214
4599

onlyif mysql # use DIV operator for integer division
query I rowsort label-6170
SELECT + col2 + 84 DIV cor0.col0 FROM tab1 AS cor0
----
58
82
97

skipif mysql # not compatible
query I rowsort label-6170
SELECT + col2 + 84 / cor0.col0 FROM tab1 AS cor0
----
58
82
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6171
SELECT - cor0.col0 DIV 7 FROM tab1 AS cor0
----
-11
-9
0

skipif mysql # not compatible
query I rowsort label-6171
SELECT - cor0.col0 / 7 FROM tab1 AS cor0
----
-11
-9
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6172
SELECT - cor0.col0 DIV 44 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to b2e225572af74ba853e10fb5414ea67f

skipif mysql # not compatible
query I rowsort label-6172
SELECT - cor0.col0 / 44 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to b2e225572af74ba853e10fb5414ea67f

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2, tab1 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to 3b4587ab6c08d2179c6df094d2f76ad7

query I rowsort
SELECT - col1 * col2 + col1 * col0 FROM tab2 AS cor0
----
-620
3068
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 - 46 * + ( cor0.col1 ) col1 FROM tab0 AS cor0
----
-3870
-4095
-4365

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 + + col0 col0 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT col0 + + ( - col1 ) AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - 71 + + tab1.col1 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 97d1cfd9c7ad17018991511efb7ee903

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 * col1 col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT 39 + - 7 FROM tab2, tab1 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

onlyif mysql # use DIV operator for integer division
query I rowsort label-6181
SELECT - tab1.col2 - col2 * + col2 DIV tab1.col2 FROM tab1
----
-108
-114
-192

skipif mysql # not compatible
query I rowsort label-6181
SELECT - tab1.col2 - col2 * + col2 / tab1.col2 FROM tab1
----
-108
-114
-192

onlyif mysql # use DIV operator for integer division
query I rowsort label-6182
SELECT ALL + col1 + ( col2 ) * col0 DIV + col1 FROM tab2 AS cor0
----
193
37
93

skipif mysql # not compatible
query I rowsort label-6182
SELECT ALL + col1 + ( col2 ) * col0 / + col1 FROM tab2 AS cor0
----
193
37
93

query I rowsort
SELECT - + 96 - + col1 * col0 AS col1 FROM tab2 AS cor0
----
-1439
-313
-4698

onlyif mysql # use DIV operator for integer division
query I rowsort label-6184
SELECT DISTINCT + col1 + cor0.col1 DIV col2 AS col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6184
SELECT DISTINCT + col1 + cor0.col1 / col2 AS col2 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6185
SELECT DISTINCT + 8 + + col0 * col2 + - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6185
SELECT DISTINCT + 8 + + col0 * col2 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + cor0.col0 + cor0.col0 * - col1 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL 2 * + col2 * col0 AS col0 FROM tab2 AS cor0
----
378
4056
6004

query I rowsort
SELECT - - 27 FROM tab2 AS cor0
----
27
27
27

query I rowsort
SELECT ALL ( + col0 ) * col0 FROM tab1 AS cor0
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + + col1 * + col0 + + col0 col1 FROM tab2 AS cor0
----
1439
255
4739

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6191
SELECT DISTINCT - CAST( col0 AS SIGNED ) - col1 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

skipif mysql # not compatible
query I rowsort label-6191
SELECT DISTINCT - CAST ( col0 AS INTEGER ) - col1 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-6192
SELECT col1 DIV - tab2.col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-6192
SELECT col1 / - tab2.col0 FROM tab2
----
-4
0
0

query I rowsort
SELECT ALL - - ( col0 ) * - col2 * ( + 41 ) FROM tab1 AS cor0
----
-149568
-314880
-6642

query I rowsort
SELECT - col2 * col0 - - col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT - cor0.col1 + 49 * + col0 FROM tab1 AS cor0
----
121
3126
3907

query I rowsort
SELECT ALL - col0 * ( + cor0.col1 ) + col2 AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT + - col0 * col1 * - col1 - + col0 * col0 FROM tab0 AS cor0
----
176928
328090
729088

query I rowsort
SELECT - 33 * col1 FROM tab1 AS cor0
----
-330
-429
-858

query I rowsort
SELECT DISTINCT 7 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
7

query I rowsort
SELECT 28 * - col2 + 43 AS col2 FROM tab2
----
-1021
-685
-713

query I rowsort
SELECT ( col1 ) * + 71 AS col2 FROM tab2 AS cor0
----
1207
2201
4189

onlyif mysql # use DIV operator for integer division
query I rowsort label-6202
SELECT DISTINCT - 92 DIV + col1 - - ( col1 + col2 * cor0.col2 ) FROM tab0 AS cor0
----
1174
6814
98

skipif mysql # not compatible
query I rowsort label-6202
SELECT DISTINCT - 92 / + col1 - - ( col1 + col2 * cor0.col2 ) FROM tab0 AS cor0
----
1174
6814
98

query I rowsort
SELECT ALL + - 0 + col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - col2 + + col2 * 12 * + 44 FROM tab1 cor0
----
28458
30039
50592

query I rowsort
SELECT + 24 + col1 * 31 + 71 AS col1 FROM tab1 cor0
----
405
498
901

query I rowsort
SELECT ALL + + cor0.col1 - 24 FROM tab0 AS cor0
----
62
67
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-6207
SELECT ALL + - col0 + + ( 42 ) * col0 DIV - cor0.col0 FROM tab2 AS cor0
----
-120
-121
-49

skipif mysql # not compatible
query I rowsort label-6207
SELECT ALL + - col0 + + ( 42 ) * col0 / - cor0.col0 FROM tab2 AS cor0
----
-120
-121
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 * - col0 col0 FROM tab0 cor0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6209
SELECT DISTINCT 45 + tab0.col0 / + CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6209
SELECT DISTINCT 45 + tab0.col0 / + CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL

query I rowsort
SELECT ( - col1 ) - 8 FROM tab0
----
-105
-94
-99

query I rowsort
SELECT DISTINCT col2 * col0 + 72 AS col0 FROM tab0
----
107
7370
864

query I rowsort
SELECT DISTINCT + cor0.col1 + col2 * ( - col0 ) FROM tab0 AS cor0
----
-706
-7207
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6213
SELECT ALL col2 DIV - col2 + - 2 FROM tab1 AS cor0
----
-3
-3
-3

skipif mysql # not compatible
query I rowsort label-6213
SELECT ALL col2 / - col2 + - 2 FROM tab1 AS cor0
----
-3
-3
-3

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 13 + - col2 col0 FROM tab2 AS cor0
----
-13
-14
-25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6216
SELECT DISTINCT - 84 * col2 + + CAST( NULL AS SIGNED ) + 24 * - cor0.col1 * CAST( + col0 AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6216
SELECT DISTINCT - 84 * col2 + + CAST ( NULL AS INTEGER ) + 24 * - cor0.col1 * CAST ( + col0 AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT cor0.col2 + cor0.col0 AS col1 FROM tab1 cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6218
SELECT ALL + - col1 * - col1 + - col2 DIV - cor0.col0 FROM tab0 AS cor0
----
7397
8281
9409

skipif mysql # not compatible
query I rowsort label-6218
SELECT ALL + - col1 * - col1 + - col2 / - cor0.col0 FROM tab0 AS cor0
----
7397
8281
9409

query I rowsort
SELECT DISTINCT tab0.col1 * col1 AS col2 FROM tab0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - 22 col1 FROM tab2 AS cor0
----
-572
-594
-836

query I rowsort
SELECT ALL + + col0 + + 15 AS col0 FROM tab2 AS cor0
----
22
93
94

query I rowsort
SELECT + col0 + col1 * 49 AS col2 FROM tab1
----
1277
554
717

query I rowsort
SELECT DISTINCT - col1 * + col2 * 97 + col1 FROM tab1
----
-121043
-136162
-55280

query I rowsort
SELECT DISTINCT col2 + + ( + col2 ) AS col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT + + 1 - col0 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT + 24 + - 10 FROM tab1 AS cor0
----
14
14
14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6227
SELECT + col2 * + ( - col1 ) / - CAST( NULL AS SIGNED ) - col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6227
SELECT + col2 * + ( - col1 ) / - CAST ( NULL AS INTEGER ) - col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 99 * col2 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-2600
-2700
-3800

query I rowsort
SELECT DISTINCT - col1 * col1 + - col0 FROM tab1 AS cor0
----
-164
-249
-679

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col1 ) + col2 - - 69 col1 FROM tab1 AS cor0
----
116
152
97

query I rowsort
SELECT DISTINCT ( col1 ) * col2 + - col2 FROM tab2 cor0
----
1508
608
810

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + - CAST ( 42 AS REAL ) - + col0 FROM tab2 AS cor0
----
-120
-121
-49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6233
SELECT - col1 * + 67 + col2 * CAST( col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-100
-338
377

skipif mysql # not compatible
query I rowsort label-6233
SELECT - col1 * + 67 + col2 * CAST ( col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-100
-338
377

query I rowsort
SELECT ALL + 79 + col1 AS col1 FROM tab0
----
165
170
176

onlyif mysql # use DIV operator for integer division
query I rowsort label-6235
SELECT + 83 + cor0.col1 - col2 DIV ( + 2 ) AS col1 FROM tab1 AS cor0
----
48
65
82

skipif mysql # not compatible
query I rowsort label-6235
SELECT + 83 + cor0.col1 - col2 / ( + 2 ) AS col1 FROM tab1 AS cor0
----
48
65
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( 76 ) * col2 col2 FROM tab0 AS cor0
----
2508
6232
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6237
SELECT DISTINCT + CAST( - col1 AS SIGNED ) * col2 * cor0.col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

skipif mysql # not compatible
query I rowsort label-6237
SELECT DISTINCT + CAST ( - col1 AS INTEGER ) * col2 * cor0.col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * 62 col1 FROM tab1 AS cor0
----
186
3968
4960

query I rowsort
SELECT 34 + ( - col1 ) - col1 FROM tab2 AS cor0
----
-28
-84
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6240
SELECT ALL - CAST( col2 AS SIGNED ) + - cor0.col0 * + cor0.col0 FROM tab1 AS cor0
----
-4153
-63
-6496

skipif mysql # not compatible
query I rowsort label-6240
SELECT ALL - CAST ( col2 AS INTEGER ) + - cor0.col0 * + cor0.col0 FROM tab1 AS cor0
----
-4153
-63
-6496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * 19 col1 FROM tab0 AS cor0
----
-1634
-1729
-1843

query I rowsort
SELECT 36 * col0 + col1 + - 67 AS col1 FROM tab1 AS cor0
----
2247
2826
67

query I rowsort
SELECT ALL - - ( col1 ) * col2 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 col0 FROM tab1 AS cor0
----
21
21
21

query I rowsort
SELECT + + col2 + col0 * cor0.col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT 93 * col1 AS col0 FROM tab0 AS cor0
----
7998
8463
9021

query I rowsort
SELECT ALL - ( + cor0.col1 ) + + 98 FROM tab2 AS cor0
----
39
67
81

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT DISTINCT 84 * col1 + + col0 AS col1 FROM tab1 AS cor0
----
1172
2187
904

query I rowsort
SELECT + cor0.col0 * - col1 + ( + col0 ) AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - + 5 - col1 AS col0 FROM tab2 AS cor0
----
-22
-36
-64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6252
SELECT DISTINCT + col0 + + col2 * + CAST( 41 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
1377
3451
76

skipif mysql # not compatible
query I rowsort label-6252
SELECT DISTINCT + col0 + + col2 * + CAST ( 41 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
1377
3451
76

query I rowsort
SELECT ( + col2 ) + - ( + col1 ) * col1 AS col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT - - cor0.col0 * col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) + + col1 + col2 col2 FROM tab1
----
124
134
205

query I rowsort
SELECT DISTINCT + 96 + col2 AS col1 FROM tab2
----
122
123
134

onlyif mysql # use DIV operator for integer division
query I rowsort label-6257
SELECT 22 + + col2 DIV col1 + tab0.col2 col0 FROM tab0
----
104
23
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6257
SELECT 22 + + col2 / col1 + tab0.col2 col0 FROM tab0
----
104
23
55

query I rowsort
SELECT - + col2 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT + - 57 AS col2 FROM tab1 cor0
----
-57
-57
-57

query I rowsort
SELECT 42 FROM tab1, tab2 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT DISTINCT cor0.col1 * 87 FROM tab2, tab1 AS cor0
----
1131
2262
870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 23 col2 FROM tab2
----
23
23
23

query I rowsort
SELECT col0 + + 16 * ( col1 ) FROM tab2
----
1022
351
503

query I rowsort
SELECT 36 + cor0.col2 FROM tab0 AS cor0
----
118
37
69

query I rowsort
SELECT + 19 * + col0 FROM tab2 cor0
----
133
1482
1501

query I rowsort
SELECT + 9 + 68 * + cor0.col2 FROM tab2 AS cor0
----
1777
1845
2593

onlyif mysql # use DIV operator for integer division
query I rowsort label-6267
SELECT + col2 DIV col2 + 90 FROM tab1
----
91
91
91

skipif mysql # not compatible
query I rowsort label-6267
SELECT + col2 / col2 + 90 FROM tab1
----
91
91
91

query I rowsort
SELECT DISTINCT 1 AS col1 FROM tab1, tab0 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + col2 + - col2 col1 FROM tab2
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6270
SELECT ALL ( - 10 ) DIV + tab1.col2 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6270
SELECT ALL ( - 10 ) / + tab1.col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT + 88 AS col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT DISTINCT col1 * col1 + col0 FROM tab1
----
164
249
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-6273
SELECT + col1 DIV 22 AS col0 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6273
SELECT + col1 / 22 AS col0 FROM tab2
----
0
1
2

query I rowsort
SELECT + - 2 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
84
89
95

query I rowsort
SELECT DISTINCT 27 + ( - col1 ) AS col2 FROM tab1 AS cor0
----
1
14
17

query I rowsort
SELECT DISTINCT 41 * ( col1 * + col2 ) FROM tab0
----
116358
305942
3977

query I rowsort
SELECT ALL 39 FROM tab2, tab0 cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

onlyif mysql # use DIV operator for integer division
query I rowsort label-6278
SELECT ALL + 8 + cor0.col2 + - col0 DIV + 99 FROM tab1 AS cor0
----
104
62
65

skipif mysql # not compatible
query I rowsort label-6278
SELECT ALL + 8 + cor0.col2 + - col0 / + 99 FROM tab1 AS cor0
----
104
62
65

query I rowsort
SELECT ALL - col0 + col0 + col1 * col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + 95 FROM tab0, tab1 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT + col0 + - 1 * - col1 - + col1 FROM tab2
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6282
SELECT DISTINCT + col2 * CAST( + col0 AS SIGNED ) * col1 AS col0 FROM tab0
----
3395
664118
68112

skipif mysql # not compatible
query I rowsort label-6282
SELECT DISTINCT + col2 * CAST ( + col0 AS INTEGER ) * col1 AS col0 FROM tab0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-6283
SELECT col1 + + col0 DIV col0 col0 FROM tab2 cor0
----
18
32
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6283
SELECT col1 + + col0 / col0 col0 FROM tab2 cor0
----
18
32
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-6284
SELECT - col0 DIV 56 - col0 AS col0 FROM tab1 AS cor0
----
-3
-65
-81

skipif mysql # not compatible
query I rowsort label-6284
SELECT - col0 / 56 - col0 AS col0 FROM tab1 AS cor0
----
-3
-65
-81

query I rowsort
SELECT + - col2 + - col2 * - 9 FROM tab2 AS cor0
----
208
216
304

onlyif mysql # use DIV operator for integer division
query I rowsort label-6286
SELECT col2 DIV - cor0.col2 + + col2 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-6286
SELECT col2 / - cor0.col2 + + col2 FROM tab1 AS cor0
----
53
56
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6287
SELECT tab0.col1 * CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6287
SELECT tab0.col1 * CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 7 FROM tab1, tab1 cor0, tab2 AS cor1
----
27 values hashing to 82db7c0390abae7ccf4512b1302a6466

query I rowsort
SELECT ALL + col2 * + col1 + col2 AS col2 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT + cor0.col2 + 99 * - col1 AS col0 FROM tab0 cor0
----
-8481
-8927
-9602

query I rowsort
SELECT ALL + - cor0.col1 + - col1 * + cor0.col0 FROM tab2 cor0
----
-1360
-248
-4661

query I rowsort
SELECT col2 * + col1 + + col1 FROM tab2
----
1593
663
868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 23 col0 FROM tab1
----
23
23
23

query I rowsort
SELECT ALL + col0 + + cor0.col2 * 2 AS col0 FROM tab2 AS cor0
----
130
155
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-6295
SELECT DISTINCT + col1 DIV + 27 + + 5 DIV col1 FROM tab2 cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6295
SELECT DISTINCT + col1 / + 27 + + 5 / col1 FROM tab2 cor0
----
0
1
2

query I rowsort
SELECT DISTINCT + col2 + ( col1 ) + - cor0.col2 AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT col2 + 35 AS col1 FROM tab1 AS cor0
----
131
89
92

query I rowsort
SELECT - + cor0.col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6299
SELECT ALL + col2 * + CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6299
SELECT ALL + col2 * + CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - ( ( cor0.col0 ) ) AS col0 FROM tab0, tab0 cor0, tab2 cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT - 22 FROM tab0, tab0 cor0
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

query I rowsort
SELECT col2 * + tab2.col0 + col2 AS col0 FROM tab2
----
2054
216
3040

query I rowsort
SELECT DISTINCT + - cor0.col1 + + col2 * cor0.col0 * col1 FROM tab0 AS cor0
----
3298
664027
68026

query I rowsort
SELECT ALL + col1 * + 8 FROM tab1
----
104
208
80

query I rowsort
SELECT + col0 * 13 + - 89 FROM tab0
----
1068
223
366

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 35 col0 FROM tab2, tab1 cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT 92 * col1 * - col1 FROM tab2
----
-26588
-320252
-88412

query I rowsort
SELECT ALL - col1 + col2 * 19 + - col0 FROM tab0 AS cor0
----
-113
1378
517

query I rowsort
SELECT 26 + col1 FROM tab2 AS cor0
----
43
57
85

query I rowsort
SELECT - - col0 + col1 + - col2 * col2 FROM tab2 AS cor0
----
-1348
-539
-691

query I rowsort
SELECT DISTINCT - col0 * - 70 + - tab0.col1 * col0 AS col2 FROM tab0
----
-1869
-384
-945

query I rowsort
SELECT DISTINCT + ( + tab1.col1 ) + col0 * + 60 FROM tab1
----
206
3850
4813

onlyif mysql # use DIV operator for integer division
query I rowsort label-6314
SELECT + ( + tab2.col2 ) * tab2.col2 + tab2.col2 + - 42 DIV + col1 AS col0 FROM tab2
----
1480
702
755

skipif mysql # not compatible
query I rowsort label-6314
SELECT + ( + tab2.col2 ) * tab2.col2 + tab2.col2 + - 42 / + col1 AS col0 FROM tab2
----
1480
702
755

query I rowsort
SELECT ALL - tab0.col2 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT 90 + 44 - col1 FROM tab0
----
37
43
48

query I rowsort
SELECT ALL col2 * + tab0.col2 + col0 FROM tab0
----
1113
36
6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-6318
SELECT + col0 DIV - tab1.col2 + - tab1.col2 * - ( col1 ) FROM tab1
----
1248
1404
569

skipif mysql # not compatible
query I rowsort label-6318
SELECT + col0 / - tab1.col2 + - tab1.col2 * - ( col1 ) FROM tab1
----
1248
1404
569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + cor0.col1 * + col0 col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT col0 * col0 + 8 * 52 + + col0 * - col0 AS col1 FROM tab1 AS cor0
----
416

query I rowsort
SELECT col2 * col0 + col1 * + col1 AS col2 FROM tab1 AS cor0
----
3748
7849
838

query I rowsort
SELECT DISTINCT + col2 * col0 + cor0.col2 * + col0 AS col1 FROM tab0 AS cor0
----
14596
1584
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-6323
SELECT DISTINCT - 78 DIV col0 + col2 DIV col2 FROM tab0 AS cor0
----
-1
-2
1

skipif mysql # not compatible
query I rowsort label-6323
SELECT DISTINCT - 78 / col0 + col2 / col2 FROM tab0 AS cor0
----
-1
-2
1

query I rowsort
SELECT + 62 + col1 AS col2 FROM tab2 AS cor0
----
121
79
93

query I rowsort
SELECT DISTINCT - + col0 + + col1 * col0 FROM tab1 cor0
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-6326
SELECT col2 DIV + col1 AS col1 FROM tab1 cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-6326
SELECT col2 / + col1 AS col1 FROM tab1 cor0
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6327
SELECT - 31 DIV - col0 AS col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6327
SELECT - 31 / - col0 AS col0 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6328
SELECT + + ( - col2 ) * + CAST( + 79 AS SIGNED ) + + col2 + ( col2 ) AS col1 FROM tab2 AS cor0
----
-2002
-2079
-2926

skipif mysql # not compatible
query I rowsort label-6328
SELECT + + ( - col2 ) * + CAST ( + 79 AS INTEGER ) + + col2 + ( col2 ) AS col1 FROM tab2 AS cor0
----
-2002
-2079
-2926

query I rowsort
SELECT DISTINCT + col1 + + tab0.col2 * col2 FROM tab0
----
1175
6815
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6330
SELECT + - CAST( - ( col2 ) AS SIGNED ) - - col1 * 70 FROM tab0 AS cor0
----
6053
6452
6791

skipif mysql # not compatible
query I rowsort label-6330
SELECT + - CAST ( - ( col2 ) AS INTEGER ) - - col1 * 70 FROM tab0 AS cor0
----
6053
6452
6791

query I rowsort
SELECT ( 25 ) + col1 * + col1 + - cor0.col0 * - col0 * - ( + 39 ) AS col0 FROM tab2 cor0
----
-233770
-243085
-925

query I rowsort
SELECT col0 * 41 + - col1 + - 22 AS col1 FROM tab1 cor0
----
2592
3245
75

query I rowsort
SELECT - col0 * ( - col0 + col2 ) FROM tab1
----
-1280
-153
448

query I rowsort
SELECT col2 * + 19 + + 34 + col0 FROM tab0
----
1681
685
88

query I rowsort
SELECT ALL - col1 + ( + col2 ) FROM tab0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col2 + 57 * col2 col2 FROM tab1
----
3132
3306
5568

query I rowsort
SELECT DISTINCT - col1 + + col1 * col0 * + col2 AS col0 FROM tab0
----
3298
664027
68026

query I rowsort
SELECT 50 + col0 FROM tab0
----
139
74
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6339
SELECT + CAST( + col2 AS SIGNED ) + col2 * 95 * + cor0.col2 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
103574
193
638953

skipif mysql # not compatible
query I rowsort label-6339
SELECT + CAST ( + col2 AS INTEGER ) + col2 * 95 * + cor0.col2 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
103574
193
638953

query I rowsort
SELECT ALL cor0.col1 + col2 * - col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT ALL - - 45 + + cor0.col2 + + col1 AS col1 FROM tab1 AS cor0
----
112
125
154

query I rowsort
SELECT ALL + - 78 + cor0.col0 * - col2 FROM tab1 AS cor0
----
-240
-3726
-7758

query I rowsort
SELECT + - col0 * col0 + + col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT ALL + col0 + - 64 * + col2 AS col1 FROM tab2 AS cor0
----
-1586
-1721
-2353

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) * col1 + 68 * cor0.col1 FROM tab0 cor0
----
-1548
-2093
-2813

query I rowsort
SELECT + + ( + cor0.col1 ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - ( 37 ) * col0 + col1 - - col1 FROM tab1 AS cor0
----
-2348
-2934
-59

query I rowsort
SELECT DISTINCT + + 41 * + col1 AS col2 FROM tab0 AS cor0
----
3526
3731
3977

query I rowsort
SELECT ALL + + 2 + - 48 AS col1 FROM tab0 AS cor0
----
-46
-46
-46

query I rowsort
SELECT ALL - 30 * - 61 + col2 * col1 FROM tab0 AS cor0
----
1927
4668
9292

query I rowsort
SELECT - col2 * 48 + col0 FROM tab0 AS cor0
----
-13
-1560
-3847

query I rowsort
SELECT - + 98 + + 89 AS col2 FROM tab1 AS cor0
----
-9
-9
-9

query I rowsort
SELECT DISTINCT + cor0.col0 + col1 * cor0.col1 + + col2 FROM tab0 AS cor0
----
7453
8452
9445

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - cor0.col2 ) + - col2 + 47 col1 FROM tab0 AS cor0
----
-117
-19
45

query I rowsort
SELECT ALL + 11 + - col1 AS col2 FROM tab2 AS cor0
----
-20
-48
-6

query I rowsort
SELECT 76 AS col1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7b2b08dd3f1adef028d3f40ef7c716da

query I rowsort
SELECT DISTINCT - - col2 - col2 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - - col0 * - col1 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT 20 AS col2 FROM tab2 cor0
----
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6360
SELECT + - col0 + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6360
SELECT + - col0 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + cor0.col1 col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL col0 * + 72 * + cor0.col2 FROM tab2 AS cor0
----
13608
146016
216144

onlyif mysql # use DIV operator for integer division
query I rowsort label-6363
SELECT + col2 - col2 DIV cor0.col2 col0 FROM tab1 AS cor0
----
53
56
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6363
SELECT + col2 - col2 / cor0.col2 col0 FROM tab1 AS cor0
----
53
56
95

query I rowsort
SELECT ALL - col0 * - 41 + 24 AS col2 FROM tab0 AS cor0
----
1008
1459
3673

query I rowsort
SELECT + col2 * - 13 AS col1 FROM tab0 AS cor0
----
-1066
-13
-429

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col1 * col1 col1 FROM tab1 AS cor0
----
-36
-673
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6367
SELECT - col0 * col1 + CAST( NULL AS SIGNED ) * - col2 * + col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6367
SELECT - col0 * col1 + CAST ( NULL AS INTEGER ) * - col2 * + col1 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + 74 - col0 FROM tab2
----
-4
-5
67

query I rowsort
SELECT DISTINCT col0 * + ( cor0.col1 ) FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL - col2 + + col2 + + col1 AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - - col1 * ( + 34 ) FROM tab0 AS cor0
----
2924
3094
3298

query I rowsort
SELECT DISTINCT + + cor0.col2 + - 4 * 0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL - + col1 * 71 + col0 FROM tab2 AS cor0
----
-1128
-2194
-4111

query I rowsort
SELECT DISTINCT + col1 * col0 + - col2 AS col1 FROM tab0 cor0
----
2031
3394
8017

query I rowsort
SELECT ALL cor0.col1 * - ( col0 ) FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6376
SELECT DISTINCT + cor0.col0 DIV col1 FROM tab1 AS cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-6376
SELECT DISTINCT + cor0.col0 / col1 FROM tab1 AS cor0
----
0
6

query I rowsort
SELECT - cor0.col1 + + 44 * 91 AS col2 FROM tab2 AS cor0
----
3945
3973
3987

query I rowsort
SELECT ALL + col1 + - 9 FROM tab2 AS cor0
----
22
50
8

query I rowsort
SELECT - col1 + 90 AS col0 FROM tab0 AS cor0
----
-1
-7
4

query I rowsort
SELECT + col1 * ( col0 * col1 ) AS col2 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT + 25 * + 46 + col0 FROM tab1 AS cor0
----
1153
1214
1230

query I rowsort
SELECT - - ( + col2 ) * - col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 45 * 53 col0 FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to ca7f6604f93a74354dab26809b724f7a

onlyif mysql # use DIV operator for integer division
query I rowsort label-6384
SELECT DISTINCT + cor0.col2 DIV - tab2.col1 FROM tab2, tab0 AS cor0
----
-1
-2
-4
0

skipif mysql # not compatible
query I rowsort label-6384
SELECT DISTINCT + cor0.col2 / - tab2.col1 FROM tab2, tab0 AS cor0
----
-1
-2
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6385
SELECT col0 + col1 + + ( + 22 ) DIV col2 AS col1 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-6385
SELECT col0 + col1 + + ( + 22 ) / col2 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - tab0.col1 * - cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to e5422173e1caaeeb02bbae09b3f4e2fd

query I rowsort
SELECT - - col0 * - col2 + - col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT - + 19 AS col0 FROM tab2 AS cor0
----
-19

query I rowsort
SELECT + ( - col1 + ( tab0.col1 ) ) FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 27 col0 FROM tab0 AS cor0
----
27
27
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-6391
SELECT - 11 DIV + col2 - ( cor0.col2 + col1 ) * col0 DIV col1 FROM tab0 AS cor0
----
-169
-33
-46

skipif mysql # not compatible
query I rowsort label-6391
SELECT - 11 / + col2 - ( cor0.col2 + col1 ) * col0 / col1 FROM tab0 AS cor0
----
-169
-33
-46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6392
SELECT DISTINCT col2 * - col1 - + CAST( + col2 AS SIGNED ) * - tab2.col2 AS col1 FROM tab2
----
-108
-858
798

skipif mysql # not compatible
query I rowsort label-6392
SELECT DISTINCT col2 * - col1 - + CAST ( + col2 AS INTEGER ) * - tab2.col2 AS col1 FROM tab2
----
-108
-858
798

onlyif mysql # use DIV operator for integer division
query I rowsort label-6393
SELECT ALL + col2 + + col1 DIV col0 - 69 FROM tab0
----
-33
-66
14

skipif mysql # not compatible
query I rowsort label-6393
SELECT ALL + col2 + + col1 / col0 - 69 FROM tab0
----
-33
-66
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-6394
SELECT ALL cor0.col0 DIV + col0 - 55 FROM tab0 AS cor0
----
-54
-54
-54

skipif mysql # not compatible
query I rowsort label-6394
SELECT ALL cor0.col0 / + col0 - 55 FROM tab0 AS cor0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT - 43 + col2 FROM tab2 AS cor0
----
-16
-17
-5

query I rowsort
SELECT + 90 FROM tab2, tab0 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0, tab1 cor1, tab0 cor2
----
972 values hashing to 9b91cf9fcc064ee1c13074a678b72ac7

query I rowsort
SELECT + col2 * - ( + ( col0 ) ) FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT cor0.col0 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT + + col1 * 21 AS col2 FROM tab2 AS cor0
----
1239
357
651

query I rowsort
SELECT + col2 * col1 * col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT + + 13 FROM tab2 cor0
----
13
13
13

query I rowsort
SELECT ( - col1 ) * + cor0.col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT cor0.col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT 82 FROM tab0, tab1 cor0
----
82

query I rowsort
SELECT ( - 37 ) AS col1 FROM tab2 AS cor0
----
-37
-37
-37

query I rowsort
SELECT DISTINCT + - col2 + col2 * col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT + + ( 2 ) FROM tab1 AS cor0
----
2
2
2

query I rowsort
SELECT ALL + col2 * - 70 FROM tab2 AS cor0
----
-1820
-1890
-2660

query I rowsort
SELECT + 45 * - col1 + col1 FROM tab1
----
-1144
-440
-572

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col1 col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 56 col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
56

query I rowsort
SELECT ALL - 54 * cor0.col1 + + cor0.col0 + + ( cor0.col2 ) * - col0 FROM tab1 AS cor0
----
-1563
-4124
-8302

query I rowsort
SELECT col1 * - ( col1 ) FROM tab1
----
-100
-169
-676

query I rowsort
SELECT - col0 * 89 + - col1 + + 77 AS col1 FROM tab0 AS cor0
----
-2145
-3135
-7935

query I rowsort
SELECT DISTINCT + 75 AS col1 FROM tab2, tab2 AS cor0
----
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6417
SELECT DISTINCT - + CAST( NULL AS DECIMAL ) * col1 * col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6417
SELECT DISTINCT - + CAST ( NULL AS REAL ) * col1 * col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT - cor0.col2 + + col2 + - col2 * 17 AS col0 FROM tab0 AS cor0
----
-1394
-17
-561

query I rowsort
SELECT ALL + + ( - cor0.col1 ) + cor0.col1 * 45 AS col2 FROM tab2 AS cor0
----
1364
2596
748

query I rowsort
SELECT - - 97 AS col0 FROM tab1 AS cor0
----
97
97
97

query I rowsort
SELECT DISTINCT - col2 + col0 * ( ( + col1 ) ) FROM tab2 AS cor0
----
1305
190
4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-6422
SELECT DISTINCT + 15 DIV col2 + + cor0.col0 FROM tab0 AS cor0
----
24
50
89

skipif mysql # not compatible
query I rowsort label-6422
SELECT DISTINCT + 15 / col2 + + cor0.col0 FROM tab0 AS cor0
----
24
50
89

query I rowsort
SELECT - + 17 AS col1 FROM tab2 AS cor0
----
-17
-17
-17

query I rowsort
SELECT ALL 35 + + col2 * - 10 - 37 FROM tab1 AS cor0
----
-542
-572
-962

query I rowsort
SELECT DISTINCT - + 96 * + col1 FROM tab1 AS cor0
----
-1248
-2496
-960

query I rowsort
SELECT DISTINCT + col0 * + col1 * 95 + - col1 FROM tab0 AS cor0
----
195994
322428
769314

query I rowsort
SELECT ALL - tab0.col1 * + col0 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT col1 * + col1 - - col0 * + 38 AS col1 FROM tab1
----
2532
3209
790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - col1 col1 FROM tab1
----
-109
-67
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6430
SELECT ALL col0 / + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6430
SELECT ALL col0 / + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col2 * + 7 + 39 + col0 * 8 * 3 FROM tab0 AS cor0
----
2749
846
886

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6432
SELECT col2 * + CAST( NULL AS SIGNED ) - 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-6432
SELECT col2 * + CAST ( NULL AS INTEGER ) - col1 col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * - 92 * - col1 AS col2 FROM tab0 AS cor0
----
189888
312340
745108

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6434
SELECT ALL - - col1 + - CAST( NULL AS SIGNED ) * cor0.col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6434
SELECT ALL - - col1 + - CAST ( NULL AS INTEGER ) * cor0.col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + + col1 + col1 AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + col0 + - 50 AS col0 FROM tab1 AS cor0
----
-47
14
30

query I rowsort
SELECT DISTINCT - col2 + - cor0.col1 * - col0 FROM tab0 cor0
----
2031
3394
8017

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1, tab1 AS cor0 WHERE NOT NULL > NULL
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6439
SELECT + ( - col0 + + CAST( - col2 AS SIGNED ) ) * col2 * - ( col2 + - col2 ) AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6439
SELECT + ( - col0 + + CAST ( - col2 AS INTEGER ) ) * col2 * - ( col2 + - col2 ) AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL ( + tab1.col0 ) AS col1 FROM tab1
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6441
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6441
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
NULL

query I rowsort
SELECT - col0 * + 37 + col0 * + col2 + col0 FROM tab1 cor0
----
1344
4800
54

query I rowsort
SELECT DISTINCT col1 - col2 * + col1 * + 13 AS col2 FROM tab0 AS cor0
----
-1164
-36808
-96915

query I rowsort
SELECT ALL + 48 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT - + cor0.col1 + col0 - ( - 8 ) FROM tab0 AS cor0
----
-54
-54
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-6446
SELECT DISTINCT col2 * col1 + + col0 DIV cor0.col0 - - col2 AS col1 FROM tab2 cor0
----
1561
685
865

skipif mysql # not compatible
query I rowsort label-6446
SELECT DISTINCT col2 * col1 + + col0 / cor0.col0 - - col2 AS col1 FROM tab2 cor0
----
1561
685
865

query I rowsort
SELECT DISTINCT + 17 AS col1 FROM tab0, tab2 cor0, tab0 AS cor1
----
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-6448
SELECT col1 + cor0.col2 DIV col0 FROM tab1 AS cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-6448
SELECT col1 + cor0.col2 / col0 FROM tab1 AS cor0
----
10
14
44

query I rowsort
SELECT + - col2 + + 73 * - col1 FROM tab1 cor0
----
-1045
-1952
-787

query I rowsort
SELECT DISTINCT ( col1 ) + ( tab1.col2 ) FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT + col0 + col1 * tab0.col1 AS col1 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT col1 * col1 * 51 FROM tab2
----
14739
177531
49011

query I rowsort
SELECT ALL tab0.col0 * + col1 + col2 * col0 AS col1 FROM tab0
----
15397
2856
3430

query I rowsort
SELECT - ( col0 ) * 16 + col2 FROM tab2
----
-1222
-1226
-85

query I rowsort
SELECT DISTINCT + 30 + col2 AS col0 FROM tab1
----
126
84
87

query I rowsort
SELECT - 87 AS col1 FROM tab2
----
-87
-87
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-6457
SELECT tab0.col2 DIV + col2 AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6457
SELECT tab0.col2 / + col2 AS col0 FROM tab0
----
1
1
1

query I rowsort
SELECT - 1 * + col0 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6459
SELECT DISTINCT col1 * - ( col2 * + col1 ) + CAST( NULL AS SIGNED ) col0 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6459
SELECT DISTINCT col1 * - ( col2 * + col1 ) + CAST ( NULL AS INTEGER ) col0 FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6460
SELECT DISTINCT - col1 DIV 75 + - tab1.col1 * + col1 FROM tab1
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort label-6460
SELECT DISTINCT - col1 / 75 + - tab1.col1 * + col1 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT ALL + ( col1 ) + + cor0.col2 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + ( + 77 ) * - col1 AS col0 FROM tab1 cor0
----
-1001
-2002
-770

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col0 col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - col1 * col1 + col2 * col0 AS col1 FROM tab1 AS cor0
----
-514
3548
7511

query I rowsort
SELECT + col2 + 80 AS col2 FROM tab2 AS cor0
----
106
107
118

onlyif mysql # use DIV operator for integer division
query I rowsort label-6466
SELECT col2 DIV col2 + col0 AS col1 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-6466
SELECT col2 / col2 + col0 AS col1 FROM tab1
----
4
65
81

query I rowsort
SELECT + col1 + - col1 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT col1 * + 25 AS col0 FROM tab2
----
1475
425
775

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 + + col0 col2 FROM tab1
----
121
176
57

query I rowsort
SELECT + col0 * - 96 FROM tab1
----
-288
-6144
-7680

query I rowsort
SELECT - col0 + col0 * + col2 AS col1 FROM tab1
----
159
3584
7600

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab1, tab2, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - 14 FROM tab0, tab2 cor0
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

onlyif mysql # use DIV operator for integer division
query I rowsort label-6474
SELECT ALL col0 DIV 18 FROM tab0
----
1
1
4

skipif mysql # not compatible
query I rowsort label-6474
SELECT ALL col0 / 18 FROM tab0
----
1
1
4

query I rowsort
SELECT + 24 AS col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

query I rowsort
SELECT ALL + col2 * - 83 FROM tab2 cor0
----
-2158
-2241
-3154

onlyif mysql # use DIV operator for integer division
query I rowsort label-6477
SELECT DISTINCT + col0 DIV 32 FROM tab1 cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-6477
SELECT DISTINCT + col0 / 32 FROM tab1 cor0
----
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col2 * - col0 col1 FROM tab1
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6479
SELECT - - CAST( col0 AS SIGNED ) + - col2 * - ( + 73 ) AS col0 FROM tab1 AS cor0
----
3945
4225
7088

skipif mysql # not compatible
query I rowsort label-6479
SELECT - - CAST ( col0 AS INTEGER ) + - col2 * - ( + 73 ) AS col0 FROM tab1 AS cor0
----
3945
4225
7088

query I rowsort
SELECT DISTINCT + col1 * 77 FROM tab2 AS cor0
----
1309
2387
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-6481
SELECT ALL col1 DIV + cor0.col0 col0 FROM tab2 AS cor0
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6481
SELECT ALL col1 / + cor0.col0 col0 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT ( - cor0.col0 ) * col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-6483
SELECT ALL + col0 DIV + 48 FROM tab1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6483
SELECT ALL + col0 / + 48 FROM tab1
----
0
1
1

query I rowsort
SELECT ALL 77 * col2 FROM tab1
----
4158
4389
7392

query I rowsort
SELECT ALL - ( - ( + col2 ) ) AS col0 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL ( col0 ) * col2 * + col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT ALL 56 * + cor0.col1 * col1 + + col0 + - col0 FROM tab0 AS cor0
----
414176
463736
526904

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 1 col0 FROM tab1
----
1

query I rowsort
SELECT - - cor0.col0 * + col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-6490
SELECT + 59 + col0 DIV col2 FROM tab1 AS cor0
----
59
59
60

skipif mysql # not compatible
query I rowsort label-6490
SELECT + 59 + col0 / col2 FROM tab1 AS cor0
----
59
59
60

query I rowsort
SELECT + - 55 AS col2 FROM tab0 cor0
----
-55
-55
-55

query I rowsort
SELECT + col1 + + cor0.col1 * col0 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT + col1 + + cor0.col1 * col2 * col1 AS col2 FROM tab1 AS cor0
----
16237
36530
5710

query I rowsort
SELECT + 1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT col1 - 79 AS col2 FROM tab0 AS cor0
----
12
18
7

query I rowsort
SELECT + + col2 + - 30 FROM tab0 AS cor0
----
-29
3
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * ( - col2 ) + cor0.col2 - col2 col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - col1 + + ( + col1 ) AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - cor0.col0 + - 49 * - 30 FROM tab0 AS cor0
----
1381
1435
1446

query I rowsort
SELECT + col1 * 40 * - cor0.col2 FROM tab2 AS cor0
----
-25840
-33480
-61360

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6501
SELECT ALL col1 - + CAST( col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6501
SELECT ALL col1 - + CAST ( col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6502
SELECT + + 22 * - 46 + - col2 DIV col2 AS col2 FROM tab0 AS cor0
----
-1013
-1013
-1013

skipif mysql # not compatible
query I rowsort label-6502
SELECT + + 22 * - 46 + - col2 / col2 AS col2 FROM tab0 AS cor0
----
-1013
-1013
-1013

query I rowsort
SELECT col1 * + 88 + col2 FROM tab1 AS cor0
----
1240
2342
937

onlyif mysql # use DIV operator for integer division
query I rowsort label-6504
SELECT - cor0.col1 * - col2 + - col1 DIV + col1 FROM tab0 AS cor0
----
2837
7461
96

skipif mysql # not compatible
query I rowsort label-6504
SELECT - cor0.col1 * - col2 + - col1 / + col1 FROM tab0 AS cor0
----
2837
7461
96

query I rowsort
SELECT + 27 AS col2 FROM tab0 cor0
----
27
27
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-6506
SELECT + col1 DIV - 40 + cor0.col2 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6506
SELECT + col1 / - 40 + cor0.col2 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( 69 AS REAL ) AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6508
SELECT DISTINCT CAST( - 57 AS SIGNED ) col0 FROM tab2, tab2 AS cor0
----
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6508
SELECT DISTINCT CAST ( - 57 AS INTEGER ) col0 FROM tab2, tab2 AS cor0
----
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col1 * 87 + + cor0.col1 col0 FROM tab2 cor0
----
-1462
-2666
-5074

query I rowsort
SELECT ALL col0 * col1 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL + + cor0.col1 * + 15 AS col1 FROM tab0 AS cor0
----
1290
1365
1455

query I rowsort
SELECT DISTINCT - col0 + 4 AS col1 FROM tab2 cor0
----
-3
-74
-75

query I rowsort
SELECT + cor0.col2 * + ( - cor0.col0 ) AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col0 * + 99 + - 15 AS col0 FROM tab0 AS cor0
----
2361
3450
8796

onlyif mysql # use DIV operator for integer division
query I rowsort label-6515
SELECT + + col2 DIV col0 AS col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-6515
SELECT + + col2 / col0 AS col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT + cor0.col0 + + col0 + col2 AS col0 FROM tab2 cor0
----
182
196
41

query I rowsort
SELECT ALL - tab1.col0 * cor0.col0 AS col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to fa8f09039d622159cb79f83c1d68bd00

query I rowsort
SELECT - - cor0.col2 * col1 + 10 * - col0 FROM tab2 AS cor0
----
-144
754
767

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 85 * - col2 col1 FROM tab2
----
-2210
-2295
-3230

query I rowsort
SELECT DISTINCT - + 93 AS col2 FROM tab0 cor0
----
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6521
SELECT 82 DIV - col0 FROM tab0 AS cor0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-6521
SELECT 82 / - col0 FROM tab0 AS cor0
----
-2
-3
0

query I rowsort
SELECT DISTINCT - - 38 * col2 FROM tab2 AS cor0
----
1026
1444
988

query I rowsort
SELECT ALL + 9 * - ( - col1 ) * - 47 AS col1 FROM tab1
----
-10998
-4230
-5499

onlyif mysql # use DIV operator for integer division
query I rowsort label-6524
SELECT col2 DIV ( + col0 ) FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6524
SELECT col2 / ( + col0 ) FROM tab0
----
0
0
1

query I rowsort
SELECT + - cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col1 * - col1 col2 FROM tab1
----
-110
-182
-702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 93 col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to ea79c61f7a02d25805171f5e85229fba

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6528
SELECT DISTINCT - col2 * - col0 / + CAST( NULL AS SIGNED ) + + col0 * - col0 AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-6528
SELECT DISTINCT - col2 * - col0 / + CAST ( NULL AS INTEGER ) + + col0 * - col0 AS col2 FROM tab2
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6529
SELECT ALL 48 DIV tab1.col0 AS col0 FROM tab1
----
0
0
16

skipif mysql # not compatible
query I rowsort label-6529
SELECT ALL 48 / tab1.col0 AS col0 FROM tab1
----
0
0
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col2 FROM tab0, tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT - cor0.col1 + + col1 * col1 FROM tab0 cor0
----
7310
8190
9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-6532
SELECT ALL + 93 + - col0 + col0 * - col1 DIV - col1 FROM tab0
----
93
93
93

skipif mysql # not compatible
query I rowsort label-6532
SELECT ALL + 93 + - col0 + col0 * - col1 / - col1 FROM tab0
----
93
93
93

query I rowsort
SELECT col1 * col0 * col1 FROM tab1
----
13520
2028
6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-6534
SELECT + + col2 * - col1 + + 13 DIV - col2 col0 FROM tab0 cor0
----
-110
-2838
-7462

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6534
SELECT + + col2 * - col1 + + 13 / - col2 col0 FROM tab0 cor0
----
-110
-2838
-7462

query I rowsort
SELECT ALL + col2 * - col2 - 91 AS col1 FROM tab0 AS cor0
----
-1180
-6815
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-6536
SELECT - col0 DIV col0 + + col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-6536
SELECT - col0 / col0 + + col0 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT DISTINCT col2 + col0 + - ( col1 ) * - col2 * 46 FROM tab1 cor0
----
26341
57584
64641

query I rowsort
SELECT + + cor0.col0 + + col2 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 17 col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 490d008f3fb5b70d3971cfc6d84503f4

query I rowsort
SELECT - col0 + col1 * + col2 FROM tab1 cor0
----
1168
1401
506

query I rowsort
SELECT DISTINCT - + cor0.col0 + cor0.col1 AS col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT + col1 + - 2 FROM tab1
----
11
24
8

query I rowsort
SELECT cor0.col2 + - 80 FROM tab0, tab1 AS cor0
----
9 values hashing to 71059d7707723f113f982256d6e3c3c7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6544
SELECT col0 * + 5 + - col2 DIV col2 FROM tab0 AS cor0
----
119
174
444

skipif mysql # not compatible
query I rowsort label-6544
SELECT col0 * + 5 + - col2 / col2 FROM tab0 AS cor0
----
119
174
444

query I rowsort
SELECT DISTINCT col2 * col0 + - col1 * + col0 FROM tab2 AS cor0
----
-2574
-28
1659

onlyif mysql # use DIV operator for integer division
query I rowsort label-6546
SELECT ALL + col2 * col2 * - cor0.col1 + col1 DIV col1 AS col2 FROM tab2 AS cor0
----
-22598
-24547
-39883

skipif mysql # not compatible
query I rowsort label-6546
SELECT ALL + col2 * col2 * - cor0.col1 + col1 / col1 AS col2 FROM tab2 AS cor0
----
-22598
-24547
-39883

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col1 ) * col1 col2 FROM tab2
----
289
3481
961

query I rowsort
SELECT 58 + 44 AS col1 FROM tab0
----
102
102
102

query I rowsort
SELECT ALL col1 * + 9 FROM tab0
----
774
819
873

query I rowsort
SELECT ( col2 ) + - col0 * - tab0.col1 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT ALL ( tab0.col0 * tab0.col1 ) FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL + 71 * col1 AS col1 FROM tab0 AS cor0
----
6106
6461
6887

onlyif mysql # use DIV operator for integer division
query I rowsort label-6553
SELECT ALL - ( cor0.col0 ) + col0 DIV ( + 31 ) AS col2 FROM tab2 cor0
----
-7
-76
-77

skipif mysql # not compatible
query I rowsort label-6553
SELECT ALL - ( cor0.col0 ) + col0 / ( + 31 ) AS col2 FROM tab2 cor0
----
-7
-76
-77

query I rowsort
SELECT ALL + + col1 + cor0.col2 * col2 AS col2 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT col0 * - 16 AS col0 FROM tab2 AS cor0
----
-112
-1248
-1264

query I rowsort
SELECT DISTINCT - 67 - 2 FROM tab1 AS cor0
----
-69

query I rowsort
SELECT + + ( + cor0.col2 ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + + col1 * col1 + - col0 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT - 56 + col1 AS col1 FROM tab0 cor0
----
30
35
41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6560
SELECT ALL + ( col1 ) + + CAST( NULL AS SIGNED ) + col1 / - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6560
SELECT ALL + ( col1 ) + + CAST ( NULL AS INTEGER ) + col1 / - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( col2 ) + - 6 FROM tab2 AS cor0
----
20
21
32

query I rowsort
SELECT ALL + - col2 * col1 AS col0 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT 42 * - col0 FROM tab0 AS cor0
----
-1008
-1470
-3738

query I rowsort
SELECT col0 * - col0 * col2 + - 8 FROM tab0 AS cor0
----
-1233
-19016
-649530

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col0 AS col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col1 * + col2 + col2 + - col0 FROM tab1 AS cor0
----
1264
1455
563

onlyif mysql # use DIV operator for integer division
query I rowsort label-6567
SELECT ALL - 5 DIV col1 + - col0 DIV - col2 AS col1 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6567
SELECT ALL - 5 / col1 + - col0 / - col2 AS col1 FROM tab0 AS cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col2 col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL - col1 * - col1 - col2 * - 56 FROM tab1 AS cor0
----
3292
3700
5545

onlyif mysql # use DIV operator for integer division
query I rowsort label-6570
SELECT - + cor0.col0 DIV - col1 + 22 FROM tab0 AS cor0
----
22
22
22

skipif mysql # not compatible
query I rowsort label-6570
SELECT - + cor0.col0 / - col1 + 22 FROM tab0 AS cor0
----
22
22
22

query I rowsort
SELECT DISTINCT tab1.col1 AS col2 FROM tab1, tab2, tab0 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-6572
SELECT ALL col1 - col2 DIV col1 AS col1 FROM tab2
----
15
31
59

skipif mysql # not compatible
query I rowsort label-6572
SELECT ALL col1 - col2 / col1 AS col1 FROM tab2
----
15
31
59

query I rowsort
SELECT DISTINCT + ( - col1 ) AS col0 FROM tab2
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col2 col0 FROM tab0 AS cor0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort
SELECT + - col0 * - col0 - + CAST ( - 87 + + col0 AS REAL ) FROM tab1 AS cor0
----
4119
6407
93

query I rowsort
SELECT DISTINCT col1 * col0 - + col2 FROM tab2
----
1305
190
4576

query I rowsort
SELECT - ( 64 * - tab2.col0 ) AS col1 FROM tab2
----
448
4992
5056

query I rowsort
SELECT ALL - 69 + 96 AS col2 FROM tab2 AS cor0
----
27
27
27

query I rowsort
SELECT ALL - col0 * col1 + + col0 AS col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT - tab1.col2 + + col0 AS col1 FROM tab1
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col0 ) + tab2.col2 * col2 col1 FROM tab2
----
1523
736
754

query I rowsort
SELECT ALL + ( col0 ) * col1 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + + 65 - col1 AS col2 FROM tab0 AS cor0
----
-21
-26
-32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6584
SELECT DISTINCT + + CAST( NULL AS DECIMAL ) * 5 + - col2 AS col2 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6584
SELECT DISTINCT + + CAST ( NULL AS REAL ) * 5 + - col2 AS col2 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT ( - col0 ) * + col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + + col1 * col1 * + col1 AS col2 FROM tab2 AS cor0
----
205379
29791
4913

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + cor0.col1 col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - + col2 * + col1 + 88 AS col0 FROM tab0 AS cor0
----
-2750
-7374
-9

query I rowsort
SELECT ALL - col1 + + col1 * - 99 FROM tab1 cor0
----
-1000
-1300
-2600

query I rowsort
SELECT + 50 * - col0 FROM tab0 AS cor0
----
-1200
-1750
-4450

onlyif mysql # use DIV operator for integer division
query I rowsort label-6591
SELECT ALL col0 - + col2 DIV 21 AS col1 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-6591
SELECT ALL col0 - + col2 / 21 AS col1 FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT ALL - col2 * + col1 + 15 AS col0 FROM tab1 AS cor0
----
-1233
-1389
-555

onlyif mysql # use DIV operator for integer division
query I rowsort label-6593
SELECT ALL + + col2 DIV col0 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-6593
SELECT ALL + + col2 / col0 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT ALL + cor1.col0 AS col0 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + col2 * col0 + 39 * - col2 AS col0 FROM tab1 AS cor0
----
-1944
1425
3936

query I rowsort
SELECT col2 + + cor0.col1 * - col2 * col0 AS col2 FROM tab2 AS cor0
----
-119626
-50996
-5832

query I rowsort
SELECT ALL col2 + ( + 19 ) * col1 FROM tab1 AS cor0
----
247
343
548

query I rowsort
SELECT cor0.col2 + - cor0.col2 * col1 AS col1 FROM tab0 cor0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - cor0.col0 * + 26 AS col0 FROM tab2 AS cor0
----
-182
-2028
-2054

query I rowsort
SELECT + col1 + 56 AS col1 FROM tab0 AS cor0
----
142
147
153

onlyif mysql # use DIV operator for integer division
query I rowsort label-6602
SELECT ALL - cor0.col1 DIV col0 AS col1 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-6602
SELECT ALL - cor0.col1 / col0 AS col1 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT ALL + col0 - - col2 * - col2 * - col2 FROM tab2 cor0
----
17654
19690
54951

query I rowsort
SELECT col1 * col2 + + ( + col1 ) AS col2 FROM tab0
----
194
2924
7553

query I rowsort
SELECT ALL col1 + col0 * 45 + col1 FROM tab1
----
187
2900
3626

onlyif mysql # use DIV operator for integer division
query I rowsort label-6606
SELECT + 95 + - col1 DIV - 29 + - col0 FROM tab1
----
15
31
92

skipif mysql # not compatible
query I rowsort label-6606
SELECT + 95 + - col1 / - 29 + - col0 FROM tab1
----
15
31
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-6607
SELECT + col2 + + col2 + col0 * col1 DIV + col1 AS col2 FROM tab2 AS cor0
----
130
155
61

skipif mysql # not compatible
query I rowsort label-6607
SELECT + col2 + + col2 + col0 * col1 / + col1 AS col2 FROM tab2 AS cor0
----
130
155
61

query I rowsort
SELECT ALL col2 + col0 * col1 AS col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT - col2 * 87 AS col1 FROM tab1 AS cor0
----
-4698
-4959
-8352

query I rowsort
SELECT cor0.col2 * 35 FROM tab1 AS cor0
----
1890
1995
3360

query I rowsort
SELECT + 30 + cor0.col0 * - col1 + - 7 AS col2 FROM tab2 AS cor0
----
-1320
-194
-4579

query I rowsort
SELECT col1 + + col0 * - col1 * + col0 FROM tab1 AS cor0
----
-208
-40950
-83187

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 AS col1 FROM tab2 AS cor0
----
52
54
76

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2, tab1 AS cor3
----
3645 values hashing to f3ede863c793df0de5c26c654290b3b7

query I rowsort
SELECT + ( col2 ) + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - 20 * + col0 AS col1 FROM tab1 AS cor0
----
-1280
-1600
-60

query I rowsort
SELECT - 57 + 23 * - col1 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
-230
-260
-601

query I rowsort
SELECT ALL tab1.col0 * + col1 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col2 ) col2 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6620
SELECT col1 * - 75 + col0 DIV ( ( + col0 ) ) AS col0 FROM tab1
----
-1949
-749
-974

skipif mysql # not compatible
query I rowsort label-6620
SELECT col1 * - 75 + col0 / ( ( + col0 ) ) AS col0 FROM tab1
----
-1949
-749
-974

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab1 cor1, tab2 AS cor2
----
3645 values hashing to cc4f069e61d0cc52f433f9e8c0058808

query I rowsort
SELECT - col0 + - 95 * col1 FROM tab2 AS cor0
----
-1694
-2952
-5683

query I rowsort
SELECT + 43 + + cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to e040dd19ef805c1a6d94fad959b43bc3

query I rowsort
SELECT ALL - 99 * - tab2.col2 + col2 * + col2 + col2 FROM tab2
----
3276
3429
5244

query I rowsort
SELECT DISTINCT - tab2.col0 + tab2.col2 FROM tab2
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-6626
SELECT DISTINCT + cor0.col1 DIV + col1 + col1 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-6626
SELECT DISTINCT + cor0.col1 / + col1 + col1 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT ALL - - cor0.col1 * - col0 - - col0 AS col2 FROM tab2 AS cor0
----
-1264
-210
-4524

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6628
SELECT - + 64 + - col0 * CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6628
SELECT - + 64 + - col0 * CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 65 * cor0.col2 FROM tab0 AS cor0
----
2145
5330
65

query I rowsort
SELECT ALL - col1 * - col1 - - cor0.col0 * 61 FROM tab0 AS cor0
----
11544
13710
8860

query I rowsort
SELECT DISTINCT tab0.col0 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
24
35
89

query I rowsort
SELECT ALL 38 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

query I rowsort
SELECT + ( - cor0.col1 ) AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT - cor0.col1 * cor0.col1 + - ( + col1 ) * + 83 * - cor0.col0 FROM tab2 AS cor0
----
111180
17050
378485

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) FROM tab2, tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - + col1 * + col2 + col1 FROM tab1 cor0
----
-1235
-1378
-560

query I rowsort
SELECT ALL col2 * col1 + - col0 FROM tab2
----
1456
567
830

query I rowsort
SELECT DISTINCT + col1 + - cor0.col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT - + col0 + col0 * - col0 * col2 FROM tab1 AS cor0
----
-233536
-489
-614480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * + col2 col1 FROM tab0 AS cor0
----
2838
7462
97

query III rowsort
SELECT * FROM tab2 cor0 WHERE NULL <= col1
----

query I rowsort
SELECT DISTINCT - col1 + col1 * cor0.col1 * col1 FROM tab2 AS cor0
----
205320
29760
4896

query I rowsort
SELECT ALL col1 * col2 * + col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT ALL + col2 * - col0 + col2 * col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col2 * col0 - + col0 * + col2 FROM tab1 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6646
SELECT ALL col2 DIV tab1.col0 AS col0 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-6646
SELECT ALL col2 / tab1.col0 AS col0 FROM tab1
----
0
1
18

query I rowsort
SELECT ALL + col1 * + tab1.col0 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - tab1.col2 col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT + cor0.col0 * col0 + + col2 * col2 AS col2 FROM tab1 AS cor0
----
15616
2925
7345

query I rowsort
SELECT DISTINCT tab2.col1 + - tab2.col0 - col0 FROM tab2
----
-141
-97
17

query I rowsort
SELECT ALL col2 - tab2.col1 * - col1 FROM tab2
----
327
3507
988

query I rowsort
SELECT ALL col2 * + col1 - - col1 * col2 AS col1 FROM tab0
----
14924
194
5676

query I rowsort
SELECT DISTINCT 54 * col2 FROM tab2 cor0
----
1404
1458
2052

query I rowsort
SELECT ALL + tab0.col1 + col2 * col2 FROM tab0
----
1175
6815
98

query I rowsort
SELECT DISTINCT col0 FROM tab0 WHERE col1 * col1 - col1 > NULL
----

query I rowsort
SELECT col1 * + col1 * col1 FROM tab0
----
636056
753571
912673

query I rowsort
SELECT DISTINCT col2 + - col2 * col1 + - col2 * col0 AS col2 FROM tab0
----
-131
-14678
-3597

query I rowsort
SELECT - 90 * - col2 + - col0 AS col1 FROM tab0 AS cor0
----
2946
55
7291

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - tab0.col0 * col1 + - col1 - + tab0.col2 col0 FROM tab0
----
177385
329217
736836

query I rowsort
SELECT DISTINCT col2 + - col1 * tab0.col1 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT col1 * col1 + col0 * tab2.col1 - - tab2.col1 AS col0 FROM tab2
----
1209
1649
8142

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + tab0.col0 col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT col2 * - tab0.col2 AS col1 FROM tab0
----
-1
-1089
-6724

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE col1 <> NULL
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6665
SELECT DISTINCT 10 * tab0.col1 + ( 66 + + col1 ) * - CAST( - col2 AS SIGNED ) AS col0 FROM tab0
----
1133
13784
5876

skipif mysql # not compatible
query I rowsort label-6665
SELECT DISTINCT 10 * tab0.col1 + ( 66 + + col1 ) * - CAST ( - col2 AS INTEGER ) AS col0 FROM tab0
----
1133
13784
5876

onlyif mysql # use DIV operator for integer division
query I rowsort label-6666
SELECT DISTINCT col2 DIV col0 + CAST( + 88 * - col2 AS SIGNED ) FROM tab0
----
-2903
-7216
-88

skipif mysql # not compatible
query I rowsort label-6666
SELECT DISTINCT col2 / col0 + CAST ( + 88 * - col2 AS INTEGER ) FROM tab0
----
-2903
-7216
-88

query I rowsort
SELECT ALL - tab0.col0 + col1 AS col2 FROM tab0
----
2
62
62

query I rowsort
SELECT ALL + 76 + + col1 AS col2 FROM tab0
----
162
167
173

query I rowsort
SELECT DISTINCT col1 * col1 + col2 * 35 FROM tab2
----
1619
1906
4391

onlyif mysql # use DIV operator for integer division
query I rowsort label-6670
SELECT + 19 DIV col2 AS col1 FROM tab0
----
0
0
19

skipif mysql # not compatible
query I rowsort label-6670
SELECT + 19 / col2 AS col1 FROM tab0
----
0
0
19

query I rowsort
SELECT col0 + + tab1.col1 + col0 FROM tab1
----
138
173
32

query I rowsort
SELECT DISTINCT 27 * col0 FROM tab1 AS cor0
----
1728
2160
81

query I rowsort
SELECT + cor0.col1 - col1 AS col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL col0 * col2 + tab2.col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT DISTINCT col0 + - tab0.col0 AS col0 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6676
SELECT ALL - tab0.col2 * col1 DIV + col1 + col0 * col0 AS col1 FROM tab0
----
1224
543
7839

skipif mysql # not compatible
query I rowsort label-6676
SELECT ALL - tab0.col2 * col1 / + col1 + col0 * col0 AS col1 FROM tab0
----
1224
543
7839

query I rowsort
SELECT - col2 + col2 * + col1 AS col2 FROM tab1
----
1152
1350
513

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE NOT NULL < NULL
----

query I rowsort
SELECT ALL + tab1.col1 + - col0 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT col0 + + col0 * + col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT col2 * - col1 + col0 + tab1.col2 AS col1 FROM tab1
----
-1072
-1347
-449

query I rowsort
SELECT ALL + col0 + + col2 * + col1 AS col2 FROM tab2
----
1612
725
844

query I rowsort
SELECT ALL col2 * tab1.col2 FROM tab1 WHERE + col2 / + col1 < NULL
----

query I rowsort
SELECT ALL tab0.col1 * + col1 + + col2 * col1 * - tab0.col1 FROM tab0
----
-236672
-670761
0

query I rowsort
SELECT ALL - col2 FROM tab2 WHERE ( NULL ) BETWEEN - col2 AND ( NULL )
----

query I rowsort
SELECT DISTINCT - col2 * col2 * col0 + tab0.col1 FROM tab0
----
-26050
-598345
62

query I rowsort
SELECT + tab2.col1 + - col2 * - col2 FROM tab2
----
1461
735
760

query I rowsort
SELECT DISTINCT col2 * + col0 + + col2 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-6689
SELECT DISTINCT - - col0 + ( col0 ) DIV col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-6689
SELECT DISTINCT - - col0 + ( col0 ) / col0 FROM tab2 AS cor0
----
79
8
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6690
SELECT DISTINCT - col2 DIV + 88 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-6690
SELECT DISTINCT - col2 / + 88 FROM tab1
----
-1
0

query I rowsort
SELECT + + col0 * col0 + cor0.col1 FROM tab2 cor0
----
6143
6258
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6692
SELECT col0 DIV 45 AS col2 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6692
SELECT col0 / 45 AS col2 FROM tab0
----
0
0
1

query I rowsort
SELECT 52 + col2 + col1 FROM tab2
----
107
110
137

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab1, tab0 AS cor0
----
82

query I rowsort
SELECT DISTINCT - 32 + + 47 FROM tab2
----
15

query I rowsort
SELECT DISTINCT col2 + 51 AS col0 FROM tab1
----
105
108
147

query I rowsort
SELECT ALL ( + 83 ) * cor0.col0 FROM tab2 AS cor0
----
581
6474
6557

query I rowsort
SELECT - - col1 * col1 - - col1 FROM tab1 AS cor0
----
110
182
702

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6699
SELECT DISTINCT CAST( NULL AS SIGNED ) - cor0.col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6699
SELECT DISTINCT CAST ( NULL AS INTEGER ) - cor0.col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT ALL + col1 * col0 + + col1 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT + col1 * + ( - col1 ) - - col2 * - col1 FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT cor1.col2 * 18 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 3bb05684ae7b4fce14275cf94440176b

query I rowsort
SELECT ALL + col0 * - col0 + col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT DISTINCT + + 74 * - col1 FROM tab2 AS cor0
----
-1258
-2294
-4366

onlyif mysql # use DIV operator for integer division
query I rowsort label-6706
SELECT ALL col1 * col1 DIV col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6706
SELECT ALL col1 * col1 / col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - col1 * - cor0.col1 + + col0 + + col1 FROM tab2 AS cor0
----
3618
385
999

query I rowsort
SELECT + 33 * + col0 AS col0 FROM tab0 AS cor0
----
1155
2937
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6709
SELECT DISTINCT - - col1 + - col2 * CAST( + col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-706
-7207
62

skipif mysql # not compatible
query I rowsort label-6709
SELECT DISTINCT - - col1 + - col2 * CAST ( + col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL - - 12 + - col1 - 78 FROM tab1 cor0
----
-76
-79
-92

query I rowsort
SELECT ALL - - cor0.col1 + col0 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + ( col1 ) + col0 * col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT DISTINCT - + 79 AS col0 FROM tab2, tab0, tab0 cor0
----
-79

query I rowsort
SELECT DISTINCT + 71 FROM tab0, tab1 AS cor0
----
71

query I rowsort
SELECT ( cor0.col2 ) + col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT 59 FROM tab0, tab1, tab2 AS cor0
----
59

query I rowsort
SELECT + 96 + col1 AS col0 FROM tab1 AS cor0
----
106
109
122

query I rowsort
SELECT col1 * + 29 + col0 * cor0.col1 FROM tab1 AS cor0
----
1417
832
930

query I rowsort
SELECT ALL col2 * ( - col2 ) AS col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL - + col1 + + 4 AS col0 FROM tab0 AS cor0
----
-82
-87
-93

query I rowsort
SELECT col0 * ( - 85 ) + col0 * + col1 AS col2 FROM tab1 AS cor0
----
-177
-4800
-5760

query I rowsort
SELECT col1 * 56 FROM tab1 cor0
----
1456
560
728

query I rowsort
SELECT DISTINCT col2 * col2 * ( tab2.col1 ) FROM tab2
----
22599
24548
39884

query I rowsort
SELECT 30 * + col1 FROM tab1
----
300
390
780

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 53 col1 FROM tab2 AS cor0
----
-53
-53
-53

query I rowsort
SELECT - ( - 91 ) * col1 FROM tab2 AS cor0
----
1547
2821
5369

query I rowsort
SELECT + - col1 * ( col0 * + col1 ) AS col2 FROM tab0 AS cor0
----
-177504
-329315
-737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-6728
SELECT - 17 DIV col0 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-6728
SELECT - 17 / col0 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT 33 * 49 FROM tab0 AS cor0
----
1617
1617
1617

query I rowsort
SELECT + 36 + 40 FROM tab0 AS cor0
----
76
76
76

query I rowsort
SELECT ALL - - 73 * - col1 FROM tab2 AS cor0
----
-1241
-2263
-4307

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6732
SELECT CAST( col0 AS SIGNED ) * + col2 col0 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6732
SELECT CAST ( col0 AS INTEGER ) * + col2 col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL col0 * - col0 * 70 + col1 - 6 AS col0 FROM tab1
----
-286716
-447993
-610

query I rowsort
SELECT + 60 + - 25 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT 94 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT ALL col2 - - col0 * + col2 AS col0 FROM tab2
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-6737
SELECT + col1 DIV 31 - - 81 DIV col1 col2 FROM tab0
----
2
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6737
SELECT + col1 / 31 - - 81 / col1 col2 FROM tab0
----
2
2
3

query I rowsort
SELECT + cor0.col2 - - 2 FROM tab0 AS cor0
----
3
35
84

query I rowsort
SELECT - - 37 + cor0.col2 AS col2 FROM tab1 AS cor0
----
133
91
94

query I rowsort
SELECT DISTINCT + + cor0.col2 + + ( col2 ) * cor0.col2 * col0 AS col2 FROM tab1 AS cor0
----
207993
737376
8802

query I rowsort
SELECT ( col2 ) + + col2 * 65 FROM tab2 AS cor0
----
1716
1782
2508

query I rowsort
SELECT ALL cor0.col2 * ( - col2 + 95 ) FROM tab1 cor0
----
-96
2166
2214

onlyif mysql # use DIV operator for integer division
query I rowsort label-6743
SELECT + + col0 DIV 30 + - col1 + + ( col0 ) AS col0 FROM tab2 AS cor0
----
-24
21
64

skipif mysql # not compatible
query I rowsort label-6743
SELECT + + col0 / 30 + - col1 + + ( col0 ) AS col0 FROM tab2 AS cor0
----
-24
21
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-6744
SELECT DISTINCT + + cor0.col2 DIV + col2 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-6744
SELECT DISTINCT + + cor0.col2 / + col2 FROM tab0 AS cor0
----
1

query I rowsort
SELECT ALL col0 + + cor0.col1 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + + 55 * + col1 AS col1 FROM tab0 AS cor0
----
4730
5005
5335

query I rowsort
SELECT ALL + col0 * + col0 + col1 FROM tab0 cor0
----
1322
662
8012

query I rowsort
SELECT - - 80 * col0 - - col2 FROM tab1 AS cor0
----
294
5177
6496

query I rowsort
SELECT col0 * 95 + - col1 FROM tab2 AS cor0
----
634
7351
7488

query I rowsort
SELECT DISTINCT + cor0.col2 * col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6751
SELECT + col0 + col2 DIV col1 + col1 * + col2 FROM tab0 AS cor0
----
132
2862
7551

skipif mysql # not compatible
query I rowsort label-6751
SELECT + col0 + col2 / col1 + col1 * + col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL 67 * - col1 FROM tab2 AS cor0
----
-1139
-2077
-3953

query I rowsort
SELECT - ( col2 ) + ( - col0 ) AS col1 FROM tab2 cor0
----
-104
-117
-34

query I rowsort
SELECT ALL + 55 * + col1 - ( col1 ) AS col0 FROM tab2 AS cor0
----
1674
3186
918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 65 + col1 col1 FROM tab0 AS cor0
----
21
26
32

query I rowsort
SELECT DISTINCT - + col1 - 27 AS col2 FROM tab1 AS cor0
----
-37
-40
-53

query I rowsort
SELECT ALL + 64 + 14 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT DISTINCT + + col1 - + col0 * col2 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-6759
SELECT ALL - col2 DIV + 41 AS col1 FROM tab0 cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-6759
SELECT ALL - col2 / + 41 AS col1 FROM tab0 cor0
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - 95 col1 FROM tab1 AS cor0
----
-69
-82
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 + col0 * - col1 col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL - - col0 - col2 * - col2 AS col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT + col0 * - 38 FROM tab0 AS cor0
----
-1330
-3382
-912

query I rowsort
SELECT ALL - col0 * - col0 + - col2 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT DISTINCT col2 + - cor0.col1 * + 40 * col1 FROM tab0 AS cor0
----
-295807
-331158
-376359

query I rowsort
SELECT ALL + col1 + col0 * col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + col0 * - 96 * - 51 FROM tab1 AS cor0
----
14688
313344
391680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6768
SELECT DISTINCT - cor0.col0 + - CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6768
SELECT DISTINCT - cor0.col0 + - CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - - col0 * + 57 + - col2 AS col2 FROM tab0 AS cor0
----
1335
1994
4991

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col0 ) - + 70 col2 FROM tab0
----
-105
-159
-94

query I rowsort
SELECT DISTINCT + - col0 * col1 - col1 AS col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL - + col1 * + col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - col1 + - col2 - - col2 AS col1 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6774
SELECT DISTINCT + col0 DIV col1 + col1 * + col0 AS col1 FROM tab1 cor0
----
1046
646
78

skipif mysql # not compatible
query I rowsort label-6774
SELECT DISTINCT + col0 / col1 + col1 * + col0 AS col1 FROM tab1 cor0
----
1046
646
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * 55 col1 FROM tab0 AS cor0
----
1815
4510
55

query I rowsort
SELECT DISTINCT tab0.col2 * 60 FROM tab0, tab0 AS cor0
----
1980
4920
60

query I rowsort
SELECT - col0 * + col1 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL - - 33 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

onlyif mysql # use DIV operator for integer division
query I rowsort label-6779
SELECT ALL 97 DIV - col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6779
SELECT ALL 97 / - col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 2 + + col0 FROM tab2 AS cor0
----
80
81
9

query I rowsort
SELECT DISTINCT - + col2 + col0 AS col1 FROM tab0 cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6782
SELECT col2 + col0 + 73 * - cor0.col0 DIV col0 FROM tab1 cor0
----
-16
103
48

skipif mysql # not compatible
query I rowsort label-6782
SELECT col2 + col0 + 73 * - cor0.col0 / col0 FROM tab1 cor0
----
-16
103
48

query I rowsort
SELECT ALL + 5 AS col1 FROM tab0 AS cor0
----
5
5
5

query I rowsort
SELECT ALL 67 + - col2 * + col0 FROM tab0
----
-7231
-725
32

query I rowsort
SELECT DISTINCT 23 FROM tab2, tab0 AS cor0
----
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-6786
SELECT + ( - col2 ) + - col2 + - col2 DIV + col2 FROM tab0
----
-165
-3
-67

skipif mysql # not compatible
query I rowsort label-6786
SELECT + ( - col2 ) + - col2 + - col2 / + col2 FROM tab0
----
-165
-3
-67

query I rowsort
SELECT ( col2 ) - col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT cor1.col2 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT ALL 11 * col0 FROM tab2
----
77
858
869

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * col0 + + ( col1 ) col1 FROM tab0
----
1322
662
8012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 56 col1 FROM tab2 cor0
----
56
56
56

query I rowsort
SELECT + 19 + + col1 * + col2 AS col2 FROM tab0 AS cor0
----
116
2857
7481

query I rowsort
SELECT + - 60 * col2 AS col0 FROM tab1 AS cor0
----
-3240
-3420
-5760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6794
SELECT DISTINCT + CAST( col2 AS SIGNED ) + - col1 AS col1 FROM tab2 AS cor0
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-6794
SELECT DISTINCT + CAST ( col2 AS INTEGER ) + - col1 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL - col1 + - col0 + + ( - col1 ) FROM tab1
----
-106
-55
-84

query I rowsort
SELECT DISTINCT - col1 + - 95 AS col0 FROM tab2
----
-112
-126
-154

query I rowsort
SELECT DISTINCT col1 + + ( col0 ) + - col0 FROM tab0
----
86
91
97

query I rowsort
SELECT - col1 * + col2 + 5 + col0 AS col2 FROM tab2
----
-1451
-562
-825

query I rowsort
SELECT ( col1 ) + col1 AS col2 FROM tab2
----
118
34
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6800
SELECT 17 + - 10 * + col0 + CAST( NULL AS SIGNED ) / 85 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6800
SELECT 17 + - 10 * + col0 + CAST ( NULL AS INTEGER ) / 85 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 45 * + col0 AS col1 FROM tab2 cor0
----
315
3510
3555

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6802
SELECT + CAST( NULL AS DECIMAL ) * col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6802
SELECT + CAST ( NULL AS REAL ) * col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 + + ( col1 ) * 88 AS col1 FROM tab2 AS cor0
----
1513
2759
5251

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6804
SELECT DISTINCT - + CAST( ( + col0 ) AS SIGNED ) FROM tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6804
SELECT DISTINCT - + CAST ( ( + col0 ) AS INTEGER ) FROM tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort
SELECT - - CAST ( col1 AS REAL ) * col1 AS col2 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT ALL + ( + 94 ) * col1 AS col1 FROM tab2
----
1598
2914
5546

query I rowsort
SELECT ALL - 40 * - 17 AS col0 FROM tab0 AS cor0
----
680
680
680

query I rowsort
SELECT - cor0.col1 * + tab0.col1 * 31 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 3644347b494014f6bebd349e1a7177c1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col2 + + col1 col2 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT DISTINCT + col2 * ( 17 ) * + col0 AS col2 FROM tab2 AS cor0
----
3213
34476
51034

query I rowsort
SELECT cor0.col2 - + col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6812
SELECT ALL + col0 + CAST( - col1 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-24
19
62

skipif mysql # not compatible
query I rowsort label-6812
SELECT ALL + col0 + CAST ( - col1 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + col1 * + ( col1 ) AS col1 FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 16 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT ALL + col0 * ( - col1 ) + col0 FROM tab1
----
-576
-75
-960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6816
SELECT ALL - cor0.col2 * CAST( NULL AS SIGNED ) * - 88 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6816
SELECT ALL - cor0.col2 * CAST ( NULL AS INTEGER ) * - 88 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6817
SELECT ALL + col0 DIV - 72 AS col1 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6817
SELECT ALL + col0 / - 72 AS col1 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT + + col1 + ( - col1 ) AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 * + 73 AS col2 FROM tab2 AS cor0
----
-511
-5694
-5767

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * 88 col0 FROM tab0
----
2112
3080
7832

query I rowsort
SELECT + col0 + 60 * 65 FROM tab0 AS cor0
----
3924
3935
3989

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6822
SELECT DISTINCT + col0 + + CAST( + col1 * - col1 AS SIGNED ) FROM tab1 AS cor0
----
-36
-673
-89

skipif mysql # not compatible
query I rowsort label-6822
SELECT DISTINCT + col0 + + CAST ( + col1 * - col1 AS INTEGER ) FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT + ( col1 ) + + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - 83 + 0 * - col0 FROM tab2 AS cor0
----
-83
-83
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6825
SELECT - col1 DIV 52 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6825
SELECT - col1 / 52 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col1 * col0 * col0 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT - 33 * - 49 FROM tab1 AS cor0
----
1617
1617
1617

query I rowsort
SELECT col2 - col2 * col1 * 79 AS col1 FROM tab2 AS cor0
----
-121160
-50996
-66096

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - 13 AS REAL ) AS col0 FROM tab2 AS cor0
----
13
13
13

query I rowsort
SELECT DISTINCT - + col2 * col0 + - col0 AS col0 FROM tab1 cor0
----
-165
-3712
-7760

query I rowsort
SELECT + 50 + cor0.col1 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to dd19543e9d137d37e5e39db0ea30e45e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6832
SELECT + CAST( + 39 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
39
39
39

skipif mysql # not compatible
query I rowsort label-6832
SELECT + CAST ( + 39 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
39
39
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6833
SELECT + + CAST( NULL AS SIGNED ) - + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6833
SELECT + + CAST ( NULL AS INTEGER ) - + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6834
SELECT col0 DIV ( col0 ) - col1 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-6834
SELECT col0 / ( col0 ) - col1 FROM tab1 AS cor0
----
-12
-25
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col2 ) * + col1 * 8 col0 FROM tab0 AS cor0
----
22704
59696
776

query I rowsort
SELECT ALL + 38 + - col0 * - col2 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
1263
19046
649560

query I rowsort
SELECT + + 6 * - col2 FROM tab2 AS cor0
----
-156
-162
-228

onlyif mysql # use DIV operator for integer division
query I rowsort label-6838
SELECT DISTINCT - col0 + 64 DIV + col1 FROM tab1
----
-1
-58
-76

skipif mysql # not compatible
query I rowsort label-6838
SELECT DISTINCT - col0 + 64 / + col1 FROM tab1
----
-1
-58
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-6839
SELECT ALL + 55 + col0 DIV col0 AS col0 FROM tab2
----
56
56
56

skipif mysql # not compatible
query I rowsort label-6839
SELECT ALL + 55 + col0 / col0 AS col0 FROM tab2
----
56
56
56

query I rowsort
SELECT DISTINCT - 69 * - col1 + col2 AS col1 FROM tab2
----
1211
2166
4097

query I rowsort
SELECT + + col1 + col2 * - ( + 73 ) * + col0 FROM tab2 AS cor0
----
-13766
-147985
-219129

onlyif mysql # use DIV operator for integer division
query I rowsort label-6842
SELECT col2 + cor0.col0 + - cor0.col0 * - col0 DIV col0 col0 FROM tab0 AS cor0
----
260
71
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6842
SELECT col2 + cor0.col0 + - cor0.col0 * - col0 / col0 col0 FROM tab0 AS cor0
----
260
71
81

query I rowsort
SELECT DISTINCT 17 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
17

query I rowsort
SELECT col1 * - ( col2 + col0 * 80 ) AS col2 FROM tab2 cor0
----
-108086
-18197
-369694

onlyif mysql # use DIV operator for integer division
query I rowsort label-6845
SELECT DISTINCT + col2 DIV - col1 + + col1 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6845
SELECT DISTINCT + col2 / - col1 + + col1 AS col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6846
SELECT - ( - col2 ) * - CAST( NULL AS SIGNED ) * + cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6846
SELECT - ( - col2 ) * - CAST ( NULL AS INTEGER ) * + cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6847
SELECT - 15 DIV - col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6847
SELECT - 15 / - col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 + col0 * col2 AS col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ( - col0 + col0 ) AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT tab2.col0 + - 55 FROM tab2
----
-48
23
24

query I rowsort
SELECT + 16 + col1 * + col2 AS col2 FROM tab0
----
113
2854
7478

query I rowsort
SELECT DISTINCT + col2 * + 55 FROM tab0
----
1815
4510
55

query I rowsort
SELECT + ( col1 * + col2 ) AS col2 FROM tab2
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6854
SELECT DISTINCT col1 DIV + 12 AS col0 FROM tab0
----
7
8

skipif mysql # not compatible
query I rowsort label-6854
SELECT DISTINCT col1 / + 12 AS col0 FROM tab0
----
7
8

query I rowsort
SELECT - 83 + - col0 + - col1 AS col1 FROM tab0
----
-193
-215
-263

query I rowsort
SELECT col2 + col1 - col0 AS col1 FROM tab1
----
29
3
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-6857
SELECT 38 DIV col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6857
SELECT 38 / col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * + col1 * ( - col0 ) + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-118860
-49560
-720900

onlyif mysql # use DIV operator for integer division
query I rowsort label-6859
SELECT DISTINCT - + col0 DIV - col0 AS col2 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-6859
SELECT DISTINCT - + col0 / - col0 AS col2 FROM tab2 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 + - col0 col2 FROM tab2 AS cor0
----
-41
-52
20

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 cor2
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT + + col1 * + ( ( col0 ) ) + 12 FROM tab2 AS cor0
----
1355
229
4614

onlyif mysql # use DIV operator for integer division
query I rowsort label-6863
SELECT col0 DIV - col2 AS col2 FROM tab0 cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-6863
SELECT col0 / - col2 AS col2 FROM tab0 cor0
----
-1
-35
0

query I rowsort
SELECT ( col1 ) + - col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT - col2 * col1 + + col2 AS col1 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT - - 36 * col2 + + col2 AS col1 FROM tab1 AS cor0
----
1998
2109
3552

query I rowsort
SELECT ALL + ( 76 ) + + col2 AS col0 FROM tab0 AS cor0
----
109
158
77

query I rowsort
SELECT DISTINCT + col2 * - 37 AS col0 FROM tab2 AS cor0
----
-1406
-962
-999

query I rowsort
SELECT DISTINCT - - cor0.col0 * 88 FROM tab0 AS cor0
----
2112
3080
7832

query I rowsort
SELECT DISTINCT - + ( - col2 ) + col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT 78 FROM tab2, tab1 cor0
----
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6872
SELECT ALL - CAST( ( + col2 ) AS SIGNED ) + - ( col2 ) DIV - col1 + col1 * + 14 col2 FROM tab0 AS cor0
----
1171
1192
1357

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6872
SELECT ALL - CAST ( ( + col2 ) AS INTEGER ) + - ( col2 ) / - col1 + col1 * + 14 col2 FROM tab0 AS cor0
----
1171
1192
1357

query I rowsort
SELECT DISTINCT + + 6 + 87 AS col1 FROM tab2 AS cor0
----
93

query I rowsort
SELECT ALL + + col2 * - cor0.col0 - col2 * col1 FROM tab0 AS cor0
----
-132
-14760
-3630

query I rowsort
SELECT ALL - + col1 + + 91 FROM tab1 AS cor0
----
65
78
81

query I rowsort
SELECT col2 * - 15 * + cor0.col2 AS col1 FROM tab0 AS cor0
----
-100860
-15
-16335

query I rowsort
SELECT - + ( + 56 ) FROM tab1 AS cor0
----
-56
-56
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col1 ) + + col1 col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 11 AS col0 FROM tab0 cor0
----
11
11
11

query I rowsort
SELECT DISTINCT - - col1 + col2 * col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT - + col1 * ( + col0 ) + 20 * 71 FROM tab1 AS cor0
----
1342
380
780

query I rowsort
SELECT - col0 * cor0.col2 * + cor0.col1 + cor0.col2 AS col1 FROM tab1 AS cor0
----
-36423
-4158
-99744

query I rowsort
SELECT ALL + 69 + + 15 * - col2 FROM tab1 AS cor0
----
-1371
-741
-786

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6884
SELECT DISTINCT col0 + cor0.col0 + ( - col1 ) * + col0 / + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6884
SELECT DISTINCT col0 + cor0.col0 + ( - col1 ) * + col0 / + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - 69 * - col2 AS col0 FROM tab0 AS cor0
----
2277
5658
69

query I rowsort
SELECT DISTINCT cor0.col2 * - col2 + 0 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + - cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT + - 6 FROM tab0 cor0
----
-6
-6
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 - + col2 col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT + col1 * + col0 + + col2 AS col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT - col2 * - col1 - - 30 * - col0 FROM tab1 AS cor0
----
-1152
-1350
1314

query I rowsort
SELECT DISTINCT 92 * - col0 FROM tab1 AS cor0
----
-276
-5888
-7360

query I rowsort
SELECT ALL - - col0 + col2 * + 60 * - col0 AS col2 FROM tab0 AS cor0
----
-2065
-437791
-47496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 + cor1.col0 col2 FROM tab2, tab2 cor0 CROSS JOIN tab1 AS cor1
----
27 values hashing to 2e22653dd511815ad294b192ab0e7fd2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + ( ( col2 ) ) col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - col0 * ( - col2 ) - col2 AS col2 FROM tab0 AS cor0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + 46 col2 FROM tab2
----
1426
2714
782

query I rowsort
SELECT - col0 - 45 FROM tab0
----
-134
-69
-80

query I rowsort
SELECT ALL - 90 + - 91 * col2 AS col0 FROM tab1 AS cor0
----
-5004
-5277
-8826

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6900
SELECT DISTINCT + CAST( + col0 AS SIGNED ) * - col2 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-6900
SELECT DISTINCT + CAST ( + col0 AS INTEGER ) * - col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col2 + + 28 AS col1 FROM tab2 cor0
----
54
55
66

query I rowsort
SELECT + ( col1 ) + + col1 * 86 AS col2 FROM tab1 AS cor0
----
1131
2262
870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 75 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT ALL - 66 AS col2 FROM tab0 AS cor0
----
-66
-66
-66

query I rowsort
SELECT cor0.col1 + tab1.col2 FROM tab1, tab0, tab0 cor0
----
27 values hashing to 193f02533a54aa725386e300dcc85182

query I rowsort
SELECT DISTINCT + col2 * - tab1.col1 + col1 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT + + cor0.col0 * cor0.col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - 72 col2 FROM tab2 AS cor0
----
-110
-98
-99

query I rowsort
SELECT DISTINCT col1 * 63 AS col1 FROM tab1 AS cor0
----
1638
630
819

query I rowsort
SELECT ALL - col1 * - 35 + + col1 AS col1 FROM tab1 AS cor0
----
360
468
936

query I rowsort
SELECT + cor0.col1 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT 44 * + col2 FROM tab1 AS cor0
----
2376
2508
4224

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT + ( + 66 ) AS col0 FROM tab2 AS cor0
----
66
66
66

skipif mysql # not compatible
query I rowsort
SELECT - - col1 + cor0.col2 + CAST ( col2 AS REAL ) AS col2 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT + col1 + + col2 * - 68 AS col1 FROM tab1 AS cor0
----
-3646
-3866
-6515

query I rowsort
SELECT ALL + col0 + col2 * + cor0.col2 AS col1 FROM tab0 cor0
----
1113
36
6813

query I rowsort
SELECT DISTINCT 46 * - cor1.col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
-1196
-1242
-1748

query I rowsort
SELECT + 71 + - col2 * col1 FROM tab1 AS cor0
----
-1177
-1333
-499

query I rowsort
SELECT ALL - col2 + - col1 AS col0 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT - + col2 * - col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query III rowsort
SELECT * FROM tab2 WHERE NOT col2 * col2 NOT BETWEEN ( + col0 + col2 / col1 + col2 ) AND - col1
----

query I rowsort
SELECT - col2 * col1 + col0 AS col1 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT + 85 * + col2 AS col0 FROM tab1 cor0
----
4590
4845
8160

query I rowsort
SELECT col1 * col2 FROM tab1 WHERE NOT NULL IN ( tab1.col0 * - col0 )
----

query I rowsort
SELECT DISTINCT + col0 * - col2 AS col0 FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6927
SELECT + col1 + col0 DIV tab1.col1 AS col1 FROM tab1
----
16
19
26

skipif mysql # not compatible
query I rowsort label-6927
SELECT + col1 + col0 / tab1.col1 AS col1 FROM tab1
----
16
19
26

query I rowsort
SELECT DISTINCT 3 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
-61
-77
0

query I rowsort
SELECT ALL - 88 + - cor0.col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 03c6e015a6d905e5775b5b4a5970875e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6930
SELECT DISTINCT + - col1 + - CAST( + col1 AS SIGNED ) * col0 AS col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

skipif mysql # not compatible
query I rowsort label-6930
SELECT DISTINCT + - col1 + - CAST ( + col1 AS INTEGER ) * col0 AS col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6931
SELECT DISTINCT - + col2 + - CAST( NULL AS SIGNED ) * col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6931
SELECT DISTINCT - + col2 + - CAST ( NULL AS INTEGER ) * col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + cor0.col0 FROM tab1, tab2 cor0, tab2 cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT - cor0.col0 + 19 FROM tab2, tab2 cor0
----
9 values hashing to 6712926d15f95cfd71715b6e28046604

onlyif mysql # use DIV operator for integer division
query I rowsort label-6934
SELECT tab0.col2 - ( + 45 ) DIV col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6934
SELECT tab0.col2 - ( + 45 ) / col1 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6935
SELECT + col0 DIV col0 - - 17 * + tab1.col0 * + col1 FROM tab1
----
10881
1327
17681

skipif mysql # not compatible
query I rowsort label-6935
SELECT + col0 / col0 - - 17 * + tab1.col0 * + col1 FROM tab1
----
10881
1327
17681

query I rowsort
SELECT - ( + 39 ) FROM tab0
----
-39
-39
-39

query I rowsort
SELECT - 83 + col2 AS col1 FROM tab2
----
-45
-56
-57

query I rowsort
SELECT DISTINCT 77 AS col2 FROM tab0, tab2 AS cor0
----
77

query I rowsort
SELECT - ( col2 ) - - col0 AS col2 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6940
SELECT ALL 21 DIV - col1 FROM tab2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6940
SELECT ALL 21 / - col1 FROM tab2
----
-1
0
0

query I rowsort
SELECT - - 96 AS col1 FROM tab1 AS cor0
----
96
96
96

query I rowsort
SELECT - - 79 * col0 * col1 FROM tab0 AS cor0
----
163056
268205
639821

onlyif mysql # use DIV operator for integer division
query I rowsort label-6943
SELECT - col1 + - col1 * ( - col1 ) DIV - col2 + + col0 FROM tab0 AS cor0
----
-102
-286
-9471

skipif mysql # not compatible
query I rowsort label-6943
SELECT - col1 + - col1 * ( - col1 ) / - col2 + + col0 FROM tab0 AS cor0
----
-102
-286
-9471

query I rowsort
SELECT - - col1 + + col2 + 77 AS col2 FROM tab0 AS cor0
----
175
196
250

query I rowsort
SELECT - 30 * col1 + col2 * - col0 + cor0.col2 * - 76 FROM tab2 cor0
----
-3171
-5774
-6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * col0 * + col2 col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + + col0 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 + col2 col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL col0 - - cor0.col1 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + cor0.col0 + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT tab1.col2 * tab1.col2 AS col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - cor0.col2 * + col0 * - cor0.col0 + cor0.col2 * - cor0.col2 * cor0.col2 FROM tab2 AS cor0
----
-18360
140608
182286

onlyif mysql # use DIV operator for integer division
query I rowsort label-6953
SELECT col2 DIV + col0 + cor0.col1 FROM tab1 cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-6953
SELECT col2 / + col0 + cor0.col1 FROM tab1 cor0
----
10
14
44

query I rowsort
SELECT DISTINCT - col0 + - col1 * col2 + col1 AS col2 FROM tab1 cor0
----
-1315
-1381
-624

query I rowsort
SELECT ALL col2 * cor0.col0 - + col2 * + col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col0 + + col2 * col2 + - col1 AS col2 FROM tab2 AS cor0
----
1506
695
705

onlyif mysql # use DIV operator for integer division
query I rowsort label-6957
SELECT ALL + cor0.col0 DIV + col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6957
SELECT ALL + cor0.col0 / + col0 FROM tab2 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6958
SELECT + tab2.col0 - - col1 DIV col1 FROM tab2
----
79
8
80

skipif mysql # not compatible
query I rowsort label-6958
SELECT + tab2.col0 - - col1 / col1 FROM tab2
----
79
8
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + cor0.col1 + col2 col1 FROM tab1 AS cor0
----
106
122
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-6960
SELECT DISTINCT col1 DIV col0 col1 FROM tab0 AS cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6960
SELECT DISTINCT col1 / col0 col1 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT ALL - col0 * cor0.col1 + col2 AS col1 FROM tab2 cor0
----
-1305
-190
-4576

query I rowsort
SELECT col2 - + col0 * - col1 FROM tab1
----
1136
132
697

query I rowsort
SELECT 87 * cor0.col0 + col0 FROM tab0 AS cor0
----
2112
3080
7832

query I rowsort
SELECT - + 89 * col0 + - col0 * + col2 FROM tab2 AS cor0
----
-10033
-812
-8970

query I rowsort
SELECT DISTINCT + 39 + col0 AS col2 FROM tab0 AS cor0
----
128
63
74

query I rowsort
SELECT ALL - 92 + col2 * col0 FROM tab2 AS cor0
----
1936
2910
97

query I rowsort
SELECT DISTINCT cor0.col2 - col2 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + 54 + col1 AS col2 FROM tab1 AS cor0
----
64
67
80

query I rowsort
SELECT ALL - cor0.col0 * - col1 AS col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + + col2 - - cor0.col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL col1 + + col1 * - col2 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - cor0.col0 * - col0 col2 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT + - 83 - - cor0.col2 * - col0 * col1 FROM tab1 AS cor0
----
-36563
-4295
-99923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6974
SELECT + CAST( NULL AS SIGNED ) * + col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6974
SELECT + CAST ( NULL AS INTEGER ) * + col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 39 - col1 FROM tab1 AS cor0
----
13
26
29

query I rowsort
SELECT 72 * col0 AS col2 FROM tab0
----
1728
2520
6408

query I rowsort
SELECT ALL ( tab1.col2 ) + col2 FROM tab1
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 17 * - col1 col0 FROM tab1 cor0
----
170
221
442

query I rowsort
SELECT ALL ( tab0.col0 ) * col0 + - col1 AS col1 FROM tab0
----
1128
490
7830

query I rowsort
SELECT ALL col1 + col2 * tab1.col0 + col0 FROM tab1
----
191
3722
7773

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL IN ( - col1 * + col1 * + col1 )
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL < ( NULL )
----

query I rowsort
SELECT ALL - col2 + col1 + - col0 FROM tab2
----
-100
-3
-45

query I rowsort
SELECT ALL - col0 * col2 + col2 - - col1 FROM tab1
----
-3581
-7571
-82

query III rowsort
SELECT * FROM tab0 WHERE NULL >= ( - col1 * - col1 )
----

query I rowsort
SELECT DISTINCT - col1 * - tab2.col1 FROM tab2
----
289
3481
961

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( NULL ) < ( NULL )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT - col2 + - col1 - + col0 NOT BETWEEN ( NULL ) AND col0
----

query I rowsort
SELECT ALL - col0 + col2 + tab1.col2 FROM tab1
----
105
112
50

query I rowsort
SELECT DISTINCT col2 * - col2 + - tab0.col2 + + col0 AS col0 FROM tab0
----
-1098
-6717
33

query I rowsort
SELECT col0 * + col0 - - col1 FROM tab2
----
6143
6258
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + tab2.col2 col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL - col0 * col1 * + col2 + + col0 * + col2 + - col2 * col0 AS col2 FROM tab1
----
-36480
-4212
-99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-6994
SELECT + col2 DIV + col2 AS col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6994
SELECT + col2 / + col2 AS col0 FROM tab1
----
1
1
1

query I rowsort
SELECT col2 * col1 - + col2 AS col0 FROM tab2
----
1508
608
810

query I rowsort
SELECT ALL - col2 * tab0.col1 * + col1 AS col1 FROM tab0
----
-244068
-679042
-9409

query I rowsort
SELECT DISTINCT - col1 + + col0 * col0 * - col2 AS col0 FROM tab0
----
-1322
-19094
-649613

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - - tab2.col1 col2 FROM tab2
----
55
58
85

query I rowsort
SELECT col0 * + col1 * col1 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT + col1 * col1 * col1 AS col1 FROM tab2
----
205379
29791
4913

query I rowsort
SELECT ALL - col0 * - col1 AS col1 FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7002
SELECT tab1.col2 * col2 + tab1.col1 DIV col2 AS col1 FROM tab1
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-7002
SELECT tab1.col2 * col2 + tab1.col1 / col2 AS col1 FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-7003
SELECT - col0 DIV - tab1.col2 + tab1.col1 AS col0 FROM tab1
----
11
13
26

skipif mysql # not compatible
query I rowsort label-7003
SELECT - col0 / - tab1.col2 + tab1.col1 AS col0 FROM tab1
----
11
13
26

query I rowsort
SELECT col0 * + col2 + + tab0.col2 * - col1 FROM tab0
----
-164
-2046
-62

query III rowsort
SELECT * FROM tab1 WHERE - col1 / col0 + + col0 NOT IN ( - col1 * - col1 * - col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query III rowsort
SELECT ALL * FROM tab0 WHERE ( NULL ) >= ( NULL )
----

query I rowsort
SELECT col1 - col1 * col1 AS col2 FROM tab2
----
-272
-3422
-930

onlyif mysql # use DIV operator for integer division
query I rowsort label-7008
SELECT ALL + col0 + col0 DIV col2 AS col1 FROM tab0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-7008
SELECT ALL + col0 + col0 / col2 AS col1 FROM tab0
----
24
70
90

query I rowsort
SELECT DISTINCT col1 + tab1.col2 * col0 AS col2 FROM tab1
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col1 col0 FROM tab1
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab0 WHERE col1 = col2
----

query I rowsort
SELECT ALL - col0 * + col0 FROM tab2 WHERE NOT NULL <> NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7013
SELECT ALL col0 + - tab1.col2 DIV col1 FROM tab1
----
1
59
73

skipif mysql # not compatible
query I rowsort label-7013
SELECT ALL col0 + - tab1.col2 / col1 FROM tab1
----
1
59
73

query I rowsort
SELECT - col2 * tab0.col2 + - col1 FROM tab0
----
-1175
-6815
-98

query I rowsort
SELECT ALL col0 * col2 + cor0.col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 + - col1 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT col1 FROM tab2 AS cor0 WHERE NOT NULL <> NULL OR col0 NOT IN ( - cor0.col2 )
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7018
SELECT ALL - + col1 * + col0 + - col1 DIV - col1 FROM tab2 cor0
----
-1342
-216
-4601

skipif mysql # not compatible
query I rowsort label-7018
SELECT ALL - + col1 * + col0 + - col1 / - col1 FROM tab2 cor0
----
-1342
-216
-4601

query I rowsort
SELECT DISTINCT - col1 * - col0 + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL - col0 + col0 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT DISTINCT + col1 * - col0 * col2 AS col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT cor0.col2 + col0 FROM tab2 AS cor0 WHERE + col0 + col1 IN ( col0 )
----

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT - col2 = + col2 + - col1 + col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT cor0.col1 + col1 AS col1 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - col2 + - col2 * col0 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT - cor0.col0 - + col2 * col2 AS col1 FROM tab1 cor0
----
-2919
-3313
-9296

query I rowsort
SELECT tab1.col2 * col2 * tab1.col1 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # use DIV operator for integer division
query I rowsort label-7029
SELECT ALL col2 DIV + cor0.col0 col0 FROM tab0 cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7029
SELECT ALL col2 / + cor0.col0 col0 FROM tab0 cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7030
SELECT - col2 DIV - col1 + col2 FROM tab2 AS cor0
----
26
27
40

skipif mysql # not compatible
query I rowsort label-7030
SELECT - col2 / - col1 + col2 FROM tab2 AS cor0
----
26
27
40

query I rowsort
SELECT ALL + col1 * + col2 * - col2 AS col0 FROM tab0 cor0
----
-611884
-93654
-97

query I rowsort
SELECT ALL - + col2 * - col2 + col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT + 78 * ( + col0 ) + col0 * 88 FROM tab1 AS cor0
----
10624
13280
498

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + ( - col0 ) ) col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - ( - col2 ) + - col2 AS col0 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT ALL col1 * ( col2 ) + 12 * + 34 * + col2 FROM tab1 cor0
----
23436
23826
40416

query I rowsort
SELECT ( + col2 ) * + col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 22 * - cor0.col0 col1 FROM tab1 AS cor0
----
-1408
-1760
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + col2 + ( + col0 ) * + col0 col1 FROM tab0 cor0
----
1261
633
8092

query I rowsort
SELECT - - ( cor0.col2 ) + - col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - col1 + + ( 71 ) * col0 * cor0.col0 FROM tab1 AS cor0
----
290806
454387
613

query I rowsort
SELECT ALL 44 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab0 AS cor1, tab2, tab2 cor2
----
3645 values hashing to bb6428239bf7f3ea361f6a10500a581d

query I rowsort
SELECT ALL - col0 * 50 FROM tab1
----
-150
-3200
-4000

query I rowsort
SELECT ALL col0 + cor0.col0 * - 98 FROM tab1 AS cor0
----
-291
-6208
-7760

query I rowsort
SELECT - ( - col1 ) * 38 FROM tab0
----
3268
3458
3686

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + - col1 col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT cor0.col0 * - col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + + col1 + + 0 * col1 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - + cor0.col2 + + 17 * + col2 AS col2 FROM tab2 AS cor0
----
416
432
608

query I rowsort
SELECT 67 * + 79 FROM tab1 AS cor0
----
5293
5293
5293

query I rowsort
SELECT + tab0.col1 + + 76 FROM tab0
----
162
167
173

query I rowsort
SELECT - col1 * 68 AS col2 FROM tab2 AS cor0
----
-1156
-2108
-4012

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7055
SELECT col1 * 45 + + col2 * + CAST( - col0 AS SIGNED ) * + col1 col0 FROM tab0 AS cor0
----
-64242
-660023
970

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7055
SELECT col1 * 45 + + col2 * + CAST ( - col0 AS INTEGER ) * + col1 col0 FROM tab0 AS cor0
----
-64242
-660023
970

query I rowsort
SELECT - col2 * col1 * + col2 AS col2 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT - ( - col0 ) * col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - 3 col1 FROM tab1
----
0
61
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7059
SELECT col2 * CAST( col2 * col2 AS SIGNED ) FROM tab2
----
17576
19683
54872

skipif mysql # not compatible
query I rowsort label-7059
SELECT col2 * CAST ( col2 * col2 AS INTEGER ) FROM tab2
----
17576
19683
54872

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
-7
-78
-79

query I rowsort
SELECT + cor0.col1 + - col1 + col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7062
SELECT col0 DIV 40 AS col2 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7062
SELECT col0 / 40 AS col2 FROM tab2
----
0
1
1

query I rowsort
SELECT ALL col1 * + ( col2 + + col0 ) AS col2 FROM tab1
----
1210
1482
2288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7064
SELECT + CAST( NULL AS SIGNED ) + - 92 + - col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7064
SELECT + CAST ( NULL AS INTEGER ) + - 92 + - col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor1.col2 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT 18 * col2 + col2 AS col0 FROM tab0 AS cor0
----
1558
19
627

query I rowsort
SELECT ALL 34 * - col2 FROM tab1 AS cor0
----
-1836
-1938
-3264

query I rowsort
SELECT DISTINCT + + 20 + col0 FROM tab1 AS cor0
----
100
23
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 19 * col2 col0 FROM tab1 cor0
----
1026
1083
1824

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7070
SELECT ALL CAST( 30 AS SIGNED ) AS col2 FROM tab0
----
30
30
30

skipif mysql # not compatible
query I rowsort label-7070
SELECT ALL CAST ( 30 AS INTEGER ) AS col2 FROM tab0
----
30
30
30

query I rowsort
SELECT DISTINCT col0 * + col2 + - col2 * ( col0 ) AS col2 FROM tab1
----
0

query I rowsort
SELECT ALL + 26 AS col0 FROM tab0
----
26
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 77 col1 FROM tab0
----
77
77
77

query I rowsort
SELECT - + col0 * + col0 + + 33 * col0 FROM tab1 AS cor0
----
-1984
-3760
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 12 + + col1 col2 FROM tab0
----
103
109
98

query I rowsort
SELECT cor0.col2 * 4 - + 23 * + col2 * + 40 FROM tab0 AS cor0
----
-30228
-75112
-916

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7077
SELECT - col1 - CAST( - col2 * - col1 + + col2 AS SIGNED ) col2 FROM tab2 cor0
----
-1619
-701
-895

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7077
SELECT - col1 - CAST ( - col2 * - col1 + + col2 AS INTEGER ) col2 FROM tab2 cor0
----
-1619
-701
-895

onlyif mysql # use DIV operator for integer division
query I rowsort label-7078
SELECT DISTINCT - col0 DIV + col2 AS col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-7078
SELECT DISTINCT - col0 / + col2 AS col2 FROM tab0
----
-1
-35
0

query IIIIIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 cor1, tab1, tab0 cor2, tab0
----
13122 values hashing to faf3606458d22d1bd6767d1089fdb605

onlyif mysql # use DIV operator for integer division
query I rowsort label-7080
SELECT col0 DIV 55 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7080
SELECT col0 / 55 FROM tab0
----
0
0
1

query I rowsort
SELECT + cor0.col0 * - col2 + + 63 AS col1 FROM tab0 AS cor0
----
-7235
-729
28

query I rowsort
SELECT col2 * + ( - col2 * + col2 ) FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT + + col0 - col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT col1 + 19 FROM tab2 cor0
----
36
50
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7085
SELECT + - col0 * + CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-7085
SELECT + - col0 * + CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-7086
SELECT DISTINCT ( col0 ) + - 93 + - tab0.col1 DIV - col2 col2 FROM tab0
----
-3
-67
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7086
SELECT DISTINCT ( col0 ) + - 93 + - tab0.col1 / - col2 col2 FROM tab0
----
-3
-67
39

query I rowsort
SELECT + 36 + tab1.col2 * col2 AS col2 FROM tab1
----
2952
3285
9252

query I rowsort
SELECT - 54 AS col0 FROM tab2 cor0
----
-54
-54
-54

query I rowsort
SELECT 20 + col2 FROM tab2
----
46
47
58

query I rowsort
SELECT ALL + col1 * - col0 + - ( col1 ) AS col0 FROM tab1
----
-104
-1053
-650

query I rowsort
SELECT + 87 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

query I rowsort
SELECT ALL - ( col2 ) * + col2 * 77 + col2 FROM tab1 AS cor0
----
-224478
-250116
-709536

query I rowsort
SELECT ALL + col2 + + 69 AS col1 FROM tab1 AS cor0
----
123
126
165

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + + col1 * - 42 col1 FROM tab2 AS cor0
----
-1271
-2419
-697

query I rowsort
SELECT + col2 * + 37 + col0 * - col0 FROM tab2 cor0
----
-4835
-5122
950

query I rowsort
SELECT ALL col1 * col0 + col1 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT + - col1 * 94 + - 24 * col2 * + col1 AS col0 FROM tab2 AS cor0
----
-17102
-23002
-42362

query I rowsort
SELECT ALL col2 * - col1 - - col2 AS col0 FROM tab2 cor0
----
-1508
-608
-810

onlyif mysql # use DIV operator for integer division
query I rowsort label-7099
SELECT - col2 + tab1.col2 DIV - col2 FROM tab1
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-7099
SELECT - col2 + tab1.col2 / - col2 FROM tab1
----
-55
-58
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7100
SELECT col0 DIV + ( + col1 + col0 * col2 ) AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7100
SELECT col0 / + ( + col1 + col0 * col2 ) AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7101
SELECT ALL - col1 DIV + col2 + col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-7101
SELECT ALL - col1 / + col2 + col2 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7102
SELECT col2 + + col0 DIV - col1 AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7102
SELECT col2 + + col0 / - col1 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + + cor0.col1 * - 24 + + col1 * col1 FROM tab2 AS cor0
----
-119
2065
217

query I rowsort
SELECT + col1 * ( - col2 ) + + 30 FROM tab1 cor0
----
-1218
-1374
-540

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7105
SELECT - + CAST( col2 AS SIGNED ) + - col0 FROM tab0 AS cor0
----
-171
-36
-57

skipif mysql # not compatible
query I rowsort label-7105
SELECT - + CAST ( col2 AS INTEGER ) + - col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT + - 41 FROM tab1 AS cor0
----
-41

query I rowsort
SELECT ALL cor0.col2 + + col2 + col2 FROM tab1 AS cor0
----
162
171
288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7108
SELECT DISTINCT + col0 * col0 - col2 * + CAST( - col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
1322
15383
3414

skipif mysql # not compatible
query I rowsort label-7108
SELECT DISTINCT + col0 * col0 - col2 * + CAST ( - col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
1322
15383
3414

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col1 * + col2 + col0 col0 FROM tab0 cor0
----
133
2895
7633

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT DISTINCT + + cor0.col2 * - col1 + col1 AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT + - 22 + - col0 * + 56 FROM tab1 cor0
----
-190
-3606
-4502

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab0 cor1
----
972 values hashing to 67c5300bc5cba0be4f54a444dc6f05b9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 83 + 39 * col2 col0 FROM tab2
----
1097
1136
1565

query I rowsort
SELECT 2 + col0 + tab0.col2 FROM tab0
----
173
38
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7116
SELECT DISTINCT + CAST( NULL AS DECIMAL ) - + tab0.col0 * col1 AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7116
SELECT DISTINCT + CAST ( NULL AS REAL ) - + tab0.col0 * col1 AS col1 FROM tab0
----
NULL

query I rowsort
SELECT ALL - col0 * cor0.col0 + col1 * col1 * col0 + cor0.col2 AS col2 FROM tab1 AS cor0
----
2073
2361
7216

query I rowsort
SELECT col1 * col0 * 67 + col0 * + col0 AS col1 FROM tab0 AS cor0
----
138864
228690
550554

query I rowsort
SELECT col2 * + col1 + ( + col1 ) AS col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT - col2 * + cor0.col1 AS col0 FROM tab0 cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 52 * col1 col1 FROM tab0 cor0
----
4472
4732
5044

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col1 * - 30 col1 FROM tab1 AS cor0
----
-243
-294
-726

query I rowsort
SELECT - ( + col2 ) + - cor0.col2 * - col2 * col0 - col2 AS col2 FROM tab0 AS cor0
----
26070
33
598272

query I rowsort
SELECT DISTINCT + 47 * + cor0.col1 + col2 AS col1 FROM tab0 cor0
----
4075
4359
4560

query I rowsort
SELECT + 8 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-136
-248
-472

onlyif mysql # use DIV operator for integer division
query I rowsort label-7126
SELECT + 48 + col2 DIV col2 AS col1 FROM tab1 cor0
----
49
49
49

skipif mysql # not compatible
query I rowsort label-7126
SELECT + 48 + col2 / col2 AS col1 FROM tab1 cor0
----
49
49
49

query I rowsort
SELECT ALL col0 * tab2.col2 * col2 FROM tab2
----
114076
5103
52728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 15 col0 FROM tab0
----
15
15
15

query I rowsort
SELECT DISTINCT col0 * + 38 * tab1.col2 FROM tab1
----
138624
291840
6156

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7130
SELECT DISTINCT - + CAST( NULL AS SIGNED ) + - 3 col2 FROM tab0, tab1, tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7130
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) + - 3 col2 FROM tab0, tab1, tab0 AS cor0
----
NULL

query I rowsort
SELECT + 37 - + 13 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + cor0.col0 col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL ( cor0.col1 ) * 60 AS col0 FROM tab0 AS cor0
----
5160
5460
5820

onlyif mysql # use DIV operator for integer division
query I rowsort label-7134
SELECT + - 41 DIV + cor0.col2 + - cor0.col1 - + col1 AS col0 FROM tab0 AS cor0
----
-173
-182
-235

skipif mysql # not compatible
query I rowsort label-7134
SELECT + - 41 / + cor0.col2 + - cor0.col1 - + col1 AS col0 FROM tab0 AS cor0
----
-173
-182
-235

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7135
SELECT ALL - col0 * - col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7135
SELECT ALL - col0 * - col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 93 * col2 + col2 AS col0 FROM tab1
----
-4968
-5244
-8832

query I rowsort
SELECT ALL + col0 * cor0.col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - 49 * + cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 19d0ffadeb5c9f3c41ca04b2c7755b43

query I rowsort
SELECT DISTINCT cor1.col0 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
7
78
79

query I rowsort
SELECT + col1 + 34 FROM tab2
----
51
65
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT DISTINCT + 90 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-7740
-8190
-8730

query I rowsort
SELECT ALL cor0.col1 * 42 FROM tab0 AS cor0
----
3612
3822
4074

query I rowsort
SELECT + - 41 * - col2 FROM tab2 AS cor0
----
1066
1107
1558

query I rowsort
SELECT - 27 AS col0 FROM tab2
----
-27
-27
-27

query I rowsort
SELECT + + ( col1 ) * col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT cor0.col1 + + col2 + - col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - col1 + col0 + 81 FROM tab1
----
135
148
58

query I rowsort
SELECT - - col1 + 60 + 14 AS col0 FROM tab1 AS cor0
----
100
84
87

query I rowsort
SELECT - - col0 * ( - 65 ) + - col1 AS col2 FROM tab0 AS cor0
----
-1646
-2372
-5876

query I rowsort
SELECT ALL 65 * + col1 AS col1 FROM tab0
----
5590
5915
6305

onlyif mysql # use DIV operator for integer division
query I rowsort label-7152
SELECT + tab0.col0 DIV + tab0.col0 + col2 AS col2 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-7152
SELECT + tab0.col0 / + tab0.col0 + col2 AS col2 FROM tab0
----
2
34
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7153
SELECT col1 + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7153
SELECT col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7154
SELECT - cor0.col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7154
SELECT - cor0.col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col1 col1 FROM tab2
----
118
34
62

query I rowsort
SELECT + col0 * col0 + col0 * + col1 FROM tab0 cor0
----
16020
2640
4620

onlyif mysql # use DIV operator for integer division
query I rowsort label-7157
SELECT ALL + col2 DIV ( col0 * - col2 ) FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7157
SELECT ALL + col2 / ( col0 * - col2 ) FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7158
SELECT + 68 DIV + col2 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7158
SELECT + 68 / + col2 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT + col0 + col2 + + 94 FROM tab0 AS cor0
----
130
151
265

onlyif mysql # use DIV operator for integer division
query I rowsort label-7160
SELECT - + col1 * cor0.col1 DIV - col1 + - col2 * + col1 + CAST( col2 AS SIGNED ) AS col0 FROM tab1 cor0
----
-1139
-1324
-503

skipif mysql # not compatible
query I rowsort label-7160
SELECT - + col1 * cor0.col1 / - col1 + - col2 * + col1 + CAST ( col2 AS INTEGER ) AS col0 FROM tab1 cor0
----
-1139
-1324
-503

onlyif mysql # use DIV operator for integer division
query I rowsort label-7161
SELECT + col0 DIV - col0 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7161
SELECT + col0 / - col0 FROM tab0 cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col1 ) col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT - 14 + col1 AS col1 FROM tab1 cor0
----
-1
-4
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-7164
SELECT + 24 DIV + col1 AS col0 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7164
SELECT + 24 / + col1 AS col0 FROM tab2
----
0
0
1

query I rowsort
SELECT DISTINCT 87 + + 97 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
184

onlyif mysql # use DIV operator for integer division
query I rowsort label-7166
SELECT 3 DIV + col1 + CAST( 8 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
8
8
8

skipif mysql # not compatible
query I rowsort label-7166
SELECT 3 / + col1 + CAST ( 8 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
8
8
8

query I rowsort
SELECT + col1 * + col1 + ( - ( cor0.col0 ) + + col2 ) FROM tab2 AS cor0
----
248
3429
981

query I rowsort
SELECT 9 AS col0 FROM tab2 AS cor0
----
9
9
9

query I rowsort
SELECT - - 15 * col2 * col1 - col1 AS col1 FROM tab2 cor0
----
12524
22951
9673

onlyif mysql # use DIV operator for integer division
query I rowsort label-7170
SELECT - col1 * + col0 + col1 DIV + cor0.col2 AS col1 FROM tab0 AS cor0
----
-2062
-3298
-8098

skipif mysql # not compatible
query I rowsort label-7170
SELECT - col1 * + col0 + col1 / + cor0.col2 AS col1 FROM tab0 AS cor0
----
-2062
-3298
-8098

query I rowsort
SELECT ALL - col2 * - 17 AS col1 FROM tab0 cor0
----
1394
17
561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - cor0.col0 ) * 89 col2 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to bcbd6f3dda60914021bf504d8f4e1da1

query I rowsort
SELECT ALL + + 88 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT - col2 * + ( + ( col1 ) ) + ( - col1 ) + col0 AS col2 FROM tab2 AS cor0
----
-1515
-584
-861

query I rowsort
SELECT DISTINCT col1 + - ( col1 ) * - col0 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT 52 * - cor0.col1 FROM tab2 AS cor0
----
-1612
-3068
-884

query I rowsort
SELECT + + col0 + col1 AS col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT + col1 + + col2 * - col1 FROM tab0
----
-2752
-7371
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7179
SELECT ALL 98 DIV + col0 FROM tab0 AS cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-7179
SELECT ALL 98 / + col0 FROM tab0 AS cor0
----
1
2
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7180
SELECT ALL - col0 + col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7180
SELECT ALL - col0 + col2 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 98 AS col1 FROM tab0
----
98

query I rowsort
SELECT 63 * col0 AS col1 FROM tab0 cor0
----
1512
2205
5607

query I rowsort
SELECT DISTINCT - ( col0 ) - + ( col0 ) FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT + col1 * + 82 * col0 + - ( col0 ) * col1 FROM tab1 AS cor0
----
51840
6318
84240

skipif mysql # not compatible
query I rowsort
SELECT tab1.col1 + + CAST ( col0 AS REAL ) * col0 - - 35 * + col1 FROM tab1
----
4456
6868
945

query I rowsort
SELECT + col2 * - tab0.col1 + col0 FROM tab0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-7187
SELECT col2 DIV ( + col0 ) FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-7187
SELECT col2 / ( + col0 ) FROM tab1
----
0
1
18

query I rowsort
SELECT DISTINCT - col0 - 18 * - 54 FROM tab0
----
883
937
948

onlyif mysql # use DIV operator for integer division
query I rowsort label-7189
SELECT col1 DIV - ( col0 ) AS col2 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-7189
SELECT col1 / - ( col0 ) AS col2 FROM tab0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT - 17 + col2 FROM tab0
----
-16
16
65

query I rowsort
SELECT DISTINCT - col0 + 80 FROM tab2
----
1
2
73

query I rowsort
SELECT + col1 + + col1 * - col1 * - col0 FROM tab1
----
13533
2054
6410

onlyif mysql # use DIV operator for integer division
query I rowsort label-7193
SELECT DISTINCT - ( - col2 ) + + tab0.col1 DIV ( - col0 ) + col0 * col2 DIV col1 FROM tab0
----
-1
161
39

skipif mysql # not compatible
query I rowsort label-7193
SELECT DISTINCT - ( - col2 ) + + tab0.col1 / ( - col0 ) + col0 * col2 / col1 FROM tab0
----
-1
161
39

query I rowsort
SELECT - 71 * + tab2.col0 + col1 FROM tab2
----
-466
-5479
-5592

query I rowsort
SELECT col1 * + 79 FROM tab2 AS cor0
----
1343
2449
4661

query I rowsort
SELECT + - 66 + cor0.col0 * + col0 AS col1 FROM tab2 AS cor0
----
-17
6018
6175

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7197
SELECT DISTINCT + CAST( + col0 AS SIGNED ) + + col0 FROM tab0 cor0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-7197
SELECT DISTINCT + CAST ( + col0 AS INTEGER ) + + col0 FROM tab0 cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-7198
SELECT ALL 39 + 17 DIV + col1 AS col0 FROM tab1 AS cor0
----
39
40
40

skipif mysql # not compatible
query I rowsort label-7198
SELECT ALL 39 + 17 / + col1 AS col0 FROM tab1 AS cor0
----
39
40
40

query I rowsort
SELECT - ( tab1.col0 * col0 ) FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT + tab2.col1 - + col0 AS col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT DISTINCT + + 56 + - col2 + - ( - col1 ) AS col0 FROM tab0 AS cor0
----
109
152
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7202
SELECT ( - col1 ) + - CAST( NULL AS DECIMAL ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7202
SELECT ( - col1 ) + - CAST ( NULL AS REAL ) AS col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7203
SELECT ALL - 27 DIV + col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7203
SELECT ALL - 27 / + col2 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 * col0 AS col1 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7205
SELECT ALL + col0 + + CAST( col0 AS SIGNED ) * col0 DIV - ( + col1 ) FROM tab1 AS cor0
----
-345
-412
3

skipif mysql # not compatible
query I rowsort label-7205
SELECT ALL + col0 + + CAST ( col0 AS INTEGER ) * col0 / - ( + col1 ) FROM tab1 AS cor0
----
-345
-412
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + 17 * 94 col2 FROM tab1 AS cor0
----
1502
1541
1544

query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col2 + - ( col2 ) FROM tab0 AS cor0
----
-36
-7380
-825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col2 col1 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 col0 FROM tab2
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * 2 col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL + col1 * cor0.col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + col2 * - col0 * - col0 FROM tab1 AS cor0
----
233472
486
614400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7213
SELECT ALL cor0.col1 + CAST( + col2 AS SIGNED ) * col1 AS col1 FROM tab1 AS cor0
----
1261
1430
580

skipif mysql # not compatible
query I rowsort label-7213
SELECT ALL cor0.col1 + CAST ( + col2 AS INTEGER ) * col1 AS col1 FROM tab1 AS cor0
----
1261
1430
580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col0 col1 FROM tab1, tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL col2 + col0 * + col0 - + col0 AS col1 FROM tab2 AS cor0
----
6032
6200
69

query I rowsort
SELECT DISTINCT col1 * ( col0 ) + + col2 AS col2 FROM tab2 cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT - col0 * col0 + col2 + col2 FROM tab2 AS cor0
----
-6032
-6165
5

query I rowsort
SELECT + 31 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

onlyif mysql # use DIV operator for integer division
query I rowsort label-7219
SELECT ALL + - cor0.col1 DIV + 15 + cor0.col1 * - col1 + ( - col2 ) * col0 * + col0 FROM tab0 cor0
----
-10640
-26409
-657809

skipif mysql # not compatible
query I rowsort label-7219
SELECT ALL + - cor0.col1 / + 15 + cor0.col1 * - col1 + ( - col2 ) * col0 * + col0 FROM tab0 cor0
----
-10640
-26409
-657809

query I rowsort
SELECT ALL + cor0.col0 * col0 + - cor0.col1 * - col0 AS col2 FROM tab2 cor0
----
10686
266
7584

query I rowsort
SELECT - col0 + + 78 FROM tab2 AS cor0
----
-1
0
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-7222
SELECT - - col0 DIV - ( col1 * col1 + + 34 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7222
SELECT - - col0 / - ( col1 * col1 + + 34 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 + + 16 * + col2 FROM tab0 AS cor0
----
1394
17
561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + 44 + 60 col0 FROM tab0 AS cor0
----
-1480
-3856
-996

query I rowsort
SELECT DISTINCT + col2 + cor0.col1 * + col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT 60 + col0 FROM tab0 cor0
----
149
84
95

query I rowsort
SELECT ALL col0 + + 19 AS col0 FROM tab2 AS cor0
----
26
97
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7228
SELECT DISTINCT + CAST( col0 AS SIGNED ) + col1 FROM tab2 cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-7228
SELECT DISTINCT + CAST ( col0 AS INTEGER ) + col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ALL + ( - col1 ) * col0 * 0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - col0 * 68 + col1 AS col2 FROM tab1 AS cor0
----
-178
-4342
-5427

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 col0 FROM tab2 AS cor0
----
49
49
49

query I rowsort
SELECT col1 + 33 * - col1 AS col0 FROM tab2
----
-1888
-544
-992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 * col0 * 60 col1 FROM tab2 AS cor0
----
-2940
-365040
-374460

query I rowsort
SELECT col0 * col1 + - ( 83 ) * col1 AS col1 FROM tab1 AS cor0
----
-190
-2080
-39

query I rowsort
SELECT - + 2 + - col2 * cor0.col0 FROM tab1 AS cor0
----
-164
-3650
-7682

query I rowsort
SELECT ALL + 19 FROM tab1 cor0
----
19
19
19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7237
SELECT col1 * - col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7237
SELECT col1 * - col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col2 * + col1 + col0 FROM tab1 AS cor0
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-7239
SELECT DISTINCT - col1 * + col0 - col1 DIV col0 FROM tab1 AS cor0
----
-1040
-640
-86

skipif mysql # not compatible
query I rowsort label-7239
SELECT DISTINCT - col1 * + col0 - col1 / col0 FROM tab1 AS cor0
----
-1040
-640
-86

query I rowsort
SELECT - + cor0.col0 + col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 5 + - col0 FROM tab2 cor0
----
-2
-73
-74

query I rowsort
SELECT ALL col2 * - col2 + - col2 FROM tab2 cor0
----
-1482
-702
-756

query I rowsort
SELECT - + col0 + col0 * col2 AS col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT DISTINCT - col2 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL ( col0 ) * col0 + + col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT ( 50 ) + - col0 * 95 + col0 AS col2 FROM tab0
----
-2206
-3240
-8316

query I rowsort
SELECT ALL 27 + 63 * + tab1.col1 FROM tab1
----
1665
657
846

query I rowsort
SELECT DISTINCT tab1.col1 AS col1 FROM tab1, tab2, tab0 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + col2 - col1 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT - - col1 + col0 * 64 FROM tab2 AS cor0
----
479
5051
5073

query I rowsort
SELECT - 49 + - col0 * 45 FROM tab0 AS cor0
----
-1129
-1624
-4054

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7252
SELECT ALL - cor0.col2 + col0 + - CAST( NULL AS SIGNED ) * 65 AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7252
SELECT ALL - cor0.col2 + col0 + - CAST ( NULL AS INTEGER ) * 65 AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 * col0 + col1 AS col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + - ( col0 ) * cor0.col2 + cor0.col1 * - col0 AS col2 FROM tab1 AS cor0
----
-240
-4288
-8720

query I rowsort
SELECT ALL - 91 * - col1 + - col0 AS col1 FROM tab2 cor0
----
1468
2814
5291

query I rowsort
SELECT ( + 90 ) + col2 * + ( - col0 ) AS col2 FROM tab2 AS cor0
----
-1938
-2912
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 * + col1 + col1 col0 FROM tab2 AS cor0
----
272
496
944

query I rowsort
SELECT + cor0.col2 + cor0.col2 * + col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT col2 * - ( - tab0.col1 ) AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT - 86 * + 36 FROM tab1 AS cor0
----
-3096
-3096
-3096

query I rowsort
SELECT 44 * + tab2.col0 FROM tab2, tab1 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to fb06588be429c34cc8ac030dc36066c2

query I rowsort
SELECT ( + 18 ) * - col1 FROM tab2
----
-1062
-306
-558

query I rowsort
SELECT + 31 + col1 FROM tab2 AS cor0
----
48
62
90

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7265
SELECT CAST( NULL AS SIGNED ) / col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7265
SELECT CAST ( NULL AS INTEGER ) / col2 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * - 57 FROM tab2 AS cor0
----
-399
-4446
-4503

query I rowsort
SELECT DISTINCT tab1.col0 + - 94 FROM tab1, tab2 AS cor0
----
-14
-30
-91

query I rowsort
SELECT - 44 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 07457d9e571e036a9a3a0f5a5a2e1ef2

query I rowsort
SELECT DISTINCT + col0 * - col1 * + col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT col1 * 91 * 0 FROM tab2
----
0

query I rowsort
SELECT col1 * - 93 * tab2.col1 AS col1 FROM tab2
----
-26877
-323733
-89373

onlyif mysql # use DIV operator for integer division
query I rowsort label-7272
SELECT col2 DIV CAST( col0 AS SIGNED ) AS col2 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-7272
SELECT col2 / CAST ( col0 AS INTEGER ) AS col2 FROM tab1
----
0
1
18

query I rowsort
SELECT + 67 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to eea8a0738728ea55e4e7ba1506c9905a

query I rowsort
SELECT DISTINCT + col0 + ( + 57 ) FROM tab1 AS cor0
----
121
137
60

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7276
SELECT col0 * + col0 DIV col0 - - tab0.col0 * - tab0.col0 FROM tab0
----
-1190
-552
-7832

skipif mysql # not compatible
query I rowsort label-7276
SELECT col0 * + col0 / col0 - - tab0.col0 * - tab0.col0 FROM tab0
----
-1190
-552
-7832

query I rowsort
SELECT ALL + 88 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT tab1.col1 + tab1.col2 FROM tab1
----
109
67
80

query I rowsort
SELECT - 55 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT ALL - col2 + + col2 - col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT - col1 * col2 - col1 AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT ALL - 84 - 26 AS col0 FROM tab0
----
-110
-110
-110

query I rowsort
SELECT DISTINCT col2 + 99 - col0 AS col1 FROM tab1
----
115
150
92

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT DISTINCT - 69 + col1 * col1 FROM tab0 AS cor0
----
7327
8212
9340

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 36 + - col1 * col2 col0 FROM tab0 AS cor0
----
-133
-2874
-7498

onlyif mysql # use DIV operator for integer division
query I rowsort label-7287
SELECT 39 + 12 DIV - cor0.col0 col2 FROM tab1 AS cor0
----
35
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7287
SELECT 39 + 12 / - cor0.col0 col2 FROM tab1 AS cor0
----
35
39
39

query I rowsort
SELECT + 71 * - col2 AS col0 FROM tab0
----
-2343
-5822
-71

query I rowsort
SELECT DISTINCT col1 * tab1.col2 + + col2 AS col0 FROM tab1
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-7290
SELECT ( col0 ) DIV + col1 AS col2 FROM tab2 cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-7290
SELECT ( col0 ) / + col1 AS col2 FROM tab2 cor0
----
0
1
4

query I rowsort
SELECT col0 * 12 FROM tab2 cor0
----
84
936
948

query I rowsort
SELECT ALL col2 + col2 * col2 AS col0 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-7293
SELECT DISTINCT + col2 DIV 71 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7293
SELECT DISTINCT + col2 / 71 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + col2 * 42 FROM tab2 cor0
----
1092
1134
1596

query I rowsort
SELECT + + col2 * - col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT - 40 + - cor0.col1 FROM tab2 AS cor0
----
-57
-71
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-7297
SELECT ALL 5 DIV col1 col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7297
SELECT ALL 5 / col1 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 40 * - col1 FROM tab1 AS cor0
----
-1040
-400
-520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 + col1 col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT + col2 + + col2 * cor0.col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL - ( + col2 ) AS col1 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + col1 + + col1 AS col0 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT col0 * + cor0.col1 + + 18 * cor0.col2 * ( - col0 ) FROM tab1 AS cor0
----
-137200
-2838
-65024

query I rowsort
SELECT ALL col2 * + 6 FROM tab2 cor0
----
156
162
228

query I rowsort
SELECT ALL + col2 + col0 - 1 * 58 FROM tab1
----
-1
118
63

query I rowsort
SELECT DISTINCT - - col1 * cor0.col2 - col0 * + col1 AS col2 FROM tab1 AS cor0
----
-70
1326
208

query I rowsort
SELECT DISTINCT + 55 FROM tab0, tab1, tab1 AS cor0
----
55

query I rowsort
SELECT ALL - col0 * - col0 + col0 * + col1 AS col2 FROM tab0 AS cor0
----
16020
2640
4620

query I rowsort
SELECT - + 31 + col1 * col1 FROM tab1 AS cor0
----
138
645
69

query I rowsort
SELECT ALL - + col1 * + 80 FROM tab0 AS cor0
----
-6880
-7280
-7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-7311
SELECT - + ( - 31 ) + col0 DIV col2 AS col1 FROM tab0 cor0
----
31
32
66

skipif mysql # not compatible
query I rowsort label-7311
SELECT - + ( - 31 ) + col0 / col2 AS col1 FROM tab0 cor0
----
31
32
66

query I rowsort
SELECT ALL col2 + - col2 * col1 FROM tab2 AS cor0
----
-1508
-608
-810

onlyif mysql # use DIV operator for integer division
query I rowsort label-7313
SELECT DISTINCT - col2 DIV col1 + col1 + + cor0.col0 FROM tab1 AS cor0
----
27
69
86

skipif mysql # not compatible
query I rowsort label-7313
SELECT DISTINCT - col2 / col1 + col1 + + cor0.col0 FROM tab1 AS cor0
----
27
69
86

query I rowsort
SELECT cor1.col0 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT col1 + - ( col1 ) AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 + + col1 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT - tab0.col0 * tab0.col2 + tab0.col2 + col2 FROM tab0
----
-33
-7134
-726

query I rowsort
SELECT tab1.col1 + 84 FROM tab1
----
110
94
97

query I rowsort
SELECT - col1 + - ( - col1 ) AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT - col1 * 8 AS col0 FROM tab0 AS cor0
----
-688
-728
-776

query I rowsort
SELECT ALL - col2 * - tab2.col0 FROM tab2
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - col0 * cor0.col1 * col0 + col0 + col0 * col1 FROM tab0 AS cor0
----
-115395
-47448
-712623

query I rowsort
SELECT DISTINCT - - ( + col0 ) * + cor0.col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - + 72 + col0 * + col0 FROM tab2 AS cor0
----
-23
6012
6169

query I rowsort
SELECT DISTINCT - 97 * - 31 FROM tab0 AS cor0
----
3007

query I rowsort
SELECT + 45 * 36 AS col1 FROM tab1 AS cor0
----
1620
1620
1620

query I rowsort
SELECT ALL cor0.col1 * 54 FROM tab1 AS cor0
----
1404
540
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( cor0.col0 ) + - cor0.col0 col2 FROM tab1 cor0
----
-128
-160
-6

query I rowsort
SELECT - 64 * col1 AS col1 FROM tab0 AS cor0
----
-5504
-5824
-6208

query I rowsort
SELECT DISTINCT 51 * 86 * + col2 FROM tab1 AS cor0
----
236844
250002
421056

query I rowsort
SELECT + col0 + + col1 * - col2 AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL cor0.col1 + col1 FROM tab0 cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 11 * 52 col2 FROM tab0
----
572
572
572

query I rowsort
SELECT 21 + col2 * - col0 * 4 FROM tab1
----
-14571
-30699
-627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + tab0.col0 ) * + col2 col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL col1 + + col2 AS col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT ALL - 56 FROM tab2, tab1, tab0 cor0, tab0
----
81 values hashing to 34348c65780193c8d601ab14b29af6e7

query I rowsort
SELECT DISTINCT + - 52 + + col0 * - col2 FROM tab0 AS cor0
----
-7350
-844
-87

query I rowsort
SELECT ALL - - col2 + cor0.col1 * + col2 FROM tab0 AS cor0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * cor0.col2 col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT 37 + - col2 * - col1 FROM tab2 AS cor0
----
1571
683
874

onlyif mysql # use DIV operator for integer division
query I rowsort label-7343
SELECT cor0.col0 DIV cor0.col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7343
SELECT cor0.col0 / cor0.col1 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7344
SELECT 34 DIV col0 + + col1 AS col0 FROM tab0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-7344
SELECT 34 / col0 + + col1 AS col0 FROM tab0
----
87
91
97

query I rowsort
SELECT DISTINCT - 15 AS col2 FROM tab0 AS cor0
----
-15

query I rowsort
SELECT col0 * + col0 * + 10 AS col0 FROM tab0 AS cor0
----
12250
5760
79210

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7347
SELECT ALL - cor0.col1 + CAST( NULL AS SIGNED ) * 87 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-7347
SELECT ALL - cor0.col1 + CAST ( NULL AS INTEGER ) * 87 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 - 62 * 45 AS col1 FROM tab1 AS cor0
----
-2710
-2726
-2787

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * col2 col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT + col1 * col1 - col0 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT ALL cor0.col2 * + 38 * 35 + - col2 FROM tab1 AS cor0
----
127584
71766
75753

query I rowsort
SELECT + cor0.col1 * - 53 AS col1 FROM tab2 AS cor0
----
-1643
-3127
-901

query I rowsort
SELECT + col2 * + ( col1 ) - - col2 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT + col1 + col1 + 12 FROM tab2 AS cor0
----
130
46
74

query I rowsort
SELECT DISTINCT + - col1 * 2 - col2 * col1 FROM tab2 AS cor0
----
-1652
-680
-899

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7356
SELECT ALL - col0 - - CAST( NULL AS DECIMAL ) * col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7356
SELECT ALL - col0 - - CAST ( NULL AS REAL ) * col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 * + col2 + - col2 FROM tab1 AS cor0
----
108
3591
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-7358
SELECT ALL - col2 DIV - col0 + - col2 + col0 * col1 * - 4 FROM tab2 AS cor0
----
-18434
-5410
-892

skipif mysql # not compatible
query I rowsort label-7358
SELECT ALL - col2 / - col0 + - col2 + col0 * col1 * - 4 FROM tab2 AS cor0
----
-18434
-5410
-892

query I rowsort
SELECT ALL col2 + - col1 * col1 + + col0 * 87 FROM tab1 AS cor0
----
-361
5525
6887

query I rowsort
SELECT + cor0.col2 + 82 FROM tab2 AS cor0
----
108
109
120

query I rowsort
SELECT ALL + col2 * + cor0.col0 + - 79 FROM tab0 AS cor0
----
-44
713
7219

query I rowsort
SELECT DISTINCT + col0 - ( + cor0.col2 ) AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL cor0.col0 * - 89 + + col2 FROM tab2 AS cor0
----
-596
-6916
-6993

onlyif mysql # use DIV operator for integer division
query I rowsort label-7364
SELECT ALL - col0 * 25 + col0 + cor0.col2 DIV col1 AS col2 FROM tab2 AS cor0
----
-168
-1872
-1894

skipif mysql # not compatible
query I rowsort label-7364
SELECT ALL - col0 * 25 + col0 + cor0.col2 / col1 AS col2 FROM tab2 AS cor0
----
-168
-1872
-1894

query I rowsort
SELECT + + ( 58 ) + + col0 FROM tab0 AS cor0
----
147
82
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7366
SELECT DISTINCT + ( cor0.col0 ) + col1 DIV - cor0.col0 FROM tab2 AS cor0
----
3
78
79

skipif mysql # not compatible
query I rowsort label-7366
SELECT DISTINCT + ( cor0.col0 ) + col1 / - cor0.col0 FROM tab2 AS cor0
----
3
78
79

query I rowsort
SELECT ALL col2 * + col1 + col1 AS col2 FROM tab2
----
1593
663
868

query I rowsort
SELECT ALL tab1.col2 * col1 + - col1 AS col0 FROM tab1
----
1235
1378
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7369
SELECT DISTINCT col1 * CAST( + col0 AS SIGNED ) AS col1 FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-7369
SELECT DISTINCT col1 * CAST ( + col0 AS INTEGER ) AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT col2 + + col0 * + 61 FROM tab1 AS cor0
----
237
3961
4976

query I rowsort
SELECT cor0.col2 * ( cor0.col1 ) AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + 97 + col2 FROM tab1 AS cor0
----
151
154
193

query I rowsort
SELECT + cor0.col0 * 28 + + col0 * 79 AS col0 FROM tab1 AS cor0
----
321
6848
8560

query I rowsort
SELECT 63 - col0 FROM tab2 AS cor0
----
-15
-16
56

query I rowsort
SELECT + col0 * ( col0 ) + 20 AS col1 FROM tab2 cor0
----
6104
6261
69

query I rowsort
SELECT - col0 + + ( col2 ) * col0 FROM tab1 AS cor0
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-7377
SELECT DISTINCT 99 DIV - col1 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-7377
SELECT DISTINCT 99 / - col1 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT ALL 72 * col0 * + col0 AS col2 FROM tab0 AS cor0
----
41472
570312
88200

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7379
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab2, tab2 AS cor0, tab1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-7379
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab2, tab2 AS cor0, tab1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT + - 96 - 19 AS col1 FROM tab1 cor0
----
-115
-115
-115

query I rowsort
SELECT + ( + col0 ) - cor0.col1 * col0 * col0 FROM tab0 AS cor0
----
-118790
-49512
-720722

query I rowsort
SELECT 6 * + col2 AS col2 FROM tab2 AS cor0
----
156
162
228

query I rowsort
SELECT DISTINCT col0 * + col0 + - col0 * 81 + - col1 FROM tab0 AS cor0
----
-1454
-1707
621

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + - col1 col2 FROM tab2 AS cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 19 col0 FROM tab1 AS cor0
----
19
19
19

query I rowsort
SELECT - col1 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7387
SELECT ALL + col2 * + CAST( - 99 * + col0 + - col1 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-19548
-202306
-297844

skipif mysql # not compatible
query I rowsort label-7387
SELECT ALL + col2 * + CAST ( - 99 * + col0 + - col1 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-19548
-202306
-297844

query I rowsort
SELECT DISTINCT - col0 * 1 * - col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - col2 + col2 AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 * 45 AS col0 FROM tab2 AS cor0
----
315
3510
3555

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + col1 col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT - col1 * + 12 AS col0 FROM tab2 AS cor0
----
-204
-372
-708

query I rowsort
SELECT - + col2 + col1 * - col1 * + col2 FROM tab2 AS cor0
----
-11020
-25974
-90532

query I rowsort
SELECT DISTINCT + col0 * col2 + + 53 - - col2 FROM tab1 AS cor0
----
269
3758
7829

query I rowsort
SELECT ( - 91 ) FROM tab2 AS cor0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT - col0 * ( + col0 ) * 65 FROM tab0 AS cor0
----
-37440
-514865
-79625

query I rowsort
SELECT DISTINCT + 34 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7399
SELECT ALL + CAST( col0 AS SIGNED ) * col1 FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-7399
SELECT ALL + CAST ( col0 AS INTEGER ) * col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT + cor0.col1 * - col1 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT + ( col2 ) * - col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - + ( - col0 ) + col0 * - col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - - 89 FROM tab1 AS cor0
----
89
89
89

query I rowsort
SELECT - col0 * - col2 + - col0 * 45 FROM tab1 AS cor0
----
27
4080
768

query I rowsort
SELECT ALL - 63 + col2 FROM tab0 AS cor0
----
-30
-62
19

query I rowsort
SELECT ALL col0 * 97 + col2 AS col1 FROM tab1 cor0
----
345
6265
7856

query I rowsort
SELECT ALL - - 16 FROM tab1 AS cor0
----
16
16
16

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7408
SELECT - - CAST( col2 AS SIGNED ) * + col2 FROM tab0 AS cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-7408
SELECT - - CAST ( col2 AS INTEGER ) * + col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT col0 * - 84 + col2 * col2 FROM tab1 AS cor0
----
-2127
2496
2664

query I rowsort
SELECT DISTINCT - col1 * ( col2 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - ( 41 ) * col1 AS col2 FROM tab1 AS cor0
----
-1066
-410
-533

query I rowsort
SELECT 21 + + ( cor0.col2 ) AS col0 FROM tab0 AS cor0
----
103
22
54

query I rowsort
SELECT DISTINCT + + 88 - col0 FROM tab2 AS cor0
----
10
81
9

query I rowsort
SELECT DISTINCT + - 70 AS col2 FROM tab1 AS cor0
----
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-7415
SELECT - - col1 DIV col0 + cor0.col1 FROM tab0 AS cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-7415
SELECT - - col1 / col0 + cor0.col1 FROM tab0 AS cor0
----
89
92
99

query I rowsort
SELECT ALL - col2 * + col1 + col1 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT 21 - cor0.col0 * col2 * col0 FROM tab2 AS cor0
----
-1302
-158163
-237137

query I rowsort
SELECT DISTINCT + col2 * - 40 AS col0 FROM tab2 AS cor0
----
-1040
-1080
-1520

query I rowsort
SELECT + ( - 74 ) * col1 AS col2 FROM tab1 AS cor0
----
-1924
-740
-962

onlyif mysql # use DIV operator for integer division
query I rowsort label-7420
SELECT - 31 DIV + col0 FROM tab1 AS cor0
----
-10
0
0

skipif mysql # not compatible
query I rowsort label-7420
SELECT - 31 / + col0 FROM tab1 AS cor0
----
-10
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7421
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 93 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7421
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 93 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col2 + col1 * - col1 AS col0 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT ALL + 27 * col1 + + cor0.col0 FROM tab1 AS cor0
----
334
431
705

query I rowsort
SELECT ALL + col0 * - col2 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT + + ( col0 ) + 72 FROM tab2 AS cor0
----
150
151
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * col0 col0 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7427
SELECT + - col1 DIV col0 FROM tab2 cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-7427
SELECT + - col1 / col0 FROM tab2 cor0
----
-4
0
0

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0, tab0 cor0, tab2 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to ee8b23a58dda2d92e14ed437e06ed8d2

onlyif mysql # use DIV operator for integer division
query I rowsort label-7429
SELECT - 46 DIV col1 FROM tab2 cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-7429
SELECT - 46 / col1 FROM tab2 cor0
----
-1
-2
0

query I rowsort
SELECT + 52 * + col0 AS col1 FROM tab0 AS cor0
----
1248
1820
4628

query I rowsort
SELECT + cor0.col0 + - cor0.col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + - col0 + ( ( - col2 ) ) FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL - - cor0.col0 - 92 AS col1 FROM tab2 cor0
----
-13
-14
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-7434
SELECT ALL + col0 DIV - ( + col1 ) AS col0 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7434
SELECT ALL + col0 / - ( + col1 ) AS col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col1 + - col1 AS col0 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7436
SELECT 91 DIV - col1 AS col1 FROM tab2
----
-1
-2
-5

skipif mysql # not compatible
query I rowsort label-7436
SELECT 91 / - col1 AS col1 FROM tab2
----
-1
-2
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col0 FROM tab0, tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - - col1 * ( col2 ) FROM tab0 cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7439
SELECT ALL + col1 + CAST( NULL AS DECIMAL ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7439
SELECT ALL + col1 + CAST ( NULL AS REAL ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 3 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

query I rowsort
SELECT ALL col2 + col2 * + col1 FROM tab0
----
2871
7544
98

query I rowsort
SELECT tab0.col0 * ( col1 ) - col1 AS col0 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT DISTINCT 57 + - col2 FROM tab0 AS cor0
----
-25
24
56

query I rowsort
SELECT 84 * + col2 + col2 AS col0 FROM tab1 AS cor0
----
4590
4845
8160

query I rowsort
SELECT DISTINCT - + col2 * ( + col1 ) * col2 + - col1 AS col1 FROM tab1 AS cor0
----
-119821
-32500
-75842

query I rowsort
SELECT DISTINCT 81 + col1 * + col1 AS col1 FROM tab0 AS cor0
----
7477
8362
9490

query I rowsort
SELECT ALL + col0 * - 61 + - 44 FROM tab1
----
-227
-3948
-4924

query I rowsort
SELECT - col0 + 63 FROM tab2
----
-15
-16
56

query I rowsort
SELECT DISTINCT + tab1.col2 * tab1.col1 + 96 FROM tab1
----
1344
1500
666

query I rowsort
SELECT tab2.col0 + col1 + - 19 AS col1 FROM tab2
----
118
19
77

query I rowsort
SELECT + ( col2 ) + col1 * col0 AS col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL + 57 FROM tab2, tab1 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col1 col0 FROM tab1 cor0 CROSS JOIN tab2, tab2 cor1
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - col2 * col1 + + col1 * + col1 * - col0 + col1 AS col0 FROM tab1 AS cor0
----
-14755
-3406
-6960

onlyif mysql # use DIV operator for integer division
query I rowsort label-7455
SELECT ALL cor0.col0 DIV col1 + - col1 * - col0 AS col1 FROM tab2 cor0
----
1347
217
4603

skipif mysql # not compatible
query I rowsort label-7455
SELECT ALL cor0.col0 / col1 + - col1 * - col0 AS col1 FROM tab2 cor0
----
1347
217
4603

query I rowsort
SELECT ALL 54 * ( col2 ) FROM tab1 AS cor0
----
2916
3078
5184

query I rowsort
SELECT + 76 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7458
SELECT col0 * CAST( col1 AS SIGNED ) * - col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

skipif mysql # not compatible
query I rowsort label-7458
SELECT col0 * CAST ( col1 AS INTEGER ) * - col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT - + 93 + - col1 AS col0 FROM tab1 cor0
----
-103
-106
-119

query I rowsort
SELECT DISTINCT col0 + - ( cor0.col1 ) AS col0 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-7461
SELECT - col1 DIV cor0.col0 col1 FROM tab0 AS cor0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7461
SELECT - col1 / cor0.col0 col1 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT - col1 * - 44 + - 6 AS col0 FROM tab1 cor0
----
1138
434
566

query I rowsort
SELECT - col2 * + 71 + - 28 + - col0 AS col0 FROM tab2
----
-1952
-1952
-2805

query I rowsort
SELECT ALL col1 * ( col1 ) * col2 AS col2 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT - - 4 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT col0 * col2 AS col2 FROM tab0 cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col2 col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - col2 * + 88 FROM tab2 AS cor0
----
-2288
-2376
-3344

onlyif mysql # use DIV operator for integer division
query I rowsort label-7469
SELECT DISTINCT col0 + + col2 DIV - 40 AS col1 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-7469
SELECT DISTINCT col0 + + col2 / - 40 AS col1 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7470
SELECT - + col0 DIV - 34 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7470
SELECT - + col0 / - 34 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT ALL + col0 * 41 FROM tab0 AS cor0
----
1435
3649
984

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7472
SELECT DISTINCT - col1 * + cor0.col2 * + col1 + col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7472
SELECT DISTINCT - col1 * + cor0.col2 * + col1 + col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT ALL - col0 * cor0.col1 + + col0 - col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort
SELECT - col1 + + CAST ( - col1 AS REAL ) AS col2 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT - - cor0.col2 * col0 * col1 AS col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT ( col0 ) + + col0 * col1 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT 84 * ( col2 ) FROM tab0
----
2772
6888
84

query I rowsort
SELECT col2 - col2 * col2 AS col2 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT ALL 20 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT + tab2.col1 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - col1 ) * col2 col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - + ( - col0 ) * 88 AS col0 FROM tab2 AS cor0
----
616
6864
6952

query I rowsort
SELECT col0 + col1 * + 94 FROM tab1 AS cor0
----
1004
1302
2447

query I rowsort
SELECT + 21 FROM tab0, tab0 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7485
SELECT + col1 * 0 + + col0 DIV col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7485
SELECT + col1 * 0 + + col0 / col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT - col2 * col2 - col0 FROM tab0 AS cor0
----
-1113
-36
-6813

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7487
SELECT + cor0.col1 + CAST( - col2 AS SIGNED ) col1 FROM tab0 cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7487
SELECT + cor0.col1 + CAST ( - col2 AS INTEGER ) col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT DISTINCT - col2 + - col0 AS col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT - + col1 * 49 + col1 FROM tab2 AS cor0
----
-1488
-2832
-816

query I rowsort
SELECT col1 * - 72 * - cor0.col0 + col1 - + ( col0 * col1 ) AS col2 FROM tab2 AS cor0
----
15438
326801
95370

query I rowsort
SELECT DISTINCT col2 * + ( col1 ) + col2 * + ( col2 ) AS col2 FROM tab2 cor0
----
1566
2090
2210

query I rowsort
SELECT - col2 + + col2 + col1 AS col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - col1 * + cor0.col1 + - col0 FROM tab0 AS cor0
----
-7420
-8370
-9444

query I rowsort
SELECT ( col2 ) * - col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col1 * - ( - col1 ) FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + col2 * col2 + cor0.col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT + col2 + 0 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - col0 + + 73 * - col2 FROM tab2 cor0
----
-1976
-1978
-2853

query I rowsort
SELECT DISTINCT 63 * - 74 + col0 FROM tab1 AS cor0
----
-4582
-4598
-4659

query I rowsort
SELECT DISTINCT + 80 * col0 + - col0 FROM tab2 AS cor0
----
553
6162
6241

query I rowsort
SELECT DISTINCT + - col0 * cor0.col2 - col2 AS col0 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT - + 79 + - 19 FROM tab0 cor0
----
-98
-98
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * 97 + col0 col0 FROM tab2 AS cor0
----
2600
2626
3765

query I rowsort
SELECT - 56 * cor0.col2 + - col1 FROM tab1 cor0
----
-3050
-3202
-5389

query I rowsort
SELECT ALL + - col2 + - 80 AS col2 FROM tab0 AS cor0
----
-113
-162
-81

query I rowsort
SELECT + - ( 44 ) + - col0 FROM tab2 AS cor0
----
-122
-123
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 - + col0 col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL - ( + col0 ) + - 21 FROM tab0 AS cor0
----
-110
-45
-56

onlyif mysql # use DIV operator for integer division
query I rowsort label-7509
SELECT ALL - + 32 DIV col0 + col2 FROM tab1 cor0
----
44
57
96

skipif mysql # not compatible
query I rowsort label-7509
SELECT ALL - + 32 / col0 + col2 FROM tab1 cor0
----
44
57
96

query I rowsort
SELECT DISTINCT - col0 + + col2 * cor0.col1 AS col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL 84 + + col0 * + col1 * col0 FROM tab0
----
118909
49620
720895

query I rowsort
SELECT - ( - col2 ) * col2 + - ( - col0 ) FROM tab2
----
1523
736
754

query I rowsort
SELECT + cor0.col0 * 45 AS col0 FROM tab1 AS cor0
----
135
2880
3600

query I rowsort
SELECT - - cor0.col1 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + - col1 * - ( col0 ) + col2 * col2 AS col2 FROM tab1 AS cor0
----
10256
2994
3889

onlyif mysql # use DIV operator for integer division
query I rowsort label-7516
SELECT DISTINCT + + cor0.col1 + - col1 DIV col1 AS col0 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-7516
SELECT DISTINCT + + cor0.col1 + - col1 / col1 AS col0 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT DISTINCT - col1 * + ( + tab0.col1 ) * - col1 FROM tab0
----
636056
753571
912673

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 36 col1 FROM tab2, tab1 cor0, tab2 AS cor1
----
27 values hashing to 3bcd07d22b62d2042b499253b1c13d9e

onlyif mysql # use DIV operator for integer division
query I rowsort label-7519
SELECT - + col1 DIV 17 - 96 * col0 AS col0 FROM tab0 AS cor0
----
-2309
-3365
-8549

skipif mysql # not compatible
query I rowsort label-7519
SELECT - + col1 / 17 - 96 * col0 AS col0 FROM tab0 AS cor0
----
-2309
-3365
-8549

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7520
SELECT DISTINCT tab0.col1 - + CAST( NULL AS SIGNED ) * - ( + col2 ) AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7520
SELECT DISTINCT tab0.col1 - + CAST ( NULL AS INTEGER ) * - ( + col2 ) AS col2 FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7521
SELECT col0 * + col2 + col1 DIV - col0 AS col0 FROM tab1 AS cor0
----
154
3648
7680

skipif mysql # not compatible
query I rowsort label-7521
SELECT col0 * + col2 + col1 / - col0 AS col0 FROM tab1 AS cor0
----
154
3648
7680

query I rowsort
SELECT ALL - 64 * col1 + col2 FROM tab1 AS cor0
----
-1610
-583
-736

query I rowsort
SELECT - col2 * + col2 + col0 * col0 + - col0 AS col1 FROM tab0 cor0
----
-537
1108
1189

query I rowsort
SELECT ALL - cor0.col0 + - col0 * 76 FROM tab1 cor0
----
-231
-4928
-6160

onlyif mysql # use DIV operator for integer division
query I rowsort label-7525
SELECT DISTINCT + + ( col2 ) * col0 DIV col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7525
SELECT DISTINCT + + ( col2 ) * col0 / col0 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * + col2 col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - tab2.col2 * 21 * + 59 AS col1 FROM tab2
----
-32214
-33453
-47082

query I rowsort
SELECT col1 + ( 60 ) + + col0 * ( 73 ) FROM tab1 AS cor0
----
305
4742
5913

onlyif mysql # use DIV operator for integer division
query I rowsort label-7529
SELECT col1 DIV - CAST( - 49 AS SIGNED ) + - col2 + cor0.col2 * col1 * col1 FROM tab1 AS cor0
----
16128
36450
5643

skipif mysql # not compatible
query I rowsort label-7529
SELECT col1 / - CAST ( - 49 AS INTEGER ) + - col2 + cor0.col2 * col1 * col1 FROM tab1 AS cor0
----
16128
36450
5643

query I rowsort
SELECT DISTINCT - cor0.col0 * ( ( + col1 ) ) AS col1 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-7531
SELECT DISTINCT - + col1 * 21 DIV + 5 FROM tab1 AS cor0
----
-109
-42
-54

skipif mysql # not compatible
query I rowsort label-7531
SELECT DISTINCT - + col1 * 21 / + 5 FROM tab1 AS cor0
----
-109
-42
-54

query I rowsort
SELECT col0 * col1 + 56 AS col2 FROM tab0 AS cor0
----
2120
3451
8155

query I rowsort
SELECT DISTINCT 88 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
88

query I rowsort
SELECT ALL - col1 - + tab2.col1 FROM tab2
----
-118
-34
-62

skipif mysql # not compatible
query I rowsort
SELECT ALL ( col2 ) - col0 * + CAST ( col2 * - col1 AS REAL ) FROM tab0
----
3396
664200
68145

query I rowsort
SELECT ALL + col0 * col2 - tab0.col2 AS col1 FROM tab0
----
34
7216
759

query I rowsort
SELECT ALL - 68 * - col2 * col1 FROM tab2 cor0
----
104312
43928
56916

query I rowsort
SELECT DISTINCT - 27 * - cor0.col0 FROM tab0 AS cor0
----
2403
648
945

query I rowsort
SELECT DISTINCT + - 17 * - col2 FROM tab2 AS cor0
----
442
459
646

onlyif mysql # use DIV operator for integer division
query I rowsort label-7540
SELECT ALL - col1 DIV col1 + col1 FROM tab2 AS cor0
----
16
30
58

skipif mysql # not compatible
query I rowsort label-7540
SELECT ALL - col1 / col1 + col1 FROM tab2 AS cor0
----
16
30
58

query I rowsort
SELECT - - col1 * ( - col2 ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + - col2 + ( cor0.col2 ) * - ( + cor0.col2 ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
-2
-35970
-551450

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col2 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) + + col0 * col0 FROM tab0 AS cor0
----
1128
490
7830

onlyif mysql # use DIV operator for integer division
query I rowsort label-7545
SELECT - col2 DIV - col0 + - col0 * col2 FROM tab2 AS cor0
----
-186
-2028
-3002

skipif mysql # not compatible
query I rowsort label-7545
SELECT - col2 / - col0 + - col0 * col2 FROM tab2 AS cor0
----
-186
-2028
-3002

query I rowsort
SELECT ALL + col2 * cor0.col2 * - col2 AS col2 FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT ALL + cor0.col1 * cor0.col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT col1 + - cor0.col0 * 57 AS col2 FROM tab1 AS cor0
----
-145
-3638
-4547

query I rowsort
SELECT - 5 + + col2 AS col1 FROM tab0 cor0
----
-4
28
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-7550
SELECT DISTINCT - - col1 DIV col0 + 24 + col1 col2 FROM tab0 AS cor0
----
113
116
123

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7550
SELECT DISTINCT - - col1 / col0 + 24 + col1 col2 FROM tab0 AS cor0
----
113
116
123

query I rowsort
SELECT DISTINCT + 62 + - col2 FROM tab1 cor0
----
-34
5
8

query I rowsort
SELECT ALL - col1 * + col2 + - col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT + + cor0.col1 + - col1 * col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT 10 + col0 * + col0 AS col1 FROM tab1 AS cor0
----
19
4106
6410

query I rowsort
SELECT ALL - col2 * col1 + - 77 * + col1 + + col0 FROM tab1 AS cor0
----
-1276
-2169
-3403

query I rowsort
SELECT ALL + col0 - - col2 * - col1 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT - 82 AS col1 FROM tab0, tab1 AS cor0
----
-82

query I rowsort
SELECT ALL - 54 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 71e27a12767d3a987ce05e4d6edad211

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7559
SELECT - CAST( NULL AS DECIMAL ) * - col1 * col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7559
SELECT - CAST ( NULL AS REAL ) * - col1 * col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 - col0 col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - col2 * + tab2.col1 AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL - - col2 * col1 + cor0.col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL + col2 * cor0.col0 - + 80 FROM tab0 AS cor0
----
-45
712
7218

query I rowsort
SELECT ALL - cor0.col1 + 93 FROM tab2, tab2 AS cor0
----
9 values hashing to 092b654ede783d39e97b3da1828863d9

query I rowsort
SELECT - - cor0.col1 * - col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - 16 AS col1 FROM tab2
----
-16

query I rowsort
SELECT - tab0.col0 * - ( - ( cor0.col2 ) ) FROM tab0, tab1 AS cor0
----
9 values hashing to 5ac8aba7baafe9bd6ceb7b5654f2c0b7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7568
SELECT ALL - col0 + tab0.col1 DIV - col1 FROM tab0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-7568
SELECT ALL - col0 + tab0.col1 / - col1 FROM tab0
----
-25
-36
-90

query I rowsort
SELECT DISTINCT - col0 + + col2 AS col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT - 78 * col2 AS col2 FROM tab0
----
-2574
-6396
-78

query I rowsort
SELECT - 99 * + ( col1 ) AS col0 FROM tab1 AS cor0
----
-1287
-2574
-990

query I rowsort
SELECT DISTINCT tab1.col2 * + 69 AS col0 FROM tab1
----
3726
3933
6624

query I rowsort
SELECT ALL + 89 AS col0 FROM tab1 cor0
----
89
89
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7574
SELECT DISTINCT + col1 DIV 26 FROM tab0 AS cor0
----
3

skipif mysql # not compatible
query I rowsort label-7574
SELECT DISTINCT + col1 / 26 FROM tab0 AS cor0
----
3

query I rowsort
SELECT - col0 * + 84 + - col0 * - col0 FROM tab1
----
-1280
-243
-320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7576
SELECT tab1.col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7576
SELECT tab1.col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * - 72 AS col1 FROM tab0
----
-6192
-6552
-6984

onlyif mysql # use DIV operator for integer division
query I rowsort label-7578
SELECT + col0 DIV - col2 + + 20 FROM tab0
----
-15
19
20

skipif mysql # not compatible
query I rowsort label-7578
SELECT + col0 / - col2 + + 20 FROM tab0
----
-15
19
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7579
SELECT col0 / ( - col1 ) + + col0 * + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7579
SELECT col0 / ( - col1 ) + + col0 * + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + tab0.col1 * col2 AS col2 FROM tab0
----
0
2752
7371

query I rowsort
SELECT + tab2.col2 * + 23 FROM tab2
----
598
621
874

query I rowsort
SELECT ALL + tab1.col0 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT tab0.col2 * + tab0.col2 AS col1 FROM tab0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-7584
SELECT ALL + ( 47 ) DIV - cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7584
SELECT ALL + ( 47 ) / - cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 59 * col2 + + col2 FROM tab1 AS cor0
----
-3132
-3306
-5568

query I rowsort
SELECT ALL + - 20 * + ( - col2 ) AS col1 FROM tab1 AS cor0
----
1080
1140
1920

query I rowsort
SELECT + + 48 * col1 AS col2 FROM tab0 cor0
----
4128
4368
4656

query I rowsort
SELECT DISTINCT - 99 + col1 * + col1 AS col1 FROM tab2 AS cor0
----
190
3382
862

query I rowsort
SELECT - ( + ( - col1 ) + - col2 ) AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT + + ( col1 ) * col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT - ( - col1 ) - + col0 * + col2 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT + ( - col0 ) - - col2 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT ALL + ( cor0.col1 ) + + col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT + + col2 * col0 * - col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + col2 + - 42 * col0 AS col0 FROM tab0 AS cor0
----
-1469
-3656
-975

query I rowsort
SELECT 27 + - col1 FROM tab1 AS cor0
----
1
14
17

query I rowsort
SELECT DISTINCT - col2 * col0 + col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT - + col1 + + 27 FROM tab0 AS cor0
----
-59
-64
-70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7599
SELECT DISTINCT + CAST( NULL AS SIGNED ) + 46 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7599
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + 46 AS col2 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT - col0 - - 19 FROM tab0
----
-16
-5
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + 22 col2 FROM tab2
----
572
594
836

onlyif mysql # use DIV operator for integer division
query I rowsort label-7603
SELECT + col0 DIV - tab2.col1 AS col0 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-7603
SELECT + col0 / - tab2.col1 AS col0 FROM tab2
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 70 * tab0.col2 col2 FROM tab0, tab2 AS cor0
----
-2310
-5740
-70

query I rowsort
SELECT ALL 33 + + col0 AS col1 FROM tab2
----
111
112
40

query I rowsort
SELECT + 79 + col2 AS col0 FROM tab2 cor0
----
105
106
117

query I rowsort
SELECT 32 * - col2 AS col0 FROM tab1
----
-1728
-1824
-3072

query I rowsort
SELECT + ( - col1 ) * - col1 FROM tab2
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7609
SELECT DISTINCT CAST( NULL AS SIGNED ) * + 77 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-7609
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + 77 FROM tab2
----
NULL

query I rowsort
SELECT tab1.col0 FROM tab1, tab0, tab2 AS cor0, tab2
----
81 values hashing to e28bf7f922650ca423ade3642ce0285b

query I rowsort
SELECT col2 * 44 AS col1 FROM tab0
----
1452
3608
44

query I rowsort
SELECT 27 * + col1 + - ( + ( + col0 ) + + 23 ) FROM tab0 cor0
----
2275
2345
2561

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7613
SELECT - 22 + col2 * CAST( NULL AS DECIMAL ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7613
SELECT - 22 + col2 * CAST ( NULL AS REAL ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7614
SELECT - - col0 + col0 - - ( + col1 ) DIV col1 col2 FROM tab2 AS cor0
----
15
157
159

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7614
SELECT - - col0 + col0 - - ( + col1 ) / col1 col2 FROM tab2 AS cor0
----
15
157
159

query I rowsort
SELECT - - 18 + col0 FROM tab2 AS cor0
----
25
96
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7616
SELECT ALL + 53 * col1 - CAST( tab1.col1 AS SIGNED ) AS col1 FROM tab1
----
1352
520
676

skipif mysql # not compatible
query I rowsort label-7616
SELECT ALL + 53 * col1 - CAST ( tab1.col1 AS INTEGER ) AS col1 FROM tab1
----
1352
520
676

query I rowsort
SELECT ALL - col2 * + col2 * - 90 + tab0.col0 - tab0.col0 AS col0 FROM tab0
----
605160
90
98010

query I rowsort
SELECT ALL col1 - col0 * tab1.col2 * col1 AS col2 FROM tab1
----
-36470
-4186
-99827

query I rowsort
SELECT - col0 * 3 - - col1 * col2 FROM tab2 AS cor0
----
1300
409
816

query I rowsort
SELECT ALL - cor0.col1 + ( + 92 ) FROM tab0 AS cor0
----
-5
1
6

query I rowsort
SELECT ALL - 61 * tab1.col0 FROM tab1
----
-183
-3904
-4880

query I rowsort
SELECT DISTINCT + + 23 AS col0 FROM tab1, tab1 AS cor0
----
23

query I rowsort
SELECT col1 * ( col1 ) + col1 AS col2 FROM tab0 AS cor0
----
7482
8372
9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * 91 col0 FROM tab0 AS cor0
----
7826
8281
8827

skipif mysql # not compatible
query I rowsort
SELECT ALL + cor0.col1 + + CAST ( col0 AS REAL ) AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT col1 * - 79 FROM tab2 AS cor0
----
-1343
-2449
-4661

query I rowsort
SELECT - - col0 + - ( + ( cor0.col2 ) ) * col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT + col1 + - col0 * + 69 FROM tab2 cor0
----
-452
-5323
-5434

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + ( - col2 ) col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7630
SELECT DISTINCT col0 DIV 91 AS col2 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7630
SELECT DISTINCT col0 / 91 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - + col1 + - 36 * - col0 AS col2 FROM tab0 AS cor0
----
1163
3113
778

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col0 col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT col1 * 45 AS col1 FROM tab1 AS cor0
----
1170
450
585

query I rowsort
SELECT ALL cor0.col0 * - 48 FROM tab2 AS cor0
----
-336
-3744
-3792

query I rowsort
SELECT ALL col2 * + 78 AS col2 FROM tab1 AS cor0
----
4212
4446
7488

onlyif mysql # use DIV operator for integer division
query I rowsort label-7636
SELECT DISTINCT + - col0 + col1 DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
-21
-33
-88

skipif mysql # not compatible
query I rowsort label-7636
SELECT DISTINCT + - col0 + col1 / cor0.col0 AS col2 FROM tab0 AS cor0
----
-21
-33
-88

query I rowsort
SELECT DISTINCT col1 - 76 AS col2 FROM tab0 AS cor0
----
10
15
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7638
SELECT + col2 + CAST( 33 AS SIGNED ) * col1 * col0 FROM tab2 AS cor0
----
151892
44357
7188

skipif mysql # not compatible
query I rowsort label-7638
SELECT + col2 + CAST ( 33 AS INTEGER ) * col1 * col0 FROM tab2 AS cor0
----
151892
44357
7188

onlyif mysql # use DIV operator for integer division
query I rowsort label-7639
SELECT DISTINCT - + col1 DIV - col1 + + col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-7639
SELECT DISTINCT - + col1 / - col1 + + col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT - - cor0.col1 + + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL + 62 * - col2 AS col2 FROM tab1
----
-3348
-3534
-5952

query I rowsort
SELECT + ( col2 ) + + col2 * col0 AS col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT - 72 * - 68 FROM tab0 AS cor0
----
4896
4896
4896

query I rowsort
SELECT ALL + - col2 * cor0.col1 + col2 * 74 * - col2 FROM tab1 AS cor0
----
-217188
-240996
-683232

query I rowsort
SELECT DISTINCT 58 + - 42 AS col2 FROM tab0 AS cor0
----
16

query I rowsort
SELECT - - 61 * col2 AS col1 FROM tab2 AS cor0
----
1586
1647
2318

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7647
SELECT ALL col0 + - col0 * - CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7647
SELECT ALL col0 + - col0 * - CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * col2 + ( + cor0.col2 ) * cor0.col0 AS col2 FROM tab2 AS cor0
----
2704
4446
918

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7649
SELECT - ( col2 ) / + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7649
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-7650
SELECT ALL + ( cor0.col2 ) / - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7650
SELECT ALL + ( cor0.col2 ) / - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7651
SELECT + col2 + + col2 DIV 94 FROM tab1 AS cor0
----
54
57
97

skipif mysql # not compatible
query I rowsort label-7651
SELECT + col2 + + col2 / 94 FROM tab1 AS cor0
----
54
57
97

query I rowsort
SELECT ( - 30 * col0 ) FROM tab2
----
-210
-2340
-2370

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7653
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7653
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + 55 FROM tab2, tab0 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT 7 AS col1 FROM tab1 cor0
----
7
7
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7656
SELECT ALL - col0 DIV - 93 - - col0 col1 FROM tab0 cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7656
SELECT ALL - col0 / - 93 - - col0 col1 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + - col1 * - col1 + col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT + col2 * + 68 - col2 * 67 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL col2 * + 97 + col0 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
16992
5400
9177

onlyif mysql # use DIV operator for integer division
query I rowsort label-7660
SELECT + 31 DIV col1 + + col2 * - ( - ( - col2 ) ) * - cor0.col0 - + col1 * col0 AS col0 FROM tab2 cor0
----
112734
48126
4887

skipif mysql # not compatible
query I rowsort label-7660
SELECT + 31 / col1 + + col2 * - ( - ( - col2 ) ) * - cor0.col0 - + col1 * col0 AS col0 FROM tab2 cor0
----
112734
48126
4887

query I rowsort
SELECT + 62 * - 60 + + col0 FROM tab2 AS cor0
----
-3641
-3642
-3713

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7662
SELECT DISTINCT + CAST( NULL AS DECIMAL ) * col1 + col2 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7662
SELECT DISTINCT + CAST ( NULL AS REAL ) * col1 + col2 AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7663
SELECT 10 * col2 DIV cor0.col0 + ( + col0 ) AS col0 FROM tab0 AS cor0
----
35
37
98

skipif mysql # not compatible
query I rowsort label-7663
SELECT 10 * col2 / cor0.col0 + ( + col0 ) AS col0 FROM tab0 AS cor0
----
35
37
98

query I rowsort
SELECT DISTINCT - col2 + 70 FROM tab2 AS cor0
----
32
43
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + ( 26 ) col0 FROM tab0
----
112
117
123

query I rowsort
SELECT + 31 * - col2 - col1 AS col1 FROM tab0 AS cor0
----
-1109
-128
-2633

query I rowsort
SELECT tab0.col2 + col1 * + 16 - col1 * - col1 FROM tab0
----
10962
8805
9819

query I rowsort
SELECT DISTINCT col0 * - ( col0 ) - col0 FROM tab2
----
-56
-6162
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-7669
SELECT ( - col2 ) + col2 DIV col0 + 78 FROM tab1
----
-17
21
42

skipif mysql # not compatible
query I rowsort label-7669
SELECT ( - col2 ) + col2 / col0 + 78 FROM tab1
----
-17
21
42

query I rowsort
SELECT DISTINCT - 87 + + 60 AS col2 FROM tab1 cor0
----
-27

query I rowsort
SELECT - 50 - col0 * - col2 AS col1 FROM tab2 AS cor0
----
139
1978
2952

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col0 * - col1 col2 FROM tab0 AS cor0
----
-2088
-3430
-8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7673
SELECT ALL - CAST( + col1 AS SIGNED ) + col0 * + col1 - - 81 FROM tab1 AS cor0
----
1108
133
711

skipif mysql # not compatible
query I rowsort label-7673
SELECT ALL - CAST ( + col1 AS INTEGER ) + col0 * + col1 - - 81 FROM tab1 AS cor0
----
1108
133
711

query I rowsort
SELECT - col1 * + col1 - - ( col0 ) FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT col0 * + col0 * col1 AS col2 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT + col1 + - ( 91 ) * + col2 AS col0 FROM tab0 AS cor0
----
-2917
-7371
6

query I rowsort
SELECT tab1.col0 - - tab1.col2 AS col1 FROM tab1
----
121
176
57

query I rowsort
SELECT + col0 * 55 FROM tab2 AS cor0
----
385
4290
4345

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7679
SELECT ALL - col2 * CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7679
SELECT ALL - col2 * CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 10 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
10

query I rowsort
SELECT ALL + + col0 * col0 + - col1 AS col1 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT DISTINCT + + col1 * + 72 - + col2 AS col0 FROM tab2 AS cor0
----
1186
2205
4222

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - ( - col1 ) col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL col1 + 42 AS col1 FROM tab0 AS cor0
----
128
133
139

query I rowsort
SELECT ALL + col2 * + col2 * + 50 FROM tab2
----
33800
36450
72200

query I rowsort
SELECT DISTINCT + col2 * ( + col1 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - col0 + ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - col0 * + col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - col1 * 85 * col2 AS col0 FROM tab2 AS cor0
----
-130390
-54910
-71145

query I rowsort
SELECT DISTINCT - 48 FROM tab2, tab2 AS cor0
----
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col0 * col1 col0 FROM tab2 AS cor0
----
22831
271518
6727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * - cor0.col2 + col0 * col0 col1 FROM tab1 AS cor0
----
-2816
-2907
847

query I rowsort
SELECT + 71 + col2 * col0 AS col2 FROM tab0 cor0
----
106
7369
863

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 50 * - col0 + 20 col2 FROM tab0 AS cor0
----
-1180
-1730
-4430

query I rowsort
SELECT ALL - + cor0.col0 + col2 AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - cor0.col0 * + ( col0 ) FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT - col0 * - col2 AS col0 FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-7698
SELECT ALL 83 DIV col2 FROM tab0
----
1
2
83

skipif mysql # not compatible
query I rowsort label-7698
SELECT ALL 83 / col2 FROM tab0
----
1
2
83

query I rowsort
SELECT - tab1.col1 * + col0 * col0 FROM tab1
----
-234
-40960
-83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-7700
SELECT 22 + + col0 DIV ( 18 ) FROM tab2
----
22
26
26

skipif mysql # not compatible
query I rowsort label-7700
SELECT 22 + + col0 / ( 18 ) FROM tab2
----
22
26
26

query I rowsort
SELECT ALL + tab0.col2 * tab0.col0 AS col1 FROM tab0, tab2, tab1 cor0
----
27 values hashing to 421c686606be6ea267ac0dc7521bf659

query I rowsort
SELECT - 42 * + col2 AS col1 FROM tab1
----
-2268
-2394
-4032

query I rowsort
SELECT ALL - 34 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 5b88331e40da4796cc4826c442aa45f7

query I rowsort
SELECT + tab1.col1 + - col2 * + tab1.col0 * + col2 AS col1 FROM tab1
----
-207926
-737267
-8722

query I rowsort
SELECT + + 1 - col1 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT + - col2 * - col2 * ( - 83 ) FROM tab1 AS cor0
----
-242028
-269667
-764928

query I rowsort
SELECT + col2 * col0 + col1 * col1 AS col2 FROM tab1 AS cor0
----
3748
7849
838

onlyif mysql # use DIV operator for integer division
query I rowsort label-7708
SELECT - - col2 DIV col1 + 33 FROM tab0 AS cor0
----
33
33
33

skipif mysql # not compatible
query I rowsort label-7708
SELECT - - col2 / col1 + 33 FROM tab0 AS cor0
----
33
33
33

query I rowsort
SELECT ALL col0 * ( 71 * + col2 ) + - col0 * cor0.col1 AS col1 FROM tab1 AS cor0
----
11424
258368
544240

query I rowsort
SELECT DISTINCT - cor0.col0 * - 24 + col1 FROM tab1 AS cor0
----
1546
1933
98

query I rowsort
SELECT + cor0.col0 * + 55 + - col1 * + col0 AS col1 FROM tab1 AS cor0
----
2880
3360
87

query I rowsort
SELECT col0 + ( 32 ) FROM tab0 AS cor0
----
121
56
67

query I rowsort
SELECT 15 * col0 * + 14 FROM tab0
----
18690
5040
7350

query I rowsort
SELECT - col2 * - col2 * 30 FROM tab1
----
276480
87480
97470

query I rowsort
SELECT col2 * + col0 * - col1 AS col0 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT - ( tab1.col0 + - 44 ) AS col2 FROM tab1
----
-20
-36
41

query I rowsort
SELECT ( col0 ) * col2 FROM tab0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * tab1.col0 col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT col2 - col2 * - col2 FROM tab1
----
2970
3306
9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-7720
SELECT - col2 + col0 DIV col1 AS col2 FROM tab1
----
-51
-54
-90

skipif mysql # not compatible
query I rowsort label-7720
SELECT - col2 + col0 / col1 AS col2 FROM tab1
----
-51
-54
-90

query I rowsort
SELECT DISTINCT - col0 + + col0 * col1 AS col0 FROM tab1
----
576
75
960

query I rowsort
SELECT col2 + col2 * + col0 FROM tab0
----
36
7380
825

query III rowsort
SELECT ALL * FROM tab1 WHERE ( col0 ) IN ( - col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7724
SELECT tab2.col1 DIV col0 AS col0 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-7724
SELECT tab2.col1 / col0 AS col0 FROM tab2
----
0
0
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-7725
SELECT DISTINCT + col1 + col1 DIV + col0 AS col2 FROM tab1
----
10
13
34

skipif mysql # not compatible
query I rowsort label-7725
SELECT DISTINCT + col1 + col1 / + col0 AS col2 FROM tab1
----
10
13
34

query I rowsort
SELECT + tab0.col2 + - tab0.col1 AS col0 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT + tab2.col1 * tab2.col2 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT col2 - col0 * - col1 FROM tab2
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-7729
SELECT DISTINCT + col0 * col2 + + col0 DIV col1 FROM tab2
----
189
2029
3006

skipif mysql # not compatible
query I rowsort label-7729
SELECT DISTINCT + col0 * col2 + + col0 / col1 FROM tab2
----
189
2029
3006

query I rowsort
SELECT ALL tab0.col1 * - tab0.col2 + - col2 FROM tab0
----
-2871
-7544
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7731
SELECT + col1 DIV col0 + col0 AS col0 FROM tab0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-7731
SELECT + col1 / col0 + col0 AS col0 FROM tab0
----
27
37
90

query I rowsort
SELECT + col2 * col2 + - tab2.col0 AS col0 FROM tab2
----
1365
598
722

onlyif mysql # use DIV operator for integer division
query I rowsort label-7733
SELECT - col1 DIV + col1 + col1 AS col1 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-7733
SELECT - col1 / + col1 + col1 AS col1 FROM tab1
----
12
25
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7734
SELECT tab1.col2 DIV - col0 + col0 FROM tab1
----
-15
64
79

skipif mysql # not compatible
query I rowsort label-7734
SELECT tab1.col2 / - col0 + col0 FROM tab1
----
-15
64
79

query I rowsort
SELECT ALL col1 * - tab1.col0 + + col2 AS col1 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT ALL col0 * col0 + - col1 * + tab2.col2 FROM tab2
----
-788
4550
5595

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL < - col1
----

query I rowsort
SELECT DISTINCT col1 * col2 + col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT DISTINCT + + 44 FROM tab1 AS cor0
----
44

query I rowsort
SELECT ALL - cor0.col0 * - col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-7741
SELECT DISTINCT ( col2 ) DIV - 69 AS col0 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7741
SELECT DISTINCT ( col2 ) / - 69 AS col0 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT ALL + ( + col2 * + col0 ) FROM tab1
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7743
SELECT CAST( - col2 AS SIGNED ) * col0 + 40 FROM tab2
----
-149
-1988
-2962

skipif mysql # not compatible
query I rowsort label-7743
SELECT CAST ( - col2 AS INTEGER ) * col0 + 40 FROM tab2
----
-149
-1988
-2962

query I rowsort
SELECT DISTINCT 80 AS col0 FROM tab0, tab1 cor0
----
80

query I rowsort
SELECT col1 + - col0 + col2 FROM tab0
----
63
84
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-7746
SELECT DISTINCT col2 - + col2 DIV col2 FROM tab1
----
53
56
95

skipif mysql # not compatible
query I rowsort label-7746
SELECT DISTINCT col2 - + col2 / col2 FROM tab1
----
53
56
95

query I rowsort
SELECT DISTINCT + col2 - + col2 * 42 * + 92 FROM tab2 cor0
----
-100438
-104301
-146794

query I rowsort
SELECT DISTINCT + + ( - col0 ) * 69 * + col2 - - col1 AS col0 FROM tab0 AS cor0
----
-2318
-503471
-54562

query I rowsort
SELECT + col0 + - tab1.col2 + + ( - col1 + + col2 ) FROM tab1
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-7750
SELECT + 30 DIV col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7750
SELECT + 30 / col1 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT + col1 * + col0 + + ( col2 ) AS col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT col1 + - 28 + + col0 FROM tab1 AS cor0
----
1
46
65

query I rowsort
SELECT + col2 + 90 + - 94 FROM tab1 AS cor0
----
50
53
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-7754
SELECT + ( - col2 ) DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7754
SELECT + ( - col2 ) / cor0.col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + ( + 99 ) * + col1 * + col2 + - col0 FROM tab2 AS cor0
----
151788
63875
82856

query I rowsort
SELECT ALL + col1 + col1 + - col2 * - 98 FROM tab1 AS cor0
----
5344
5606
9434

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7757
SELECT DISTINCT ( col1 ) + cor0.col2 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7757
SELECT DISTINCT ( col1 ) + cor0.col2 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 49 + + col2 col0 FROM tab1 cor0
----
103
106
145

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 + col1 col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - - 74 * col0 + + cor0.col2 FROM tab0 cor0
----
1809
2591
6668

query I rowsort
SELECT col2 + - col2 * col2 AS col2 FROM tab0 AS cor0
----
-1056
-6642
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7762
SELECT ALL 18 + col2 DIV + col2 FROM tab1 AS cor0
----
19
19
19

skipif mysql # not compatible
query I rowsort label-7762
SELECT ALL 18 + col2 / + col2 FROM tab1 AS cor0
----
19
19
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-7763
SELECT DISTINCT + col1 + col1 DIV + cor0.col2 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-7763
SELECT DISTINCT + col1 + col1 / + cor0.col2 FROM tab0 AS cor0
----
194
88
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 + col2 col0 FROM tab1 AS cor0
----
107
110
149

query I rowsort
SELECT ALL + 99 + col0 * col1 FROM tab0 AS cor0
----
2163
3494
8198

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 98 + col1 col1 FROM tab0 AS cor0
----
184
189
195

query I rowsort
SELECT ALL + ( + 54 ) FROM tab1
----
54
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 - - col0 * col1 col2 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-7769
SELECT ALL - 25 DIV col1 - + col0 AS col1 FROM tab1 AS cor0
----
-3
-66
-81

skipif mysql # not compatible
query I rowsort label-7769
SELECT ALL - 25 / col1 - + col0 AS col1 FROM tab1 AS cor0
----
-3
-66
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-7770
SELECT DISTINCT 75 + - col0 DIV - col1 FROM tab2 AS cor0
----
75
76
79

skipif mysql # not compatible
query I rowsort label-7770
SELECT DISTINCT 75 + - col0 / - col1 FROM tab2 AS cor0
----
75
76
79

query I rowsort
SELECT + - cor0.col0 * col0 + col1 FROM tab2 cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col0 AS col1 FROM tab2, tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT 96 * col1 AS col2 FROM tab0
----
8256
8736
9312

query I rowsort
SELECT ( col2 ) + col1 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT col2 + tab0.col2 * - col2 AS col0 FROM tab0
----
-1056
-6642
0

query I rowsort
SELECT DISTINCT - 3 + 71 AS col0 FROM tab1 AS cor0
----
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 52 + col2 * - cor0.col0 col2 FROM tab2 AS cor0
----
-2080
-241
-3054

query I rowsort
SELECT + + 60 * + 51 + + col0 AS col0 FROM tab0 AS cor0
----
3084
3095
3149

onlyif mysql # use DIV operator for integer division
query I rowsort label-7779
SELECT ALL col0 DIV col0 + - col1 col1 FROM tab0 cor0
----
-85
-90
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7779
SELECT ALL col0 / col0 + - col1 col1 FROM tab0 cor0
----
-85
-90
-96

query I rowsort
SELECT ALL - col0 * tab2.col2 + + 78 FROM tab2
----
-111
-1950
-2924

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 9345325155d9f4d7dc4986690c631cb9

query I rowsort
SELECT + col2 * + 21 + - col1 * tab2.col2 + + col1 * tab2.col1 FROM tab2
----
2493
441
691

query I rowsort
SELECT col2 - - ( + col1 + - col2 ) AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT - ( + 97 ) FROM tab1
----
-97
-97
-97

query I rowsort
SELECT + tab0.col1 + col0 * + col0 FROM tab0
----
1322
662
8012

query I rowsort
SELECT col2 - 23 * + col1 AS col0 FROM tab2
----
-1331
-353
-686

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7787
SELECT DISTINCT CAST( NULL AS SIGNED ) + - cor0.col0 * cor0.col1 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7787
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - cor0.col0 * cor0.col1 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - - ( cor0.col0 ) + col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL + + col2 * + 81 + + col2 * col2 FROM tab0 AS cor0
----
13366
3762
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + tab1.col2 + + tab1.col0 * - col1 col1 FROM tab1
----
3008
6640
84

query I rowsort
SELECT DISTINCT + + col2 + - col1 * + col0 * col0 FROM tab0 AS cor0
----
-118824
-49503
-720729

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL IN ( col0 + - col0 )
----

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2, tab0 AS cor0 CROSS JOIN tab1 WHERE NOT NULL > ( NULL )
----

query I rowsort
SELECT + col0 * col0 * col1 FROM tab1 WHERE NULL NOT BETWEEN col2 AND NULL
----

query I rowsort
SELECT ALL + col0 FROM tab2 WHERE ( col0 * col1 ) <> ( col2 )
----
7
78
79

query I rowsort
SELECT tab2.col2 - col0 FROM tab2
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-7797
SELECT tab1.col2 DIV col0 + + col2 * col0 + + col0 AS col0 FROM tab1
----
183
3712
7761

skipif mysql # not compatible
query I rowsort label-7797
SELECT tab1.col2 / col0 + + col2 * col0 + + col0 AS col0 FROM tab1
----
183
3712
7761

query I rowsort
SELECT DISTINCT tab0.col0 + tab0.col0 * + col1 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT + col0 + + tab0.col2 + col1 * + col0 FROM tab0
----
2121
3431
8270

query I rowsort
SELECT ALL tab1.col0 * + col2 + + col1 AS col0 FROM tab1
----
188
3658
7693

query I rowsort
SELECT DISTINCT - col1 + col2 + col0 AS col2 FROM tab2
----
100
3
45

query I rowsort
SELECT DISTINCT + col2 + + col2 * tab0.col2 + - col1 AS col2 FROM tab0
----
-95
1036
6715

query I rowsort
SELECT DISTINCT col1 + - col0 + + col2 AS col2 FROM tab0
----
63
84
95

query I rowsort
SELECT DISTINCT col0 + col2 * col2 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT col1 * - col0 + + col2 * cor0.col2 + col0 FROM tab2 cor0
----
-3848
180
519

query I rowsort
SELECT ALL + + cor0.col0 * cor0.col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL cor0.col2 - - col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - col1 + - cor0.col1 * - col2 * - col2 FROM tab2 AS cor0
----
-22630
-24565
-39943

query I rowsort
SELECT col2 + - col1 * + cor0.col1 + + col0 * + col2 AS col2 FROM tab2 AS cor0
----
-1427
-745
2751

query I rowsort
SELECT - - col1 * - col0 + + col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL - cor0.col1 * col1 FROM tab1 cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + cor0.col2 * - col0 col2 FROM tab2 cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT + + col1 * col1 + - cor0.col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT col0 * - col1 + col2 * col0 AS col0 FROM tab1 AS cor0
----
3008
6640
84

query I rowsort
SELECT ALL + cor0.col2 * col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT col1 * col0 + col0 FROM tab0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-7817
SELECT ALL - col1 * - col2 DIV - col2 + col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7817
SELECT ALL - col1 * - col2 / - col2 + col1 FROM tab1
----
0
0
0

query IIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 WHERE NULL >= NULL
----

query I rowsort
SELECT - + col0 * + col0 + + cor0.col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT + + 79 * + col1 + col0 AS col0 FROM tab1 AS cor0
----
1107
2057
854

query I rowsort
SELECT DISTINCT + + cor1.col2 FROM tab2 cor0 CROSS JOIN tab0 cor1
----
1
33
82

query I rowsort
SELECT DISTINCT ( - 52 ) AS col0 FROM tab0, tab1 AS cor0
----
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-7823
SELECT ALL + col2 DIV + 27 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7823
SELECT ALL + col2 / + 27 FROM tab2
----
0
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7824
SELECT ALL - col2 - col0 DIV col2 FROM tab0
----
-33
-36
-83

skipif mysql # not compatible
query I rowsort label-7824
SELECT ALL - col2 - col0 / col2 FROM tab0
----
-33
-36
-83

query I rowsort
SELECT + 51 + 45 AS col0 FROM tab0 AS cor0
----
96
96
96

query I rowsort
SELECT - + col0 + - cor0.col0 FROM tab1 cor0
----
-128
-160
-6

query I rowsort
SELECT ALL - col0 + col2 * + cor0.col2 * col2 FROM tab0 AS cor0
----
-34
35913
551279

query I rowsort
SELECT col1 + - cor0.col0 - - col2 AS col1 FROM tab1 AS cor0
----
29
3
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7829
SELECT CAST( NULL AS SIGNED ) * + ( + col1 ) / + 10 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7829
SELECT CAST ( NULL AS INTEGER ) * + ( + col1 ) / + 10 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 60 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

query I rowsort
SELECT - 63 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to fc0b533c2773a0a802e1fc8317dcebf2

query I rowsort
SELECT - - 59 + + col0 AS col0 FROM tab1 AS cor0
----
123
139
62

query I rowsort
SELECT DISTINCT 9 FROM tab1, tab2 AS cor0, tab1 cor1
----
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7834
SELECT - + col0 + col2 * - CAST( - 8 + - col0 AS SIGNED ) AS col0 FROM tab0 cor0
----
1032
7865
8

skipif mysql # not compatible
query I rowsort label-7834
SELECT - + col0 + col2 * - CAST ( - 8 + - col0 AS INTEGER ) AS col0 FROM tab0 cor0
----
1032
7865
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7835
SELECT + 38 + col0 * CAST( col2 AS SIGNED ) col2 FROM tab1 cor0
----
200
3686
7718

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7835
SELECT + 38 + col0 * CAST ( col2 AS INTEGER ) col2 FROM tab1 cor0
----
200
3686
7718

query I rowsort
SELECT + col1 + cor0.col1 AS col2 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT + col0 * - 55 FROM tab2 AS cor0
----
-385
-4290
-4345

query I rowsort
SELECT + cor0.col0 * 17 FROM tab0 AS cor0
----
1513
408
595

query I rowsort
SELECT - col2 * col1 AS col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL 97 * - col0 AS col1 FROM tab2
----
-679
-7566
-7663

query I rowsort
SELECT ALL - col2 + ( col2 ) * + col1 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT col0 * - 64 AS col1 FROM tab2 AS cor0
----
-448
-4992
-5056

query I rowsort
SELECT ALL - col2 * - col0 + - 61 FROM tab1 AS cor0
----
101
3587
7619

query I rowsort
SELECT DISTINCT 92 AS col0 FROM tab1
----
92

query I rowsort
SELECT 29 * - col1 + col2 FROM tab2
----
-1685
-455
-872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + ( - 44 ) col2 FROM tab1 cor0
----
-54
-57
-70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7847
SELECT ALL - col1 * - CAST( NULL AS SIGNED ) + - col0 + + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7847
SELECT ALL - col1 * - CAST ( NULL AS INTEGER ) + - col0 + + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 * col2 * col2 + col1 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
113430
4266
51194

query I rowsort
SELECT col1 * - ( + col0 * col1 ) + 3 * + 62 FROM tab0
----
-177318
-329129
-736823

query I rowsort
SELECT DISTINCT - col0 * col2 + + col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT + col2 + + ( ( + col0 ) ) * + 34 FROM tab1 AS cor0
----
156
2233
2816

query I rowsort
SELECT ALL - + cor0.col2 + - 78 FROM tab1 AS cor0
----
-132
-135
-174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col0 + 7 col0 FROM tab1 AS cor0
----
16
4103
6407

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 74 col2 FROM tab1 cor0
----
-6
10
71

query I rowsort
SELECT DISTINCT col0 + 30 * col2 FROM tab1 AS cor0
----
1623
1774
2960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 + 94 col2 FROM tab2 AS cor0
----
35
63
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-7857
SELECT col1 + col2 DIV col1 FROM tab1 AS cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-7857
SELECT col1 + col2 / col1 FROM tab1 AS cor0
----
15
20
28

query I rowsort
SELECT DISTINCT + + 34 * 90 FROM tab2 AS cor0
----
3060

query I rowsort
SELECT ALL + 3 * col0 + col2 FROM tab1 AS cor0
----
249
336
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-7860
SELECT ( + col1 ) DIV cor0.col0 AS col1 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-7860
SELECT ( + col1 ) / cor0.col0 AS col1 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT + col2 * + col1 * 45 - col1 AS col0 FROM tab0
----
127624
335699
4268

onlyif mysql # use DIV operator for integer division
query I rowsort label-7862
SELECT DISTINCT col2 DIV - 13 AS col0 FROM tab2
----
-2

skipif mysql # not compatible
query I rowsort label-7862
SELECT DISTINCT col2 / - 13 AS col0 FROM tab2
----
-2

query I rowsort
SELECT col2 - col1 * + col2 FROM tab2
----
-1508
-608
-810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col2 * 95 col1 FROM tab2
----
-2548
-2572
-3689

query I rowsort
SELECT ALL - ( - col1 ) - cor0.col2 * + col1 FROM tab2 cor0
----
-1475
-629
-806

query I rowsort
SELECT ALL - ( col1 ) - ( 15 ) * col2 FROM tab2 AS cor0
----
-436
-449
-587

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 + col1 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
-10234
-15743
-9506

query I rowsort
SELECT DISTINCT + + ( - col1 ) * + 75 * ( col1 + cor0.col1 ) FROM tab1 AS cor0
----
-101400
-15000
-25350

query I rowsort
SELECT - cor0.col2 * + col1 + - col0 * 41 FROM tab1 AS cor0
----
-1527
-3194
-4528

query I rowsort
SELECT DISTINCT 46 + col1 AS col1 FROM tab0 cor0
----
132
137
143

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7871
SELECT DISTINCT - 83 + + col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7871
SELECT DISTINCT - 83 + + col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - 31 + - col0 FROM tab2 AS cor0
----
-109
-110
-38

query I rowsort
SELECT ALL + 7 * + col2 - + cor0.col0 AS col0 FROM tab2 AS cor0
----
104
182
187

query I rowsort
SELECT ALL - cor0.col1 + col2 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 32 - - ( col0 ) col2 FROM tab0
----
121
56
67

query I rowsort
SELECT DISTINCT col2 * + 93 AS col0 FROM tab2
----
2418
2511
3534

query I rowsort
SELECT - tab0.col1 * + 2 FROM tab0
----
-172
-182
-194

query I rowsort
SELECT + 64 * tab2.col1 - tab2.col1 AS col1 FROM tab2
----
1071
1953
3717

query I rowsort
SELECT - - cor0.col1 AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 19 col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT ALL col2 * - col1 + - tab1.col2 FROM tab1
----
-1344
-1458
-627

onlyif mysql # use DIV operator for integer division
query I rowsort label-7882
SELECT + col0 DIV - col2 + ( col1 ) FROM tab1 AS cor0
----
13
26
9

skipif mysql # not compatible
query I rowsort label-7882
SELECT + col0 / - col2 + ( col1 ) FROM tab1 AS cor0
----
13
26
9

query I rowsort
SELECT 23 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT DISTINCT col0 * 32 AS col2 FROM tab2
----
224
2496
2528

query I rowsort
SELECT - ( + ( - col2 ) + - col1 ) FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * 99 col1 FROM tab0 AS cor0
----
8514
9009
9603

query I rowsort
SELECT - + 25 AS col0 FROM tab0 AS cor0
----
-25
-25
-25

onlyif mysql # use DIV operator for integer division
query I rowsort label-7888
SELECT ALL + tab0.col1 DIV - tab0.col2 AS col1 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-7888
SELECT ALL + tab0.col1 / - tab0.col2 AS col1 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT - + ( + col0 ) AS col2 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT + col2 + - col1 * col1 * col2 FROM tab2 AS cor0
----
-10944
-25920
-90480

query I rowsort
SELECT DISTINCT - ( - col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL + 71 * - col2 AS col1 FROM tab0 AS cor0
----
-2343
-5822
-71

query I rowsort
SELECT ALL + - 70 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 35707a5d99c98b2657c084a50ff1b073

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 24 col2 FROM tab1, tab0 AS cor0, tab0 cor1
----
-24

query I rowsort
SELECT DISTINCT + 9 * - col1 * col2 AS col2 FROM tab1 AS cor0
----
-11232
-12636
-5130

query I rowsort
SELECT DISTINCT + cor0.col1 * 21 + - cor0.col0 FROM tab2 AS cor0
----
1161
278
644

query I rowsort
SELECT cor0.col0 - - cor0.col2 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-7898
SELECT DISTINCT - - col2 * col0 * - col2 + - col2 + + ( - 33 ) DIV + col0 AS col1 FROM tab1 AS cor0
----
-207993
-737376
-8813

skipif mysql # not compatible
query I rowsort label-7898
SELECT DISTINCT - - col2 * col0 * - col2 + - col2 + + ( - 33 ) / + col0 AS col1 FROM tab1 AS cor0
----
-207993
-737376
-8813

query I rowsort
SELECT + col1 + cor0.col2 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT col0 * 9 + + cor0.col1 AS col2 FROM tab1 AS cor0
----
53
586
733

query I rowsort
SELECT col0 * + col1 * 98 + + col1 AS col1 FROM tab0 AS cor0
----
202358
332807
793793

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7902
SELECT DISTINCT col1 * + ( - col2 ) + + col0 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-7902
SELECT DISTINCT col1 * + ( - col2 ) + + col0 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT + 60 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7904
SELECT ALL - - cor0.col1 + CAST( NULL AS SIGNED ) * 71 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7904
SELECT ALL - - cor0.col1 + CAST ( NULL AS INTEGER ) * 71 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 + - 22 FROM tab1 AS cor0
----
-19
42
58

query I rowsort
SELECT + - col2 * 57 - col2 AS col1 FROM tab2 AS cor0
----
-1508
-1566
-2204

query I rowsort
SELECT ALL + col1 * 20 + col0 AS col0 FROM tab2 AS cor0
----
1258
419
627

query I rowsort
SELECT - col0 + col1 + col0 AS col2 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7909
SELECT + - col2 + + CAST( NULL AS SIGNED ) / col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7909
SELECT + - col2 + + CAST ( NULL AS INTEGER ) / col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col1 * - ( + 6 ) + col2 FROM tab1 AS cor0
----
117
174
210

query I rowsort
SELECT ALL - col2 + 94 FROM tab1 AS cor0
----
-2
37
40

query I rowsort
SELECT DISTINCT col2 + ( - 37 ) * - col2 AS col2 FROM tab2 AS cor0
----
1026
1444
988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7913
SELECT DISTINCT + col1 + + CAST( - col0 AS SIGNED ) + cor0.col2 FROM tab2 cor0
----
-24
51
7

skipif mysql # not compatible
query I rowsort label-7913
SELECT DISTINCT + col1 + + CAST ( - col0 AS INTEGER ) + cor0.col2 FROM tab2 cor0
----
-24
51
7

query I rowsort
SELECT ALL col0 * - col1 - 38 FROM tab2 AS cor0
----
-1381
-255
-4640

onlyif mysql # use DIV operator for integer division
query I rowsort label-7915
SELECT ALL + - col1 * - col0 + + col2 DIV + col1 FROM tab1 AS cor0
----
1047
645
80

skipif mysql # not compatible
query I rowsort label-7915
SELECT ALL + - col1 * - col0 + + col2 / + col1 FROM tab1 AS cor0
----
1047
645
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7916
SELECT - col0 * + CAST( NULL AS SIGNED ) + + col0 * col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7916
SELECT - col0 * + CAST ( NULL AS INTEGER ) + + col0 * col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + - col0 + - cor0.col2 FROM tab0 AS cor0
----
-80
29
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7918
SELECT + CAST( 45 AS SIGNED ) * col1 + + cor0.col0 + - col2 col0 FROM tab2 AS cor0
----
1375
2707
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7918
SELECT + CAST ( 45 AS INTEGER ) * col1 + + cor0.col0 + - col2 col0 FROM tab2 AS cor0
----
1375
2707
806

query I rowsort
SELECT cor1.col0 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT + 29 AS col2 FROM tab0 AS cor0
----
29

query I rowsort
SELECT 30 * + ( - col1 ) FROM tab2 AS cor0
----
-1770
-510
-930

query I rowsort
SELECT ALL - - 49 + - col1 * - col2 FROM tab2 AS cor0
----
1583
695
886

query I rowsort
SELECT cor1.col1 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT col0 + col2 * ( col0 ) + - tab1.col1 AS col1 FROM tab1
----
139
3702
7747

query I rowsort
SELECT + col2 * - col1 AS col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT + + ( 89 ) AS col1 FROM tab1 AS cor0
----
89
89
89

query I rowsort
SELECT - - col1 + + col0 AS col2 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7928
SELECT col1 DIV 10 + ( - col1 ) * ( col0 ) * col1 + col0 col1 FROM tab0
----
-177472
-329271
-736911

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7928
SELECT col1 / 10 + ( - col1 ) * ( col0 ) * col1 + col0 col1 FROM tab0
----
-177472
-329271
-736911

query I rowsort
SELECT ( 35 ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT ALL 18 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT + col2 + - 49 * 91 AS col1 FROM tab0
----
-4377
-4426
-4458

query I rowsort
SELECT + + 65 + col0 AS col0 FROM tab0 AS cor0
----
100
154
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7933
SELECT + - ( + 13 ) DIV + col2 + - 47 FROM tab1 AS cor0
----
-47
-47
-47

skipif mysql # not compatible
query I rowsort label-7933
SELECT + - ( + 13 ) / + col2 + - 47 FROM tab1 AS cor0
----
-47
-47
-47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7934
SELECT + CAST( - col1 AS SIGNED ) + - col2 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

skipif mysql # not compatible
query I rowsort label-7934
SELECT + CAST ( - col1 AS INTEGER ) + - col2 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT cor0.col2 * - tab0.col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab2 cor1
----
9 values hashing to 6e831ce95b59398818a720c8e9b6e293

query I rowsort
SELECT cor0.col0 * - col2 * 21 + cor0.col2 * + col2 FROM tab1 AS cor0
----
-152064
-486
-73359

query I rowsort
SELECT - ( - 1 ) * col2 * + 26 AS col0 FROM tab2
----
676
702
988

query I rowsort
SELECT ALL - ( + 86 ) AS col2 FROM tab2
----
-86
-86
-86

query I rowsort
SELECT - col1 + 85 AS col1 FROM tab2 cor0
----
26
54
68

query I rowsort
SELECT ALL - 45 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to 63e2b488a204f83ec8c063dafdfd4371

query I rowsort
SELECT ALL - ( col0 + + col1 ) * - 92 FROM tab1
----
2668
6808
8556

query I rowsort
SELECT DISTINCT + tab2.col1 * + col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT - 23 FROM tab2, tab0 AS cor0
----
-23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * 41 * col2 col1 FROM tab0
----
116358
305942
3977

query I rowsort
SELECT DISTINCT + - ( + col2 ) * - ( 54 ) FROM tab0 AS cor0
----
1782
4428
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 * ( + cor0.col0 ) col1 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT - ( 71 ) FROM tab2
----
-71
-71
-71

query I rowsort
SELECT DISTINCT - cor0.col1 * 65 FROM tab0, tab0 AS cor0
----
-5590
-5915
-6305

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 - - col1 * tab0.col2 col0 FROM tab0
----
2814
62
7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - tab0.col0 col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL - col2 * + 79 AS col0 FROM tab2
----
-2054
-2133
-3002

query I rowsort
SELECT 61 FROM tab0, tab1 cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT - col0 * col2 * - 42 + - col2 * - 30 + + col1 AS col0 FROM tab2 AS cor0
----
127241
86015
8779

query I rowsort
SELECT - col1 * + 11 FROM tab0 AS cor0
----
-1001
-1067
-946

query I rowsort
SELECT - col2 + - 37 + + cor0.col2 FROM tab0 AS cor0
----
-37
-37
-37

query I rowsort
SELECT ALL - 11 AS col0 FROM tab2
----
-11
-11
-11

query I rowsort
SELECT - + 97 + - col0 AS col0 FROM tab0 AS cor0
----
-121
-132
-186

query I rowsort
SELECT + 80 FROM tab2 cor0
----
80
80
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7960
SELECT col2 DIV - col0 + col2 * col2 + col0 AS col2 FROM tab1
----
2901
3313
9295

skipif mysql # not compatible
query I rowsort label-7960
SELECT col2 / - col0 + col2 * col2 + col0 AS col2 FROM tab1
----
2901
3313
9295

query I rowsort
SELECT ALL + 53 + + col1 FROM tab1
----
63
66
79

query I rowsort
SELECT col1 + 2 AS col0 FROM tab0
----
88
93
99

query I rowsort
SELECT - ( - col1 ) * tab2.col1 AS col0 FROM tab2
----
289
3481
961

query I rowsort
SELECT DISTINCT - col1 + - ( col2 ) AS col1 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT ALL - cor1.col1 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT ALL - ( 10 ) FROM tab2 AS cor0
----
-10
-10
-10

onlyif mysql # use DIV operator for integer division
query I rowsort label-7967
SELECT - + ( col0 ) DIV + col2 + + col1 + 88 * - col1 AS col2 FROM tab0 AS cor0
----
-7482
-7918
-8474

skipif mysql # not compatible
query I rowsort label-7967
SELECT - + ( col0 ) / + col2 + + col1 + 88 * - col1 AS col2 FROM tab0 AS cor0
----
-7482
-7918
-8474

query I rowsort
SELECT DISTINCT - col2 * 52 AS col0 FROM tab1 AS cor0
----
-2808
-2964
-4992

query I rowsort
SELECT DISTINCT 59 * col2 FROM tab2 AS cor0
----
1534
1593
2242

onlyif mysql # use DIV operator for integer division
query I rowsort label-7970
SELECT DISTINCT + col0 DIV 94 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7970
SELECT DISTINCT + col0 / 94 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + + ( + 25 ) * + col0 FROM tab0 AS cor0
----
2225
600
875

query I rowsort
SELECT + ( 85 ) * col0 FROM tab0 AS cor0
----
2040
2975
7565

query I rowsort
SELECT - col0 * + col2 + + col0 AS col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT + + col2 * + cor0.col1 * col1 AS col2 FROM tab0 AS cor0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7975
SELECT + 68 DIV col0 FROM tab2 cor0
----
0
0
9

skipif mysql # not compatible
query I rowsort label-7975
SELECT + 68 / col0 FROM tab2 cor0
----
0
0
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 53 col2 FROM tab2 AS cor0
----
-53
-53
-53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7977
SELECT - col0 + col1 + - CAST( - col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-44
-54
49

skipif mysql # not compatible
query I rowsort label-7977
SELECT - col0 + col1 + - CAST ( - col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-44
-54
49

query I rowsort
SELECT ALL + 54 AS col2 FROM tab2 AS cor0
----
54
54
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-7979
SELECT DISTINCT + ( + col0 ) * cor0.col2 DIV - 33 + col2 col0 FROM tab0 cor0
----
-139
0
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7979
SELECT DISTINCT + ( + col0 ) * cor0.col2 / - 33 + col2 col0 FROM tab0 cor0
----
-139
0
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7980
SELECT + col1 + + cor0.col0 * + CAST( NULL AS SIGNED ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7980
SELECT + col1 + + cor0.col0 * + CAST ( NULL AS INTEGER ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - 51 * col0 AS col0 FROM tab2 AS cor0
----
-357
-3978
-4029

query I rowsort
SELECT DISTINCT ( + col2 ) + + 46 AS col0 FROM tab2 AS cor0
----
72
73
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col1 * col0 + - cor0.col1 * col0 + - col2 * col2 col2 FROM tab1 AS cor0
----
1218
32591
89584

query I rowsort
SELECT ALL 26 * - 95 FROM tab2
----
-2470
-2470
-2470

query I rowsort
SELECT ALL 44 + 44 FROM tab1
----
88
88
88

query I rowsort
SELECT DISTINCT 18 FROM tab2, tab1 AS cor0
----
18

query I rowsort
SELECT + 12 * col0 + col2 + - 18 AS col1 FROM tab2 AS cor0
----
93
944
968

query I rowsort
SELECT DISTINCT + 70 * col1 AS col1 FROM tab1 AS cor0
----
1820
700
910

query I rowsort
SELECT ALL + + col0 * + col2 * + 91 AS col0 FROM tab2 AS cor0
----
17199
184548
273182

query I rowsort
SELECT 63 + + col1 FROM tab1 AS cor0
----
73
76
89

query I rowsort
SELECT ALL + 75 * + col2 + - 77 + col1 FROM tab0 cor0
----
2484
6164
95

query I rowsort
SELECT ALL - - 29 * - col2 FROM tab1 AS cor0
----
-1566
-1653
-2784

onlyif mysql # use DIV operator for integer division
query I rowsort label-7993
SELECT - col1 DIV col0 - col1 * col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-684

skipif mysql # not compatible
query I rowsort label-7993
SELECT - col1 / col0 - col1 * col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-684

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7994
SELECT + col0 + - CAST( + col2 AS SIGNED ) FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-7994
SELECT + col0 + - CAST ( + col2 AS INTEGER ) FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + col2 - 65 AS col1 FROM tab2 AS cor0
----
-27
-38
-39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7996
SELECT DISTINCT + col0 + - CAST( NULL AS SIGNED ) * col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7996
SELECT DISTINCT + col0 + - CAST ( NULL AS INTEGER ) * col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - + cor0.col0 * ( + 60 ) * col2 + + col2 FROM tab1 cor0
----
-218823
-460704
-9666

query I rowsort
SELECT + 8 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

query I rowsort
SELECT ALL - col0 - ( + 7 ) AS col0 FROM tab0 AS cor0
----
-31
-42
-96

query I rowsort
SELECT DISTINCT - cor0.col1 * col0 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-8001
SELECT DISTINCT + + col1 * + ( cor0.col1 ) * col1 + + col2 DIV col0 FROM tab0 AS cor0
----
636057
753571
912673

skipif mysql # not compatible
query I rowsort label-8001
SELECT DISTINCT + + col1 * + ( cor0.col1 ) * col1 + + col2 / col0 FROM tab0 AS cor0
----
636057
753571
912673

query I rowsort
SELECT ALL + - col2 * 63 + + col1 AS col1 FROM tab1 AS cor0
----
-3376
-3581
-6035

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col2 * - col0 col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT - col0 + - col2 - 34 * - col1 AS col1 FROM tab1
----
219
266
827

query I rowsort
SELECT DISTINCT + col2 - tab2.col2 FROM tab2
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8006
SELECT - col0 DIV CAST( - col2 * col0 AS SIGNED ) AS col0 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8006
SELECT - col0 / CAST ( - col2 * col0 AS INTEGER ) AS col0 FROM tab0
----
0
0
1

query I rowsort
SELECT + col0 + + ( + 70 ) AS col1 FROM tab0 AS cor0
----
105
159
94

query I rowsort
SELECT ALL tab0.col2 * - col0 + + col0 FROM tab0
----
-7209
-768
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * ( col1 ) + col0 col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL col2 + col2 * 93 AS col0 FROM tab1
----
5076
5358
9024

query I rowsort
SELECT DISTINCT + tab2.col1 + col2 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT tab1.col0 + - cor0.col1 AS col1 FROM tab1, tab1 AS cor0
----
-10
-23
-7
38
51
54
67
70

query I rowsort
SELECT ALL 88 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT DISTINCT - col0 + - col2 * + 59 * + ( col0 ) FROM tab2
----
-11158
-119730
-177197

query I rowsort
SELECT ALL col1 + col2 + + col0 * 68 FROM tab1
----
284
4419
5549

query I rowsort
SELECT - + col1 + + 33 FROM tab0 AS cor0
----
-53
-58
-64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8017
SELECT DISTINCT - cor0.col0 + + CAST( NULL AS SIGNED ) / col0 + + col0 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8017
SELECT DISTINCT - cor0.col0 + + CAST ( NULL AS INTEGER ) / col0 + + col0 AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8018
SELECT ALL + + col1 * + CAST( NULL AS SIGNED ) + + col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8018
SELECT ALL + + col1 * + CAST ( NULL AS INTEGER ) + + col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * col0 * - 74 AS col2 FROM tab0 cor0
----
152736
251230
599326

query I rowsort
SELECT ALL - col1 - - col2 * + 81 * cor0.col0 FROM tab1 AS cor0
----
13096
295478
622067

query I rowsort
SELECT + col1 * - col0 + - 15 FROM tab1 AS cor0
----
-1055
-655
-93

query I rowsort
SELECT + col1 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - col1 + + 72 * cor0.col1 FROM tab2 AS cor0
----
1207
2201
4189

query I rowsort
SELECT + col1 * - 75 + 5 FROM tab0 AS cor0
----
-6445
-6820
-7270

query I rowsort
SELECT ALL col1 + + cor0.col0 * + 66 AS col2 FROM tab0 AS cor0
----
1670
2407
5965

query I rowsort
SELECT col1 + 27 * col0 AS col0 FROM tab1 AS cor0
----
107
1738
2173

onlyif mysql # use DIV operator for integer division
query I rowsort label-8027
SELECT DISTINCT + col0 DIV col1 col2 FROM tab1
----
0
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8027
SELECT DISTINCT + col0 / col1 col2 FROM tab1
----
0
6

query I rowsort
SELECT - ( col0 ) + + col1 AS col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL - - cor0.col2 * cor0.col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - - col0 * 37 FROM tab0 AS cor0
----
1295
3293
888

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8031
SELECT ALL + CAST( + col0 AS SIGNED ) + + col2 * - 90 FROM tab0 AS cor0
----
-2946
-55
-7291

skipif mysql # not compatible
query I rowsort label-8031
SELECT ALL + CAST ( + col0 AS INTEGER ) + + col2 * - 90 FROM tab0 AS cor0
----
-2946
-55
-7291

onlyif mysql # use DIV operator for integer division
query I rowsort label-8032
SELECT DISTINCT - + col1 * col2 + - col1 DIV cor0.col0 FROM tab1 AS cor0
----
-1248
-1412
-570

skipif mysql # not compatible
query I rowsort label-8032
SELECT DISTINCT - + col1 * col2 + - col1 / cor0.col0 FROM tab1 AS cor0
----
-1248
-1412
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 14 * + col1 col2 FROM tab2 cor0
----
238
434
826

query I rowsort
SELECT DISTINCT - - 34 + + col2 FROM tab2 AS cor0
----
60
61
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-8035
SELECT ALL - - col0 DIV + col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-8035
SELECT ALL - - col0 / + col2 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-8036
SELECT ( - col1 ) DIV + 80 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8036
SELECT ( - col1 ) / + 80 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8037
SELECT DISTINCT + + col0 DIV - col1 AS col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-8037
SELECT DISTINCT + + col0 / - col1 AS col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT + 17 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT ALL + + 3 + + cor0.col1 * + col0 AS col2 FROM tab2 AS cor0
----
1346
220
4605

query I rowsort
SELECT col0 + 91 FROM tab2
----
169
170
98

query I rowsort
SELECT ALL col1 - + 54 AS col2 FROM tab2
----
-23
-37
5

query I rowsort
SELECT + col2 * ( col2 ) AS col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT cor0.col0 * 46 * - 56 FROM tab0, tab2 AS cor0
----
-18032
-200928
-203504

onlyif mysql # use DIV operator for integer division
query I rowsort label-8044
SELECT - ( col2 ) DIV - col1 col2 FROM tab2 AS cor0
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8044
SELECT - ( col2 ) / - col1 col2 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT DISTINCT + col2 + + col0 * + 3 FROM tab0 AS cor0
----
105
106
349

query I rowsort
SELECT DISTINCT cor0.col1 * col1 + col0 AS col2 FROM tab0 AS cor0
----
7420
8370
9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-8047
SELECT ALL - col1 DIV - tab2.col1 AS col1 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8047
SELECT ALL - col1 / - tab2.col1 AS col1 FROM tab2
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8048
SELECT - + 57 DIV col2 col1 FROM tab1 AS cor0
----
-1
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8048
SELECT - + 57 / col2 col1 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT 43 + + col0 * + col2 AS col2 FROM tab0 AS cor0
----
7341
78
835

query I rowsort
SELECT col0 + col1 * col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + col2 + + 22 * + col1 AS col1 FROM tab2 AS cor0
----
1324
412
709

query I rowsort
SELECT col2 + col0 + + col0 * - 71 FROM tab1
----
-156
-4423
-5504

query I rowsort
SELECT col0 * 45 + - 91 FROM tab1 AS cor0
----
2789
3509
44

query I rowsort
SELECT DISTINCT + 40 * 56 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
2240

query I rowsort
SELECT cor2.col1 FROM tab1, tab0 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT DISTINCT ( 97 ) * - col1 + + 98 FROM tab0 AS cor0
----
-8244
-8729
-9311

query I rowsort
SELECT col1 * + 96 FROM tab2 cor0
----
1632
2976
5664

query I rowsort
SELECT DISTINCT col0 + - col2 + - col0 AS col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL - cor0.col0 + + 7 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 55e1b2b062991747f8570ffcf576a443

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab2 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 8bda8b9cf32f196464e0ee0b41a5162d

query I rowsort
SELECT ALL - 71 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to ac364708ef97c5cf80f126fc088b952e

query I rowsort
SELECT + col2 + col1 * - ( col0 ) AS col2 FROM tab0 cor0
----
-2031
-3394
-8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col1 col0 FROM tab2, tab0, tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * + col1 + + col2 + - 76 col0 FROM tab0 AS cor0
----
-172
-2881
-7456

query I rowsort
SELECT cor0.col1 * 30 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to b36f4072330496b856f0e767e1cd8f0e

query I rowsort
SELECT ALL + col2 * col0 + - col1 * ( 23 ) + cor0.col0 AS col1 FROM tab1 AS cor0
----
-433
3482
7461

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 * col1 * + col0 col0 FROM tab1 WHERE + col2 / - col0 + + col0 > + col0 + col1 + col0
----

query I rowsort
SELECT - col1 * tab2.col2 - - col0 AS col0 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT ALL col0 * tab1.col1 AS col1 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * tab0.col0 col0 FROM tab0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col2 + col1 col1 FROM tab1
----
188
3658
7693

query I rowsort
SELECT ALL + col1 * - col0 + col0 FROM tab2
----
-1264
-210
-4524

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT col0 * - col2 + - col1 * col2 * col1 < col1 * + col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8074
SELECT - col0 + + col2 DIV - col0 FROM tab0
----
-25
-35
-89

skipif mysql # not compatible
query I rowsort label-8074
SELECT - col0 + + col2 / - col0 FROM tab0
----
-25
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col0 col0 FROM tab0
----
110
132
180

query I rowsort
SELECT + col2 FROM tab0 WHERE NOT - col1 + + col0 / col1 + + col2 = NULL
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL NOT BETWEEN ( NULL ) AND col2 + - col2 * col2 + col1
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL > col2 * col2 - col1 * col2
----

query I rowsort
SELECT ALL col2 * - col2 + + col0 * + col0 * col1 FROM tab2
----
104653
358280
790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 * - tab2.col2 col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL + col0 FROM tab2 WHERE - col0 / col1 + col0 > + col1 + - col2 * - col0
----

query I rowsort
SELECT ALL tab1.col0 * col1 - + col1 FROM tab1
----
1027
52
630

query I rowsort
SELECT DISTINCT + col2 * col2 * col1 + col0 FROM tab2
----
22606
24627
39962

query I rowsort
SELECT tab0.col2 FROM tab0 WHERE NOT NULL < NULL
----

query I rowsort
SELECT - col0 * col0 + col1 AS col0 FROM tab0
----
-1128
-490
-7830

onlyif mysql # use DIV operator for integer division
query I rowsort label-8086
SELECT col0 DIV col2 + col2 * col0 AS col0 FROM tab0 AS cor0
----
70
7299
792

skipif mysql # not compatible
query I rowsort label-8086
SELECT col0 / col2 + col2 * col0 AS col0 FROM tab0 AS cor0
----
70
7299
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-8087
SELECT - cor0.col0 DIV - col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-8087
SELECT - cor0.col0 / - col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT col1 - col0 * col2 AS col1 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT ALL col2 * col1 * - tab2.col0 AS col0 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT col0 + + tab1.col2 AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL col1 * col1 + - tab0.col2 AS col2 FROM tab0
----
7363
8199
9408

query I rowsort
SELECT DISTINCT tab2.col1 * + col0 * col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT ALL tab0.col2 + tab0.col0 AS col2 FROM tab0
----
171
36
57

query I rowsort
SELECT - col2 + col1 * - col1 AS col0 FROM tab1
----
-157
-265
-730

query I rowsort
SELECT tab1.col2 * - col0 + col1 * col1 AS col2 FROM tab1 WHERE NOT ( NULL ) < NULL
----

query I rowsort
SELECT - col1 - - col1 * + col0 FROM tab1
----
1027
52
630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col1 + col0 col2 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT ALL + col1 * + col1 + - col1 * - col1 AS col2 FROM tab1 AS cor0
----
1352
200
338

query I rowsort
SELECT ALL - tab1.col0 * - col2 AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT + col2 * col2 * - col1 AS col1 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT - col1 * col0 + - col2 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT col1 * + col0 * col2 - col2 AS col2 FROM tab0
----
3394
664036
68079

query I rowsort
SELECT ALL - col1 * col0 - col0 FROM tab0
----
-2088
-3430
-8188

query III rowsort
SELECT * FROM tab1 WHERE col0 > col2 + col0
----

query I rowsort
SELECT tab0.col2 FROM tab0 WHERE ( col2 ) <> NULL
----

query I rowsort
SELECT col1 * - col2 + + col0 * - col2 AS col0 FROM tab2
----
-1026
-3562
-3648

query I rowsort
SELECT - col2 + col0 - tab0.col1 AS col1 FROM tab0
----
-63
-84
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-8108
SELECT DISTINCT + col2 * col1 DIV col1 + - col2 * + tab2.col2 + tab2.col1 col1 FROM tab2
----
-1389
-591
-671

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8108
SELECT DISTINCT + col2 * col1 / col1 + - col2 * + tab2.col2 + tab2.col1 col1 FROM tab2
----
-1389
-591
-671

query I rowsort
SELECT DISTINCT + col2 + col1 * - col0 + + tab0.col2 FROM tab0
----
-1998
-3393
-7935

onlyif mysql # use DIV operator for integer division
query I rowsort label-8110
SELECT DISTINCT - col0 DIV - col1 AS col1 FROM tab1
----
0
6

skipif mysql # not compatible
query I rowsort label-8110
SELECT DISTINCT - col0 / - col1 AS col1 FROM tab1
----
0
6

query I rowsort
SELECT ALL - 86 FROM tab0, tab2 cor0
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

onlyif mysql # use DIV operator for integer division
query I rowsort label-8112
SELECT DISTINCT + col1 * - col2 * - col2 + + cor0.col0 * col2 DIV col0 col2 FROM tab2 AS cor0
----
22626
24586
39910

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8112
SELECT DISTINCT + col1 * - col2 * - col2 + + cor0.col0 * col2 / col0 col2 FROM tab2 AS cor0
----
22626
24586
39910

query I rowsort
SELECT - col1 * col2 + + tab0.col1 + col0 * ( col2 ) AS col0 FROM tab0
----
-1960
-73
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8114
SELECT ALL ( 72 ) / cor0.col2 + CAST( NULL AS SIGNED ) * - 57 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8114
SELECT ALL ( 72 ) / cor0.col2 + CAST ( NULL AS INTEGER ) * - 57 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT col0 + - 81 * col0 FROM tab0 AS cor0
----
-1920
-2800
-7120

query I rowsort
SELECT DISTINCT + ( 1 ) * - col0 + col2 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT col1 + col1 * col0 * - ( + col1 ) FROM tab2 AS cor0
----
-22814
-271459
-6696

query I rowsort
SELECT - ( col0 ) + col1 AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT DISTINCT + + 85 * col0 + col2 FROM tab1 AS cor0
----
309
5497
6896

query I rowsort
SELECT DISTINCT - col1 + col0 + tab2.col0 FROM tab2
----
-17
141
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8121
SELECT ALL + col0 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8121
SELECT ALL + col0 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 cor2, tab1 AS cor3
----
3645 values hashing to 71d467ba3372dfdd21847af1687c92e7

query I rowsort
SELECT col0 + + col2 * + col1 + col1 * + col2 FROM tab1
----
1204
2576
2811

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8124
SELECT CAST( NULL AS SIGNED ) * + 64 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8124
SELECT CAST ( NULL AS INTEGER ) * + 64 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 + tab2.col0 AS col2 FROM tab2
----
-24
19
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8126
SELECT DISTINCT + CAST( NULL AS SIGNED ) + col0 * + col1 AS col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-8126
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col0 * + col1 AS col0 FROM tab2
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8127
SELECT ALL CAST( NULL AS SIGNED ) + - tab2.col0 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8127
SELECT ALL CAST ( NULL AS INTEGER ) + - tab2.col0 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * tab0.col2 + - col0 * - 34 AS col2 FROM tab0
----
-2022
-4436
1093

query I rowsort
SELECT ALL + + 82 * + cor0.col0 + + col2 AS col1 FROM tab1 AS cor0
----
300
5305
6656

query I rowsort
SELECT ( + tab2.col2 ) * col1 AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL + + ( col2 ) * col2 * col1 + + col0 * cor0.col2 FROM tab1 AS cor0
----
127488
36138
75978

query I rowsort
SELECT col1 * 37 AS col2 FROM tab2 AS cor0
----
1147
2183
629

query I rowsort
SELECT DISTINCT - col1 * - 33 AS col2 FROM tab1 AS cor0
----
330
429
858

query I rowsort
SELECT DISTINCT 8 * + col2 AS col0 FROM tab2
----
208
216
304

query I rowsort
SELECT DISTINCT + col0 * - col1 * - ( col1 ) FROM tab1 AS cor0
----
13520
2028
6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 72 col1 FROM tab0 AS cor0
----
-72
-72
-72

query I rowsort
SELECT - col2 * + tab1.col2 * col2 + - col0 * col0 FROM tab1
----
-157473
-189289
-891136

query I rowsort
SELECT ALL - col1 + col1 * - 30 AS col1 FROM tab0 AS cor0
----
-2666
-2821
-3007

query I rowsort
SELECT DISTINCT - cor0.col1 * col1 + - col1 AS col2 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT ALL + col1 - cor0.col1 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * 68 col0 FROM tab1 AS cor0
----
-3672
-3876
-6528

query I rowsort
SELECT DISTINCT + col1 * 47 * + col0 AS col0 FROM tab0 AS cor0
----
159565
380653
97008

query I rowsort
SELECT ALL cor0.col0 + 78 * + col1 AS col1 FROM tab0 AS cor0
----
6732
7187
7601

onlyif mysql # use DIV operator for integer division
query I rowsort label-8144
SELECT - - col2 DIV - 54 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8144
SELECT - - col2 / - 54 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col0 col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT ALL + col0 + + 19 * + cor0.col0 FROM tab0 AS cor0
----
1780
480
700

query I rowsort
SELECT ALL + cor0.col1 * ( + cor0.col2 * cor0.col1 + + col1 ) FROM tab1 cor0
----
16393
37180
5800

query I rowsort
SELECT - ( - col2 ) * col1 - - cor0.col2 AS col1 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8149
SELECT ALL CAST( 68 AS SIGNED ) * - col0 * - col0 AS col1 FROM tab2 AS cor0
----
3332
413712
424388

skipif mysql # not compatible
query I rowsort label-8149
SELECT ALL CAST ( 68 AS INTEGER ) * - col0 * - col0 AS col1 FROM tab2 AS cor0
----
3332
413712
424388

query I rowsort
SELECT - 54 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8151
SELECT - CAST( + 37 AS SIGNED ) AS col0 FROM tab1
----
-37
-37
-37

skipif mysql # not compatible
query I rowsort label-8151
SELECT - CAST ( + 37 AS INTEGER ) AS col0 FROM tab1
----
-37
-37
-37

query I rowsort
SELECT - 39 * + col1 FROM tab0
----
-3354
-3549
-3783

query I rowsort
SELECT DISTINCT + ( - col2 ) * col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + - 37 + - 17 * col0 AS col0 FROM tab0 AS cor0
----
-1550
-445
-632

query I rowsort
SELECT DISTINCT + 93 + - 17 AS col1 FROM tab2 AS cor0
----
76

query I rowsort
SELECT - col1 * - col2 - col2 * col2 FROM tab1 AS cor0
----
-1512
-2679
-7968

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 cor2
----
972 values hashing to 1e9d01970ae508486ddabec967bb176c

query I rowsort
SELECT - col1 * - ( + col0 ) + col0 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8159
SELECT ALL - 36 + - tab0.col2 * col1 DIV col2 + col2 * - col1 FROM tab0
----
-230
-2960
-7589

skipif mysql # not compatible
query I rowsort label-8159
SELECT ALL - 36 + - tab0.col2 * col1 / col2 + col2 * - col1 FROM tab0
----
-230
-2960
-7589

query I rowsort
SELECT - 96 * - col2 AS col2 FROM tab1 AS cor0
----
5184
5472
9216

query I rowsort
SELECT + 6 + col2 * + col1 AS col2 FROM tab0 cor0
----
103
2844
7468

query I rowsort
SELECT - 99 * + col1 FROM tab2
----
-1683
-3069
-5841

query I rowsort
SELECT + ( - col1 ) + + col2 * col2 AS col2 FROM tab2
----
1427
617
698

query I rowsort
SELECT 98 * + col0 AS col0 FROM tab1
----
294
6272
7840

query I rowsort
SELECT DISTINCT - col1 + + col0 * + col1 AS col2 FROM tab0
----
1978
3298
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 40 + + 8 col2 FROM tab0
----
48

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8167
SELECT ALL - col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8167
SELECT ALL - col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + ( - 99 ) FROM tab0 AS cor0
----
-10
-64
-75

query I rowsort
SELECT ALL + cor0.col2 * 7 + - col2 + col2 AS col0 FROM tab0 AS cor0
----
231
574
7

query I rowsort
SELECT DISTINCT + - col2 * + col1 AS col0 FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-8171
SELECT ALL - col0 * ( - col2 ) DIV col1 + cor0.col2 AS col0 FROM tab0 AS cor0
----
1
162
42

skipif mysql # not compatible
query I rowsort label-8171
SELECT ALL - col0 * ( - col2 ) / col1 + cor0.col2 AS col0 FROM tab0 AS cor0
----
1
162
42

query I rowsort
SELECT - tab1.col1 - col1 * tab1.col0 * + col2 FROM tab1
----
-36490
-4238
-99853

query I rowsort
SELECT 83 + + cor0.col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 4ae3f7736d82f4f1fa3bd0b9dfebbe05

query I rowsort
SELECT + tab2.col0 * col0 + tab2.col2 * - col1 FROM tab2
----
-788
4550
5595

query I rowsort
SELECT col1 * col1 * col1 + col2 FROM tab1
----
1057
17630
2293

query I rowsort
SELECT DISTINCT 3 AS col0 FROM tab2
----
3

query I rowsort
SELECT + col0 + 19 * - 55 AS col1 FROM tab2
----
-1038
-966
-967

query I rowsort
SELECT ALL + cor0.col0 + - col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL + - col2 + + ( col1 ) AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT + col2 + - ( col2 ) * - col2 AS col1 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-8181
SELECT DISTINCT + col2 DIV 76 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8181
SELECT DISTINCT + col2 / 76 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + + cor0.col0 + col0 * - 94 FROM tab0 AS cor0
----
-2232
-3255
-8277

query I rowsort
SELECT col0 + + cor0.col2 AS col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - col1 * - 29 AS col2 FROM tab2 cor0
----
1711
493
899

query I rowsort
SELECT ALL + cor0.col1 * - 41 - + col0 AS col1 FROM tab2 AS cor0
----
-1278
-2497
-776

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query III rowsort
SELECT * FROM tab1 WHERE col1 IN ( - col2 * - col0 + col0 )
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE col2 - col0 <> NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 65 * col2 col1 FROM tab1 AS cor0
----
3510
3705
6240

query I rowsort
SELECT ALL + - col2 * col0 + - col2 AS col1 FROM tab0 AS cor0
----
-36
-7380
-825

onlyif mysql # use DIV operator for integer division
query I rowsort label-8191
SELECT - - col2 DIV col0 + col0 + - col1 FROM tab2 AS cor0
----
-21
19
62

skipif mysql # not compatible
query I rowsort label-8191
SELECT - - col2 / col0 + col0 + - col1 FROM tab2 AS cor0
----
-21
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * cor0.col1 + col2 * col0 col0 FROM tab2 AS cor0
----
-648
2356
494

query I rowsort
SELECT + cor0.col0 * col2 AS col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + col1 + + col2 * + col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT - cor0.col2 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-8196
SELECT - col1 + col1 DIV cor0.col2 + col2 FROM tab1 AS cor0
----
28
47
83

skipif mysql # not compatible
query I rowsort label-8196
SELECT - col1 + col1 / cor0.col2 + col2 FROM tab1 AS cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col0 + + col2 col0 FROM tab0
----
133
143
262

query I rowsort
SELECT DISTINCT - 20 - col0 * - 94 FROM tab1
----
262
5996
7500

query I rowsort
SELECT + - cor0.col1 * + col2 + ( col2 ) + + cor0.col1 FROM tab1 AS cor0
----
-1139
-1324
-503

query I rowsort
SELECT + col0 + col1 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8201
SELECT + - col2 + - CAST( NULL AS SIGNED ) + - col2 * + col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8201
SELECT + - col2 + - CAST ( NULL AS INTEGER ) + - col2 * + col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8202
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8202
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab2 cor0
----
NULL

query I rowsort
SELECT - col0 + - ( - col0 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 + - col1 + - col2 FROM tab0 AS cor0
----
-63
-84
-95

query I rowsort
SELECT DISTINCT ( 27 ) FROM tab2, tab1 AS cor0
----
27

query I rowsort
SELECT ALL + + col1 + + col0 AS col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ALL - col2 * 39 AS col2 FROM tab1 cor0
----
-2106
-2223
-3744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 89 col1 FROM tab2 AS cor0
----
-89
-89
-89

query I rowsort
SELECT 9 * 73 + col2 FROM tab0
----
658
690
739

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8210
SELECT CAST( NULL AS SIGNED ) * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8210
SELECT CAST ( NULL AS INTEGER ) * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 70 + - col0 FROM tab1 AS cor0
----
-10
6
67

query I rowsort
SELECT ALL - col1 * - col0 + - 66 * 39 AS col2 FROM tab2 AS cor0
----
-1231
-2357
2028

query I rowsort
SELECT + col1 * col0 + + ( col0 ) FROM tab0 AS cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col2 * - col2 col1 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT + - ( col2 ) * - 3 + + 45 - col2 FROM tab0 AS cor0
----
111
209
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8216
SELECT 83 * + col0 * CAST( NULL AS SIGNED ) - + col1 AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8216
SELECT 83 * + col0 * CAST ( NULL AS INTEGER ) - + col1 AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 + col2 * col2 FROM tab2 cor0
----
1461
735
760

query I rowsort
SELECT DISTINCT 61 * col2 AS col2 FROM tab1 AS cor0
----
3294
3477
5856

query I rowsort
SELECT DISTINCT + 68 AS col0 FROM tab1, tab0 AS cor0
----
68

query I rowsort
SELECT - ( - col0 * - col0 ) AS col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT - 99 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 761f5f1a166a00db99360141565a85da

query I rowsort
SELECT DISTINCT - - 17 - - col0 FROM tab2 AS cor0
----
24
95
96

query I rowsort
SELECT ALL ( - col0 ) * 47 * + col2 FROM tab0 AS cor0
----
-1645
-343006
-37224

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab2 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to 677ef6b86493a7e48d2f6a3cfd7eea4c

query I rowsort
SELECT + cor0.col2 * + col2 + - cor0.col1 FROM tab1 cor0
----
2890
3239
9203

query I rowsort
SELECT - 55 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT DISTINCT ( col0 * col2 ) - col1 FROM tab1
----
136
3638
7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-8228
SELECT - ( 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-8228
SELECT - ( col0 ) / + ( + col2 ) col1 FROM tab0
----
-1
-35
0

query I rowsort
SELECT + - col1 + cor0.col2 + col2 * col1 AS col2 FROM tab1 AS cor0
----
1331
1432
617

query I rowsort
SELECT 55 - - col0 FROM tab2
----
133
134
62

query I rowsort
SELECT ALL - + 48 + col1 AS col2 FROM tab1 AS cor0
----
-22
-35
-38

query I rowsort
SELECT ALL + + ( col1 ) * ( + ( col2 ) ) AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - + 88 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to eb8cbefa7d831e1a0183e919e2caef32

query I rowsort
SELECT 60 FROM tab2, tab0 cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT ALL + 55 - - col0 AS col0 FROM tab1 AS cor0
----
119
135
58

query I rowsort
SELECT DISTINCT + + ( + cor0.col1 ) + + col0 - + 81 FROM tab0 AS cor0
----
29
51
99

query I rowsort
SELECT - 70 + - cor0.col0 FROM tab1 AS cor0
----
-134
-150
-73

query I rowsort
SELECT ALL - 60 + 77 FROM tab0 AS cor0
----
17
17
17

query I rowsort
SELECT DISTINCT col0 + tab1.col2 + - col0 AS col1 FROM tab1
----
54
57
96

query I rowsort
SELECT - col1 * col1 * col2 AS col1 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT DISTINCT col1 + - 41 FROM tab2
----
-10
-24
18

query I rowsort
SELECT - col2 + col1 * + col0 * col0 FROM tab0
----
118824
49503
720729

query I rowsort
SELECT tab1.col1 - 81 FROM tab1
----
-55
-68
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( + col2 AS REAL ) + + col1 col1 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT + ( - col1 ) + - col2 AS col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL + 50 + 88 - + col2 * + 8 FROM tab1 AS cor0
----
-294
-318
-630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * 44 + + col0 col2 FROM tab1 AS cor0
----
-129
-2752
-3440

query I rowsort
SELECT DISTINCT 74 + 23 * col0 AS col2 FROM tab0 AS cor0
----
2121
626
879

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 66 + col1 col0 FROM tab1 cor0
----
-3538
-3752
-6323

query I rowsort
SELECT + + 67 FROM tab1 AS cor0
----
67
67
67

query I rowsort
SELECT ALL - 97 * + col2 + - col0 * cor0.col1 FROM tab1 AS cor0
----
-10352
-5316
-6169

query I rowsort
SELECT ALL + - ( + col2 ) * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + + col1 * col1 * - col1 AS col1 FROM tab0 AS cor0
----
-636056
-753571
-912673

query I rowsort
SELECT ALL col1 + - cor0.col1 * col2 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT - col0 * + col0 + ( col0 ) FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT cor2.col2 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

onlyif mysql # use DIV operator for integer division
query I rowsort label-8257
SELECT col0 + - col0 DIV col1 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-8257
SELECT col0 + - col0 / col1 FROM tab2 AS cor0
----
7
75
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 * + 51 col2 FROM tab1 AS cor0
----
-153
-3264
-4080

query I rowsort
SELECT DISTINCT + - col0 * ( + 57 ) + + col2 FROM tab0 AS cor0
----
-1335
-1994
-4991

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 * 25 col1 FROM tab0 AS cor0
----
525
525
525

query I rowsort
SELECT DISTINCT - 28 * - col1 FROM tab0 AS cor0
----
2408
2548
2716

query I rowsort
SELECT - - 79 - + col2 FROM tab2 AS cor0
----
41
52
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8263
SELECT ALL - CAST( + col2 AS SIGNED ) col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8263
SELECT ALL - CAST ( + col2 AS INTEGER ) col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + col1 * col1 + + col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT - cor0.col0 * - 95 FROM tab2 AS cor0
----
665
7410
7505

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 16 col2 FROM tab1 AS cor0
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 1 + col2 col0 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT DISTINCT cor0.col2 + col0 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - 13 * - col2 + - col2 FROM tab1 AS cor0
----
1152
648
684

query I rowsort
SELECT 84 * col0 AS col0 FROM tab1 AS cor0
----
252
5376
6720

query I rowsort
SELECT ALL + - 34 * + col1 * col2 + + 12 FROM tab2 AS cor0
----
-21952
-28446
-52144

query I rowsort
SELECT ( - col1 ) + col1 * col2 FROM tab1 cor0
----
1235
1378
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 + col0 col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT ( + cor0.col2 ) * + ( - 10 ) FROM tab0 AS cor0
----
-10
-330
-820

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8275
SELECT DISTINCT col1 * cor0.col2 + CAST( col0 AS SIGNED ) AS col0 FROM tab2 cor0
----
1612
725
844

skipif mysql # not compatible
query I rowsort label-8275
SELECT DISTINCT col1 * cor0.col2 + CAST ( col0 AS INTEGER ) AS col0 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT ALL - - ( + col0 ) AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + + col2 * + col1 + cor0.col1 AS col2 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT ALL + cor0.col0 * - col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT cor0.col0 + col2 * + ( ( + col1 ) ) FROM tab1 AS cor0
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( - col0 ) * - 29 col1 FROM tab2 AS cor0
----
-203
-2262
-2291

query I rowsort
SELECT ALL + 89 * - cor0.col1 FROM tab1 AS cor0
----
-1157
-2314
-890

query I rowsort
SELECT ALL + cor0.col1 + - col0 * - 31 AS col1 FROM tab2 AS cor0
----
2466
2477
248

query I rowsort
SELECT - - 60 + - col0 FROM tab1 AS cor0
----
-20
-4
57

query I rowsort
SELECT - 53 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to fee5c00ad71c23e23683a32c71fe6e7d

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1, tab0 AS cor0, tab2, tab1 AS cor1
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT ( tab0.col0 + - col1 ) FROM tab0
----
-2
-62
-62

query I rowsort
SELECT - col2 * + ( - cor0.col1 ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col0 + ( + col0 ) * col1 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT + + col0 * + 81 AS col1 FROM tab2 AS cor0
----
567
6318
6399

query I rowsort
SELECT - + col2 * + 39 FROM tab1 AS cor0
----
-2106
-2223
-3744

query I rowsort
SELECT + - cor0.col1 + col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ( 69 ) * - tab1.col1 FROM tab1
----
-1794
-690
-897

onlyif mysql # use DIV operator for integer division
query I rowsort label-8293
SELECT + CAST( + 42 AS SIGNED ) DIV - col0 AS col2 FROM tab1
----
-14
0
0

skipif mysql # not compatible
query I rowsort label-8293
SELECT + CAST ( + 42 AS INTEGER ) / - col0 AS col2 FROM tab1
----
-14
0
0

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab1, tab1 cor1
----
3645 values hashing to 51e2051aff75c58a5edaa314f1412983

query I rowsort
SELECT DISTINCT + col0 * col2 + + col1 * cor0.col1 FROM tab0 AS cor0
----
15579
8188
9444

query I rowsort
SELECT ALL col1 - col1 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL 52 * cor0.col2 FROM tab2 AS cor0
----
1352
1404
1976

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 * 12 col2 FROM tab0 AS cor0
----
36
36
36

query I rowsort
SELECT 45 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8300
SELECT + CAST( NULL AS SIGNED ) FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8300
SELECT + CAST ( NULL AS INTEGER ) FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 28 * col1 FROM tab2
----
1652
476
868

query I rowsort
SELECT - ( + 85 ) FROM tab0, tab1 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT - - col1 * - col0 + - col2 AS col0 FROM tab1 AS cor0
----
-1136
-132
-697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8304
SELECT ALL + CAST( NULL AS DECIMAL ) FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8304
SELECT ALL + CAST ( NULL AS REAL ) FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - col2 + - col1 * + col0 AS col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT - ( + col1 ) - + col2 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8307
SELECT DISTINCT - CAST( - 0 AS SIGNED ) col0 FROM tab2 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8307
SELECT DISTINCT - CAST ( - 0 AS INTEGER ) col0 FROM tab2 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8308
SELECT + - CAST( + 63 AS SIGNED ) FROM tab2 AS cor0
----
-63
-63
-63

skipif mysql # not compatible
query I rowsort label-8308
SELECT + - CAST ( + 63 AS INTEGER ) FROM tab2 AS cor0
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( col2 ) + col0 col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - + 89 * - col0 FROM tab2 AS cor0
----
623
6942
7031

onlyif mysql # use DIV operator for integer division
query I rowsort label-8311
SELECT tab2.col1 + 81 DIV 52 FROM tab2
----
18
32
60

skipif mysql # not compatible
query I rowsort label-8311
SELECT tab2.col1 + 81 / 52 FROM tab2
----
18
32
60

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 CROSS JOIN tab1, tab2 cor1, tab2 AS cor2
----
3645 values hashing to 2c0370ee2d7726affde9c7c0de12a506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8313
SELECT ALL + CAST( col2 AS SIGNED ) + col1 + col0 FROM tab2 AS cor0
----
134
163
65

skipif mysql # not compatible
query I rowsort label-8313
SELECT ALL + CAST ( col2 AS INTEGER ) + col1 + col0 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT + 86 + 62 FROM tab1 AS cor0
----
148
148
148

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8315
SELECT DISTINCT + - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8315
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8316
SELECT DISTINCT CAST( col2 AS SIGNED ) + col1 + - col2 AS col1 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8316
SELECT DISTINCT CAST ( col2 AS INTEGER ) + col1 + - col2 AS col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT 25 AS col2 FROM tab2 AS cor0
----
25

query I rowsort
SELECT - col0 - 33 FROM tab0 AS cor0
----
-122
-57
-68

query I rowsort
SELECT + col1 * - 26 + col1 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
310
728
910

query I rowsort
SELECT - col2 * + col0 * col1 + col1 FROM tab2 AS cor0
----
-119593
-51017
-5828

onlyif mysql # use DIV operator for integer division
query I rowsort label-8321
SELECT + 2 DIV - cor0.col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8321
SELECT + 2 / - cor0.col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 + col2 + - col0 FROM tab2 AS cor0
----
-120
-130
13

query I rowsort
SELECT - col0 + - col1 * - 29 * + tab2.col2 FROM tab2
----
18655
24266
44408

query I rowsort
SELECT ALL - 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-8325
SELECT DISTINCT + + col1 DIV - col2 AS col1 FROM tab0 cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-8325
SELECT DISTINCT + + col1 / - col2 AS col1 FROM tab0 cor0
----
-1
-2
-97

query I rowsort
SELECT DISTINCT - - col0 * 95 AS col2 FROM tab0 AS cor0
----
2280
3325
8455

query I rowsort
SELECT col2 + + 76 * col1 AS col1 FROM tab1 AS cor0
----
1084
2030
817

query I rowsort
SELECT ALL + + col2 * 55 AS col0 FROM tab1 cor0
----
2970
3135
5280

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8329
SELECT ALL col0 + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8329
SELECT ALL col0 + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * ( + cor0.col2 + + col2 ) AS col2 FROM tab0 AS cor0
----
14596
1584
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8331
SELECT ALL - col0 + + CAST( col2 AS SIGNED ) + + col2 FROM tab0 AS cor0
----
-33
42
75

skipif mysql # not compatible
query I rowsort label-8331
SELECT ALL - col0 + + CAST ( col2 AS INTEGER ) + + col2 FROM tab0 AS cor0
----
-33
42
75

query I rowsort
SELECT DISTINCT + col0 + 75 * col1 FROM tab1 AS cor0
----
1055
1953
814

query I rowsort
SELECT ALL + - col1 * - 92 + 48 * col1 FROM tab1 AS cor0
----
1400
1820
3640

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8334
SELECT - col1 + CAST( + cor0.col2 AS SIGNED ) FROM tab0 AS cor0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-8334
SELECT - col1 + CAST ( + cor0.col2 AS INTEGER ) FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8335
SELECT + + cor0.col2 DIV 93 + - col0 AS col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-8335
SELECT + + cor0.col2 / 93 + - col0 AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + col0 * + col2 * cor0.col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT + - col1 * - col0 + col1 + - col2 * - col2 * 82 FROM tab0 AS cor0
----
3574
559558
91448

query I rowsort
SELECT col2 * + 44 FROM tab1 AS cor0
----
2376
2508
4224

query I rowsort
SELECT ALL + col2 + 78 AS col1 FROM tab0 AS cor0
----
111
160
79

query I rowsort
SELECT ALL - 36 AS col2 FROM tab2 cor0
----
-36
-36
-36

query I rowsort
SELECT DISTINCT + col0 * col0 - col1 AS col2 FROM tab0 AS cor0
----
1128
490
7830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8342
SELECT ALL + CAST( NULL AS SIGNED ) - + ( col0 ) / + col1 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-8342
SELECT ALL + CAST ( NULL AS INTEGER ) - + ( col0 ) / + col1 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8343
SELECT ALL + CAST( NULL AS SIGNED ) - cor0.col2 * cor0.col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8343
SELECT ALL + CAST ( NULL AS INTEGER ) - cor0.col2 * cor0.col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 51 * + col2 AS col0 FROM tab1 AS cor0
----
-2754
-2907
-4896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col0 ) + - col1 col2 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT + col2 + - col2 * col0 AS col1 FROM tab0 cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT col1 + cor0.col1 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT - + col2 + + col2 FROM tab1 cor0
----
0

query I rowsort
SELECT DISTINCT - 89 AS col0 FROM tab0 AS cor0
----
-89

query I rowsort
SELECT ALL - col0 + + col1 AS col2 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT + cor1.col1 - ( - 45 ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 838e3616eba570b6f893c5d3721f4665

query I rowsort
SELECT DISTINCT - cor0.col0 + - cor0.col1 * - 95 AS col0 FROM tab0 AS cor0
----
8146
8556
9180

query I rowsort
SELECT col1 + - col1 * - col1 * col0 AS col2 FROM tab0 AS cor0
----
177590
329412
737100

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * + col2 + - col1 col0 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT ALL - col2 * col0 * tab2.col1 + + tab2.col2 AS col0 FROM tab2
----
-119626
-50996
-5832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col2 * - col0 col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + col1 + 59 AS col0 FROM tab0 AS cor0
----
145
150
156

onlyif mysql # use DIV operator for integer division
query I rowsort label-8358
SELECT col2 + col2 DIV + 84 AS col0 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8358
SELECT col2 + col2 / + 84 AS col0 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 57 col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 220a93709e207779b34ef74b544764a5

query I rowsort
SELECT ( col0 ) + + 11 * col0 AS col2 FROM tab1
----
36
768
960

query I rowsort
SELECT - 17 * col0 FROM tab0
----
-1513
-408
-595

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8362
SELECT ALL col0 + col1 * - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8362
SELECT ALL col0 + col1 * - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8363
SELECT ALL - col0 * col1 + CAST( col2 AS SIGNED ) * col0 * ( 50 ) FROM tab1
----
181760
382960
8022

skipif mysql # not compatible
query I rowsort label-8363
SELECT ALL - col0 * col1 + CAST ( col2 AS INTEGER ) * col0 * ( 50 ) FROM tab1
----
181760
382960
8022

query I rowsort
SELECT DISTINCT + tab0.col2 + col0 * ( col1 + + col1 ) AS col1 FROM tab0
----
16280
4161
6791

query I rowsort
SELECT + 77 + tab2.col0 FROM tab2
----
155
156
84

query I rowsort
SELECT ALL ( ( - col2 ) ) FROM tab1
----
-54
-57
-96

query I rowsort
SELECT - + 86 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
-1462
-2666
-5074

query I rowsort
SELECT col2 + + col2 * + col1 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT cor0.col2 * + cor1.col0 FROM tab1, tab1 cor0, tab1 cor1
----
27 values hashing to 11fb95e355e995b05aff375a305225c2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * + cor0.col0 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-8371
SELECT - col2 * col1 + - 44 * + 91 + + col2 DIV + cor0.col2 FROM tab1 AS cor0
----
-4573
-5251
-5407

skipif mysql # not compatible
query I rowsort label-8371
SELECT - col2 * col1 + - 44 * + 91 + + col2 / + cor0.col2 FROM tab1 AS cor0
----
-4573
-5251
-5407

query I rowsort
SELECT DISTINCT + - col1 + + col2 * col0 AS col2 FROM tab0 AS cor0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-8373
SELECT ALL - col0 DIV col0 + - ( - col0 ) * col1 DIV - 9 FROM tab1 AS cor0
----
-116
-72
-9

skipif mysql # not compatible
query I rowsort label-8373
SELECT ALL - col0 / col0 + - ( - col0 ) * col1 / - 9 FROM tab1 AS cor0
----
-116
-72
-9

query I rowsort
SELECT + - col0 + + col1 * + ( + ( col2 ) ) FROM tab2 cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT + 28 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
28

query I rowsort
SELECT DISTINCT tab0.col0 + + 21 * 33 AS col2 FROM tab0
----
717
728
782

query I rowsort
SELECT - col0 * - ( tab0.col0 ) * + col1 AS col2 FROM tab0
----
118825
49536
720811

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8378
SELECT ALL - col0 * - CAST( col1 AS SIGNED ) FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-8378
SELECT ALL - col0 * - CAST ( col1 AS INTEGER ) FROM tab1
----
1040
640
78

query I rowsort
SELECT + col2 + col0 + - col2 FROM tab0
----
24
35
89

query I rowsort
SELECT ALL - 29 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 56a8aa9e4c5d3c934d1853afeb22653e

query I rowsort
SELECT DISTINCT col0 + 60 FROM tab2
----
138
139
67

query I rowsort
SELECT ALL tab1.col0 + - col1 * col2 FROM tab1
----
-1168
-1401
-506

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab1 cor1, tab2, tab1 AS cor2
----
3645 values hashing to 91c4f11552b395e0eb390f09eebaec3d

query I rowsort
SELECT ALL - col2 + ( col1 ) * col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT col1 * 14 + col1 AS col1 FROM tab2 AS cor0
----
255
465
885

query I rowsort
SELECT DISTINCT - col2 * - 41 FROM tab0 AS cor0
----
1353
3362
41

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 col1 + + 72 * col1 FROM tab0 AS cor0
----
6278
6643
7081

query I rowsort
SELECT DISTINCT + - col2 * col2 - col1 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT ALL 6 * 19 AS col1 FROM tab1 AS cor0
----
114
114
114

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + col1 col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8392
SELECT + + CAST( col0 AS SIGNED ) * - col2 + cor0.col0 AS col2 FROM tab0 AS cor0
----
-7209
-768
0

skipif mysql # not compatible
query I rowsort label-8392
SELECT + + CAST ( col0 AS INTEGER ) * - col2 + cor0.col0 AS col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT - + col0 + + col2 * col1 AS col1 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT + 30 AS col0 FROM tab1 AS cor0
----
30

query I rowsort
SELECT ALL 77 FROM tab1 cor0
----
77
77
77

query I rowsort
SELECT DISTINCT + - col2 - col2 AS col1 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT + - ( col1 ) * col1 + col0 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT ALL - ( - 90 ) FROM tab2 AS cor0
----
90
90
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-8399
SELECT - 15 DIV ( - col0 ) + + 71 * 32 AS col2 FROM tab1 AS cor0
----
2272
2272
2277

skipif mysql # not compatible
query I rowsort label-8399
SELECT - 15 / ( - col0 ) + + 71 * 32 AS col2 FROM tab1 AS cor0
----
2272
2272
2277

query I rowsort
SELECT ALL col2 + - 18 + col1 FROM tab0 AS cor0
----
101
155
80

query I rowsort
SELECT ALL + tab1.col2 * - col0 + col2 + - col1 AS col0 FROM tab1
----
-134
-3601
-7597

query I rowsort
SELECT + + cor0.col0 * ( col0 ) AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + ( - cor0.col2 ) * + col2 + ( cor0.col0 ) * + col0 * col2 FROM tab1 AS cor0
----
-2430
230223
605184

query I rowsort
SELECT ALL col1 * - col1 + col1 - - col0 FROM tab1
----
-26
-647
-76

query I rowsort
SELECT ALL - 80 + col1 - + col1 AS col2 FROM tab0
----
-80
-80
-80

query I rowsort
SELECT DISTINCT ( - tab0.col1 ) * + col1 - + col2 AS col1 FROM tab0
----
-7429
-8363
-9410

query I rowsort
SELECT ALL + col1 + col1 * + 81 AS col2 FROM tab2 AS cor0
----
1394
2542
4838

query I rowsort
SELECT + - 17 * cor0.col0 + - cor0.col2 FROM tab1 AS cor0
----
-105
-1145
-1456

query I rowsort
SELECT + + col1 * col1 + + col1 + + col0 FROM tab0 AS cor0
----
7506
8461
9541

query I rowsort
SELECT - col0 * + col1 * - ( + 42 ) FROM tab1 AS cor0
----
26880
3276
43680

query I rowsort
SELECT ALL + - col0 * col2 + + ( - col2 ) * col0 AS col1 FROM tab0 AS cor0
----
-14596
-1584
-70

query I rowsort
SELECT col2 + - cor0.col1 * - col2 + 54 FROM tab1 AS cor0
----
1398
1512
681

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 18 col1 FROM tab1 AS cor0
----
-18
-18
-18

query I rowsort
SELECT DISTINCT - 45 FROM tab0, tab1 AS cor0
----
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - ( - col1 ) col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT col2 * 48 * col2 AS col2 FROM tab2 AS cor0
----
32448
34992
69312

onlyif mysql # use DIV operator for integer division
query I rowsort label-8417
SELECT + col0 + + ( - ( col0 ) ) DIV col1 AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-8417
SELECT + col0 + + ( - ( col0 ) ) / col1 AS col0 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col1 + tab0.col0 col2 FROM tab0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * col0 col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT col1 * col0 * col2 AS col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT col2 * col1 + col0 + col2 AS col1 FROM tab2
----
1638
763
871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 15 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT + - 80 AS col1 FROM tab2 AS cor0
----
-80
-80
-80

query I rowsort
SELECT ALL + + 99 + cor0.col2 AS col1 FROM tab2 AS cor0
----
125
126
137

query I rowsort
SELECT + col0 + - col0 * - 65 FROM tab0 cor0
----
1584
2310
5874

query I rowsort
SELECT ALL - + 65 + col1 * ( col2 + col2 ) AS col1 FROM tab0 AS cor0
----
129
14859
5611

query I rowsort
SELECT DISTINCT + + col0 + cor0.col2 * cor0.col1 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-8428
SELECT - cor0.col0 * + cor0.col1 DIV + col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-8428
SELECT - cor0.col0 * + cor0.col1 / + col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - 26 AS col1 FROM tab0 cor0
----
-26
-26
-26

query I rowsort
SELECT ALL + - 52 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to e8a5cb10c0973a78554f344d4f6e7e74

query I rowsort
SELECT ALL + + 75 + + col0 FROM tab0 AS cor0
----
110
164
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8432
SELECT ALL - 59 + - col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8432
SELECT ALL - 59 + - col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8433
SELECT DISTINCT - col2 - col0 * 34 DIV col1 FROM tab2 AS cor0
----
-196
-34
-70

skipif mysql # not compatible
query I rowsort label-8433
SELECT DISTINCT - col2 - col0 * 34 / col1 FROM tab2 AS cor0
----
-196
-34
-70

query I rowsort
SELECT ALL - + col1 + + col0 * col1 AS col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT ( col2 ) * col1 AS col1 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-8436
SELECT col2 * col2 DIV + 1 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-8436
SELECT col2 * col2 / + 1 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT 63 + + tab1.col2 * col2 AS col2 FROM tab1
----
2979
3312
9279

query I rowsort
SELECT + col0 + + col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT ( col1 ) + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT - + col2 * - col0 * col2 + col0 * col1 AS col1 FROM tab1 AS cor0
----
208576
738320
8826

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8441
SELECT - CAST( NULL AS DECIMAL ) + 64 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8441
SELECT - CAST ( NULL AS REAL ) + 64 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8442
SELECT ALL + - CAST( NULL AS SIGNED ) * col1 + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8442
SELECT ALL + - CAST ( NULL AS INTEGER ) * col1 + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + 94 AS col1 FROM tab1 AS cor0
----
158
174
97

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 * col0 - + 69 FROM tab1 AS cor0
----
165
40891
83131

query I rowsort
SELECT + col1 * col2 - col2 FROM tab2
----
1508
608
810

query I rowsort
SELECT DISTINCT - tab0.col0 * - col1 + col2 * ( + col0 * tab0.col2 + col2 * - col2 ) AS col1 FROM tab0
----
-7737
3429
55167

query I rowsort
SELECT 29 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8448
SELECT 37 * + col2 + + col2 * - CAST( NULL AS SIGNED ) * + cor0.col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8448
SELECT 37 * + col2 + + col2 * - CAST ( NULL AS INTEGER ) * + cor0.col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 72 + + col0 col2 FROM tab2 AS cor0
----
150
151
79

query I rowsort
SELECT ALL - - 25 * col2 AS col2 FROM tab1 AS cor0
----
1350
1425
2400

query I rowsort
SELECT DISTINCT + tab2.col2 * 35 + col0 FROM tab2
----
1409
952
988

query I rowsort
SELECT DISTINCT + 87 + + col2 * col0 FROM tab2
----
2115
276
3089

query I rowsort
SELECT ALL - - 97 * + col1 AS col0 FROM tab1 AS cor0
----
1261
2522
970

query I rowsort
SELECT ALL + col2 * + 98 FROM tab0 AS cor0
----
3234
8036
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 2 + + 71 col1 FROM tab2 AS cor0
----
73

query I rowsort
SELECT - - ( - col2 ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT 20 FROM tab0, tab0 cor0
----
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 + - col0 col0 FROM tab1
----
576
75
960

query I rowsort
SELECT ALL - + col0 * cor0.col0 + ( cor0.col1 ) FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT 46 + col1 * + col0 AS col2 FROM tab1 AS cor0
----
1086
124
686

query I rowsort
SELECT + col0 + - col2 * - cor0.col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + 1 * col2 AS col2 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT col1 * + col0 + + 48 * col0 FROM tab1 AS cor0
----
222
3712
4880

query I rowsort
SELECT - col1 + cor0.col2 + 96 * - col0 AS col0 FROM tab0 AS cor0
----
-2357
-3456
-8553

query I rowsort
SELECT - 68 AS col0 FROM tab0, tab0 AS cor0, tab1 cor1, tab1 AS cor2
----
81 values hashing to 3a5c3d9872a8a4148ab98ed0ab0a6c62

query I rowsort
SELECT DISTINCT - ( - cor0.col2 ) AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - cor0.col1 * + col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL tab1.col0 + - col1 + 55 AS col1 FROM tab1
----
109
122
32

query I rowsort
SELECT ALL - - col1 * col0 + col2 * - col2 AS col0 FROM tab0 AS cor0
----
1375
3394
975

onlyif mysql # use DIV operator for integer division
query I rowsort label-8470
SELECT col2 DIV - col1 col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8470
SELECT col2 / - col1 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 + - 90 - - 87 AS col1 FROM tab0
----
-2
30
79

query I rowsort
SELECT ALL col1 + + ( - col1 ) + + tab2.col1 * col1 AS col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT ALL - col2 + - ( + col0 ) FROM tab2
----
-104
-117
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8474
SELECT DISTINCT + col2 + - CAST( NULL AS SIGNED ) + + col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-8474
SELECT DISTINCT + col2 + - CAST ( NULL AS INTEGER ) + + col0 FROM tab0
----
NULL

query I rowsort
SELECT ALL cor2.col2 * cor2.col2 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab0, tab1 AS cor2
----
243 values hashing to 7f4bf0f58263ff1c89539ac7a777391b

onlyif mysql # use DIV operator for integer division
query I rowsort label-8476
SELECT DISTINCT col0 DIV - col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-8476
SELECT DISTINCT col0 / - col2 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT + col2 * - 36 AS col1 FROM tab0 AS cor0
----
-1188
-2952
-36

query I rowsort
SELECT ALL - cor0.col2 * + col2 + cor0.col2 * + cor0.col1 + col0 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
-5226
-7039
59

query I rowsort
SELECT DISTINCT 43 * ( col2 ) FROM tab1 AS cor0
----
2322
2451
4128

onlyif mysql # use DIV operator for integer division
query I rowsort label-8480
SELECT DISTINCT - - 80 DIV col2 AS col2 FROM tab0 AS cor0
----
0
2
80

skipif mysql # not compatible
query I rowsort label-8480
SELECT DISTINCT - - 80 / col2 AS col2 FROM tab0 AS cor0
----
0
2
80

query I rowsort
SELECT + col1 * cor0.col2 + - col0 + col1 AS col0 FROM tab2 AS cor0
----
1515
584
861

query I rowsort
SELECT + 76 * col2 * col0 FROM tab0 cor0
----
2660
554648
60192

query I rowsort
SELECT DISTINCT - col2 + - col1 * col1 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT - + cor0.col2 * col2 * - col0 + - ( + 70 ) FROM tab2 AS cor0
----
114006
5033
52658

query I rowsort
SELECT ( 73 ) * + col2 + 22 FROM tab2 AS cor0
----
1920
1993
2796

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 col0 FROM tab1, tab0 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

onlyif mysql # use DIV operator for integer division
query I rowsort label-8487
SELECT - - 75 * col2 DIV col1 FROM tab2 AS cor0
----
167
33
65

skipif mysql # not compatible
query I rowsort label-8487
SELECT - - 75 * col2 / col1 FROM tab2 AS cor0
----
167
33
65

query I rowsort
SELECT - col0 - + col0 * tab1.col2 * + col1 AS col1 FROM tab1
----
-36544
-4215
-99920

query I rowsort
SELECT + col2 * 8 + cor0.col2 * col0 FROM tab0 AS cor0
----
1056
43
7954

query I rowsort
SELECT col0 * ( + col2 ) + col2 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-8491
SELECT - cor0.col2 * CAST( - col1 AS SIGNED ) + col2 DIV ( + col0 * col0 ) FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-8491
SELECT - cor0.col2 * CAST ( - col1 AS INTEGER ) + col2 / ( + col0 * col0 ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - 45 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT DISTINCT - tab0.col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8494
SELECT - col1 + col2 DIV + 66 + tab2.col0 col2 FROM tab2
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8494
SELECT - col1 + col2 / + 66 + tab2.col0 col2 FROM tab2
----
-24
19
62

query I rowsort
SELECT + tab2.col2 * - ( col2 ) AS col2 FROM tab2
----
-1444
-676
-729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8496
SELECT - CAST( + 54 AS SIGNED ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

skipif mysql # not compatible
query I rowsort label-8496
SELECT - CAST ( + 54 AS INTEGER ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

onlyif mysql # use DIV operator for integer division
query I rowsort label-8497
SELECT ALL - - col2 DIV + cor0.col0 AS col1 FROM tab2 cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-8497
SELECT ALL - - col2 / + cor0.col0 AS col1 FROM tab2 cor0
----
0
0
3

query I rowsort
SELECT DISTINCT + - col1 * cor0.col1 + - ( col0 + ( + 92 ) ) AS col0 FROM tab0 AS cor0
----
-7512
-8462
-9536

query I rowsort
SELECT ALL + 27 * + tab0.col2 AS col0 FROM tab0
----
2214
27
891

query I rowsort
SELECT 34 + col1 FROM tab1 AS cor0
----
44
47
60

query I rowsort
SELECT ( - tab1.col1 * col2 ) AS col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + ( - col0 ) + - col2 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT ALL + - ( + cor0.col1 ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - 93 * col0 FROM tab0
----
-2232
-3255
-8277

onlyif mysql # use DIV operator for integer division
query I rowsort label-8505
SELECT DISTINCT - 50 DIV col0 + + col1 * col2 - + cor0.col0 * - cor0.col1 col2 FROM tab2 AS cor0
----
1047
1989
6136

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8505
SELECT DISTINCT - 50 / col0 + + col1 * col2 - + cor0.col0 * - cor0.col1 col2 FROM tab2 AS cor0
----
1047
1989
6136

query I rowsort
SELECT + - col0 - col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT + cor1.col2 * + 75 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
1950
2025
2850

query I rowsort
SELECT - + col2 * col2 - 39 FROM tab1 AS cor0
----
-2955
-3288
-9255

query I rowsort
SELECT DISTINCT - col0 + - col0 * + 82 FROM tab1 AS cor0
----
-249
-5312
-6640

onlyif mysql # use DIV operator for integer division
query I rowsort label-8510
SELECT DISTINCT + + 47 * + col0 - + col0 * col1 DIV col0 FROM tab2 AS cor0
----
298
3607
3696

skipif mysql # not compatible
query I rowsort label-8510
SELECT DISTINCT + + 47 * + col0 - + col0 * col1 / col0 FROM tab2 AS cor0
----
298
3607
3696

query I rowsort
SELECT ALL + col1 * + col1 + + col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT ALL 95 FROM tab1 cor0
----
95
95
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-8513
SELECT col0 + col2 DIV - 21 AS col1 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-8513
SELECT col0 + col2 / - 21 AS col1 FROM tab2 AS cor0
----
6
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col1 * - cor0.col0 + - col2 col2 FROM tab1 AS cor0
----
-1136
-132
-697

onlyif mysql # use DIV operator for integer division
query I rowsort label-8515
SELECT - tab0.col2 * tab0.col1 DIV - col2 AS col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8515
SELECT - tab0.col2 * tab0.col1 / - col2 AS col1 FROM tab0
----
86
91
97

query I rowsort
SELECT 49 + + col2 * + col2 AS col0 FROM tab1 cor0
----
2965
3298
9265

onlyif mysql # use DIV operator for integer division
query I rowsort label-8517
SELECT - + col0 DIV col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8517
SELECT - + col0 / col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT - cor0.col1 + - col0 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT + + cor0.col2 * + 15 FROM tab0 AS cor0
----
1230
15
495

query I rowsort
SELECT + col0 + + col1 * + cor0.col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT col2 + 70 FROM tab1 AS cor0
----
124
127
166

query I rowsort
SELECT + col1 * - cor0.col2 - - col0 * + col2 * col0 FROM tab1 cor0
----
-918
232902
613152

query I rowsort
SELECT ALL - col0 * - 43 AS col0 FROM tab0 AS cor0
----
1032
1505
3827

query I rowsort
SELECT DISTINCT - col1 * ( + ( - col0 ) ) * - col0 AS col0 FROM tab1 AS cor0
----
-234
-40960
-83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-8525
SELECT + col1 + cor0.col0 DIV - col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8525
SELECT + col1 + cor0.col0 / - col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + cor0.col2 + 78 FROM tab1 cor0
----
132
135
174

query I rowsort
SELECT col0 * - cor0.col1 - col1 AS col1 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT - + col2 - + col2 * - 89 FROM tab1 AS cor0
----
4752
5016
8448

query I rowsort
SELECT DISTINCT - 96 * - col0 AS col0 FROM tab0 AS cor0
----
2304
3360
8544

query I rowsort
SELECT - col2 * 77 AS col0 FROM tab0 cor0
----
-2541
-6314
-77

query I rowsort
SELECT - - col1 + + 86 FROM tab2 AS cor0
----
103
117
145

query I rowsort
SELECT DISTINCT 34 * - col0 FROM tab0
----
-1190
-3026
-816

query I rowsort
SELECT ALL 52 * col2 AS col0 FROM tab2
----
1352
1404
1976

query I rowsort
SELECT 99 * 16 AS col1 FROM tab0 AS cor0
----
1584
1584
1584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8535
SELECT + CAST( NULL AS SIGNED ) * cor0.col2 + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8535
SELECT + CAST ( NULL AS INTEGER ) * cor0.col2 + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( + 56 ) * col2 AS col0 FROM tab1
----
-3024
-3192
-5376

query I rowsort
SELECT ALL + ( - 20 ) AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to eb3a66728062963cccbd15bd2f5c9eee

query I rowsort
SELECT DISTINCT + 87 AS col1 FROM tab0
----
87

query I rowsort
SELECT + 57 * col1 FROM tab2
----
1767
3363
969

query I rowsort
SELECT ALL col2 + col0 * + col0 AS col2 FROM tab0
----
1226
609
8003

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8541
SELECT ALL - CAST( NULL AS SIGNED ) + - col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8541
SELECT ALL - CAST ( NULL AS INTEGER ) + - col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 + + 33 FROM tab0
----
115
34
66

query I rowsort
SELECT 31 FROM tab2, tab1 cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT ALL - ( col1 ) * col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL + 66 AS col0 FROM tab1 AS cor0
----
66
66
66

query I rowsort
SELECT DISTINCT - 27 AS col1 FROM tab0, tab2 cor0
----
-27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8547
SELECT + - CAST( NULL AS SIGNED ) * cor0.col1 + + col1 + + col1 / + col2 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8547
SELECT + - CAST ( NULL AS INTEGER ) * cor0.col1 + + col1 + + col1 / + col2 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - col0 ) + col1 + - 93 AS col2 FROM tab1 AS cor0
----
-147
-160
-70

query I rowsort
SELECT ( - col2 ) * + col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + col0 * - 26 FROM tab1 AS cor0
----
-1664
-2080
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-8551
SELECT DISTINCT + col2 DIV col1 AS col2 FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-8551
SELECT DISTINCT + col2 / col1 AS col2 FROM tab2 AS cor0
----
0
2

query I rowsort
SELECT ( cor0.col2 ) * - col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + 51 * - col0 AS col2 FROM tab1 AS cor0
----
-153
-3264
-4080

query I rowsort
SELECT DISTINCT + col2 * + col1 - 61 * 40 AS col2 FROM tab0 cor0
----
-2343
398
5022

query I rowsort
SELECT - - col2 * col2 + - col2 FROM tab2 cor0
----
1406
650
702

query I rowsort
SELECT ALL + col1 + + col2 AS col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL + ( col1 ) * 4 FROM tab2 AS cor0
----
124
236
68

query I rowsort
SELECT ALL + - col1 * col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + 10 + col1 FROM tab2 AS cor0
----
27
41
69

query I rowsort
SELECT DISTINCT - - col1 * col0 - col1 AS col1 FROM tab0 AS cor0
----
1978
3298
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 + - col2 col1 FROM tab2 cor0
----
162
2002
2964

query I rowsort
SELECT ALL col0 + - ( - col1 ) AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT col2 * - cor0.col2 AS col0 FROM tab0 cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-8564
SELECT ALL - - 38 + cor0.col0 DIV col2 AS col1 FROM tab1 AS cor0
----
38
38
39

skipif mysql # not compatible
query I rowsort label-8564
SELECT ALL - - 38 + cor0.col0 / col2 AS col1 FROM tab1 AS cor0
----
38
38
39

query I rowsort
SELECT ALL - 31 * col2 AS col2 FROM tab1 AS cor0
----
-1674
-1767
-2976

query I rowsort
SELECT ALL + 31 + col1 FROM tab0 AS cor0
----
117
122
128

query I rowsort
SELECT + - 4 FROM tab2 cor0
----
-4
-4
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 56 * col0 - + cor0.col1 col2 FROM tab2 AS cor0
----
-2775
-340763
-349513

query I rowsort
SELECT + - col1 - 77 FROM tab1 AS cor0
----
-103
-87
-90

query I rowsort
SELECT - col0 + - 85 FROM tab1 AS cor0
----
-149
-165
-88

query I rowsort
SELECT ALL - col0 * col2 + + col1 FROM tab1 cor0
----
-136
-3638
-7667

query I rowsort
SELECT col0 + - 94 * col1 AS col1 FROM tab2 AS cor0
----
-1519
-2907
-5468

onlyif mysql # use DIV operator for integer division
query I rowsort label-8573
SELECT col0 * col0 DIV 68 AS col1 FROM tab0 AS cor0
----
116
18
8

skipif mysql # not compatible
query I rowsort label-8573
SELECT col0 * col0 / 68 AS col1 FROM tab0 AS cor0
----
116
18
8

query I rowsort
SELECT + + col1 * ( col0 ) AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - - col1 * col1 * + col0 + + col1 * + col2 FROM tab2 AS cor0
----
23477
273052
7564

query I rowsort
SELECT DISTINCT col1 * - ( 66 ) AS col0 FROM tab1 AS cor0
----
-1716
-660
-858

query I rowsort
SELECT DISTINCT cor0.col2 + - col2 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - col1 * cor0.col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT + col0 + + ( + 3 ) * + col0 AS col2 FROM tab0 AS cor0
----
140
356
96

query I rowsort
SELECT - col1 + + ( 34 ) AS col1 FROM tab2 AS cor0
----
-25
17
3

query I rowsort
SELECT cor0.col1 + ( - ( col0 ) ) FROM tab0 AS cor0
----
2
62
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8582
SELECT ALL - cor0.col1 + CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8582
SELECT ALL - cor0.col1 + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 48 + - cor0.col1 * col2 + 84 AS col1 FROM tab2 AS cor0
----
-1498
-610
-801

query I rowsort
SELECT DISTINCT - 22 * ( col2 ) + + 69 + col0 * cor0.col2 FROM tab1 AS cor0
----
-957
2463
5637

query I rowsort
SELECT ALL col2 * - col2 * + cor0.col1 AS col1 FROM tab1 cor0
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT ( - ( cor0.col2 ) ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort
SELECT ALL + - CAST ( + col1 AS REAL ) + + col2 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8588
SELECT - - col2 DIV 5 - - col1 DIV col1 FROM tab1 AS cor0
----
11
12
20

skipif mysql # not compatible
query I rowsort label-8588
SELECT - - col2 / 5 - - col1 / col1 FROM tab1 AS cor0
----
11
12
20

query I rowsort
SELECT DISTINCT + + col1 + + col2 * col0 FROM tab0 AS cor0
----
132
7389
878

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8590
SELECT ( col1 ) * - col1 - - CAST( - col2 + col2 * - col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-10267
-15825
-9507

skipif mysql # not compatible
query I rowsort label-8590
SELECT ( col1 ) * - col1 - - CAST ( - col2 + col2 * - col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-10267
-15825
-9507

query I rowsort
SELECT + col0 * col0 - + col0 AS col0 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT + 55 * - col1 + + col0 AS col0 FROM tab1 cor0
----
-1427
-486
-635

query I rowsort
SELECT ALL + + col1 * 31 FROM tab0 AS cor0
----
2666
2821
3007

query I rowsort
SELECT ( 97 ) FROM tab1 AS cor0
----
97
97
97

query I rowsort
SELECT DISTINCT - - col1 + 39 + - col1 FROM tab0 cor0
----
39

query I rowsort
SELECT DISTINCT - 51 * + col2 FROM tab2 AS cor0
----
-1326
-1377
-1938

skipif mysql # not compatible
query I rowsort
SELECT col1 + - ( - col1 ) + CAST ( 57 * col1 + col1 AS REAL ) FROM tab1 AS cor0
----
1560
600
780

query I rowsort
SELECT DISTINCT - ( - col2 ) * - col1 + 2 FROM tab1 AS cor0
----
-1246
-1402
-568

query I rowsort
SELECT ALL + col2 * - 36 - tab0.col0 * tab0.col1 AS col1 FROM tab0
----
-11051
-3252
-3431

query I rowsort
SELECT DISTINCT 22 * cor0.col2 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
1188
1254
2112

query I rowsort
SELECT col1 * tab0.col2 + + tab0.col0 AS col1 FROM tab0
----
132
2862
7551

query I rowsort
SELECT col1 + - col2 * - col1 * - col2 + - tab0.col0 * - 83 AS col1 FROM tab0
----
-604406
-91576
2905

query I rowsort
SELECT 8 * 16 FROM tab1, tab0 AS cor0
----
9 values hashing to 6a9ed45ca8e49cad3cefcf18e4d680fe

query I rowsort
SELECT 60 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT - 6 + 31 FROM tab2 AS cor0
----
25
25
25

query I rowsort
SELECT - - 19 + - 19 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 * - col0 - col0 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT DISTINCT col1 - cor0.col0 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT + col2 + ( - 98 ) * cor0.col1 AS col2 FROM tab2 AS cor0
----
-1628
-3011
-5756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col2 col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + + col2 - 34 * col2 FROM tab0 cor0
----
-1089
-2706
-33

query I rowsort
SELECT ALL - col2 + - ( - col1 ) * col2 AS col1 FROM tab0 AS cor0
----
2805
7380
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8613
SELECT ALL + col1 DIV + col0 - 83 DIV col1 FROM tab2 AS cor0
----
-1
-4
2

skipif mysql # not compatible
query I rowsort label-8613
SELECT ALL + col1 / + col0 - 83 / col1 FROM tab2 AS cor0
----
-1
-4
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 69 col2 FROM tab2 AS cor0
----
69
69
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-8615
SELECT DISTINCT + col1 DIV tab0.col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-8615
SELECT DISTINCT + col1 / tab0.col0 FROM tab0
----
1
2
3

query I rowsort
SELECT DISTINCT + + 25 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
25

query I rowsort
SELECT ALL ( + col2 ) * + 86 AS col2 FROM tab2
----
2236
2322
3268

query I rowsort
SELECT ALL + 57 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

onlyif mysql # use DIV operator for integer division
query I rowsort label-8619
SELECT - col2 DIV - col1 AS col2 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-8619
SELECT - col2 / - col1 AS col2 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 ) * - col2 col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT 51 * col2 * - col1 AS col0 FROM tab0 AS cor0
----
-144738
-380562
-4947

query I rowsort
SELECT + col1 * ( + 71 + - col1 ) FROM tab0 AS cor0
----
-1290
-1820
-2522

query I rowsort
SELECT + col1 + + 68 AS col0 FROM tab1 cor0
----
78
81
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-8624
SELECT col2 DIV 13 AS col0 FROM tab2 AS cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-8624
SELECT col2 / 13 AS col0 FROM tab2 AS cor0
----
2
2
2

query I rowsort
SELECT DISTINCT - cor0.col1 * 23 AS col0 FROM tab1, tab1 AS cor0
----
-230
-299
-598

onlyif mysql # use DIV operator for integer division
query I rowsort label-8626
SELECT ( col0 ) DIV + col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-8626
SELECT ( col0 ) / + col1 FROM tab2
----
0
1
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-8627
SELECT + 82 * col2 DIV - 29 AS col0 FROM tab0
----
-2
-231
-93

skipif mysql # not compatible
query I rowsort label-8627
SELECT + 82 * col2 / - 29 AS col0 FROM tab0
----
-2
-231
-93

query I rowsort
SELECT 69 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT DISTINCT col2 + + col2 * ( - 76 + col1 ) * 20 AS col1 FROM tab2
----
-24273
-44802
-8814

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col2 col2 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8631
SELECT - 46 DIV col0 FROM tab1 AS cor0
----
-15
0
0

skipif mysql # not compatible
query I rowsort label-8631
SELECT - 46 / col0 FROM tab1 AS cor0
----
-15
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8632
SELECT - + col0 DIV 22 FROM tab1 AS cor0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-8632
SELECT - + col0 / 22 FROM tab1 AS cor0
----
-2
-3
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8633
SELECT DISTINCT 11 DIV - col1 AS col0 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8633
SELECT DISTINCT 11 / - col1 AS col0 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8634
SELECT - col2 DIV col1 + col1 col1 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8634
SELECT - col2 / col1 + col1 col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8635
SELECT CAST( + 16 AS SIGNED ) FROM tab1 AS cor0
----
16
16
16

skipif mysql # not compatible
query I rowsort label-8635
SELECT CAST ( + 16 AS INTEGER ) FROM tab1 AS cor0
----
16
16
16

query I rowsort
SELECT ALL 46 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 4 - tab2.col2 col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to aba6419cc8401bbada9c22e200479a18

query I rowsort
SELECT DISTINCT - + col1 * col1 + - col1 AS col0 FROM tab1 AS cor0
----
-110
-182
-702

query I rowsort
SELECT DISTINCT + ( 93 ) FROM tab1, tab1 AS cor0, tab1 AS cor1
----
93

query I rowsort
SELECT - ( - col2 * col2 ) AS col0 FROM tab0
----
1
1089
6724

query I rowsort
SELECT + 17 + col1 FROM tab0
----
103
108
114

query I rowsort
SELECT DISTINCT 12 AS col1 FROM tab0, tab1, tab0 cor0
----
12

query I rowsort
SELECT + - col2 * - col2 + 94 FROM tab0 AS cor0
----
1183
6818
95

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1, tab0, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT col0 * ( tab2.col2 ) AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT 1 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
1

query I rowsort
SELECT DISTINCT col0 * - col0 * 60 FROM tab1
----
-245760
-384000
-540

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0, tab2, tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8649
SELECT ALL col1 - - CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8649
SELECT ALL col1 - - CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8650
SELECT - - CAST( - 98 AS SIGNED ) * + col2 AS col0 FROM tab2 cor0
----
-2548
-2646
-3724

skipif mysql # not compatible
query I rowsort label-8650
SELECT - - CAST ( - 98 AS INTEGER ) * + col2 AS col0 FROM tab2 cor0
----
-2548
-2646
-3724

query I rowsort
SELECT - col0 + cor0.col2 + + col2 AS col0 FROM tab1 cor0
----
105
112
50

query I rowsort
SELECT DISTINCT 93 + + col0 * cor0.col2 FROM tab0 AS cor0
----
128
7391
885

onlyif mysql # use DIV operator for integer division
query I rowsort label-8653
SELECT col1 DIV + col1 - + tab2.col0 FROM tab2
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-8653
SELECT col1 / + col1 - + tab2.col0 FROM tab2
----
-6
-77
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * col1 col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - - cor0.col2 * ( col1 ) AS col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-8656
SELECT ALL col0 DIV col0 + - col1 col2 FROM tab2
----
-16
-30
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8656
SELECT ALL col0 / col0 + - col1 col2 FROM tab2
----
-16
-30
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-8657
SELECT ALL - col1 * col0 + - 99 DIV + col1 FROM tab2
----
-1348
-220
-4603

skipif mysql # not compatible
query I rowsort label-8657
SELECT ALL - col1 * col0 + - 99 / + col1 FROM tab2
----
-1348
-220
-4603

query I rowsort
SELECT tab1.col1 + tab1.col0 + 76 * - 50 AS col2 FROM tab1
----
-3707
-3726
-3771

query I rowsort
SELECT - ( - 63 ) AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 38764a6e696d1a6b5095e29ef84959c0

query I rowsort
SELECT col1 + - col1 * ( col1 ) * + col0 FROM tab2
----
-22814
-271459
-6696

query I rowsort
SELECT cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0, tab0 AS cor2, tab0 AS cor3
----
729 values hashing to 2658ec94e6747a4d1e024355f200c3d1

query I rowsort
SELECT - - cor0.col1 * + cor0.col2 + - 32 * col1 * col0 FROM tab2 AS cor0
----
-145730
-42330
-6107

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8663
SELECT ALL + - col2 * CAST( NULL AS SIGNED ) + + col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8663
SELECT ALL + - col2 * CAST ( NULL AS INTEGER ) + + col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8664
SELECT ALL + col1 + 36 DIV cor0.col2 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-8664
SELECT ALL + col1 + 36 / cor0.col2 col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + col0 + ( - col0 ) AS col2 FROM tab2 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8666
SELECT ALL + - col1 DIV col1 - - 57 FROM tab0 AS cor0
----
56
56
56

skipif mysql # not compatible
query I rowsort label-8666
SELECT ALL + - col1 / col1 - - 57 FROM tab0 AS cor0
----
56
56
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-8667
SELECT DISTINCT - + col2 DIV - col1 AS col2 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-8667
SELECT DISTINCT - + col2 / - col1 AS col2 FROM tab0 cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8668
SELECT ALL col2 + CAST( NULL AS DECIMAL ) * - 42 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8668
SELECT ALL col2 + CAST ( NULL AS REAL ) * - 42 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * - ( cor0.col1 ) + + col1 AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

onlyif mysql # use DIV operator for integer division
query I rowsort label-8670
SELECT - col1 + col2 DIV col1 AS col2 FROM tab1 AS cor0
----
-24
-5
-6

skipif mysql # not compatible
query I rowsort label-8670
SELECT - col1 + col2 / col1 AS col2 FROM tab1 AS cor0
----
-24
-5
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-8671
SELECT DISTINCT col2 DIV + col2 AS col1 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-8671
SELECT DISTINCT col2 / + col2 AS col1 FROM tab1 AS cor0
----
1

query I rowsort
SELECT DISTINCT - + cor0.col1 * - col2 - - col1 * - col1 FROM tab2 cor0
----
-124
-1947
357

onlyif mysql # use DIV operator for integer division
query I rowsort label-8673
SELECT ALL col0 DIV - ( + cor0.col0 ) + - col2 FROM tab2 AS cor0
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-8673
SELECT ALL col0 / - ( + cor0.col0 ) + - col2 FROM tab2 AS cor0
----
-27
-28
-39

onlyif mysql # use DIV operator for integer division
query I rowsort label-8674
SELECT ALL col1 DIV 78 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8674
SELECT ALL col1 / 78 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col0 * + ( col0 ) AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - 96 FROM tab2, tab1 AS cor0
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT + + 56 * + 73 FROM tab1 AS cor0
----
4088
4088
4088

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 86 col2 FROM tab2, tab0 AS cor0
----
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-8679
SELECT - - cor0.col2 DIV - 20 FROM tab1 cor0
----
-2
-2
-4

skipif mysql # not compatible
query I rowsort label-8679
SELECT - - cor0.col2 / - 20 FROM tab1 cor0
----
-2
-2
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-8680
SELECT + 80 DIV + col1 AS col1 FROM tab1 AS cor0
----
3
6
8

skipif mysql # not compatible
query I rowsort label-8680
SELECT + 80 / + col1 AS col1 FROM tab1 AS cor0
----
3
6
8

query I rowsort
SELECT ALL 96 + + col2 AS col1 FROM tab1 AS cor0
----
150
153
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - 15 + - col0 col2 FROM tab1 AS cor0
----
-1520
-813
-919

onlyif mysql # use DIV operator for integer division
query I rowsort label-8683
SELECT ALL - 87 * col0 + col0 * col1 DIV 45 AS col1 FROM tab0 cor0
----
-2043
-2970
-7564

skipif mysql # not compatible
query I rowsort label-8683
SELECT ALL - 87 * col0 + col0 * col1 / 45 AS col1 FROM tab0 cor0
----
-2043
-2970
-7564

query I rowsort
SELECT DISTINCT + cor0.col0 + ( col0 ) * + col1 FROM tab0 AS cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + col1 col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT col2 * col2 + + col0 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL - + cor0.col2 + - cor0.col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - - cor0.col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL - 57 * - col1 + + col2 + + cor0.col1 AS col2 FROM tab1 cor0
----
1562
637
850

query I rowsort
SELECT ALL + col2 * cor0.col1 + + col1 * + 45 * col1 AS col1 FROM tab1 cor0
----
31824
5070
8853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 82 col1 FROM tab2 AS cor0
----
82

query I rowsort
SELECT + 36 * col0 AS col0 FROM tab0 AS cor0
----
1260
3204
864

query I rowsort
SELECT ALL col0 * col0 AS col2 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT col2 * - col1 * + ( - col0 * - col2 ) FROM tab1 AS cor0
----
-2079360
-227448
-9584640

query I rowsort
SELECT + 16 * cor0.col0 FROM tab2 AS cor0
----
112
1248
1264

query I rowsort
SELECT ALL + ( - cor0.col0 ) + col0 + 53 FROM tab1 cor0
----
53
53
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - cor0.col0 + + ( + cor0.col1 + col1 ) * cor0.col1 * - col1 col0 FROM tab0 AS cor0
----
-1271320
-1499844
-1825311

query I rowsort
SELECT - + col2 * col0 + col2 AS col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT + - col1 + cor0.col0 AS col1 FROM tab0 cor0
----
-2
-62

query I rowsort
SELECT ALL - ( + col1 ) + col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL + + ( - 33 ) + col1 FROM tab0 AS cor0
----
53
58
64

query I rowsort
SELECT DISTINCT ( - col2 ) + + col1 * - col0 FROM tab1 cor0
----
-1136
-132
-697

query I rowsort
SELECT DISTINCT ( col2 ) * col2 + + col2 * - col1 AS col2 FROM tab1 AS cor0
----
1512
2679
7968

query I rowsort
SELECT col2 * + col2 + ( tab2.col1 ) AS col1 FROM tab2
----
1461
735
760

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 cor1, tab1 AS cor2, tab2 cor3
----
3645 values hashing to 85e6cb74738e0d8388af8fb625b2bd38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8706
SELECT CAST( - 7 AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

skipif mysql # not compatible
query I rowsort label-8706
SELECT CAST ( - 7 AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

query I rowsort
SELECT + ( + col0 ) + col1 FROM tab2
----
137
38
96

query I rowsort
SELECT 20 + col2 * col0 * - col2 AS col2 FROM tab0
----
-15
-26116
-598416

query I rowsort
SELECT DISTINCT - col1 * col2 + col0 + 72 AS col1 FROM tab1 AS cor0
----
-1096
-1329
-434

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) + col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL - + ( - col1 ) - + cor0.col0 * + 44 FROM tab2 AS cor0
----
-277
-3373
-3459

query I rowsort
SELECT - - 72 * 28 * - col2 FROM tab0 AS cor0
----
-165312
-2016
-66528

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 16 col1 FROM tab1
----
16

query I rowsort
SELECT - ( 36 ) + col1 AS col2 FROM tab1
----
-10
-23
-26

query I rowsort
SELECT - + cor0.col0 * + col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col2 * 60 AS col1 FROM tab0 AS cor0
----
-1980
-4920
-60

query I rowsort
SELECT ALL col0 * ( col2 ) + col1 AS col2 FROM tab0 cor0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-8718
SELECT col2 DIV + 90 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8718
SELECT col2 / + 90 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 * ( ( col1 ) ) FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8720
SELECT ALL + - col1 DIV 36 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8720
SELECT ALL + - col1 / 36 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ( + 67 ) * col2 FROM tab0 AS cor0
----
2211
5494
67

query I rowsort
SELECT + 76 FROM tab2, tab2 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to a8a6c4c5005303c62d4e50b6c96b584f

query I rowsort
SELECT DISTINCT + cor1.col1 AS col0 FROM tab0, tab2 AS cor0, tab1 cor1
----
10
13
26

query I rowsort
SELECT ALL - cor0.col2 * cor0.col1 FROM tab1, tab2 cor0
----
9 values hashing to c52f276f0448e9317aa4a2c462e0bab5

query I rowsort
SELECT DISTINCT 91 * col0 * col2 FROM tab0
----
3185
664118
72072

query I rowsort
SELECT tab2.col0 * tab2.col1 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to bc669a3cc969c7619ebcffb5400ba0ba

query I rowsort
SELECT DISTINCT + 58 AS col0 FROM tab0, tab2 AS cor0
----
58

query I rowsort
SELECT + - 46 + - col2 FROM tab1 AS cor0
----
-100
-103
-142

query I rowsort
SELECT - col1 * ( col1 ) * + col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8730
SELECT col1 * + CAST( + cor0.col2 AS SIGNED ) FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-8730
SELECT col1 * + CAST ( + cor0.col2 AS INTEGER ) FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8731
SELECT - col2 + - CAST( - col0 AS SIGNED ) * col0 AS col2 FROM tab1 AS cor0
----
-45
4039
6304

skipif mysql # not compatible
query I rowsort label-8731
SELECT - col2 + - CAST ( - col0 AS INTEGER ) * col0 AS col2 FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT cor0.col1 + - col1 * col2 AS col0 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT ( + tab0.col1 ) * 31 FROM tab0, tab1, tab1 AS cor0
----
2666
2821
3007

query I rowsort
SELECT - ( col2 * - col1 ) FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL - 15 * col1 AS col1 FROM tab1
----
-150
-195
-390

query I rowsort
SELECT - col2 * + col0 + - 44 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-11214
-1575
-1848

query I rowsort
SELECT - col1 * - ( - col1 ) FROM tab0 cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8738
SELECT DISTINCT + CAST( 81 AS SIGNED ) FROM tab0, tab1 AS cor0
----
81

skipif mysql # not compatible
query I rowsort label-8738
SELECT DISTINCT + CAST ( 81 AS INTEGER ) FROM tab0, tab1 AS cor0
----
81

query I rowsort
SELECT + 48 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT + col0 + col2 * 35 FROM tab2 AS cor0
----
1409
952
988

query I rowsort
SELECT DISTINCT cor0.col1 + 78 FROM tab1 AS cor0
----
104
88
91

query I rowsort
SELECT + col1 + - 42 AS col0 FROM tab1 AS cor0
----
-16
-29
-32

query I rowsort
SELECT ALL + + col1 + ( 75 ) + col2 AS col0 FROM tab0 cor0
----
173
194
248

query I rowsort
SELECT ALL + + col2 * 99 AS col0 FROM tab0 AS cor0
----
3267
8118
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( ( col0 ) ) col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - col0 * - col2 + - col1 * + 25 * - col2 FROM tab1 AS cor0
----
17898
35262
38880

query I rowsort
SELECT ALL + 65 AS col2 FROM tab0 AS cor0
----
65
65
65

query I rowsort
SELECT DISTINCT + ( + col0 ) AS col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT + - 30 * - col2 FROM tab0 AS cor0
----
2460
30
990

onlyif mysql # use DIV operator for integer division
query I rowsort label-8750
SELECT DISTINCT col2 DIV + 47 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-8750
SELECT DISTINCT col2 / + 47 FROM tab2
----
0

query I rowsort
SELECT tab2.col0 * 39 AS col2 FROM tab2
----
273
3042
3081

query I rowsort
SELECT ALL - col2 + + col1 * + 96 AS col1 FROM tab0
----
8223
8654
9311

onlyif mysql # use DIV operator for integer division
query I rowsort label-8753
SELECT DISTINCT col0 DIV col0 + 58 FROM tab1
----
59

skipif mysql # not compatible
query I rowsort label-8753
SELECT DISTINCT col0 / col0 + 58 FROM tab1
----
59

query I rowsort
SELECT DISTINCT + 93 AS col0 FROM tab2, tab2 AS cor0
----
93

query I rowsort
SELECT 44 AS col2 FROM tab2 cor0
----
44
44
44

query I rowsort
SELECT ALL ( 48 ) * - col0 + + 26 FROM tab0
----
-1126
-1654
-4246

query I rowsort
SELECT 7 * tab2.col0 AS col0 FROM tab2
----
49
546
553

query I rowsort
SELECT - 42 AS col0 FROM tab2 cor0
----
-42
-42
-42

query I rowsort
SELECT - ( col1 ) * - 15 FROM tab0 AS cor0
----
1290
1365
1455

onlyif mysql # use DIV operator for integer division
query I rowsort label-8760
SELECT ( col0 ) DIV + col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8760
SELECT ( col0 ) / + col0 FROM tab2
----
1
1
1

query I rowsort
SELECT + 89 * - 78 FROM tab0
----
-6942
-6942
-6942

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8762
SELECT DISTINCT ( col2 ) * tab1.col0 * CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-8762
SELECT DISTINCT ( col2 ) * tab1.col0 * CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8763
SELECT - 92 DIV - col1 FROM tab2
----
1
2
5

skipif mysql # not compatible
query I rowsort label-8763
SELECT - 92 / - col1 FROM tab2
----
1
2
5

query I rowsort
SELECT + col0 * + col0 * + col0 AS col2 FROM tab1
----
262144
27
512000

query I rowsort
SELECT ( - col2 * col1 ) AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT 79 * col1 * 57 FROM tab0
----
387258
409773
436791

onlyif mysql # use DIV operator for integer division
query I rowsort label-8767
SELECT - col1 * col1 DIV ( - cor0.col0 ) + - col2 * - 74 FROM tab0 AS cor0
----
2750
342
6161

skipif mysql # not compatible
query I rowsort label-8767
SELECT - col1 * col1 / ( - cor0.col0 ) + - col2 * - 74 FROM tab0 AS cor0
----
2750
342
6161

query I rowsort
SELECT - col0 + col0 * ( + col0 + - col0 ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8769
SELECT - col0 - col2 DIV - col0 AS col2 FROM tab1 AS cor0
----
-64
-79
15

skipif mysql # not compatible
query I rowsort label-8769
SELECT - col0 - col2 / - col0 AS col2 FROM tab1 AS cor0
----
-64
-79
15

query I rowsort
SELECT 65 + + col2 AS col1 FROM tab0 AS cor0
----
147
66
98

query I rowsort
SELECT + - col1 * col0 + + col2 FROM tab2 cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL + + 72 FROM tab0 cor0
----
72
72
72

query I rowsort
SELECT ALL + col2 * col2 + - col2 * + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 42 + col0 FROM tab2 AS cor0
----
120
121
49

query I rowsort
SELECT + col2 * + 8 + cor0.col1 FROM tab1 AS cor0
----
458
466
781

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8776
SELECT ALL - CAST( NULL AS SIGNED ) + col0 + col0 * 32 / + col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8776
SELECT ALL - CAST ( NULL AS INTEGER ) + col0 + col0 * 32 / + col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 62 AS col1 FROM tab2 AS cor0
----
-62
-62
-62

query I rowsort
SELECT DISTINCT - 4 + - tab1.col0 - - col2 FROM tab1
----
-11
12
47

query I rowsort
SELECT col0 + - col0 + col0 * + tab1.col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT - col1 * - col0 - + col0 * col1 AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT col1 + - col1 * - ( - 69 * - col2 + + col0 ) AS col0 FROM tab0 AS cor0
----
10185
197972
523068

query I rowsort
SELECT + col1 * + 82 AS col1 FROM tab2
----
1394
2542
4838

query I rowsort
SELECT DISTINCT - col1 * col0 - - col1 AS col2 FROM tab0
----
-1978
-3298
-8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col2 * col1 + - col0 - + col2 col2 FROM tab1
----
-16400
-36561
-5821

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8785
SELECT DISTINCT + 82 * - cor0.col2 + - col0 * + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8785
SELECT DISTINCT + 82 * - cor0.col2 + - col0 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - ( 33 ) + - col2 * + 91 FROM tab2 AS cor0
----
-2399
-2490
-3491

onlyif mysql # use DIV operator for integer division
query I rowsort label-8787
SELECT ALL - - ( col2 ) DIV col0 AS col0 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-8787
SELECT ALL - - ( col2 ) / col0 AS col0 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT 15 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT DISTINCT + 62 + - col1 + - tab0.col1 FROM tab0
----
-110
-120
-132

query I rowsort
SELECT ALL - col1 * ( col0 ) + col2 + + col0 FROM tab1
----
-21
-519
-864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8791
SELECT DISTINCT + - CAST( NULL AS SIGNED ) FROM tab0, tab1, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8791
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) FROM tab0, tab1, tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL 81 * + tab0.col0 + + col2 AS col0 FROM tab0
----
1977
2836
7291

query I rowsort
SELECT ALL col2 - 96 AS col0 FROM tab1 AS cor0
----
-39
-42
0

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 * ( cor0.col0 ) + col2 FROM tab0 AS cor0
----
13857
42876
705051

query I rowsort
SELECT ALL - + cor0.col2 * cor0.col0 - + cor0.col2 AS col0 FROM tab0 AS cor0
----
-36
-7380
-825

onlyif mysql # use DIV operator for integer division
query I rowsort label-8796
SELECT ALL col2 DIV col2 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8796
SELECT ALL col2 / col2 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT 97 * col1 FROM tab2
----
1649
3007
5723

query I rowsort
SELECT - tab0.col0 * - tab0.col1 * - 47 AS col0 FROM tab0
----
-159565
-380653
-97008

onlyif mysql # use DIV operator for integer division
query I rowsort label-8799
SELECT ALL 94 + tab0.col1 DIV + ( tab0.col2 ) AS col2 FROM tab0
----
191
95
96

skipif mysql # not compatible
query I rowsort label-8799
SELECT ALL 94 + tab0.col1 / + ( tab0.col2 ) AS col2 FROM tab0
----
191
95
96

query I rowsort
SELECT DISTINCT col1 + 56 FROM tab0 AS cor0
----
142
147
153

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 - col0 col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT + col1 * 91 AS col0 FROM tab0 AS cor0
----
7826
8281
8827

query I rowsort
SELECT ALL col2 + 38 FROM tab0 AS cor0
----
120
39
71

query I rowsort
SELECT DISTINCT + + col2 + + 92 * + col2 + col2 AS col2 FROM tab0 AS cor0
----
3102
7708
94

query I rowsort
SELECT cor0.col1 + - ( - col2 ) FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + col1 + 83 * - 95 * col1 FROM tab2 AS cor0
----
-134028
-244404
-465156

query I rowsort
SELECT ALL + col2 * ( - col0 ) + + cor0.col0 * - col1 AS col2 FROM tab0 cor0
----
-15397
-2856
-3430

query I rowsort
SELECT - col1 + + 81 AS col2 FROM tab0 AS cor0
----
-10
-16
-5

onlyif mysql # use DIV operator for integer division
query I rowsort label-8809
SELECT ALL - col0 DIV - col0 + + cor0.col1 AS col0 FROM tab0 cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-8809
SELECT ALL - col0 / - col0 + + cor0.col1 AS col0 FROM tab0 cor0
----
87
92
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8810
SELECT + - col2 * CAST( - col0 AS SIGNED ) FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-8810
SELECT + - col2 * CAST ( - col0 AS INTEGER ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + col2 + - ( + col2 + + tab2.col1 ) AS col1 FROM tab2
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8812
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8812
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - cor1.col1 * + cor1.col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to a95320dbb4fb4aa98e2920d866f19abe

query I rowsort
SELECT ALL + - col1 + + 80 AS col2 FROM tab2 AS cor0
----
21
49
63

query I rowsort
SELECT DISTINCT 88 * col1 FROM tab1 AS cor0
----
1144
2288
880

query I rowsort
SELECT + - 68 + - col1 * - col1 FROM tab0 AS cor0
----
7328
8213
9341

query I rowsort
SELECT DISTINCT - col1 * - 7 + col1 FROM tab0 AS cor0
----
688
728
776

query I rowsort
SELECT ALL - 21 * col2 AS col2 FROM tab0 cor0
----
-1722
-21
-693

query I rowsort
SELECT DISTINCT - col0 + + col1 * col0 AS col2 FROM tab2 AS cor0
----
1264
210
4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + - 66 * col2 - ( - ( col0 ) ) col2 FROM tab1 AS cor0
----
-3558
-3634
-6176

query I rowsort
SELECT ALL + - 38 FROM tab0 cor0
----
-38
-38
-38

query I rowsort
SELECT - + 90 * col2 FROM tab2 AS cor0
----
-2340
-2430
-3420

query I rowsort
SELECT - 34 + - col1 AS col2 FROM tab1 AS cor0
----
-44
-47
-60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8824
SELECT - + CAST( col1 AS SIGNED ) * - col2 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-8824
SELECT - + CAST ( col1 AS INTEGER ) * - col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + ( + 1 ) * col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - col1 * + 57 FROM tab2 AS cor0
----
-1767
-3363
-969

onlyif mysql # use DIV operator for integer division
query I rowsort label-8827
SELECT col1 * col2 + col1 + + col1 DIV - col2 col2 FROM tab0 AS cor0
----
2922
7552
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8827
SELECT col1 * col2 + col1 + + col1 / - col2 col2 FROM tab0 AS cor0
----
2922
7552
97

query I rowsort
SELECT - col0 * + col1 * col1 - cor0.col1 FROM tab0 AS cor0
----
-177590
-329412
-737100

query I rowsort
SELECT DISTINCT - + 33 + col0 FROM tab2 AS cor0
----
-26
45
46

query I rowsort
SELECT 2 + col2 AS col2 FROM tab2 AS cor0
----
28
29
40

query I rowsort
SELECT ALL - + 43 * - col0 FROM tab2 AS cor0
----
301
3354
3397

query I rowsort
SELECT DISTINCT col1 * col1 + + 46 AS col1 FROM tab2
----
1007
335
3527

query I rowsort
SELECT ALL - tab1.col2 + + col2 AS col0 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8834
SELECT col0 + - cor0.col1 * - CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
1612
725
844

skipif mysql # not compatible
query I rowsort label-8834
SELECT col0 + - cor0.col1 * - CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-8835
SELECT ALL + 37 * col2 DIV - cor0.col1 FROM tab1 AS cor0
----
-210
-273
-76

skipif mysql # not compatible
query I rowsort label-8835
SELECT ALL + 37 * col2 / - cor0.col1 FROM tab1 AS cor0
----
-210
-273
-76

query I rowsort
SELECT - - 22 * col0 - - 70 AS col0 FROM tab1 cor0
----
136
1478
1830

query I rowsort
SELECT DISTINCT + 99 + - cor0.col2 * col0 AS col1 FROM tab0 AS cor0
----
-693
-7199
64

query I rowsort
SELECT col0 + col1 * 82 AS col0 FROM tab2 AS cor0
----
1473
2549
4916

query I rowsort
SELECT DISTINCT - 84 FROM tab2 cor0
----
-84

query I rowsort
SELECT + col1 * col2 * + cor0.col2 FROM tab1 cor0
----
119808
32490
75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-8841
SELECT - + col2 DIV + col0 AS col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-8841
SELECT - + col2 / + col0 AS col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT + col1 + col0 * - 8 AS col1 FROM tab0 AS cor0
----
-106
-183
-621

query I rowsort
SELECT - - cor0.col0 * 94 + cor0.col1 AS col1 FROM tab2 cor0
----
689
7391
7443

query I rowsort
SELECT + + col2 + ( col2 ) * + cor0.col2 * + 64 + col1 AS col0 FROM tab2 AS cor0
----
43349
46714
92471

query I rowsort
SELECT ALL - tab2.col1 + + col1 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL 87 - - 18 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a8f8daa1a1bfedb1421594e2314a6b6d

query I rowsort
SELECT + col0 + + col1 * - ( col2 ) + - col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT 26 * + col1 AS col0 FROM tab2
----
1534
442
806

query I rowsort
SELECT col2 * - cor0.col2 AS col1 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + 20 + - col0 AS col2 FROM tab1 AS cor0
----
-44
-60
17

query I rowsort
SELECT + ( - col2 ) AS col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT ( col2 * col2 ) AS col0 FROM tab0
----
1
1089
6724

query I rowsort
SELECT + tab1.col0 + ( - col0 ) FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - ( - col0 ) AS col0 FROM tab0
----
24
35
89

query I rowsort
SELECT - col2 * + col1 + 40 FROM tab1 cor0
----
-1208
-1364
-530

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1, tab0 AS cor0, tab0, tab1 AS cor1
----
10
13
26

query I rowsort
SELECT ALL - 85 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT - - col2 + ( - col1 ) FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL - col1 + + 22 FROM tab2 AS cor0
----
-37
-9
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8860
SELECT + col0 * - CAST( ( + col2 ) AS SIGNED ) + col0 * + col0 * col2 FROM tab0 AS cor0
----
1190
18216
642224

skipif mysql # not compatible
query I rowsort label-8860
SELECT + col0 * - CAST ( ( + col2 ) AS INTEGER ) + col0 * + col0 * col2 FROM tab0 AS cor0
----
1190
18216
642224

query I rowsort
SELECT + + ( + col0 ) AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - 51 * + tab0.col1 FROM tab0
----
-4386
-4641
-4947

query I rowsort
SELECT - cor0.col0 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT - + 95 * col1 * cor0.col1 + + cor0.col0 FROM tab2 AS cor0
----
-27376
-330617
-91288

query I rowsort
SELECT col1 + + ( - col1 + 27 ) FROM tab2
----
27
27
27

query I rowsort
SELECT ALL - 91 FROM tab0, tab1 cor0
----
9 values hashing to 745d1c3a09d935465cad552325c5c945

query I rowsort
SELECT - 53 + col2 FROM tab2 AS cor0
----
-15
-26
-27

query I rowsort
SELECT - - cor0.col0 + + col0 AS col1 FROM tab2 AS cor0
----
14
156
158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8869
SELECT + CAST( + col1 AS SIGNED ) * - cor0.col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-8869
SELECT + CAST ( + col1 AS INTEGER ) * - cor0.col2 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8870
SELECT col1 - ( + cor0.col1 * CAST( NULL AS SIGNED ) ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8870
SELECT col1 - ( + cor0.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 + + col0 - + col2 col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT - col2 * + col1 + + col1 * col2 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8873
SELECT DISTINCT - + col1 * + col0 + CAST( NULL AS SIGNED ) * + 64 + col0 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8873
SELECT DISTINCT - + col1 * + col0 + CAST ( NULL AS INTEGER ) * + 64 + col0 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - col0 + col0 * - ( col0 + col0 * + col0 ) AS col0 FROM tab1 AS cor0
----
-266304
-39
-518480

query I rowsort
SELECT - 83 + cor0.col1 * - ( cor0.col2 ) FROM tab0 AS cor0
----
-180
-2921
-7545

query I rowsort
SELECT + ( - cor0.col2 ) + + cor0.col1 * 10 AS col1 FROM tab2 AS cor0
----
132
283
564

query I rowsort
SELECT 22 * - col2 AS col2 FROM tab0 AS cor0
----
-1804
-22
-726

query I rowsort
SELECT - col1 * cor0.col1 + cor0.col0 AS col2 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL - col2 * col1 + 30 AS col0 FROM tab1 AS cor0
----
-1218
-1374
-540

query I rowsort
SELECT ALL + col0 - - col0 * + ( - col1 ) FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - - 6 * + col0 + col0 AS col1 FROM tab2 AS cor0
----
49
546
553

query I rowsort
SELECT + 58 + - 19 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8884
SELECT cor0.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-8884
SELECT cor0.col1 / + col2 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + col2 * - 54 + col0 * col0 AS col2 FROM tab2 AS cor0
----
-1409
4189
4680

query I rowsort
SELECT DISTINCT + col0 * - col0 + col1 * - col0 AS col0 FROM tab1 AS cor0
----
-4736
-7440
-87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8887
SELECT ALL + ( col2 ) + - col1 * CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8887
SELECT ALL + ( col2 ) + - col1 * CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8888
SELECT col1 DIV tab1.col2 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8888
SELECT col1 / tab1.col2 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT - + cor0.col0 * + 15 FROM tab0 cor0
----
-1335
-360
-525

query I rowsort
SELECT DISTINCT + + cor0.col1 * 79 AS col1 FROM tab0 AS cor0
----
6794
7189
7663

onlyif mysql # use DIV operator for integer division
query I rowsort label-8891
SELECT - - col1 * + col2 + cor0.col1 DIV - col0 FROM tab2 AS cor0
----
1534
646
833

skipif mysql # not compatible
query I rowsort label-8891
SELECT - - col1 * + col2 + cor0.col1 / - col0 FROM tab2 AS cor0
----
1534
646
833

onlyif mysql # use DIV operator for integer division
query I rowsort label-8892
SELECT DISTINCT + col2 DIV col0 AS col2 FROM tab2
----
0
3

skipif mysql # not compatible
query I rowsort label-8892
SELECT DISTINCT + col2 / col0 AS col2 FROM tab2
----
0
3

query I rowsort
SELECT tab1.col1 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8894
SELECT DISTINCT col2 * CAST( NULL AS SIGNED ) col0 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8894
SELECT DISTINCT col2 * CAST ( NULL AS INTEGER ) col0 FROM tab0
----
NULL

query I rowsort
SELECT + col2 - - tab2.col2 AS col1 FROM tab2
----
52
54
76

query I rowsort
SELECT ALL col0 * + col1 * + tab0.col2 AS col0 FROM tab0
----
3395
664118
68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col1 + col2 * col0 col0 FROM tab2
----
2113
247
3057

query I rowsort
SELECT tab0.col1 * col1 * col1 - col1 AS col1 FROM tab0 WHERE NULL NOT IN ( - col2 + - col0 + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col2 col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT - cor0.col0 + - col2 * - col1 * - col2 FROM tab1 AS cor0
----
-119888
-32554
-75819

onlyif mysql # use DIV operator for integer division
query I rowsort label-8901
SELECT ALL col0 DIV col1 + - cor0.col0 * col1 AS col0 FROM tab2 AS cor0
----
-1339
-217
-4601

skipif mysql # not compatible
query I rowsort label-8901
SELECT ALL col0 / col1 + - cor0.col0 * col1 AS col0 FROM tab2 AS cor0
----
-1339
-217
-4601

onlyif mysql # use DIV operator for integer division
query I rowsort label-8902
SELECT ALL col0 * col0 + - col1 DIV - col2 FROM tab1 AS cor0
----
4096
6400
9

skipif mysql # not compatible
query I rowsort label-8902
SELECT ALL col0 * col0 + - col1 / - col2 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8903
SELECT DISTINCT col2 DIV col1 + - col2 FROM tab1 AS cor0
----
-52
-89

skipif mysql # not compatible
query I rowsort label-8903
SELECT DISTINCT col2 / col1 + - col2 FROM tab1 AS cor0
----
-52
-89

query I rowsort
SELECT ALL col1 * - col0 AS col0 FROM tab0 WHERE NULL <= NULL
----

query I rowsort
SELECT ALL col2 + + tab2.col2 AS col1 FROM tab2
----
52
54
76

query I rowsort
SELECT tab0.col2 + - tab0.col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8907
SELECT ALL col1 + + tab1.col2 DIV - col1 AS col1 FROM tab1
----
24
5
6

skipif mysql # not compatible
query I rowsort label-8907
SELECT ALL col1 + + tab1.col2 / - col1 AS col1 FROM tab1
----
24
5
6

query I rowsort
SELECT DISTINCT col0 + + col1 * col0 AS col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT ALL col0 * col1 * col1 + - col1 FROM tab1
----
13507
2002
6390

query I rowsort
SELECT tab1.col1 + tab1.col1 + tab1.col2 * + col1 AS col1 FROM tab1
----
1274
1456
590

query I rowsort
SELECT DISTINCT - col0 - col2 * col2 FROM tab0
----
-1113
-36
-6813

query I rowsort
SELECT ALL col2 AS col1 FROM tab2 WHERE ( - col0 * col2 ) NOT IN ( - col1 * col2 + + col1 )
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-8913
SELECT + cor0.col1 + col2 * col0 * col2 + col1 DIV + col0 col0 FROM tab0 AS cor0
----
134
26225
598528

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8913
SELECT + cor0.col1 + col2 * col0 * col2 + col1 / + col0 col0 FROM tab0 AS cor0
----
134
26225
598528

query I rowsort
SELECT ALL col1 * cor0.col2 * col0 + - col0 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
106240
40576
4221

query I rowsort
SELECT DISTINCT + - col1 * - col0 * col0 + + cor0.col0 + col1 * + col1 FROM tab0 AS cor0
----
128269
56956
729181

query I rowsort
SELECT ALL + col2 * + col1 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL - + col2 * col2 + + col0 + col2 AS col0 FROM tab0 AS cor0
----
-1032
-6553
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 + col2 - + col1 col1 FROM tab1 AS cor0
----
2
37
70

query I rowsort
SELECT + col1 * - col1 + cor0.col2 AS col0 FROM tab2 AS cor0
----
-251
-3455
-934

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL + - col2 * col0 * + col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT + col0 * + col2 * col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT ALL - col1 - + col0 AS col2 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT - col2 * - col0 + + col0 AS col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL col1 * - cor0.col1 + + col2 AS col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT col2 + + col0 * col2 AS col1 FROM tab2
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + col0 col0 FROM tab2
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * ( 52 * + col1 ) col2 FROM tab0 AS cor0
----
107328
176540
421148

onlyif mysql # use DIV operator for integer division
query I rowsort label-8929
SELECT + - col1 + - CAST( 39 AS SIGNED ) DIV + col2 FROM tab0 AS cor0
----
-136
-87
-91

skipif mysql # not compatible
query I rowsort label-8929
SELECT + - col1 + - CAST ( 39 AS INTEGER ) / + col2 FROM tab0 AS cor0
----
-136
-87
-91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8930
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab2, tab1 cor0, tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-8930
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab2, tab1 cor0, tab2 AS cor1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col0 + + col2 col1 FROM tab0
----
133
143
262

query I rowsort
SELECT + col2 + - col2 + col1 AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL + col2 + - tab1.col2 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * - col1 * + tab1.col2 AS col0 FROM tab1
----
-16224
-36504
-5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-8935
SELECT + col2 DIV cor0.col2 + - col0 * - col2 FROM tab1 AS cor0
----
163
3649
7681

skipif mysql # not compatible
query I rowsort label-8935
SELECT + col2 / cor0.col2 + - col0 * - col2 FROM tab1 AS cor0
----
163
3649
7681

query I rowsort
SELECT DISTINCT + + col2 - 72 AS col0 FROM tab1 AS cor0
----
-15
-18
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8937
SELECT col0 * CAST( col2 AS SIGNED ) col1 FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8937
SELECT col0 * CAST ( col2 AS INTEGER ) col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + col0 * + col0 + - col2 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT ALL - + col2 * 85 * col2 AS col2 FROM tab1 AS cor0
----
-247860
-276165
-783360

query I rowsort
SELECT DISTINCT - col1 * - 50 * col0 + - cor0.col2 FROM tab2 AS cor0
----
10823
230074
67112

query I rowsort
SELECT - col2 * ( + col2 ) + col0 AS col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * 23 * col2 col1 FROM tab1 AS cor0
----
-211968
-67068
-74727

query I rowsort
SELECT col0 + + ( ( col2 ) + 89 ) * + col2 * col0 AS col1 FROM tab1 cor0
----
1420880
23169
532672

query I rowsort
SELECT ALL - cor0.col1 + + col0 + - col2 * col2 AS col0 FROM tab0 cor0
----
-1151
-63
-6726

query I rowsort
SELECT DISTINCT - col1 - - col2 * col2 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT col1 * col2 * cor0.col2 + cor0.col1 AS col1 FROM tab0 AS cor0
----
194
611975
93740

onlyif mysql # use DIV operator for integer division
query I rowsort label-8947
SELECT col0 * - col2 DIV col2 + col2 AS col1 FROM tab0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-8947
SELECT col0 * - col2 / col2 + col2 AS col1 FROM tab0
----
-34
-7
9

query III rowsort
SELECT ALL * FROM tab0 WHERE ( NULL ) NOT BETWEEN ( col0 ) AND + col0 + + col1
----

query I rowsort
SELECT DISTINCT col1 + - col2 + tab2.col0 * - col1 FROM tab2
----
-1364
-213
-4569

query III rowsort
SELECT * FROM tab1 WHERE ( NULL ) <= ( col1 )
----

query I rowsort
SELECT col2 * + col2 * col1 + col1 * col0 * + col0 AS col1 FROM tab1
----
203008
73450
76050

query I rowsort
SELECT DISTINCT tab0.col2 * - col0 * - tab0.col0 AS col1 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT ALL col2 + + col2 * col1 AS col2 FROM tab2
----
1560
684
864

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT ( NULL ) NOT IN ( - col1 )
----

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) IN ( col0 * col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8956
SELECT - col2 DIV - col1 + - col1 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-8956
SELECT - col2 / - col1 + - col1 FROM tab0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8957
SELECT DISTINCT - col1 * - tab1.col0 DIV + col0 AS col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-8957
SELECT DISTINCT - col1 * - tab1.col0 / + col0 AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL + col2 * - tab2.col0 + tab2.col1 * col1 * tab2.col1 + col1 FROM tab2
----
1928
203410
29633

query I rowsort
SELECT col0 * + col1 - + tab1.col2 * - col1 FROM tab1
----
1210
1482
2288

onlyif mysql # use DIV operator for integer division
query I rowsort label-8960
SELECT DISTINCT - col2 DIV + col1 col0 FROM tab1
----
-2
-5
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8960
SELECT DISTINCT - col2 / + col1 col0 FROM tab1
----
-2
-5
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-8961
SELECT ALL - col0 DIV tab2.col1 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-8961
SELECT ALL - col0 / tab2.col1 FROM tab2
----
-1
-4
0

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL NOT IN ( tab1.col0 + + col1 )
----

query III rowsort
SELECT * FROM tab2 WHERE col1 NOT BETWEEN NULL AND ( + col1 * col0 * - col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT ( + col1 ) NOT BETWEEN col1 AND + col1
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( + col2 * col0 ) BETWEEN NULL AND - col2
----

query I rowsort
SELECT cor0.col1 * + col0 + - col1 * 31 FROM tab0 AS cor0
----
-602
388
5278

query I rowsort
SELECT DISTINCT col1 + + cor0.col2 FROM tab0 cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8968
SELECT DISTINCT + - 58 DIV col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8968
SELECT DISTINCT + - 58 / col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - - 77 FROM tab0 AS cor0
----
77
77
77

query I rowsort
SELECT ALL + col2 + + cor0.col1 - + col1 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + col2 + col2 + - col0 * col1 FROM tab1
----
-526
-848
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-8972
SELECT DISTINCT col0 DIV - col2 + - col1 DIV + col0 + - col1 AS col2 FROM tab0
----
-134
-89
-93

skipif mysql # not compatible
query I rowsort label-8972
SELECT DISTINCT col0 / - col2 + - col1 / + col0 + - col1 AS col2 FROM tab0
----
-134
-89
-93

query I rowsort
SELECT - col0 + col0 + - col2 AS col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT + + cor0.col0 + + cor0.col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - col2 * + col1 + col1 + col1 * + col1 FROM tab1 AS cor0
----
-1066
-460
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-8976
SELECT - + col2 + col1 DIV + col0 + - col1 col1 FROM tab0 AS cor0
----
-116
-172
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8976
SELECT - + col2 + col1 / + col0 + - col1 col1 FROM tab0 AS cor0
----
-116
-172
-96

query I rowsort
SELECT + cor0.col0 + - col0 + - 9 * - cor0.col1 FROM tab1 AS cor0
----
117
234
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-8978
SELECT - col1 * + 65 * col0 + - col1 DIV - col1 AS col0 FROM tab1 AS cor0
----
-41599
-5069
-67599

skipif mysql # not compatible
query I rowsort label-8978
SELECT - col1 * + 65 * col0 + - col1 / - col1 AS col0 FROM tab1 AS cor0
----
-41599
-5069
-67599

query I rowsort
SELECT - col1 + - 12 FROM tab2 AS cor0
----
-29
-43
-71

query I rowsort
SELECT - col1 * ( - col1 ) + - col2 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT ALL 32 - cor0.col0 FROM tab0, tab0 cor0, tab1 AS cor1
----
27 values hashing to ab9b1c54268c427b3e605af0ff63dcc0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - + 86 * - col0 col0 FROM tab1 AS cor0
----
204
5447
6784

query I rowsort
SELECT ALL col0 + col1 * col0 AS col2 FROM tab1
----
1120
704
81

query I rowsort
SELECT + col2 * + 69 FROM tab2 AS cor0
----
1794
1863
2622

query I rowsort
SELECT + col1 * 48 + col0 * - col2 + cor0.col2 * cor0.col0 AS col1 FROM tab1 cor0
----
1248
480
624

query I rowsort
SELECT DISTINCT 65 AS col2 FROM tab1 AS cor0
----
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8987
SELECT + CAST( NULL AS SIGNED ) * cor0.col1 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8987
SELECT + CAST ( NULL AS INTEGER ) * cor0.col1 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col1 * 17 + - col1 * + col0 * col0 + - col2 AS col0 FROM tab1 AS cor0
----
-40847
-83075
154

query I rowsort
SELECT 85 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT DISTINCT - 5 AS col0 FROM tab1, tab2 AS cor0
----
-5

onlyif mysql # use DIV operator for integer division
query I rowsort label-8991
SELECT - 0 + col2 DIV col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-8991
SELECT - 0 + col2 / col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT - 29 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 56a8aa9e4c5d3c934d1853afeb22653e

query I rowsort
SELECT - col1 * col0 * - col0 AS col2 FROM tab1
----
234
40960
83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-8994
SELECT DISTINCT 75 DIV col0 col0 FROM tab2
----
0
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8994
SELECT DISTINCT 75 / col0 col0 FROM tab2
----
0
10

query I rowsort
SELECT DISTINCT ( col2 ) * + col0 * - col0 AS col2 FROM tab0
----
-1225
-19008
-649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 col0 FROM tab1 cor0
----
52
52
52

query I rowsort
SELECT col2 * + col2 - col2 * 23 AS col0 FROM tab1 cor0
----
1674
1938
7008

query I rowsort
SELECT ALL + 91 * cor0.col1 * - cor0.col0 + - 70 FROM tab1 AS cor0
----
-58310
-7168
-94710

query I rowsort
SELECT - 55 * - col1 FROM tab2 AS cor0
----
1705
3245
935

query I rowsort
SELECT ALL + col0 + - col0 * col1 AS col1 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT col0 - - col2 * - col0 AS col0 FROM tab2
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col1 * + col0 - + col2 col0 FROM tab1
----
13424
1974
6343

query I rowsort
SELECT cor0.col1 + - col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT + col2 + + col2 + - col0 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
2130
3397
8263

onlyif mysql # use DIV operator for integer division
query I rowsort label-9005
SELECT ALL - 38 DIV col1 + + col0 * col0 AS col0 FROM tab0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-9005
SELECT ALL - 38 / col1 + + col0 * col0 AS col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT 96 + col0 FROM tab1
----
160
176
99

query I rowsort
SELECT ALL col1 + tab2.col1 + + tab2.col2 AS col2 FROM tab2
----
144
72
89

query I rowsort
SELECT + 99 - + ( + col0 ) * + col2 AS col1 FROM tab0
----
-693
-7199
64

query I rowsort
SELECT - 36 + cor0.col0 + col2 * col0 FROM tab2 AS cor0
----
160
2070
3045

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9010
SELECT - + CAST( NULL AS SIGNED ) + + col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9010
SELECT - + CAST ( NULL AS INTEGER ) + + col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9011
SELECT ( - col1 ) DIV - col1 + + col2 * - col2 FROM tab2 AS cor0
----
-1443
-675
-728

skipif mysql # not compatible
query I rowsort label-9011
SELECT ( - col1 ) / - col1 + + col2 * - col2 FROM tab2 AS cor0
----
-1443
-675
-728

query I rowsort
SELECT cor0.col2 + - cor0.col2 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL 67 * col2 FROM tab0 AS cor0
----
2211
5494
67

query I rowsort
SELECT - 32 * - col0 AS col1 FROM tab2 AS cor0
----
224
2496
2528

query I rowsort
SELECT ( - cor0.col0 ) * - col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + 1 * col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + col2 * 23 AS col2 FROM tab2
----
598
621
874

query I rowsort
SELECT ALL 17 * col2 AS col0 FROM tab0
----
1394
17
561

onlyif mysql # use DIV operator for integer division
query I rowsort label-9019
SELECT ALL + - col2 + - col0 DIV cor0.col1 AS col0 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-9019
SELECT ALL + - col2 + - col0 / cor0.col1 AS col0 FROM tab0 cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-9020
SELECT DISTINCT - col0 * + col2 - col2 DIV col1 AS col0 FROM tab1 AS cor0
----
-164
-3653
-7687

skipif mysql # not compatible
query I rowsort label-9020
SELECT DISTINCT - col0 * + col2 - col2 / col1 AS col0 FROM tab1 AS cor0
----
-164
-3653
-7687

query I rowsort
SELECT DISTINCT 28 + + col2 AS col1 FROM tab0 AS cor0
----
110
29
61

query I rowsort
SELECT DISTINCT 46 * col1 * col2 + + col0 AS col2 FROM tab2 AS cor0
----
29795
38509
70642

query I rowsort
SELECT - 86 * + col1 AS col0 FROM tab1 AS cor0
----
-1118
-2236
-860

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9024
SELECT - - 57 * - col2 * CAST( col0 AS SIGNED ) FROM tab1 cor0
----
-207936
-437760
-9234

skipif mysql # not compatible
query I rowsort label-9024
SELECT - - 57 * - col2 * CAST ( col0 AS INTEGER ) FROM tab1 cor0
----
-207936
-437760
-9234

query I rowsort
SELECT - 15 + cor0.col2 FROM tab2 AS cor0
----
11
12
23

query I rowsort
SELECT ALL - ( + cor0.col1 ) FROM tab1, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT ( col0 ) * + col2 FROM tab1
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 77 col0 FROM tab1, tab1 cor0, tab2 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT + + col1 * - col0 * col1 + + col1 AS col0 FROM tab0 AS cor0
----
-177418
-329218
-736918

onlyif mysql # use DIV operator for integer division
query I rowsort label-9030
SELECT 13 + col1 DIV 15 AS col2 FROM tab1 AS cor0
----
13
13
14

skipif mysql # not compatible
query I rowsort label-9030
SELECT 13 + col1 / 15 AS col2 FROM tab1 AS cor0
----
13
13
14

query I rowsort
SELECT ALL - - col2 * cor0.col2 + + ( 98 ) FROM tab1 AS cor0
----
3014
3347
9314

query I rowsort
SELECT ( - col2 ) + cor0.col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL col0 + + col0 * + 27 * 90 + + col2 AS col2 FROM tab0 cor0
----
216441
58377
85086

query I rowsort
SELECT ALL - col2 + col0 * ( col1 ) FROM tab1 AS cor0
----
24
583
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-9035
SELECT DISTINCT + col0 - cor0.col0 DIV + col2 FROM tab1 AS cor0
----
3
63
80

skipif mysql # not compatible
query I rowsort label-9035
SELECT DISTINCT + col0 - cor0.col0 / + col2 FROM tab1 AS cor0
----
3
63
80

query I rowsort
SELECT - 14 * cor0.col1 FROM tab0, tab1 cor0
----
9 values hashing to fc03bc64ab1475535aa30b761cdafa2c

onlyif mysql # use DIV operator for integer division
query I rowsort label-9037
SELECT ALL + col0 + + 32 DIV 11 col1 FROM tab1
----
5
66
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9037
SELECT ALL + col0 + + 32 / 11 col1 FROM tab1
----
5
66
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 * + tab2.col1 + col1 col2 FROM tab2
----
1593
663
868

query I rowsort
SELECT ALL col0 + tab0.col0 + col0 AS col1 FROM tab0
----
105
267
72

query I rowsort
SELECT + 39 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9041
SELECT DISTINCT + cor0.col2 * + CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9041
SELECT DISTINCT + cor0.col2 * + CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 * 94 + 92 FROM tab0 AS cor0
----
-7992
-8462
-9026

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab1 cor1, tab1 cor2
----
972 values hashing to 7864aada86bf5bf5e1621c7905de8dcd

query I rowsort
SELECT DISTINCT + + ( col2 ) * col1 + 97 * + col1 FROM tab1 AS cor0
----
1540
2509
3926

query I rowsort
SELECT ALL - 94 * 22 + col1 * + col2 FROM tab2 AS cor0
----
-1231
-1422
-534

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9046
SELECT DISTINCT + + col0 * col2 + col1 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9046
SELECT DISTINCT + + col0 * col2 + col1 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + ( + col0 ) - col1 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col1 AS REAL ) - - col1 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-9049
SELECT DISTINCT - col2 * cor0.col0 DIV cor0.col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-9049
SELECT DISTINCT - col2 * cor0.col0 / cor0.col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + ( + 97 ) * + cor0.col2 FROM tab0 AS cor0
----
3201
7954
97

query I rowsort
SELECT col0 * col1 + + col1 + col1 * ( - col1 ) AS col0 FROM tab0
----
-5246
-5917
-91

query I rowsort
SELECT - 4 + cor0.col0 FROM tab2 AS cor0
----
3
74
75

query I rowsort
SELECT ALL - ( 74 ) * col0 AS col1 FROM tab0 AS cor0
----
-1776
-2590
-6586

onlyif mysql # use DIV operator for integer division
query I rowsort label-9054
SELECT tab2.col1 DIV 43 AS col1 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9054
SELECT tab2.col1 / 43 AS col1 FROM tab2
----
0
0
1

query I rowsort
SELECT 43 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT 22 * col2 FROM tab2 AS cor0
----
572
594
836

query I rowsort
SELECT col0 * - ( col1 ) AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - 17 FROM tab1, tab0 cor0
----
9 values hashing to 490d008f3fb5b70d3971cfc6d84503f4

query I rowsort
SELECT + - 14 * col1 FROM tab2 AS cor0
----
-238
-434
-826

query I rowsort
SELECT - 0 FROM tab0, tab2 cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

query I rowsort
SELECT 18 * col0 + + cor0.col2 + col1 AS col2 FROM tab1 AS cor0
----
1219
134
1549

query I rowsort
SELECT ALL 99 + 41 AS col0 FROM tab1
----
140
140
140

query I rowsort
SELECT ALL 42 + col0 AS col1 FROM tab2
----
120
121
49

query I rowsort
SELECT col0 * col2 + 85 + - 91 * - col1 AS col2 FROM tab0 cor0
----
15664
8703
8947

query I rowsort
SELECT + ( col1 ) + 63 AS col0 FROM tab0 AS cor0
----
149
154
160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + + cor0.col2 * - col0 * 31 + col0 col1 FROM tab1 AS cor0
----
-113014
-237987
-4993

query I rowsort
SELECT - + 60 * + cor0.col2 AS col2 FROM tab0 cor0
----
-1980
-4920
-60

query I rowsort
SELECT ALL 63 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT tab1.col1 * + col2 * - col2 AS col2 FROM tab1
----
-119808
-32490
-75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-9070
SELECT col1 DIV - col1 AS col2 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9070
SELECT col1 / - col1 AS col2 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 53 AS col2 FROM tab0
----
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - tab2.col2 + + col2 * 66 * - col2 col0 FROM tab2
----
-43940
-47385
-93860

query I rowsort
SELECT ( col2 ) * + tab2.col0 * 16 AS col1 FROM tab2
----
3024
32448
48032

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9074
SELECT ALL 49 + - col0 * col0 + CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9074
SELECT ALL 49 + - col0 * col0 + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * 36 * 53 col1 FROM tab1 AS cor0
----
-122112
-152640
-5724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * 12 + - col0 col2 FROM tab2 AS cor0
----
-331
-390
-535

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + 87 col1 FROM tab2 AS cor0
----
165
166
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + ( - col1 ) + col0 + + 78 col1 FROM tab2 AS cor0
----
1690
803
922

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 col1 FROM tab0
----
30
30
30

query I rowsort
SELECT ( tab1.col1 * - 70 ) AS col1 FROM tab1
----
-1820
-700
-910

query I rowsort
SELECT col2 * + col2 * ( col0 * + col0 ) + - ( + col0 ) AS col0 FROM tab1
----
13307840
26241
58982320

query I rowsort
SELECT 52 - - col1 * 2 * col2 FROM tab1
----
1192
2548
2860

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0, tab0 cor1, tab1 AS cor2
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

query I rowsort
SELECT DISTINCT - col0 + col2 + + 29 AS col2 FROM tab1 AS cor0
----
22
45
80

query I rowsort
SELECT DISTINCT + col0 * - 61 + col2 AS col2 FROM tab2 AS cor0
----
-400
-4732
-4781

query I rowsort
SELECT DISTINCT + col0 * + col1 + - cor0.col0 + - col2 * + 15 FROM tab2 cor0
----
-195
4134
694

onlyif mysql # use DIV operator for integer division
query I rowsort label-9087
SELECT - col0 + - cor0.col1 DIV - col2 AS col0 FROM tab0 cor0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-9087
SELECT - col0 + - cor0.col1 / - col2 AS col0 FROM tab0 cor0
----
-22
-88
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 70 col2 FROM tab2
----
70

query I rowsort
SELECT ALL - ( cor1.col0 ) AS col0 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT ALL - col1 * + tab2.col0 AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT 19 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 86c53e8567a17c8d91fc5aff119e0498

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0, tab1 cor1, tab1 AS cor2
----
972 values hashing to d222ba302bd1ddd1c8b2ddf1a4d0b07a

query I rowsort
SELECT cor0.col0 * 91 + 62 AS col2 FROM tab0 AS cor0
----
2246
3247
8161

query I rowsort
SELECT + cor0.col1 - - 25 * + ( col2 ) FROM tab2 AS cor0
----
706
709
967

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9095
SELECT - + cor0.col2 * CAST( 9 AS SIGNED ) FROM tab2 AS cor0
----
-234
-243
-342

skipif mysql # not compatible
query I rowsort label-9095
SELECT - + cor0.col2 * CAST ( 9 AS INTEGER ) FROM tab2 AS cor0
----
-234
-243
-342

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9096
SELECT col2 + + CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9096
SELECT col2 + + CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 * 83 col1 FROM tab1 AS cor0
----
13446
302784
637440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + col1 col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 + ( col1 ) FROM tab2 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9100
SELECT - - col1 - - CAST( 71 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
157
162
168

skipif mysql # not compatible
query I rowsort label-9100
SELECT - - col1 - - CAST ( 71 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
157
162
168

query I rowsort
SELECT DISTINCT - col1 + col0 + 48 FROM tab1 AS cor0
----
102
115
25

query I rowsort
SELECT 43 * col1 AS col2 FROM tab0 AS cor0
----
3698
3913
4171

onlyif mysql # use DIV operator for integer division
query I rowsort label-9103
SELECT - col0 * col1 DIV cor0.col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-9103
SELECT - col0 * col1 / cor0.col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - 81 * ( - col0 ) FROM tab2 AS cor0
----
567
6318
6399

query I rowsort
SELECT + - 50 AS col2 FROM tab0 cor0
----
-50
-50
-50

onlyif mysql # use DIV operator for integer division
query I rowsort label-9106
SELECT ALL + + col0 + + col0 * 49 DIV 33 AS col0 FROM tab2 AS cor0
----
17
193
196

skipif mysql # not compatible
query I rowsort label-9106
SELECT ALL + + col0 + + col0 * 49 / 33 AS col0 FROM tab2 AS cor0
----
17
193
196

query I rowsort
SELECT 21 * + col1 FROM tab0 AS cor0
----
1806
1911
2037

query I rowsort
SELECT ALL col1 + - col1 AS col0 FROM tab2 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9109
SELECT - + col0 DIV + col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-9109
SELECT - + col0 / + col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT ALL - col1 * + col1 + col1 + ( + col0 ) AS col1 FROM tab1 AS cor0
----
-26
-647
-76

query I rowsort
SELECT ALL - 87 * col0 * ( col1 ) AS col2 FROM tab0 AS cor0
----
-179568
-295365
-704613

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9112
SELECT + CAST( - col1 * + col1 + 20 AS SIGNED ) FROM tab2
----
-269
-3461
-941

skipif mysql # not compatible
query I rowsort label-9112
SELECT + CAST ( - col1 * + col1 + 20 AS INTEGER ) FROM tab2
----
-269
-3461
-941

query I rowsort
SELECT DISTINCT 5 FROM tab0, tab2, tab0 AS cor0
----
5

query I rowsort
SELECT ALL col0 * + col2 * + 95 AS col0 FROM tab2 AS cor0
----
17955
192660
285190

query I rowsort
SELECT - + ( - col1 ) + ( col0 ) * - col1 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9116
SELECT ALL - - 5 + - col2 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9116
SELECT ALL - - 5 + - col2 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9117
SELECT ALL + col0 DIV col2 AS col0 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-9117
SELECT ALL + col0 / col2 AS col0 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT DISTINCT - col1 + cor0.col2 AS col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT cor0.col1 * tab2.col1 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 819d50aeaf27d8e4e8dec203fb8f53ce

query I rowsort
SELECT DISTINCT + 47 + 27 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
74

query I rowsort
SELECT - col1 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + col2 * + tab2.col0 * 23 FROM tab2
----
4347
46644
69046

query I rowsort
SELECT DISTINCT + + 62 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
62

query I rowsort
SELECT col0 * + col1 + - col1 * - 52 FROM tab0
----
12831
6536
8439

query I rowsort
SELECT DISTINCT - ( + col1 ) + col2 * + 23 AS col2 FROM tab2 AS cor0
----
539
590
857

query I rowsort
SELECT ALL - ( - col0 ) * - col0 * 41 + cor0.col2 AS col1 FROM tab2 AS cor0
----
-1982
-249418
-255843

query I rowsort
SELECT - - 2 + + col1 FROM tab2 cor0
----
19
33
61

query I rowsort
SELECT ALL + 53 + - col0 * - cor0.col1 AS col1 FROM tab1 cor0
----
1093
131
693

query I rowsort
SELECT + 50 * 73 AS col2 FROM tab1 AS cor0
----
3650
3650
3650

query I rowsort
SELECT ALL 76 - + cor0.col1 * cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 8c3f275ac82d9bcca262d370803620b0

query I rowsort
SELECT ALL - 96 * + 52 FROM tab2, tab1 AS cor0
----
9 values hashing to 2df50cc2fa5cee6cddf604194b37a0a6

query I rowsort
SELECT ALL + 78 + col0 * col0 * col1 AS col1 FROM tab0
----
118903
49614
720889

query I rowsort
SELECT + 20 + + tab0.col0 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to f45b794165c8162ee6889786b39dd8bb

query I rowsort
SELECT 30 + cor0.col1 AS col0 FROM tab2 AS cor0
----
47
61
89

query I rowsort
SELECT + 19 + + 80 FROM tab1 AS cor0
----
99
99
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-9136
SELECT ALL + 22 DIV - 92 + col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-9136
SELECT ALL + 22 / - 92 + col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL 63 FROM tab0, tab0 cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT + col2 * - col0 + col0 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-9139
SELECT ALL - col0 DIV + 7 + 29 * - col0 FROM tab1 AS cor0
----
-1865
-2331
-87

skipif mysql # not compatible
query I rowsort label-9139
SELECT ALL - col0 / + 7 + 29 * - col0 FROM tab1 AS cor0
----
-1865
-2331
-87

query I rowsort
SELECT DISTINCT - + col1 * 20 + col1 AS col0 FROM tab1 AS cor0
----
-190
-247
-494

query I rowsort
SELECT + col2 + + col1 + - tab0.col1 * - 20 AS col0 FROM tab0
----
1839
1993
2038

query I rowsort
SELECT - 3 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

query I rowsort
SELECT ALL - col2 * col1 - - 93 * col1 FROM tab1
----
-39
1014
360

query I rowsort
SELECT DISTINCT + tab0.col1 - col0 * - col2 AS col1 FROM tab0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - tab0.col1 col2 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT ALL - 32 FROM tab0, tab0 AS cor0
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

query I rowsort
SELECT ALL + 73 * + cor0.col0 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to b36dfafb44f40e0309ea0b0137fc7118

skipif mysql # not compatible
query I rowsort
SELECT - col0 + - CAST ( 76 AS REAL ) FROM tab2 AS cor0
----
-154
-155
-83

query I rowsort
SELECT - col0 * + col1 + - col2 * - col0 AS col1 FROM tab2 AS cor0
----
-2574
-28
1659

query I rowsort
SELECT col1 * col0 + - col1 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT 98 - col2 * - col1 AS col2 FROM tab0
----
195
2936
7560

query I rowsort
SELECT col0 - + col1 * col1 AS col1 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL 91 AS col1 FROM tab1 cor0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col0 * + col0 col1 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9155
SELECT CAST( NULL AS DECIMAL ) * + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9155
SELECT CAST ( NULL AS REAL ) * + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 18 * - 67 AS col2 FROM tab0 AS cor0
----
1206

query I rowsort
SELECT col0 * col2 + - col2 AS col0 FROM tab2
----
162
2002
2964

query I rowsort
SELECT 76 + tab1.col2 * - col2 AS col1 FROM tab1
----
-2840
-3173
-9140

query I rowsort
SELECT + 34 * + col1 AS col2 FROM tab1 AS cor0
----
340
442
884

query I rowsort
SELECT ALL - ( col0 ) + + cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 67 + - col1 * col0 * ( + col0 + - 22 ) FROM tab1 AS cor0
----
-26947
-60387
1415

query I rowsort
SELECT ALL + 13 * col2 FROM tab2 cor0
----
338
351
494

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 64 + + cor0.col2 col0 FROM tab1 AS cor0
----
-10
-7
32

query I rowsort
SELECT - col2 * col0 - - col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL - - 33 AS col2 FROM tab1 cor0
----
33
33
33

query I rowsort
SELECT + col2 * col0 * - 77 + col0 + col1 FROM tab1 AS cor0
----
-12445
-280822
-591267

query I rowsort
SELECT DISTINCT + col1 + - cor0.col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - - 6 * + col1 - ( 21 ) AS col0 FROM tab2 cor0
----
165
333
81

query I rowsort
SELECT ALL 21 + + col0 AS col2 FROM tab0 AS cor0
----
110
45
56

query I rowsort
SELECT - cor0.col1 * col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - ( - 53 ) * + col0 FROM tab0
----
1272
1855
4717

query I rowsort
SELECT DISTINCT + 14 - + col2 FROM tab0 cor0
----
-19
-68
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col0 + col1 * + col0 + col1 col1 FROM tab0 AS cor0
----
1358
3457
892

query I rowsort
SELECT DISTINCT + col0 * cor0.col1 * - 35 AS col1 FROM tab1 AS cor0
----
-22400
-2730
-36400

query I rowsort
SELECT ALL 36 * - col1 AS col1 FROM tab2
----
-1116
-2124
-612

query I rowsort
SELECT 93 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT ALL - + ( + col1 ) + - col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT + 29 * - 1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 56a8aa9e4c5d3c934d1853afeb22653e

query I rowsort
SELECT + - 87 + col0 * col1 FROM tab2 AS cor0
----
1256
130
4515

query I rowsort
SELECT - - col0 + - col0 * - col0 AS col1 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT ALL 6 AS col0 FROM tab2 cor0
----
6
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9182
SELECT - col1 + col2 DIV col0 FROM tab1 AS cor0
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-9182
SELECT - col1 + col2 / col0 FROM tab1 AS cor0
----
-10
-12
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * col2 - + ( + col0 ) * + 5 * + col2 col2 FROM tab1 AS cor0
----
-18810
-2214
-39648

query I rowsort
SELECT + - col1 * - 86 - - col2 FROM tab0 AS cor0
----
7429
7908
8343

query I rowsort
SELECT ALL + - col0 * - 31 AS col0 FROM tab0 AS cor0
----
1085
2759
744

query I rowsort
SELECT DISTINCT 39 * col1 AS col2 FROM tab1
----
1014
390
507

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9187
SELECT - + col0 * CAST( col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-9187
SELECT - + col0 * CAST ( col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col1 + col1 * + 37 FROM tab0
----
3096
3276
3492

query I rowsort
SELECT ALL - ( cor0.col0 ) * col2 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - 14 * col1 * - col1 FROM tab1 cor0
----
1400
2366
9464

query I rowsort
SELECT ALL - - 53 AS col0 FROM tab1 AS cor0
----
53
53
53

query I rowsort
SELECT DISTINCT + ( col0 ) * cor0.col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + col2 * - ( col0 ) FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + 55 + col1 FROM tab0 cor0
----
141
146
152

query I rowsort
SELECT DISTINCT + 65 FROM tab2 cor0
----
65

query I rowsort
SELECT ALL ( - col1 ) * col0 + cor0.col0 AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9197
SELECT DISTINCT - - CAST( col2 AS SIGNED ) * + col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-9197
SELECT DISTINCT - - CAST ( col2 AS INTEGER ) * + col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col2 + col2 * + col0 * + col2 col1 FROM tab1 AS cor0
----
204288
729600
8586

query I rowsort
SELECT - ( ( col0 ) ) * col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9200
SELECT + CAST( NULL AS DECIMAL ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9200
SELECT + CAST ( NULL AS REAL ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 59 * - 74 FROM tab1, tab2 AS cor0
----
-4366

query I rowsort
SELECT ALL - 57 * - 64 FROM tab1 AS cor0
----
3648
3648
3648

query I rowsort
SELECT cor0.col0 * col2 + + cor0.col0 * + 86 + - 33 AS col1 FROM tab2 AS cor0
----
758
8703
9763

query I rowsort
SELECT - col2 * - cor0.col0 + col0 AS col1 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT + + 56 * cor0.col0 AS col1 FROM tab2 AS cor0
----
392
4368
4424

query I rowsort
SELECT DISTINCT + 49 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
131
50
82

query I rowsort
SELECT ALL col0 - + col0 AS col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - col1 - tab0.col0 AS col1 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT ( + 81 ) FROM tab1 AS cor0
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 37 col2 FROM tab1 AS cor0
----
37
37
37

query I rowsort
SELECT cor0.col0 * col2 + col1 AS col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT + ( 46 ) FROM tab1 AS cor0
----
46
46
46

query I rowsort
SELECT - ( col1 + - ( col1 ) ) FROM tab2
----
0
0
0

query I rowsort
SELECT - - ( col2 ) + - col2 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT - 89 + cor0.col1 * 24 AS col0 FROM tab0 AS cor0
----
1975
2095
2239

query I rowsort
SELECT ALL + col0 - + col1 * - col1 * + 30 AS col0 FROM tab0 AS cor0
----
221904
248519
282305

query I rowsort
SELECT - cor0.col2 * + 81 FROM tab1 AS cor0
----
-4374
-4617
-7776

query I rowsort
SELECT ALL cor2.col1 + 73 FROM tab2, tab2 cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to cff8762fb6fb3d253a7183e99452e02d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9219
SELECT cor0.col2 * ( - col2 ) + col1 + CAST( - 61 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-1488
-678
-759

skipif mysql # not compatible
query I rowsort label-9219
SELECT cor0.col2 * ( - col2 ) + col1 + CAST ( - 61 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-1488
-678
-759

query I rowsort
SELECT - - col0 + + col2 + + col0 * + col2 * + 45 AS col0 FROM tab0 AS cor0
----
1611
328581
35697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - 96 col2 FROM tab2
----
-122
-123
-134

query I rowsort
SELECT 33 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT DISTINCT + cor0.col1 * 17 AS col0 FROM tab2 AS cor0
----
1003
289
527

onlyif mysql # use DIV operator for integer division
query I rowsort label-9224
SELECT + cor0.col0 DIV 86 + + cor0.col0 * - col2 FROM tab0 cor0
----
-35
-7297
-792

skipif mysql # not compatible
query I rowsort label-9224
SELECT + cor0.col0 / 86 + + cor0.col0 * - col2 FROM tab0 cor0
----
-35
-7297
-792

query I rowsort
SELECT ALL col2 * + cor0.col1 * cor0.col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT + cor0.col2 + - cor0.col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - col0 * - ( ( col1 ) ) + col0 + 29 AS col0 FROM tab2 AS cor0
----
1451
253
4709

query I rowsort
SELECT - - col1 * - 89 AS col1 FROM tab0 AS cor0
----
-7654
-8099
-8633

query I rowsort
SELECT ALL + + col0 * + cor0.col2 * - col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT + cor0.col0 - - col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL - 87 AS col1 FROM tab0 AS cor0
----
-87
-87
-87

query I rowsort
SELECT DISTINCT - + 70 FROM tab1 cor0
----
-70

query I rowsort
SELECT - col1 * - 2 AS col2 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT + ( 80 ) FROM tab2 AS cor0
----
80

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 17 * - col1 col1 FROM tab2 AS cor0
----
-1003
-289
-527

query I rowsort
SELECT ALL - + col0 * - col0 AS col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT 13 + col0 AS col1 FROM tab1 AS cor0
----
16
77
93

query I rowsort
SELECT DISTINCT 47 AS col0 FROM tab2 cor0
----
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-9240
SELECT - - col0 DIV + col2 + col1 + cor0.col1 FROM tab1 AS cor0
----
21
26
52

skipif mysql # not compatible
query I rowsort label-9240
SELECT - - col0 / + col2 + col1 + cor0.col1 FROM tab1 AS cor0
----
21
26
52

query I rowsort
SELECT DISTINCT - 46 * col1 AS col0 FROM tab2 AS cor0
----
-1426
-2714
-782

query I rowsort
SELECT + tab1.col0 * 29 FROM tab1
----
1856
2320
87

query I rowsort
SELECT DISTINCT + 54 * col0 * 66 AS col1 FROM tab1
----
10692
228096
285120

query I rowsort
SELECT + 65 * + tab2.col1 AS col0 FROM tab2
----
1105
2015
3835

query I rowsort
SELECT ALL 81 * - col2 FROM tab1
----
-4374
-4617
-7776

query I rowsort
SELECT + + cor0.col0 AS col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col2 col0 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + 75 FROM tab1, tab2 cor0
----
75

query I rowsort
SELECT ALL tab1.col2 + col2 - + 27 AS col1 FROM tab1
----
165
81
87

query I rowsort
SELECT ALL - col2 - col1 * + col2 AS col0 FROM tab1
----
-1344
-1458
-627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col1 + tab0.col0 col2 FROM tab0
----
133
143
262

query I rowsort
SELECT ALL - col2 * col2 + col0 * - col1 + + col2 AS col1 FROM tab2
----
-2749
-5252
-919

query I rowsort
SELECT DISTINCT col0 * col2 + col0 AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + + cor0.col2 * cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-9255
SELECT DISTINCT col2 DIV - col1 AS col2 FROM tab2
----
-2
0

skipif mysql # not compatible
query I rowsort label-9255
SELECT DISTINCT col2 / - col1 AS col2 FROM tab2
----
-2
0

query I rowsort
SELECT + col0 / col2 + col1 FROM tab0 WHERE NOT NULL BETWEEN + col1 AND NULL
----

query I rowsort
SELECT ALL + col1 * col0 + - col2 AS col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT + col1 * - col2 * + col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL col2 * + col0 * + col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT DISTINCT + + col1 + col0 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + col1 * + cor0.col1 * - cor0.col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT ALL col2 * col1 - col2 FROM tab0
----
2805
7380
96

query I rowsort
SELECT DISTINCT - col2 * col2 - + col0 FROM tab1
----
-2919
-3313
-9296

query I rowsort
SELECT col1 * col0 + - col2 FROM tab0
----
2031
3394
8017

query I rowsort
SELECT - col2 + + col0 + + col0 FROM tab0
----
15
69
96

query I rowsort
SELECT ALL - tab2.col0 * + col2 * - col2 + tab2.col1 FROM tab2
----
114093
5134
52787

query I rowsort
SELECT DISTINCT + + col2 + col0 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL - col0 + + col2 * col2 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT DISTINCT - cor0.col2 * col1 + - col0 AS col0 FROM tab2 AS cor0
----
-1612
-725
-844

onlyif mysql # use DIV operator for integer division
query I rowsort label-9270
SELECT - 78 DIV - tab0.col0 + + tab0.col2 DIV col0 AS col0 FROM tab0
----
0
2
4

skipif mysql # not compatible
query I rowsort label-9270
SELECT - 78 / - tab0.col0 + + tab0.col2 / col0 AS col0 FROM tab0
----
0
2
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-9271
SELECT DISTINCT - 40 DIV + col2 + - col2 AS col2 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-9271
SELECT DISTINCT - 40 / + col2 + - col2 AS col2 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 + col1 col0 FROM tab0
----
119
173
98

query I rowsort
SELECT col2 + + col2 * col0 AS col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT col1 * - tab2.col1 + - col1 * + col1 * + col0 AS col1 FROM tab2
----
-23120
-274999
-7688

query I rowsort
SELECT tab2.col1 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL col0 * col1 * col2 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT + col2 * + cor0.col0 * col0 AS col1 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT ALL col2 * - col2 + - col1 * col1 AS col1 FROM tab0 AS cor0
----
-15005
-8485
-9410

query I rowsort
SELECT DISTINCT col1 * - col0 * + col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT - col0 * tab2.col0 + col1 FROM tab2
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT + tab2.col1 + col2 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL - col0 * col2 + + col1 * + col2 AS col2 FROM tab0
----
164
2046
62

query I rowsort
SELECT DISTINCT col1 * col1 FROM tab0 WHERE NOT ( + col1 ) IN ( - col2 )
----
7396
8281
9409

query I rowsort
SELECT - col1 * + col1 + - col0 * - tab1.col0 AS col0 FROM tab1
----
-667
3996
6231

query III rowsort
SELECT * FROM tab0 WHERE NOT col2 = ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col2 ) col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL 23 * col0 FROM tab2 AS cor0
----
161
1794
1817

query I rowsort
SELECT + 19 + cor1.col2 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6125de489530aad8bff8d37feb373452

query I rowsort
SELECT - 89 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c36e597b7bc5727536f5bb580e6cebbc

query I rowsort
SELECT + - 74 * + col1 AS col0 FROM tab1 AS cor0
----
-1924
-740
-962

query I rowsort
SELECT + + 76 + - col0 AS col1 FROM tab2 AS cor0
----
-2
-3
69

query I rowsort
SELECT + col0 * col2 + col0 AS col1 FROM tab2
----
196
2106
3081

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( NULL ) >= col0 - - col0
----

query I rowsort
SELECT ALL + col0 * col0 + + col2 FROM tab2
----
6110
6279
76

query I rowsort
SELECT col2 * tab0.col0 - - col2 * + col1 * col2 AS col0 FROM tab0
----
132
619182
94446

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 + - col2 col0 FROM tab1
----
1152
1350
513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + tab0.col0 col2 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-9298
SELECT ALL + cor0.col0 DIV col2 col2 FROM tab1 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9298
SELECT ALL + cor0.col0 / col2 col2 FROM tab1 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9299
SELECT DISTINCT - col2 DIV - col2 + + tab0.col1 * + col0 FROM tab0
----
2065
3396
8100

skipif mysql # not compatible
query I rowsort label-9299
SELECT DISTINCT - col2 / - col2 + + tab0.col1 * + col0 FROM tab0
----
2065
3396
8100

query I rowsort
SELECT ALL + col1 * + col1 + + col1 * + col0 * + col1 FROM tab2 AS cor0
----
23120
274999
7688

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col1 + - col0 + + col1 col1 FROM tab2
----
-1553
-708
-813

query I rowsort
SELECT + col1 * + col0 - col2 AS col0 FROM tab1
----
24
583
944

query I rowsort
SELECT col2 * col1 + - tab0.col2 FROM tab0
----
2805
7380
96

query I rowsort
SELECT DISTINCT col0 FROM tab2 WHERE NOT + col1 * col0 + + col1 NOT IN ( + tab2.col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9305
SELECT ALL + col2 DIV - col1 + col1 FROM tab2
----
15
31
59

skipif mysql # not compatible
query I rowsort label-9305
SELECT ALL + col2 / - col1 + col1 FROM tab2
----
15
31
59

query III rowsort
SELECT * FROM tab2 WHERE + col2 + col0 NOT IN ( - col1 / + tab2.col0 + + col2 * col0 * col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-9307
SELECT col1 * + col2 DIV col2 + - col0 AS col0 FROM tab1
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-9307
SELECT col1 * + col2 / col2 + - col0 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT col0 * col1 * + tab2.col1 AS col1 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT DISTINCT + col2 + - col2 * - col2 * + tab2.col2 + - col2 FROM tab2
----
17576
19683
54872

query I rowsort
SELECT DISTINCT + col0 + - col2 + col1 FROM tab0
----
131
77
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-9311
SELECT ALL - col2 DIV col1 + + col1 FROM tab2
----
15
31
59

skipif mysql # not compatible
query I rowsort label-9311
SELECT ALL - col2 / col1 + + col1 FROM tab2
----
15
31
59

query I rowsort
SELECT - col2 FROM tab0 WHERE NOT + col1 + + col0 BETWEEN + col1 * col2 AND NULL
----
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-9313
SELECT 27 + + col0 + col2 DIV col1 AS col0 FROM tab1 cor0
----
114
32
96

skipif mysql # not compatible
query I rowsort label-9313
SELECT 27 + + col0 + col2 / col1 AS col0 FROM tab1 cor0
----
114
32
96

query I rowsort
SELECT cor0.col1 * + col2 + cor0.col0 * col0 AS col2 FROM tab0 AS cor0
----
1322
15383
3414

query I rowsort
SELECT - + col0 + + col2 * col1 AS col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT + 80 + + col2 * 33 FROM tab1 AS cor0
----
1862
1961
3248

query I rowsort
SELECT DISTINCT + - cor0.col0 + col2 * col2 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT DISTINCT + tab1.col2 AS col2 FROM tab1, tab2, tab2 AS cor0
----
54
57
96

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 AS col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT + col0 * 79 AS col1 FROM tab0 cor0
----
1896
2765
7031

query I rowsort
SELECT col1 * + col2 + + 7 FROM tab1
----
1255
1411
577

query I rowsort
SELECT ALL - tab0.col0 + tab0.col2 + + col0 AS col0 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT - col1 + col0 * - col1 AS col0 FROM tab1
----
-104
-1053
-650

query I rowsort
SELECT ALL col2 + - col0 + 34 FROM tab1
----
27
50
85

query I rowsort
SELECT + + 77 - tab1.col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 9131956cdd05c2a0dc7c478866d0a67e

query I rowsort
SELECT ALL - 84 AS col1 FROM tab1
----
-84
-84
-84

query I rowsort
SELECT ALL - 12 + - col0 FROM tab0
----
-101
-36
-47

query I rowsort
SELECT ALL col0 + - 7 + cor0.col2 FROM tab2 AS cor0
----
110
27
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col0 col0 FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9330
SELECT ALL - col1 DIV 77 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9330
SELECT ALL - col1 / 77 AS col2 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9331
SELECT col1 / + CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9331
SELECT col1 / + CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col0 col2 FROM tab1 cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-9333
SELECT - 72 DIV + col1 + col2 * + col1 * col0 FROM tab1 AS cor0
----
36473
4210
99835

skipif mysql # not compatible
query I rowsort label-9333
SELECT - 72 / + col1 + col2 * + col1 * col0 FROM tab1 AS cor0
----
36473
4210
99835

query I rowsort
SELECT - 95 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9335
SELECT + col0 / CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9335
SELECT + col0 / CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * - ( tab0.col0 ) * - col0 FROM tab0
----
-13824
-42875
-704969

query I rowsort
SELECT + col1 * col1 * col2 FROM tab2
----
10982
25947
90506

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab1, tab1 AS cor1 WHERE NOT NULL <> NULL
----

query I rowsort
SELECT + ( - col2 ) * + cor0.col0 - 32 FROM tab1 AS cor0
----
-194
-3680
-7712

query I rowsort
SELECT - col0 + ( + col2 ) * - col1 + cor0.col1 FROM tab0 AS cor0
----
-2776
-35
-7460

query I rowsort
SELECT + 70 * - col2 AS col0 FROM tab2 AS cor0
----
-1820
-1890
-2660

query I rowsort
SELECT + tab2.col1 + - col1 - col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL tab2.col1 - col1 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL - - col0 * - col1 - cor0.col1 AS col2 FROM tab0 cor0
----
-2150
-3492
-8190

query I rowsort
SELECT + 80 * col2 - - col2 AS col0 FROM tab2 cor0
----
2106
2187
3078

query I rowsort
SELECT ALL - col1 * ( col2 * + tab2.col1 ) - + col1 * + col0 FROM tab2
----
-12325
-26164
-95108

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9347
SELECT ALL + CAST( + col2 AS SIGNED ) + col2 AS col1 FROM tab2
----
52
54
76

skipif mysql # not compatible
query I rowsort label-9347
SELECT ALL + CAST ( + col2 AS INTEGER ) + col2 AS col1 FROM tab2
----
52
54
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9348
SELECT CAST( + col1 AS SIGNED ) + + col2 * - col2 * col0 FROM tab0
----
-26050
-598345
62

skipif mysql # not compatible
query I rowsort label-9348
SELECT CAST ( + col1 AS INTEGER ) + + col2 * - col2 * col0 FROM tab0
----
-26050
-598345
62

query I rowsort
SELECT + 28 + + col0 FROM tab2
----
106
107
35

query I rowsort
SELECT - 80 + + ( tab0.col2 ) + - col0 AS col2 FROM tab0
----
-114
-71
-87

query I rowsort
SELECT 98 * - col0 + col1 AS col1 FROM tab0 AS cor0
----
-2266
-3333
-8631

query I rowsort
SELECT DISTINCT 76 + cor0.col1 * + col0 FROM tab2 AS cor0
----
1419
293
4678

query I rowsort
SELECT ALL 62 * col0 AS col2 FROM tab2 cor0
----
434
4836
4898

query I rowsort
SELECT ALL + - col1 + col1 * col2 FROM tab2 cor0
----
1475
629
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-9355
SELECT DISTINCT - 98 DIV + tab0.col1 + col1 AS col0 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-9355
SELECT DISTINCT - 98 / + tab0.col1 + col1 AS col0 FROM tab0
----
85
90
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9356
SELECT + cor0.col1 DIV cor0.col1 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-9356
SELECT + cor0.col1 / cor0.col1 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT ALL - - col0 * + col1 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - + cor0.col2 * + col0 AS col1 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT - 53 * col0 + cor0.col1 AS col0 FROM tab1 AS cor0
----
-133
-3382
-4227

query I rowsort
SELECT - - col2 + + col0 * cor0.col2 + col1 FROM tab2 AS cor0
----
2113
247
3057

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 22 * col1 col0 FROM tab2 AS cor0
----
1298
374
682

query I rowsort
SELECT DISTINCT col1 * col2 * cor0.col0 + cor0.col1 AS col2 FROM tab2 AS cor0
----
119711
51051
5890

query I rowsort
SELECT col1 * cor0.col0 + + col2 AS col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT + - 33 FROM tab1 cor0
----
-33

onlyif mysql # use DIV operator for integer division
query I rowsort label-9365
SELECT DISTINCT + tab1.col0 DIV + col2 AS col2 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-9365
SELECT DISTINCT + tab1.col0 / + col2 AS col2 FROM tab1
----
0
1

query I rowsort
SELECT col0 * - 8 FROM tab0 AS cor0
----
-192
-280
-712

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * col0 col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - cor0.col2 + + ( - col0 ) FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9369
SELECT col0 + CAST( 28 AS SIGNED ) * - col1 AS col1 FROM tab1 AS cor0
----
-216
-284
-725

skipif mysql # not compatible
query I rowsort label-9369
SELECT col0 + CAST ( 28 AS INTEGER ) * - col1 AS col1 FROM tab1 AS cor0
----
-216
-284
-725

query I rowsort
SELECT ALL 79 AS col1 FROM tab1 AS cor0
----
79
79
79

query I rowsort
SELECT DISTINCT col2 * ( - col2 ) * - col0 AS col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT ALL + 74 + + ( col2 ) FROM tab1 AS cor0
----
128
131
170

query I rowsort
SELECT col1 * 28 + col2 AS col2 FROM tab0 AS cor0
----
2441
2630
2717

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 28 * + 72 col1 FROM tab2 AS cor0
----
2016
2016
2016

query I rowsort
SELECT ALL - 76 + + ( + col2 ) * - col1 + col0 FROM tab0 AS cor0
----
-138
-2890
-7449

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * cor0.col0 col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + 88 FROM tab1 cor0
----
88
88
88

query I rowsort
SELECT 22 + + 33 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT ALL cor0.col0 * - col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - col1 * + 89 FROM tab0 AS cor0
----
-7654
-8099
-8633

onlyif mysql # use DIV operator for integer division
query I rowsort label-9381
SELECT DISTINCT - + col2 DIV - cor0.col0 AS col1 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-9381
SELECT DISTINCT - + col2 / - cor0.col0 AS col1 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT ALL + + col2 * ( col1 * cor0.col0 ) FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT - col0 + - col0 * col1 * + col2 FROM tab1 AS cor0
----
-36544
-4215
-99920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 - + cor0.col1 * col2 col0 FROM tab1 cor0
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9385
SELECT ALL - cor0.col2 / + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9385
SELECT ALL - cor0.col2 / + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * + 20 * col0 FROM tab2 AS cor0
----
-121680
-124820
-980

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9387
SELECT ALL + + CAST( - col0 AS SIGNED ) * col2 FROM tab0 cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-9387
SELECT ALL + + CAST ( - col0 AS INTEGER ) * col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ( 57 ) FROM tab1 AS cor0
----
57
57
57

query I rowsort
SELECT DISTINCT + col2 * - col2 - - col0 * + ( col0 ) AS col2 FROM tab1 cor0
----
-2816
-2907
847

query I rowsort
SELECT - cor0.col2 * - cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 50c4b0a13fc95d13442dcf4b04857ce8

query I rowsort
SELECT DISTINCT col2 + + 42 FROM tab0 AS cor0
----
124
43
75

query I rowsort
SELECT ALL 94 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT + 72 + col1 + - ( 49 ) FROM tab2 AS cor0
----
40
54
82

query I rowsort
SELECT - 82 * col1 FROM tab2
----
-1394
-2542
-4838

query I rowsort
SELECT ALL + 34 * col1 + - col2 FROM tab0 AS cor0
----
2891
3012
3297

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 95 * col0 col1 FROM tab2 cor0
----
665
7410
7505

query I rowsort
SELECT - col0 * + col2 + + 46 + col2 AS col0 FROM tab2 AS cor0
----
-116
-1956
-2918

query I rowsort
SELECT ALL - + 35 + - col2 FROM tab0 AS cor0
----
-117
-36
-68

query I rowsort
SELECT - col0 * col1 * - 47 FROM tab0 cor0
----
159565
380653
97008

query I rowsort
SELECT ALL + ( + tab0.col0 ) + + 18 * + 42 FROM tab0
----
780
791
845

query I rowsort
SELECT ALL - col2 * + ( - col2 ) FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-9402
SELECT + col2 * 88 DIV + col1 + + col0 + + CAST( 93 AS SIGNED ) * + col0 AS col1 FROM tab0 AS cor0
----
2289
3290
8445

skipif mysql # not compatible
query I rowsort label-9402
SELECT + col2 * 88 / + col1 + + col0 + + CAST ( 93 AS INTEGER ) * + col0 AS col1 FROM tab0 AS cor0
----
2289
3290
8445

query I rowsort
SELECT DISTINCT cor0.col2 + col1 * + 22 FROM tab1 AS cor0
----
277
382
626

query I rowsort
SELECT ALL + tab0.col2 + - tab0.col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + col0 + tab2.col2 + ( col2 ) AS col2 FROM tab2
----
130
155
61

query I rowsort
SELECT ALL - col2 + col0 * col1 + + col2 * col2 FROM tab2
----
2749
5252
919

query I rowsort
SELECT DISTINCT + 63 AS col1 FROM tab1, tab2, tab1 AS cor0
----
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col2 col1 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL - col0 + - col2 AS col2 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT ALL 92 + + col0 AS col2 FROM tab1
----
156
172
95

query I rowsort
SELECT col0 * ( + col0 ) + - col0 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT col1 * - col2 + + 91 + + 68 FROM tab2
----
-1375
-487
-678

onlyif mysql # use DIV operator for integer division
query I rowsort label-9413
SELECT + col2 DIV - col2 + col0 + - col0 AS col2 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9413
SELECT + col2 / - col2 + col0 + - col0 AS col2 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT tab1.col0 * 83 FROM tab1
----
249
5312
6640

query I rowsort
SELECT ( - cor0.col1 ) * - 25 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to ddbbad196d6cb93f9b5d0c5d288ae538

query I rowsort
SELECT ALL - col0 * + ( + col0 ) AS col1 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT - col1 + + cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0
----
156
650
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9418
SELECT CAST( NULL AS SIGNED ) / tab2.col0 + col2 + - 48 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9418
SELECT CAST ( NULL AS INTEGER ) / tab2.col0 + col2 + - 48 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - + cor0.col2 - col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT - ( + col2 ) - - col0 * col0 AS col0 FROM tab0
----
1224
543
7839

query I rowsort
SELECT ALL ( tab1.col1 ) AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL + + col0 - + col1 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - 16 - + col1 AS col0 FROM tab2 AS cor0
----
-33
-47
-75

onlyif mysql # use DIV operator for integer division
query I rowsort label-9424
SELECT ALL 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-9424
SELECT ALL col1 / col2 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 + - col2 * - col1 AS col1 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT + - cor0.col0 * + col2 + - col0 * col2 + col1 FROM tab1 AS cor0
----
-15347
-298
-7286

query I rowsort
SELECT col2 + col1 * 54 AS col0 FROM tab1 AS cor0
----
1458
597
798

query I rowsort
SELECT - cor0.col0 + + col1 AS col1 FROM tab2 cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-9429
SELECT cor0.col2 * col2 - - 40 DIV 56 FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-9429
SELECT cor0.col2 * col2 - - 40 / 56 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - - cor0.col1 - - cor0.col1 AS col1 FROM tab2 AS cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 12 * col2 col0 FROM tab0 AS cor0
----
12
396
984

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9432
SELECT - 78 * col2 + CAST( col0 * col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-4050
-798
192

skipif mysql # not compatible
query I rowsort label-9432
SELECT - 78 * col2 + CAST ( col0 * col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-4050
-798
192

query I rowsort
SELECT ALL - - cor0.col1 * col1 * ( cor0.col2 ) AS col0 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT + - cor0.col0 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL ( + tab0.col1 ) + - col0 + col2 FROM tab0
----
63
84
95

query I rowsort
SELECT - 86 * + col0 FROM tab0 AS cor0
----
-2064
-3010
-7654

query I rowsort
SELECT + + ( + col1 ) * col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-9438
SELECT col0 + - 68 DIV + cor0.col1 AS col2 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-9438
SELECT col0 + - 68 / + cor0.col1 AS col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT - - 67 * col2 FROM tab1 AS cor0
----
3618
3819
6432

query I rowsort
SELECT ALL + 17 * - col1 FROM tab0 AS cor0
----
-1462
-1547
-1649

query I rowsort
SELECT col0 + col2 * + ( + col2 ) FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT - 54 FROM tab0 cor0
----
-54
-54
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 36 col2 FROM tab1 AS cor0
----
-36
-36
-36

query I rowsort
SELECT ( + 85 + + col2 * - 21 ) FROM tab1
----
-1049
-1112
-1931

query I rowsort
SELECT ALL 32 FROM tab1, tab0, tab0 cor0, tab0 AS cor1
----
81 values hashing to 6bef041528d0147be26f7de162c66a5f

query I rowsort
SELECT ALL - ( col2 ) * + col1 - + 26 FROM tab0 AS cor0
----
-123
-2864
-7488

query I rowsort
SELECT DISTINCT + + col0 + col0 + col2 * - cor0.col1 FROM tab2 AS cor0
----
-1378
-488
-823

query I rowsort
SELECT 39 * - col1 FROM tab1 cor0
----
-1014
-390
-507

query I rowsort
SELECT + col0 + 47 FROM tab2 AS cor0
----
125
126
54

query I rowsort
SELECT - col0 + 20 AS col2 FROM tab0 AS cor0
----
-15
-4
-69

query I rowsort
SELECT DISTINCT 22 * col2 AS col1 FROM tab1
----
1188
1254
2112

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9452
SELECT col2 + CAST( + col0 AS SIGNED ) * - col2 AS col0 FROM tab0 AS cor0
----
-34
-7216
-759

skipif mysql # not compatible
query I rowsort label-9452
SELECT col2 + CAST ( + col0 AS INTEGER ) * - col2 AS col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT col1 + cor0.col1 * + col1 AS col1 FROM tab1 cor0
----
110
182
702

query I rowsort
SELECT ALL - tab0.col1 + col1 - col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ALL + 60 + - col0 FROM tab0 AS cor0
----
-29
25
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 77 ) col0 FROM tab2 AS cor0
----
77
77
77

query I rowsort
SELECT ALL + + ( col2 ) * col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - + 71 + + 24 FROM tab2 AS cor0
----
-47

query I rowsort
SELECT 20 + 15 FROM tab0 cor0
----
35
35
35

query I rowsort
SELECT ALL + 47 * - col2 + col0 AS col2 FROM tab0 AS cor0
----
-12
-1527
-3765

query I rowsort
SELECT DISTINCT - - ( + cor0.col2 ) + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + col2 + 31 FROM tab0 AS cor0
----
113
32
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( + 27 ) col1 FROM tab2 AS cor0
----
-27
-27
-27

query I rowsort
SELECT col1 * - col0 + col2 * + col1 FROM tab1
----
-70
1326
208

query I rowsort
SELECT - 80 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

query I rowsort
SELECT col1 + + ( - col2 ) AS col2 FROM tab1
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-9467
SELECT - cor0.col2 DIV + 17 FROM tab2 AS cor0
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-9467
SELECT - cor0.col2 / + 17 FROM tab2 AS cor0
----
-1
-1
-2

query I rowsort
SELECT DISTINCT 96 * 14 * + col2 FROM tab0 AS cor0
----
110208
1344
44352

query I rowsort
SELECT + col0 - col0 * col1 AS col1 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT - col0 + 13 AS col2 FROM tab2 AS cor0
----
-65
-66
6

query I rowsort
SELECT DISTINCT + + 6 + + col2 AS col0 FROM tab0 AS cor0
----
39
7
88

query I rowsort
SELECT ALL col2 + col1 * + col2 AS col0 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT + 99 + col1 + col1 AS col2 FROM tab0 AS cor0
----
271
281
293

query I rowsort
SELECT - col1 * + col2 AS col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT col0 - - col1 * - ( - cor0.col0 ) AS col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT - - col2 * 26 AS col2 FROM tab1 AS cor0
----
1404
1482
2496

query I rowsort
SELECT ALL col1 * col0 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9478
SELECT ALL col2 * + CAST( NULL AS DECIMAL ) * - 68 + col1 * - 41 + 39 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9478
SELECT ALL col2 * + CAST ( NULL AS REAL ) * - 68 + col1 * - 41 + 39 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + col2 * + 28 * - cor0.col2 FROM tab0 AS cor0
----
-188190
-27
-30459

query I rowsort
SELECT ALL + tab0.col2 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL - ( 59 ) + col0 * ( - col1 ) FROM tab2
----
-1402
-276
-4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9482
SELECT + 0 * col0 + CAST( + col2 AS SIGNED ) FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-9482
SELECT + 0 * col0 + CAST ( + col2 AS INTEGER ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + - 82 * + col1 AS col1 FROM tab1 AS cor0
----
-1066
-2132
-820

query I rowsort
SELECT + 31 * - col2 FROM tab2
----
-1178
-806
-837

query I rowsort
SELECT ( 7 + col0 ) * 69 AS col1 FROM tab2
----
5865
5934
966

onlyif mysql # use DIV operator for integer division
query I rowsort label-9486
SELECT + 90 + + 96 DIV col0 FROM tab0
----
91
92
94

skipif mysql # not compatible
query I rowsort label-9486
SELECT + 90 + + 96 / col0 FROM tab0
----
91
92
94

query I rowsort
SELECT ALL 23 + + col1 + + col0 AS col1 FROM tab0
----
133
155
203

query I rowsort
SELECT + 8 + col0 FROM tab2
----
15
86
87

query I rowsort
SELECT ALL col1 * cor0.col1 FROM tab0 cor0
----
7396
8281
9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9490
SELECT + col0 * - col1 + CAST( 79 AS SIGNED ) FROM tab1 AS cor0
----
-561
-961
1

skipif mysql # not compatible
query I rowsort label-9490
SELECT + col0 * - col1 + CAST ( 79 AS INTEGER ) FROM tab1 AS cor0
----
-561
-961
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( col2 ) * col0 col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - - 55 FROM tab1 cor0
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col0 col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT col0 * - 85 + - col1 AS col0 FROM tab0 AS cor0
----
-2126
-3072
-7656

query I rowsort
SELECT DISTINCT - - cor0.col0 * col0 + - ( + col0 ) + col2 * col2 AS col2 FROM tab2 AS cor0
----
6682
7606
771

onlyif mysql # use DIV operator for integer division
query I rowsort label-9496
SELECT ALL col1 DIV 55 - - 14 FROM tab2 AS cor0
----
14
14
15

skipif mysql # not compatible
query I rowsort label-9496
SELECT ALL col1 / 55 - - 14 FROM tab2 AS cor0
----
14
14
15

query I rowsort
SELECT ALL - col0 - col1 AS col0 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT ALL - + col0 * col2 + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT - col1 + + col0 * col0 * col1 AS col1 FROM tab0
----
118728
49450
720720

query I rowsort
SELECT ALL - - col1 * cor0.col2 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT col0 + 98 AS col0 FROM tab0 cor0
----
122
133
187

query I rowsort
SELECT - col2 * + col1 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-1612
-725
-844

onlyif mysql # use DIV operator for integer division
query I rowsort label-9503
SELECT - col2 DIV col2 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-9503
SELECT - col2 / col2 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-2
-34
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9504
SELECT DISTINCT - CAST( + 25 * col1 AS SIGNED ) FROM tab0
----
-2150
-2275
-2425

skipif mysql # not compatible
query I rowsort label-9504
SELECT DISTINCT - CAST ( + 25 * col1 AS INTEGER ) FROM tab0
----
-2150
-2275
-2425

query I rowsort
SELECT - + col0 * - 48 + - col0 AS col1 FROM tab2 cor0
----
329
3666
3713

query I rowsort
SELECT - + col1 + col1 * + col2 AS col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT col1 + + col0 * col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT - col0 * + col2 + - col0 - + col0 FROM tab2 AS cor0
----
-203
-2184
-3160

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9509
SELECT ALL + CAST( NULL AS SIGNED ) * tab1.col1 * - col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9509
SELECT ALL + CAST ( NULL AS INTEGER ) * tab1.col1 * - col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( 85 ) + col2 col0 FROM tab2 cor0
----
-47
-58
-59

query I rowsort
SELECT + 85 * col0 FROM tab0 AS cor0
----
2040
2975
7565

query I rowsort
SELECT - 98 AS col0 FROM tab1 AS cor0
----
-98
-98
-98

query I rowsort
SELECT - - 0 - cor0.col0 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - col2 - col2 * + col1 FROM tab1 AS cor0
----
-1344
-1458
-627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + + col1 col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT col1 * col0 + ( + 21 ) AS col1 FROM tab2 AS cor0
----
1364
238
4623

query I rowsort
SELECT + 38 * col2 AS col1 FROM tab1 AS cor0
----
2052
2166
3648

query I rowsort
SELECT + 78 + + cor0.col1 FROM tab0 AS cor0
----
164
169
175

query I rowsort
SELECT ALL + col0 + - col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT ( - 63 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

onlyif mysql # use DIV operator for integer division
query I rowsort label-9521
SELECT - col0 + - 66 DIV col2 AS col1 FROM tab1
----
-4
-65
-80

skipif mysql # not compatible
query I rowsort label-9521
SELECT - col0 + - 66 / col2 AS col1 FROM tab1
----
-4
-65
-80

query I rowsort
SELECT ALL - col2 * 26 FROM tab1
----
-1404
-1482
-2496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9523
SELECT + + CAST( + col2 AS SIGNED ) FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-9523
SELECT + + CAST ( + col2 AS INTEGER ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - col1 * col1 + - col1 AS col1 FROM tab1 cor0
----
-110
-182
-702

query I rowsort
SELECT ALL + ( + 15 ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT ALL - col1 * ( + 34 ) * col1 FROM tab1 AS cor0
----
-22984
-3400
-5746

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col0 * - ( + col0 ) col2 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - col2 + 57 AS col2 FROM tab0 cor0
----
-25
24
56

query I rowsort
SELECT DISTINCT ( - 95 ) + cor1.col2 + cor1.col2 AS col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
-29
-93
69

query I rowsort
SELECT ALL tab2.col2 + 92 * - col1 + col2 FROM tab2
----
-1488
-2798
-5376

query I rowsort
SELECT ALL - tab0.col1 + col0 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT ALL - col0 + - col0 * 75 * col1 AS col0 FROM tab0 AS cor0
----
-154824
-254660
-607514

query I rowsort
SELECT DISTINCT - col0 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + + cor0.col0 * - cor0.col0 + col1 * col1 * + ( 42 ) + - col2 FROM tab0 AS cor0
----
310023
339799
393952

query I rowsort
SELECT ALL 73 * - col2 FROM tab2
----
-1898
-1971
-2774

query I rowsort
SELECT ALL ( - ( col2 ) ) AS col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT ALL tab1.col1 * + 40 FROM tab1
----
1040
400
520

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT + + col1 + ( col1 ) FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
-1
-33
-82

query I rowsort
SELECT + - cor0.col2 * cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + 0 * + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 73 * + col1 FROM tab1 AS cor0
----
1898
730
949

query I rowsort
SELECT ALL + cor0.col1 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL + col1 + - cor0.col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL col1 * cor0.col1 + - col0 FROM tab2 AS cor0
----
210
3403
954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * + col0 + 96 col0 FROM tab2 AS cor0
----
145
6180
6337

query I rowsort
SELECT DISTINCT - - col0 * cor0.col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT tab2.col2 * col0 + - ( tab2.col1 ) * - col1 * col0 AS col0 FROM tab2
----
25833
273546
6916

query I rowsort
SELECT col2 + col1 * + 40 FROM tab2 AS cor0
----
1267
2386
718

query I rowsort
SELECT ALL 19 + + col2 FROM tab1 AS cor0
----
115
73
76

query I rowsort
SELECT DISTINCT - col1 * col2 - 88 FROM tab2 AS cor0
----
-1622
-734
-925

query I rowsort
SELECT DISTINCT - 42 + + col2 AS col2 FROM tab1 AS cor0
----
12
15
54

query I rowsort
SELECT DISTINCT + col2 * 14 FROM tab2 AS cor0
----
364
378
532

query I rowsort
SELECT ALL + col2 - + col0 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL - + col0 + 88 * - col1 + col1 FROM tab1 AS cor0
----
-1211
-2265
-934

onlyif mysql # use DIV operator for integer division
query I rowsort label-9557
SELECT ( + col2 ) DIV col2 + 32 FROM tab1
----
33
33
33

skipif mysql # not compatible
query I rowsort label-9557
SELECT ( + col2 ) / col2 + 32 FROM tab1
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 63 col1 FROM tab2
----
-63

query I rowsort
SELECT DISTINCT - tab2.col0 + - tab2.col1 FROM tab2, tab1, tab0 cor0
----
-137
-38
-96

query I rowsort
SELECT ALL 39 + + col1 * + col2 AS col1 FROM tab1 AS cor0
----
1287
1443
609

query I rowsort
SELECT ALL - + ( + ( - col2 ) ) * 65 + 44 FROM tab0 cor0
----
109
2189
5374

query I rowsort
SELECT + 77 AS col0 FROM tab1 AS cor0
----
77
77
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9563
SELECT ALL col1 * 91 + cor0.col0 * CAST( col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
15579
8618
8862

skipif mysql # not compatible
query I rowsort label-9563
SELECT ALL col1 * 91 + cor0.col0 * CAST ( col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
15579
8618
8862

query I rowsort
SELECT + + cor0.col1 * - 54 + col0 * - col0 FROM tab1 cor0
----
-1413
-4636
-7102

query I rowsort
SELECT DISTINCT - ( 62 ) + col0 * + ( ( - col1 ) ) FROM tab2 AS cor0
----
-1405
-279
-4664

query I rowsort
SELECT DISTINCT - - 76 * - col0 FROM tab1 AS cor0
----
-228
-4864
-6080

query I rowsort
SELECT ALL - ( + 44 ) * + col2 * ( - col0 ) FROM tab1 AS cor0
----
160512
337920
7128

query I rowsort
SELECT - - col1 + + col0 + - col0 AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + + col1 * 68 FROM tab1 AS cor0
----
1768
680
884

query I rowsort
SELECT + cor0.col1 * col2 + col2 + 63 AS col0 FROM tab1 AS cor0
----
1407
1521
690

query I rowsort
SELECT DISTINCT + 34 AS col2 FROM tab2, tab2 cor0, tab2 AS cor1
----
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + 69 col0 FROM tab1
----
207
4416
5520

query I rowsort
SELECT + col2 * - ( 69 ) * col2 AS col0 FROM tab0
----
-463956
-69
-75141

query I rowsort
SELECT + col0 - + 10 FROM tab0
----
14
25
79

query I rowsort
SELECT ALL col1 + + 57 - - col1 AS col0 FROM tab2
----
119
175
91

query I rowsort
SELECT + col2 + + col0 + + 22 AS col1 FROM tab2
----
126
139
56

query I rowsort
SELECT DISTINCT - col0 - + ( + col0 ) AS col2 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT ALL + col0 * + 82 * col0 + - 37 + cor0.col2 FROM tab1 AS cor0
----
335892
524859
755

query I rowsort
SELECT DISTINCT + ( + col2 ) * col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9580
SELECT DISTINCT + col0 DIV + col1 + col2 FROM tab2
----
27
42

skipif mysql # not compatible
query I rowsort label-9580
SELECT DISTINCT + col0 / + col1 + col2 FROM tab2
----
27
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-9581
SELECT - 2 DIV + 52 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9581
SELECT - 2 / + 52 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 40 * col2 AS col0 FROM tab1 AS cor0
----
-2160
-2280
-3840

query I rowsort
SELECT DISTINCT - col2 * - 49 FROM tab0 AS cor0
----
1617
4018
49

query I rowsort
SELECT ALL - col0 + + ( col0 * col1 ) AS col2 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT + + col0 + - col2 * col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT + col0 + col1 + 73 FROM tab0 AS cor0
----
183
205
253

onlyif mysql # use DIV operator for integer division
query I rowsort label-9587
SELECT + + col0 - - col1 DIV - ( col1 ) col2 FROM tab0 AS cor0
----
23
34
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9587
SELECT + + col0 - - col1 / - ( col1 ) col2 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT ALL + + cor0.col2 * + ( col2 ) AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + col0 + cor0.col0 * 68 AS col2 FROM tab1 AS cor0
----
207
4416
5520

query I rowsort
SELECT DISTINCT cor0.col0 + - ( + cor0.col0 ) FROM tab0 cor0
----
0

query I rowsort
SELECT ALL - col0 + - ( - col1 ) FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT - + col2 + col2 + col2 AS col0 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-9593
SELECT - col1 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-9593
SELECT - col1 / - col0 col2 FROM tab0
----
1
2
3

query I rowsort
SELECT col2 * tab0.col0 + + col2 * col2 * - col1 FROM tab0
----
-604586
-62
-92862

onlyif mysql # use DIV operator for integer division
query I rowsort label-9595
SELECT ALL col1 * col2 DIV + ( - col0 ) - - tab2.col2 AS col0 FROM tab2
----
-92
30
7

skipif mysql # not compatible
query I rowsort label-9595
SELECT ALL col1 * col2 / + ( - col0 ) - - tab2.col2 AS col0 FROM tab2
----
-92
30
7

query I rowsort
SELECT DISTINCT - col1 + col1 * col1 + - col2 AS col1 FROM tab2
----
234
3396
903

query I rowsort
SELECT ALL + cor0.col0 * col1 + - col1 AS col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT ALL col2 + ( col2 ) * col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT + col0 + - 54 FROM tab0
----
-19
-30
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9600
SELECT DISTINCT col2 + - ( col2 ) * + CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9600
SELECT DISTINCT col2 + - ( col2 ) * + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL + 39 AS col2 FROM tab0
----
39
39
39

query I rowsort
SELECT DISTINCT col1 + tab1.col1 AS col1 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL 45 * col2 + ( col1 ) * - col1 FROM tab2
----
-2311
1421
254

onlyif mysql # use DIV operator for integer division
query I rowsort label-9604
SELECT ALL col2 DIV - col0 + CAST( col1 AS SIGNED ) col1 FROM tab2
----
17
28
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9604
SELECT ALL col2 / - col0 + CAST ( col1 AS INTEGER ) col1 FROM tab2
----
17
28
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9605
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-9605
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # use DIV operator for integer division
query I rowsort label-9606
SELECT - 12 DIV + tab1.col1 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9606
SELECT - 12 / + tab1.col1 FROM tab1
----
-1
0
0

query I rowsort
SELECT ALL 84 AS col0 FROM tab1 AS cor0
----
84
84
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-9608
SELECT 25 DIV + col2 FROM tab0 AS cor0
----
0
0
25

skipif mysql # not compatible
query I rowsort label-9608
SELECT 25 / + col2 FROM tab0 AS cor0
----
0
0
25

query I rowsort
SELECT DISTINCT - ( cor1.col1 ) FROM tab1, tab2 AS cor0, tab0 AS cor1
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + cor0.col2 * + col2 AS col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT + - 2 AS col2 FROM tab2 cor0
----
-2
-2
-2

query I rowsort
SELECT ALL - col1 * col2 - cor0.col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT + 54 * + col0 * 52 AS col2 FROM tab2 cor0
----
19656
219024
221832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9614
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0, tab2 AS cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-9614
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0, tab2 AS cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT 11 + col1 * - col2 FROM tab0 AS cor0
----
-2827
-7451
-86

query I rowsort
SELECT tab2.col2 + - col2 * 79 FROM tab2
----
-2028
-2106
-2964

query I rowsort
SELECT - col0 - + ( ( + col0 ) ) AS col2 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT 49 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT ALL + - col0 * 30 FROM tab2 AS cor0
----
-210
-2340
-2370

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9620
SELECT 43 + ( - col2 ) * CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9620
SELECT 43 + ( - col2 ) * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 61 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT ALL - col0 * + col0 * col2 AS col2 FROM tab1
----
-233472
-486
-614400

query I rowsort
SELECT + col1 * - col0 + + col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT + 51 * - col0 + col1 + + col0 * + 3 * - col0 FROM tab1 AS cor0
----
-154
-15542
-23267

query I rowsort
SELECT DISTINCT + 65 AS col0 FROM tab2, tab0 AS cor0
----
65

query I rowsort
SELECT DISTINCT - col1 * col0 + col1 AS col0 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT - - col0 * - col2 AS col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT - - col0 + + col2 * 96 * + col1 FROM tab1 cor0
----
119888
134787
54784

query I rowsort
SELECT + ( tab2.col2 * col0 ) FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-9630
SELECT + 19 DIV col2 + col0 * + col1 FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-9630
SELECT + 19 / col2 + col0 * + col1 FROM tab1
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9631
SELECT CAST( NULL AS SIGNED ) + + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9631
SELECT CAST ( NULL AS INTEGER ) + + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 37 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to b8def841e97863779a391f3a05d3eb92

query I rowsort
SELECT ALL - + 88 AS col0 FROM tab0 AS cor0
----
-88
-88
-88

query I rowsort
SELECT ALL 85 * - cor0.col0 + - col0 AS col1 FROM tab1 AS cor0
----
-258
-5504
-6880

query I rowsort
SELECT DISTINCT col1 + - 18 AS col2 FROM tab1
----
-5
-8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + tab2.col2 ) col0 FROM tab2, tab1 AS cor0
----
26
27
38

query I rowsort
SELECT - tab1.col0 + - tab1.col0 AS col2 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT DISTINCT - col0 * - 5 AS col0 FROM tab1
----
15
320
400

query I rowsort
SELECT DISTINCT - 15 FROM tab1, tab2 AS cor0
----
-15

onlyif mysql # use DIV operator for integer division
query I rowsort label-9640
SELECT + 51 DIV + col0 AS col1 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-9640
SELECT + 51 / + col0 AS col1 FROM tab0 AS cor0
----
0
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9641
SELECT + cor0.col1 DIV 49 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9641
SELECT + cor0.col1 / 49 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT + ( tab1.col2 ) * - col1 + tab1.col0 AS col0 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT tab2.col2 * col1 * col2 AS col0 FROM tab2
----
22599
24548
39884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9644
SELECT CAST( - 44 AS SIGNED ) + + col2 * - 21 FROM tab1 AS cor0
----
-1178
-1241
-2060

skipif mysql # not compatible
query I rowsort label-9644
SELECT CAST ( - 44 AS INTEGER ) + + col2 * - 21 FROM tab1 AS cor0
----
-1178
-1241
-2060

query I rowsort
SELECT cor1.col1 FROM tab2, tab0 AS cor0, tab1 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( - col1 * 42 ) col2 FROM tab1
----
1092
420
546

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL - cor0.col2 * + col0 + col0 AS col1 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT ( + col0 + + col1 ) * - 46 AS col0 FROM tab0
----
-5060
-6072
-8280

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # use DIV operator for integer division
query I rowsort label-9651
SELECT ALL - cor0.col2 DIV 66 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 721682d0719de924079c33bd72eef789

skipif mysql # not compatible
query I rowsort label-9651
SELECT ALL - cor0.col2 / 66 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 721682d0719de924079c33bd72eef789

query I rowsort
SELECT DISTINCT col2 * + col0 + - col1 AS col2 FROM tab1
----
136
3638
7667

query I rowsort
SELECT - cor0.col1 * - 53 + cor0.col1 FROM tab0 AS cor0
----
4644
4914
5238

onlyif mysql # use DIV operator for integer division
query I rowsort label-9654
SELECT + - cor0.col1 + 50 DIV col0 col2 FROM tab0 AS cor0
----
-84
-91
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9654
SELECT + - cor0.col1 + 50 / col0 col2 FROM tab0 AS cor0
----
-84
-91
-96

query I rowsort
SELECT ALL col1 * + col2 * col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT DISTINCT + - col1 * col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

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-9658
SELECT + col1 * CAST( NULL AS SIGNED ) + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9658
SELECT + col1 * CAST ( NULL AS INTEGER ) + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - 90 col0 FROM tab2
----
-31
-59
-73

query I rowsort
SELECT col0 * + 41 FROM tab2
----
287
3198
3239

query I rowsort
SELECT ALL - - col1 + - col2 * - col1 FROM tab1 cor0
----
1261
1430
580

query I rowsort
SELECT - col0 * 89 + cor0.col0 AS col0 FROM tab2 AS cor0
----
-616
-6864
-6952

query I rowsort
SELECT DISTINCT - + col0 + col2 + + 42 AS col2 FROM tab1 AS cor0
----
35
58
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9664
SELECT ALL CAST( + 87 AS SIGNED ) + - cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 1e6598709746d4c001b3c0584e4aed1b

skipif mysql # not compatible
query I rowsort label-9664
SELECT ALL CAST ( + 87 AS INTEGER ) + - cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 1e6598709746d4c001b3c0584e4aed1b

query I rowsort
SELECT ALL - + col0 + - cor0.col1 AS col0 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT ALL - cor0.col2 * 4 + col0 AS col0 FROM tab2 AS cor0
----
-101
-26
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-9667
SELECT ALL + - 89 + 8 DIV + cor0.col2 - 51 DIV col2 AS col2 FROM tab1 AS cor0
----
-89
-89
-89

skipif mysql # not compatible
query I rowsort label-9667
SELECT ALL + - 89 + 8 / + cor0.col2 - 51 / col2 AS col2 FROM tab1 AS cor0
----
-89
-89
-89

query I rowsort
SELECT DISTINCT - - cor0.col0 * ( + col1 ) AS col2 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + ( - col1 ) * - col1 + - ( col2 ) * col2 + col2 AS col0 FROM tab0 AS cor0
----
1639
6340
9409

query I rowsort
SELECT + col0 * ( col2 ) AS col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT + + cor0.col2 + - 69 FROM tab1 AS cor0
----
-12
-15
27

query I rowsort
SELECT ALL cor0.col0 * + col2 + - col2 - - col0 AS col0 FROM tab2 AS cor0
----
169
2080
3043

onlyif mysql # use DIV operator for integer division
query I rowsort label-9673
SELECT ALL col2 DIV + col0 - col2 FROM tab1 AS cor0
----
-36
-57
-95

skipif mysql # not compatible
query I rowsort label-9673
SELECT ALL col2 / + col0 - col2 FROM tab1 AS cor0
----
-36
-57
-95

query I rowsort
SELECT DISTINCT + + col1 * 6 FROM tab0 AS cor0
----
516
546
582

query I rowsort
SELECT col1 + col0 * cor0.col2 AS col2 FROM tab2 cor0
----
2087
220
3019

query I rowsort
SELECT col2 * + 50 AS col0 FROM tab2
----
1300
1350
1900

query I rowsort
SELECT DISTINCT + tab0.col1 * 12 AS col2 FROM tab0, tab2, tab2 AS cor0
----
1032
1092
1164

query I rowsort
SELECT DISTINCT + col2 * 40 * + cor0.col2 + - col2 AS col0 FROM tab2 AS cor0
----
27014
29133
57722

query I rowsort
SELECT ALL - + ( col0 ) + + cor0.col0 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 + + col0 * + col2 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT ALL - + col0 + col2 + col0 AS col1 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-9682
SELECT + + col1 DIV + cor0.col0 AS col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-9682
SELECT + + col1 / + cor0.col0 AS col0 FROM tab1 AS cor0
----
0
0
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9683
SELECT DISTINCT + 98 * col2 + - col2 + 95 * - col1 * CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9683
SELECT DISTINCT + 98 * col2 + - col2 + 95 * - col1 * CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - col1 + col0 - col1 AS col0 FROM tab2 AS cor0
----
-40
-55
45

query I rowsort
SELECT ALL + 34 * - col1 AS col2 FROM tab1 AS cor0
----
-340
-442
-884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * cor0.col0 + + 12 col1 FROM tab1 cor0
----
174
3660
7692

onlyif mysql # use DIV operator for integer division
query I rowsort label-9687
SELECT col0 DIV - col2 + col1 FROM tab0 AS cor0
----
62
86
90

skipif mysql # not compatible
query I rowsort label-9687
SELECT col0 / - col2 + col1 FROM tab0 AS cor0
----
62
86
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + - col2 col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT ALL - + col2 * col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + col1 * - col1 AS col1 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - 37 * - col2 AS col1 FROM tab2 AS cor0
----
1406
962
999

query I rowsort
SELECT - 91 * + col0 FROM tab0 AS cor0
----
-2184
-3185
-8099

query I rowsort
SELECT ALL + cor0.col2 * + col2 - col1 * + col1 AS col2 FROM tab1 AS cor0
----
2240
3149
9047

onlyif mysql # use DIV operator for integer division
query I rowsort label-9694
SELECT DISTINCT + 38 DIV + col0 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-9694
SELECT DISTINCT + 38 / + col0 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT + col2 * + col2 - - 96 * col0 FROM tab0 cor0
----
15268
3361
3393

query I rowsort
SELECT DISTINCT 27 * cor0.col0 FROM tab1 AS cor0
----
1728
2160
81

query I rowsort
SELECT DISTINCT + col0 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9698
SELECT + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-9698
SELECT + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-9699
SELECT col0 + - 15 DIV col2 AS col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-9699
SELECT col0 + - 15 / col2 AS col0 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9700
SELECT DISTINCT + + col0 DIV ( + 82 ) FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9700
SELECT DISTINCT + + col0 / ( + 82 ) FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL col0 + - 66 FROM tab2 AS cor0
----
-59
12
13

query I rowsort
SELECT col1 * 28 + + 91 FROM tab1 AS cor0
----
371
455
819

query I rowsort
SELECT DISTINCT - tab0.col1 * col1 - col2 * col1 * col1 FROM tab0
----
-18818
-251464
-687323

query I rowsort
SELECT ALL - 68 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 6fbba7db5bccb533a35aa5125a231f88

query I rowsort
SELECT 48 AS col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT ALL + 56 * + col0 FROM tab2
----
392
4368
4424

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 68 col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6fbba7db5bccb533a35aa5125a231f88

query I rowsort
SELECT ALL - 88 * - col1 * - ( - col0 ) AS col2 FROM tab0 AS cor0
----
181632
298760
712712

query I rowsort
SELECT ALL - cor0.col2 * - col1 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - 85 + + col2 AS col0 FROM tab2 AS cor0
----
-47
-58
-59

query I rowsort
SELECT ALL + col0 * col1 + col0 * col1 FROM tab2 AS cor0
----
2686
434
9204

query I rowsort
SELECT col0 * col0 + cor0.col0 * + col1 AS col1 FROM tab1 AS cor0
----
4736
7440
87

query I rowsort
SELECT - col1 + + ( - col0 ) AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT + col2 - - 10 FROM tab1 AS cor0
----
106
64
67

query I rowsort
SELECT + 59 * col2 * col1 + col1 FROM tab1
----
33640
73645
82862

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col2 * - col0 ) col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT + col0 + col1 * 59 FROM tab0 AS cor0
----
5098
5458
5758

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9718
SELECT 22 * col2 + ( col0 + - col2 ) * - CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9718
SELECT 22 * col2 + ( col0 + - col2 ) * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col1 + col2 * cor0.col0 FROM tab1 AS cor0
----
136
3638
7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-9720
SELECT ALL col2 DIV 61 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9720
SELECT ALL col2 / 61 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9721
SELECT DISTINCT + + CAST( - ( col0 ) AS SIGNED ) FROM tab2 cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-9721
SELECT DISTINCT + + CAST ( - ( col0 ) AS INTEGER ) FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + col2 * 62 AS col1 FROM tab2 AS cor0
----
1612
1674
2356

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9723
SELECT DISTINCT - CAST( col2 AS SIGNED ) + - col1 AS col1 FROM tab1 AS cor0
----
-109
-67
-80

skipif mysql # not compatible
query I rowsort label-9723
SELECT DISTINCT - CAST ( col2 AS INTEGER ) + - col1 AS col1 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9724
SELECT CAST( 54 AS SIGNED ) + + col2 * col0 FROM tab0 cor0
----
7352
846
89

skipif mysql # not compatible
query I rowsort label-9724
SELECT CAST ( 54 AS INTEGER ) + + col2 * col0 FROM tab0 cor0
----
7352
846
89

query I rowsort
SELECT ALL 81 * col1 FROM tab0 AS cor0
----
6966
7371
7857

onlyif mysql # use DIV operator for integer division
query I rowsort label-9726
SELECT ALL 41 DIV col0 AS col1 FROM tab1 AS cor0
----
0
0
13

skipif mysql # not compatible
query I rowsort label-9726
SELECT ALL 41 / col0 AS col1 FROM tab1 AS cor0
----
0
0
13

query I rowsort
SELECT DISTINCT - - ( col1 ) + - col2 AS col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT - + ( 98 ) AS col0 FROM tab2 cor0
----
-98

query I rowsort
SELECT ALL tab1.col0 + - 69 * + col0 AS col1 FROM tab1
----
-204
-4352
-5440

onlyif mysql # use DIV operator for integer division
query I rowsort label-9730
SELECT + + col0 + ( col0 ) + col2 * 9 DIV - col0 FROM tab1 AS cor0
----
-156
120
150

skipif mysql # not compatible
query I rowsort label-9730
SELECT + + col0 + ( col0 ) + col2 * 9 / - col0 FROM tab1 AS cor0
----
-156
120
150

query I rowsort
SELECT + + cor0.col0 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL 90 AS col0 FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT - 35 + + col1 AS col2 FROM tab0 AS cor0
----
51
56
62

query I rowsort
SELECT + col1 * + cor0.col1 FROM tab1 cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 89 col1 FROM tab0 AS cor0
----
89
89
89

query I rowsort
SELECT 19 * tab0.col0 FROM tab0
----
1691
456
665

query I rowsort
SELECT ( 56 ) AS col1 FROM tab1
----
56
56
56

query I rowsort
SELECT + 78 * ( + col0 ) + col0 FROM tab1
----
237
5056
6320

query I rowsort
SELECT + 66 + - col1 * 85 AS col1 FROM tab2 AS cor0
----
-1379
-2569
-4949

onlyif mysql # use DIV operator for integer division
query I rowsort label-9740
SELECT 13 DIV + col1 col0 FROM tab1 cor0
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9740
SELECT 13 / + col1 col0 FROM tab1 cor0
----
0
1
1

query I rowsort
SELECT - 62 * - 12 FROM tab2, tab2 AS cor0
----
9 values hashing to c439c612b1bd8abb794d165b6029a1d4

query I rowsort
SELECT ALL - 21 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 631fbd1fd929405aba54a22c2a06c757

query I rowsort
SELECT DISTINCT 30 FROM tab0, tab0 AS cor0
----
30

query I rowsort
SELECT - col1 * - 79 + 80 FROM tab2 AS cor0
----
1423
2529
4741

query I rowsort
SELECT ALL + - col0 * + 43 FROM tab1 AS cor0
----
-129
-2752
-3440

query I rowsort
SELECT tab2.col2 * tab2.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to f5605ce6cbd6ecc79a4a887488bb6947

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9747
SELECT - ( cor0.col0 ) * - col0 + - CAST( cor0.col0 AS SIGNED ) FROM tab1 cor0
----
4032
6
6320

skipif mysql # not compatible
query I rowsort label-9747
SELECT - ( cor0.col0 ) * - col0 + - CAST ( cor0.col0 AS INTEGER ) FROM tab1 cor0
----
4032
6
6320

query I rowsort
SELECT 54 + + 67 FROM tab2 AS cor0
----
121
121
121

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 77 col1 FROM tab1 AS cor0
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 32 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

query I rowsort
SELECT 79 * + 3 + - col2 + col2 AS col1 FROM tab1 AS cor0
----
237
237
237

query I rowsort
SELECT DISTINCT - + col0 + + 99 * - ( - col2 ) FROM tab1 AS cor0
----
5343
5579
9424

onlyif mysql # use DIV operator for integer division
query I rowsort label-9753
SELECT DISTINCT cor0.col0 DIV col1 - 66 FROM tab2 AS cor0
----
-62
-65
-66

skipif mysql # not compatible
query I rowsort label-9753
SELECT DISTINCT cor0.col0 / col1 - 66 FROM tab2 AS cor0
----
-62
-65
-66

query I rowsort
SELECT DISTINCT + - col1 + - ( col1 ) + col0 AS col2 FROM tab0 AS cor0
----
-148
-159
-93

query I rowsort
SELECT DISTINCT col0 * 2 - col2 FROM tab1 AS cor0
----
-48
64
71

query I rowsort
SELECT col1 * + col1 + 71 + col1 AS col0 FROM tab0 AS cor0
----
7553
8443
9577

onlyif mysql # use DIV operator for integer division
query I rowsort label-9757
SELECT DISTINCT col1 DIV + 25 AS col0 FROM tab1 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-9757
SELECT DISTINCT col1 / + 25 AS col0 FROM tab1 cor0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 + col0 + - col2 col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + col0 * - col0 - col1 AS col2 FROM tab2 AS cor0
----
-6143
-6258
-80

query I rowsort
SELECT ALL ( col2 ) * + col0 - 37 AS col1 FROM tab1 AS cor0
----
125
3611
7643

onlyif mysql # use DIV operator for integer division
query I rowsort label-9761
SELECT DISTINCT + + 34 DIV col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9761
SELECT DISTINCT + + 34 / col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + 82 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9763
SELECT CAST( 85 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
85
85
85

skipif mysql # not compatible
query I rowsort label-9763
SELECT CAST ( 85 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
85
85
85

query I rowsort
SELECT cor0.col0 * ( cor0.col0 + - col2 ) AS col0 FROM tab0 AS cor0
----
-216
1190
623

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 14 + 91 * + col2 col2 FROM tab0 AS cor0
----
105
3017
7476

onlyif mysql # use DIV operator for integer division
query I rowsort label-9766
SELECT ALL - cor0.col1 DIV - col0 AS col2 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-9766
SELECT ALL - cor0.col1 / - col0 AS col2 FROM tab1 AS cor0
----
0
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 84 - 38 col2 FROM tab0 AS cor0
----
46
46
46

query I rowsort
SELECT - col1 + - tab0.col1 FROM tab0
----
-172
-182
-194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + cor0.col1 + cor0.col2 * - 47 * 58 + col0 AS col2 FROM tab2 AS cor0
----
-103492
-70739
-73564

query I rowsort
SELECT - - cor0.col1 * col1 + ( col2 ) FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT 1 * + col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col1 FROM tab1 WHERE - col1 NOT IN ( - col2 * + col2 )
----
10
13
26

query I rowsort
SELECT ALL - col0 * tab0.col2 AS col1 FROM tab0 WHERE + col2 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT tab1.col1 + col2 AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT 85 * col2 + cor0.col1 * col2 FROM tab2 AS cor0
----
3132
3744
3876

query I rowsort
SELECT - ( col1 ) * - col0 + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL + col2 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-9779
SELECT col2 DIV + col0 + col0 AS col1 FROM tab0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-9779
SELECT col2 / + col0 + col0 AS col1 FROM tab0
----
25
35
89

query I rowsort
SELECT col2 + col2 * - col2 + 66 FROM tab2
----
-1340
-584
-636

query I rowsort
SELECT + ( + col1 ) * - 11 FROM tab1
----
-110
-143
-286

query I rowsort
SELECT 38 * + col0 - col0 FROM tab2
----
259
2886
2923

query I rowsort
SELECT - 30 + tab0.col0 AS col1 FROM tab0
----
-6
5
59

query I rowsort
SELECT + cor0.col1 + - 96 * - col2 FROM tab0 AS cor0
----
193
3254
7963

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col0 FROM tab0, tab1 cor0
----
9 values hashing to 27b4e0878ffa5c5df119ac6cfa79ea07

query I rowsort
SELECT - 32 * + col2 AS col0 FROM tab2
----
-1216
-832
-864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9787
SELECT tab2.col1 * col2 + - col2 * col0 - col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9787
SELECT tab2.col1 * col2 + - col2 * col0 - col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9788
SELECT DISTINCT col0 * col2 + CAST( NULL AS DECIMAL ) + - tab0.col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-9788
SELECT DISTINCT col0 * col2 + CAST ( NULL AS REAL ) + - tab0.col1 FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9789
SELECT 23 DIV - col0 + 85 AS col2 FROM tab0
----
85
85
85

skipif mysql # not compatible
query I rowsort label-9789
SELECT 23 / - col0 + 85 AS col2 FROM tab0
----
85
85
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9790
SELECT + + col1 + + col0 DIV + 83 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9790
SELECT + + col1 + + col0 / + 83 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + + cor1.col0 AS col2 FROM tab2, tab0 cor0, tab0, tab1 AS cor1
----
81 values hashing to e28bf7f922650ca423ade3642ce0285b

query I rowsort
SELECT + col2 + - col0 + + col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT col2 * ( cor0.col0 ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - cor0.col2 + + col2 + - col2 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col1 + col0 * + col0 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT DISTINCT - col0 * - 50 FROM tab1 AS cor0
----
150
3200
4000

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9797
SELECT DISTINCT + tab2.col2 * - CAST( 62 AS SIGNED ) FROM tab2
----
-1612
-1674
-2356

skipif mysql # not compatible
query I rowsort label-9797
SELECT DISTINCT + tab2.col2 * - CAST ( 62 AS INTEGER ) FROM tab2
----
-1612
-1674
-2356

onlyif mysql # use DIV operator for integer division
query I rowsort label-9798
SELECT col0 * CAST( - col0 AS SIGNED ) DIV col1 + + CAST( + col0 * + col1 AS SIGNED ) FROM tab0
----
2058
3383
8012

skipif mysql # not compatible
query I rowsort label-9798
SELECT col0 * CAST ( - col0 AS INTEGER ) / col1 + + CAST ( + col0 * + col1 AS INTEGER ) FROM tab0
----
2058
3383
8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-9799
SELECT ALL - col2 + + 33 DIV 21 FROM tab2
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-9799
SELECT ALL - col2 + + 33 / 21 FROM tab2
----
-25
-26
-37

query I rowsort
SELECT - tab2.col2 * - 48 FROM tab2
----
1248
1296
1824

query I rowsort
SELECT ALL + + col1 * + 50 FROM tab1 AS cor0
----
1300
500
650

query I rowsort
SELECT DISTINCT + - col0 + - col0 * col2 AS col2 FROM tab1 AS cor0
----
-165
-3712
-7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 + col1 col2 FROM tab2
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-9804
SELECT col1 DIV - 98 - col2 * - ( 7 ) col0 FROM tab1
----
378
399
672

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9804
SELECT col1 / - 98 - col2 * - ( 7 ) col0 FROM tab1
----
378
399
672

query I rowsort
SELECT col2 + col1 * + tab1.col1 FROM tab1
----
157
265
730

query I rowsort
SELECT DISTINCT ( - col0 * - col2 ) FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT - 60 FROM tab1, tab1 AS cor0
----
-60

query I rowsort
SELECT ALL cor1.col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT + ( col0 ) * col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + 17 * col1 + - col1 + col2 AS col0 FROM tab0 AS cor0
----
1409
1538
1553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col2 ) * - col0 + col0 col2 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT - ( col2 * - col2 ) + 7 * col2 AS col1 FROM tab1
----
3294
3648
9888

query I rowsort
SELECT DISTINCT ( - cor0.col0 ) * - ( - cor0.col0 ) AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT - 10 + - cor0.col1 AS col2 FROM tab2 cor0
----
-27
-41
-69

query I rowsort
SELECT + col0 * cor0.col2 * col0 + + col0 FROM tab1 AS cor0
----
233536
489
614480

query I rowsort
SELECT ALL col0 * col0 + + col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT + col0 * - col0 + + col0 AS col0 FROM tab0 AS cor0
----
-1190
-552
-7832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 14 * - cor0.col1 * col0 + col1 col1 FROM tab2 cor0
----
18819
3069
64487

query I rowsort
SELECT ALL - 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-9820
SELECT - col0 * col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9820
SELECT - col0 * col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * + col1 + - 39 FROM tab1 AS cor0
----
-1287
-1443
-609

query I rowsort
SELECT ALL + 8 * - col0 FROM tab1 AS cor0
----
-24
-512
-640

query I rowsort
SELECT DISTINCT - 93 * col0 + 62 * col1 AS col2 FROM tab1 AS cor0
----
-5332
-6634
1333

onlyif mysql # use DIV operator for integer division
query I rowsort label-9824
SELECT + - 30 DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9824
SELECT + - 30 / - col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9825
SELECT DISTINCT ( - col1 ) DIV CAST( - col2 * + cor0.col1 AS SIGNED ) + + ( 49 ) DIV - cor0.col0 FROM tab0 AS cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-9825
SELECT DISTINCT ( - col1 ) / CAST ( - col2 * + cor0.col1 AS INTEGER ) + + ( 49 ) / - cor0.col0 FROM tab0 AS cor0
----
-2
0

query I rowsort
SELECT DISTINCT col0 + - col0 * ( cor0.col2 ) FROM tab0 cor0
----
-7209
-768
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9827
SELECT ALL - 83 DIV + col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9827
SELECT ALL - 83 / + col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 33 + + col1 AS col1 FROM tab2 AS cor0
----
50
64
92

query I rowsort
SELECT ALL - ( col2 ) + col2 * + col2 FROM tab1 cor0
----
2862
3192
9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-9830
SELECT DISTINCT col0 + + col1 DIV - col0 col2 FROM tab1 AS cor0
----
-5
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9830
SELECT DISTINCT col0 + + col1 / - col0 col2 FROM tab1 AS cor0
----
-5
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col2 col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - + col0 * col2 + 36 AS col0 FROM tab0 cor0
----
-7262
-756
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9833
SELECT ALL - col0 * - CAST( NULL AS SIGNED ) + + 4 * cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9833
SELECT ALL - col0 * - CAST ( NULL AS INTEGER ) + + 4 * cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col2 * 5 FROM tab2 cor0
----
-130
-135
-190

query I rowsort
SELECT DISTINCT + - cor0.col0 + 68 FROM tab0 AS cor0
----
-21
33
44

query I rowsort
SELECT col2 + + col0 * + col0 FROM tab2
----
6110
6279
76

query I rowsort
SELECT ALL - + 67 + ( - col2 ) FROM tab0 AS cor0
----
-100
-149
-68

query I rowsort
SELECT ALL + cor0.col2 * col1 + + col2 AS col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL - ( col0 ) + - cor0.col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT + + 7 FROM tab1 AS cor0
----
7

query I rowsort
SELECT ALL - col1 + - 50 * + col0 * 79 + 31 FROM tab2 AS cor0
----
-27650
-308128
-312036

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9842
SELECT - - CAST( NULL AS SIGNED ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9842
SELECT - - CAST ( NULL AS INTEGER ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * + 41 AS col1 FROM tab1 cor0
----
123
2624
3280

onlyif mysql # use DIV operator for integer division
query I rowsort label-9844
SELECT + cor0.col0 + + ( + col0 ) * 42 DIV 20 FROM tab1 AS cor0
----
198
248
9

skipif mysql # not compatible
query I rowsort label-9844
SELECT + cor0.col0 + + ( + col0 ) * 42 / 20 FROM tab1 AS cor0
----
198
248
9

query I rowsort
SELECT - col1 * + cor0.col2 * col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT - 89 + + col0 AS col2 FROM tab1 cor0
----
-25
-86
-9

query I rowsort
SELECT ALL + + ( col0 ) * 35 * + 37 AS col0 FROM tab2 AS cor0
----
101010
102305
9065

query I rowsort
SELECT + + col2 - col1 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT col0 + col2 * - cor0.col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT ALL + + col2 * col1 - + col0 AS col1 FROM tab2 AS cor0
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col0 + + cor0.col2 * + col0 * col0 col1 FROM tab2 AS cor0
----
1512
160212
240160

query I rowsort
SELECT DISTINCT - - 62 + col0 AS col2 FROM tab0 AS cor0
----
151
86
97

query I rowsort
SELECT DISTINCT + - col0 * + col2 - + ( 85 ) FROM tab0 AS cor0
----
-120
-7383
-877

query I rowsort
SELECT ALL + + 59 * col2 FROM tab1 AS cor0
----
3186
3363
5664

query I rowsort
SELECT DISTINCT - 46 * + col0 AS col0 FROM tab2 AS cor0
----
-322
-3588
-3634

onlyif mysql # use DIV operator for integer division
query I rowsort label-9856
SELECT ALL col0 + - col1 DIV 93 AS col1 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-9856
SELECT ALL col0 + - col1 / 93 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - col2 * col0 + ( - col0 ) * ( col1 ) + - col0 FROM tab0 cor0
----
-15486
-2880
-3465

query I rowsort
SELECT ALL col2 - - 37 FROM tab0 AS cor0
----
119
38
70

query I rowsort
SELECT ( - col1 ) + - ( col0 ) FROM tab2
----
-137
-38
-96

query I rowsort
SELECT ALL ( 73 ) FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT + col0 * + 89 AS col2 FROM tab2 AS cor0
----
623
6942
7031

query I rowsort
SELECT col0 + 88 FROM tab1 AS cor0
----
152
168
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + ( cor0.col1 ) col1 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9864
SELECT col2 * + CAST( NULL AS SIGNED ) + + col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9864
SELECT col2 * + CAST ( NULL AS INTEGER ) + + col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * 76 + + col1 + + col0 AS col2 FROM tab2 AS cor0
----
1388
2394
4621

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9866
SELECT + + col0 - ( + 57 ) * col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9866
SELECT + + col0 - ( + 57 ) * col0 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * ( 99 ) col2 FROM tab0 AS cor0
----
8514
9009
9603

query I rowsort
SELECT ALL - col2 + + col1 * - ( + ( + tab1.col1 ) ) FROM tab1
----
-157
-265
-730

query I rowsort
SELECT tab2.col1 * + ( 0 ) FROM tab2
----
0
0
0

query I rowsort
SELECT - 51 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 08d3853e39924d3c636260a6dd856837

query I rowsort
SELECT - 67 + 69 FROM tab1 AS cor0
----
2
2
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9872
SELECT ALL 52 DIV + 44 AS col2 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9872
SELECT ALL 52 / + 44 AS col2 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT DISTINCT col1 * + 50 AS col1 FROM tab2
----
1550
2950
850

query I rowsort
SELECT DISTINCT + 67 * col1 FROM tab1
----
1742
670
871

onlyif mysql # use DIV operator for integer division
query I rowsort label-9876
SELECT ALL + tab1.col0 DIV tab1.col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9876
SELECT ALL + tab1.col0 / tab1.col0 FROM tab1
----
1
1
1

query I rowsort
SELECT DISTINCT 66 + col0 AS col2 FROM tab0 cor0
----
101
155
90

query I rowsort
SELECT - 51 * - col0 AS col2 FROM tab0 AS cor0
----
1224
1785
4539

query I rowsort
SELECT DISTINCT 93 + + col1 FROM tab1
----
103
106
119

onlyif mysql # use DIV operator for integer division
query I rowsort label-9880
SELECT + cor0.col0 DIV - col1 + - col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-9880
SELECT + cor0.col0 / - col1 + - col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9881
SELECT + + CAST( NULL AS SIGNED ) + - ( col2 ) * col0 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-9881
SELECT + + CAST ( NULL AS INTEGER ) + - ( col2 ) * col0 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 81 * - 61 + - col2 FROM tab0
----
4859
4908
4940

query I rowsort
SELECT - col1 * - 37 + col0 * col0 FROM tab1 AS cor0
----
4466
6881
971

onlyif mysql # use DIV operator for integer division
query I rowsort label-9884
SELECT 10 * col2 + - cor0.col0 DIV col1 AS col2 FROM tab2 AS cor0
----
259
270
376

skipif mysql # not compatible
query I rowsort label-9884
SELECT 10 * col2 + - cor0.col0 / col1 AS col2 FROM tab2 AS cor0
----
259
270
376

query I rowsort
SELECT ALL - col2 * - col2 + 17 * - cor0.col2 * col0 AS col2 FROM tab0 AS cor0
----
-117342
-12375
-594

query I rowsort
SELECT ALL - 58 * cor0.col1 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 602e314951d1f9e90efb50f7e8809d97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9887
SELECT ALL - - cor0.col2 * col1 / CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9887
SELECT ALL - - cor0.col2 * col1 / CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * - cor0.col0 + + 84 FROM tab0 AS cor0
----
-708
-7214
49

query I rowsort
SELECT ALL col0 * col0 + - col1 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT DISTINCT col0 * + col0 + col1 FROM tab2 cor0
----
6143
6258
80

query I rowsort
SELECT DISTINCT - col2 - - col0 AS col0 FROM tab0 AS cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + + cor0.col2 col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT 64 FROM tab0, tab2 cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 9bd8c7417aea89812d57dc6142310b3f

onlyif mysql # use DIV operator for integer division
query I rowsort label-9894
SELECT + col0 DIV col1 + 13 * col1 col0 FROM tab0 AS cor0
----
1118
1183
1261

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9894
SELECT + col0 / col1 + 13 * col1 col0 FROM tab0 AS cor0
----
1118
1183
1261

query I rowsort
SELECT DISTINCT - 78 + col1 FROM tab1 AS cor0
----
-52
-65
-68

query I rowsort
SELECT DISTINCT - col2 * col0 * + cor0.col1 + col1 FROM tab2 cor0
----
-119593
-51017
-5828

onlyif mysql # use DIV operator for integer division
query I rowsort label-9897
SELECT DISTINCT cor0.col2 DIV - col2 + col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-9897
SELECT DISTINCT cor0.col2 / - col2 + col0 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT ALL - ( - cor1.col0 ) FROM tab1, tab1 AS cor0, tab2 AS cor1, tab0, tab0 cor2
----
243 values hashing to 455e4df3bf7b0fa681c56e89df1a761f

onlyif mysql # use DIV operator for integer division
query I rowsort label-9899
SELECT - - col0 + 5 DIV 47 AS col2 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-9899
SELECT - - col0 + 5 / 47 AS col2 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9900
SELECT col1 * CAST( + 92 * - col0 AS SIGNED ) - col0 FROM tab1
----
-58944
-7179
-95760

skipif mysql # not compatible
query I rowsort label-9900
SELECT col1 * CAST ( + 92 * - col0 AS INTEGER ) - col0 FROM tab1
----
-58944
-7179
-95760

query I rowsort
SELECT DISTINCT col0 * 81 AS col1 FROM tab1
----
243
5184
6480

query I rowsort
SELECT DISTINCT col0 + + col0 + col2 AS col0 FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT DISTINCT 19 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
19

query I rowsort
SELECT col0 - - col1 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT 45 FROM tab2 cor0
----
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9906
SELECT DISTINCT CAST( NULL AS SIGNED ) * cor0.col2 * + col2 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9906
SELECT DISTINCT CAST ( NULL AS INTEGER ) * cor0.col2 * + col2 AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL 33 + - 66 AS col0 FROM tab2 AS cor0
----
-33
-33
-33

query I rowsort
SELECT + col1 + col2 * + col1 AS col0 FROM tab2 AS cor0
----
1593
663
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9909
SELECT ALL - CAST( + col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-9909
SELECT ALL - CAST ( + col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - col2 * 24 + col0 * 59 FROM tab1 cor0
----
-1119
2408
2416

query I rowsort
SELECT DISTINCT + 66 + + col1 * + col0 FROM tab0 AS cor0
----
2130
3461
8165

query I rowsort
SELECT DISTINCT + col1 * - col0 * + col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL 52 + col0 FROM tab0 AS cor0
----
141
76
87

query I rowsort
SELECT ALL + - col1 + 93 AS col1 FROM tab2 AS cor0
----
34
62
76

query I rowsort
SELECT ALL - col2 * ( + col0 ) - + 73 * 21 FROM tab2 AS cor0
----
-1722
-3561
-4535

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9916
SELECT + CAST( NULL AS SIGNED ) - + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9916
SELECT + CAST ( NULL AS INTEGER ) - + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 78 + - col2 AS col0 FROM tab0 cor0
----
-111
-160
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + 3 col1 FROM tab0
----
36
4
85

query I rowsort
SELECT ALL + tab2.col1 * 72 * - col1 AS col0 FROM tab2
----
-20808
-250632
-69192

onlyif mysql # use DIV operator for integer division
query I rowsort label-9920
SELECT col2 DIV 30 AS col1 FROM tab1
----
1
1
3

skipif mysql # not compatible
query I rowsort label-9920
SELECT col2 / 30 AS col1 FROM tab1
----
1
1
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 40 col0 FROM tab1 AS cor0
----
-40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9922
SELECT - - CAST( NULL AS SIGNED ) / col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9922
SELECT - - CAST ( NULL AS INTEGER ) / col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 * 11 FROM tab2 AS cor0
----
77
858
869

onlyif mysql # use DIV operator for integer division
query I rowsort label-9924
SELECT - - 97 DIV col2 AS col0 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-9924
SELECT - - 97 / col2 AS col0 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT - 79 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2, tab2 cor1, tab0 AS cor2
----
81 values hashing to 3abaf25c7c70ca51adcfa7c848319730

query I rowsort
SELECT + 78 FROM tab1, tab1 AS cor0, tab0 cor1, tab0 AS cor2
----
81 values hashing to f0487ba81d377516702723e098c02ba1

query I rowsort
SELECT ALL + + col0 + - 80 * - col0 FROM tab2 AS cor0
----
567
6318
6399

onlyif mysql # use DIV operator for integer division
query I rowsort label-9928
SELECT ALL ( col1 ) DIV + col0 + - col0 + col2 AS col2 FROM tab2
----
-41
-52
24

skipif mysql # not compatible
query I rowsort label-9928
SELECT ALL ( col1 ) / + col0 + - col0 + col2 AS col2 FROM tab2
----
-41
-52
24

query I rowsort
SELECT - 15 + col0 FROM tab2 AS cor0
----
-8
63
64

query I rowsort
SELECT + ( - 84 ) AS col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 02f1688b8610806ca28739b1735f6ae4

query I rowsort
SELECT DISTINCT - col0 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + + 98 AS col0 FROM tab2, tab1, tab2 AS cor0
----
98

query I rowsort
SELECT ALL col2 + + col0 * 98 FROM tab1
----
348
6329
7936

onlyif mysql # use DIV operator for integer division
query I rowsort label-9934
SELECT + - cor0.col1 DIV + 67 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9934
SELECT + - cor0.col1 / + 67 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - col1 * col1 AS col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-9936
SELECT ALL + col2 + 50 DIV + 9 FROM tab1 AS cor0
----
101
59
62

skipif mysql # not compatible
query I rowsort label-9936
SELECT ALL + col2 + 50 / + 9 FROM tab1 AS cor0
----
101
59
62

query I rowsort
SELECT ALL - - col2 * + col2 + ( + cor0.col0 * - col2 ) FROM tab0 AS cor0
----
-34
-574
297

query I rowsort
SELECT DISTINCT + col0 + col2 * ( col1 ) AS col1 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-9939
SELECT cor0.col1 DIV 64 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-9939
SELECT cor0.col1 / 64 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL col0 + - tab0.col0 + - ( + col1 ) FROM tab0
----
-86
-91
-97

query I rowsort
SELECT ALL 86 * - col0 + col0 FROM tab2
----
-595
-6630
-6715

query I rowsort
SELECT ALL + col2 * 82 AS col1 FROM tab2 AS cor0
----
2132
2214
3116

onlyif mysql # use DIV operator for integer division
query I rowsort label-9943
SELECT DISTINCT - col0 DIV + cor0.col0 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-9943
SELECT DISTINCT - col0 / + cor0.col0 FROM tab0 AS cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9944
SELECT + col1 DIV 16 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9944
SELECT + col1 / 16 FROM tab1 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9945
SELECT col1 DIV 56 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9945
SELECT col1 / 56 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT - - col0 * + 21 * - ( - col1 * - 65 ) FROM tab0 AS cor0
----
-11055135
-2817360
-4634175

query I rowsort
SELECT DISTINCT - col2 * + ( 95 ) AS col0 FROM tab0 cor0
----
-3135
-7790
-95

skipif mysql # not compatible
query I rowsort
SELECT ALL + col0 / - CAST ( col0 AS REAL ) + col0 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT ALL - col0 * + 20 + - col0 FROM tab2 AS cor0
----
-147
-1638
-1659

query I rowsort
SELECT DISTINCT - col2 + + col2 * + ( cor0.col0 ) AS col0 FROM tab0 cor0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-9951
SELECT + + col2 * + col2 + 73 DIV + col1 FROM tab1 AS cor0
----
2918
3256
9221

skipif mysql # not compatible
query I rowsort label-9951
SELECT + + col2 * + col2 + 73 / + col1 FROM tab1 AS cor0
----
2918
3256
9221

query I rowsort
SELECT - col2 * - col2 + 5 * - col2 FROM tab2 AS cor0
----
1254
546
594

query I rowsort
SELECT - 36 + + col1 AS col2 FROM tab2 AS cor0
----
-19
-5
23

query I rowsort
SELECT DISTINCT + 21 AS col0 FROM tab1, tab2 AS cor0 CROSS JOIN tab2
----
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 78 * cor0.col2 * 42 + col1 * + cor0.col0 col1 FROM tab2 AS cor0
----
125831
88669
89778

query I rowsort
SELECT - ( - col0 ) + - col0 + ( col1 ) FROM tab1
----
10
13
26

query I rowsort
SELECT + + cor0.col2 + - col1 * + col0 AS col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + cor0.col2 col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT ALL + cor0.col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL ( tab2.col2 ) * 56 FROM tab2
----
1456
1512
2128

onlyif mysql # use DIV operator for integer division
query I rowsort label-9961
SELECT + col2 DIV - ( - tab1.col0 ) FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-9961
SELECT + col2 / - ( - tab1.col0 ) FROM tab1
----
0
1
18

query I rowsort
SELECT - col1 + + 41 + - 90 FROM tab2
----
-108
-66
-80

query I rowsort
SELECT + col1 * ( ( - tab1.col1 ) ) + - col1 FROM tab1
----
-110
-182
-702

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9964
SELECT - CAST( col2 AS SIGNED ) + col2 * - col2 AS col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

skipif mysql # not compatible
query I rowsort label-9964
SELECT - CAST ( col2 AS INTEGER ) + col2 * - col2 AS col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT col0 + col2 + + cor0.col0 AS col2 FROM tab2 AS cor0
----
182
196
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-9966
SELECT DISTINCT col1 DIV col0 + - 54 * - tab0.col2 DIV - ( - col2 ) FROM tab0
----
55
56
57

skipif mysql # not compatible
query I rowsort label-9966
SELECT DISTINCT col1 / col0 + - 54 * - tab0.col2 / - ( - col2 ) FROM tab0
----
55
56
57

query I rowsort
SELECT 44 * col1 - col2 AS col2 FROM tab2 AS cor0
----
1337
2570
710

onlyif mysql # use DIV operator for integer division
query I rowsort label-9968
SELECT col1 * - 1 + col2 + + col2 DIV tab1.col0 FROM tab1
----
46
47
84

skipif mysql # not compatible
query I rowsort label-9968
SELECT col1 * - 1 + col2 + + col2 / tab1.col0 FROM tab1
----
46
47
84

query I rowsort
SELECT + col1 + + col1 + col2 * col1 AS col1 FROM tab0
----
291
3010
7644

onlyif mysql # use DIV operator for integer division
query I rowsort label-9970
SELECT ALL - col0 DIV + col2 col1 FROM tab1
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9970
SELECT ALL - col0 / + col2 col1 FROM tab1
----
-1
0
0

query I rowsort
SELECT col2 + 44 AS col1 FROM tab1
----
101
140
98

query I rowsort
SELECT - col0 * col2 * + tab2.col2 + + col2 AS col2 FROM tab2
----
-114038
-5076
-52702

query I rowsort
SELECT DISTINCT 37 AS col0 FROM tab0, tab2 AS cor0
----
37

query I rowsort
SELECT ALL - 94 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + ( + 31 + - col2 * - col0 ) col2 FROM tab1
----
247
3736
7807

onlyif mysql # use DIV operator for integer division
query I rowsort label-9976
SELECT ALL 50 DIV col0 FROM tab2 AS cor0
----
0
0
7

skipif mysql # not compatible
query I rowsort label-9976
SELECT ALL 50 / col0 FROM tab2 AS cor0
----
0
0
7

query I rowsort
SELECT ALL ( 60 * col1 ) AS col0 FROM tab2
----
1020
1860
3540

query I rowsort
SELECT + col1 * - 50 FROM tab1 AS cor0
----
-1300
-500
-650

onlyif mysql # use DIV operator for integer division
query I rowsort label-9979
SELECT - col1 DIV col0 - - col1 AS col2 FROM tab2 AS cor0
----
17
27
59

skipif mysql # not compatible
query I rowsort label-9979
SELECT - col1 / col0 - - col1 AS col2 FROM tab2 AS cor0
----
17
27
59

query I rowsort
SELECT ALL - + cor0.col2 + col1 AS col2 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9981
SELECT - CAST( ( + col1 ) AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-9981
SELECT - CAST ( ( + col1 ) AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + - col0 - col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT + ( + 72 ) * + col0 * - 81 FROM tab0
----
-139968
-204120
-519048

query I rowsort
SELECT ALL - 62 FROM tab2, tab2 AS cor0
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

query I rowsort
SELECT 2 * col0 FROM tab2
----
14
156
158

query I rowsort
SELECT DISTINCT + 10 FROM tab2, tab0 AS cor0
----
10

query I rowsort
SELECT 12 * + col2 AS col1 FROM tab0
----
12
396
984

query I rowsort
SELECT DISTINCT - ( + col1 + - col2 ) FROM tab1
----
28
47
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9989
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0, tab0 cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-9989
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0, tab0 cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT + ( col2 ) * + col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col1 * - col2 - + col2 AS col0 FROM tab1
----
-1344
-1458
-627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9992
SELECT col0 * cor0.col1 + + CAST( - 29 AS SIGNED ) * - col2 AS col0 FROM tab2 AS cor0
----
1000
2445
5356

skipif mysql # not compatible
query I rowsort label-9992
SELECT col0 * cor0.col1 + + CAST ( - 29 AS INTEGER ) * - col2 AS col0 FROM tab2 AS cor0
----
1000
2445
5356

query I rowsort
SELECT - cor0.col2 * col1 + 13 * ( col2 * cor0.col0 ) AS col2 FROM tab1 AS cor0
----
46854
702
98592

query I rowsort
SELECT - col1 - - col1 * tab1.col1 AS col1 FROM tab1
----
156
650
90

query I rowsort
SELECT - col0 * + col0 + - col0 * 52 AS col0 FROM tab2 AS cor0
----
-10140
-10349
-413

query I rowsort
SELECT + 25 * - cor0.col2 + - col2 FROM tab1 AS cor0
----
-1404
-1482
-2496

onlyif mysql # use DIV operator for integer division
query I rowsort label-9997
SELECT ALL 65 DIV + cor0.col2 + + cor0.col0 * - ( + col0 ) FROM tab0 AS cor0
----
-1160
-575
-7921

skipif mysql # not compatible
query I rowsort label-9997
SELECT ALL 65 / + cor0.col2 + + cor0.col0 * - ( + col0 ) FROM tab0 AS cor0
----
-1160
-575
-7921

query I rowsort
SELECT - - 27 + 0 * cor0.col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753