sqllogictest

Artifact [1c7214402c]
Login

Artifact 1c7214402c2517e89d0329d5828d21eaf4682fb4:


hash-threshold 8

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col1 + + col2 + col0 AS col1 FROM tab1 cor0
----
111
163
31

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

query I rowsort
SELECT DISTINCT - - 88 + col1 FROM tab0 AS cor0
----
174
179
185

query I rowsort
SELECT DISTINCT 79 * - col0 + ( col2 ) * col1 + - 14 FROM tab1 AS cor0
----
-4500
-5086
1153

query I rowsort
SELECT ALL - cor0.col0 * + col0 - - 72 AS col1 FROM tab2 AS cor0
----
-6012
-6169
23

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

query I rowsort
SELECT ALL 97 AS col1 FROM tab1
----
97
97
97

query I rowsort
SELECT + cor0.col2 FROM tab0, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

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

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

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

query I rowsort
SELECT DISTINCT 70 FROM tab0, tab0 AS cor0
----
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-13
SELECT col2 * - ( + col1 ) + col0 DIV - col1 - 86 AS col2 FROM tab0 AS cor0
----
-183
-2924
-7548

skipif mysql # not compatible
query I rowsort label-13
SELECT col2 * - ( + col1 ) + col0 / - col1 - 86 AS col2 FROM tab0 AS cor0
----
-183
-2924
-7548

query I rowsort
SELECT + 76 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7b2b08dd3f1adef028d3f40ef7c716da

query I rowsort
SELECT DISTINCT - + cor0.col1 + + cor0.col1 * + cor0.col1 FROM tab0, tab0 cor0
----
7310
8190
9312

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

query I rowsort
SELECT col1 * col1 - + col1 * - col2 FROM tab2 AS cor0
----
1798
5015
935

query I rowsort
SELECT ALL col1 - tab2.col0 * tab2.col0 AS col2 FROM tab2
----
-18
-6025
-6224

query I rowsort
SELECT ( cor0.col1 + - cor2.col0 ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 38a43dabebf65768b261509f7b1e62d4

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

query I rowsort
SELECT 39 + + 52 AS col2 FROM tab2 AS cor0
----
91
91
91

query I rowsort
SELECT ALL + + col1 + 52 * - col1 FROM tab0 AS cor0
----
-4386
-4641
-4947

query I rowsort
SELECT DISTINCT - 72 * 92 AS col1 FROM tab1 AS cor0
----
-6624

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

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT ALL - - CAST ( col1 AS REAL ) * + col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - + 17 + col1 FROM tab1 AS cor0
----
-4
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - 71 * + col2 * + 34 col1 FROM tab1 AS cor0
----
-130302
-137541
-231648

query I rowsort
SELECT DISTINCT - 69 * - col1 AS col0 FROM tab2 AS cor0
----
1173
2139
4071

query I rowsort
SELECT 36 * col2 - 15 AS col1 FROM tab1
----
1929
2037
3441

onlyif mysql # use DIV operator for integer division
query I rowsort label-32
SELECT - tab2.col0 - - col1 DIV col1 FROM tab2
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-32
SELECT - tab2.col0 - - col1 / col1 FROM tab2
----
-6
-77
-78

query I rowsort
SELECT - 61 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to c91d7b51e91f33d302e697913fb438b6

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT - 35 + + col2 FROM tab1 AS cor0
----
19
22
61

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

query I rowsort
SELECT ALL cor0.col1 + 33 FROM tab2 AS cor0
----
50
64
92

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

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

query I rowsort
SELECT - col1 + - 38 * - 32 FROM tab1 AS cor0
----
1190
1203
1206

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-40
SELECT - - col1 + + CAST( - col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-40
SELECT - - col1 + + CAST ( - col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-21
33
4

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-43
SELECT - cor0.col1 DIV + col1 + ( cor0.col0 * + ( col0 ) ) FROM tab1 AS cor0
----
4095
6399
8

skipif mysql # not compatible
query I rowsort label-43
SELECT - cor0.col1 / + col1 + ( cor0.col0 * + ( col0 ) ) FROM tab1 AS cor0
----
4095
6399
8

query I rowsort
SELECT col2 * 18 * + col2 + col1 FROM tab1 AS cor0
----
165901
52514
58492

query I rowsort
SELECT DISTINCT - col0 * 97 FROM tab1 AS cor0
----
-291
-6208
-7760

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col0 ) - + 15 col1 FROM tab0 AS cor0
----
20
74
9

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

query I rowsort
SELECT - col0 + + col2 + + 64 * - col1 FROM tab1 AS cor0
----
-1613
-647
-816

query I rowsort
SELECT + cor0.col1 - col0 * col0 AS col2 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT ( - col0 ) + - 97 FROM tab0 AS cor0
----
-121
-132
-186

onlyif mysql # use DIV operator for integer division
query I rowsort label-52
SELECT + col0 DIV - col0 - + 89 * cor0.col0 DIV col1 FROM tab0 cor0
----
-25
-33
-88

skipif mysql # not compatible
query I rowsort label-52
SELECT + col0 / - col0 - + 89 * cor0.col0 / col1 FROM tab0 cor0
----
-25
-33
-88

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

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

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

query I rowsort
SELECT + + col2 * cor0.col2 + - cor0.col0 AS col2 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT DISTINCT 27 * - col0 + - col1 + - col0 FROM tab1 AS cor0
----
-110
-1802
-2253

query I rowsort
SELECT ALL - col0 * 92 FROM tab1
----
-276
-5888
-7360

onlyif mysql # use DIV operator for integer division
query I rowsort label-58
SELECT ALL - col2 * col2 DIV - 32 FROM tab2
----
21
22
45

skipif mysql # not compatible
query I rowsort label-58
SELECT ALL - col2 * col2 / - 32 FROM tab2
----
21
22
45

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-61
SELECT DISTINCT - ( col1 ) + col1 DIV col1 FROM tab0 cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-61
SELECT DISTINCT - ( col1 ) + col1 / col1 FROM tab0 cor0
----
-85
-90
-96

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

query I rowsort
SELECT 24 * 61 AS col0 FROM tab0 AS cor0
----
1464
1464
1464

onlyif mysql # use DIV operator for integer division
query I rowsort label-64
SELECT + 53 * + col2 DIV + col2 FROM tab0 AS cor0
----
53
53
53

skipif mysql # not compatible
query I rowsort label-64
SELECT + 53 * + col2 / + col2 FROM tab0 AS cor0
----
53
53
53

query I rowsort
SELECT col2 + 19 FROM tab2
----
45
46
57

query I rowsort
SELECT tab2.col1 * col2 + - col0 * + col0 FROM tab2
----
-4550
-5595
788

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

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

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

query I rowsort
SELECT - ( - col2 ) + col2 FROM tab2
----
52
54
76

query I rowsort
SELECT DISTINCT - col0 * + col0 * + col0 AS col1 FROM tab0
----
-13824
-42875
-704969

query I rowsort
SELECT col0 + - 29 AS col1 FROM tab2 cor0
----
-22
49
50

query I rowsort
SELECT DISTINCT 36 + 16 * + col1 FROM tab2 AS cor0
----
308
532
980

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-74
SELECT ALL + CAST( ( - cor0.col2 ) AS SIGNED ) FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-74
SELECT ALL + CAST ( ( - cor0.col2 ) AS INTEGER ) FROM tab0 AS cor0
----
-1
-33
-82

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

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

skipif mysql # not compatible
query I rowsort label-76
SELECT DISTINCT - CAST ( - 32 AS INTEGER ) FROM tab2 AS cor0
----
32

query I rowsort
SELECT ALL ( 43 ) * col2 AS col1 FROM tab2 AS cor0
----
1118
1161
1634

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

query I rowsort
SELECT ALL 45 + - col2 * col2 FROM tab2 cor0
----
-1399
-631
-684

onlyif mysql # use DIV operator for integer division
query I rowsort label-80
SELECT ALL - ( cor0.col1 ) DIV + col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-80
SELECT ALL - ( cor0.col1 ) / + col1 FROM tab0 AS cor0
----
-1
-1
-1

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

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

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

query I rowsort
SELECT DISTINCT - + cor0.col1 * + 14 * - col1 AS col0 FROM tab0 AS cor0
----
103544
115934
131726

query I rowsort
SELECT ALL ( + col1 + col0 ) AS col2 FROM tab1
----
29
74
93

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

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

query I rowsort
SELECT DISTINCT ( tab0.col1 ) FROM tab0, tab1, tab2 AS cor0
----
86
91
97

query I rowsort
SELECT ALL 37 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

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

query I rowsort
SELECT DISTINCT + + ( col1 ) + - 53 * - col2 FROM tab1 AS cor0
----
2888
3031
5101

query I rowsort
SELECT col1 + + col0 * - 12 AS col0 FROM tab0 AS cor0
----
-202
-323
-977

query I rowsort
SELECT DISTINCT - 88 * - col1 FROM tab2 AS cor0
----
1496
2728
5192

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

query I rowsort
SELECT ALL + col1 + - cor0.col1 * col2 * cor0.col0 + col1 FROM tab2 AS cor0
----
-119534
-51000
-5797

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

query I rowsort
SELECT DISTINCT tab0.col1 * - 15 AS col0 FROM tab0
----
-1290
-1365
-1455

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

skipif mysql # not compatible
query I rowsort label-97
SELECT - col2 / col1 FROM tab2 cor0
----
-2
0
0

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

query I rowsort
SELECT + col0 * cor0.col2 * 62 FROM tab2 cor0
----
11718
125736
186124

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

query I rowsort
SELECT DISTINCT + col0 * 61 * - 12 AS col2 FROM tab1
----
-2196
-46848
-58560

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-103
SELECT ALL - - col2 * - 59 + cor0.col1 DIV cor0.col1 FROM tab0 cor0
----
-1946
-4837
-58

skipif mysql # not compatible
query I rowsort label-103
SELECT ALL - - col2 * - 59 + cor0.col1 / cor0.col1 FROM tab0 cor0
----
-1946
-4837
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-104
SELECT + - col2 + ( col1 ) DIV col0 AS col2 FROM tab0 AS cor0
----
-30
-81
1

skipif mysql # not compatible
query I rowsort label-104
SELECT + - col2 + ( col1 ) / col0 AS col2 FROM tab0 AS cor0
----
-30
-81
1

query I rowsort
SELECT + col1 + ( - col2 ) * + col1 AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-107
SELECT - col0 + - col1 DIV - col1 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-107
SELECT - col0 + - col1 / - col1 FROM tab0 AS cor0
----
-23
-34
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-108
SELECT col0 * + 47 + col0 DIV - col1 AS col0 FROM tab1 AS cor0
----
141
3002
3754

skipif mysql # not compatible
query I rowsort label-108
SELECT col0 * + 47 + col0 / - col1 AS col0 FROM tab1 AS cor0
----
141
3002
3754

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-110
SELECT col1 + - ( col1 ) DIV - col1 AS col1 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-110
SELECT col1 + - ( col1 ) / - col1 AS col1 FROM tab1 AS cor0
----
11
14
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-111
SELECT ALL - col2 + - ( col1 ) DIV + col0 AS col0 FROM tab1 AS cor0
----
-57
-62
-96

skipif mysql # not compatible
query I rowsort label-111
SELECT ALL - col2 + - ( col1 ) / + col0 AS col0 FROM tab1 AS cor0
----
-57
-62
-96

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

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

query I rowsort
SELECT col0 * - 43 FROM tab0 AS cor0
----
-1032
-1505
-3827

query I rowsort
SELECT DISTINCT - ( - cor0.col0 ) FROM tab0 AS cor0
----
24
35
89

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

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

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

query I rowsort
SELECT - col1 * col0 + - ( 86 ) + tab2.col2 FROM tab2
----
-1391
-276
-4662

onlyif mysql # use DIV operator for integer division
query I rowsort label-119
SELECT DISTINCT ( tab0.col1 ) DIV - ( + col1 ) FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-119
SELECT DISTINCT ( tab0.col1 ) / - ( + col1 ) FROM tab0
----
-1

query I rowsort
SELECT DISTINCT + 26 AS col1 FROM tab1
----
26

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

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

query I rowsort
SELECT + + col0 + ( - 17 ) * + col0 AS col1 FROM tab0 AS cor0
----
-1424
-384
-560

query I rowsort
SELECT + cor0.col2 * - ( - cor0.col0 * col2 ) + - col2 + + col2 * col1 AS col0 FROM tab2 AS cor0
----
114684
54236
5913

query I rowsort
SELECT - col1 * col1 + + col2 AS col0 FROM tab1 AS cor0
----
-43
-622
-73

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-127
SELECT DISTINCT + cor0.col2 + 14 DIV 7 col0 FROM tab0 AS cor0
----
3
35
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-127
SELECT DISTINCT + cor0.col2 + 14 / 7 col0 FROM tab0 AS cor0
----
3
35
84

query I rowsort
SELECT + col2 + - col1 * + 85 * + col2 AS col2 FROM tab1 cor0
----
-105984
-119286
-48393

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

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

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

query I rowsort
SELECT - 38 FROM tab0 AS cor0
----
-38
-38
-38

query I rowsort
SELECT + 89 * + ( + col0 ) FROM tab0 AS cor0
----
2136
3115
7921

query I rowsort
SELECT ALL - col2 + + 78 * + col0 AS col2 FROM tab2 AS cor0
----
519
6058
6124

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

query I rowsort
SELECT col1 * - 25 FROM tab2 AS cor0
----
-1475
-425
-775

query I rowsort
SELECT ALL 10 FROM tab2 cor0
----
10
10
10

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

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

query I rowsort
SELECT DISTINCT + 42 * col2 AS col0 FROM tab2 AS cor0
----
1092
1134
1596

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

query I rowsort
SELECT ALL - 36 + cor0.col1 * col1 AS col0 FROM tab2 AS cor0
----
253
3445
925

query I rowsort
SELECT 61 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

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

query I rowsort
SELECT 76 * col0 FROM tab2 AS cor0
----
532
5928
6004

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

query I rowsort
SELECT + - col1 + - cor0.col1 * - ( col1 ) AS col0 FROM tab1 AS cor0
----
156
650
90

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

query I rowsort
SELECT DISTINCT + 4 * col0 FROM tab2 AS cor0
----
28
312
316

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-153
SELECT ALL col2 + col2 DIV - ( col1 ) AS col2 FROM tab2 AS cor0
----
26
27
36

skipif mysql # not compatible
query I rowsort label-153
SELECT ALL col2 + col2 / - ( col1 ) AS col2 FROM tab2 AS cor0
----
26
27
36

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

query I rowsort
SELECT DISTINCT + col1 + cor0.col0 + ( - col0 ) * col0 * 34 FROM tab0 AS cor0
----
-19474
-269134
-41518

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-158
SELECT DISTINCT - col2 * - col0 + + cor0.col2 * 13 DIV - col0 FROM tab1 cor0
----
-72
3637
7665

skipif mysql # not compatible
query I rowsort label-158
SELECT DISTINCT - col2 * - col0 + + cor0.col2 * 13 / - col0 FROM tab1 cor0
----
-72
3637
7665

query I rowsort
SELECT DISTINCT col0 * + col2 * col0 AS col2 FROM tab2 AS cor0
----
1323
158184
237158

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

query I rowsort
SELECT - 11 * + col1 + - col2 + col0 FROM tab1 cor0
----
-103
-159
-337

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

skipif mysql # not compatible
query I rowsort label-162
SELECT DISTINCT - CAST ( NULL AS INTEGER ) / cor0.col2 AS col2 FROM tab1, tab2 AS cor0
----
NULL

query I rowsort
SELECT + 71 FROM tab2, tab1 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * 39 * - col2 col0 FROM tab2 AS cor0
----
-117078
-7371
-79092

query I rowsort
SELECT DISTINCT 96 AS col1 FROM tab1 AS cor0
----
96

query I rowsort
SELECT col2 + - ( + col1 ) * col0 - + col0 * tab2.col0 AS col1 FROM tab2
----
-10660
-239
-7546

query I rowsort
SELECT col0 + col1 * col1 + col2 AS col2 FROM tab0
----
7453
8452
9445

query I rowsort
SELECT DISTINCT - col1 + - col0 + 14 FROM tab1
----
-15
-60
-79

query I rowsort
SELECT DISTINCT 7 AS col1 FROM tab1
----
7

query I rowsort
SELECT + 87 + tab1.col2 FROM tab1
----
141
144
183

query I rowsort
SELECT col1 + 56 FROM tab0
----
142
147
153

query I rowsort
SELECT 14 AS col0 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

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

query I rowsort
SELECT 25 + 5 * col1 * - col1 FROM tab1
----
-3355
-475
-820

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * ( col1 ) col0 FROM tab1 AS cor0
----
100
169
676

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

query I rowsort
SELECT cor1.col1 + + cor0.col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 83cf0399a6d731112910be713c92fa44

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-180
SELECT CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-180
SELECT CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col1 col0 FROM tab1
----
-10
-13
-26

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

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

query I rowsort
SELECT DISTINCT - col1 * 59 + + col2 * + col0 FROM tab2 AS cor0
----
-1453
-1640
1999

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

query I rowsort
SELECT DISTINCT + col0 * - cor0.col0 + cor0.col2 FROM tab0 cor0
----
-1224
-543
-7839

query I rowsort
SELECT ALL col0 * 24 FROM tab1 cor0
----
1536
1920
72

query I rowsort
SELECT DISTINCT - col1 - 33 FROM tab0 AS cor0
----
-119
-124
-130

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

query I rowsort
SELECT ALL - + col0 * ( - 19 ) FROM tab2 cor0
----
133
1482
1501

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

query I rowsort
SELECT - - col2 + 7 * cor0.col1 AS col0 FROM tab0 AS cor0
----
635
680
719

query I rowsort
SELECT ALL - col2 + - 79 * col0 FROM tab2 AS cor0
----
-580
-6188
-6279

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0 WHERE NULL NOT IN ( cor0.col1 )
----

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

query I rowsort
SELECT DISTINCT + col2 * + 97 FROM tab0 cor0
----
3201
7954
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-197
SELECT - 71 + col1 DIV col0 col0 FROM tab2 AS cor0
----
-67
-71
-71

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

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

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

query I rowsort
SELECT ALL ( col1 ) + col0 + - cor0.col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + + col0 * col1 + col2 + - col0 FROM tab0 AS cor0
----
2073
3361
8092

query I rowsort
SELECT 95 * + col1 * cor0.col0 + cor0.col2 + + col1 AS col1 FROM tab1 cor0
----
60867
7490
98909

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-205
SELECT CAST( + tab1.col2 AS SIGNED ) FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

skipif mysql # not compatible
query I rowsort label-205
SELECT CAST ( + tab1.col2 AS INTEGER ) FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT - + 72 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to ad521144c976ff25e77cdf10a84d1dc6

query I rowsort
SELECT - + 61 * + col1 AS col0 FROM tab1 AS cor0
----
-1586
-610
-793

query I rowsort
SELECT DISTINCT - 12 - + cor0.col1 FROM tab2 cor0
----
-29
-43
-71

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 + - col0 col2 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT col2 * col0 + 35 * - 89 AS col1 FROM tab2
----
-1087
-113
-2926

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 + - 28 col1 FROM tab0 AS cor0
----
-114
-119
-125

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 * - col1 ) col2 FROM tab2
----
289
3481
961

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 74 col0 FROM tab1 cor0
----
1924
740
962

query I rowsort
SELECT ALL - + 65 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

query I rowsort
SELECT 38 + + col0 AS col2 FROM tab2
----
116
117
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-228
SELECT - - col1 DIV col1 + + col2 AS col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-228
SELECT - - col1 / col1 + + col2 AS col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT ( col1 ) * + 16 + + col2 FROM tab0 AS cor0
----
1409
1538
1553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 * ( - col0 ) col0 FROM tab2
----
-175
-1950
-1975

query I rowsort
SELECT DISTINCT tab0.col1 * + tab0.col0 * 20 FROM tab0, tab2 AS cor0
----
161980
41280
67900

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + tab2.col2 ) + - tab2.col2 * col0 + - col2 * + tab2.col2 col2 FROM tab2
----
-2678
-4408
-891

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

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

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

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

skipif mysql # not compatible
query I rowsort label-236
SELECT DISTINCT - + col2 * col2 / 83 AS col2 FROM tab0 AS cor0
----
-13
-81
0

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

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

query I rowsort
SELECT - col2 * col2 * + cor0.col2 - - col2 AS col2 FROM tab0 AS cor0
----
-35904
-551286
0

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col1 * col0 + col2 * - col0 col1 FROM tab0 AS cor0
----
-178296
-329350
-744307

onlyif mysql # use DIV operator for integer division
query I rowsort label-243
SELECT + + 39 + - col2 + - col0 DIV - 96 FROM tab1 AS cor0
----
-15
-18
-57

skipif mysql # not compatible
query I rowsort label-243
SELECT + + 39 + - col2 + - col0 / - 96 FROM tab1 AS cor0
----
-15
-18
-57

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-245
SELECT - col0 * col2 DIV - cor0.col1 + col1 * col2 * + col0 - - col2 AS col0 FROM tab0 AS cor0
----
3396
664280
68154

skipif mysql # not compatible
query I rowsort label-245
SELECT - col0 * col2 / - cor0.col1 + col1 * col2 * + col0 - - col2 AS col0 FROM tab0 AS cor0
----
3396
664280
68154

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

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

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

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

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

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

query I rowsort
SELECT + tab2.col1 * - col1 * col1 + + col0 + + tab2.col0 FROM tab2
----
-205223
-29777
-4755

onlyif mysql # use DIV operator for integer division
query I rowsort label-252
SELECT - col1 * - col2 + - col2 * col0 - col2 DIV col2 FROM tab0 AS cor0
----
163
2045
61

skipif mysql # not compatible
query I rowsort label-252
SELECT - col1 * - col2 + - col2 * col0 - col2 / col2 FROM tab0 AS cor0
----
163
2045
61

query I rowsort
SELECT ALL + col1 * col2 * - col0 - + col2 AS col0 FROM tab0
----
-3396
-664200
-68145

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

query I rowsort
SELECT + col0 + + cor0.col0 - - col0 FROM tab2 AS cor0
----
21
234
237

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

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

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

query I rowsort
SELECT - + 97 * - cor0.col1 * + col2 + cor0.col0 FROM tab2 AS cor0
----
148876
62741
81196

query I rowsort
SELECT - 27 + col2 * col0 * col1 FROM tab0 AS cor0
----
3368
664091
68085

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-262
SELECT - 98 + + cor0.col0 DIV - col2 + - col1 AS col1 FROM tab0 AS cor0
----
-184
-190
-230

skipif mysql # not compatible
query I rowsort label-262
SELECT - 98 + + cor0.col0 / - col2 + - col1 AS col1 FROM tab0 AS cor0
----
-184
-190
-230

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

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

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

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND ( - col2 )
----

query I rowsort
SELECT ALL col0 FROM tab2 WHERE ( - col1 ) >= + col0 * col0
----

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - - col2 col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL - - col0 * - col0 * 92 + - col1 + col0 FROM tab2 AS cor0
----
-4532
-559709
-574110

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

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

query I rowsort
SELECT ALL + 83 FROM tab0 cor0
----
83
83
83

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

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

query I rowsort
SELECT DISTINCT - 6 + cor0.col1 + cor0.col0 AS col0 FROM tab1 AS cor0
----
23
68
87

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

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

query I rowsort
SELECT col0 / col1 AS col1 FROM tab2 WHERE NOT NULL NOT IN ( col0 )
----

query I rowsort
SELECT DISTINCT col0 FROM tab1 WHERE + col1 < NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-281
SELECT ALL - tab0.col2 DIV col0 - col0 FROM tab0
----
-25
-35
-89

skipif mysql # not compatible
query I rowsort label-281
SELECT ALL - tab0.col2 / col0 - col0 FROM tab0
----
-25
-35
-89

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 WHERE NOT ( col0 ) <= tab1.col0 * - col1
----
10
13
26

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

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

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

skipif mysql # not compatible
query I rowsort label-284
SELECT col0 + col1 / cor0.col0 - + col0 AS col0 FROM tab0 AS cor0
----
1
2
3

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

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 WHERE ( + col0 ) = ( col2 )
----

query I rowsort
SELECT + col2 + - col1 * col1 FROM tab1 cor0
----
-43
-622
-73

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

skipif mysql # not compatible
query I rowsort label-288
SELECT ALL + col2 * cor0.col2 / + col2 AS col0 FROM tab0 AS cor0
----
1
33
82

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col0 col1 FROM tab0
----
178
48
70

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-297
SELECT DISTINCT + col0 DIV - col0 + + col2 FROM tab1
----
53
56
95

skipif mysql # not compatible
query I rowsort label-297
SELECT DISTINCT + col0 / - col0 + + col2 FROM tab1
----
53
56
95

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

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

query I rowsort
SELECT - col0 + - col0 AS col0 FROM tab1 cor0
----
-128
-160
-6

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

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

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col2 AS INTEGER ) * col0 * CAST ( col0 AS REAL ) FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT 24 * - col0 * + col1 + - ( - col2 * col0 ) FROM tab0
----
-187078
-48744
-81445

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

query I rowsort
SELECT ALL + 1 + - col0 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
36
7299
793

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

query I rowsort
SELECT - col1 + col2 * + ( + ( col1 ) ) FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT + - 89 * cor0.col0 * + 18 AS col2 FROM tab0 AS cor0
----
-142578
-38448
-56070

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

query I rowsort
SELECT - cor0.col2 * ( 28 ) + + col0 * col0 AS col1 FROM tab1 AS cor0
----
-1503
2500
3712

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-315
SELECT ALL col1 + CAST( col0 AS SIGNED ) FROM tab0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-315
SELECT ALL col1 + CAST ( col0 AS INTEGER ) FROM tab0
----
110
132
180

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

query I rowsort
SELECT DISTINCT - col1 + - 37 * tab2.col0 AS col2 FROM tab2
----
-290
-2940
-2945

query I rowsort
SELECT ALL - col1 + ( 76 ) FROM tab1 cor0
----
50
63
66

query I rowsort
SELECT ALL - col0 * 53 FROM tab0 cor0
----
-1272
-1855
-4717

query I rowsort
SELECT + + col1 * - cor0.col2 + + 78 FROM tab2 AS cor0
----
-1456
-568
-759

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

query I rowsort
SELECT ALL - col2 + + 16 AS col1 FROM tab0 AS cor0
----
-17
-66
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + cor0.col2 col2 FROM tab0 AS cor0
----
171
36
57

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( 30 ) + cor0.col0 col1 FROM tab1 AS cor0
----
110
33
94

query I rowsort
SELECT DISTINCT 84 * + col0 + - col2 FROM tab2 AS cor0
----
561
6526
6598

query I rowsort
SELECT DISTINCT + 16 * + col1 + + col0 * + ( ( col0 ) ) + - col0 FROM tab0 AS cor0
----
1928
2742
9288

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

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

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

query I rowsort
SELECT DISTINCT - col0 + - 87 + - col1 AS col1 FROM tab2 AS cor0
----
-125
-183
-224

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

skipif mysql # not compatible
query I rowsort label-334
SELECT DISTINCT - CAST ( - 99 AS INTEGER ) FROM tab2 AS cor0
----
99

query I rowsort
SELECT - 60 + + col1 * + col1 AS col0 FROM tab0 AS cor0
----
7336
8221
9349

query I rowsort
SELECT ALL 35 + + cor0.col1 * col1 FROM tab2 AS cor0
----
324
3516
996

query I rowsort
SELECT DISTINCT + 62 * + col0 + col2 * - cor0.col0 FROM tab0 cor0
----
-1780
2135
696

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

query I rowsort
SELECT col2 + ( 23 ) * + col1 * + tab0.col0 AS col0 FROM tab0
----
186359
47505
78086

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

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

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

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

query I rowsort
SELECT ALL - col1 + 84 - + col2 AS col0 FROM tab1 AS cor0
----
-25
17
4

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

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

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

query I rowsort
SELECT ALL + ( ( + col0 ) + + tab2.col0 ) FROM tab2
----
14
156
158

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

query I rowsort
SELECT DISTINCT - 69 AS col1 FROM tab2
----
-69

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

skipif mysql # not compatible
query I rowsort label-350
SELECT ALL - CAST ( 57 AS INTEGER ) FROM tab1
----
-57
-57
-57

query I rowsort
SELECT 5 * + col1 AS col0 FROM tab1
----
130
50
65

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

query I rowsort
SELECT - 16 AS col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 71c8b08964ab47ce12158975c0ee1fd9

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

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

query I rowsort
SELECT + 69 + col0 FROM tab1
----
133
149
72

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

query I rowsort
SELECT + col0 + + 34 FROM tab1
----
114
37
98

query I rowsort
SELECT DISTINCT - col2 + + 82 AS col0 FROM tab0 AS cor0
----
0
49
81

query I rowsort
SELECT DISTINCT - cor0.col2 * col2 + - col2 AS col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 + 7 col1 FROM tab1 AS cor0
----
-19
-3
-6

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

query I rowsort
SELECT col0 + - 94 AS col0 FROM tab0 AS cor0
----
-5
-59
-70

query I rowsort
SELECT - - col1 + + 5 FROM tab0 AS cor0
----
102
91
96

query I rowsort
SELECT ALL - col2 + 66 - + col1 AS col2 FROM tab2 AS cor0
----
-19
11
8

query I rowsort
SELECT DISTINCT - col1 + 83 + col2 FROM tab2 AS cor0
----
104
50
79

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

query I rowsort
SELECT cor1.col0 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

onlyif mysql # use DIV operator for integer division
query I rowsort label-371
SELECT DISTINCT - - cor0.col0 DIV + 81 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
0

skipif mysql # not compatible
query I rowsort label-371
SELECT DISTINCT - - cor0.col0 / + 81 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
0

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-375
SELECT ALL - col1 * 44 + col1 * - 12 + - col2 DIV - col0 FROM tab0 AS cor0
----
-4815
-5096
-5432

skipif mysql # not compatible
query I rowsort label-375
SELECT ALL - col1 * 44 + col1 * - 12 + - col2 / - col0 FROM tab0 AS cor0
----
-4815
-5096
-5432

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2, tab0 AS cor0 WHERE NULL < ( NULL )
----

query I rowsort
SELECT 92 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

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

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

query I rowsort
SELECT ALL - - 80 * + col2 FROM tab1 AS cor0
----
4320
4560
7680

query I rowsort
SELECT + 44 + cor0.col0 + 43 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 7e40e63e1d968f57439cc0074c42b75e

query I rowsort
SELECT 9 + - col0 FROM tab1 AS cor0
----
-55
-71
6

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

skipif mysql # not compatible
query I rowsort label-383
SELECT + - 10 + col2 * - CAST ( + col0 AS INTEGER ) AS col2 FROM tab0 cor0
----
-45
-7308
-802

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

query I rowsort
SELECT + col2 * col0 + + 43 AS col1 FROM tab0 AS cor0
----
7341
78
835

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

query I rowsort
SELECT - col1 * + col0 * col1 + 0 AS col0 FROM tab0 cor0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL 46 * 50 AS col0 FROM tab2
----
2300
2300
2300

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col2 + ( col1 ) col0 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT + 98 + + col1 AS col1 FROM tab1 AS cor0
----
108
111
124

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-394
SELECT DISTINCT + col2 * - col2 + - 63 * 58 DIV + col0 FROM tab0
----
-105
-1241
-6765

skipif mysql # not compatible
query I rowsort label-394
SELECT DISTINCT + col2 * - col2 + - 63 * 58 / + col0 FROM tab0
----
-105
-1241
-6765

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-396
SELECT + col0 DIV + 40 + + 22 AS col1 FROM tab1 AS cor0
----
22
23
24

skipif mysql # not compatible
query I rowsort label-396
SELECT + col0 / + 40 + + 22 AS col1 FROM tab1 AS cor0
----
22
23
24

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

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

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

query I rowsort
SELECT - col0 * + col1 * - col1 AS col1 FROM tab2 AS cor0
----
22831
271518
6727

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

query I rowsort
SELECT + col2 * - col0 + ( cor0.col2 ) * ( + ( + col0 ) ) * col2 + col0 FROM tab0 AS cor0
----
25368
35
591227

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + 23 * + 47 col0 FROM tab1 cor0
----
10810
14053
28106

query I rowsort
SELECT - col2 * + 83 AS col1 FROM tab1 AS cor0
----
-4482
-4731
-7968

onlyif mysql # use DIV operator for integer division
query I rowsort label-410
SELECT DISTINCT - col1 + - col1 DIV col0 FROM tab1 cor0
----
-10
-13
-34

skipif mysql # not compatible
query I rowsort label-410
SELECT DISTINCT - col1 + - col1 / col0 FROM tab1 cor0
----
-10
-13
-34

query I rowsort
SELECT ALL col1 * - 34 * - col2 FROM tab1 AS cor0
----
19380
42432
47736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * + 97 * + 53 col0 FROM tab0 AS cor0
----
123384
179935
457549

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-416
SELECT + col2 + - col2 - - tab0.col1 DIV - 2 AS col0 FROM tab0
----
-43
-45
-48

skipif mysql # not compatible
query I rowsort label-416
SELECT + col2 + - col2 - - tab0.col1 / - 2 AS col0 FROM tab0
----
-43
-45
-48

query I rowsort
SELECT DISTINCT + 94 * - cor0.col0 FROM tab2 AS cor0
----
-658
-7332
-7426

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

skipif mysql # not compatible
query I rowsort label-418
SELECT - CAST ( + cor0.col1 AS INTEGER ) FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + - col0 * + col2 + col1 col0 FROM tab1 AS cor0
----
-190
-3695
-7763

onlyif mysql # use DIV operator for integer division
query I rowsort label-420
SELECT ( - 97 ) DIV + col1 AS col0 FROM tab2 AS cor0
----
-1
-3
-5

skipif mysql # not compatible
query I rowsort label-420
SELECT ( - 97 ) / + col1 AS col0 FROM tab2 AS cor0
----
-1
-3
-5

query I rowsort
SELECT + 12 + + 47 * + col1 FROM tab0 cor0
----
4054
4289
4571

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

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

query I rowsort
SELECT 66 + ( - col0 ) FROM tab2 AS cor0
----
-12
-13
59

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

query I rowsort
SELECT DISTINCT + 58 + col0 * + cor0.col2 FROM tab2 AS cor0
----
2086
247
3060

query I rowsort
SELECT ALL - + 93 * col0 AS col2 FROM tab0 AS cor0
----
-2232
-3255
-8277

query I rowsort
SELECT DISTINCT + 45 * + col2 FROM tab1 AS cor0
----
2430
2565
4320

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

query I rowsort
SELECT ALL cor0.col2 * - cor0.col1 + - col1 * col0 FROM tab0 AS cor0
----
-15561
-3492
-4902

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

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

query I rowsort
SELECT - col0 * col0 + + col2 * 64 FROM tab2 AS cor0
----
-3809
-4420
1679

query I rowsort
SELECT ALL col0 - - col0 AS col1 FROM tab1
----
128
160
6

query I rowsort
SELECT DISTINCT 58 * col1 AS col2 FROM tab0 AS cor0
----
4988
5278
5626

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

query I rowsort
SELECT + col2 + - 11 FROM tab1 cor0
----
43
46
85

query I rowsort
SELECT - 58 * - 97 + - col1 AS col1 FROM tab1 cor0
----
5600
5613
5616

query I rowsort
SELECT DISTINCT - - 86 + + col1 FROM tab2 cor0
----
103
117
145

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-440
SELECT ALL - CAST( 84 AS SIGNED ) + col1 FROM tab2 AS cor0
----
-25
-53
-67

skipif mysql # not compatible
query I rowsort label-440
SELECT ALL - CAST ( 84 AS INTEGER ) + col1 FROM tab2 AS cor0
----
-25
-53
-67

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

skipif mysql # not compatible
query I rowsort label-441
SELECT DISTINCT CAST ( col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
86
91
97

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

query I rowsort
SELECT - col1 + ( + cor0.col0 ) FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-444
SELECT - col0 * col1 * col2 + + CAST( - cor0.col2 AS SIGNED ) FROM tab1 AS cor0
----
-36537
-4266
-99936

skipif mysql # not compatible
query I rowsort label-444
SELECT - col0 * col1 * col2 + + CAST ( - cor0.col2 AS INTEGER ) FROM tab1 AS cor0
----
-36537
-4266
-99936

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

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

query I rowsort
SELECT DISTINCT - + 76 + - 85 FROM tab2 AS cor0
----
-161

query I rowsort
SELECT ALL ( - col0 ) + + col1 * col1 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT + col2 + 83 AS col2 FROM tab0 AS cor0
----
116
165
84

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

skipif mysql # not compatible
query I rowsort label-450
SELECT DISTINCT - col2 / col0 + + col1 FROM tab2 cor0
----
17
28
59

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

skipif mysql # not compatible
query I rowsort label-451
SELECT CAST ( col2 AS INTEGER ) + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + + ( cor0.col2 ) * col2 + - ( - cor0.col0 * col1 ) FROM tab1 AS cor0
----
10256
2994
3889

query I rowsort
SELECT ALL - ( + 18 ) + - cor0.col0 * col2 * - col0 - + col1 FROM tab0 AS cor0
----
1110
18904
649413

query I rowsort
SELECT DISTINCT 97 * col1 * col2 FROM tab1
----
121056
136188
55290

query I rowsort
SELECT + col2 * 94 AS col1 FROM tab1 AS cor0
----
5076
5358
9024

query I rowsort
SELECT 8 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

query I rowsort
SELECT - 27 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

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

query I rowsort
SELECT DISTINCT - col1 + col1 * + col1 FROM tab1 cor0
----
156
650
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-460
SELECT - col0 * ( col0 ) + col1 * - ( col0 ) + cor0.col0 * 1 DIV col1 FROM tab2 AS cor0
----
-10685
-266
-7580

skipif mysql # not compatible
query I rowsort label-460
SELECT - col0 * ( col0 ) + col1 * - ( col0 ) + cor0.col0 * 1 / col1 FROM tab2 AS cor0
----
-10685
-266
-7580

query I rowsort
SELECT DISTINCT - col1 + - cor0.col2 * cor0.col2 - col2 AS col0 FROM tab2 AS cor0
----
-1499
-761
-787

query I rowsort
SELECT cor0.col2 - - 77 * + col0 AS col1 FROM tab2 AS cor0
----
566
6032
6121

onlyif mysql # use DIV operator for integer division
query I rowsort label-463
SELECT col0 + col2 - 43 DIV col1 FROM tab1 AS cor0
----
117
173
56

skipif mysql # not compatible
query I rowsort label-463
SELECT col0 + col2 - 43 / col1 FROM tab1 AS cor0
----
117
173
56

query I rowsort
SELECT + col2 * ( - col0 ) + col2 + - 3 FROM tab1 AS cor0
----
-111
-3594
-7587

query I rowsort
SELECT + col1 * 57 AS col2 FROM tab0 AS cor0
----
4902
5187
5529

query I rowsort
SELECT tab1.col2 + - 91 * col2 + col2 * - col1 * col0 FROM tab1
----
-108480
-41610
-9072

query I rowsort
SELECT - 13 FROM tab1, tab2 AS cor0
----
9 values hashing to e95f5f4bd0f480397cced5f5e8a23792

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

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

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

query I rowsort
SELECT ALL + 27 + col2 FROM tab1 AS cor0
----
123
81
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-471
SELECT - 12 * + col0 * + col1 + col0 * - ( col1 ) - + CAST( col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-105369
-26865
-44136

skipif mysql # not compatible
query I rowsort label-471
SELECT - 12 * + col0 * + col1 + col0 * - ( col1 ) - + CAST ( col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-105369
-26865
-44136

query I rowsort
SELECT col2 * 16 + + col0 * 51 - - cor0.col2 FROM tab2 cor0
----
4420
4675
816

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

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

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

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

query I rowsort
SELECT + 70 AS col0 FROM tab1 AS cor0
----
70
70
70

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 96 * 74 FROM tab0 AS cor0
----
7104

query I rowsort
SELECT - + 47 * 67 AS col2 FROM tab2 AS cor0
----
-3149
-3149
-3149

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

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

query I rowsort
SELECT ALL - - col0 * + col0 + + 17 FROM tab0 AS cor0
----
1242
593
7938

query I rowsort
SELECT DISTINCT + + 71 + - col0 FROM tab2 cor0
----
-7
-8
64

query I rowsort
SELECT DISTINCT col0 + col2 * 35 AS col2 FROM tab1 AS cor0
----
1893
2059
3440

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-493
SELECT + - col0 + col2 DIV 2 AS col1 FROM tab2 AS cor0
----
-60
-65
6

skipif mysql # not compatible
query I rowsort label-493
SELECT + - col0 + col2 / 2 AS col1 FROM tab2 AS cor0
----
-60
-65
6

query I rowsort
SELECT - col1 * - 56 * col0 FROM tab0
----
115584
190120
453544

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
3
64
80

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

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

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

query I rowsort
SELECT col0 * 74 - ( col0 * - col0 ) FROM tab1 AS cor0
----
12320
231
8832

onlyif mysql # use DIV operator for integer division
query I rowsort label-500
SELECT + + cor0.col2 * ( - col0 ) DIV + col1 + + ( col2 ) AS col0 FROM tab2 AS cor0
----
-138
-8
21

skipif mysql # not compatible
query I rowsort label-500
SELECT + + cor0.col2 * ( - col0 ) / + col1 + + ( col2 ) AS col0 FROM tab2 AS cor0
----
-138
-8
21

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

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

query I rowsort
SELECT - + col0 + 85 * col2 AS col2 FROM tab1 cor0
----
4587
4781
8080

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-504
SELECT DISTINCT 83 * col0 + - col2 DIV col1 FROM tab1
----
247
5307
6633

skipif mysql # not compatible
query I rowsort label-504
SELECT DISTINCT 83 * col0 + - col2 / col1 FROM tab1
----
247
5307
6633

query I rowsort
SELECT ALL - 69 AS col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to ca5f4bc365dc2c6b14187d6ffc83a01d

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

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

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

query I rowsort
SELECT + + col1 * cor0.col2 * 70 AS col0 FROM tab1 AS cor0
----
39900
87360
98280

query I rowsort
SELECT ALL + - 41 * - cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 9480e887f0cd1334bb950c8d1abb4bf1

query I rowsort
SELECT DISTINCT - col1 * 59 AS col0 FROM tab0 AS cor0
----
-5074
-5369
-5723

query I rowsort
SELECT DISTINCT + col2 + 39 FROM tab2 AS cor0
----
65
66
77

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

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

query I rowsort
SELECT ALL - 35 FROM tab2, tab2 AS cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

query I rowsort
SELECT DISTINCT - 80 + col2 FROM tab0 AS cor0
----
-47
-79
2

query I rowsort
SELECT ALL + + 50 * + col2 * - col0 FROM tab0 AS cor0
----
-1750
-364900
-39600

query I rowsort
SELECT - col1 * - col1 * col0 - - col1 AS col0 FROM tab0 AS cor0
----
177590
329412
737100

query I rowsort
SELECT col1 * - 37 * col1 FROM tab1
----
-25012
-3700
-6253

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-522
SELECT ALL + ( + col0 ) DIV col0 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-522
SELECT ALL + ( + col0 ) / col0 FROM tab2 cor0
----
1
1
1

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

query I rowsort
SELECT DISTINCT 90 * - 6 AS col1 FROM tab1 AS cor0
----
-540

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

query I rowsort
SELECT col2 * + ( col1 + + col2 ) * - col2 FROM tab1
----
-1004544
-217683
-233280

query I rowsort
SELECT col2 + col2 * col2 * + col2 AS col0 FROM tab1
----
157518
185250
884832

onlyif mysql # use DIV operator for integer division
query I rowsort label-528
SELECT - col2 DIV 12 FROM tab2
----
-2
-2
-3

skipif mysql # not compatible
query I rowsort label-528
SELECT - col2 / 12 FROM tab2
----
-2
-2
-3

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

query I rowsort
SELECT + tab1.col0 + + col1 - col0 FROM tab1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-531
SELECT DISTINCT + col2 + CAST( + col0 * + col0 AS SIGNED ) - 72 FROM tab2
----
4
6038
6207

skipif mysql # not compatible
query I rowsort label-531
SELECT DISTINCT + col2 + CAST ( + col0 * + col0 AS INTEGER ) - 72 FROM tab2
----
4
6038
6207

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

query I rowsort
SELECT DISTINCT - ( + col1 ) + - col0 AS col1 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT - + col1 + + ( - cor0.col2 ) * - col2 - + col1 AS col0 FROM tab1 cor0
----
2864
3229
9190

query I rowsort
SELECT + - col2 * + col2 + col2 AS col1 FROM tab2 AS cor0
----
-1406
-650
-702

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

query I rowsort
SELECT ALL + ( 76 ) * + col1 + col0 FROM tab0 AS cor0
----
6560
7005
7407

onlyif mysql # use DIV operator for integer division
query I rowsort label-538
SELECT DISTINCT + col1 * 59 DIV - col2 - + 1 FROM tab0 cor0
----
-154
-5724
-66

skipif mysql # not compatible
query I rowsort label-538
SELECT DISTINCT + col1 * 59 / - col2 - + 1 FROM tab0 cor0
----
-154
-5724
-66

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

query I rowsort
SELECT ALL + 37 FROM tab1 AS cor0
----
37
37
37

query I rowsort
SELECT DISTINCT - - col0 * - col0 AS col2 FROM tab2 AS cor0
----
-49
-6084
-6241

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

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

query I rowsort
SELECT - col2 - 78 AS col0 FROM tab1 AS cor0
----
-132
-135
-174

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

query I rowsort
SELECT DISTINCT - 72 FROM tab0
----
-72

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

query I rowsort
SELECT + 20 + cor0.col0 AS col0 FROM tab0 AS cor0
----
109
44
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 89 col1 FROM tab0, tab1 cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT DISTINCT col2 + + 15 FROM tab2 AS cor0
----
41
42
53

query I rowsort
SELECT col1 * col2 * - 79 AS col0 FROM tab2
----
-121186
-51034
-66123

query I rowsort
SELECT 72 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

query I rowsort
SELECT DISTINCT col1 + - 28 AS col2 FROM tab2 AS cor0
----
-11
3
31

query I rowsort
SELECT ALL + + 16 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-554
SELECT DISTINCT - + col2 / col1 col1 FROM tab2 AS cor0
----
-2
0

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

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

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

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

query I rowsort
SELECT 59 + + cor0.col1 * col1 FROM tab0 cor0
----
7455
8340
9468

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

query I rowsort
SELECT DISTINCT - - 90 * - col1 + + 25 * + col1 AS col2 FROM tab2 cor0
----
-1105
-2015
-3835

query I rowsort
SELECT ALL + 16 - col2 FROM tab1 AS cor0
----
-38
-41
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 9 + + col1 col2 FROM tab0 AS cor0
----
100
106
95

query I rowsort
SELECT 50 + + col2 FROM tab1 AS cor0
----
104
107
146

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

query I rowsort
SELECT DISTINCT + - col2 + + cor0.col2 * 22 FROM tab2 AS cor0
----
546
567
798

query I rowsort
SELECT + 20 - col1 * 51 FROM tab2 AS cor0
----
-1561
-2989
-847

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

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

query I rowsort
SELECT + col1 * 92 FROM tab0 AS cor0
----
7912
8372
8924

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-571
SELECT col0 DIV + col0 + + col2 * col0 AS col2 FROM tab2
----
190
2029
3003

skipif mysql # not compatible
query I rowsort label-571
SELECT col0 / + col0 + + col2 * col0 AS col2 FROM tab2
----
190
2029
3003

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

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

query I rowsort
SELECT col0 + cor0.col2 * col2 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT DISTINCT - - 90 AS col1 FROM tab1 AS cor0
----
90

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

query I rowsort
SELECT ALL + 28 * 98 + - col1 AS col0 FROM tab0 AS cor0
----
2647
2653
2658

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

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

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

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

skipif mysql # not compatible
query I rowsort label-580
SELECT + CAST ( - ( col0 ) AS INTEGER ) FROM tab0
----
-24
-35
-89

query I rowsort
SELECT - 35 AS col1 FROM tab2, tab1, tab2 AS cor0, tab1 AS cor1
----
81 values hashing to 7fbbc209618bf287c81172ef2c617496

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-584
SELECT DISTINCT CAST( + col2 AS SIGNED ) AS col2 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-584
SELECT DISTINCT CAST ( + col2 AS INTEGER ) AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT - 68 + col1 AS col1 FROM tab2 AS cor0
----
-37
-51
-9

query I rowsort
SELECT ALL - 4 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

query I rowsort
SELECT col2 + - 97 * + col1 FROM tab0
----
-8309
-8745
-9408

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

query I rowsort
SELECT DISTINCT - cor0.col0 * + tab1.col0 FROM tab1, tab2 AS cor0, tab0, tab0 AS cor1
----
9 values hashing to a5747c01cc59c7dd6ac59c9369299556

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-590
SELECT - col0 * col0 + CAST( - col0 AS SIGNED ) AS col1 FROM tab1
----
-12
-4160
-6480

skipif mysql # not compatible
query I rowsort label-590
SELECT - col0 * col0 + CAST ( - col0 AS INTEGER ) AS col1 FROM tab1
----
-12
-4160
-6480

query I rowsort
SELECT 91 AS col0 FROM tab1 AS cor0
----
91
91
91

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab1, tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT 26 FROM tab2, tab1 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT ALL + - col0 + + 2 FROM tab0 AS cor0
----
-22
-33
-87

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( - cor0.col1 ) + - col1 + col2 * + 39 col0 FROM tab0 AS cor0
----
1287
3198
39

query I rowsort
SELECT - 92 * - 12 AS col1 FROM tab2 AS cor0
----
1104
1104
1104

onlyif mysql # use DIV operator for integer division
query I rowsort label-602
SELECT DISTINCT + ( 29 ) DIV cor0.col0 FROM tab1 AS cor0
----
0
9

skipif mysql # not compatible
query I rowsort label-602
SELECT DISTINCT + ( 29 ) / cor0.col0 FROM tab1 AS cor0
----
0
9

query I rowsort
SELECT + col2 * 95 * - col1 FROM tab1 AS cor0
----
-118560
-133380
-54150

query I rowsort
SELECT + + 1 + col2 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT cor0.col2 + 85 + + col0 FROM tab1 cor0
----
142
206
261

query I rowsort
SELECT - tab2.col1 * + 26 AS col1 FROM tab2
----
-1534
-442
-806

query I rowsort
SELECT - col1 * 68 FROM tab0
----
-5848
-6188
-6596

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

query I rowsort
SELECT ALL - col1 - col1 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT ALL - ( col0 ) + - col2 * col1 - col1 * col1 AS col2 FROM tab0
----
-10258
-15832
-9541

query I rowsort
SELECT - 9 * + col0 * col1 FROM tab0
----
-18576
-30555
-72891

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

query I rowsort
SELECT ALL col0 + col2 * + col1 * + col1 AS col2 FROM tab1
----
16304
36507
5764

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

skipif mysql # not compatible
query I rowsort label-614
SELECT DISTINCT - - col2 + col1 / cor0.col2 FROM tab0 AS cor0
----
35
83
98

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

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

query I rowsort
SELECT ALL 89 * + col1 AS col2 FROM tab2
----
1513
2759
5251

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

skipif mysql # not compatible
query I rowsort label-618
SELECT DISTINCT - ( + col1 ) / col1 FROM tab0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + tab0.col0 * - tab0.col2 col2 FROM tab0
----
-706
-7207
62

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

query I rowsort
SELECT ALL 48 * + col0 AS col2 FROM tab1
----
144
3072
3840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 36 col0 FROM tab1 AS cor0
----
-1944
-2052
-3456

query I rowsort
SELECT + col1 + - 50 FROM tab0 cor0
----
36
41
47

query I rowsort
SELECT DISTINCT 59 + cor0.col2 FROM tab2 AS cor0
----
85
86
97

query I rowsort
SELECT - 44 + + col0 AS col1 FROM tab2 cor0
----
-37
34
35

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 37 + + col1 * col2 - + col0 col0 FROM tab1 AS cor0
----
1205
1438
543

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

query I rowsort
SELECT + col2 * + col2 + col2 - col0 AS col1 FROM tab1 AS cor0
----
2967
3242
9232

query I rowsort
SELECT - col1 * - col1 + col2 * col2 AS col0 FROM tab2 AS cor0
----
1690
1733
4157

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-634
SELECT DISTINCT 90 DIV col1 col2 FROM tab2 AS cor0
----
1
2
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-634
SELECT DISTINCT 90 / col1 col2 FROM tab2 AS cor0
----
1
2
5

query I rowsort
SELECT DISTINCT + 74 * + col1 + - col2 FROM tab1 cor0
----
1870
683
866

onlyif mysql # use DIV operator for integer division
query I rowsort label-636
SELECT ALL + col0 DIV col0 + col2 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
165
3
67

skipif mysql # not compatible
query I rowsort label-636
SELECT ALL + col0 / col0 + col2 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
165
3
67

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE NULL NOT IN ( col0 * - col2 * - col2 )
----

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

skipif mysql # not compatible
query I rowsort label-638
SELECT ALL + col1 / col0 + - col2 FROM tab2 AS cor0
----
-23
-26
-38

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 - col1 FROM tab1 cor0
----
-20
-26
-52

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-644
SELECT DISTINCT cor0.col1 * col1 + + col0 * - col0 + + col2 DIV + col0 FROM tab2 AS cor0
----
-2603
-5952
915

skipif mysql # not compatible
query I rowsort label-644
SELECT DISTINCT cor0.col1 * col1 + + col0 * - col0 + + col2 / + col0 FROM tab2 AS cor0
----
-2603
-5952
915

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

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

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

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

query I rowsort
SELECT DISTINCT col1 * col1 + - tab0.col1 + col0 FROM tab0
----
7334
8279
9347

query I rowsort
SELECT col0 * col0 + + col2 * - col0 + - col1 AS col0 FROM tab1
----
-1293
-179
438

query I rowsort
SELECT col0 * col0 * - tab2.col0 AS col2 FROM tab2
----
-343
-474552
-493039

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

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

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

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

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

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

query I rowsort
SELECT ALL + tab2.col0 * col2 AS col1 FROM tab2 WHERE NOT ( + col0 * - col1 ) IN ( tab2.col0 + col1 * col0 )
----
189
2028
3002

query I rowsort
SELECT - col1 * + tab1.col1 AS col2 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT col1 * - col1 + col2 - col1 AS col2 FROM tab0
----
-7449
-8290
-9505

onlyif mysql # use DIV operator for integer division
query I rowsort label-660
SELECT col2 * - col2 * + col0 + col0 DIV - col1 + col1 * col1 * + col1 FROM tab1
----
-206942
-735089
8828

skipif mysql # not compatible
query I rowsort label-660
SELECT col2 * - col2 * + col0 + col0 / - col1 + col1 * col1 * + col1 FROM tab1
----
-206942
-735089
8828

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

query I rowsort
SELECT ALL - col1 + - col0 * - col0 * - col0 FROM tab2 AS cor0
----
-374
-474611
-493056

query I rowsort
SELECT DISTINCT col2 - cor0.col1 * col0 AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-664
SELECT ALL + col1 DIV - col2 + - col0 + col2 AS col0 FROM tab0 AS cor0
----
-131
-8
7

skipif mysql # not compatible
query I rowsort label-664
SELECT ALL + col1 / - col2 + - col0 + col2 AS col0 FROM tab0 AS cor0
----
-131
-8
7

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

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

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

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

query I rowsort
SELECT DISTINCT + col2 * + col2 + - cor0.col0 * col2 + - col2 AS col0 FROM tab1 AS cor0
----
-456
1440
2700

query I rowsort
SELECT ALL + col1 * - col2 + col0 * col1 AS col1 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT ALL - cor0.col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

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

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

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

query I rowsort
SELECT + + col1 * - col2 + + col2 * col0 AS col0 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT col2 * col2 - - tab0.col0 FROM tab0
----
1113
36
6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-677
SELECT + col1 * tab0.col1 + col0 DIV - col0 AS col1 FROM tab0
----
7395
8280
9408

skipif mysql # not compatible
query I rowsort label-677
SELECT + col1 * tab0.col1 + col0 / - col0 AS col1 FROM tab0
----
7395
8280
9408

query I rowsort
SELECT col0 FROM tab0 WHERE NULL < NULL
----

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

query I rowsort
SELECT ALL + tab1.col1 * + ( 64 ) FROM tab1
----
1664
640
832

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

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

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

query I rowsort
SELECT ALL - 8 + - cor0.col0 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to b8fb29116754982620b23b7e1903e177

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

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

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

query I rowsort
SELECT - 21 + + tab1.col1 FROM tab0, tab0 cor0 CROSS JOIN tab1
----
27 values hashing to c3eca2afcfed6eac44a3361cb2d16fd0

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

query I rowsort
SELECT + 58 * + col1 + - col1 AS col1 FROM tab1 AS cor0
----
1482
570
741

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * 28 col0 FROM tab2 AS cor0
----
1652
476
868

query I rowsort
SELECT - - ( col0 ) FROM tab2 cor0
----
7
78
79

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

skipif mysql # not compatible
query I rowsort label-693
SELECT + col1 / 74 FROM tab2 cor0
----
0
0
0

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-695
SELECT - - 11 DIV 87 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-695
SELECT - - 11 / 87 FROM tab2 cor0
----
0
0
0

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

query I rowsort
SELECT ALL - 79 AS col1 FROM tab1
----
-79
-79
-79

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

query I rowsort
SELECT + + col2 * - col2 * 13 + + col1 * - col0 AS col2 FROM tab0 AS cor0
----
-16221
-3408
-95511

onlyif mysql # use DIV operator for integer division
query I rowsort label-700
SELECT DISTINCT cor0.col1 DIV - 30 col1 FROM tab0, tab0 AS cor0
----
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-700
SELECT DISTINCT cor0.col1 / - 30 col1 FROM tab0, tab0 AS cor0
----
-2
-3

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

query I rowsort
SELECT tab2.col0 + 82 FROM tab2, tab0 AS cor0
----
9 values hashing to 37fa0c734c12f56ca6adfdfa5c2072e0

query I rowsort
SELECT - col0 * - col1 + + ( 10 ) * col1 + col0 FROM tab0 AS cor0
----
2948
4400
9098

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

query I rowsort
SELECT ( + col1 ) * + 25 + + col2 * + col0 AS col2 FROM tab1 AS cor0
----
3898
8005
812

onlyif mysql # use DIV operator for integer division
query I rowsort label-706
SELECT DISTINCT - - col1 * col0 + col2 DIV + ( col0 ) AS col2 FROM tab2 AS cor0
----
1343
220
4602

skipif mysql # not compatible
query I rowsort label-706
SELECT DISTINCT - - col1 * col0 + col2 / + ( col0 ) AS col2 FROM tab2 AS cor0
----
1343
220
4602

query I rowsort
SELECT ALL - - col1 * - col2 + col0 + + ( cor0.col2 ) * 62 AS col0 FROM tab0 AS cor0
----
-2289
-768
0

query I rowsort
SELECT ALL + 14 * col1 AS col2 FROM tab1 AS cor0
----
140
182
364

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

query I rowsort
SELECT DISTINCT + 72 AS col0 FROM tab0 AS cor0
----
72

query I rowsort
SELECT 19 AS col0 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 86c53e8567a17c8d91fc5aff119e0498

query I rowsort
SELECT ALL + 36 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

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

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

query I rowsort
SELECT + 43 * - 4 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d56123a3cd685b431fc4661d6117edf2

onlyif mysql # use DIV operator for integer division
query I rowsort label-716
SELECT ALL + 81 * col0 DIV col2 AS col1 FROM tab0
----
2835
58
87

skipif mysql # not compatible
query I rowsort label-716
SELECT ALL + 81 * col0 / col2 AS col1 FROM tab0
----
2835
58
87

query I rowsort
SELECT ALL - ( + 52 ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

query I rowsort
SELECT DISTINCT - 48 AS col0 FROM tab1
----
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 * col0 col2 FROM tab1
----
186
3968
4960

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

query I rowsort
SELECT col1 + - 29 AS col0 FROM tab0
----
57
62
68

query I rowsort
SELECT ALL col0 + col1 * - 30 FROM tab2 AS cor0
----
-1692
-431
-923

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

query I rowsort
SELECT DISTINCT - col1 * + ( + col0 * + col1 ) AS col2 FROM tab0 cor0
----
-177504
-329315
-737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 40 + 54 col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + 64 * col1 col1 FROM tab0 AS cor0
----
5590
5915
6305

query I rowsort
SELECT ALL col2 * cor0.col2 * cor0.col1 - cor0.col1 FROM tab1 cor0
----
119795
32480
75790

query I rowsort
SELECT ALL 76 + ( col0 ) FROM tab1 cor0
----
140
156
79

query I rowsort
SELECT 57 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

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

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

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

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

query I rowsort
SELECT col0 + + 75 AS col1 FROM tab2
----
153
154
82

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

skipif mysql # not compatible
query I rowsort label-734
SELECT - CAST ( col0 AS INTEGER ) + - tab2.col1 * col2 AS col1 FROM tab2
----
-1612
-725
-844

query I rowsort
SELECT + ( + col1 ) + - 84 AS col0 FROM tab0 cor0
----
13
2
7

query I rowsort
SELECT col0 * - 5 FROM tab1
----
-15
-320
-400

query I rowsort
SELECT ALL col1 * col0 * col0 + tab0.col0 AS col0 FROM tab0
----
118860
49560
720900

query I rowsort
SELECT ALL - 33 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to 8035c665a75d22be5922be1a4e574e03

query I rowsort
SELECT + col1 * + col2 * - ( - col2 ) FROM tab0
----
611884
93654
97

query I rowsort
SELECT + 24 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col0 * 98 col1 FROM tab2
----
-18522
-198744
-294196

query I rowsort
SELECT - 21 * col0 FROM tab1
----
-1344
-1680
-63

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

query I rowsort
SELECT 6 AS col2 FROM tab2
----
6
6
6

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

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

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

query I rowsort
SELECT - 17 * col0 FROM tab2 AS cor0
----
-119
-1326
-1343

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

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

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

query I rowsort
SELECT ALL + + 76 * - cor0.col2 + col0 * col2 AS col2 FROM tab2 cor0
----
-1863
114
52

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

query I rowsort
SELECT DISTINCT + col1 - - cor0.col1 * col1 FROM tab0 AS cor0
----
7482
8372
9506

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-758
SELECT col1 * col2 DIV col1 - - col0 * + col2 DIV + col2 AS col1 FROM tab0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-758
SELECT col1 * col2 / col1 - - col0 * + col2 / + col2 AS col1 FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-759
SELECT 20 DIV tab1.col2 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-759
SELECT 20 / tab1.col2 AS col0 FROM tab1
----
0
0
0

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

query I rowsort
SELECT DISTINCT + tab1.col2 * col2 - + col1 * col0 AS col0 FROM tab1
----
2609
2838
8176

onlyif mysql # use DIV operator for integer division
query I rowsort label-762
SELECT DISTINCT + 25 DIV + col0 - 18 AS col2 FROM tab0
----
-17
-18

skipif mysql # not compatible
query I rowsort label-762
SELECT DISTINCT + 25 / + col0 - 18 AS col2 FROM tab0
----
-17
-18

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

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

query I rowsort
SELECT col1 * 23 FROM tab2
----
1357
391
713

query I rowsort
SELECT DISTINCT col1 + - 55 AS col1 FROM tab1 AS cor0
----
-29
-42
-45

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

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

query I rowsort
SELECT + - col1 + 68 * + col0 AS col1 FROM tab2 cor0
----
445
5245
5355

onlyif mysql # use DIV operator for integer division
query I rowsort label-770
SELECT ALL - col0 DIV cor0.col2 - + col0 FROM tab0 AS cor0
----
-24
-70
-90

skipif mysql # not compatible
query I rowsort label-770
SELECT ALL - col0 / cor0.col2 - + col0 FROM tab0 AS cor0
----
-24
-70
-90

query I rowsort
SELECT DISTINCT - ( + col1 ) * col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

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

query I rowsort
SELECT 84 + + col1 FROM tab0 AS cor0
----
170
175
181

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

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

query I rowsort
SELECT - - cor0.col0 * - 91 FROM tab1 cor0
----
-273
-5824
-7280

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

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

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

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

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

query I rowsort
SELECT - 54 * - col0 AS col1 FROM tab0
----
1296
1890
4806

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 88 * + cor0.col2 col1 FROM tab1, tab2, tab2 AS cor0
----
2288
2376
3344

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

query I rowsort
SELECT ALL - ( + 67 ) * col1 AS col1 FROM tab1 AS cor0
----
-1742
-670
-871

query I rowsort
SELECT DISTINCT + - ( + col0 ) FROM tab2 cor0
----
-7
-78
-79

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

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

skipif mysql # not compatible
query I rowsort label-787
SELECT ALL - + 81 / - cor0.col1 AS col2 FROM tab2 AS cor0
----
1
2
4

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

query I rowsort
SELECT col1 + + col1 * 2 * - col2 AS col1 FROM tab2 AS cor0
----
-1275
-1643
-3009

query I rowsort
SELECT ALL - + 47 + col1 AS col1 FROM tab1 AS cor0
----
-21
-34
-37

query I rowsort
SELECT ALL - - col1 + col1 * - cor0.col0 * col0 AS col2 FROM tab2 AS cor0
----
-106080
-1488
-358897

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

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

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

query I rowsort
SELECT 22 * + col2 FROM tab0 AS cor0
----
1804
22
726

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col0 ) * col1 * col0 col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL + ( + 85 * col2 ) AS col1 FROM tab2
----
2210
2295
3230

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-802
SELECT DISTINCT + col0 + col2 DIV col1 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-802
SELECT DISTINCT + col0 + col2 / col1 FROM tab1 AS cor0
----
5
69
87

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-805
SELECT + - col1 + 86 * cor0.col0 DIV col1 FROM tab1 AS cor0
----
-17
516
540

skipif mysql # not compatible
query I rowsort label-805
SELECT + - col1 + 86 * cor0.col0 / col1 FROM tab1 AS cor0
----
-17
516
540

query I rowsort
SELECT DISTINCT col1 * - col0 + col1 + - col2 AS col1 FROM tab0 AS cor0
----
-2011
-3299
-8090

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-808
SELECT col1 + - 35 DIV ( - col0 ) AS col2 FROM tab2 AS cor0
----
17
36
59

skipif mysql # not compatible
query I rowsort label-808
SELECT col1 + - 35 / ( - col0 ) AS col2 FROM tab2 AS cor0
----
17
36
59

query I rowsort
SELECT + col1 + 42 AS col1 FROM tab0 AS cor0
----
128
133
139

onlyif mysql # use DIV operator for integer division
query I rowsort label-810
SELECT ALL col0 DIV + 54 + 12 FROM tab2
----
12
13
13

skipif mysql # not compatible
query I rowsort label-810
SELECT ALL col0 / + 54 + 12 FROM tab2
----
12
13
13

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

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

query I rowsort
SELECT ALL cor0.col2 + - ( 8 ) AS col0 FROM tab1 AS cor0
----
46
49
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-814
SELECT + - col1 * col1 + + col2 DIV col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-814
SELECT + - col1 * col1 + + col2 / col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL + - col1 * - 19 - - col2 * - col1 FROM tab0 AS cor0
----
-1204
-5733
1746

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + 53 * + col1 col1 FROM tab2 AS cor0
----
1674
3186
918

query I rowsort
SELECT DISTINCT col0 + col0 * col0 + + col2 AS col0 FROM tab2 AS cor0
----
6188
6358
83

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

query I rowsort
SELECT DISTINCT + col0 + + 20 * + col2 FROM tab1
----
1083
1204
2000

query I rowsort
SELECT DISTINCT + col2 * - cor0.col1 + col2 * col2 FROM tab1 cor0
----
1512
2679
7968

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

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

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

query I rowsort
SELECT DISTINCT col0 + col1 * 54 + - tab2.col1 AS col1 FROM tab2
----
1650
3205
980

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( + cor0.col0 * - cor0.col0 AS REAL ) FROM tab1, tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT col2 * 73 + tab1.col0 * col2 AS col1 FROM tab1
----
14688
4104
7809

query I rowsort
SELECT - col1 * - 86 + + 84 * + col1 FROM tab0
----
14620
15470
16490

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

query I rowsort
SELECT + 73 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

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

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

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

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

query I rowsort
SELECT - col0 * + col0 + + col2 * col1 AS col1 FROM tab1
----
-3526
-5152
1395

query I rowsort
SELECT + col1 * col1 + + 41 AS col2 FROM tab2
----
1002
330
3522

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

query I rowsort
SELECT DISTINCT + 30 AS col0 FROM tab0
----
30

query I rowsort
SELECT + ( + 31 ) FROM tab2, tab2 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

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

skipif mysql # not compatible
query I rowsort label-838
SELECT - col1 * + CAST ( + col2 + col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-1054
-1989
-6136

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

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

query I rowsort
SELECT col1 * + 61 AS col1 FROM tab2 AS cor0
----
1037
1891
3599

query I rowsort
SELECT ALL + col1 * - col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

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

query I rowsort
SELECT col2 + cor0.col1 * 95 AS col1 FROM tab1 AS cor0
----
1007
1331
2524

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

query I rowsort
SELECT ALL + tab1.col0 * col2 * - col2 AS col1 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT ALL col2 * col1 + col1 + + col1 AS col2 FROM tab0 WHERE - col2 * col2 + col0 / + col2 NOT IN ( + col1 * + col1 )
----
291
3010
7644

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

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

query I rowsort
SELECT - col1 * - col2 AS col0 FROM tab2
----
1534
646
837

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

query I rowsort
SELECT col1 FROM tab1 WHERE NOT NULL = ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-853
SELECT col2 DIV tab1.col0 + - col2 AS col0 FROM tab1
----
-36
-57
-95

skipif mysql # not compatible
query I rowsort label-853
SELECT col2 / tab1.col0 + - col2 AS col0 FROM tab1
----
-36
-57
-95

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

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

query I rowsort
SELECT DISTINCT col0 FROM tab2 WHERE ( NULL ) > ( - col2 * col0 )
----

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

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

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

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

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL > col1
----

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

query III rowsort
SELECT * FROM tab2 WHERE NULL > col2
----

query I rowsort
SELECT ALL - col1 + col0 * col1 * - col1 FROM tab1
----
-13533
-2054
-6410

onlyif mysql # use DIV operator for integer division
query I rowsort label-865
SELECT col1 DIV tab2.col1 - col1 FROM tab2
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-865
SELECT col1 / tab2.col1 - col1 FROM tab2
----
-16
-30
-58

query I rowsort
SELECT ALL col0 * + col0 - col2 * - col1 FROM tab1
----
1413
4666
7648

onlyif mysql # use DIV operator for integer division
query I rowsort label-867
SELECT - col2 DIV + col0 - col1 AS col2 FROM tab2
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort label-867
SELECT - col2 / + col0 - col1 AS col2 FROM tab2
----
-17
-34
-59

query I rowsort
SELECT col0 * col1 * + 34 FROM tab2 AS cor0
----
156468
45662
7378

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * tab1.col1 * col1 col2 FROM tab1
----
1000
17576
2197

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

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

query I rowsort
SELECT + ( col0 ) * 78 AS col0 FROM tab2 cor0
----
546
6084
6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-879
SELECT ALL - col1 - - col2 DIV CAST( col0 + col0 AS SIGNED ) FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-879
SELECT ALL - col1 - - col2 / CAST ( col0 + col0 AS INTEGER ) FROM tab0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-880
SELECT + col2 * - col0 + ( cor0.col1 ) DIV + col0 FROM tab0 AS cor0
----
-33
-7297
-789

skipif mysql # not compatible
query I rowsort label-880
SELECT + col2 * - col0 + ( cor0.col1 ) / + col0 FROM tab0 AS cor0
----
-33
-7297
-789

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

skipif mysql # not compatible
query I rowsort label-881
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
NULL

query I rowsort
SELECT ALL + 28 * col0 AS col1 FROM tab1
----
1792
2240
84

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

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

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

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

query I rowsort
SELECT 50 - + col1 * col1 FROM tab1 AS cor0
----
-119
-50
-626

query I rowsort
SELECT + 71 * col1 + - 49 AS col2 FROM tab2 AS cor0
----
1158
2152
4140

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

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

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

skipif mysql # not compatible
query I rowsort label-889
SELECT col2 * - CAST ( col1 AS INTEGER ) AS col2 FROM tab0 cor0
----
-2838
-7462
-97

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

query I rowsort
SELECT - cor1.col1 * ( - 56 ) AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 4605e0b0ad61be5dff86d0f76ba2717d

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-895
SELECT col0 / tab0.col1 col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - 12 * tab2.col0 AS col1 FROM tab2, tab0 AS cor0
----
-84
-936
-948

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

query I rowsort
SELECT - 79 - + col0 * + col0 FROM tab0 AS cor0
----
-1304
-655
-8000

query I rowsort
SELECT + 32 AS col1 FROM tab2 AS cor0
----
32
32
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-900
SELECT + 4 DIV - 6 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-900
SELECT + 4 / - 6 AS col1 FROM tab0
----
0
0
0

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

query I rowsort
SELECT - 56 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3d3dab400eef93c098acbbba3fc9bdc6

query I rowsort
SELECT DISTINCT - 69 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-69

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

query I rowsort
SELECT ALL - - col1 + 31 AS col1 FROM tab2 AS cor0
----
48
62
90

query I rowsort
SELECT ALL - col2 + 77 AS col1 FROM tab1 AS cor0
----
-19
20
23

query I rowsort
SELECT DISTINCT - col0 + col2 * 57 * - col1 FROM tab2 AS cor0
----
-36901
-47716
-87516

query I rowsort
SELECT DISTINCT - col2 * + 56 + 54 AS col2 FROM tab0 cor0
----
-1794
-2
-4538

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-909
SELECT - col0 + CAST( NULL AS SIGNED ) / cor0.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-909
SELECT - col0 + CAST ( NULL AS INTEGER ) / cor0.col0 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + 18 * col0 col0 FROM tab1 AS cor0
----
1162
1453
80

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

query I rowsort
SELECT DISTINCT col1 + 4 AS col0 FROM tab1 cor0
----
14
17
30

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

query I rowsort
SELECT DISTINCT + col2 + 98 * + col0 FROM tab1 AS cor0
----
348
6329
7936

query I rowsort
SELECT DISTINCT - - col2 + 18 AS col0 FROM tab0 cor0
----
100
19
51

query I rowsort
SELECT ALL - col2 + - 85 * col2 FROM tab2 AS cor0
----
-2236
-2322
-3268

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

query I rowsort
SELECT - - ( 7 ) FROM tab2 AS cor0
----
7
7
7

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

query I rowsort
SELECT - - 59 + col1 FROM tab2 AS cor0
----
118
76
90

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

query I rowsort
SELECT DISTINCT + - ( 82 ) * col0 FROM tab2 AS cor0
----
-574
-6396
-6478

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

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

query I rowsort
SELECT DISTINCT + col1 * - cor0.col0 + cor0.col2 * 31 AS col1 FROM tab2 AS cor0
----
-165
-3796
620

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

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

query I rowsort
SELECT ALL 75 + col2 * + col1 AS col2 FROM tab1 AS cor0
----
1323
1479
645

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-935
SELECT + + col2 + cor0.col1 * 56 DIV + col0 AS col1 FROM tab2 AS cor0
----
275
50
68

skipif mysql # not compatible
query I rowsort label-935
SELECT + + col2 + cor0.col1 * 56 / + col0 AS col1 FROM tab2 AS cor0
----
275
50
68

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

query I rowsort
SELECT DISTINCT - 83 * col0 + - 53 AS col1 FROM tab0
----
-2045
-2958
-7440

query I rowsort
SELECT DISTINCT ( 19 ) * cor1.col1 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
1634
1729
1843

query I rowsort
SELECT DISTINCT - ( col1 ) AS col0 FROM tab0
----
-86
-91
-97

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

query I rowsort
SELECT DISTINCT - ( 90 ) FROM tab1, tab1 AS cor0, tab1 AS cor1
----
-90

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

query I rowsort
SELECT DISTINCT - ( ( + cor1.col1 ) ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-10
-13
-26

query I rowsort
SELECT col1 * - col0 * + ( + tab2.col1 ) + - col2 * - col0 AS col2 FROM tab2
----
-19829
-269490
-6538

query I rowsort
SELECT DISTINCT 78 + col0 FROM tab1
----
142
158
81

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

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

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

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

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

query I rowsort
SELECT ALL - col2 + col2 * + col2 AS col0 FROM tab2 AS cor0
----
1406
650
702

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + cor0.col0 * + 20 col2 FROM tab0 AS cor0
----
1862
513
701

query I rowsort
SELECT 42 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT DISTINCT - 20 + + tab1.col0 FROM tab1
----
-17
44
60

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

query I rowsort
SELECT + tab0.col1 + + tab0.col1 FROM tab0
----
172
182
194

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

skipif mysql # not compatible
query I rowsort label-959
SELECT ALL - CAST ( NULL AS REAL ) * + 48 - col2 * - 14 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 87 - col1 FROM tab1
----
-100
-113
-97

query I rowsort
SELECT 36 + 95 FROM tab2
----
131
131
131

query I rowsort
SELECT 1 + col0 + + col2 FROM tab1
----
122
177
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-963
SELECT + CAST( 82 * + col0 AS SIGNED ) - - 69 FROM tab2
----
643
6465
6547

skipif mysql # not compatible
query I rowsort label-963
SELECT + CAST ( 82 * + col0 AS INTEGER ) - - 69 FROM tab2
----
643
6465
6547

query I rowsort
SELECT col1 * - 41 + col1 * ( col1 ) + - tab0.col2 FROM tab0
----
3837
4468
5431

query I rowsort
SELECT - col1 + + col2 * col2 * - col0 FROM tab0 cor0
----
-132
-26222
-598527

query I rowsort
SELECT - col0 + + 76 * col0 FROM tab0
----
1800
2625
6675

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

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

query I rowsort
SELECT + 85 * - col0 + + col2 - - 27 FROM tab1 AS cor0
----
-174
-5356
-6677

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

query I rowsort
SELECT DISTINCT 85 * col2 + ( + col0 ) * col0 AS col1 FROM tab2
----
2344
8294
9471

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 + col1 col0 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-973
SELECT ALL - - col0 DIV cor0.col1 + - 32 * col1 - col1 FROM tab1 AS cor0
----
-324
-423
-858

skipif mysql # not compatible
query I rowsort label-973
SELECT ALL - - col0 / cor0.col1 + - 32 * col1 - col1 FROM tab1 AS cor0
----
-324
-423
-858

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

skipif mysql # not compatible
query I rowsort label-974
SELECT ALL - - col2 + + col1 / + 69 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + - cor0.col1 + - col0 * + 88 AS col1 FROM tab2 AS cor0
----
-647
-6923
-6969

query I rowsort
SELECT col2 * - col1 * 32 + + col0 + col0 * col1 * 73 AS col0 FROM tab0 AS cor0
----
244766
352532
59880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 - col1 col2 FROM tab2 AS cor0
----
-2087
-220
-3019

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

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

query I rowsort
SELECT + 79 * col0 + - cor0.col2 * col2 FROM tab2 cor0
----
-176
4797
5486

query I rowsort
SELECT col1 + - col2 * - 74 + col2 * col0 AS col1 FROM tab1 AS cor0
----
14797
4184
7876

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

query I rowsort
SELECT 26 * + col0 + col1 AS col2 FROM tab1 AS cor0
----
104
1674
2093

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

skipif mysql # not compatible
query I rowsort label-983
SELECT CAST ( - 52 AS INTEGER ) + col2 AS col0 FROM tab2 AS cor0
----
-14
-25
-26

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

query I rowsort
SELECT col0 * - 83 + col1 FROM tab2 AS cor0
----
-550
-6415
-6540

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

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

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

skipif mysql # not compatible
query I rowsort label-988
SELECT + CAST ( col2 AS INTEGER ) + col0 * col1 FROM tab1
----
1136
132
697

query I rowsort
SELECT 68 + 93 AS col2 FROM tab2
----
161
161
161

query I rowsort
SELECT - 98 * col1 * + col2 FROM tab1
----
-122304
-137592
-55860

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

query I rowsort
SELECT 49 * - col0 FROM tab1 AS cor0
----
-147
-3136
-3920

query I rowsort
SELECT col0 * - cor0.col0 + - 70 * col2 * col0 + col0 * + 73 FROM tab2 cor0
----
-12768
-142350
-210614

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

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

query I rowsort
SELECT 58 * - col1 AS col2 FROM tab1
----
-1508
-580
-754

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

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

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

query I rowsort
SELECT DISTINCT 73 AS col1 FROM tab2
----
73

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

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

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

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

query I rowsort
SELECT col1 * + ( + 21 ) AS col2 FROM tab2
----
1239
357
651

query I rowsort
SELECT ALL - 43 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to ab0c314d2b589ccedb9a875beeb1f86a

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

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1, tab0 cor1, tab1 AS cor2
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 + tab1.col0 + ( - col1 * ( + col1 ) ) col2 FROM tab1
----
-26
-647
-76

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 - ( - col0 ) col1 FROM tab1 AS cor0
----
128
160
6

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

query I rowsort
SELECT col1 - 22 AS col0 FROM tab1 AS cor0
----
-12
-9
4

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

query I rowsort
SELECT ALL + 16 * - 96 FROM tab1, tab1 AS cor0
----
9 values hashing to 07d7ad076f38d6ee7cababd4aa37c6bf

query I rowsort
SELECT ALL - col1 * + 41 - - col1 AS col0 FROM tab1 AS cor0
----
-1040
-400
-520

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

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

query I rowsort
SELECT + - cor0.col1 * - 27 FROM tab1 AS cor0
----
270
351
702

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

query I rowsort
SELECT + col0 + + ( + 61 ) AS col1 FROM tab1
----
125
141
64

query I rowsort
SELECT DISTINCT - col2 * col1 * - 30 FROM tab0
----
223860
2910
85140

query I rowsort
SELECT DISTINCT - tab0.col0 * - 94 FROM tab0
----
2256
3290
8366

query I rowsort
SELECT + ( col0 ) * + col1 + - tab0.col0 + + col2 FROM tab0
----
2073
3361
8092

query I rowsort
SELECT - 28 - - ( + cor0.col0 ) AS col2 FROM tab0 AS cor0
----
-4
61
7

query I rowsort
SELECT + 88 + col1 AS col1 FROM tab0 AS cor0
----
174
179
185

onlyif mysql # use DIV operator for integer division
query I rowsort label-1025
SELECT ALL col0 DIV 88 - col0 FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-1025
SELECT ALL col0 / 88 - col0 FROM tab2
----
-7
-78
-79

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

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

query I rowsort
SELECT DISTINCT - 6 * col1 * + cor0.col1 FROM tab0 AS cor0
----
-44376
-49686
-56454

query I rowsort
SELECT 10 - + col2 AS col2 FROM tab1 AS cor0
----
-44
-47
-86

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

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

query I rowsort
SELECT + 15 + + col0 AS col2 FROM tab1 AS cor0
----
18
79
95

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

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

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

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

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

query I rowsort
SELECT + col2 * + 61 FROM tab0 AS cor0
----
2013
5002
61

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

query I rowsort
SELECT - col1 * col0 + 67 FROM tab1 AS cor0
----
-11
-573
-973

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

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

query I rowsort
SELECT col0 + col2 * 86 FROM tab1 AS cor0
----
4647
4966
8336

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1044
SELECT tab1.col0 + col1 + tab1.col0 DIV col1 AS col0 FROM tab1
----
29
80
99

skipif mysql # not compatible
query I rowsort label-1044
SELECT tab1.col0 + col1 + tab1.col0 / col1 AS col0 FROM tab1
----
29
80
99

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

query I rowsort
SELECT DISTINCT cor0.col2 + + 77 AS col0 FROM tab1 cor0
----
131
134
173

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

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

query I rowsort
SELECT + 59 + - 81 * - col1 AS col1 FROM tab2 AS cor0
----
1436
2570
4838

query I rowsort
SELECT + 31 + col1 FROM tab1 cor0
----
41
44
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1050
SELECT ALL - CAST( 27 AS SIGNED ) * col2 FROM tab2 AS cor0
----
-1026
-702
-729

skipif mysql # not compatible
query I rowsort label-1050
SELECT ALL - CAST ( 27 AS INTEGER ) * col2 FROM tab2 AS cor0
----
-1026
-702
-729

query I rowsort
SELECT - 24 * col1 * col2 AS col1 FROM tab1 AS cor0
----
-13680
-29952
-33696

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1052
SELECT CAST( - col0 AS SIGNED ) FROM tab2 cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-1052
SELECT CAST ( - col0 AS INTEGER ) FROM tab2 cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-1053
SELECT - - ( cor0.col2 ) DIV - col0 + + col2 * 12 * - col0 FROM tab2 AS cor0
----
-2271
-24336
-36024

skipif mysql # not compatible
query I rowsort label-1053
SELECT - - ( cor0.col2 ) / - col0 + + col2 * 12 * - col0 FROM tab2 AS cor0
----
-2271
-24336
-36024

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1055
SELECT col1 DIV col1 + - 98 * col1 col0 FROM tab1
----
-1273
-2547
-979

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1055
SELECT col1 / col1 + - 98 * col1 col0 FROM tab1
----
-1273
-2547
-979

query I rowsort
SELECT ALL - + 98 * col1 AS col1 FROM tab2 AS cor0
----
-1666
-3038
-5782

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

query I rowsort
SELECT + - 95 + + col1 * 5 AS col2 FROM tab1 AS cor0
----
-30
-45
35

query I rowsort
SELECT col0 * - 39 + col2 FROM tab0 AS cor0
----
-1364
-3389
-903

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

query I rowsort
SELECT ALL - col2 * tab0.col1 + 43 * col2 * 45 - - 57 FROM tab0
----
151265
1895
61074

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

query I rowsort
SELECT DISTINCT - tab1.col1 + - ( + tab1.col0 ) + col0 * - tab1.col2 FROM tab1
----
-191
-3722
-7773

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - + col1 - + CAST ( col2 AS REAL ) * col2 col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

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

skipif mysql # not compatible
query I rowsort label-1066
SELECT DISTINCT + + col1 - - cor0.col0 / col0 AS col0 FROM tab0 cor0
----
87
92
98

query I rowsort
SELECT DISTINCT + col0 * + 10 FROM tab0 AS cor0
----
240
350
890

onlyif mysql # use DIV operator for integer division
query I rowsort label-1068
SELECT DISTINCT - - col1 DIV - ( + 73 ) - + col0 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-1068
SELECT DISTINCT - - col1 / - ( + 73 ) - + col0 FROM tab0 AS cor0
----
-25
-36
-90

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

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

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

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

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0, tab0 AS cor0 WHERE NOT cor0.col1 < NULL
----

query I rowsort
SELECT DISTINCT 61 FROM tab1 cor0
----
61

query I rowsort
SELECT ( col0 ) * col2 + - col2 FROM tab0 cor0
----
34
7216
759

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

skipif mysql # not compatible
query I rowsort label-1075
SELECT ALL + - ( - ( + col0 ) ) * - 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 col1 * 5 col2 FROM tab2 cor0
----
155
295
85

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

query I rowsort
SELECT 51 * 24 - - col2 FROM tab2 cor0
----
1250
1251
1262

query I rowsort
SELECT ALL ( - 32 ) + cor0.col2 * col2 AS col0 FROM tab0 AS cor0
----
-31
1057
6692

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

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

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

query I rowsort
SELECT DISTINCT - col1 * col2 - col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT + - 23 - + col1 AS col0 FROM tab2 AS cor0
----
-40
-54
-82

query I rowsort
SELECT DISTINCT - + col2 * 31 + - col0 FROM tab0 AS cor0
----
-1047
-2631
-66

query I rowsort
SELECT DISTINCT - + cor0.col1 * 62 + col0 * - cor0.col2 FROM tab0 AS cor0
----
-12940
-6049
-6124

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

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

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

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

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

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

query I rowsort
SELECT + + col2 * + col2 * col2 FROM tab1 AS cor0
----
157464
185193
884736

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

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

query I rowsort
SELECT + col2 + + ( + col0 ) + 25 * - 68 FROM tab2
----
-1583
-1596
-1666

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

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

skipif mysql # not compatible
query I rowsort label-1095
SELECT + col0 + ( - col1 ) / + 93 AS col1 FROM tab1
----
3
64
80

query I rowsort
SELECT 0 * cor0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-1097
SELECT ALL + col1 + + 15 * cor0.col1 DIV - 35 FROM tab0 AS cor0
----
50
52
56

skipif mysql # not compatible
query I rowsort label-1097
SELECT ALL + col1 + + 15 * cor0.col1 / - 35 FROM tab0 AS cor0
----
50
52
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 31 + + col0 col0 FROM tab2
----
109
110
38

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

skipif mysql # not compatible
query I rowsort label-1099
SELECT - col0 / - 42 AS col2 FROM tab2
----
0
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1100
SELECT ALL + CAST( + col2 AS SIGNED ) + - col0 FROM tab0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-1100
SELECT ALL + CAST ( + col2 AS INTEGER ) + - col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL - 34 * col2 AS col1 FROM tab2
----
-1292
-884
-918

query I rowsort
SELECT DISTINCT col1 + + col1 * + cor0.col0 - col0 * + col1 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-1103
SELECT ALL + - col2 * + 79 + - 63 DIV col2 AS col1 FROM tab0 AS cor0
----
-142
-2608
-6478

skipif mysql # not compatible
query I rowsort label-1103
SELECT ALL + - col2 * + 79 + - 63 / col2 AS col1 FROM tab0 AS cor0
----
-142
-2608
-6478

query I rowsort
SELECT ALL + col2 * col2 + 84 AS col0 FROM tab2 AS cor0
----
1528
760
813

query I rowsort
SELECT ALL - col0 * col2 + 60 AS col2 FROM tab2 AS cor0
----
-129
-1968
-2942

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1106
SELECT ALL col0 + - CAST( + col2 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-1106
SELECT ALL col0 + - CAST ( + col2 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL + 0 * col0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL - 48 * tab0.col0 AS col0 FROM tab0
----
-1152
-1680
-4272

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

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

query I rowsort
SELECT - cor1.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

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

query I rowsort
SELECT DISTINCT + + col0 + - col1 * - 57 AS col0 FROM tab2 AS cor0
----
1048
1774
3441

query I rowsort
SELECT - col0 * - 92 FROM tab1 AS cor0
----
276
5888
7360

query I rowsort
SELECT ALL col2 * 31 + col1 * - col2 FROM tab1 AS cor0
----
1197
1728
270

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + + col2 * + 75 col1 FROM tab2 cor0
----
2009
2056
2867

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

query I rowsort
SELECT ALL col2 * - ( - col1 * col1 ) FROM tab0 AS cor0
----
244068
679042
9409

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

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

query I rowsort
SELECT - - col1 * - 36 FROM tab1 cor0
----
-360
-468
-936

query I rowsort
SELECT ALL + col0 + + 79 AS col1 FROM tab2 AS cor0
----
157
158
86

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

skipif mysql # not compatible
query I rowsort label-1122
SELECT col0 / tab2.col0 AS col0 FROM tab2
----
1
1
1

query I rowsort
SELECT ALL 41 * col2 FROM tab1
----
2214
2337
3936

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

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

query I rowsort
SELECT ALL + 42 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 325aada2239b6fe1fe2d843515ae8c5e

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 26 col2 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2 AS cor2
----
26

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

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

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

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

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

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

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

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

query I rowsort
SELECT - - cor0.col2 * + 94 + 43 FROM tab2 AS cor0
----
2487
2581
3615

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

query I rowsort
SELECT 17 * col1 FROM tab2
----
1003
289
527

query I rowsort
SELECT + col1 * 3 + 16 - + cor0.col2 FROM tab1 AS cor0
----
-11
-41
40

query I rowsort
SELECT DISTINCT tab0.col0 + - col2 + - col2 * col1 FROM tab0
----
-2847
-63
-7455

query I rowsort
SELECT + + col0 + - col0 * 77 - cor0.col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1326
-315
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-1143
SELECT ALL + col2 DIV - col2 + - tab1.col0 FROM tab1
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-1143
SELECT ALL + col2 / - col2 + - tab1.col0 FROM tab1
----
-4
-65
-81

query I rowsort
SELECT DISTINCT + + 66 * + col1 + + col1 FROM tab0 AS cor0
----
5762
6097
6499

query I rowsort
SELECT ALL + ( col2 ) * + col2 + col0 * - col1 FROM tab0 AS cor0
----
-1375
-3394
-975

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1146
SELECT ALL 65 + 49 * + col1 * CAST( + col0 AS SIGNED ) FROM tab1 AS cor0
----
31425
3887
51025

skipif mysql # not compatible
query I rowsort label-1146
SELECT ALL 65 + 49 * + col1 * CAST ( + col0 AS INTEGER ) FROM tab1 AS cor0
----
31425
3887
51025

query I rowsort
SELECT 28 * - col0 + col0 AS col2 FROM tab0 cor0
----
-2403
-648
-945

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1151
SELECT CAST( 89 AS SIGNED ) + col1 col1 FROM tab1 AS cor0
----
102
115
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1151
SELECT CAST ( 89 AS INTEGER ) + col1 col1 FROM tab1 AS cor0
----
102
115
99

query I rowsort
SELECT ALL - - col0 + - col2 * - col2 * - 30 AS col1 FROM tab2 AS cor0
----
-20202
-21863
-43241

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1154
SELECT DISTINCT col0 / + 33 col1 FROM tab1 AS cor0
----
0
1
2

query I rowsort
SELECT ALL + 71 + - 76 AS col1 FROM tab1 AS cor0
----
-5
-5
-5

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

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

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

query I rowsort
SELECT 12 * tab0.col0 * tab0.col2 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to c6dda15abe43c167e9539ed7acb8fc28

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
10
13
26

query I rowsort
SELECT DISTINCT + 62 + col0 * + col1 AS col1 FROM tab2 AS cor0
----
1405
279
4664

query I rowsort
SELECT DISTINCT - 65 + + col0 * col1 FROM tab0 AS cor0
----
1999
3330
8034

query I rowsort
SELECT ALL - cor0.col2 * col0 - col1 * + 11 AS col2 FROM tab0 AS cor0
----
-1102
-1738
-8299

onlyif mysql # use DIV operator for integer division
query I rowsort label-1163
SELECT ALL + cor0.col0 + - col2 DIV - 74 + 66 AS col1 FROM tab1 cor0
----
130
147
69

skipif mysql # not compatible
query I rowsort label-1163
SELECT ALL + cor0.col0 + - col2 / - 74 + 66 AS col1 FROM tab1 cor0
----
130
147
69

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

query I rowsort
SELECT DISTINCT 94 * - 59 AS col0 FROM tab1
----
-5546

query I rowsort
SELECT DISTINCT + col2 * - col2 + col2 AS col1 FROM tab2 AS cor0
----
-1406
-650
-702

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

skipif mysql # not compatible
query I rowsort label-1167
SELECT ALL + CAST ( col2 AS INTEGER ) * col2 AS col0 FROM tab0
----
1
1089
6724

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

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

query I rowsort
SELECT + col0 * + ( + tab0.col2 + tab0.col1 ) FROM tab0
----
15397
2856
3430

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

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

query I rowsort
SELECT 37 * 57 FROM tab1 AS cor0
----
2109
2109
2109

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

query I rowsort
SELECT DISTINCT - 6 AS col1 FROM tab1
----
-6

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

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

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

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

query I rowsort
SELECT ALL - + cor0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT - 78 + col0 AS col0 FROM tab1 AS cor0
----
-14
-75
2

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

query I rowsort
SELECT DISTINCT + + 9 - col1 * + col1 FROM tab2 cor0
----
-280
-3472
-952

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

skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( 45 AS REAL ) * + col2 * + col0 - + col1 AS col1 FROM tab1 cor0
----
-164170
-345613
-7316

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

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

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

query I rowsort
SELECT DISTINCT - col0 + 16 AS col2 FROM tab1 cor0
----
-48
-64
13

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

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

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

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

query I rowsort
SELECT ALL cor0.col2 + 13 * + col0 * 35 + - cor0.col2 FROM tab1 AS cor0
----
1365
29120
36400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col2 + col2 col1 FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1190
SELECT ALL col2 DIV - col0 + - tab0.col1 FROM tab0
----
-87
-91
-97

skipif mysql # not compatible
query I rowsort label-1190
SELECT ALL col2 / - col0 + - tab0.col1 FROM tab0
----
-87
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1191
SELECT col1 DIV CAST( + 83 + + col1 AS SIGNED ) FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1191
SELECT col1 / CAST ( + 83 + + col1 AS INTEGER ) FROM tab1
----
0
0
0

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

query I rowsort
SELECT - col2 * col2 + + col0 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT ALL tab1.col0 - - 71 * 82 AS col2 FROM tab1
----
5825
5886
5902

query I rowsort
SELECT ALL col1 * + 27 + col0 AS col0 FROM tab1 AS cor0
----
334
431
705

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

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

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

query I rowsort
SELECT ALL - ( - 69 ) + col1 FROM tab2 cor0
----
100
128
86

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

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

query I rowsort
SELECT ALL + 71 - + ( + col2 * col2 + col0 ) FROM tab0 AS cor0
----
-1042
-6742
35

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

query I rowsort
SELECT - - 24 + col1 FROM tab2 AS cor0
----
41
55
83

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1207
SELECT - cor0.col2 / - col2 + - col1 FROM tab1 cor0
----
-12
-25
-9

query I rowsort
SELECT - col0 + - tab1.col0 * 3 * col0 FROM tab1
----
-12352
-19280
-30

query I rowsort
SELECT - 56 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3d3dab400eef93c098acbbba3fc9bdc6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1210
SELECT + 59 + cor0.col2 DIV + col2 col0 FROM tab0 AS cor0
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1210
SELECT + 59 + cor0.col2 / + col2 col0 FROM tab0 AS cor0
----
60
60
60

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

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

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

query I rowsort
SELECT DISTINCT - col0 - 90 * - col2 * + col0 AS col0 FROM tab0 AS cor0
----
3115
656731
71256

query I rowsort
SELECT - 13 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 1c6aaa07ba8d3dc01ee616e16bef60f2

query I rowsort
SELECT ALL 18 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

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

query I rowsort
SELECT DISTINCT + col1 * 31 FROM tab0 AS cor0
----
2666
2821
3007

query I rowsort
SELECT ALL - - col1 + + 18 * 42 AS col2 FROM tab0 AS cor0
----
842
847
853

query I rowsort
SELECT ALL col2 * + col2 * + col2 + - col1 FROM tab1 AS cor0
----
157438
185183
884723

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

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

skipif mysql # not compatible
query I rowsort label-1221
SELECT ALL - - col1 / col2 + 60 FROM tab1 AS cor0
----
60
60
60

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

query I rowsort
SELECT DISTINCT - col2 + col2 * + col0 AS col2 FROM tab0 AS cor0
----
34
7216
759

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

query I rowsort
SELECT DISTINCT + col0 + 96 FROM tab0 AS cor0
----
120
131
185

onlyif mysql # use DIV operator for integer division
query I rowsort label-1226
SELECT - col2 + + ( col2 ) DIV + col2 AS col1 FROM tab1 cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-1226
SELECT - col2 + + ( col2 ) / + col2 AS col1 FROM tab1 cor0
----
-53
-56
-95

query I rowsort
SELECT + + col2 * - ( 3 ) AS col2 FROM tab0 AS cor0
----
-246
-3
-99

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1229
SELECT DISTINCT col1 DIV + 66 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-1229
SELECT DISTINCT col1 / + 66 FROM tab0 AS cor0
----
1

query I rowsort
SELECT ALL + col2 * cor0.col1 + - 17 FROM tab1 AS cor0
----
1231
1387
553

query I rowsort
SELECT + + 99 * 38 - col1 FROM tab0 AS cor0
----
3665
3671
3676

query I rowsort
SELECT + - col2 * + 88 * - col2 - 59 AS col2 FROM tab2 cor0
----
127013
59429
64093

query I rowsort
SELECT - - col1 + - 28 - - cor0.col1 FROM tab0 AS cor0
----
144
154
166

query I rowsort
SELECT ALL + cor1.col0 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

query I rowsort
SELECT DISTINCT 46 * col0 + + col2 FROM tab0 cor0
----
1137
1611
4176

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1237
SELECT ALL + - col0 + - col1 * col2 DIV - 26 AS col2 FROM tab2 AS cor0
----
-19
-55
25

skipif mysql # not compatible
query I rowsort label-1237
SELECT ALL + - col0 + - col1 * col2 / - 26 AS col2 FROM tab2 AS cor0
----
-19
-55
25

query I rowsort
SELECT 4 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 cor2
----
81 values hashing to 3347a3237b37ed63205e9440d8818a46

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

query I rowsort
SELECT DISTINCT 7 * + col1 FROM tab2 AS cor0
----
119
217
413

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

query I rowsort
SELECT ALL - + col1 + + col1 * + 28 FROM tab1 AS cor0
----
270
351
702

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1244
SELECT - col0 * col1 DIV + 26 FROM tab1 AS cor0
----
-24
-3
-40

skipif mysql # not compatible
query I rowsort label-1244
SELECT - col0 * col1 / + 26 FROM tab1 AS cor0
----
-24
-3
-40

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

query I rowsort
SELECT DISTINCT + 54 * col1 + col2 FROM tab2 AS cor0
----
1701
3212
956

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

query I rowsort
SELECT col1 + col0 * + col0 AS col0 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT + col2 + col1 * - 85 AS col0 FROM tab0 AS cor0
----
-7277
-7653
-8244

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

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

query I rowsort
SELECT DISTINCT 5 FROM tab0
----
5

query I rowsort
SELECT DISTINCT + col0 + cor0.col2 * 62 FROM tab2 AS cor0
----
1681
1690
2435

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

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

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + col2 IN ( + col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

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

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

query III rowsort
SELECT ALL * FROM tab1 WHERE ( + col2 ) NOT IN ( col2 )
----

query I rowsort
SELECT col0 + col1 AS col0 FROM tab0 WHERE NULL <= col0
----

query I rowsort
SELECT DISTINCT + col2 FROM tab0 WHERE NOT - col0 IN ( col1 )
----
1
33
82

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

query I rowsort
SELECT + col1 * col2 * - col1 + cor0.col0 FROM tab0 AS cor0
----
-244044
-678953
-9374

query I rowsort
SELECT DISTINCT + col1 + col1 * col1 AS col0 FROM tab2 cor0
----
306
3540
992

query IIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0 WHERE NULL <= ( NULL )
----

query I rowsort
SELECT col2 * + col1 FROM tab1 cor0 WHERE NOT col0 * col1 BETWEEN - col2 * - col1 / - col2 AND col0 * col2 / - col1
----
1248
1404
570

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

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

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab0 WHERE NOT col0 IN ( - col0 * + col1 )
----
24
35
89

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

query I rowsort
SELECT ALL col1 / col1 AS col0 FROM tab2 WHERE NOT ( NULL ) BETWEEN NULL AND ( - tab2.col1 / col0 )
----

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col2 + col2 col1 FROM tab2
----
114
78
81

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

query I rowsort
SELECT ALL col2 * - col1 FROM tab0 WHERE col0 * col2 = - col1
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL = col2
----

query I rowsort
SELECT col0 - - col2 * - col1 * col0 FROM tab2
----
-119574
-50955
-5852

query I rowsort
SELECT ALL 15 + 31 * + tab2.col2 AS col1 FROM tab2
----
1193
821
852

query I rowsort
SELECT tab1.col0 + + 6 FROM tab1
----
70
86
9

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

query I rowsort
SELECT ALL ( col2 ) + + col0 + col0 FROM tab2
----
182
196
41

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

query I rowsort
SELECT - cor0.col2 FROM tab0, tab0 AS cor0, tab2 cor1, tab0 AS cor2
----
81 values hashing to 87af467938ef355540b8de24db1bf3b8

query I rowsort
SELECT cor0.col1 + - 50 * + col1 FROM tab0 AS cor0
----
-4214
-4459
-4753

skipif mysql # not compatible
query I rowsort
SELECT ALL + + CAST ( - col0 AS REAL ) * col0 AS col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - col1 + - 53 AS col1 FROM tab2 cor0
----
-112
-70
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-1288
SELECT DISTINCT cor0.col1 DIV + 66 + col0 * - col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-1288
SELECT DISTINCT cor0.col1 / + 66 + col0 * - col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1295
SELECT - col0 + + cor0.col2 DIV - ( - 95 ) 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-1295
SELECT - col0 + + cor0.col2 / - ( - 95 ) col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 18 * col1 col2 FROM tab2 AS cor0
----
1062
306
558

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

query I rowsort
SELECT - tab0.col2 - - 4 AS col1 FROM tab0
----
-29
-78
3

query I rowsort
SELECT ALL - - col1 * cor0.col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - 3 * col1 AS col0 FROM tab0 AS cor0
----
-258
-273
-291

query I rowsort
SELECT - col1 + + 24 AS col1 FROM tab1 cor0
----
-2
11
14

query I rowsort
SELECT - col0 - 40 FROM tab0 AS cor0
----
-129
-64
-75

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

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

query I rowsort
SELECT - + cor0.col0 + - col0 * + col0 * col0 FROM tab2 AS cor0
----
-350
-474630
-493118

query I rowsort
SELECT + ( col1 ) * 23 AS col0 FROM tab2
----
1357
391
713

query I rowsort
SELECT DISTINCT ( - col2 * 94 ) AS col2 FROM tab0
----
-3102
-7708
-94

query I rowsort
SELECT - col0 + - cor0.col1 * 53 FROM tab1 cor0
----
-1381
-594
-769

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

query I rowsort
SELECT DISTINCT cor0.col0 * ( + 46 ) * col0 FROM tab2 cor0
----
2254
279864
287086

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

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

query I rowsort
SELECT col1 + 53 FROM tab2 AS cor0
----
112
70
84

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1318
SELECT ALL - - col1 DIV - col0 + + 67 * 36 + col0 * - ( + col1 ) AS col2 FROM tab2 AS cor0
----
-2190
1069
2191

skipif mysql # not compatible
query I rowsort label-1318
SELECT ALL - - col1 / - col0 + + 67 * 36 + col0 * - ( + col1 ) AS col2 FROM tab2 AS cor0
----
-2190
1069
2191

query I rowsort
SELECT DISTINCT + + 85 + col0 AS col2 FROM tab1 AS cor0
----
149
165
88

query I rowsort
SELECT ALL 96 + + col0 * - 74 FROM tab1 AS cor0
----
-126
-4640
-5824

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 33 FROM tab0 AS cor0
----
33

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + + col0 + + col2 - - 88 FROM tab1 AS cor0
----
145
209
264

query I rowsort
SELECT DISTINCT + + 37 AS col0 FROM tab0 cor0
----
37

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

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

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

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

query I rowsort
SELECT 88 + + 14 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to ee94a7029b1f2955f26d8b1cdd1a4587

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

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

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

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

query I rowsort
SELECT ALL + - col2 * - col1 + col0 * + 95 AS col2 FROM tab1 AS cor0
----
1689
6650
8848

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

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

query I rowsort
SELECT DISTINCT - col1 + + 59 FROM tab0 AS cor0
----
-27
-32
-38

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

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

query I rowsort
SELECT - 42 FROM tab1, tab0 AS cor0
----
9 values hashing to 9894093f29c0defae91347934f060329

query I rowsort
SELECT + + 73 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT col2 + 39 FROM tab1
----
135
93
96

query I rowsort
SELECT DISTINCT 74 AS col1 FROM tab1
----
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 24 ) + col2 * 69 col2 FROM tab1
----
3750
3957
6648

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

query I rowsort
SELECT col0 * 93 + col0 * + col2 AS col0 FROM tab1
----
15120
441
9600

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

query I rowsort
SELECT ALL - cor0.col1 * 44 AS col2 FROM tab1 AS cor0
----
-1144
-440
-572

query I rowsort
SELECT DISTINCT - 89 * - col2 * col0 FROM tab2 AS cor0
----
16821
180492
267178

query I rowsort
SELECT - 6 - + 13 FROM tab2, tab2 AS cor0, tab1 cor1, tab0 AS cor2
----
81 values hashing to 99bbabf7eff84050cf6c6974a01eb714

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

query I rowsort
SELECT DISTINCT - 70 * cor0.col2 FROM tab0 AS cor0
----
-2310
-5740
-70

query I rowsort
SELECT col0 * 68 AS col2 FROM tab0 AS cor0
----
1632
2380
6052

query I rowsort
SELECT ALL + ( col1 ) + + col0 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT 16 + 92 FROM tab0
----
108
108
108

onlyif mysql # use DIV operator for integer division
query I rowsort label-1360
SELECT + cor0.col2 DIV - 70 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to a46f44f30b2183508f32c16a79479cd9

skipif mysql # not compatible
query I rowsort label-1360
SELECT + cor0.col2 / - 70 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to a46f44f30b2183508f32c16a79479cd9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1361
SELECT - col1 DIV + 13 AS col1 FROM tab0 AS cor0
----
-6
-7
-7

skipif mysql # not compatible
query I rowsort label-1361
SELECT - col1 / + 13 AS col1 FROM tab0 AS cor0
----
-6
-7
-7

query I rowsort
SELECT ALL - 35 + col2 * - col1 FROM tab2 AS cor0
----
-1569
-681
-872

onlyif mysql # use DIV operator for integer division
query I rowsort label-1363
SELECT DISTINCT col2 * col2 DIV + 10 + - ( - col1 ) FROM tab0 AS cor0
----
194
763
97

skipif mysql # not compatible
query I rowsort label-1363
SELECT DISTINCT col2 * col2 / + 10 + - ( - col1 ) FROM tab0 AS cor0
----
194
763
97

query I rowsort
SELECT 4 * col2 * - col2 FROM tab1 AS cor0
----
-11664
-12996
-36864

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

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

query I rowsort
SELECT ALL + col0 + + col2 * + col1 * col2 FROM tab1
----
119888
32554
75819

query I rowsort
SELECT - col1 + 19 + 39 * + tab1.col1 FROM tab1
----
1007
399
513

query I rowsort
SELECT ALL ( + cor1.col2 ) + - ( 91 ) AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 0c4c739c54317d535b037eaaf802b9ba

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1375
SELECT cor0.col1 DIV col0 - + 15 AS col1 FROM tab0 AS cor0
----
-12
-13
-14

skipif mysql # not compatible
query I rowsort label-1375
SELECT cor0.col1 / col0 - + 15 AS col1 FROM tab0 AS cor0
----
-12
-13
-14

query I rowsort
SELECT DISTINCT - - col1 * ( + cor0.col2 ) + - col1 * + col0 * - col1 FROM tab1 AS cor0
----
14768
3432
6970

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1379
SELECT - + col1 * col0 + + col0 + + CAST( - 78 AS SIGNED ) * - col1 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-106018
-17136
-363480

skipif mysql # not compatible
query I rowsort label-1379
SELECT - + col1 * col0 + + col0 + + CAST ( - 78 AS INTEGER ) * - col1 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-106018
-17136
-363480

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

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

query I rowsort
SELECT DISTINCT + - ( + 25 ) + - col1 * ( - 74 ) FROM tab2 AS cor0
----
1233
2269
4341

query I rowsort
SELECT - ( 94 ) + col2 * 36 FROM tab0 AS cor0
----
-58
1094
2858

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

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

query I rowsort
SELECT DISTINCT + cor0.col0 * + 3 AS col2 FROM tab0 AS cor0
----
105
267
72

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

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

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

query I rowsort
SELECT - 93 * - col1 * - col2 FROM tab0 AS cor0
----
-263934
-693966
-9021

query I rowsort
SELECT - 15 * - col2 FROM tab0 AS cor0
----
1230
15
495

query I rowsort
SELECT + 65 * - col1 AS col1 FROM tab2 AS cor0
----
-1105
-2015
-3835

query I rowsort
SELECT DISTINCT - tab1.col1 + 77 + ( col2 ) AS col2 FROM tab1
----
105
124
160

query I rowsort
SELECT - cor2.col1 + cor1.col2 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 390b964a10ba7b33d73cba8db2c34783

query I rowsort
SELECT ( - cor0.col1 ) AS col2 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT - + col2 * 12 + col2 AS col0 FROM tab2 AS cor0
----
-286
-297
-418

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 60 * - col1 col1 FROM tab2
----
-1020
-1860
-3540

query I rowsort
SELECT + 72 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

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

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

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

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

query I rowsort
SELECT ALL 72 AS col2 FROM tab1, tab2, tab0 AS cor0, tab0
----
81 values hashing to e1618abfe12be6a950cc575d695639b7

query I rowsort
SELECT col2 + col2 + - col2 * tab0.col2 AS col1 FROM tab0
----
-1023
-6560
1

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

query I rowsort
SELECT 90 + col1 AS col0 FROM tab1 AS cor0
----
100
103
116

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

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

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

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

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

query I rowsort
SELECT ALL 59 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT 86 + - col2 * ( col1 ) AS col1 FROM tab2 AS cor0
----
-1448
-560
-751

onlyif mysql # use DIV operator for integer division
query I rowsort label-1411
SELECT DISTINCT col1 + - col0 - - col2 * - cor0.col0 DIV + col0 AS col2 FROM tab1 AS cor0
----
-111
-163
-31

skipif mysql # not compatible
query I rowsort label-1411
SELECT DISTINCT col1 + - col0 - - col2 * - cor0.col0 / + col0 AS col2 FROM tab1 AS cor0
----
-111
-163
-31

query I rowsort
SELECT - - 93 + + col1 AS col1 FROM tab1 AS cor0
----
103
106
119

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( ( - cor1.col0 ) ) col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT + col1 + col0 * col0 AS col1 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT col0 + col2 * col2 * 33 FROM tab1 AS cor0
----
107281
304208
96231

query I rowsort
SELECT 8 * - col1 + - col0 * + cor0.col1 FROM tab0 AS cor0
----
-2752
-4171
-8827

onlyif mysql # use DIV operator for integer division
query I rowsort label-1417
SELECT col2 + - col0 DIV 23 FROM tab0 AS cor0
----
0
32
79

skipif mysql # not compatible
query I rowsort label-1417
SELECT col2 + - col0 / 23 FROM tab0 AS cor0
----
0
32
79

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 - - tab1.col0 col1 FROM tab1
----
185
256
60

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

query I rowsort
SELECT 32 + tab2.col0 AS col2 FROM tab2
----
110
111
39

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

query I rowsort
SELECT col1 * - tab2.col0 * col1 + col1 * col0 * 67 + 60 FROM tab2
----
36876
67210
7872

query I rowsort
SELECT DISTINCT ( + col1 ) + - 11 + 96 FROM tab2
----
102
116
144

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

skipif mysql # not compatible
query I rowsort label-1425
SELECT col1 + + CAST ( + col0 AS INTEGER ) * col2 FROM tab2 AS cor0
----
2087
220
3019

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

query I rowsort
SELECT cor0.col0 + + col0 * col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT col1 * + ( + col2 ) + + col2 * col0 FROM tab1
----
1566
4218
8928

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

query I rowsort
SELECT col0 + + col0 * 45 * - col1 FROM tab2 AS cor0
----
-207012
-60356
-9758

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1431
SELECT DISTINCT col0 * + CAST( cor0.col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-1431
SELECT DISTINCT col0 * + CAST ( cor0.col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + col2 * - 31 + + col2 AS col1 FROM tab1 AS cor0
----
-1620
-1710
-2880

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

query I rowsort
SELECT + col0 * - col2 + + col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + + col0 * + 56 AS col0 FROM tab2 AS cor0
----
392
4368
4424

onlyif mysql # use DIV operator for integer division
query I rowsort label-1436
SELECT + cor0.col1 DIV - col1 + - 8 * - col1 FROM tab1 AS cor0
----
103
207
79

skipif mysql # not compatible
query I rowsort label-1436
SELECT + cor0.col1 / - col1 + - 8 * - col1 FROM tab1 AS cor0
----
103
207
79

query I rowsort
SELECT ALL - - col1 * 7 * 35 AS col1 FROM tab1 AS cor0
----
2450
3185
6370

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * 96 col1 FROM tab1 AS cor0
----
1248
2496
960

query I rowsort
SELECT + 62 * col0 FROM tab2 AS cor0
----
434
4836
4898

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

query I rowsort
SELECT - 4 * col2 FROM tab1 AS cor0
----
-216
-228
-384

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

query I rowsort
SELECT - - col2 * 94 + col0 AS col0 FROM tab1 AS cor0
----
5079
5422
9104

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

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

query I rowsort
SELECT ALL + col0 + + col0 * + col0 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
106176
1526
359034

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

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

query I rowsort
SELECT - - 32 - col0 AS col1 FROM tab2 cor0
----
-46
-47
25

query I rowsort
SELECT - col0 * - col0 * - col0 - - 78 AS col2 FROM tab1 AS cor0
----
-262066
-511922
51

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

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

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

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

query I rowsort
SELECT col1 + + ( 93 ) FROM tab0
----
179
184
190

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

query I rowsort
SELECT DISTINCT tab0.col0 * + 37 FROM tab0
----
1295
3293
888

query I rowsort
SELECT ALL col1 * - 50 AS col2 FROM tab1
----
-1300
-500
-650

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

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

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

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

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

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

query I rowsort
SELECT ALL + 95 + - 52 FROM tab1 AS cor0
----
43
43
43

query I rowsort
SELECT - - 46 * + 38 FROM tab0 AS cor0
----
1748
1748
1748

query I rowsort
SELECT DISTINCT + 99 + - col1 AS col2 FROM tab0 AS cor0
----
13
2
8

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

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

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

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

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

query I rowsort
SELECT 89 AS col2 FROM tab0 AS cor0
----
89
89
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1472
SELECT ALL col0 DIV 3 FROM tab0 AS cor0
----
11
29
8

skipif mysql # not compatible
query I rowsort label-1472
SELECT ALL col0 / 3 FROM tab0 AS cor0
----
11
29
8

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

query I rowsort
SELECT ALL + 93 + + 11 AS col2 FROM tab0 AS cor0
----
104
104
104

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 53 * col0 col1 FROM tab0 AS cor0
----
1272
1855
4717

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

skipif mysql # not compatible
query I rowsort label-1480
SELECT + col2 + + col0 + + CAST ( col1 * - col0 AS INTEGER ) FROM tab0 AS cor0
----
-2007
-3359
-7928

query I rowsort
SELECT + 43 + - col1 FROM tab0 AS cor0
----
-43
-48
-54

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

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

query I rowsort
SELECT DISTINCT + 58 + col2 * col1 AS col2 FROM tab0 AS cor0
----
155
2896
7520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 39 * + col2 col2 FROM tab1 AS cor0
----
2106
2223
3744

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

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

query I rowsort
SELECT - 14 AS col1 FROM tab0
----
-14
-14
-14

query I rowsort
SELECT - - 1 + - col2 * + col1 FROM tab1 AS cor0
----
-1247
-1403
-569

query I rowsort
SELECT DISTINCT + + 72 * + col0 + + col2 * + col2 FROM tab0 AS cor0
----
13132
2521
2817

query I rowsort
SELECT + + 24 + + col1 AS col1 FROM tab0 AS cor0
----
110
115
121

query I rowsort
SELECT ALL - + col2 * + col0 + col1 * 31 + + col1 FROM tab2 cor0
----
-140
-2458
803

query I rowsort
SELECT DISTINCT - 74 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
-67
4
5

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

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

query I rowsort
SELECT - col1 + - col0 * 91 FROM tab2 AS cor0
----
-668
-7157
-7206

query I rowsort
SELECT ALL col2 + + cor0.col1 * + 77 AS col1 FROM tab0 AS cor0
----
6655
7089
7470

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

query I rowsort
SELECT ALL + + ( + col0 ) + - ( - 50 ) FROM tab2 cor0
----
128
129
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-1497
SELECT - col1 + + col2 DIV + 89 FROM tab1 AS cor0
----
-10
-12
-26

skipif mysql # not compatible
query I rowsort label-1497
SELECT - col1 + + col2 / + 89 FROM tab1 AS cor0
----
-10
-12
-26

query I rowsort
SELECT - col1 * ( 79 ) + - col0 + col0 FROM tab0 AS cor0
----
-6794
-7189
-7663

query I rowsort
SELECT ALL - 77 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT ALL + col0 * 23 FROM tab0 AS cor0
----
2047
552
805

query I rowsort
SELECT ALL + col0 + + 32 FROM tab1 AS cor0
----
112
35
96

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1504
SELECT DISTINCT col0 + tab1.col1 + CAST( - 92 AS SIGNED ) col0 FROM tab1
----
-18
-63
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1504
SELECT DISTINCT col0 + tab1.col1 + CAST ( - 92 AS INTEGER ) col0 FROM tab1
----
-18
-63
1

query I rowsort
SELECT + 29 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT 92 * - col1 AS col2 FROM tab0
----
-7912
-8372
-8924

query I rowsort
SELECT ALL col2 * - col2 + col2 * 23 + + col1 FROM tab1
----
-1648
-1928
-6995

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + 26 col0 FROM tab2 AS cor0
----
43
57
85

query I rowsort
SELECT - col1 + + 8 * col0 FROM tab0 cor0
----
106
183
621

query I rowsort
SELECT col2 + 21 AS col2 FROM tab1 AS cor0
----
117
75
78

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

query I rowsort
SELECT cor0.col0 * + col0 + + ( col0 * - col2 ) + - col0 FROM tab2 AS cor0
----
-147
3160
3978

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

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

query I rowsort
SELECT 32 * col0 * - col1 AS col0 FROM tab2
----
-147264
-42976
-6944

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

query I rowsort
SELECT col2 * col1 + - 36 * - tab0.col0 FROM tab0
----
10666
1357
3702

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

query I rowsort
SELECT col1 * + 48 + col0 AS col0 FROM tab2 AS cor0
----
1495
2910
895

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

query I rowsort
SELECT DISTINCT - cor0.col0 * - ( col0 ) + - col2 - 7 FROM tab1 AS cor0
----
-52
4032
6297

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

query I rowsort
SELECT 27 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT - 2 AS col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 20c9213316527d507e26425041e08387

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0, tab2, tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL 67 * col0 + col0 AS col2 FROM tab1
----
204
4352
5440

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1528
SELECT - col2 * col2 * CAST( 32 AS SIGNED ) FROM tab1
----
-103968
-294912
-93312

skipif mysql # not compatible
query I rowsort label-1528
SELECT - col2 * col2 * CAST ( 32 AS INTEGER ) FROM tab1
----
-103968
-294912
-93312

query I rowsort
SELECT ALL - 42 + cor0.col2 FROM tab2 cor0
----
-15
-16
-4

query I rowsort
SELECT - + 96 - cor0.col2 AS col2 FROM tab0 cor0
----
-129
-178
-97

query I rowsort
SELECT 99 * cor0.col0 - - cor0.col1 FROM tab1 AS cor0
----
323
6346
7933

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

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

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

query I rowsort
SELECT - + 12 + - ( + cor0.col2 ) * - 31 FROM tab2 AS cor0
----
1166
794
825

query I rowsort
SELECT - ( - 99 + col1 ) * + 76 FROM tab0
----
152
608
988

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

query I rowsort
SELECT + 75 * col0 + col2 FROM tab0 AS cor0
----
1833
2626
6757

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

skipif mysql # not compatible
query I rowsort label-1539
SELECT + 36 * - ( col0 ) + + CAST ( col0 + col2 AS INTEGER ) * + col0 AS col2 FROM tab0 AS cor0
----
0
12015
504

query I rowsort
SELECT + - 43 + - col2 * + col2 FROM tab1 AS cor0
----
-2959
-3292
-9259

onlyif mysql # use DIV operator for integer division
query I rowsort label-1541
SELECT - 76 DIV 4 FROM tab2 AS cor0
----
-19
-19
-19

skipif mysql # not compatible
query I rowsort label-1541
SELECT - 76 / 4 FROM tab2 AS cor0
----
-19
-19
-19

onlyif mysql # use DIV operator for integer division
query I rowsort label-1542
SELECT + 99 DIV - cor0.col0 + col1 * col1 * + col2 FROM tab1 AS cor0
----
16223
36471
5699

skipif mysql # not compatible
query I rowsort label-1542
SELECT + 99 / - cor0.col0 + col1 * col1 * + col2 FROM tab1 AS cor0
----
16223
36471
5699

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

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

query I rowsort
SELECT col0 + + col0 * col1 AS col2 FROM tab1 AS cor0
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 * col1 col1 FROM tab0 AS cor0
----
4558
4823
5141

query I rowsort
SELECT 56 * cor0.col0 AS col2 FROM tab2 AS cor0
----
392
4368
4424

query I rowsort
SELECT ALL col1 * - 98 AS col0 FROM tab0
----
-8428
-8918
-9506

query I rowsort
SELECT DISTINCT + - ( - cor0.col0 ) * - col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + - col1 + col1 * + 97 FROM tab0 AS cor0
----
8256
8736
9312

query I rowsort
SELECT + + col1 * cor0.col0 * + col0 AS col2 FROM tab2 AS cor0
----
106097
1519
358956

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1552
SELECT cor0.col0 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1552
SELECT cor0.col0 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * 1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT col1 + 8 AS col1 FROM tab1
----
18
21
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-1555
SELECT ALL col0 * ( ( - col1 ) ) DIV ( + 65 ) AS col2 FROM tab0
----
-124
-31
-52

skipif mysql # not compatible
query I rowsort label-1555
SELECT ALL col0 * ( ( - col1 ) ) / ( + 65 ) AS col2 FROM tab0
----
-124
-31
-52

query I rowsort
SELECT col2 + - ( tab0.col1 ) FROM tab0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1557
SELECT ALL + col2 * col1 + - 48 DIV - tab2.col1 FROM tab2
----
1534
648
838

skipif mysql # not compatible
query I rowsort label-1557
SELECT ALL + col2 * col1 + - 48 / - tab2.col1 FROM tab2
----
1534
648
838

query I rowsort
SELECT ( + 14 ) FROM tab2, tab0 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT ALL + tab1.col0 * - tab1.col0 AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT 14 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

query I rowsort
SELECT + 0 - col0 * + col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL col0 * - 44 FROM tab2 AS cor0
----
-308
-3432
-3476

onlyif mysql # use DIV operator for integer division
query I rowsort label-1564
SELECT ALL + CAST( + col2 AS SIGNED ) - + col1 * 15 DIV col2 FROM tab1 cor0
----
47
55
94

skipif mysql # not compatible
query I rowsort label-1564
SELECT ALL + CAST ( + col2 AS INTEGER ) - + col1 * 15 / col2 FROM tab1 cor0
----
47
55
94

query I rowsort
SELECT DISTINCT - ( + col2 ) * col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT col2 - 54 FROM tab2 AS cor0
----
-16
-27
-28

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 + 9 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 512ca9a39dccf5195061f686536a497f

query I rowsort
SELECT DISTINCT - - cor0.col0 + + col2 * col1 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT - 11 * - col2 * tab0.col0 + col0 - - col0 AS col1 FROM tab0
----
455
80456
8760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1570
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-1570
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT col2 * tab1.col0 - - col2 FROM tab1
----
216
3705
7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1572
SELECT DISTINCT + CAST( NULL AS SIGNED ) + 19 AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-1572
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + 19 AS col1 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT col0 + + 63 AS col2 FROM tab1
----
127
143
66

query I rowsort
SELECT - col2 + tab2.col2 * col0 FROM tab2
----
162
2002
2964

query I rowsort
SELECT + 12 + col1 - + col2 * col0 AS col0 FROM tab2
----
-146
-1957
-2973

query I rowsort
SELECT DISTINCT + col0 - - ( - col1 ) AS col0 FROM tab1
----
-23
54
67

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col2 AS REAL ) + col2 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1578
SELECT - CAST( col1 AS SIGNED ) * col1 * + ( + 3 ) - - col0 DIV - 47 FROM tab0 AS cor0
----
-22188
-24844
-28227

skipif mysql # not compatible
query I rowsort label-1578
SELECT - CAST ( col1 AS INTEGER ) * col1 * + ( + 3 ) - - col0 / - 47 FROM tab0 AS cor0
----
-22188
-24844
-28227

query I rowsort
SELECT ( 79 ) + + col2 FROM tab1 AS cor0
----
133
136
175

onlyif mysql # use DIV operator for integer division
query I rowsort label-1580
SELECT - col2 + - 31 DIV + col0 FROM tab2 AS cor0
----
-26
-31
-38

skipif mysql # not compatible
query I rowsort label-1580
SELECT - col2 + - 31 / + col0 FROM tab2 AS cor0
----
-26
-31
-38

query I rowsort
SELECT + ( col2 ) - + col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ( tab2.col2 + col2 ) AS col2 FROM tab2
----
52
54
76

query I rowsort
SELECT DISTINCT + ( - col2 * col0 ) + - ( tab1.col1 ) * col2 AS col1 FROM tab1
----
-1566
-4218
-8928

query I rowsort
SELECT - ( + 71 ) * col2 + col0 FROM tab2
----
-1768
-1910
-2619

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1585
SELECT ( col0 ) * + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1585
SELECT ( col0 ) * + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab0.col2 * + col1 AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL + - col1 * cor0.col1 AS col1 FROM tab1 cor0
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1588
SELECT - col2 * CAST( - col1 AS SIGNED ) FROM tab2 cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-1588
SELECT - col2 * CAST ( - col1 AS INTEGER ) FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT + - col0 + 1 * col0 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col1 + + col0 * cor0.col0 AS col2 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT DISTINCT - col0 * col0 * - col0 FROM tab1 cor0
----
262144
27
512000

query I rowsort
SELECT - col1 * + ( + cor0.col2 ) * cor0.col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT DISTINCT - - col1 * - 3 FROM tab2 AS cor0
----
-177
-51
-93

query I rowsort
SELECT ALL - col0 + + col2 * col1 AS col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT + col2 * + 14 FROM tab1 AS cor0
----
1344
756
798

query I rowsort
SELECT ALL col0 * col2 + cor0.col2 FROM tab2 AS cor0
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + ( + col0 ) - + cor0.col0 col0 FROM tab2 cor0
----
-1422
-224
-4680

query I rowsort
SELECT DISTINCT col0 + + 17 FROM tab0
----
106
41
52

query I rowsort
SELECT ALL - ( col1 ) * col1 * col0 + col2 * col1 AS col2 FROM tab1
----
-12272
-5830
-624

query I rowsort
SELECT + - col2 * col1 * col0 AS col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT - col2 + col2 * col1 FROM tab1
----
1152
1350
513

query I rowsort
SELECT 54 - col2 FROM tab2
----
16
27
28

query I rowsort
SELECT - col0 * + 4 FROM tab1
----
-12
-256
-320

query I rowsort
SELECT ALL - 73 AS col2 FROM tab0 AS cor0
----
-73
-73
-73

query I rowsort
SELECT ALL col1 + + ( col2 ) * + col1 AS col2 FROM tab2
----
1593
663
868

query I rowsort
SELECT ALL - 29 * - ( + col1 ) * + col0 + - col0 AS col0 FROM tab0
----
234782
59832
98420

query I rowsort
SELECT DISTINCT - 68 * - col1 + col0 + + col1 * - col1 FROM tab1 AS cor0
----
1095
644
795

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col1 col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col1 * cor0.col1 FROM tab2 cor0
----
-10982
-25947
-90506

query I rowsort
SELECT ALL 34 + - col0 AS col1 FROM tab2 AS cor0
----
-44
-45
27

query I rowsort
SELECT + ( - col2 ) AS col0 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT - - cor0.col0 + - col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT 76 * col1 FROM tab1 AS cor0
----
1976
760
988

query I rowsort
SELECT + + cor0.col1 * + col1 AS col2 FROM tab1 AS cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col2 col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + + cor0.col0 * col2 AS col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL col2 * - col1 + col2 * + col2 * col0 + + col1 * col2 AS col1 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT DISTINCT + - col2 * col1 - - col2 AS col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT - + ( + col2 ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + col2 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-1621
SELECT + 80 + + cor0.col1 DIV + col1 FROM tab2 AS cor0
----
81
81
81

skipif mysql # not compatible
query I rowsort label-1621
SELECT + 80 + + cor0.col1 / + col1 FROM tab2 AS cor0
----
81
81
81

query I rowsort
SELECT ALL + cor1.col2 AS col2 FROM tab2 cor0 CROSS JOIN tab2, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL col2 - - col2 AS col1 FROM tab2
----
52
54
76

query I rowsort
SELECT + col2 * + 47 * - col1 + - col1 - cor0.col1 AS col2 FROM tab0 AS cor0
----
-133558
-350896
-4753

onlyif mysql # use DIV operator for integer division
query I rowsort label-1625
SELECT - cor0.col0 * + col1 + col0 DIV col2 FROM tab0 cor0
----
-2064
-3360
-8098

skipif mysql # not compatible
query I rowsort label-1625
SELECT - cor0.col0 * + col1 + col0 / col2 FROM tab0 cor0
----
-2064
-3360
-8098

onlyif mysql # use DIV operator for integer division
query I rowsort label-1626
SELECT ALL + - col1 DIV ( col0 ) + - col2 FROM tab0 AS cor0
----
-3
-36
-83

skipif mysql # not compatible
query I rowsort label-1626
SELECT ALL + - col1 / ( col0 ) + - col2 FROM tab0 AS cor0
----
-3
-36
-83

query I rowsort
SELECT ALL + col2 * ( + col0 ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL col0 * ( col1 ) + cor0.col2 AS col2 FROM tab2 cor0
----
1381
244
4628

query I rowsort
SELECT col0 + 35 - col0 AS col2 FROM tab2 AS cor0
----
35
35
35

query I rowsort
SELECT DISTINCT cor0.col2 * + col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL - col0 * col2 + col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT - cor0.col2 * 17 FROM tab1 AS cor0
----
-1632
-918
-969

query I rowsort
SELECT col2 + 46 + col1 FROM tab2 AS cor0
----
101
104
131

onlyif mysql # use DIV operator for integer division
query I rowsort label-1634
SELECT ALL - cor0.col2 DIV + ( - cor0.col1 ) FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-1634
SELECT ALL - cor0.col2 / + ( - cor0.col1 ) FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT col0 * - 86 * col0 AS col0 FROM tab1 AS cor0
----
-352256
-550400
-774

query I rowsort
SELECT + - 72 + - col1 * + col2 * + cor0.col0 FROM tab0 AS cor0
----
-3467
-664190
-68184

query I rowsort
SELECT - col1 + 27 * col0 FROM tab0 AS cor0
----
2312
562
848

query I rowsort
SELECT ALL - col2 * - col1 - - col0 AS col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT 59 AS col2 FROM tab0 AS cor0
----
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1640
SELECT DISTINCT - CAST( NULL AS SIGNED ) / + col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1640
SELECT DISTINCT - CAST ( NULL AS INTEGER ) / + col2 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - col0 col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT + ( 54 ) + col2 - col0 AS col0 FROM tab1 AS cor0
----
105
47
70

query I rowsort
SELECT ALL - ( + 71 ) FROM tab1 AS cor0
----
-71
-71
-71

query I rowsort
SELECT + + ( col1 ) + col2 * cor0.col1 AS col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL - 76 AS col1 FROM tab2 AS cor0
----
-76
-76
-76

query I rowsort
SELECT - col0 * + col2 + - cor0.col1 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT - - cor0.col0 * col2 + + cor0.col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL - + col0 * + col1 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-1649
SELECT - col1 DIV - cor0.col0 AS col0 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-1649
SELECT - col1 / - cor0.col0 AS col0 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT ALL col2 * col2 + cor0.col1 * - cor0.col1 AS col2 FROM tab0 cor0
----
-1557
-6307
-9408

query I rowsort
SELECT ALL + + col0 * - col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT col1 * col0 - - col0 * - col2 AS col0 FROM tab0 AS cor0
----
1272
3360
801

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - + cor0.col1 col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + - col1 - - col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT col0 - col0 * - col1 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT - col2 FROM tab1 cor0 WHERE NOT ( NULL ) NOT IN ( + col2 )
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL NOT BETWEEN col1 + + col1 * col0 AND NULL
----

query I rowsort
SELECT col0 / col1 FROM tab2 WHERE NOT NULL <= col2 * col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1659
SELECT DISTINCT + tab1.col0 + col0 + - col0 DIV col2 FROM tab1
----
127
160
6

skipif mysql # not compatible
query I rowsort label-1659
SELECT DISTINCT + tab1.col0 + col0 + - col0 / col2 FROM tab1
----
127
160
6

query I rowsort
SELECT DISTINCT - + col2 * + col1 * cor0.col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-1661
SELECT DISTINCT cor0.col1 * - col2 + col0 + + col2 DIV col1 col0 FROM tab2 AS cor0
----
-1456
-565
-830

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1661
SELECT DISTINCT cor0.col1 * - col2 + col0 + + col2 / col1 col0 FROM tab2 AS cor0
----
-1456
-565
-830

query I rowsort
SELECT ALL - - col2 * - col2 + col2 AS col0 FROM tab1 AS cor0
----
-2862
-3192
-9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-1663
SELECT - col2 + tab2.col1 * col0 DIV - tab2.col1 AS col0 FROM tab2
----
-104
-117
-34

skipif mysql # not compatible
query I rowsort label-1663
SELECT - col2 + tab2.col1 * col0 / - tab2.col1 AS col0 FROM tab2
----
-104
-117
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col1 col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-1666
SELECT + col0 DIV col0 + col2 * col2 + col0 * col0 AS col1 FROM tab2
----
6761
7686
779

skipif mysql # not compatible
query I rowsort label-1666
SELECT + col0 / col0 + col2 * col2 + col0 * col0 AS col1 FROM tab2
----
6761
7686
779

query I rowsort
SELECT col0 + col1 * - col1 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT DISTINCT col2 * + tab1.col1 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT + col2 + + col2 + - col0 * + col1 FROM tab1 AS cor0
----
-526
-848
30

query I rowsort
SELECT DISTINCT - col1 * - col0 + + col2 FROM tab2 AS cor0
----
1381
244
4628

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0, tab0 AS cor0 WHERE ( NULL ) = NULL
----

query I rowsort
SELECT + 26 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

query I rowsort
SELECT - + 64 * - col1 AS col2 FROM tab0 AS cor0
----
5504
5824
6208

query I rowsort
SELECT + 14 * + col1 FROM tab1
----
140
182
364

query I rowsort
SELECT - col0 * + cor0.col2 - - col0 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT - col0 + col1 * 86 AS col0 FROM tab1
----
1038
2233
796

query I rowsort
SELECT DISTINCT - tab2.col0 - + tab2.col0 FROM tab2
----
-14
-156
-158

query I rowsort
SELECT ALL - col2 * - col2 - col1 AS col0 FROM tab0
----
-96
1003
6633

query I rowsort
SELECT + + col2 * - 4 AS col1 FROM tab0 cor0
----
-132
-328
-4

query I rowsort
SELECT ( 25 ) + col1 AS col0 FROM tab2 AS cor0
----
42
56
84

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab1 cor1, tab0 AS cor2
----
972 values hashing to 9b91cf9fcc064ee1c13074a678b72ac7

query I rowsort
SELECT DISTINCT 80 FROM tab0, tab2 AS cor0
----
80

query I rowsort
SELECT ALL - cor1.col0 FROM tab0, tab1 cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 08e380e50b0cb64601bc84e5254deef4

query I rowsort
SELECT + cor0.col1 + - col1 * - col2 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + - 35 * - col0 AS col0 FROM tab0 AS cor0
----
1225
3115
840

query I rowsort
SELECT - col2 + col2 * - 67 AS col1 FROM tab1 cor0
----
-3672
-3876
-6528

query I rowsort
SELECT ( tab0.col1 ) + - tab0.col2 FROM tab0
----
53
9
96

query I rowsort
SELECT - ( col0 * + col2 ) FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - 48 * + col0 * + col1 AS col0 FROM tab2
----
-10416
-220896
-64464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 48 col1 FROM tab2
----
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-1691
SELECT ALL - col0 DIV - cor0.col0 col0 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1691
SELECT ALL - col0 / - cor0.col0 col0 FROM tab2 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1692
SELECT DISTINCT - col2 DIV - col1 + - col0 AS col0 FROM tab2 AS cor0
----
-7
-77
-78

skipif mysql # not compatible
query I rowsort label-1692
SELECT DISTINCT - col2 / - col1 + - col0 AS col0 FROM tab2 AS cor0
----
-7
-77
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1693
SELECT 4 * col0 + CAST( NULL AS SIGNED ) / tab1.col1 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1693
SELECT 4 * col0 + CAST ( NULL AS INTEGER ) / tab1.col1 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + - 97 * col2 FROM tab0 AS cor0
----
-3201
-7954
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1695
SELECT + col0 * col0 DIV CAST( + col0 + - cor0.col2 AS SIGNED ) AS col1 FROM tab2 cor0
----
-2
117
152

skipif mysql # not compatible
query I rowsort label-1695
SELECT + col0 * col0 / CAST ( + col0 + - cor0.col2 AS INTEGER ) AS col1 FROM tab2 cor0
----
-2
117
152

query I rowsort
SELECT DISTINCT - 56 * cor0.col1 + col2 AS col0 FROM tab0 AS cor0
----
-4783
-5014
-5431

query I rowsort
SELECT DISTINCT - + cor0.col1 * col2 * col1 + + col2 FROM tab0 AS cor0
----
-244035
-678960
-9408

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 + col0 * col1 + ( + col0 ) FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL + col1 + - col0 * - col2 + + col2 AS col0 FROM tab0 AS cor0
----
133
7471
911

query I rowsort
SELECT DISTINCT col1 * 59 AS col0 FROM tab0 cor0
----
5074
5369
5723

query I rowsort
SELECT DISTINCT col2 * - 92 AS col2 FROM tab0 AS cor0
----
-3036
-7544
-92

query I rowsort
SELECT ALL + col1 + - col0 AS col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT - - col2 * ( col2 ) * col0 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT DISTINCT - - cor0.col1 + col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT 60 FROM tab1, tab2, tab1 AS cor0
----
60

query I rowsort
SELECT DISTINCT + 58 FROM tab0
----
58

query I rowsort
SELECT - 27 AS col1 FROM tab0
----
-27
-27
-27

query I rowsort
SELECT 58 - - col1 AS col1 FROM tab2
----
117
75
89

query I rowsort
SELECT 22 AS col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 68 col1 FROM tab0
----
68
68
68

query I rowsort
SELECT DISTINCT + - col0 * + 99 AS col0 FROM tab2 AS cor0
----
-693
-7722
-7821

query I rowsort
SELECT 14 FROM tab1 cor0
----
14
14
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-1714
SELECT ALL - - col2 DIV + col1 + col2 * - 13 + 4 AS col1 FROM tab0 cor0
----
-1062
-425
-9

skipif mysql # not compatible
query I rowsort label-1714
SELECT ALL - - col2 / + col1 + col2 * - 13 + 4 AS col1 FROM tab0 cor0
----
-1062
-425
-9

query I rowsort
SELECT + col0 * - col2 + col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT ALL + - 11 * col0 + col0 AS col2 FROM tab1 AS cor0
----
-30
-640
-800

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( cor0.col1 AS REAL ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - col2 + + col2 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT + 81 AS col2 FROM tab0, tab1 cor0, tab0 cor1
----
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-1720
SELECT ALL - - 62 DIV - col2 FROM tab1 cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-1720
SELECT ALL - - 62 / - col2 FROM tab1 cor0
----
-1
-1
0

query I rowsort
SELECT DISTINCT - cor0.col2 * - col2 * - cor0.col0 AS col0 FROM tab1 AS cor0
----
-207936
-737280
-8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 col2 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-1723
SELECT DISTINCT + ( - col2 ) DIV - col1 FROM tab2 cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-1723
SELECT DISTINCT + ( - col2 ) / - col1 FROM tab2 cor0
----
0
2

query I rowsort
SELECT - 46 * - 48 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to 9536deed3f96cbaa8a9ab85cd2567b71

query I rowsort
SELECT - col2 * + 45 FROM tab1
----
-2430
-2565
-4320

query I rowsort
SELECT DISTINCT + col1 * col2 * col2 FROM tab2
----
22599
24548
39884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1727
SELECT - tab1.col1 * CAST( col1 AS SIGNED ) AS col0 FROM tab1
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort label-1727
SELECT - tab1.col1 * CAST ( col1 AS INTEGER ) AS col0 FROM tab1
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - 69 col1 FROM tab0 AS cor0
----
-1656
-2415
-6141

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + tab2.col0 * - tab2.col2 col0 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT 1 * 23 + col1 FROM tab1 cor0
----
33
36
49

query I rowsort
SELECT - col2 * + col2 + col1 FROM tab2 AS cor0
----
-1427
-617
-698

onlyif mysql # use DIV operator for integer division
query I rowsort label-1732
SELECT col2 DIV 42 - cor0.col0 DIV + col1 col0 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1732
SELECT col2 / 42 - cor0.col0 / + col1 col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT ALL + col1 * 48 AS col0 FROM tab0 AS cor0
----
4128
4368
4656

query I rowsort
SELECT DISTINCT + cor1.col1 * + 80 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
6880
7280
7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1735
SELECT - CAST( NULL AS SIGNED ) + - 84 / col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1735
SELECT - CAST ( NULL AS INTEGER ) + - 84 / col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - ( + col0 ) + col2 * + ( col1 ) FROM tab0 AS cor0
----
2814
62
7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-1737
SELECT - - 88 DIV cor0.col2 FROM tab0 AS cor0
----
1
2
88

skipif mysql # not compatible
query I rowsort label-1737
SELECT - - 88 / cor0.col2 FROM tab0 AS cor0
----
1
2
88

query I rowsort
SELECT ALL 21 + tab0.col0 + - tab0.col1 FROM tab0
----
-41
-41
19

query I rowsort
SELECT - 27 * + col0 + col2 FROM tab0
----
-2321
-615
-944

query I rowsort
SELECT + col2 * col0 + - col0 * col1 FROM tab1
----
3008
6640
84

query I rowsort
SELECT cor0.col1 * 15 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ac680aff82caf7343f960fd6256b27a2

query I rowsort
SELECT DISTINCT + col1 + + col2 AS col2 FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col2 col1 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT - 24 + - 69 * col0 FROM tab0
----
-1680
-2439
-6165

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 5 col1 FROM tab0
----
5
5
5

query I rowsort
SELECT 76 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT ALL col2 + - 11 AS col1 FROM tab2 AS cor0
----
15
16
27

query I rowsort
SELECT ALL + col1 + - col1 - + col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - - col1 * + col0 - + col1 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT - - cor0.col2 + + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT col0 * + col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + col1 + ( col1 ) * + col1 AS col2 FROM tab2 cor0
----
306
3540
992

query I rowsort
SELECT + ( - col0 ) AS col0 FROM tab1
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1754
SELECT ALL - col2 + col1 DIV - col1 AS col2 FROM tab2
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-1754
SELECT ALL - col2 + col1 / - col1 AS col2 FROM tab2
----
-27
-28
-39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT DISTINCT cor0.col1 * col2 + col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT - col1 + 81 * col2 FROM tab0 AS cor0
----
-16
2587
6551

query I rowsort
SELECT - col2 * 21 + 98 AS col2 FROM tab1 AS cor0
----
-1036
-1099
-1918

query I rowsort
SELECT DISTINCT + - col1 + cor0.col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + - col0 + - col1 AS col2 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-1761
SELECT DISTINCT - col1 DIV col0 + - col0 * - cor0.col2 col0 FROM tab0 AS cor0
----
33
7297
789

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1761
SELECT DISTINCT - col1 / col0 + - col0 * - cor0.col2 col0 FROM tab0 AS cor0
----
33
7297
789

query I rowsort
SELECT ALL col2 - - ( - cor0.col0 ) * col1 AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT col2 * 48 AS col0 FROM tab2 AS cor0
----
1248
1296
1824

query I rowsort
SELECT - col1 + - ( - cor0.col1 ) AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL col0 + - col1 * + col2 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL - + col1 + - ( col1 * col2 ) AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT - - col2 * + col1 + 10 * col0 AS col1 FROM tab2 AS cor0
----
1436
2314
907

query I rowsort
SELECT ALL col2 + + 22 FROM tab1 cor0
----
118
76
79

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0, tab0 AS cor1, tab1 cor2
----
972 values hashing to 88213a0de4c0a44aaefe8bbffbcaf44a

query I rowsort
SELECT ALL ( - 81 ) AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

query I rowsort
SELECT ALL - 84 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

query I rowsort
SELECT ALL - col2 * 96 * - col2 AS col2 FROM tab2
----
138624
64896
69984

query I rowsort
SELECT - cor0.col0 + - col2 AS col0 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT + + 51 - + 62 FROM tab0 AS cor0
----
-11
-11
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 55 * - ( - col0 ) + 39 * col1 col1 FROM tab2 AS cor0
----
1594
5008
6591

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 col2 FROM tab2, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL + 79 * tab2.col2 AS col1 FROM tab2
----
2054
2133
3002

query I rowsort
SELECT - ( col1 ) - - col0 * 79 FROM tab2 AS cor0
----
522
6103
6224

query I rowsort
SELECT - 51 + + col1 AS col0 FROM tab1 AS cor0
----
-25
-38
-41

query I rowsort
SELECT - - ( + col0 ) + col0 * ( - col2 ) AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1782
SELECT CAST( 5 AS SIGNED ) FROM tab1 AS cor0
----
5
5
5

skipif mysql # not compatible
query I rowsort label-1782
SELECT CAST ( 5 AS INTEGER ) FROM tab1 AS cor0
----
5
5
5

query I rowsort
SELECT DISTINCT 90 + col1 FROM tab2 AS cor0
----
107
121
149

query I rowsort
SELECT + ( - 65 ) FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

onlyif mysql # use DIV operator for integer division
query I rowsort label-1785
SELECT - col2 + + col2 + - ( 55 ) DIV + col0 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-1785
SELECT - col2 + + col2 + - ( 55 ) / + col0 FROM tab0 AS cor0
----
-1
-2
0

query I rowsort
SELECT - 59 * col1 * ( cor0.col0 ) + + col1 * ( col2 * - col0 ) FROM tab2 cor0
----
-130271
-18662
-391170

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - col2 + col1 * ( - col1 * col1 ) FROM tab1 AS cor0
----
-1057
-17630
-2293

query I rowsort
SELECT ALL - 33 AS col0 FROM tab0 AS cor0
----
-33
-33
-33

query I rowsort
SELECT ALL - + col2 * + col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT 71 FROM tab1 cor0
----
71

query I rowsort
SELECT DISTINCT - col1 + 51 AS col1 FROM tab2 AS cor0
----
-8
20
34

query I rowsort
SELECT - col0 + - col2 * - col1 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT col1 * ( + 40 ) FROM tab0 AS cor0
----
3440
3640
3880

onlyif mysql # use DIV operator for integer division
query I rowsort label-1795
SELECT DISTINCT col1 * col2 DIV + ( col0 ) FROM tab0
----
118
2
83

skipif mysql # not compatible
query I rowsort label-1795
SELECT DISTINCT col1 * col2 / + ( col0 ) FROM tab0
----
118
2
83

query I rowsort
SELECT 16 * + col1 * + 34 FROM tab1
----
14144
5440
7072

query I rowsort
SELECT DISTINCT - col2 * col2 AS col1 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + + col1 + col2 * - col2 AS col2 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT + 66 + cor0.col1 FROM tab2 AS cor0
----
125
83
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1800
SELECT DISTINCT - CAST( col1 AS SIGNED ) FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-1800
SELECT DISTINCT - CAST ( col1 AS INTEGER ) FROM tab2
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1801
SELECT DISTINCT - CAST( 76 AS SIGNED ) FROM tab1
----
-76

skipif mysql # not compatible
query I rowsort label-1801
SELECT DISTINCT - CAST ( 76 AS INTEGER ) FROM tab1
----
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 + col2 ) col2 FROM tab0
----
119
173
98

query I rowsort
SELECT col2 + col1 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT col0 * col0 + cor0.col1 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT ALL col1 * - tab2.col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT col0 * - 22 AS col2 FROM tab0
----
-1958
-528
-770

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab1 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 1c1b1a313871216b88e662d7d3078b12

onlyif mysql # use DIV operator for integer division
query I rowsort label-1808
SELECT DISTINCT + col1 + col0 DIV + col1 AS col1 FROM tab2 AS cor0
----
21
31
60

skipif mysql # not compatible
query I rowsort label-1808
SELECT DISTINCT + col1 + col0 / + col1 AS col1 FROM tab2 AS cor0
----
21
31
60

query I rowsort
SELECT ALL + ( + 80 ) AS col1 FROM tab0 AS cor0
----
80
80
80

query I rowsort
SELECT + - 58 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to de0811e670e75d2aeeb657e32bddb0c0

query I rowsort
SELECT ALL + col2 + 51 FROM tab0
----
133
52
84

query I rowsort
SELECT ALL + ( tab2.col1 ) AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT ( col1 ) + col2 FROM tab2
----
55
58
85

query I rowsort
SELECT - col1 * + col1 AS col1 FROM tab2 cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 47 * - col0 col1 FROM tab1
----
141
3008
3760

query I rowsort
SELECT col1 + - 72 * col1 FROM tab1
----
-1846
-710
-923

query I rowsort
SELECT - tab1.col1 FROM tab1, tab1 cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT - - col2 * 30 + col0 AS col0 FROM tab1 AS cor0
----
1623
1774
2960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1819
SELECT DISTINCT - CAST( NULL AS SIGNED ) * 93 + col1 AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1819
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * 93 + col1 AS col2 FROM tab0 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1820
SELECT - ( - ( + col2 ) ) + + col2 DIV 33 AS col0 FROM tab2 cor0
----
26
27
39

skipif mysql # not compatible
query I rowsort label-1820
SELECT - ( - ( + col2 ) ) + + col2 / 33 AS col0 FROM tab2 cor0
----
26
27
39

query I rowsort
SELECT ALL ( - cor0.col2 ) * - col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + 78 * 84 + - cor0.col1 * + col0 FROM tab1 AS cor0
----
5512
5912
6474

onlyif mysql # use DIV operator for integer division
query I rowsort label-1824
SELECT DISTINCT - 95 DIV 60 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-1824
SELECT DISTINCT - 95 / 60 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT + tab0.col0 * 40 + tab0.col2 FROM tab0
----
1401
3642
993

query I rowsort
SELECT - - ( col0 ) + - col0 * + 58 FROM tab2 cor0
----
-399
-4446
-4503

onlyif mysql # use DIV operator for integer division
query I rowsort label-1827
SELECT DISTINCT + 89 + + col0 DIV - ( cor0.col1 ) FROM tab1 AS cor0
----
83
89

skipif mysql # not compatible
query I rowsort label-1827
SELECT DISTINCT + 89 + + col0 / - ( cor0.col1 ) FROM tab1 AS cor0
----
83
89

query I rowsort
SELECT DISTINCT col2 + + col0 * + 19 AS col1 FROM tab2 cor0
----
1508
1539
160

query I rowsort
SELECT - col0 * - col0 + col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT DISTINCT - 86 * - col2 AS col2 FROM tab0
----
2838
7052
86

query I rowsort
SELECT - - cor0.col2 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - cor0.col2 * - col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL + 62 * + col1 FROM tab2
----
1054
1922
3658

query I rowsort
SELECT - + col2 + + col2 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col1 + + 8 FROM tab0, tab1 AS cor0
----
9 values hashing to 55d5095749018f0d23567c1211b97c22

query I rowsort
SELECT ALL - col2 * col0 * + col2 + + 97 FROM tab1 AS cor0
----
-207839
-737183
-8651

query I rowsort
SELECT col1 * col0 + + 3 FROM tab1 AS cor0
----
1043
643
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-1838
SELECT - - col1 + 98 - + col0 DIV + col1 AS col0 FROM tab2 cor0
----
111
129
156

skipif mysql # not compatible
query I rowsort label-1838
SELECT - - col1 + 98 - + col0 / + col1 AS col0 FROM tab2 cor0
----
111
129
156

query I rowsort
SELECT DISTINCT + col1 + 78 * + tab0.col1 + col0 FROM tab0
----
6818
7278
7698

query I rowsort
SELECT col0 * tab1.col2 - - tab1.col1 AS col1 FROM tab1
----
188
3658
7693

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1841
SELECT tab2.col0 + - CAST( col0 AS SIGNED ) + - tab2.col1 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-1841
SELECT tab2.col0 + - CAST ( col0 AS INTEGER ) + - tab2.col1 FROM tab2
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-1842
SELECT DISTINCT col0 + - 22 DIV col0 AS col0 FROM tab2
----
4
78
79

skipif mysql # not compatible
query I rowsort label-1842
SELECT DISTINCT col0 + - 22 / col0 AS col0 FROM tab2
----
4
78
79

query I rowsort
SELECT ALL + 15 FROM tab0, tab2 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT ALL - + col2 * col0 + - col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT ALL + + col1 + 0 * - cor0.col1 * - col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1846
SELECT + cor0.col0 * CAST( NULL AS SIGNED ) + col0 * + col1 - + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1846
SELECT + cor0.col0 * CAST ( NULL AS INTEGER ) + col0 * + col1 - + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * col1 + col0 AS col1 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT col2 + - col1 * - col1 - - col0 FROM tab1 AS cor0
----
221
345
733

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1849
SELECT - + CAST( NULL AS SIGNED ) + 67 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1849
SELECT - + CAST ( NULL AS INTEGER ) + 67 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 20 + col0 + - col0 AS col0 FROM tab1 AS cor0
----
20

query I rowsort
SELECT ALL - col1 + + ( col0 ) * col1 * - col2 FROM tab1 cor0
----
-36490
-4238
-99853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col1 ) + - col0 col2 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT + col2 * col0 + + col2 AS col1 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT - + 91 AS col1 FROM tab2 AS cor0
----
-91

query I rowsort
SELECT + + ( 10 ) * col1 FROM tab1 AS cor0
----
100
130
260

query I rowsort
SELECT ALL col1 * 99 FROM tab2
----
1683
3069
5841

query I rowsort
SELECT DISTINCT col1 + - 26 * col0 AS col0 FROM tab2 AS cor0
----
-151
-1969
-2037

onlyif mysql # use DIV operator for integer division
query I rowsort label-1858
SELECT DISTINCT - col0 DIV + cor0.col0 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-1858
SELECT DISTINCT - col0 / + cor0.col0 FROM tab1 AS cor0
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1859
SELECT ALL + CAST( NULL AS SIGNED ) + + col0 * col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1859
SELECT ALL + CAST ( NULL AS INTEGER ) + + col0 * col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 99 - - cor1.col0 * - ( - tab0.col1 ) FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 91d2fab27f1c83f3e52cef9282e06794

query I rowsort
SELECT DISTINCT tab2.col2 * + 81 + + col1 AS col0 FROM tab2
----
2165
2218
3095

query I rowsort
SELECT - col1 * + 28 FROM tab2
----
-1652
-476
-868

query I rowsort
SELECT ALL + + 99 * + col0 AS col1 FROM tab2 AS cor0
----
693
7722
7821

query I rowsort
SELECT ALL - - col1 + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT 40 * - col2 AS col1 FROM tab1 AS cor0
----
-2160
-2280
-3840

query I rowsort
SELECT + ( col1 ) * 8 + + col1 AS col1 FROM tab0
----
774
819
873

query I rowsort
SELECT ALL + cor1.col1 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1, tab1, tab0 AS cor2
----
243 values hashing to de2705ff0bb8b4f714dafb07497c6119

query I rowsort
SELECT + col1 * col0 + col2 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT + 22 AS col2 FROM tab0 AS cor0
----
22

onlyif mysql # use DIV operator for integer division
query I rowsort label-1870
SELECT + col1 * col2 DIV - ( - 46 ) FROM tab0 AS cor0
----
162
2
61

skipif mysql # not compatible
query I rowsort label-1870
SELECT + col1 * col2 / - ( - 46 ) FROM tab0 AS cor0
----
162
2
61

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab2 cor1, tab1, tab0 AS cor2
----
3645 values hashing to b225d3765f33551c12574f545c8c91eb

query I rowsort
SELECT DISTINCT + cor0.col1 + col2 AS col0 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1873
SELECT col0 + col0 DIV col1 FROM tab1 AS cor0
----
3
70
86

skipif mysql # not compatible
query I rowsort label-1873
SELECT col0 + col0 / col1 FROM tab1 AS cor0
----
3
70
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-1874
SELECT DISTINCT col1 DIV col1 - + col1 AS col2 FROM tab2
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-1874
SELECT DISTINCT col1 / col1 - + col1 AS col2 FROM tab2
----
-16
-30
-58

query I rowsort
SELECT - + col2 - cor0.col2 AS col1 FROM tab1 AS cor0
----
-108
-114
-192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1876
SELECT ALL - - col0 + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1876
SELECT ALL - - col0 + CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col2 * - col0 + - 55 * col1 FROM tab1 AS cor0
----
-1592
-4198
-8395

query I rowsort
SELECT + col0 + - col1 - col1 FROM tab1 AS cor0
----
-49
44
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 + + col2 col1 FROM tab1
----
28
47
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1880
SELECT ALL col1 + + col1 * 66 + ( + col2 + - CAST( col2 AS SIGNED ) ) col1 FROM tab0
----
5762
6097
6499

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1880
SELECT ALL col1 + + col1 * 66 + ( + col2 + - CAST ( col2 AS INTEGER ) ) col1 FROM tab0
----
5762
6097
6499

onlyif mysql # use DIV operator for integer division
query I rowsort label-1881
SELECT col0 * col1 DIV - ( + tab1.col1 ) AS col0 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-1881
SELECT col0 * col1 / - ( + tab1.col1 ) AS col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ( + col0 * ( col2 ) ) - col2 * - col1 FROM tab0
----
132
14760
3630

onlyif mysql # use DIV operator for integer division
query I rowsort label-1883
SELECT + col0 + - col0 DIV + col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-1883
SELECT + col0 + - col0 / + col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + ( + cor0.col1 ) * - col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - + ( + col1 ) + - col2 + ( + col2 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - ( - 17 ) FROM tab0 AS cor0
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + col0 col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL 20 + 3 * col1 FROM tab2 AS cor0
----
113
197
71

query I rowsort
SELECT DISTINCT - 7 * - col2 - - col0 FROM tab0 AS cor0
----
255
42
663

query I rowsort
SELECT - + ( col1 ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - col2 + - 71 AS col2 FROM tab2 AS cor0
----
-109
-97
-98

query I rowsort
SELECT DISTINCT - col2 + col0 * col1 FROM tab1
----
24
583
944

query I rowsort
SELECT + + col2 + - 35 FROM tab2 AS cor0
----
-8
-9
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col1 col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT - cor0.col1 + - col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT + - 61 FROM tab0 AS cor0
----
-61
-61
-61

query I rowsort
SELECT DISTINCT + col2 + - 86 AS col1 FROM tab1
----
-29
-32
10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1898
SELECT ALL - col1 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1898
SELECT ALL - col1 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 + + 57 * col1 FROM tab0 AS cor0
----
4816
5096
5432

query I rowsort
SELECT ALL ( col0 ) * + col2 + + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + - 73 + + col0 * - col1 AS col0 FROM tab1 cor0
----
-1113
-151
-713

onlyif mysql # use DIV operator for integer division
query I rowsort label-1902
SELECT CAST( + col1 AS SIGNED ) DIV + col2 + col1 * col0 FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-1902
SELECT CAST ( + col1 AS INTEGER ) / + col2 + col1 * col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT - 39 FROM tab2 cor0
----
-39
-39
-39

query I rowsort
SELECT ALL + tab0.col0 * + ( col2 ) FROM tab0
----
35
7298
792

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab0, tab2 cor1
----
972 values hashing to e486ce227b61d9db6f8414f9d6361094

query I rowsort
SELECT DISTINCT + 80 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
80

query I rowsort
SELECT + - 99 * + col1 AS col2 FROM tab0 AS cor0
----
-8514
-9009
-9603

query I rowsort
SELECT ALL ( + col1 ) * - ( col2 ) + col2 + 93 FROM tab2 cor0
----
-1415
-515
-717

query I rowsort
SELECT DISTINCT - col1 * + col2 + + 59 AS col1 FROM tab2 AS cor0
----
-1475
-587
-778

query I rowsort
SELECT - cor0.col1 + col2 * cor0.col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT + + col2 + + cor0.col1 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1912
SELECT DISTINCT + col2 * + col1 + - CAST( NULL AS SIGNED ) * - col1 / + cor0.col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1912
SELECT DISTINCT + col2 * + col1 + - CAST ( NULL AS INTEGER ) * - col1 / + cor0.col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col0 * col2 * col0 + - col2 FROM tab0
----
1224
18975
649440

query I rowsort
SELECT tab1.col1 + col1 AS col0 FROM tab1
----
20
26
52

query I rowsort
SELECT col1 * 42 FROM tab0
----
3612
3822
4074

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to a05c004695d644bdc7d07542d29e2010

query I rowsort
SELECT + col1 * 23 * col2 + col2 AS col1 FROM tab0 AS cor0
----
171708
2232
65307

query I rowsort
SELECT col1 + + 99 * col0 AS col1 FROM tab1 AS cor0
----
323
6346
7933

query I rowsort
SELECT DISTINCT + col1 + ( - cor0.col2 ) FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 col1 FROM tab2 cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1921
SELECT ALL - col1 DIV 33 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1921
SELECT ALL - col1 / 33 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 35 - - cor0.col0 * + 5 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 73e417d90fe4f6d67af62b4912a06f34

query I rowsort
SELECT DISTINCT tab0.col1 * - 44 AS col2 FROM tab0
----
-3784
-4004
-4268

query I rowsort
SELECT DISTINCT cor0.col1 * + 32 FROM tab1 AS cor0
----
320
416
832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1925
SELECT DISTINCT + + CAST( 33 AS SIGNED ) + - col2 * col0 * + col2 AS col2 FROM tab2 AS cor0
----
-114043
-5070
-52695

skipif mysql # not compatible
query I rowsort label-1925
SELECT DISTINCT + + CAST ( 33 AS INTEGER ) + - col2 * col0 * + col2 AS col2 FROM tab2 AS cor0
----
-114043
-5070
-52695

query I rowsort
SELECT - ( col1 ) + - col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT + tab2.col2 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
26
27
38

query I rowsort
SELECT 11 FROM tab2, tab0 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT col1 + + col2 * col2 FROM tab2 AS cor0
----
1461
735
760

onlyif mysql # use DIV operator for integer division
query I rowsort label-1930
SELECT - + cor0.col0 DIV - cor0.col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-1930
SELECT - + cor0.col0 / - cor0.col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT + col1 * 52 + ( col2 ) + - cor0.col0 * + 52 FROM tab2 AS cor0
----
-3186
-962
1275

query I rowsort
SELECT + col2 * + ( + col0 ) AS col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-1933
SELECT DISTINCT col2 DIV - col0 + col2 DIV + col1 AS col2 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-1933
SELECT DISTINCT col2 / - col0 + col2 / + col1 AS col2 FROM tab0
----
-1
0

query I rowsort
SELECT + col2 + cor0.col2 AS col2 FROM tab2 cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-1935
SELECT ALL + + cor0.col1 + + ( - col1 ) DIV + col0 AS col0 FROM tab1 AS cor0
----
10
13
18

skipif mysql # not compatible
query I rowsort label-1935
SELECT ALL + + cor0.col1 + + ( - col1 ) / + col0 AS col0 FROM tab1 AS cor0
----
10
13
18

query I rowsort
SELECT cor0.col2 * 86 AS col2 FROM tab1 AS cor0
----
4644
4902
8256

onlyif mysql # use DIV operator for integer division
query I rowsort label-1937
SELECT - cor0.col1 DIV ( - col1 ) + cor0.col1 + - CAST( ( - col1 ) AS SIGNED ) AS col0 FROM tab2 AS cor0
----
119
35
63

skipif mysql # not compatible
query I rowsort label-1937
SELECT - cor0.col1 / ( - col1 ) + cor0.col1 + - CAST ( ( - col1 ) AS INTEGER ) AS col0 FROM tab2 AS cor0
----
119
35
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col0 col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1939
SELECT ALL - cor0.col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1939
SELECT ALL - cor0.col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - cor0.col1 * + cor0.col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + + 3 AS col0 FROM tab1 AS cor0
----
3
3
3

query I rowsort
SELECT DISTINCT + col0 + - 67 AS col2 FROM tab0 AS cor0
----
-32
-43
22

query I rowsort
SELECT + col2 + + ( 5 ) * + tab2.col2 FROM tab2
----
156
162
228

query I rowsort
SELECT cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT DISTINCT 68 * - cor0.col1 AS col1 FROM tab1, tab1 cor0
----
-1768
-680
-884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1946
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-1946
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + 91 AS col2 FROM tab2 AS cor0
----
91
91
91

query I rowsort
SELECT 36 * + 19 FROM tab1
----
684
684
684

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1949
SELECT CAST( NULL AS DECIMAL ) * 18 * col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1949
SELECT CAST ( NULL AS REAL ) * 18 * col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 * + col2 col0 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT col1 * + ( + col0 + + col2 ) AS col1 FROM tab0
----
15561
3492
4902

query I rowsort
SELECT DISTINCT - 46 AS col1 FROM tab1
----
-46

query I rowsort
SELECT - - col1 + - col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-1954
SELECT ALL 50 DIV - ( + cor0.col2 ) FROM tab1, tab1 cor0, tab2 cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-1954
SELECT ALL 50 / - ( + cor0.col2 ) FROM tab1, tab1 cor0, tab2 cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT + col1 + + col0 - col2 FROM tab0
----
131
77
98

query I rowsort
SELECT DISTINCT + 46 + + col1 AS col0 FROM tab1
----
56
59
72

query I rowsort
SELECT + col2 * col2 + 85 AS col0 FROM tab0
----
1174
6809
86

query I rowsort
SELECT ALL + - col1 * - col2 * + 17 FROM tab1 AS cor0
----
21216
23868
9690

query I rowsort
SELECT - 68 + - 59 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 79c908460abee25181b50da08dd87a21

query I rowsort
SELECT ALL col1 + - 26 AS col1 FROM tab2
----
-9
33
5

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ALL - col0 * col0 + tab2.col2 FROM tab2
----
-22
-6058
-6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-1963
SELECT - col0 - - ( col1 + col1 ) DIV tab2.col0 AS col0 FROM tab2
----
-77
-79
1

skipif mysql # not compatible
query I rowsort label-1963
SELECT - col0 - - ( col1 + col1 ) / tab2.col0 AS col0 FROM tab2
----
-77
-79
1

query I rowsort
SELECT ALL col0 - col2 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - col0 * 63 * col1 + - col2 * + col1 AS col2 FROM tab2 AS cor0
----
-14508
-291460
-85255

query I rowsort
SELECT 2 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

onlyif mysql # use DIV operator for integer division
query I rowsort label-1967
SELECT ALL + col1 DIV 4 AS col1 FROM tab0 AS cor0
----
21
22
24

skipif mysql # not compatible
query I rowsort label-1967
SELECT ALL + col1 / 4 AS col1 FROM tab0 AS cor0
----
21
22
24

query I rowsort
SELECT + + cor0.col1 + + col2 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + ( + col1 ) + + col0 AS col0 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL - 21 * - col1 FROM tab1
----
210
273
546

query I rowsort
SELECT - tab1.col2 + + 22 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to da36800a23621460a8f1fc0b62de0338

onlyif mysql # use DIV operator for integer division
query I rowsort label-1972
SELECT - - ( cor0.col0 ) DIV col1 AS col0 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-1972
SELECT - - ( cor0.col0 ) / col1 AS col0 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT DISTINCT ( - cor2.col1 ) AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab2 AS cor2
----
-17
-31
-59

query I rowsort
SELECT 91 + col2 * col0 * - ( - col1 ) AS col0 FROM tab0 cor0
----
3486
664209
68203

query I rowsort
SELECT + 53 + col0 * col0 AS col1 FROM tab0 cor0
----
1278
629
7974

query I rowsort
SELECT ALL + + 86 * col2 + + col0 FROM tab2 cor0
----
2314
2329
3347

query I rowsort
SELECT DISTINCT + - 73 AS col0 FROM tab1 AS cor0
----
-73

query I rowsort
SELECT DISTINCT + col0 - - cor0.col2 AS col2 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col1 + ( col2 * cor0.col2 ) + ( - col1 * - col0 ) col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - cor0.col0 - - cor0.col0 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - 26 * col2 + 22 FROM tab1 AS cor0
----
-1382
-1460
-2474

onlyif mysql # use DIV operator for integer division
query I rowsort label-1982
SELECT + + col2 - + col0 DIV col0 AS col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-1982
SELECT + + col2 - + col0 / col0 AS col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT + + cor0.col2 - - col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT 73 + 7 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT + 39 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

query I rowsort
SELECT ALL - 92 * + col1 FROM tab0 AS cor0
----
-7912
-8372
-8924

query I rowsort
SELECT - 25 * col0 + + 32 + - col2 AS col0 FROM tab0 cor0
----
-2275
-601
-844

query I rowsort
SELECT ALL 54 * + col0 FROM tab2 AS cor0
----
378
4212
4266

onlyif mysql # use DIV operator for integer division
query I rowsort label-1989
SELECT col2 DIV cor0.col2 + + col2 * - cor0.col0 FROM tab1 AS cor0
----
-161
-3647
-7679

skipif mysql # not compatible
query I rowsort label-1989
SELECT col2 / cor0.col2 + + col2 * - cor0.col0 FROM tab1 AS cor0
----
-161
-3647
-7679

query I rowsort
SELECT DISTINCT + col1 * - col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT col1 + - 26 FROM tab2
----
-9
33
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * 64 col2 FROM tab1
----
1664
640
832

query I rowsort
SELECT DISTINCT + col2 * - col1 + - cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
-14924
-194
-5676

query I rowsort
SELECT - col0 + + 63 FROM tab0 AS cor0
----
-26
28
39

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 65 col2 FROM tab1
----
65
65
65

query I rowsort
SELECT ALL ( + col2 ) + col0 * col0 * + col1 AS col1 FROM tab0 AS cor0
----
118826
49569
720893

query I rowsort
SELECT 75 + 56 FROM tab1 AS cor0
----
131
131
131

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1999
SELECT ALL - CAST( - col1 AS SIGNED ) + cor0.col1 * col1 FROM tab2 AS cor0
----
306
3540
992

skipif mysql # not compatible
query I rowsort label-1999
SELECT ALL - CAST ( - col1 AS INTEGER ) + cor0.col1 * col1 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT DISTINCT 79 * + cor0.col1 AS col0 FROM tab0, tab1 AS cor0
----
1027
2054
790

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT 70 + + col2 FROM tab1 cor0
----
124
127
166

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col2 ) * - col1 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - - ( cor0.col1 ) * cor0.col1 + col0 FROM tab0 AS cor0
----
7420
8370
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 87 * - col2 + - col0 col2 FROM tab0 AS cor0
----
-122
-2895
-7223

query I rowsort
SELECT ALL + + col2 + - cor0.col0 + - col0 AS col0 FROM tab0 cor0
----
-15
-69
-96

query I rowsort
SELECT DISTINCT - 99 FROM tab2, tab2 AS cor0
----
-99

query I rowsort
SELECT - 51 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 08d3853e39924d3c636260a6dd856837

query I rowsort
SELECT ALL - + col2 - - col1 * + col2 AS col0 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT - - col0 * + col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - 25 + col2 * col0 * + 90 FROM tab2
----
16985
182495
270155

query I rowsort
SELECT ALL 41 * col1 + col1 AS col1 FROM tab1
----
1092
420
546

query I rowsort
SELECT ALL + col0 * + col1 * col1 FROM tab2 AS cor0
----
22831
271518
6727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 72 * col0 col2 FROM tab1 cor0
----
-216
-4608
-5760

query I rowsort
SELECT - + col2 + col0 * + col2 AS col0 FROM tab0 AS cor0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-2016
SELECT ALL + 61 DIV col1 AS col2 FROM tab2 AS cor0
----
1
1
3

skipif mysql # not compatible
query I rowsort label-2016
SELECT ALL + 61 / col1 AS col2 FROM tab2 AS cor0
----
1
1
3

query I rowsort
SELECT ALL col1 * + ( col2 ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + + col2 * col0 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT - + col1 * - ( - ( + col1 ) * - col1 ) AS col1 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT - col1 * 65 FROM tab2 AS cor0
----
-1105
-2015
-3835

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col2 * + ( col0 ) AS col1 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-2022
SELECT ALL + col1 * cor0.col0 DIV ( - col1 ) FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-2022
SELECT ALL + col1 * cor0.col0 / ( - col1 ) FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2023
SELECT col1 * CAST( NULL AS DECIMAL ) 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-2023
SELECT col1 * CAST ( NULL AS REAL ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 + col0 * - cor0.col1 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT 27 + col0 FROM tab1
----
107
30
91

query I rowsort
SELECT DISTINCT + 6 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
6

query I rowsort
SELECT 27 * col0 FROM tab2
----
189
2106
2133

query I rowsort
SELECT DISTINCT col2 + col0 * + 34 AS col0 FROM tab0
----
1191
3108
849

onlyif mysql # use DIV operator for integer division
query I rowsort label-2029
SELECT DISTINCT col2 DIV + col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-2029
SELECT DISTINCT col2 / + col1 FROM tab0
----
0

query I rowsort
SELECT + col0 + + col0 * + col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT + col0 * + cor0.col2 * - col1 AS col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col1 * cor0.col1 col1 FROM tab2 cor0
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT + col2 * col1 + col1 * col0 + - col0 AS col2 FROM tab2 AS cor0
----
1047
1910
6058

query I rowsort
SELECT DISTINCT + col0 * col1 * - col0 FROM tab0
----
-118825
-49536
-720811

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT NULL <= ( NULL ) OR ( NULL ) <> ( - col1 - col2 )
----

query I rowsort
SELECT + col0 * + tab1.col0 AS col1 FROM tab1
----
4096
6400
9

query I rowsort
SELECT - col0 * + col0 * + col0 FROM tab0
----
-13824
-42875
-704969

onlyif mysql # use DIV operator for integer division
query I rowsort label-2038
SELECT + col2 DIV cor0.col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2038
SELECT + col2 / cor0.col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT + col2 + - col1 * - cor0.col0 AS col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT - cor0.col1 + - col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT ( + ( - col2 ) ) FROM tab1
----
-54
-57
-96

query I rowsort
SELECT + col1 + + tab1.col1 * col0 FROM tab1
----
104
1053
650

query I rowsort
SELECT DISTINCT - 30 FROM tab2
----
-30

query I rowsort
SELECT - 74 FROM tab0, tab1 AS cor0
----
9 values hashing to 5a567947d14593676e3825756f8e6130

query I rowsort
SELECT tab0.col2 * - col1 AS col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT col2 + + col0 AS col1 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT + 34 + - col1 * col0 AS col1 FROM tab2 AS cor0
----
-1309
-183
-4568

onlyif mysql # use DIV operator for integer division
query I rowsort label-2048
SELECT cor0.col2 * - col2 - + cor0.col0 DIV col2 col1 FROM tab1 AS cor0
----
-2916
-3250
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2048
SELECT cor0.col2 * - col2 - + cor0.col0 / col2 col1 FROM tab1 AS cor0
----
-2916
-3250
-9216

query I rowsort
SELECT DISTINCT - col2 + - col1 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT + 66 + + cor0.col0 * col2 * col2 FROM tab1 cor0
----
208002
737346
8814

onlyif mysql # use DIV operator for integer division
query I rowsort label-2051
SELECT 37 DIV col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2051
SELECT 37 / col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2052
SELECT + + ( col0 ) + + col2 DIV col2 AS col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-2052
SELECT + + ( col0 ) + + col2 / col2 AS col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT 30 + 38 - col1 AS col0 FROM tab2
----
37
51
9

query I rowsort
SELECT DISTINCT 36 * + col1 + col1 - - col2 * + col0 AS col2 FROM tab1
----
1124
4018
8161

onlyif mysql # use DIV operator for integer division
query I rowsort label-2055
SELECT DISTINCT - tab1.col2 - - col0 DIV - col2 FROM tab1
----
-54
-58
-96

skipif mysql # not compatible
query I rowsort label-2055
SELECT DISTINCT - tab1.col2 - - col0 / - col2 FROM tab1
----
-54
-58
-96

query I rowsort
SELECT DISTINCT 61 * col0 + col2 FROM tab1
----
237
3961
4976

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * + 70 col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to f4654676202267c28455c2ed5237bb05

query I rowsort
SELECT ( + 67 ) * tab0.col2 AS col1 FROM tab0
----
2211
5494
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2059
SELECT - CAST( NULL AS SIGNED ) * + col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2059
SELECT - CAST ( NULL AS INTEGER ) * + col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * + 46 AS col2 FROM tab2
----
322
3588
3634

query I rowsort
SELECT 14 + col0 FROM tab0
----
103
38
49

query I rowsort
SELECT DISTINCT col2 + 24 FROM tab2
----
50
51
62

query I rowsort
SELECT - 80 + 14 FROM tab0 AS cor0
----
-66
-66
-66

query I rowsort
SELECT DISTINCT ( + col1 ) * - col1 * + 53 + col2 FROM tab0
----
-391955
-438811
-498676

query I rowsort
SELECT ALL + col0 * cor0.col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - ( col1 ) + - col2 * + 49 + - col2 FROM tab2 AS cor0
----
-1359
-1381
-1917

query I rowsort
SELECT - col0 * - col2 * - cor0.col1 AS col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT + ( col2 ) + 85 FROM tab2 AS cor0
----
111
112
123

query I rowsort
SELECT ALL + col2 * col0 - 56 * + 56 AS col1 FROM tab1 AS cor0
----
-2974
4544
512

query I rowsort
SELECT + ( + col2 ) * + col1 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2071
SELECT ALL + + 40 * + cor0.col1 - - CAST( col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
3526
3731
3977

skipif mysql # not compatible
query I rowsort label-2071
SELECT ALL + + 40 * + cor0.col1 - - CAST ( col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
3526
3731
3977

onlyif mysql # use DIV operator for integer division
query I rowsort label-2072
SELECT ALL 57 + col2 DIV + cor0.col0 AS col1 FROM tab0 cor0
----
57
57
58

skipif mysql # not compatible
query I rowsort label-2072
SELECT ALL 57 + col2 / + cor0.col0 AS col1 FROM tab0 cor0
----
57
57
58

query I rowsort
SELECT ALL - col0 + + cor0.col2 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT ALL - cor0.col1 + - col2 * ( col2 ) AS col1 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT DISTINCT + + col0 * + col1 - 25 AS col2 FROM tab1 AS cor0
----
1015
53
615

query I rowsort
SELECT DISTINCT ( - col2 ) + - col0 AS col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + col2 * - ( col1 ) AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + col0 * - col0 * - ( col1 ) FROM tab0
----
118825
49536
720811

query I rowsort
SELECT - cor0.col0 * ( col0 ) AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - col1 * ( - col0 ) * col1 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT ALL + col0 * cor0.col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col2 * ( 66 ) AS col1 FROM tab1 AS cor0
----
3564
3762
6336

onlyif mysql # use DIV operator for integer division
query I rowsort label-2083
SELECT + - col0 + cor0.col2 DIV - cor0.col0 AS col0 FROM tab2 AS cor0
----
-10
-78
-79

skipif mysql # not compatible
query I rowsort label-2083
SELECT + - col0 + cor0.col2 / - cor0.col0 AS col0 FROM tab2 AS cor0
----
-10
-78
-79

query I rowsort
SELECT - col0 + 13 - col1 FROM tab1 cor0
----
-16
-61
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2085
SELECT DISTINCT - + CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2085
SELECT DISTINCT - + CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - - col2 + col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT - - 69 + col0 - col2 FROM tab2 AS cor0
----
110
121
49

query I rowsort
SELECT cor0.col1 * - 85 + 67 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to a9ca415f73c14925850beedaa3469791

onlyif mysql # use DIV operator for integer division
query I rowsort label-2089
SELECT DISTINCT - + 69 + col2 DIV + col1 AS col0 FROM tab0 AS cor0
----
-69

skipif mysql # not compatible
query I rowsort label-2089
SELECT DISTINCT - + 69 + col2 / + col1 AS col0 FROM tab0 AS cor0
----
-69

query I rowsort
SELECT + + cor1.col0 AS col0 FROM tab1, tab1 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

query I rowsort
SELECT DISTINCT - + 67 + col1 * col1 FROM tab1 AS cor0
----
102
33
609

onlyif mysql # use DIV operator for integer division
query I rowsort label-2092
SELECT ALL + 20 DIV col1 FROM tab1 cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2092
SELECT ALL + 20 / col1 FROM tab1 cor0
----
0
1
2

query I rowsort
SELECT - - 6 AS col0 FROM tab1 AS cor0
----
6
6
6

query I rowsort
SELECT ALL - - 38 * + col2 + col0 AS col0 FROM tab2 AS cor0
----
1033
1066
1523

query I rowsort
SELECT + 44 + col1 * col0 FROM tab1 AS cor0
----
1084
122
684

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - col1 col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col0 + 48 AS col2 FROM tab1 AS cor0
----
112
128
51

query I rowsort
SELECT ALL + col2 + ( + cor0.col1 + col0 ) * - col0 FROM tab0 AS cor0
----
-15938
-2607
-4619

query I rowsort
SELECT ALL + ( col2 ) + col2 AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT - - ( - col1 ) + col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT - - col1 * col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-2102
SELECT col1 DIV cor0.col1 - col0 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-2102
SELECT col1 / cor0.col1 - col0 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT ALL - col0 + col2 * - cor0.col1 * ( ( + col2 ) ) FROM tab2 cor0
----
-22606
-24627
-39962

onlyif mysql # use DIV operator for integer division
query I rowsort label-2104
SELECT ALL + + col1 + + col0 DIV - cor0.col0 + cor0.col1 AS col2 FROM tab0 AS cor0
----
171
181
193

skipif mysql # not compatible
query I rowsort label-2104
SELECT ALL + + col1 + + col0 / - cor0.col0 + cor0.col1 AS col2 FROM tab0 AS cor0
----
171
181
193

query I rowsort
SELECT DISTINCT + + col1 * 50 AS col1 FROM tab2 AS cor0
----
1550
2950
850

query I rowsort
SELECT DISTINCT ( - 56 ) * + cor0.col1 AS col0 FROM tab0, tab0 cor0
----
-4816
-5096
-5432

query I rowsort
SELECT DISTINCT - 84 AS col1 FROM tab1 AS cor0
----
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 col2 FROM tab2 AS cor0
----
25
25
25

query I rowsort
SELECT DISTINCT + - col2 * - cor0.col2 * col2 AS col2 FROM tab1 cor0
----
157464
185193
884736

query I rowsort
SELECT ALL - col0 * col0 * col0 FROM tab2 AS cor0
----
-343
-474552
-493039

query I rowsort
SELECT ALL ( + 62 ) AS col2 FROM tab0 AS cor0
----
62
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2112
SELECT + 85 DIV + 70 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2112
SELECT + 85 / + 70 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT + + col0 + - col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1, tab0 AS cor0 CROSS JOIN tab0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2115
SELECT + col0 + col1 DIV + col0 AS col0 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-2115
SELECT + col0 + col1 / + col0 AS col0 FROM tab1 AS cor0
----
11
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2116
SELECT - cor1.col0 DIV 45 + 50 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 9c79d7d9cb070d7fb1a49c73e2ce1caf

skipif mysql # not compatible
query I rowsort label-2116
SELECT - cor1.col0 / 45 + 50 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 9c79d7d9cb070d7fb1a49c73e2ce1caf

query I rowsort
SELECT ALL - col0 + + col0 * + col1 FROM tab1
----
576
75
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - 99 - col2 col0 FROM tab0 AS cor0
----
-2409
-3466
-8893

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2119
SELECT col2 * - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2119
SELECT col2 * - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * - col0 + 81 + + col2 AS col1 FROM tab0 cor0
----
117
7461
906

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2121
SELECT ALL - + col1 * CAST( NULL AS SIGNED ) + 11 / - col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2121
SELECT ALL - + col1 * CAST ( NULL AS INTEGER ) + 11 / - col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + 96 AS col0 FROM tab0 AS cor0
----
120
131
185

onlyif mysql # use DIV operator for integer division
query I rowsort label-2123
SELECT DISTINCT col0 + - cor0.col1 DIV cor0.col1 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-2123
SELECT DISTINCT col0 + - cor0.col1 / cor0.col1 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT - col2 + + col0 * 20 FROM tab1
----
1223
1504
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2125
SELECT - col0 DIV - col2 + - col0 AS col1 FROM tab0
----
-24
-88
0

skipif mysql # not compatible
query I rowsort label-2125
SELECT - col0 / - col2 + - col0 AS col1 FROM tab0
----
-24
-88
0

query I rowsort
SELECT + - cor0.col0 + cor0.col2 AS col0 FROM tab0 AS cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + 64 * ( cor0.col2 ) + col2 col1 FROM tab1 AS cor0
----
3513
3769
6320

query I rowsort
SELECT DISTINCT col2 + col1 * + col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - col2 * ( col2 ) * col2 AS col0 FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT ALL - col1 + - tab2.col2 * 40 FROM tab2
----
-1099
-1111
-1537

query I rowsort
SELECT col1 * - col0 * tab2.col0 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT - 70 * + tab1.col1 + 76 FROM tab1
----
-1744
-624
-834

query I rowsort
SELECT 23 FROM tab2, tab1 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT ALL tab0.col2 + 99 AS col2 FROM tab0, tab2, tab1 cor0
----
27 values hashing to 6d53eda6139d4113ce6bb8462cfc0c5e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + 33 col0 FROM tab2
----
231
2574
2607

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * 11 + - col0 col1 FROM tab2 AS cor0
----
108
334
571

query I rowsort
SELECT DISTINCT tab1.col1 + col0 AS col2 FROM tab1
----
29
74
93

query I rowsort
SELECT - col2 * 74 * + col1 FROM tab0
----
-210012
-552188
-7178

query I rowsort
SELECT DISTINCT 7 * col1 - - tab1.col0 FROM tab1
----
134
171
185

query I rowsort
SELECT col0 + ( tab2.col0 ) * - 87 + col1 AS col1 FROM tab2
----
-571
-6649
-6777

query I rowsort
SELECT 53 + + 71 - col1 FROM tab2
----
107
65
93

query I rowsort
SELECT + 80 * col1 FROM tab1 AS cor0
----
1040
2080
800

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2143
SELECT DISTINCT - CAST( + 41 AS SIGNED ) * col0 AS col0 FROM tab2 AS cor0
----
-287
-3198
-3239

skipif mysql # not compatible
query I rowsort label-2143
SELECT DISTINCT - CAST ( + 41 AS INTEGER ) * col0 AS col0 FROM tab2 AS cor0
----
-287
-3198
-3239

onlyif mysql # use DIV operator for integer division
query I rowsort label-2144
SELECT ALL 65 DIV - col0 FROM tab0 cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2144
SELECT ALL 65 / - col0 FROM tab0 cor0
----
-1
-2
0

query I rowsort
SELECT ALL cor1.col0 FROM tab1, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT ( + col2 * col1 ) + + col2 + + 56 AS col1 FROM tab0
----
154
2927
7600

query I rowsort
SELECT + 96 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query I rowsort
SELECT DISTINCT ( col0 ) + - col0 FROM tab1
----
0

query I rowsort
SELECT DISTINCT 17 * 3 + col2 FROM tab2
----
77
78
89

query I rowsort
SELECT + ( col2 ) * col2 + 48 * - col2 * - col1 AS col2 FROM tab2 AS cor0
----
32452
40905
74308

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col1 col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - 23 * col1 + col1 FROM tab2 AS cor0
----
-1298
-374
-682

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 * col1 + - 21 + col2 AS col1 FROM tab0 AS cor0
----
118805
49548
720872

query I rowsort
SELECT - 70 - col1 FROM tab2 AS cor0
----
-101
-129
-87

query I rowsort
SELECT DISTINCT 33 * - col1 - ( - col2 ) AS col1 FROM tab2 AS cor0
----
-1921
-523
-996

query I rowsort
SELECT 37 + + col0 AS col0 FROM tab0 AS cor0
----
126
61
72

query I rowsort
SELECT ALL - 94 * - cor0.col1 FROM tab2 AS cor0
----
1598
2914
5546

query I rowsort
SELECT DISTINCT col2 * col2 + - col2 * - col1 AS col2 FROM tab2 AS cor0
----
1566
2090
2210

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + col1 * + 52 col1 FROM tab2
----
33592
43524
79768

query I rowsort
SELECT DISTINCT + col0 * - cor0.col2 * col0 AS col2 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT + + 54 AS col2 FROM tab0 AS cor0
----
54
54
54

query I rowsort
SELECT - col0 - 60 * tab0.col0 FROM tab0
----
-1464
-2135
-5429

query I rowsort
SELECT DISTINCT + - col0 + col1 AS col0 FROM tab0 AS cor0
----
2
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * + col1 + col2 col0 FROM tab2 AS cor0
----
327
3507
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-2165
SELECT DISTINCT + 36 DIV - col0 + col1 DIV cor0.col0 AS col2 FROM tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2165
SELECT DISTINCT + 36 / - col0 + col1 / cor0.col0 AS col2 FROM tab2 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col1 + col0 * col0 col2 FROM tab0 AS cor0
----
1322
15383
3414

query I rowsort
SELECT ALL + 3 - cor0.col0 AS col2 FROM tab0 cor0
----
-21
-32
-86

onlyif mysql # use DIV operator for integer division
query I rowsort label-2168
SELECT ALL - tab1.col2 DIV 5 FROM tab0, tab2, tab0 AS cor0, tab1
----
81 values hashing to 933d47f6b073cd52a583d14ca02f8e38

skipif mysql # not compatible
query I rowsort label-2168
SELECT ALL - tab1.col2 / 5 FROM tab0, tab2, tab0 AS cor0, tab1
----
81 values hashing to 933d47f6b073cd52a583d14ca02f8e38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2169
SELECT ALL - ( + col0 ) * - CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2169
SELECT ALL - ( + col0 ) * - CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 90 * - col2 col1 FROM tab2
----
-2340
-2430
-3420

query I rowsort
SELECT - - col0 + col0 + ( cor0.col1 ) * - col1 AS col2 FROM tab2 AS cor0
----
-131
-3325
-947

query I rowsort
SELECT - col1 * col1 + - 45 AS col2 FROM tab1 AS cor0
----
-145
-214
-721

query I rowsort
SELECT - col2 + - col0 - col1 FROM tab2 AS cor0
----
-134
-163
-65

query I rowsort
SELECT + - col1 + + 28 FROM tab1 AS cor0
----
15
18
2

query I rowsort
SELECT + col1 * col2 - col2 * - col1 FROM tab2 AS cor0
----
1292
1674
3068

query I rowsort
SELECT - col0 * ( - col2 * - col0 ) AS col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT col1 + cor0.col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT col2 * col0 + - col2 * + col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2179
SELECT ( + col0 + CAST( col0 AS SIGNED ) ) DIV - col0 FROM tab1
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-2179
SELECT ( + col0 + CAST ( col0 AS INTEGER ) ) / - col0 FROM tab1
----
-2
-2
-2

query I rowsort
SELECT col1 * col1 + - 39 AS col2 FROM tab2 AS cor0
----
250
3442
922

onlyif mysql # use DIV operator for integer division
query I rowsort label-2181
SELECT + col1 DIV + col2 + + col2 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2181
SELECT + col1 / + col2 + + col2 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - cor0.col0 * col2 - + col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT + + ( col0 ) * - col2 + - 0 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2184
SELECT - + CAST( NULL AS SIGNED ) * col2 * col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2184
SELECT - + CAST ( NULL AS INTEGER ) * col2 * col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - cor0.col0 + col2 AS col0 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2186
SELECT ALL - + CAST( NULL AS SIGNED ) / + col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2186
SELECT ALL - + CAST ( NULL AS INTEGER ) / + col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + ( + col0 ) col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - + 9 * + col1 * + col2 FROM tab1 AS cor0
----
-11232
-12636
-5130

query I rowsort
SELECT + + 97 AS col2 FROM tab1 AS cor0
----
97
97
97

query I rowsort
SELECT ALL + - 7 * col1 FROM tab0 cor0
----
-602
-637
-679

query I rowsort
SELECT DISTINCT 71 AS col0 FROM tab1, tab1 AS cor0
----
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 col1 FROM tab2 cor0
----
-51
-51
-51

query I rowsort
SELECT + + 37 * col1 AS col1 FROM tab1 AS cor0
----
370
481
962

query I rowsort
SELECT DISTINCT - 5 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
-5

query I rowsort
SELECT DISTINCT + col2 - col0 FROM tab0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2196
SELECT + col1 DIV tab1.col0 + col2 AS col0 FROM tab1
----
57
62
96

skipif mysql # not compatible
query I rowsort label-2196
SELECT + col1 / tab1.col0 + col2 AS col0 FROM tab1
----
57
62
96

query I rowsort
SELECT col2 * - col0 * tab2.col1 + col0 * + tab2.col1 * + col0 AS col2 FROM tab2
----
-4340
239304
55063

onlyif mysql # use DIV operator for integer division
query I rowsort label-2198
SELECT + col1 DIV + col0 - col2 FROM tab2
----
-23
-26
-38

skipif mysql # not compatible
query I rowsort label-2198
SELECT + col1 / + col0 - col2 FROM tab2
----
-23
-26
-38

query I rowsort
SELECT DISTINCT + col2 * tab1.col0 AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT - col2 + - col1 * col0 AS col1 FROM tab2
----
-1381
-244
-4628

query I rowsort
SELECT + col0 AS col2 FROM tab0 WHERE + col2 BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT + tab0.col0 + col2 * - col2 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT + col1 * col2 + col0 + - col1 FROM tab1
----
1315
1381
624

query I rowsort
SELECT + col1 * tab2.col1 AS col2 FROM tab2
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 * + col0 * + col2 col2 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT col2 * + tab0.col1 * tab0.col2 + - col1 FROM tab0 WHERE NOT NULL NOT IN ( + tab0.col0 )
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE + col1 * - col0 + col1 IN ( - col2 * + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col1 * - col0 col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT col2 + col0 + - col1 * col1 AS col1 FROM tab2
----
-172
-3377
-927

query I rowsort
SELECT col2 * col2 + tab1.col1 + col0 FROM tab1
----
2945
3323
9309

onlyif mysql # use DIV operator for integer division
query I rowsort label-2211
SELECT DISTINCT + col2 DIV - col2 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-2211
SELECT DISTINCT + col2 / - col2 FROM tab0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2212
SELECT DISTINCT col0 DIV tab2.col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-2212
SELECT DISTINCT col0 / tab2.col1 FROM tab2
----
0
1
4

query I rowsort
SELECT + tab0.col0 * + col2 + - col0 * tab0.col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + col1 * + col1 AS col0 FROM tab1
----
100
169
676

query I rowsort
SELECT + col0 * tab0.col2 * - col0 AS col1 FROM tab0
----
-1225
-19008
-649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col0 col2 FROM tab1
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 * - col2 col0 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT - col1 + + col2 * col2 FROM tab0
----
-96
1003
6633

onlyif mysql # use DIV operator for integer division
query I rowsort label-2219
SELECT - col2 + - col0 DIV tab0.col2 AS col2 FROM tab0
----
-33
-36
-83

skipif mysql # not compatible
query I rowsort label-2219
SELECT - col2 + - col0 / tab0.col2 AS col2 FROM tab0
----
-33
-36
-83

query I rowsort
SELECT DISTINCT - col0 / col2 AS col0 FROM tab1 WHERE NOT col1 + + col2 * - col1 <= NULL
----

query III rowsort
SELECT * FROM tab0 WHERE NOT ( col2 * col0 + col2 ) > ( NULL )
----

query I rowsort
SELECT DISTINCT col1 * + col0 * col0 FROM tab2
----
106097
1519
358956

query III rowsort
SELECT * FROM tab1 WHERE ( + col2 + - col2 ) > ( NULL )
----

query I rowsort
SELECT col1 AS col2 FROM tab0 WHERE + col0 IN ( + col1 )
----

query I rowsort
SELECT - cor0.col2 + - col2 + - col1 FROM tab2 AS cor0
----
-111
-85
-93

query I rowsort
SELECT col1 + col2 + + cor0.col2 FROM tab0 AS cor0
----
152
255
99

query I rowsort
SELECT - col1 * - col2 AS col2 FROM tab1 AS cor0 WHERE NOT NULL BETWEEN NULL AND ( col2 + col1 )
----

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE - col1 - col2 > - col2
----

query I rowsort
SELECT ALL col1 - col0 * col0 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL + cor0.col0 - col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL - cor0.col0 * + 76 * col2 AS col2 FROM tab1 AS cor0
----
-12312
-277248
-583680

query I rowsort
SELECT col2 * + col1 + + 6 AS col2 FROM tab2 AS cor0
----
1540
652
843

onlyif mysql # use DIV operator for integer division
query I rowsort label-2233
SELECT DISTINCT + - col0 DIV ( col2 * - col0 ) AS col1 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-2233
SELECT DISTINCT + - col0 / ( col2 * - col0 ) AS col1 FROM tab1 cor0
----
0

query I rowsort
SELECT ALL + col1 * 45 AS col2 FROM tab1 AS cor0
----
1170
450
585

query I rowsort
SELECT + - col2 + ( - cor0.col0 ) * - col0 AS col2 FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT DISTINCT + - col1 * - col2 + - col2 * col0 + col1 AS col2 FROM tab1 AS cor0
----
-3068
-6419
1268

query I rowsort
SELECT - cor0.col0 + + cor0.col0 * cor0.col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT col1 * + 52 + col0 FROM tab1 AS cor0
----
1355
584
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-2239
SELECT ALL col1 DIV ( + 77 ) FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2239
SELECT ALL col1 / ( + 77 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - 42 * - cor0.col0 FROM tab0 AS cor0
----
1008
1470
3738

query I rowsort
SELECT col0 * + 65 + + col0 AS col1 FROM tab2 AS cor0
----
462
5148
5214

query I rowsort
SELECT DISTINCT + col2 - + 34 FROM tab2 AS cor0
----
-7
-8
4

query I rowsort
SELECT ALL - + cor0.col1 + cor0.col1 * cor0.col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT + - col1 + 52 FROM tab2 AS cor0
----
-7
21
35

query I rowsort
SELECT DISTINCT 56 + + col1 FROM tab1 AS cor0
----
66
69
82

query I rowsort
SELECT + col1 + 57 * + col1 FROM tab2
----
1798
3422
986

query I rowsort
SELECT - 50 + cor0.col2 * - col2 FROM tab2 AS cor0
----
-1494
-726
-779

query I rowsort
SELECT ALL + - col2 * col0 + + cor0.col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL - + 32 AS col1 FROM tab0 AS cor0
----
-32
-32
-32

query I rowsort
SELECT DISTINCT col0 * + col0 FROM tab0 cor0
----
1225
576
7921

query III rowsort
SELECT * FROM tab1 WHERE + col1 <= NULL
----

query I rowsort
SELECT ALL col0 * col1 - col2 FROM tab1
----
24
583
944

query I rowsort
SELECT - col0 + col2 * tab2.col2 FROM tab2
----
1365
598
722

query I rowsort
SELECT ( - col2 ) * + col1 + + cor0.col2 + col2 FROM tab1 AS cor0
----
-1056
-1296
-456

query I rowsort
SELECT - col0 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + col0 + + col0 * - tab0.col2 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT + col2 * - 99 + + col0 + - col0 FROM tab2 AS cor0
----
-2574
-2673
-3762

onlyif mysql # use DIV operator for integer division
query I rowsort label-2258
SELECT ALL + col1 DIV col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2258
SELECT ALL + col1 / col0 AS col1 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT col0 + col1 * 43 AS col2 FROM tab1 cor0
----
1121
494
639

query I rowsort
SELECT DISTINCT - col1 + + col2 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT ALL 68 + + tab1.col2 + - col1 AS col0 FROM tab1
----
115
151
96

query I rowsort
SELECT DISTINCT tab2.col2 * col1 + - ( col2 + - col1 ) AS col1 FROM tab2
----
1567
625
841

query I rowsort
SELECT DISTINCT + 12 * + col0 * col1 + cor0.col2 * col0 FROM tab1 AS cor0
----
1098
11328
20160

query I rowsort
SELECT DISTINCT - 72 * col1 AS col1 FROM tab2 cor0
----
-1224
-2232
-4248

onlyif mysql # use DIV operator for integer division
query I rowsort label-2265
SELECT ALL - 73 DIV + ( col0 ) AS col1 FROM tab2 AS cor0
----
-10
0
0

skipif mysql # not compatible
query I rowsort label-2265
SELECT ALL - 73 / + ( col0 ) AS col1 FROM tab2 AS cor0
----
-10
0
0

query I rowsort
SELECT - - col1 + col0 + + col0 * - cor0.col1 * - cor0.col1 AS col2 FROM tab0 cor0
----
177614
329447
737189

query I rowsort
SELECT ALL + + 53 + - cor0.col2 FROM tab0 AS cor0
----
-29
20
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2268
SELECT col0 + + ( + col1 ) - - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2268
SELECT col0 + + ( + col1 ) - - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( col2 ) * - col0 + - col0 AS col2 FROM tab0 AS cor0
----
-70
-7387
-816

onlyif mysql # use DIV operator for integer division
query I rowsort label-2270
SELECT col2 * col1 DIV - col0 AS col2 FROM tab0
----
-118
-2
-83

skipif mysql # not compatible
query I rowsort label-2270
SELECT col2 * col1 / - col0 AS col2 FROM tab0
----
-118
-2
-83

query I rowsort
SELECT ALL - ( 78 ) * + cor0.col2 + col2 * - col2 FROM tab0 AS cor0
----
-13120
-3663
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2272
SELECT - col0 DIV 64 + col2 - col0 AS col2 FROM tab2 AS cor0
----
-42
-53
20

skipif mysql # not compatible
query I rowsort label-2272
SELECT - col0 / 64 + col2 - col0 AS col2 FROM tab2 AS cor0
----
-42
-53
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-2273
SELECT DISTINCT col2 * + col2 DIV tab1.col2 AS col1 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2273
SELECT DISTINCT col2 * + col2 / tab1.col2 AS col1 FROM tab1
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2274
SELECT + - CAST( col0 AS SIGNED ) * - col2 + 73 AS col0 FROM tab2 AS cor0
----
2101
262
3075

skipif mysql # not compatible
query I rowsort label-2274
SELECT + - CAST ( col0 AS INTEGER ) * - col2 + 73 AS col0 FROM tab2 AS cor0
----
2101
262
3075

query I rowsort
SELECT - - 5 * - cor0.col1 * col1 - + col1 FROM tab2 AS cor0
----
-1462
-17464
-4836

query I rowsort
SELECT 4 FROM tab2 cor0
----
4
4
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-2277
SELECT DISTINCT + - 50 DIV + col0 AS col1 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2277
SELECT DISTINCT + - 50 / + col0 AS col1 FROM tab0 AS cor0
----
-1
-2
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2278
SELECT - 46 DIV + col2 + + col0 * cor0.col1 FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-2278
SELECT - 46 / + col2 + + col0 * cor0.col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col0 + col1 * - col0 * + col2 AS col2 FROM tab0 AS cor0
----
-3360
-664029
-68088

query I rowsort
SELECT + col0 + col2 * + col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT ( - col0 ) * + col0 AS col2 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT - col1 * - ( tab1.col2 ) + + 5 FROM tab1
----
1253
1409
575

query I rowsort
SELECT - cor0.col1 + + cor0.col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + 50 AS col2 FROM tab2, tab0 cor0, tab0 AS cor1
----
50

query I rowsort
SELECT DISTINCT + col1 * col0 + - col0 AS col2 FROM tab1 AS cor0
----
576
75
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 * - col2 + + col0 * - col2 col0 FROM tab2
----
-117078
-5292
-54756

query I rowsort
SELECT ALL + 20 FROM tab1, tab1 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT + col1 * + 84 + 10 + - col1 FROM tab2
----
1421
2583
4907

query I rowsort
SELECT col1 + ( 68 * - col0 ) + col2 FROM tab2
----
-418
-5219
-5317

query I rowsort
SELECT DISTINCT col2 + col0 + col1 FROM tab2
----
134
163
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col0 col1 FROM tab0 AS cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * 51 * 91 col2 FROM tab2 AS cor0
----
143871
273819
78897

query I rowsort
SELECT cor0.col1 * - col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col2 * - col2 * - tab0.col1 AS col1 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT DISTINCT + tab0.col2 * 71 AS col0 FROM tab0
----
2343
5822
71

query I rowsort
SELECT ALL + col1 + col1 * col2 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2297
SELECT DISTINCT + CAST( NULL AS SIGNED ) - col0 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2297
SELECT DISTINCT + CAST ( NULL AS INTEGER ) - col0 AS col1 FROM tab2 AS cor0
----
NULL

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab0, tab0 cor1, tab0 AS cor2
----
972 values hashing to ea0f747588ddf5869ee18a5e22d9f237

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2299
SELECT - ( - cor1.col1 ) / CAST( NULL AS SIGNED ) + + 16 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2299
SELECT - ( - cor1.col1 ) / CAST ( NULL AS INTEGER ) + + 16 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - - 91 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT - 51 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 08d3853e39924d3c636260a6dd856837

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab0 AS cor1, tab2 cor2
----
972 values hashing to 6dfb18fb846f922ba9ea60ce42b86fb0

query I rowsort
SELECT ALL 68 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 col0 FROM tab0, tab2 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - cor0.col2 * col1 + + ( - cor0.col2 ) FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT DISTINCT + cor0.col0 - - col1 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + 31 FROM tab2, tab0, tab1 AS cor0
----
31

query I rowsort
SELECT DISTINCT - col1 * + col0 * col0 - col2 FROM tab2 AS cor0
----
-106135
-1546
-358982

query I rowsort
SELECT - cor0.col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT + tab1.col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT col0 + - 13 FROM tab1 cor0
----
-10
51
67

query I rowsort
SELECT + 86 * + cor0.col2 FROM tab2 AS cor0
----
2236
2322
3268

query I rowsort
SELECT ALL + - col0 * col0 * col0 FROM tab1 cor0
----
-262144
-27
-512000

query I rowsort
SELECT DISTINCT - 6 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 78 + + col2 col2 FROM tab1
----
-21
-24
18

query I rowsort
SELECT - 42 AS col0 FROM tab0
----
-42
-42
-42

query I rowsort
SELECT DISTINCT + 16 * - col1 AS col1 FROM tab2 AS cor0
----
-272
-496
-944

query I rowsort
SELECT DISTINCT - col1 + cor0.col2 * col0 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT ALL col0 + - col2 * - ( col1 ) FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT cor0.col0 + col0 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2321
SELECT - col1 DIV 30 - + ( col1 ) FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-2321
SELECT - col1 / 30 - + ( col1 ) FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2322
SELECT ALL - col1 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2322
SELECT ALL - col1 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col1 * col0 FROM tab1 cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2324
SELECT cor0.col0 DIV cor0.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-2324
SELECT cor0.col0 / cor0.col1 col2 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT ALL + col0 * ( col0 ) + - col1 AS col0 FROM tab0 AS cor0
----
1128
490
7830

onlyif mysql # use DIV operator for integer division
query I rowsort label-2326
SELECT + ( col1 ) DIV ( col1 ) + + col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-2326
SELECT + ( col1 ) / ( col1 ) + + col0 FROM tab1
----
4
65
81

query I rowsort
SELECT 47 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

onlyif mysql # use DIV operator for integer division
query I rowsort label-2328
SELECT ALL + col0 DIV col1 + + col2 + 17 FROM tab1 AS cor0
----
119
71
80

skipif mysql # not compatible
query I rowsort label-2328
SELECT ALL + col0 / col1 + + col2 + 17 FROM tab1 AS cor0
----
119
71
80

query I rowsort
SELECT cor0.col1 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL 33 + + col1 AS col2 FROM tab1 AS cor0
----
43
46
59

query I rowsort
SELECT DISTINCT ( 80 ) + - col1 AS col1 FROM tab2 AS cor0
----
21
49
63

query I rowsort
SELECT - 18 * + cor0.col1 FROM tab1 AS cor0
----
-180
-234
-468

query I rowsort
SELECT DISTINCT col2 * ( - col2 ) + col0 + col1 FROM tab2 AS cor0
----
-1348
-539
-691

onlyif mysql # use DIV operator for integer division
query I rowsort label-2334
SELECT - ( + 94 ) DIV col0 + 78 FROM tab2 AS cor0
----
65
77
77

skipif mysql # not compatible
query I rowsort label-2334
SELECT - ( + 94 ) / col0 + 78 FROM tab2 AS cor0
----
65
77
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2335
SELECT ALL CAST( NULL AS SIGNED ) + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2335
SELECT ALL CAST ( NULL AS INTEGER ) + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2336
SELECT DISTINCT col1 * ( col1 ) + CAST( col0 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
164
249
679

skipif mysql # not compatible
query I rowsort label-2336
SELECT DISTINCT col1 * ( col1 ) + CAST ( col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT DISTINCT 22 + - cor0.col2 FROM tab2 AS cor0
----
-16
-4
-5

query I rowsort
SELECT - - 74 * + col2 + cor0.col2 * + col2 * 71 AS col0 FROM tab1 AS cor0
----
211032
234897
661440

query I rowsort
SELECT ALL + + 96 + - col1 AS col0 FROM tab2 cor0
----
37
65
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2340
SELECT DISTINCT col2 + CAST( 61 * - col1 AS SIGNED ) col2 FROM tab0
----
-5213
-5469
-5916

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2340
SELECT DISTINCT col2 + CAST ( 61 * - col1 AS INTEGER ) col2 FROM tab0
----
-5213
-5469
-5916

query I rowsort
SELECT - 26 FROM tab0, tab1 AS cor0
----
9 values hashing to 47d0574274146de273829785364ada39

query I rowsort
SELECT ALL col2 * 44 AS col2 FROM tab1
----
2376
2508
4224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab0, tab1 cor0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - 23 * - 54 + - col2 FROM tab2
----
1204
1215
1216

query I rowsort
SELECT DISTINCT + 92 * cor0.col0 AS col0 FROM tab0, tab0 AS cor0
----
2208
3220
8188

query I rowsort
SELECT - + col1 + ( col2 ) + col0 FROM tab0 cor0
----
-29
-61
80

query I rowsort
SELECT DISTINCT - 9 + - col2 * - col1 * tab2.col0 FROM tab2
----
119643
51025
5850

query I rowsort
SELECT + col2 + col1 * + 0 FROM tab1 cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 41 + col1 col0 FROM tab1
----
51
54
67

query I rowsort
SELECT + ( col0 ) * + col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL + 32 FROM tab1, tab0 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT DISTINCT 58 * - col1 AS col1 FROM tab2 cor0
----
-1798
-3422
-986

query I rowsort
SELECT ALL + 32 * - col1 FROM tab0 AS cor0
----
-2752
-2912
-3104

query I rowsort
SELECT ALL 52 - - col1 AS col1 FROM tab2 AS cor0
----
111
69
83

query I rowsort
SELECT DISTINCT - + col0 + + col2 * - 0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + + 69 * - col2 AS col1 FROM tab2 AS cor0
----
-1794
-1863
-2622

query I rowsort
SELECT + ( - cor0.col2 ) * + col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - 2 * - col2 + - col2 * + cor0.col1 FROM tab1 AS cor0
----
-1056
-1296
-456

onlyif mysql # use DIV operator for integer division
query I rowsort label-2359
SELECT DISTINCT - cor0.col1 DIV - col2 FROM tab0 cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2359
SELECT DISTINCT - cor0.col1 / - col2 FROM tab0 cor0
----
1
2
97

query I rowsort
SELECT ALL + + ( - col2 ) + - col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT - - 56 AS col0 FROM tab1 cor0
----
56
56
56

query I rowsort
SELECT - 4 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
-344
-364
-388

query I rowsort
SELECT DISTINCT + + cor0.col0 * col1 + col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT cor0.col0 + + col0 * ( - cor0.col2 ) FROM tab1 AS cor0
----
-159
-3584
-7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-2365
SELECT - cor0.col2 DIV col0 + + cor0.col2 * cor0.col0 DIV + col0 AS col2 FROM tab1 AS cor0
----
36
57
95

skipif mysql # not compatible
query I rowsort label-2365
SELECT - cor0.col2 / col0 + + cor0.col2 * cor0.col0 / + col0 AS col2 FROM tab1 AS cor0
----
36
57
95

query I rowsort
SELECT ALL - - 45 + - col2 FROM tab1 AS cor0
----
-12
-51
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + - col1 col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT tab2.col1 + + col2 + - 7 FROM tab2
----
48
51
78

query I rowsort
SELECT ALL col0 + 32 AS col2 FROM tab0
----
121
56
67

query I rowsort
SELECT + col1 + + ( - col0 ) FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT cor0.col1 * col1 * + col2 + col0 FROM tab0 AS cor0
----
244092
679131
9444

query I rowsort
SELECT DISTINCT - col0 * 56 AS col0 FROM tab0 AS cor0
----
-1344
-1960
-4984

query I rowsort
SELECT ALL col2 * 46 FROM tab0 AS cor0
----
1518
3772
46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2374
SELECT ALL + - cor0.col1 + CAST( 32 AS SIGNED ) FROM tab2 cor0
----
-27
1
15

skipif mysql # not compatible
query I rowsort label-2374
SELECT ALL + - cor0.col1 + CAST ( 32 AS INTEGER ) FROM tab2 cor0
----
-27
1
15

query I rowsort
SELECT + col1 - col0 FROM tab1 cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2376
SELECT + col0 * CAST( NULL AS DECIMAL ) * col0 + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2376
SELECT + col0 * CAST ( NULL AS REAL ) * col0 + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * 95 + - col0 + + col2 AS col0 FROM tab1 AS cor0
----
336
6073
7616

query I rowsort
SELECT ALL - col1 - - 8 AS col0 FROM tab2 AS cor0
----
-23
-51
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 * - cor0.col0 - col0 col0 FROM tab0 cor0
----
1190
552
7832

query I rowsort
SELECT - col1 * 57 + col1 AS col1 FROM tab2 AS cor0
----
-1736
-3304
-952

query I rowsort
SELECT ALL col2 * ( - col0 ) FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-2382
SELECT ALL 49 DIV col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2382
SELECT ALL 49 / col1 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2383
SELECT DISTINCT - cor0.col2 DIV - col1 AS col2 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2383
SELECT DISTINCT - cor0.col2 / - col1 AS col2 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT - 34 * 9 FROM tab0 AS cor0
----
-306
-306
-306

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2385
SELECT + + CAST( NULL AS DECIMAL ) + - col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2385
SELECT + + CAST ( NULL AS REAL ) + - col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2386
SELECT DISTINCT + CAST( col2 AS SIGNED ) * col0 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-2386
SELECT DISTINCT + CAST ( col2 AS INTEGER ) * col0 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 60 col0 FROM tab1, tab2 AS cor0, tab2 cor1, tab1 AS cor2
----
81 values hashing to 17ea60db8bdc9b534fe91b7fd55df3f9

query I rowsort
SELECT DISTINCT + tab2.col2 - 36 * col2 FROM tab2
----
-1330
-910
-945

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 55 col0 FROM tab0 cor0
----
55
55
55

query I rowsort
SELECT ALL cor0.col1 * + col1 FROM tab0 cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * + col2 + col2 col0 FROM tab1 AS cor0
----
2970
3306
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * - col0 + col1 col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT - + 36 * + col0 FROM tab2 AS cor0
----
-252
-2808
-2844

query I rowsort
SELECT + + 18 * col1 AS col2 FROM tab1 AS cor0
----
180
234
468

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2395
SELECT DISTINCT - ( col0 ) * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2395
SELECT DISTINCT - ( col0 ) * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + col0 * + col0 + + 13 FROM tab1 AS cor0
----
22
4109
6413

query I rowsort
SELECT + col0 + cor0.col1 * 63 AS col1 FROM tab1 AS cor0
----
1641
694
899

query I rowsort
SELECT ALL col1 * - 15 + + col2 + + col0 FROM tab0 AS cor0
----
-1194
-1233
-1419

onlyif mysql # use DIV operator for integer division
query I rowsort label-2399
SELECT - - cor0.col2 + col1 DIV 76 AS col0 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-2399
SELECT - - cor0.col2 + col1 / 76 AS col0 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT + + col2 - + ( col1 ) * col1 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT 89 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

query I rowsort
SELECT - + col1 - col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT + 71 * 94 AS col1 FROM tab2 AS cor0
----
6674

query I rowsort
SELECT DISTINCT + + cor0.col2 * + col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - 25 AS col0 FROM tab2
----
-25

query I rowsort
SELECT ( + tab1.col1 ) * col0 * col2 AS col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT DISTINCT - ( tab2.col0 ) FROM tab2, tab0, tab1 cor0
----
-7
-78
-79

query I rowsort
SELECT - col1 + 59 * + col2 FROM tab0 AS cor0
----
-38
1861
4747

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2409
SELECT ALL - - CAST( + col0 AS SIGNED ) AS col0 FROM tab2 cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2409
SELECT ALL - - CAST ( + col0 AS INTEGER ) AS col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT + 95 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT - 52 FROM tab1, tab0 AS cor0
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

query I rowsort
SELECT + col2 + - col1 * + col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - col0 * - col0 * - col0 FROM tab1 AS cor0
----
-262144
-27
-512000

query I rowsort
SELECT col2 * cor0.col0 + col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - 31 * col2 FROM tab1 AS cor0
----
-1674
-1767
-2976

query I rowsort
SELECT DISTINCT + 23 * + tab0.col0 FROM tab0
----
2047
552
805

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2417
SELECT ALL + CAST( ( + col1 ) AS SIGNED ) * ( col1 ) AS col2 FROM tab2
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-2417
SELECT ALL + CAST ( ( + col1 ) AS INTEGER ) * ( col1 ) AS col2 FROM tab2
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2418
SELECT ALL - CAST( NULL AS SIGNED ) * tab2.col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2418
SELECT ALL - CAST ( NULL AS INTEGER ) * tab2.col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 5 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 0da436460d6fcea5a1eb4b1d2219d7c9

query I rowsort
SELECT - + col2 * col0 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - ( + col2 ) FROM tab0
----
-1
-33
-82

query I rowsort
SELECT ALL col1 * + col1 + + 69 AS col1 FROM tab2 AS cor0
----
1030
3550
358

query I rowsort
SELECT cor0.col1 * 13 AS col0 FROM tab1 AS cor0
----
130
169
338

query I rowsort
SELECT DISTINCT + + col1 * col2 * 84 + + col0 AS col1 FROM tab0 cor0
----
238416
626897
8183

query I rowsort
SELECT ALL ( 61 ) FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

query I rowsort
SELECT ALL + 47 * col0 * col1 AS col1 FROM tab0
----
159565
380653
97008

onlyif mysql # use DIV operator for integer division
query I rowsort label-2427
SELECT - col2 + col1 DIV col0 AS col0 FROM tab2 AS cor0
----
-23
-26
-38

skipif mysql # not compatible
query I rowsort label-2427
SELECT - col2 + col1 / col0 AS col0 FROM tab2 AS cor0
----
-23
-26
-38

query I rowsort
SELECT ALL + col2 * + tab0.col2 AS col0 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT 33 * - col0 AS col2 FROM tab0
----
-1155
-2937
-792

query I rowsort
SELECT DISTINCT col1 + - col2 AS col1 FROM tab2
----
-21
33
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2431
SELECT DISTINCT tab0.col2 + + CAST( col0 AS SIGNED ) FROM tab0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-2431
SELECT DISTINCT tab0.col2 + + CAST ( col0 AS INTEGER ) FROM tab0
----
171
36
57

query I rowsort
SELECT ALL - col2 + 16 AS col2 FROM tab0
----
-17
-66
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 11 col0 FROM tab1 cor0
----
-11
-11
-11

query I rowsort
SELECT col2 * col0 + cor0.col0 AS col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - + col1 + - col2 AS col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT col1 + tab1.col2 + - col1 * tab1.col2 AS col0 FROM tab1
----
-1139
-1324
-503

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2437
SELECT ALL CAST( NULL AS SIGNED ) * + 7 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2437
SELECT ALL CAST ( NULL AS INTEGER ) * + 7 AS col0 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2438
SELECT + + 43 * + col1 DIV - col1 AS col1 FROM tab2 AS cor0
----
-43
-43
-43

skipif mysql # not compatible
query I rowsort label-2438
SELECT + + 43 * + col1 / - col1 AS col1 FROM tab2 AS cor0
----
-43
-43
-43

query I rowsort
SELECT + ( 69 ) * tab2.col0 * col1 FROM tab2
----
14973
317538
92667

query I rowsort
SELECT ALL + + col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2441
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2441
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab1 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2442
SELECT ALL + CAST( NULL AS SIGNED ) + + col2 * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2442
SELECT ALL + CAST ( NULL AS INTEGER ) + + col2 * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 43 AS col1 FROM tab0
----
43

query I rowsort
SELECT ALL - ( ( + col0 ) + - col0 ) AS col1 FROM tab1
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 cor0, tab0, tab2 cor1
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2446
SELECT - CAST( ( - col1 ) AS SIGNED ) FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2446
SELECT - CAST ( ( - col1 ) AS INTEGER ) FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2447
SELECT - CAST( NULL AS SIGNED ) + - 25 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2447
SELECT - CAST ( NULL AS INTEGER ) + - 25 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 + 36 AS col0 FROM tab1 cor0
----
10
23
26

query I rowsort
SELECT + + 60 * 81 + col1 FROM tab0 AS cor0
----
4946
4951
4957

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2450
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0, tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2450
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0, tab0 cor0
----
NULL

query I rowsort
SELECT DISTINCT col2 + 26 FROM tab1
----
122
80
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2452
SELECT ALL - col1 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2452
SELECT ALL - col1 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 + 99 FROM tab2 AS cor0
----
125
126
137

onlyif mysql # use DIV operator for integer division
query I rowsort label-2454
SELECT DISTINCT + col0 + - 79 DIV 76 AS col2 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-2454
SELECT DISTINCT + col0 + - 79 / 76 AS col2 FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT + 13 + cor0.col0 FROM tab1, tab1 cor0
----
9 values hashing to 82d4d19bbe39e55dfe878dde0d676e7e

query I rowsort
SELECT DISTINCT + 37 FROM tab0, tab0 AS cor0, tab1 cor1
----
37

query I rowsort
SELECT ALL col1 * ( 36 ) FROM tab1 AS cor0
----
360
468
936

query I rowsort
SELECT ALL - ( 16 ) * col0 AS col0 FROM tab2 cor0
----
-112
-1248
-1264

query I rowsort
SELECT DISTINCT 43 AS col0 FROM tab0 AS cor0
----
43

query I rowsort
SELECT ALL + ( + col1 ) * col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + ( - ( - col2 ) ) * + col1 AS col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL - - 64 AS col0 FROM tab0 AS cor0
----
64
64
64

query I rowsort
SELECT DISTINCT 11 AS col2 FROM tab1 AS cor0
----
11

query I rowsort
SELECT + 46 AS col1 FROM tab0 AS cor0
----
46
46
46

query I rowsort
SELECT DISTINCT - + col0 * - col2 + col2 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT - col2 * ( + cor0.col1 ) * + ( cor0.col1 ) FROM tab2 AS cor0
----
-10982
-25947
-90506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2467
SELECT CAST( + col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2467
SELECT CAST ( + col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - + col1 * - 21 + + col0 FROM tab0 AS cor0
----
1830
2000
2072

query I rowsort
SELECT ALL - - 50 * 43 + col0 * cor0.col1 - - cor0.col0 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
2237
6886
9590

query I rowsort
SELECT + + col0 + col1 AS col2 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT - + cor0.col2 * col2 + - 71 FROM tab1 cor0
----
-2987
-3320
-9287

onlyif mysql # use DIV operator for integer division
query I rowsort label-2472
SELECT 10 * - col0 - + cor0.col1 DIV + col2 FROM tab0 AS cor0
----
-242
-447
-891

skipif mysql # not compatible
query I rowsort label-2472
SELECT 10 * - col0 - + cor0.col1 / + col2 FROM tab0 AS cor0
----
-242
-447
-891

query I rowsort
SELECT DISTINCT - - col1 * col1 * + col0 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT ALL 58 FROM tab1 cor0
----
58
58
58

query I rowsort
SELECT 3 + - col0 AS col2 FROM tab2 AS cor0
----
-4
-75
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-2476
SELECT ALL col1 DIV tab1.col1 AS col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2476
SELECT ALL col1 / tab1.col1 AS col2 FROM tab1
----
1
1
1

query I rowsort
SELECT ALL 96 AS col0 FROM tab0, tab2, tab2 cor0, tab1
----
81 values hashing to e03080212e3345d8b37e64e3264019c4

onlyif mysql # use DIV operator for integer division
query I rowsort label-2478
SELECT + 81 * + col0 + + col2 DIV - col2 FROM tab0 AS cor0
----
1943
2834
7208

skipif mysql # not compatible
query I rowsort label-2478
SELECT + 81 * + col0 + + col2 / - col2 FROM tab0 AS cor0
----
1943
2834
7208

query I rowsort
SELECT 63 * - col0 + col0 AS col1 FROM tab0 AS cor0
----
-1488
-2170
-5518

query I rowsort
SELECT + 35 * - col1 AS col1 FROM tab1 AS cor0
----
-350
-455
-910

onlyif mysql # use DIV operator for integer division
query I rowsort label-2481
SELECT + + col1 - cor0.col0 DIV col0 AS col2 FROM tab2 AS cor0
----
16
30
58

skipif mysql # not compatible
query I rowsort label-2481
SELECT + + col1 - cor0.col0 / col0 AS col2 FROM tab2 AS cor0
----
16
30
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-2482
SELECT - - 89 * col1 DIV + col0 FROM tab0 AS cor0
----
246
318
91

skipif mysql # not compatible
query I rowsort label-2482
SELECT - - 89 * col1 / + col0 FROM tab0 AS cor0
----
246
318
91

query I rowsort
SELECT ALL + 98 * col2 AS col1 FROM tab0
----
3234
8036
98

query I rowsort
SELECT - col0 * - col2 + col0 + col1 * ( col1 ) FROM tab1 cor0
----
3812
7929
841

query I rowsort
SELECT DISTINCT + - col1 * + ( + col0 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT col0 * ( + cor0.col2 * col2 ) AS col2 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT col0 + + col1 * + col2 - 73 * col0 * col1 AS col1 FROM tab2
----
-14997
-334334
-97314

onlyif mysql # use DIV operator for integer division
query I rowsort label-2488
SELECT + + col0 + - col1 DIV - col1 AS col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-2488
SELECT + + col0 + - col1 / - col1 AS col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT + - cor0.col2 + col1 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + ( - col1 ) + - cor0.col2 * ( col1 ) col0 FROM tab0 AS cor0
----
-291
-3010
-7644

query I rowsort
SELECT ALL + + col2 + - 31 FROM tab2 AS cor0
----
-4
-5
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2492
SELECT DISTINCT + + col1 + ( col1 ) * - col0 * CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
106114
1550
359015

skipif mysql # not compatible
query I rowsort label-2492
SELECT DISTINCT + + col1 + ( col1 ) * - col0 * CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
106114
1550
359015

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col2 - - cor0.col1 col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL - + col0 + col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2495
SELECT tab2.col2 / - CAST( NULL AS SIGNED ) FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2495
SELECT tab2.col2 / - CAST ( NULL AS INTEGER ) FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + 78 * + 93 col0 FROM tab1 AS cor0
----
7257
7318
7334

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + cor0.col1 col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT + col2 + ( + col0 * col2 ) + col2 * 28 FROM tab1 AS cor0
----
10464
1728
5301

query I rowsort
SELECT ALL + cor0.col0 * 96 + 45 AS col2 FROM tab2 AS cor0
----
717
7533
7629

query I rowsort
SELECT cor0.col2 * + col1 + col1 AS col1 FROM tab1 cor0
----
1261
1430
580

query I rowsort
SELECT + col0 * col1 * ( col2 + col2 ) AS col0 FROM tab1
----
199680
72960
8424

query I rowsort
SELECT - col2 + - col1 * + col1 * col2 FROM tab0
----
-244101
-679124
-9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-2503
SELECT 1 DIV col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2503
SELECT 1 / col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL 23 * col0 + col1 - - 47 AS col2 FROM tab2
----
1881
1900
239

query I rowsort
SELECT col0 + col1 * 39 FROM tab0
----
3378
3638
3818

query I rowsort
SELECT ALL col1 - col1 AS col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2507
SELECT ALL col1 + ( - ( tab2.col0 ) ) * ( - col2 ) + - col2 * col1 DIV col1 FROM tab2
----
193
2061
2981

skipif mysql # not compatible
query I rowsort label-2507
SELECT ALL col1 + ( - ( tab2.col0 ) ) * ( - col2 ) + - col2 * col1 / col1 FROM tab2
----
193
2061
2981

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2508
SELECT col2 * - CAST( 24 AS SIGNED ) * - col2 FROM tab1
----
221184
69984
77976

skipif mysql # not compatible
query I rowsort label-2508
SELECT col2 * - CAST ( 24 AS INTEGER ) * - col2 FROM tab1
----
221184
69984
77976

onlyif mysql # use DIV operator for integer division
query I rowsort label-2509
SELECT ALL + cor0.col1 * 32 DIV - 20 FROM tab2 AS cor0
----
-27
-49
-94

skipif mysql # not compatible
query I rowsort label-2509
SELECT ALL + cor0.col1 * 32 / - 20 FROM tab2 AS cor0
----
-27
-49
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2510
SELECT DISTINCT - col0 * CAST( NULL AS SIGNED ) + col1 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2510
SELECT DISTINCT - col0 * CAST ( NULL AS INTEGER ) + col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL - - col1 * - cor0.col0 + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT + cor0.col2 + col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL - - col2 * + ( + col1 * col0 + col2 ) AS col1 FROM tab2 AS cor0
----
120328
52478
6588

query I rowsort
SELECT cor1.col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT col2 * 59 AS col0 FROM tab2 AS cor0
----
1534
1593
2242

query I rowsort
SELECT - - col2 * col1 + col2 AS col0 FROM tab0 AS cor0
----
2871
7544
98

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab2, tab2 AS cor1
----
3645 values hashing to bb6428239bf7f3ea361f6a10500a581d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2518
SELECT ALL - col2 - col0 * + CAST( NULL AS DECIMAL ) * - cor0.col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2518
SELECT ALL - col2 - col0 * + CAST ( NULL AS REAL ) * - cor0.col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - col0 ) * ( 93 ) + col0 FROM tab1 cor0
----
-276
-5888
-7360

onlyif mysql # use DIV operator for integer division
query I rowsort label-2520
SELECT + 55 DIV col0 + 45 FROM tab0
----
45
46
47

skipif mysql # not compatible
query I rowsort label-2520
SELECT + 55 / col0 + 45 FROM tab0
----
45
46
47

query I rowsort
SELECT - col2 + + col0 + ( 4 ) AS col2 FROM tab0
----
-5
11
38

query I rowsort
SELECT DISTINCT + + col0 * - col2 - + ( col0 ) FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT DISTINCT - + 69 * - col0 * col1 FROM tab0 AS cor0
----
142416
234255
558831

query I rowsort
SELECT 69 AS col1 FROM tab2 AS cor0
----
69
69
69

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 + col1 * col2 * + col1 AS col0 FROM tab1 AS cor0
----
16393
37180
5800

query I rowsort
SELECT ALL - - col2 * - col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2527
SELECT col2 / + col1 + CAST( NULL AS SIGNED ) * + cor0.col2 * + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2527
SELECT col2 / + col1 + CAST ( NULL AS INTEGER ) * + cor0.col2 * + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 52 * + col0 * 56 FROM tab1 AS cor0
----
-186368
-232960
-8736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 + - col0 * + ( + col0 ) col2 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT ALL 97 + col2 * 31 FROM tab0 cor0
----
1120
128
2639

query I rowsort
SELECT ALL + tab2.col1 AS col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - ( - tab1.col1 ) FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2533
SELECT ALL col0 DIV col0 AS col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2533
SELECT ALL col0 / col0 AS col0 FROM tab2
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2534
SELECT + col1 DIV col1 AS col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2534
SELECT + col1 / col1 AS col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT + + col0 * + col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2536
SELECT - col0 DIV + cor0.col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2536
SELECT - col0 / + cor0.col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2537
SELECT 43 * col0 DIV - ( col2 * - col2 ) FROM tab0 AS cor0
----
0
0
1505

skipif mysql # not compatible
query I rowsort label-2537
SELECT 43 * col0 / - ( col2 * - col2 ) FROM tab0 AS cor0
----
0
0
1505

query I rowsort
SELECT ALL + + cor0.col1 * + col1 FROM tab2 cor0
----
289
3481
961

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2, tab2 AS cor3
----
3645 values hashing to f8426cd4d01ba96a72d7348574fbbc8e

onlyif mysql # use DIV operator for integer division
query I rowsort label-2540
SELECT ALL - col2 * + col0 + + cor0.col2 - col1 DIV col0 FROM tab1 AS cor0
----
-116
-3591
-7584

skipif mysql # not compatible
query I rowsort label-2540
SELECT ALL - col2 * + col0 + + cor0.col2 - col1 / col0 FROM tab1 AS cor0
----
-116
-3591
-7584

query I rowsort
SELECT ALL - col0 * col1 + + col1 AS col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL + cor0.col1 - ( - 38 ) AS col1 FROM tab1 AS cor0
----
48
51
64

query I rowsort
SELECT ALL + + col1 * col2 + - col1 FROM tab1 AS cor0
----
1235
1378
560

onlyif mysql # use DIV operator for integer division
query I rowsort label-2544
SELECT col0 + col2 DIV 87 FROM tab1 AS cor0
----
3
64
81

skipif mysql # not compatible
query I rowsort label-2544
SELECT col0 + col2 / 87 FROM tab1 AS cor0
----
3
64
81

query I rowsort
SELECT ALL col1 + 18 FROM tab0 AS cor0
----
104
109
115

query I rowsort
SELECT ALL 56 AS col2 FROM tab2 AS cor0
----
56
56
56

query I rowsort
SELECT 41 AS col1 FROM tab0 AS cor0
----
41
41
41

query I rowsort
SELECT ALL 57 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2549
SELECT CAST( col1 AS SIGNED ) FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-2549
SELECT CAST ( col1 AS INTEGER ) FROM tab2
----
17
31
59

query I rowsort
SELECT 90 AS col0 FROM tab0 AS cor0
----
90
90
90

query I rowsort
SELECT + cor1.col2 - + 91 FROM tab1, tab1 AS cor0, tab2 cor1, tab2, tab1 AS cor2
----
243 values hashing to 1f96921fe741eff1455daf775e2f7dab

query I rowsort
SELECT DISTINCT 84 * + 22 FROM tab0
----
1848

onlyif mysql # use DIV operator for integer division
query I rowsort label-2553
SELECT - + ( + col0 ) * - cor0.col0 * col0 + 29 DIV col0 FROM tab0 AS cor0
----
13825
42875
704969

skipif mysql # not compatible
query I rowsort label-2553
SELECT - + ( + col0 ) * - cor0.col0 * col0 + 29 / col0 FROM tab0 AS cor0
----
13825
42875
704969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 68 ) col0 FROM tab1 cor0
----
68
68
68

query I rowsort
SELECT ( - ( - cor0.col0 ) ) * + col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT col2 + - col0 AS col0 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT - + 84 + - col0 FROM tab0 AS cor0
----
-108
-119
-173

query I rowsort
SELECT - col1 + col1 * col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT ALL + 49 + col0 FROM tab1 AS cor0
----
113
129
52

query I rowsort
SELECT + col0 + + cor0.col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + col1 * cor0.col2 * 50 FROM tab1 AS cor0
----
28500
62400
70200

query I rowsort
SELECT - col0 + + 30 - 44 * col0 * cor0.col1 AS col2 FROM tab0 cor0
----
-149385
-356415
-90810

query I rowsort
SELECT + col1 * 4 * col0 - - col1 * - cor0.col0 AS col0 FROM tab2 AS cor0
----
13806
4029
651

query I rowsort
SELECT + col0 + - 25 * + col2 AS col1 FROM tab2 AS cor0
----
-572
-668
-871

onlyif mysql # use DIV operator for integer division
query I rowsort label-2565
SELECT col0 DIV + ( - 67 ) FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2565
SELECT col0 / + ( - 67 ) FROM tab1
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2566
SELECT + tab1.col1 * col2 DIV 54 FROM tab1
----
10
23
26

skipif mysql # not compatible
query I rowsort label-2566
SELECT + tab1.col1 * col2 / 54 FROM tab1
----
10
23
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2567
SELECT ALL col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2567
SELECT ALL col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - cor0.col1 ) * + col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - - cor0.col0 * - col1 * + col0 AS col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL - + 96 AS col2 FROM tab1 AS cor0
----
-96
-96
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2571
SELECT DISTINCT CAST( NULL AS SIGNED ) * + col0 AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2571
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + col0 AS col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT - col0 * + col0 + - col1 - cor0.col1 FROM tab2 AS cor0
----
-111
-6202
-6275

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2573
SELECT - CAST( NULL AS SIGNED ) / col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2573
SELECT - CAST ( NULL AS INTEGER ) / col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 81 + col1 * col0 AS col1 FROM tab0 AS cor0
----
1983
3314
8018

query I rowsort
SELECT DISTINCT 33 AS col1 FROM tab1, tab2 AS cor0
----
33

query I rowsort
SELECT col0 + - 42 - col0 AS col0 FROM tab2
----
-42
-42
-42

query I rowsort
SELECT + ( - 98 ) FROM tab0, tab1 AS cor0
----
9 values hashing to f17b7008a7deae1eb5a2e707ec237638

query I rowsort
SELECT 41 + 91 AS col1 FROM tab1, tab2, tab2 AS cor0, tab0
----
81 values hashing to dd8270119d6c670ffa233a2d52027efe

onlyif mysql # use DIV operator for integer division
query I rowsort label-2579
SELECT col0 * + col0 + tab0.col0 DIV + col1 AS col1 FROM tab0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-2579
SELECT col0 * + col0 + tab0.col0 / + col1 AS col1 FROM tab0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-2580
SELECT ALL - tab1.col0 DIV col1 - - col2 AS col1 FROM tab1
----
51
54
90

skipif mysql # not compatible
query I rowsort label-2580
SELECT ALL - tab1.col0 / col1 - - col2 AS col1 FROM tab1
----
51
54
90

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 WHERE NOT NULL IN ( - col2 )
----

query I rowsort
SELECT + col2 * col1 * + tab2.col0 FROM tab2
----
119652
51034
5859

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL IN ( - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2584
SELECT - col2 + col0 * col2 DIV col2 FROM tab0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-2584
SELECT - col2 + col0 * col2 / col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT col2 + - col1 AS col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT ALL col2 * + col0 AS col1 FROM tab1
----
162
3648
7680

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT - col2 + col1 NOT IN ( col0 + - col0 )
----

query I rowsort
SELECT DISTINCT col1 * + col1 + - col1 * - col1 FROM tab0
----
14792
16562
18818

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col1 * col0 col1 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT - col0 - col2 AS col0 FROM tab2 AS cor0
----
-104
-117
-34

query III rowsort
SELECT * FROM tab0 cor0 WHERE + cor0.col0 * - col2 = ( NULL )
----

query I rowsort
SELECT tab1.col0 + tab1.col2 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL - col1 * + col2 AS col0 FROM tab1
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-2594
SELECT ALL - - cor0.col0 * col1 + col2 DIV + col1 AS col1 FROM tab1 AS cor0
----
1047
645
80

skipif mysql # not compatible
query I rowsort label-2594
SELECT ALL - - cor0.col0 * col1 + col2 / + col1 AS col1 FROM tab1 AS cor0
----
1047
645
80

query I rowsort
SELECT DISTINCT - cor0.col0 * - col0 - - cor0.col0 AS col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL - col2 + - col2 AS col2 FROM tab0 AS cor0
----
-164
-2
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col2 col0 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT cor0.col2 + col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - col0 * col1 * + col2 + - col0 * cor0.col1 FROM tab1 AS cor0
----
-100880
-37120
-4290

query I rowsort
SELECT ALL - col2 * - col1 - + col1 * - col2 AS col2 FROM tab2 AS cor0
----
1292
1674
3068

onlyif mysql # use DIV operator for integer division
query I rowsort label-2601
SELECT ALL + + col0 + col1 + col2 DIV col0 FROM tab0 AS cor0
----
111
132
180

skipif mysql # not compatible
query I rowsort label-2601
SELECT ALL + + col0 + col1 + col2 / col0 FROM tab0 AS cor0
----
111
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - col1 * col1 col2 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT DISTINCT + col2 * + col1 * col2 + + col1 + - col0 FROM tab1 cor0
----
119741
32436
75839

onlyif mysql # use DIV operator for integer division
query I rowsort label-2604
SELECT - tab2.col0 DIV tab2.col1 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-2604
SELECT - tab2.col0 / tab2.col1 FROM tab2
----
-1
-4
0

query I rowsort
SELECT col2 * tab1.col0 AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - + col1 * - col1 - + cor0.col0 AS col2 FROM tab0 cor0
----
7372
8192
9374

query I rowsort
SELECT ALL - col2 + cor0.col0 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-2608
SELECT + - ( col1 ) DIV + col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2608
SELECT + - ( col1 ) / + col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT - 91 * - col1 AS col2 FROM tab0
----
7826
8281
8827

query I rowsort
SELECT DISTINCT col1 + + col0 AS col1 FROM tab0
----
110
132
180

query I rowsort
SELECT tab0.col2 + + col0 * - 19 AS col0 FROM tab0
----
-1609
-423
-664

query I rowsort
SELECT ALL + col1 * col0 * + col1 FROM tab2
----
22831
271518
6727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col1 col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-2614
SELECT ALL + + cor0.col2 * col1 DIV 31 FROM tab0 AS cor0
----
240
3
91

skipif mysql # not compatible
query I rowsort label-2614
SELECT ALL + + cor0.col2 * col1 / 31 FROM tab0 AS cor0
----
240
3
91

query I rowsort
SELECT DISTINCT - + col2 + col0 * col1 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-2616
SELECT ALL - col0 DIV - col0 - - col1 AS col2 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-2616
SELECT ALL - col0 / - col0 - - col1 AS col2 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT col0 + col0 * col1 * - col0 - col2 * ( col0 ) FROM tab2 cor0
----
-109020
-1701
-360906

query I rowsort
SELECT + + col2 - col1 * col0 FROM tab1 cor0
----
-24
-583
-944

query I rowsort
SELECT ALL + col1 + + ( col1 ) AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT - col1 - - ( 18 * col1 ) AS col2 FROM tab2 cor0
----
1003
289
527

query I rowsort
SELECT - - col0 * - 51 + + col0 FROM tab1 AS cor0
----
-150
-3200
-4000

onlyif mysql # use DIV operator for integer division
query I rowsort label-2622
SELECT tab0.col2 * col1 + - ( + col0 ) DIV + col0 FROM tab0
----
2837
7461
96

skipif mysql # not compatible
query I rowsort label-2622
SELECT tab0.col2 * col1 + - ( + col0 ) / + col0 FROM tab0
----
2837
7461
96

query I rowsort
SELECT + tab1.col2 * + col0 * + col2 FROM tab1
----
207936
737280
8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-2624
SELECT DISTINCT col1 * col0 + + col1 DIV col1 AS col2 FROM tab2
----
1344
218
4603

skipif mysql # not compatible
query I rowsort label-2624
SELECT DISTINCT col1 * col0 + + col1 / col1 AS col2 FROM tab2
----
1344
218
4603

query I rowsort
SELECT - col0 + - col0 AS col1 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT DISTINCT col2 + tab0.col1 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT col1 AS col0 FROM tab2 WHERE NULL NOT IN ( + col2 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT ( col0 + col2 + col0 ) NOT BETWEEN NULL AND col0 - + col1 * - col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2629
SELECT DISTINCT col2 + - col2 DIV + col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2629
SELECT DISTINCT col2 + - col2 / + col1 FROM tab0
----
1
33
82

query I rowsort
SELECT col1 + col1 * col0 AS col0 FROM tab2
----
1360
248
4661

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL = ( - col2 )
----

query I rowsort
SELECT col2 * - col2 * col2 + + col2 + + col0 FROM tab2
----
-17472
-19649
-54755

query I rowsort
SELECT tab1.col0 - - col0 AS col1 FROM tab1
----
128
160
6

query I rowsort
SELECT - col0 * col1 + col0 FROM tab2 WHERE ( NULL ) BETWEEN + col1 + col2 * + col1 AND - col0
----

query I rowsort
SELECT DISTINCT - col1 - col1 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT col1 AS col2 FROM tab0 WHERE NOT NULL NOT BETWEEN NULL AND col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col1 FROM tab2 WHERE col0 * tab2.col0 BETWEEN NULL AND ( + col2 )
----

query III rowsort
SELECT * FROM tab1 WHERE NULL BETWEEN col2 AND + col0
----

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab2 WHERE NOT - col1 <> NULL
----

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT IN ( - tab0.col0 )
----

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL IN ( col2 * - col2 )
----

query III rowsort
SELECT * FROM tab2 WHERE NULL NOT IN ( - col1 )
----

query I rowsort
SELECT + col0 * - cor0.col0 + col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT cor0.col0 * 27 AS col2 FROM tab1 AS cor0
----
1728
2160
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + - ( 12 ) + + col0 col0 FROM tab0 AS cor0
----
159
24
45

query I rowsort
SELECT - cor0.col0 + col2 * - 48 + cor0.col2 FROM tab1 AS cor0
----
-2541
-2743
-4592

query I rowsort
SELECT + col0 * - ( - cor0.col1 ) FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - tab2.col2 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT + + 74 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT DISTINCT 91 + - tab1.col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
-5
34
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2651
SELECT DISTINCT - tab1.col2 * - CAST( NULL AS SIGNED ) / + 26 AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2651
SELECT DISTINCT - tab1.col2 * - CAST ( NULL AS INTEGER ) / + 26 AS col1 FROM tab1
----
NULL

query I rowsort
SELECT - + 95 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to cf302b83f15b730fe35c19bdd9363c13

query I rowsort
SELECT - cor0.col0 * - col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + 50 * + 96 FROM tab1 AS cor0
----
4800
4800
4800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 49 col2 FROM tab2, tab0 cor0, tab2 cor1, tab2 AS cor2
----
49

query I rowsort
SELECT + tab2.col0 * - tab2.col1 + 35 AS col2 FROM tab2
----
-1308
-182
-4567

query I rowsort
SELECT DISTINCT - + 31 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
-31

query I rowsort
SELECT col1 + col0 + col2 FROM tab2 AS cor0
----
134
163
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2659
SELECT + CAST( NULL AS SIGNED ) col1 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2659
SELECT + CAST ( NULL AS INTEGER ) col1 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab1, tab2 AS cor0
----
43

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT + 86 + + col2 AS col2 FROM tab1 AS cor0
----
140
143
182

query I rowsort
SELECT ALL 99 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT DISTINCT + 36 + - col0 FROM tab1 cor0
----
-28
-44
33

query I rowsort
SELECT + 75 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to e61b59795204c348103a58c0a8e4ce16

query I rowsort
SELECT DISTINCT - cor0.col1 * + col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT col2 * - col0 - col0 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT ALL ( + col2 ) + - ( 55 ) AS col1 FROM tab2 AS cor0
----
-17
-28
-29

query I rowsort
SELECT + - 83 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to d55748f39f403ec273099c0d87b0bfbb

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - 22 - - col2 FROM tab1 AS cor0
----
32
35
74

query I rowsort
SELECT - col0 * + col0 - 89 AS col1 FROM tab0 AS cor0
----
-1314
-665
-8010

query I rowsort
SELECT DISTINCT + 73 AS col1 FROM tab2 cor0
----
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-2674
SELECT + col2 DIV + col2 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2674
SELECT + col2 / + col2 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT + + cor0.col2 * + 65 AS col1 FROM tab0 cor0
----
2145
5330
65

query I rowsort
SELECT col1 * cor0.col0 * 88 AS col1 FROM tab1 AS cor0
----
56320
6864
91520

query I rowsort
SELECT + col1 + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT ( + 2 ) FROM tab0
----
2
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 50 + - 31 col2 FROM tab0 AS cor0
----
-81

query I rowsort
SELECT DISTINCT 29 AS col2 FROM tab0, tab2 AS cor0
----
29

query I rowsort
SELECT - + col2 - + col2 * col1 FROM tab1 AS cor0
----
-1344
-1458
-627

onlyif mysql # use DIV operator for integer division
query I rowsort label-2682
SELECT ALL + - col1 DIV col0 AS col1 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2682
SELECT ALL + - col1 / col0 AS col1 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT ALL - col2 * col2 + + col2 * col2 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col1 * - col0 + col1 * col0 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2685
SELECT ALL + - CAST( 27 AS SIGNED ) + - col0 + col2 FROM tab2 AS cor0
----
-68
-7
-79

skipif mysql # not compatible
query I rowsort label-2685
SELECT ALL + - CAST ( 27 AS INTEGER ) + - col0 + col2 FROM tab2 AS cor0
----
-68
-7
-79

query I rowsort
SELECT 70 * + ( - cor0.col2 * + ( - ( cor0.col2 ) ) ) FROM tab1, tab1 cor0
----
9 values hashing to 0a3723ea70e4742dac6169ab11844a27

query I rowsort
SELECT + col0 * - 45 + col2 * - col1 AS col0 FROM tab1
----
-1539
-3450
-4848

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

query I rowsort
SELECT + ( + col1 ) + tab2.col1 + 43 FROM tab2
----
105
161
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2690
SELECT DISTINCT CAST( NULL AS SIGNED ) + col0 AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2690
SELECT DISTINCT CAST ( NULL AS INTEGER ) + col0 AS col1 FROM tab1
----
NULL

query I rowsort
SELECT ALL - col0 - + col1 * - col2 FROM tab2
----
1456
567
830

query I rowsort
SELECT ( col2 ) - + col0 AS col1 FROM tab0
----
-34
-7
9

query I rowsort
SELECT - col0 * col1 + tab2.col2 + 47 FROM tab2
----
-1258
-143
-4529

onlyif mysql # use DIV operator for integer division
query I rowsort label-2694
SELECT ALL col1 - + tab0.col0 DIV col0 AS col0 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-2694
SELECT ALL col1 - + tab0.col0 / col0 AS col0 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort
SELECT ( + 65 ) * col2 + CAST ( 57 AS REAL ) - + cor0.col2 AS col1 FROM tab2 AS cor0
----
1721
1785
2489

onlyif mysql # use DIV operator for integer division
query I rowsort label-2696
SELECT ( col2 ) DIV col0 + col0 AS col1 FROM tab0 cor0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-2696
SELECT ( col2 ) / col0 + col0 AS col1 FROM tab0 cor0
----
25
35
89

query I rowsort
SELECT DISTINCT ( 99 ) * + col2 * 2 + col0 * - col0 * col1 AS col2 FROM tab1
----
-29674
-64192
10458

query I rowsort
SELECT DISTINCT - 2 * + col1 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT - + 6 * + tab2.col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 8d9424bd479441526ca448b72d75b622

onlyif mysql # use DIV operator for integer division
query I rowsort label-2700
SELECT DISTINCT cor0.col0 + col0 DIV col2 FROM tab1 AS cor0
----
3
65
80

skipif mysql # not compatible
query I rowsort label-2700
SELECT DISTINCT cor0.col0 + col0 / col2 FROM tab1 AS cor0
----
3
65
80

query I rowsort
SELECT DISTINCT 94 AS col1 FROM tab2, tab2 cor0, tab0 cor1
----
94

query I rowsort
SELECT 66 AS col0 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 897b6122ac98340b78905f39d81897fc

query I rowsort
SELECT DISTINCT + 26 AS col2 FROM tab1
----
26

query I rowsort
SELECT 16 * col2 AS col0 FROM tab1
----
1536
864
912

query I rowsort
SELECT - cor0.col2 * - 92 FROM tab2 cor0
----
2392
2484
3496

query I rowsort
SELECT DISTINCT cor0.col1 + + 85 AS col0 FROM tab2 AS cor0
----
102
116
144

query I rowsort
SELECT ALL + col0 * col0 + col1 * col2 FROM tab2 AS cor0
----
6887
7618
886

query I rowsort
SELECT ALL col2 + - ( - 67 ) AS col1 FROM tab0 AS cor0
----
100
149
68

query I rowsort
SELECT + col2 + + 89 AS col2 FROM tab2 AS cor0
----
115
116
127

onlyif mysql # use DIV operator for integer division
query I rowsort label-2710
SELECT col0 DIV cor0.col1 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-2710
SELECT col0 / cor0.col1 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT ALL col1 + + 87 FROM tab1 AS cor0
----
100
113
97

query I rowsort
SELECT DISTINCT col2 * 31 + - col0 AS col2 FROM tab1 AS cor0
----
1671
1703
2896

query I rowsort
SELECT DISTINCT 79 AS col1 FROM tab1, tab1 AS cor0
----
79

query I rowsort
SELECT col0 * 3 AS col2 FROM tab1 AS cor0
----
192
240
9

query I rowsort
SELECT ALL - col2 + + col0 * + col2 AS col1 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT + + col2 + 45 FROM tab0 AS cor0
----
127
46
78

query I rowsort
SELECT DISTINCT + 46 FROM tab2, tab0 AS cor0
----
46

query I rowsort
SELECT DISTINCT - - col1 * + col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL col1 * 65 + - 38 AS col1 FROM tab0 cor0
----
5552
5877
6267

query I rowsort
SELECT ALL + - col1 * - cor0.col0 + + cor0.col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL + ( cor0.col0 ) - col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL - col2 * + 66 AS col1 FROM tab1 AS cor0
----
-3564
-3762
-6336

query I rowsort
SELECT - - cor0.col1 + cor0.col0 * + col1 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL cor0.col1 - - 25 * - col1 FROM tab1 AS cor0
----
-240
-312
-624

query I rowsort
SELECT ALL - + ( + ( col1 ) ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + ( 40 ) FROM tab0 AS cor0
----
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( + cor0.col0 ) col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - col1 col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL 0 + 33 AS col0 FROM tab1 AS cor0
----
33
33
33

query I rowsort
SELECT DISTINCT + cor0.col0 * - col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col0 - tab1.col2 col1 FROM tab1
----
24
583
944

query I rowsort
SELECT ALL - + 65 * - col1 AS col1 FROM tab2 cor0
----
1105
2015
3835

query I rowsort
SELECT DISTINCT - col2 + col1 * - col2 * col0 FROM tab0 AS cor0
----
-3396
-664200
-68145

onlyif mysql # use DIV operator for integer division
query I rowsort label-2734
SELECT ALL + col0 DIV cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2734
SELECT ALL + col0 / cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col2 * - col1 + - col0 FROM tab1 AS cor0
----
-1328
-1407
-634

onlyif mysql # use DIV operator for integer division
query I rowsort label-2736
SELECT + col2 + - col1 DIV + 76 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2736
SELECT + col2 + - col1 / + 76 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + + col0 + cor0.col2 AS col1 FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 99 + + col1 col2 FROM tab0 AS cor0
----
185
190
196

query I rowsort
SELECT 77 * + col2 AS col2 FROM tab0 AS cor0
----
2541
6314
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-2740
SELECT + col2 DIV - col0 + + col1 AS col1 FROM tab2 AS cor0
----
17
28
59

skipif mysql # not compatible
query I rowsort label-2740
SELECT + col2 / - col0 + + col1 AS col1 FROM tab2 AS cor0
----
17
28
59

query I rowsort
SELECT ALL + - col0 + col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT - + 74 + + col0 FROM tab0 AS cor0
----
-39
-50
15

query I rowsort
SELECT ALL + col2 * + col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - col1 * - col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2745
SELECT DISTINCT col2 * CAST( NULL AS SIGNED ) + 21 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2745
SELECT DISTINCT col2 * CAST ( NULL AS INTEGER ) + 21 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col2 + 9 * - col0 FROM tab0 cor0
----
-183
-314
-719

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * col2 col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + + col2 * 54 AS col1 FROM tab0 AS cor0
----
1782
4428
54

query I rowsort
SELECT DISTINCT cor0.col0 * col1 * 25 AS col0 FROM tab1 AS cor0
----
16000
1950
26000

query I rowsort
SELECT ALL - col2 * col1 + 43 FROM tab0 AS cor0
----
-2795
-54
-7419

query I rowsort
SELECT + col1 + col0 * cor0.col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + 40 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT DISTINCT tab2.col0 + - col0 FROM tab2
----
0

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab0 AS cor0, tab2 cor1
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2755
SELECT ALL + CAST( + ( + col2 ) + + col2 AS SIGNED ) * col1 AS col0 FROM tab2
----
1292
1674
3068

skipif mysql # not compatible
query I rowsort label-2755
SELECT ALL + CAST ( + ( + col2 ) + + col2 AS INTEGER ) * col1 AS col0 FROM tab2
----
1292
1674
3068

query I rowsort
SELECT DISTINCT ( - 4 ) FROM tab1
----
-4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2757
SELECT + CAST( NULL AS SIGNED ) * - 73 - - cor0.col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2757
SELECT + CAST ( NULL AS INTEGER ) * - 73 - - cor0.col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2758
SELECT cor0.col2 + col0 DIV + col0 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-2758
SELECT cor0.col2 + col0 / + col0 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT - + 15 FROM tab1 AS cor0
----
-15
-15
-15

query I rowsort
SELECT - + 30 + - col2 * col0 FROM tab0 AS cor0
----
-65
-7328
-822

query I rowsort
SELECT - 6 + col1 AS col1 FROM tab1 AS cor0
----
20
4
7

query I rowsort
SELECT - col2 + - cor0.col0 * - col0 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT ALL tab0.col0 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT 28 FROM tab0, tab0 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT - col1 + - col2 * ( 6 * col2 ) FROM tab2 AS cor0
----
-4115
-4405
-8681

query I rowsort
SELECT - - cor0.col2 + + col1 * + cor0.col2 AS col1 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT + + col1 + cor0.col1 FROM tab2 AS cor0
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2768
SELECT col0 * 52 DIV col2 AS col2 FROM tab1 AS cor0
----
2
43
58

skipif mysql # not compatible
query I rowsort label-2768
SELECT col0 * 52 / col2 AS col2 FROM tab1 AS cor0
----
2
43
58

query I rowsort
SELECT ALL - - cor0.col2 * - cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f44e9f422bf83873be9594c18a0b2fe0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2770
SELECT ALL - + col1 * + CAST( - col0 * col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
118825
49536
720811

skipif mysql # not compatible
query I rowsort label-2770
SELECT ALL - + col1 * + CAST ( - col0 * col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT ALL col2 + - 83 AS col1 FROM tab0 AS cor0
----
-1
-50
-82

query I rowsort
SELECT ALL 73 * - tab0.col1 FROM tab0
----
-6278
-6643
-7081

query I rowsort
SELECT + ( col0 ) + + 13 * + col1 AS col1 FROM tab1
----
194
249
341

onlyif mysql # use DIV operator for integer division
query I rowsort label-2774
SELECT cor0.col0 DIV - cor0.col1 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-2774
SELECT cor0.col0 / - cor0.col1 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT - col2 + - col2 * + ( + cor0.col1 ) AS col1 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT - - col0 + ( - col0 ) * col0 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT col1 * 56 AS col2 FROM tab1 AS cor0
----
1456
560
728

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to caf6adb9936510208f5945a7e5c76f14

query I rowsort
SELECT DISTINCT + 89 AS col0 FROM tab1, tab0 AS cor0
----
89

query I rowsort
SELECT + 43 * + col2 AS col2 FROM tab1 AS cor0
----
2322
2451
4128

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to 263f0eb7d5dfd4076c74918bc141bd9b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 + col2 * - cor0.col1 col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT + + col2 * 46 AS col2 FROM tab2 AS cor0
----
1196
1242
1748

query I rowsort
SELECT DISTINCT - ( col1 ) + col2 FROM tab1 cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2785
SELECT - ( + col2 ) DIV col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2785
SELECT - ( + col2 ) / col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT + ( + 74 ) AS col2 FROM tab0 AS cor0
----
74
74
74

query I rowsort
SELECT DISTINCT 26 + - cor0.col0 FROM tab0 cor0
----
-63
-9
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-2788
SELECT DISTINCT + col2 DIV 78 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-2788
SELECT DISTINCT + col2 / 78 FROM tab1
----
0
1

query I rowsort
SELECT DISTINCT - col2 * col1 * ( - col1 ) FROM tab1
----
16224
36504
5700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2790
SELECT ALL + CAST( NULL AS SIGNED ) AS col2 FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2790
SELECT ALL + CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-2791
SELECT ALL - 63 DIV - cor0.col1 FROM tab0, tab0 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

skipif mysql # not compatible
query I rowsort label-2791
SELECT ALL - 63 / - cor0.col1 FROM tab0, tab0 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

query I rowsort
SELECT + 82 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT ALL + ( - col0 * + col1 ) FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT + 1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT + col1 + + ( - col2 ) * - col1 AS col2 FROM tab1
----
1261
1430
580

query I rowsort
SELECT tab0.col2 + + col2 AS col1 FROM tab0
----
164
2
66

query I rowsort
SELECT - + col1 + cor0.col2 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - 4 * cor0.col2 AS col2 FROM tab2, tab1 AS cor0, tab1 cor1
----
27 values hashing to 548c624524ba72c74b45c6a6f146f79b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col1 col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL col0 + col0 AS col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT cor0.col2 * cor0.col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT 70 * - col2 FROM tab2 AS cor0
----
-1820
-1890
-2660

query I rowsort
SELECT cor1.col0 FROM tab1, tab2 cor0, tab0, tab2 AS cor1
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

query I rowsort
SELECT 51 * cor0.col2 AS col2 FROM tab0 AS cor0
----
1683
4182
51

query I rowsort
SELECT DISTINCT - + col1 - col2 * ( col1 + + col0 ) AS col2 FROM tab1 AS cor0
----
-1592
-4228
-8941

query I rowsort
SELECT - - 63 + col1 * 72 AS col1 FROM tab1 AS cor0
----
1935
783
999

query I rowsort
SELECT DISTINCT ( col0 ) + - col0 * col0 * col2 AS col2 FROM tab2 AS cor0
----
-1316
-158106
-237079

query I rowsort
SELECT DISTINCT col2 * - cor0.col1 + cor0.col1 - - cor0.col0 * col1 AS col1 FROM tab2 AS cor0
----
-589
3127
714

query I rowsort
SELECT ALL - + 50 AS col0 FROM tab1 AS cor0
----
-50
-50
-50

query I rowsort
SELECT + 65 * col1 AS col0 FROM tab1 AS cor0
----
1690
650
845

query I rowsort
SELECT ALL + cor0.col0 + col2 * + col1 AS col0 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2812
SELECT ALL + col0 - - CAST( col2 * col2 AS SIGNED ) FROM tab2 AS cor0
----
1523
736
754

skipif mysql # not compatible
query I rowsort label-2812
SELECT ALL + col0 - - CAST ( col2 * col2 AS INTEGER ) FROM tab2 AS cor0
----
1523
736
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-2813
SELECT DISTINCT - col0 + + 39 DIV 59 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-2813
SELECT DISTINCT - col0 + + 39 / 59 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2814
SELECT DISTINCT - col1 + ( + 88 ) DIV - col1 AS col0 FROM tab2 AS cor0
----
-22
-33
-60

skipif mysql # not compatible
query I rowsort label-2814
SELECT DISTINCT - col1 + ( + 88 ) / - col1 AS col0 FROM tab2 AS cor0
----
-22
-33
-60

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab1 cor1, tab1, tab2 AS cor2
----
3645 values hashing to b6efe6f7ec1a3daa3cc6ea9dd7d13455

query I rowsort
SELECT ALL + col1 * col0 - 94 AS col1 FROM tab2 AS cor0
----
123
1249
4508

query I rowsort
SELECT ( col0 ) * + tab1.col0 + col2 * + col1 FROM tab1
----
1413
4666
7648

query I rowsort
SELECT DISTINCT - ( + 94 ) + - col0 AS col0 FROM tab0 AS cor0
----
-118
-129
-183

query I rowsort
SELECT DISTINCT + 22 FROM tab0, tab0 AS cor0
----
22

query I rowsort
SELECT ALL - + col2 + 82 AS col1 FROM tab1 cor0
----
-14
25
28

query I rowsort
SELECT ALL + + col2 * + col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - ( - 41 ) AS col2 FROM tab2 AS cor0
----
41

query I rowsort
SELECT + ( - cor0.col0 ) + col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - 72 + col2 * - col0 AS col2 FROM tab1 AS cor0
----
-234
-3720
-7752

query I rowsort
SELECT DISTINCT 22 FROM tab2, tab0 AS cor0
----
22

query I rowsort
SELECT - col2 + + ( col0 ) FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2827
SELECT ALL CAST( col2 AS SIGNED ) AS col1 FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2827
SELECT ALL CAST ( col2 AS INTEGER ) AS col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL + 31 * + 46 AS col1 FROM tab0 cor0
----
1426
1426
1426

query I rowsort
SELECT ALL 88 * + col2 * col1 AS col2 FROM tab1 AS cor0
----
109824
123552
50160

query I rowsort
SELECT DISTINCT - col1 + + col2 + - col0 * 3 * col0 FROM tab1 AS cor0
----
-12241
-19117
1

query I rowsort
SELECT DISTINCT - ( - ( col0 ) ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - tab2.col2 * + 32 AS col0 FROM tab2
----
-1216
-832
-864

query I rowsort
SELECT + 87 * tab0.col2 * col2 - - col0 * + 0 AS col2 FROM tab0
----
584988
87
94743

onlyif mysql # use DIV operator for integer division
query I rowsort label-2834
SELECT col0 DIV + col2 + col2 AS col2 FROM tab1
----
54
58
96

skipif mysql # not compatible
query I rowsort label-2834
SELECT col0 / + col2 + col2 AS col2 FROM tab1
----
54
58
96

query I rowsort
SELECT + 45 * + col0 * col2 FROM tab0 AS cor0
----
1575
328410
35640

query I rowsort
SELECT ALL + + col1 * - cor0.col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - 32 * - col2 * - col1 FROM tab2
----
-20672
-26784
-49088

onlyif mysql # use DIV operator for integer division
query I rowsort label-2838
SELECT - 34 * - cor0.col0 + ( - col0 + - cor0.col1 ) DIV + col1 AS col1 FROM tab0 AS cor0
----
1189
3025
815

skipif mysql # not compatible
query I rowsort label-2838
SELECT - 34 * - cor0.col0 + ( - col0 + - cor0.col1 ) / + col1 AS col1 FROM tab0 AS cor0
----
1189
3025
815

query I rowsort
SELECT + 60 AS col2 FROM tab2
----
60
60
60

query I rowsort
SELECT ALL + 75 + 10 AS col0 FROM tab0
----
85
85
85

query I rowsort
SELECT DISTINCT + 33 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
33

query I rowsort
SELECT - col1 * - col0 * - col2 FROM tab2
----
-119652
-51034
-5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2844
SELECT ALL col1 * - col1 + + tab0.col1 * CAST( - col1 AS SIGNED ) + col1 FROM tab0
----
-14706
-16471
-18721

skipif mysql # not compatible
query I rowsort label-2844
SELECT ALL col1 * - col1 + + tab0.col1 * CAST ( - col1 AS INTEGER ) + col1 FROM tab0
----
-14706
-16471
-18721

query I rowsort
SELECT ALL - 57 AS col0 FROM tab2
----
-57
-57
-57

query I rowsort
SELECT ( + col0 ) + + 41 FROM tab0
----
130
65
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col0 col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT - 90 * col0 * - 36 + col0 FROM tab0
----
113435
288449
77784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 42 col0 FROM tab1 cor0
----
42

query I rowsort
SELECT + col0 * - col0 * + col2 AS col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL + 52 FROM tab0 AS cor0
----
52
52
52

query I rowsort
SELECT ALL + 94 * cor0.col1 FROM tab2 AS cor0
----
1598
2914
5546

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + cor0.col2 col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - tab0.col1 + 8 * 89 AS col0 FROM tab0
----
615
621
626

query I rowsort
SELECT - col2 * tab2.col1 + + col0 * - col0 FROM tab2
----
-6887
-7618
-886

query I rowsort
SELECT - col2 * ( - col0 ) * col1 FROM tab1
----
36480
4212
99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + tab2.col1 - col2 col0 FROM tab2
----
-4
35
92

query I rowsort
SELECT DISTINCT + tab1.col0 - - col2 AS col1 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2859
SELECT col2 - + 3 * - col2 DIV - col2 AS col2 FROM tab0 cor0
----
-2
30
79

skipif mysql # not compatible
query I rowsort label-2859
SELECT col2 - + 3 * - col2 / - col2 AS col2 FROM tab0 cor0
----
-2
30
79

query I rowsort
SELECT DISTINCT - - cor0.col1 * 88 + 47 FROM tab2 AS cor0
----
1543
2775
5239

query I rowsort
SELECT ALL cor0.col0 * 6 + - col2 AS col2 FROM tab0 AS cor0
----
111
209
452

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0, tab0 AS cor0, tab2 cor1
----
1
33
82

query I rowsort
SELECT + col1 - - ( col2 ) * - cor0.col0 FROM tab0 AS cor0
----
-706
-7207
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2864
SELECT DISTINCT col0 * + ( + tab1.col2 ) + - col0 DIV col0 FROM tab1
----
161
3647
7679

skipif mysql # not compatible
query I rowsort label-2864
SELECT DISTINCT col0 * + ( + tab1.col2 ) + - col0 / col0 FROM tab1
----
161
3647
7679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2865
SELECT ALL + CAST( NULL AS SIGNED ) * + 98 + col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2865
SELECT ALL + CAST ( NULL AS INTEGER ) * + 98 + col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 82 + col1 AS col0 FROM tab0 AS cor0
----
15
4
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2867
SELECT ALL + ( col0 ) DIV cor0.col1 + ( col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2867
SELECT ALL + ( col0 ) / cor0.col1 + ( col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2868
SELECT 43 DIV + col2 + col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-2868
SELECT 43 / + col2 + col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - 55 * cor0.col0 - col1 AS col2 FROM tab1 AS cor0
----
-191
-3530
-4413

query I rowsort
SELECT + ( col0 ) - col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2871
SELECT ALL CAST( NULL AS DECIMAL ) * - col2 * + col0 + - col1 + - col2 * col1 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2871
SELECT ALL CAST ( NULL AS REAL ) * - col2 * + col0 + - col1 + - col2 * col1 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 9 AS col0 FROM tab0 AS cor0
----
9
9
9

query I rowsort
SELECT - + ( - 12 ) * + col1 FROM tab2 AS cor0
----
204
372
708

query I rowsort
SELECT ALL + 40 AS col0 FROM tab0 AS cor0
----
40
40
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-2875
SELECT DISTINCT - - 28 DIV + col0 + col0 AS col2 FROM tab1 AS cor0
----
12
64
80

skipif mysql # not compatible
query I rowsort label-2875
SELECT DISTINCT - - 28 / + col0 + col0 AS col2 FROM tab1 AS cor0
----
12
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2876
SELECT DISTINCT - CAST( + col1 AS SIGNED ) * col2 AS col0 FROM tab1 cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-2876
SELECT DISTINCT - CAST ( + col1 AS INTEGER ) * col2 AS col0 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT - + cor0.col2 + 4 * col0 FROM tab0 cor0
----
139
274
63

query I rowsort
SELECT ALL col1 + + col1 * col2 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL - tab1.col0 * col0 AS col2 FROM tab1
----
-4096
-6400
-9

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 - col2 + - col2 * col0 AS col0 FROM tab2
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT - 98 AS col2 FROM tab2, tab2 AS cor0
----
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2883
SELECT + 49 DIV 76 AS col1 FROM tab2, tab1 AS cor0, tab1 cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-2883
SELECT + 49 / 76 AS col1 FROM tab2, tab1 AS cor0, tab1 cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT ( col0 + 72 ) AS col0 FROM tab2
----
150
151
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2885
SELECT - cor0.col1 - col0 DIV col1 FROM tab2 AS cor0
----
-21
-31
-60

skipif mysql # not compatible
query I rowsort label-2885
SELECT - cor0.col1 - col0 / col1 FROM tab2 AS cor0
----
-21
-31
-60

onlyif mysql # use DIV operator for integer division
query I rowsort label-2886
SELECT + col1 DIV + ( 81 * col1 ) AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2886
SELECT + col1 / + ( 81 * col1 ) AS col1 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2887
SELECT + col1 + CAST( NULL AS SIGNED ) / - 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-2887
SELECT + col1 + CAST ( NULL AS INTEGER ) / - col1 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col0 - - cor0.col0 col0 FROM tab2 cor0
----
-182
-1950
-2923

query I rowsort
SELECT - col0 + 97 * cor0.col1 - col0 FROM tab2 AS cor0
----
1491
2993
5567

onlyif mysql # use DIV operator for integer division
query I rowsort label-2890
SELECT + + col0 DIV - col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2890
SELECT + + col0 / - col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + col0 * cor0.col2 - col1 AS col2 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT ALL - - 72 * - col2 AS col1 FROM tab1 AS cor0
----
-3888
-4104
-6912

query I rowsort
SELECT - col1 + - 87 AS col0 FROM tab0 cor0
----
-173
-178
-184

query I rowsort
SELECT 79 * - col0 + - col0 FROM tab1 AS cor0
----
-240
-5120
-6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-2895
SELECT + 58 * ( col2 ) + - col1 DIV - 1 AS col1 FROM tab2 cor0
----
1567
1597
2221

skipif mysql # not compatible
query I rowsort label-2895
SELECT + 58 * ( col2 ) + - col1 / - 1 AS col1 FROM tab2 cor0
----
1567
1597
2221

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + + col0 col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - + 70 AS col2 FROM tab2 AS cor0
----
-70

query I rowsort
SELECT ALL + ( - col2 ) * + col2 AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT 50 AS col2 FROM tab1 AS cor0
----
50
50
50

query I rowsort
SELECT - col1 + - 54 AS col0 FROM tab0 AS cor0
----
-140
-145
-151

query I rowsort
SELECT + cor0.col2 * + 71 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 4d1111acc6df6dc2dcb69f3857e0ac2d

query I rowsort
SELECT + 66 * cor0.col1 AS col1 FROM tab1 AS cor0
----
1716
660
858

query I rowsort
SELECT - + col0 + cor0.col2 + - col1 AS col2 FROM tab0 AS cor0
----
-131
-77
-98

query I rowsort
SELECT - 16 FROM tab0 cor0
----
-16
-16
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col2 col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL - col1 * + col2 * + col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT + col0 * col0 + - cor0.col2 + + col1 FROM tab0 cor0
----
1321
629
7930

query I rowsort
SELECT + - 77 FROM tab1 AS cor0
----
-77
-77
-77

query I rowsort
SELECT + 44 * col0 + - col1 FROM tab0 cor0
----
1443
3825
970

query I rowsort
SELECT DISTINCT + + col2 + col2 AS col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT DISTINCT + + col1 + + col2 * - col2 * + col2 FROM tab1 AS cor0
----
-157438
-185183
-884723

query I rowsort
SELECT 67 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT - col2 * 22 AS col1 FROM tab0 cor0
----
-1804
-22
-726

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT col0 * 65 FROM tab2
----
455
5070
5135

query I rowsort
SELECT + 95 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2917
SELECT + col1 * CAST( 78 AS SIGNED ) AS col2 FROM tab2
----
1326
2418
4602

skipif mysql # not compatible
query I rowsort label-2917
SELECT + col1 * CAST ( 78 AS INTEGER ) AS col2 FROM tab2
----
1326
2418
4602

query I rowsort
SELECT 71 * - cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 432b8119e85884c1f8e9e321e4d09124

query I rowsort
SELECT - col2 * + col2 * col1 AS col0 FROM tab2
----
-22599
-24548
-39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + 1 col1 FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2921
SELECT ALL + col0 DIV - col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2921
SELECT ALL + col0 / - col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL ( col1 * col0 ) AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - ( 51 ) * + col0 FROM tab0 AS cor0
----
-1224
-1785
-4539

onlyif mysql # use DIV operator for integer division
query I rowsort label-2924
SELECT col0 DIV + 67 + - cor0.col2 * + col2 FROM tab0 AS cor0
----
-1
-1089
-6723

skipif mysql # not compatible
query I rowsort label-2924
SELECT col0 / + 67 + - cor0.col2 * + col2 FROM tab0 AS cor0
----
-1
-1089
-6723

query I rowsort
SELECT - - col2 + + 14 FROM tab1 AS cor0
----
110
68
71

query I rowsort
SELECT DISTINCT 90 + col1 * col1 FROM tab2
----
1051
3571
379

onlyif mysql # use DIV operator for integer division
query I rowsort label-2927
SELECT - col2 DIV - 76 + col0 * + col2 + + tab2.col1 AS col1 FROM tab2
----
2087
220
3019

skipif mysql # not compatible
query I rowsort label-2927
SELECT - col2 / - 76 + col0 * + col2 + + tab2.col1 AS col1 FROM tab2
----
2087
220
3019

query I rowsort
SELECT + 82 + - tab2.col2 AS col2 FROM tab2
----
44
55
56

query I rowsort
SELECT col1 * col1 - tab0.col2 AS col2 FROM tab0
----
7363
8199
9408

query I rowsort
SELECT 74 * col1 AS col1 FROM tab1 AS cor0
----
1924
740
962

onlyif mysql # use DIV operator for integer division
query I rowsort label-2931
SELECT - cor0.col2 + 28 DIV + col0 AS col2 FROM tab2 AS cor0
----
-23
-26
-38

skipif mysql # not compatible
query I rowsort label-2931
SELECT - cor0.col2 + 28 / + col0 AS col2 FROM tab2 AS cor0
----
-23
-26
-38

query I rowsort
SELECT ALL + col2 * 8 + - col0 FROM tab2 AS cor0
----
130
209
225

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 + 87 col2 FROM tab0
----
120
169
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-2934
SELECT cor0.col2 DIV col2 + col1 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-2934
SELECT cor0.col2 / col2 + col1 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT 39 * cor0.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 212e39fed891251f5f97cd45b6964bba

query I rowsort
SELECT ALL - 92 + col1 * col2 FROM tab0 AS cor0
----
2746
5
7370

query I rowsort
SELECT DISTINCT - 76 * col1 + col1 + - col1 * col1 AS col2 FROM tab2 AS cor0
----
-1564
-3286
-7906

query I rowsort
SELECT + + 46 * 70 AS col0 FROM tab1 AS cor0
----
3220
3220
3220

query I rowsort
SELECT DISTINCT + 63 AS col1 FROM tab0
----
63

query I rowsort
SELECT ALL - col2 + + col0 + col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL ( col0 ) * + col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - ( - 92 ) * col0 FROM tab1 cor0
----
276
5888
7360

query I rowsort
SELECT DISTINCT + - 49 + + col1 AS col2 FROM tab0 AS cor0
----
37
42
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-2944
SELECT DISTINCT - col0 DIV - ( cor0.col0 ) + - col1 FROM tab2 AS cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-2944
SELECT DISTINCT - col0 / - ( cor0.col0 ) + - col1 FROM tab2 AS cor0
----
-16
-30
-58

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 9a5ab925af18e11f7748f3b2e722ff3d

query I rowsort
SELECT DISTINCT - col1 * - 56 + + col1 AS col2 FROM tab1 cor0
----
1482
570
741

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 * cor0.col2 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-2948
SELECT ALL + - 0 DIV + col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2948
SELECT ALL + - 0 / + col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 51 * cor0.col2 + col0 FROM tab2 AS cor0
----
1384
1404
2017

query I rowsort
SELECT + 79 FROM tab1 cor0
----
79
79
79

query I rowsort
SELECT - ( 74 ) FROM tab1 AS cor0
----
-74
-74
-74

query I rowsort
SELECT - col1 + - col0 + - ( col1 ) AS col2 FROM tab1
----
-106
-55
-84

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL col0 * col2 * - col2 AS col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2955
SELECT + 70 + - col2 * + CAST( - col1 AS SIGNED ) FROM tab2 AS cor0
----
1604
716
907

skipif mysql # not compatible
query I rowsort label-2955
SELECT + 70 + - col2 * + CAST ( - col1 AS INTEGER ) FROM tab2 AS cor0
----
1604
716
907

query I rowsort
SELECT DISTINCT + + cor0.col0 * + col0 * - cor0.col0 FROM tab1 AS cor0
----
-262144
-27
-512000

onlyif mysql # use DIV operator for integer division
query I rowsort label-2957
SELECT DISTINCT + col1 * ( col1 ) + col0 DIV col2 AS col2 FROM tab0 AS cor0
----
7396
8282
9444

skipif mysql # not compatible
query I rowsort label-2957
SELECT DISTINCT + col1 * ( col1 ) + col0 / col2 AS col2 FROM tab0 AS cor0
----
7396
8282
9444

query I rowsort
SELECT ALL - col2 - + col2 * col1 FROM tab1 cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL + col2 * - col2 + ( + cor0.col0 ) AS col2 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT col0 * ( + col0 ) FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + col0 * cor0.col0 + 16 * - cor0.col1 FROM tab1 AS cor0
----
-407
3936
6192

query I rowsort
SELECT ALL + col1 + + col1 AS col2 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT - 8 * + tab2.col2 + ( - col0 ) AS col1 FROM tab2
----
-223
-286
-383

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col0 + - tab2.col0 * - ( + col0 ) * col2 col1 FROM tab2
----
1316
158106
237079

query I rowsort
SELECT col0 * col0 * col1 FROM tab1
----
234
40960
83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-2966
SELECT + tab2.col1 DIV col0 - + col2 FROM tab2
----
-23
-26
-38

skipif mysql # not compatible
query I rowsort label-2966
SELECT + tab2.col1 / col0 - + col2 FROM tab2
----
-23
-26
-38

query I rowsort
SELECT + 89 * - col0 + - col0 AS col2 FROM tab0
----
-2160
-3150
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 28 - col0 * tab1.col0 col2 FROM tab1
----
-4068
-6372
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-2969
SELECT col1 DIV - 59 + ( + cor0.col2 ) * - col1 - 39 col1 FROM tab1 AS cor0
----
-1287
-1443
-609

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2969
SELECT col1 / - 59 + ( + cor0.col2 ) * - col1 - 39 col1 FROM tab1 AS cor0
----
-1287
-1443
-609

query I rowsort
SELECT DISTINCT + col0 + col0 * 13 FROM tab1 AS cor0
----
1120
42
896

onlyif mysql # use DIV operator for integer division
query I rowsort label-2971
SELECT + + col0 + 71 DIV col0 col0 FROM tab0 AS cor0
----
26
37
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2971
SELECT + + col0 + 71 / col0 col0 FROM tab0 AS cor0
----
26
37
89

query I rowsort
SELECT DISTINCT - - col2 + col0 * cor0.col1 AS col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT + col1 + 21 * + cor0.col0 FROM tab1 AS cor0
----
1354
1693
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2974
SELECT col2 DIV + col0 col0 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2974
SELECT col2 / + col0 col0 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2975
SELECT + col1 DIV + CAST( - 23 AS SIGNED ) + col2 AS col1 FROM tab1
----
53
57
96

skipif mysql # not compatible
query I rowsort label-2975
SELECT + col1 / + CAST ( - 23 AS INTEGER ) + col2 AS col1 FROM tab1
----
53
57
96

query I rowsort
SELECT DISTINCT + tab0.col2 + col0 FROM tab0
----
171
36
57

query I rowsort
SELECT - ( + 31 ) * cor0.col1 * col2 FROM tab2 cor0
----
-20026
-25947
-47554

query I rowsort
SELECT col1 * col2 * + col0 AS col2 FROM tab0 cor0
----
3395
664118
68112

query I rowsort
SELECT ALL 68 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT DISTINCT col2 + - 78 FROM tab2
----
-40
-51
-52

query I rowsort
SELECT ALL col0 * ( col2 ) AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT col1 * col1 + col2 * + col0 AS col2 FROM tab2
----
1150
3291
5509

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col1 * - col0 col0 FROM tab2
----
-1360
-248
-4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2984
SELECT ALL + col0 / CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2984
SELECT ALL + col0 / CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 FROM tab0, tab2, tab0 AS cor0, tab1
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * col1 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - 87 * col0 + - col2 * + 54 FROM tab0 AS cor0
----
-12171
-3099
-3870

query I rowsort
SELECT DISTINCT - - ( - cor0.col2 ) * ( 56 ) AS col1 FROM tab0 AS cor0
----
-1848
-4592
-56

query I rowsort
SELECT DISTINCT + + ( col1 ) * cor0.col0 + cor0.col0 AS col1 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT - ( col0 ) + ( - col1 ) AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL cor0.col0 + col2 AS col1 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2992
SELECT ALL ( - col1 + col2 ) * CAST( + col0 + - col0 AS SIGNED ) * 76 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2992
SELECT ALL ( - col1 + col2 ) * CAST ( + col0 + - col0 AS INTEGER ) * 76 AS col0 FROM tab2
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2993
SELECT ALL - CAST( NULL AS SIGNED ) * + col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2993
SELECT ALL - CAST ( NULL AS INTEGER ) * + col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col2 col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 28 + tab2.col0 col0 FROM tab2
----
106
107
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-2996
SELECT ALL - - col0 DIV + col1 FROM tab2 cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-2996
SELECT ALL - - col0 / + col1 FROM tab2 cor0
----
0
1
4

query I rowsort
SELECT DISTINCT + 85 * col1 AS col1 FROM tab2 AS cor0
----
1445
2635
5015

query I rowsort
SELECT - col1 * - cor0.col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - + 2 AS col0 FROM tab0 AS cor0
----
-2
-2
-2

onlyif mysql # use DIV operator for integer division
query I rowsort label-3000
SELECT + + 81 * col0 DIV col1 FROM tab2 AS cor0
----
107
18
376

skipif mysql # not compatible
query I rowsort label-3000
SELECT + + 81 * col0 / col1 FROM tab2 AS cor0
----
107
18
376

query I rowsort
SELECT DISTINCT + 93 + col2 FROM tab2 AS cor0
----
119
120
131

query I rowsort
SELECT ALL - + col0 + col1 * 7 * - col1 + - col0 FROM tab2 AS cor0
----
-2181
-24523
-6741

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 * col0 col2 FROM tab0 cor0
----
2040
3360
8010

query I rowsort
SELECT - 9 + + col1 * col0 * - ( col1 ) AS col1 FROM tab0 AS cor0
----
-177513
-329324
-737018

query I rowsort
SELECT col2 * col1 + - col2 FROM tab1 AS cor0
----
1152
1350
513

onlyif mysql # use DIV operator for integer division
query I rowsort label-3006
SELECT - 3 DIV + col0 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3006
SELECT - 3 / + col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 39 * - col2 AS col0 FROM tab2
----
-1014
-1053
-1482

query I rowsort
SELECT DISTINCT + + col0 - col2 * + col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT + ( tab0.col0 ) * + col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL - col2 * col1 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - 63 FROM tab1
----
-63
-63
-63

query I rowsort
SELECT DISTINCT - col1 + 22 AS col0 FROM tab2
----
-37
-9
5

query I rowsort
SELECT DISTINCT tab2.col1 + cor0.col0 FROM tab2, tab2 cor0, tab1 AS cor1
----
9 values hashing to 74faab35697b5ea1753f372919d97975

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col0 col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT col0 * cor0.col1 + col2 + cor0.col2 * col1 AS col2 FROM tab2 AS cor0
----
1081
2027
6162

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3016
SELECT - CAST( NULL AS SIGNED ) + col0 * col2 * ( - col2 + col0 ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3016
SELECT - CAST ( NULL AS INTEGER ) + col0 * col2 * ( - col2 + col0 ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 26 + 72 + cor0.col1 AS col2 FROM tab2 AS cor0
----
115
129
157

query I rowsort
SELECT + cor0.col0 * - 70 + col0 + + col1 FROM tab2 cor0
----
-452
-5323
-5434

query I rowsort
SELECT ALL 63 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3020
SELECT CAST( 22 AS SIGNED ) AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

skipif mysql # not compatible
query I rowsort label-3020
SELECT CAST ( 22 AS INTEGER ) AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT DISTINCT - - cor0.col1 + ( 38 ) FROM tab2 AS cor0
----
55
69
97

query I rowsort
SELECT ALL ( + 71 ) FROM tab0
----
71
71
71

query I rowsort
SELECT DISTINCT col0 * 2 AS col1 FROM tab2
----
14
156
158

query I rowsort
SELECT + - 13 FROM tab0 AS cor0
----
-13
-13
-13

query I rowsort
SELECT - + ( 29 ) + cor0.col1 FROM tab1 AS cor0
----
-16
-19
-3

query I rowsort
SELECT + col0 + + col2 * col1 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3027
SELECT + ( 14 ) + + col1 * + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3027
SELECT + ( 14 ) + + col1 * + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3028
SELECT ALL tab0.col2 + tab0.col0 DIV col0 col0 FROM tab0
----
2
34
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3028
SELECT ALL tab0.col2 + tab0.col0 / col0 col0 FROM tab0
----
2
34
83

query I rowsort
SELECT DISTINCT + col0 + + tab1.col0 AS col2 FROM tab1
----
128
160
6

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2, tab2 AS cor0 WHERE NOT NULL > NULL
----

query I rowsort
SELECT DISTINCT tab2.col2 + tab2.col0 AS col1 FROM tab2
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3032
SELECT + CAST( NULL AS SIGNED ) * col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3032
SELECT + CAST ( NULL AS INTEGER ) * col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 95 FROM tab0
----
-95
-95
-95

query I rowsort
SELECT + + cor0.col1 - col1 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3035
SELECT DISTINCT ( - tab0.col0 ) + - col2 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-3035
SELECT DISTINCT ( - tab0.col0 ) + - col2 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3036
SELECT DISTINCT + col2 + col2 DIV col1 AS col1 FROM tab2
----
26
27
40

skipif mysql # not compatible
query I rowsort label-3036
SELECT DISTINCT + col2 + col2 / col1 AS col1 FROM tab2
----
26
27
40

query I rowsort
SELECT ALL - 99 * col2 + - col0 + + cor0.col2 FROM tab0 AS cor0
----
-133
-3258
-8125

query I rowsort
SELECT ALL 58 + - cor0.col1 + col2 AS col0 FROM tab1 AS cor0
----
105
141
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( col0 ) col1 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3040
SELECT - col0 DIV + col1 col2 FROM tab1 AS cor0
----
-6
-6
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3040
SELECT - col0 / + col1 col2 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT - + 97 AS col2 FROM tab1 AS cor0
----
-97
-97
-97

query I rowsort
SELECT ( + col2 ) + - 39 * - col2 FROM tab0 AS cor0
----
1320
3280
40

query I rowsort
SELECT ALL + col1 + col0 * col2 FROM tab2 AS cor0
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-3044
SELECT + + col1 + cor0.col2 DIV 43 AS col0 FROM tab0 AS cor0
----
86
92
97

skipif mysql # not compatible
query I rowsort label-3044
SELECT + + col1 + cor0.col2 / 43 AS col0 FROM tab0 AS cor0
----
86
92
97

query I rowsort
SELECT DISTINCT - cor0.col1 + + col1 AS col1 FROM tab1 AS cor0
----
0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to 9600bdf5bac0caec3229e87170cc40b3

query I rowsort
SELECT + col2 * 49 FROM tab2 AS cor0
----
1274
1323
1862

query I rowsort
SELECT - col1 + - ( 11 ) * + col1 FROM tab0 AS cor0
----
-1032
-1092
-1164

query I rowsort
SELECT col0 * 18 * col0 FROM tab1
----
115200
162
73728

query I rowsort
SELECT col1 + + col0 - - 83 * col2 AS col0 FROM tab0
----
215
2849
6986

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 40a052eaf1d698dbf3ba319dc3e245ee

query I rowsort
SELECT DISTINCT - col1 * + ( + col2 ) AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - cor0.col1 + col1 + - col0 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3054
SELECT DISTINCT + col0 * + CAST( cor0.col2 AS SIGNED ) * - col0 - 44 * + col0 AS col1 FROM tab0 AS cor0
----
-20064
-2765
-653438

skipif mysql # not compatible
query I rowsort label-3054
SELECT DISTINCT + col0 * + CAST ( cor0.col2 AS INTEGER ) * - col0 - 44 * + col0 AS col1 FROM tab0 AS cor0
----
-20064
-2765
-653438

onlyif mysql # use DIV operator for integer division
query I rowsort label-3055
SELECT ALL + col0 + 1 DIV col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3055
SELECT ALL + col0 + 1 / col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - - col2 * + col2 - 4 AS col1 FROM tab0 AS cor0
----
-3
1085
6720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + cor0.col0 col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + cor0.col0 * - col1 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 - + cor0.col2 col2 FROM tab2 AS cor0
----
-52
-54
-76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3060
SELECT DISTINCT CAST( + col2 AS SIGNED ) * col0 FROM tab2 cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-3060
SELECT DISTINCT CAST ( + col2 AS INTEGER ) * col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT ALL + 45 + col0 AS col2 FROM tab2 AS cor0
----
123
124
52

query I rowsort
SELECT DISTINCT + + col0 - + col1 AS col1 FROM tab0 AS cor0
----
-2
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - tab1.col1 * - col2 col0 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT + col0 * col0 * - ( col1 + col1 ) AS col2 FROM tab1 AS cor0
----
-166400
-468
-81920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - + col0 col1 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT + + col2 * - ( 31 ) AS col1 FROM tab0 AS cor0
----
-1023
-2542
-31

query I rowsort
SELECT col2 * 96 + + ( - cor0.col2 ) * 44 FROM tab2 AS cor0
----
1352
1404
1976

query I rowsort
SELECT + col1 * 77 AS col2 FROM tab1 AS cor0
----
1001
2002
770

query I rowsort
SELECT ALL - + col0 * + col2 * 76 AS col0 FROM tab2 AS cor0
----
-14364
-154128
-228152

onlyif mysql # use DIV operator for integer division
query I rowsort label-3070
SELECT tab0.col1 DIV col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3070
SELECT tab0.col1 / col0 FROM tab0
----
1
2
3

query I rowsort
SELECT - col0 - + col2 FROM tab1
----
-121
-176
-57

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2, tab1 AS cor0, tab2 cor1
----
972 values hashing to 2507aa9f48c3db94de9fec065edf3731

query I rowsort
SELECT DISTINCT 37 * + col2 + + 20 FROM tab1
----
2018
2129
3572

query I rowsort
SELECT DISTINCT 79 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
79

query I rowsort
SELECT ( col1 ) * + 26 AS col2 FROM tab0
----
2236
2366
2522

onlyif mysql # use DIV operator for integer division
query I rowsort label-3076
SELECT - col2 DIV col1 + + 40 - col0 AS col0 FROM tab0
----
-49
16
5

skipif mysql # not compatible
query I rowsort label-3076
SELECT - col2 / col1 + + 40 - col0 AS col0 FROM tab0
----
-49
16
5

query I rowsort
SELECT DISTINCT + col0 + - 33 + col1 * + col2 AS col0 FROM tab0
----
2829
7518
99

query I rowsort
SELECT col2 + 92 AS col1 FROM tab1
----
146
149
188

onlyif mysql # use DIV operator for integer division
query I rowsort label-3079
SELECT - + col1 DIV col2 + + col2 * cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-3079
SELECT - + col1 / col2 + + col2 * cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - + col2 * - ( + col2 ) * - col1 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT ALL - col2 + ( + col2 ) * col2 AS col0 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT col2 * col0 + - col2 * col1 + - col2 FROM tab1 AS cor0
----
-1296
3021
6336

query I rowsort
SELECT ALL 87 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT - - col0 * - col2 + col1 * cor0.col0 + - col1 AS col1 FROM tab1 cor0
----
-110
-3018
-6653

query I rowsort
SELECT DISTINCT - + cor0.col1 * + col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3086
SELECT DISTINCT - + col0 * + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3086
SELECT DISTINCT - + col0 * + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL

query I rowsort
SELECT ALL - col0 * - 52 + - col1 * - cor0.col0 * - col2 AS col2 FROM tab2 AS cor0
----
-115596
-46926
-5495

query I rowsort
SELECT ALL + + 15 * col2 + 32 FROM tab2 AS cor0
----
422
437
602

query I rowsort
SELECT + col1 + - tab0.col2 FROM tab0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3090
SELECT - + 4 * col0 DIV - col1 FROM tab1 AS cor0
----
0
24
25

skipif mysql # not compatible
query I rowsort label-3090
SELECT - + 4 * col0 / - col1 FROM tab1 AS cor0
----
0
24
25

query I rowsort
SELECT - - ( - cor0.col1 ) * + col1 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT col1 + + ( - col2 ) AS col1 FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL - + cor0.col1 * cor0.col2 + - col0 * 33 FROM tab0 AS cor0
----
-10399
-1252
-3630

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + + col0 - col1 * 78 AS col0 FROM tab0 AS cor0
----
-6684
-7009
-7531

query I rowsort
SELECT DISTINCT 74 * + col1 + + 61 FROM tab2 AS cor0
----
1319
2355
4427

query I rowsort
SELECT + tab1.col1 + + tab1.col2 * - col2 + tab1.col2 FROM tab1
----
-2836
-3182
-9107

query I rowsort
SELECT DISTINCT cor0.col1 + + col2 * + 11 * col1 FROM tab2 AS cor0
----
16933
7123
9238

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3099
SELECT CAST( NULL AS SIGNED ) FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3099
SELECT CAST ( NULL AS INTEGER ) FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL - col1 * + col2 AS col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - + col1 * - col2 - - 53 * col2 * col2 FROM tab1 AS cor0
----
155952
172767
489696

query I rowsort
SELECT ALL - + 10 + col0 * 82 FROM tab1 AS cor0
----
236
5238
6550

query I rowsort
SELECT cor1.col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT tab0.col2 * + col2 * col2 FROM tab0
----
1
35937
551368

query I rowsort
SELECT + 18 FROM tab2 cor0
----
18
18
18

query I rowsort
SELECT DISTINCT - - col1 + cor0.col0 + col1 AS col1 FROM tab0 AS cor0
----
196
229
271

query I rowsort
SELECT - - ( col2 ) AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - cor0.col1 + col2 * 33 AS col2 FROM tab2 AS cor0
----
1237
799
860

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3109
SELECT - col0 - CAST( ( - col2 ) AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-3109
SELECT - col0 - CAST ( ( - col2 ) AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + - ( - 81 ) AS col2 FROM tab0 AS cor0
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col2 col1 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3112
SELECT - - CAST( NULL AS DECIMAL ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3112
SELECT - - CAST ( NULL AS REAL ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col0 * col1 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + cor0.col2 * 66 AS col2 FROM tab1 AS cor0
----
3564
3762
6336

query I rowsort
SELECT ALL + + col0 * ( cor0.col0 ) FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - 33 * col0 FROM tab2 AS cor0
----
-231
-2574
-2607

query I rowsort
SELECT col2 + cor0.col0 * col0 * col0 FROM tab2 AS cor0
----
370
474578
493077

query I rowsort
SELECT + - ( - col2 ) * col2 * col1 AS col0 FROM tab0 AS cor0
----
611884
93654
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 * + tab1.col2 col2 FROM tab1
----
1026
1728
972

query I rowsort
SELECT 39 FROM tab2, tab2 cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col1 ) col0 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 57 col1 FROM tab2 AS cor0
----
57
57
57

query I rowsort
SELECT ALL 53 AS col2 FROM tab2
----
53
53
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3124
SELECT + CAST( col2 * - col0 AS SIGNED ) FROM tab2
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-3124
SELECT + CAST ( col2 * - col0 AS INTEGER ) FROM tab2
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3125
SELECT + cor0.col2 DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3125
SELECT + cor0.col2 / - col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3126
SELECT - + cor0.col1 DIV col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3126
SELECT - + cor0.col1 / col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col2 * col2 + ( - col2 ) FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT DISTINCT - - 73 - + 73 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - col0 * - col2 + - col2 AS col0 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT col0 * col0 + + col2 AS col1 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT 65 + + col1 FROM tab2 AS cor0
----
124
82
96

query I rowsort
SELECT 86 AS col2 FROM tab2 AS cor0
----
86
86
86

query I rowsort
SELECT ( col2 ) + + col2 AS col2 FROM tab2 AS cor0
----
52
54
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 90 col1 FROM tab2 AS cor0
----
-90
-90
-90

query I rowsort
SELECT col1 * 63 FROM tab0
----
5418
5733
6111

query I rowsort
SELECT - col2 * ( + col2 * + col2 + col0 * 48 ) AS col0 FROM tab0
----
-1681
-73953
-901672

onlyif mysql # use DIV operator for integer division
query I rowsort label-3137
SELECT - - col2 + + col1 DIV col2 - col0 col1 FROM tab0 AS cor0
----
-6
11
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3137
SELECT - - col2 + + col1 / col2 - col0 col1 FROM tab0 AS cor0
----
-6
11
63

query I rowsort
SELECT cor0.col1 * + col1 + - 70 - + 84 * col1 FROM tab1 AS cor0
----
-1578
-810
-993

query I rowsort
SELECT + 71 + - col0 FROM tab0 AS cor0
----
-18
36
47

query I rowsort
SELECT + col0 + - col2 - - col1 * col0 AS col2 FROM tab0 AS cor0
----
2055
3429
8106

query I rowsort
SELECT + col0 * cor0.col2 + col1 AS col1 FROM tab1 AS cor0
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col0 col2 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT - col2 + col1 - 73 * col0 AS col2 FROM tab1 AS cor0
----
-247
-4719
-5923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3144
SELECT CAST( - col2 AS SIGNED ) AS col0 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-3144
SELECT CAST ( - col2 AS INTEGER ) AS col0 FROM tab0
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3145
SELECT CAST( NULL AS DECIMAL ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3145
SELECT CAST ( NULL AS REAL ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - + tab1.col0 * - 94 AS col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to a8ff27eaba60dc95eec72ec329e7440a

query I rowsort
SELECT DISTINCT col2 * ( + col2 ) AS col0 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT col0 * + col2 * col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT DISTINCT ( - col2 ) + + tab2.col0 FROM tab2
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 28 + 82 col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to ebfbd032a0a7b9ce9f54a2516c43134d

query I rowsort
SELECT - 55 AS col1 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to b90e74bece5521b514096c5b6e105fde

query I rowsort
SELECT DISTINCT - 53 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-53

query I rowsort
SELECT ALL + col1 * col2 + + cor0.col2 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT - - col2 * col1 + - 35 FROM tab0 AS cor0
----
2803
62
7427

query I rowsort
SELECT - ( col2 ) + + 5 FROM tab1 AS cor0
----
-49
-52
-91

query I rowsort
SELECT DISTINCT 74 * + col2 FROM tab2 AS cor0
----
1924
1998
2812

query I rowsort
SELECT + - cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT DISTINCT - col2 * 55 FROM tab2 AS cor0
----
-1430
-1485
-2090

query I rowsort
SELECT ALL + 98 AS col0 FROM tab2
----
98
98
98

query I rowsort
SELECT ALL + + cor0.col0 + 20 AS col1 FROM tab1 AS cor0
----
100
23
84

query I rowsort
SELECT + - col1 + + 56 AS col1 FROM tab0 AS cor0
----
-30
-35
-41

query I rowsort
SELECT ALL + + col0 + ( + col0 ) FROM tab0 AS cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * + 5 * + col0 col1 FROM tab0 cor0
----
2880
39605
6125

onlyif mysql # use DIV operator for integer division
query I rowsort label-3164
SELECT cor0.col0 DIV - 35 FROM tab1 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3164
SELECT cor0.col0 / - 35 FROM tab1 AS cor0
----
-1
-2
0

query I rowsort
SELECT - + col0 * ( - col2 ) + - col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL + 88 AS col2 FROM tab0
----
88
88
88

query I rowsort
SELECT ALL + col2 + + 46 FROM tab2
----
72
73
84

query I rowsort
SELECT + + col1 * + col1 - 40 FROM tab0 AS cor0
----
7356
8241
9369

query I rowsort
SELECT ALL col2 + + col0 + col1 FROM tab0
----
133
143
262

query I rowsort
SELECT ALL - col0 * ( cor0.col1 ) AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col1 * col1 - cor0.col1 AS col1 FROM tab2 AS cor0
----
272
3422
930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * col0 * cor0.col0 col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT - - col1 - col0 * cor0.col1 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3174
SELECT + - col1 * CAST( - col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-3174
SELECT + - col1 * CAST ( - col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col2 AS REAL ) AS col1 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col2 col2 FROM tab2 AS cor0
----
1444
676
729

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 CROSS JOIN tab2, tab1 cor1
----
972 values hashing to 92235dbc382d83baa93d6546ed489b0c

query I rowsort
SELECT DISTINCT - - col2 - - cor0.col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - - 38 + - col1 FROM tab0 AS cor0
----
-48
-53
-59

query I rowsort
SELECT DISTINCT - 90 + + col0 FROM tab0 cor0
----
-1
-55
-66

query I rowsort
SELECT ALL - cor0.col2 * col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3182
SELECT + - ( col1 ) + - 77 DIV col1 AS col1 FROM tab2 AS cor0
----
-21
-33
-60

skipif mysql # not compatible
query I rowsort label-3182
SELECT + - ( col1 ) + - 77 / col1 AS col1 FROM tab2 AS cor0
----
-21
-33
-60

query I rowsort
SELECT - - col2 + - cor0.col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + + ( - 78 ) * col2 + col1 + + 60 * + col2 AS col2 FROM tab2 AS cor0
----
-409
-455
-667

query I rowsort
SELECT ALL + col1 * + 52 FROM tab1 AS cor0
----
1352
520
676

query I rowsort
SELECT DISTINCT - - 99 + + ( col1 ) * cor0.col0 FROM tab1 AS cor0
----
1139
177
739

query I rowsort
SELECT DISTINCT - ( - ( col1 ) ) AS col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT ( + col2 ) * col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3189
SELECT + + 26 + 46 DIV + col0 - 18 FROM tab1 AS cor0
----
23
8
8

skipif mysql # not compatible
query I rowsort label-3189
SELECT + + 26 + 46 / + col0 - 18 FROM tab1 AS cor0
----
23
8
8

query I rowsort
SELECT - col2 * ( - col0 ) * + cor0.col1 AS col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL + - col0 + 57 * + col0 FROM tab2 AS cor0
----
392
4368
4424

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + + ( col0 ) * cor0.col2 + + ( + col0 ) - col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + - ( col0 ) - col0 FROM tab1 cor0
----
-128
-160
-6

query I rowsort
SELECT ALL + - cor0.col2 + col1 * + col1 * - ( - col1 ) FROM tab1 AS cor0
----
17522
2101
943

query I rowsort
SELECT DISTINCT 6 FROM tab1 AS cor0
----
6

query I rowsort
SELECT - + 80 + col0 * + col0 FROM tab0 AS cor0
----
1145
496
7841

query I rowsort
SELECT + ( + col0 ) * cor0.col2 AS col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - 54 AS col1 FROM tab2 cor0
----
-54

query I rowsort
SELECT DISTINCT - + col2 + - col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT + 44 * - col0 AS col2 FROM tab2 AS cor0
----
-308
-3432
-3476

onlyif mysql # use DIV operator for integer division
query I rowsort label-3202
SELECT DISTINCT + ( 94 ) * col2 + col0 * col1 + cor0.col2 DIV cor0.col0 AS col0 FROM tab1 AS cor0
----
10065
5172
5998

skipif mysql # not compatible
query I rowsort label-3202
SELECT DISTINCT + ( 94 ) * col2 + col0 * col1 + cor0.col2 / cor0.col0 AS col0 FROM tab1 AS cor0
----
10065
5172
5998

query I rowsort
SELECT ALL + - 69 FROM tab1 AS cor0
----
-69
-69
-69

query I rowsort
SELECT 9 FROM tab2, tab1 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3205
SELECT CAST( NULL AS SIGNED ) * col1 col1 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3205
SELECT CAST ( NULL AS INTEGER ) * col1 col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3206
SELECT ALL - - col2 / col2 + + CAST( NULL AS SIGNED ) / + 66 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-3206
SELECT ALL - - col2 / col2 + + CAST ( NULL AS INTEGER ) / + 66 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT + ( - col2 ) * + col0 * - col2 + + col0 FROM tab0
----
26160
598525
70

query I rowsort
SELECT DISTINCT + 8 * + tab1.col0 AS col1 FROM tab1, tab2 AS cor0
----
24
512
640

query I rowsort
SELECT ALL + col2 + + tab2.col2 FROM tab2
----
52
54
76

query I rowsort
SELECT DISTINCT cor0.col2 + - col1 * + col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT + cor0.col1 + - col2 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 * col0 + col2 col2 FROM tab1
----
1136
132
697

query I rowsort
SELECT ALL - 35 + col2 FROM tab0
----
-2
-34
47

query I rowsort
SELECT ALL 97 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT col0 * + col2 + col0 AS col2 FROM tab1
----
165
3712
7760

query I rowsort
SELECT col1 + 85 FROM tab1
----
111
95
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3218
SELECT ALL col2 DIV - 31 AS col0 FROM tab1
----
-1
-1
-3

skipif mysql # not compatible
query I rowsort label-3218
SELECT ALL col2 / - 31 AS col0 FROM tab1
----
-1
-1
-3

query I rowsort
SELECT + + col2 * 33 * + col0 AS col2 FROM tab1 AS cor0
----
120384
253440
5346

query I rowsort
SELECT DISTINCT - cor0.col0 * + 96 FROM tab1 AS cor0
----
-288
-6144
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3221
SELECT ALL - col0 + + CAST( ( - col0 ) AS SIGNED ) FROM tab1 AS cor0
----
-128
-160
-6

skipif mysql # not compatible
query I rowsort label-3221
SELECT ALL - col0 + + CAST ( ( - col0 ) AS INTEGER ) FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT + + col2 * col2 AS col2 FROM tab0 cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * ( ( - col2 ) + 40 ) col0 FROM tab1
----
-170
-364
-728

query I rowsort
SELECT + col1 * - 70 FROM tab2 AS cor0
----
-1190
-2170
-4130

query I rowsort
SELECT + 22 + cor0.col2 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 291002ebff88ae5569f6a7048ea27252

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2 AS cor2, tab0 AS cor3
----
3645 values hashing to 66d12da55ea14263893cfc3170a3c57e

query I rowsort
SELECT col0 * 96 AS col0 FROM tab0 cor0
----
2304
3360
8544

query I rowsort
SELECT DISTINCT - col1 * ( - ( col2 ) ) * col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT DISTINCT - 74 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 42 col1 FROM tab0
----
42
42
42

query I rowsort
SELECT DISTINCT + + 38 + col1 + + col1 FROM tab1 AS cor0
----
58
64
90

query I rowsort
SELECT ALL cor1.col1 * - 18 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to d79221dc63c6395f07a766719dbaea28

query I rowsort
SELECT DISTINCT + - 25 FROM tab0 cor0
----
-25

query I rowsort
SELECT - 46 AS col0 FROM tab1
----
-46
-46
-46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3235
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-3235
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT - - ( + 30 ) AS col0 FROM tab2 cor0
----
30
30
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 43 ) col1 FROM tab0 AS cor0
----
43
43
43

query I rowsort
SELECT DISTINCT - + col1 + - 27 AS col0 FROM tab1 AS cor0
----
-37
-40
-53

query I rowsort
SELECT ALL ( col0 ) * ( - col0 + col0 ) AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL - cor0.col0 * + col1 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3241
SELECT ALL col1 DIV - cor0.col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-3241
SELECT ALL col1 / - cor0.col0 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT 43 * - col1 + col1 FROM tab2
----
-1302
-2478
-714

query I rowsort
SELECT 83 AS col2 FROM tab2, tab0 AS cor0, tab1 cor1, tab2 AS cor2
----
81 values hashing to 5ced3720d5aeff0dd77d5059a38001b6

query I rowsort
SELECT + 22 + cor0.col1 FROM tab2 cor0
----
39
53
81

query I rowsort
SELECT ALL + - col1 + - col0 - col0 AS col0 FROM tab1 AS cor0
----
-138
-173
-32

query I rowsort
SELECT DISTINCT 59 AS col1 FROM tab2 AS cor0
----
59

query I rowsort
SELECT DISTINCT - + 30 * - col1 AS col1 FROM tab2 AS cor0
----
1770
510
930

query I rowsort
SELECT ALL + col2 + 45 + 52 * col2 FROM tab1 AS cor0
----
2907
3066
5133

query I rowsort
SELECT - col2 + 40 AS col1 FROM tab2 AS cor0
----
13
14
2

query I rowsort
SELECT ALL + col2 + col0 AS col1 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT ALL + - col2 + 45 * col2 FROM tab1 AS cor0
----
2376
2508
4224

onlyif mysql # use DIV operator for integer division
query I rowsort label-3252
SELECT DISTINCT col2 * CAST( + ( col2 ) AS SIGNED ) + - 98 * + col2 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
-97
6626
991

skipif mysql # not compatible
query I rowsort label-3252
SELECT DISTINCT col2 * CAST ( + ( col2 ) AS INTEGER ) + - 98 * + col2 / cor0.col2 AS col1 FROM tab0 AS cor0
----
-97
6626
991

query I rowsort
SELECT DISTINCT - col1 + + col2 FROM tab1
----
28
47
83

query I rowsort
SELECT + col2 * - ( col0 ) AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col0 * + 91 FROM tab2 AS cor0
----
637
7098
7189

query I rowsort
SELECT ALL 98 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT - col0 * ( - col0 + - 15 ) FROM tab0
----
1750
9256
936

query I rowsort
SELECT + col2 + + ( + col0 ) FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3260
SELECT - CAST( NULL AS SIGNED ) - + col0 * cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3260
SELECT - CAST ( NULL AS INTEGER ) - + col0 * cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3261
SELECT + col0 + 58 * col1 DIV cor0.col0 FROM tab2 AS cor0
----
121
263
91

skipif mysql # not compatible
query I rowsort label-3261
SELECT + col0 + 58 * col1 / cor0.col0 FROM tab2 AS cor0
----
121
263
91

query I rowsort
SELECT - - col0 + col2 * col0 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
86
91
97

query I rowsort
SELECT ( col1 ) + + col2 + 60 FROM tab1
----
127
140
169

onlyif mysql # use DIV operator for integer division
query I rowsort label-3265
SELECT - ( + col2 ) + col1 DIV - 48 - col0 FROM tab0
----
-172
-38
-58

skipif mysql # not compatible
query I rowsort label-3265
SELECT - ( + col2 ) + col1 / - 48 - col0 FROM tab0
----
-172
-38
-58

query I rowsort
SELECT + + ( 71 ) AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT - col2 * + col0 + + 17 AS col1 FROM tab2 AS cor0
----
-172
-2011
-2985

query I rowsort
SELECT DISTINCT col2 * col0 + tab0.col0 AS col2 FROM tab0
----
70
7387
816

query I rowsort
SELECT DISTINCT ( - col1 ) + - col0 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT DISTINCT 80 * - col2 * - col0 + - col2 FROM tab0
----
2799
583758
63327

query I rowsort
SELECT - + tab1.col2 + + 3 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to ee362d703a5ad2545340d76ab5858d10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 33 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 8035c665a75d22be5922be1a4e574e03

query I rowsort
SELECT + col1 + + ( - ( + col2 ) ) FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT 24 FROM tab0, tab0 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT + - col2 + 41 * + col2 AS col1 FROM tab0 AS cor0
----
1320
3280
40

query I rowsort
SELECT ALL - col1 + - 62 * - col1 FROM tab0 AS cor0
----
5246
5551
5917

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 66 col1 FROM tab0 AS cor0
----
66
66
66

query I rowsort
SELECT DISTINCT - 48 - - cor0.col1 AS col1 FROM tab0 AS cor0
----
38
43
49

query I rowsort
SELECT ALL 44 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3280
SELECT CAST( - col0 AS SIGNED ) + + col2 * col2 AS col1 FROM tab0
----
-34
1065
6635

skipif mysql # not compatible
query I rowsort label-3280
SELECT CAST ( - col0 AS INTEGER ) + + col2 * col2 AS col1 FROM tab0
----
-34
1065
6635

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3281
SELECT - CAST( NULL AS SIGNED ) * col1 * - tab2.col2 + col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3281
SELECT - CAST ( NULL AS INTEGER ) * col1 * - tab2.col2 + col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + 20 FROM tab2 AS cor0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT + col0 + col0 * col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT - 11 + 92 * col0 FROM tab2 AS cor0
----
633
7165
7257

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3285
SELECT DISTINCT - CAST( NULL AS SIGNED ) + ( + col1 ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3285
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + ( + col1 ) FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT - 40 FROM tab2 cor0
----
-40

query I rowsort
SELECT ALL + cor1.col2 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3288
SELECT cor0.col2 DIV + col2 + - col2 * + col0 AS col2 FROM tab1 cor0
----
-161
-3647
-7679

skipif mysql # not compatible
query I rowsort label-3288
SELECT cor0.col2 / + col2 + - col2 * + col0 AS col2 FROM tab1 cor0
----
-161
-3647
-7679

query I rowsort
SELECT ALL - 18 - - tab2.col0 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 7673480f037d51f49f0d6adc98f3aac6

query I rowsort
SELECT + ( col2 ) - col1 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 16 * - cor0.col1 col2 FROM tab1 AS cor0
----
-160
-208
-416

query I rowsort
SELECT + cor0.col0 + col2 * col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL + cor0.col2 + - col2 * - col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT col2 - col0 * - cor0.col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT + - cor0.col1 + cor0.col2 + cor0.col1 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + col1 + - col1 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - col2 * cor0.col2 - col0 * col1 AS col1 FROM tab1 AS cor0
----
-10256
-2994
-3889

query I rowsort
SELECT + 91 * + cor0.col0 + col0 AS col1 FROM tab0 AS cor0
----
2208
3220
8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3299
SELECT CAST( col2 AS SIGNED ) - col1 AS col1 FROM tab2
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-3299
SELECT CAST ( col2 AS INTEGER ) - col1 AS col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL ( col1 ) * col0 FROM tab2
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3301
SELECT DISTINCT + CAST( tab1.col2 * col0 AS SIGNED ) AS col1 FROM tab1
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-3301
SELECT DISTINCT + CAST ( tab1.col2 * col0 AS INTEGER ) AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL - 49 * tab0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 8414d49d57afb2d5bb13602da091697b

query I rowsort
SELECT col0 * col2 * - tab0.col0 - col0 FROM tab0
----
-1260
-19032
-649611

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( 85 ) * - col2 col1 FROM tab0
----
-2805
-6970
-85

query I rowsort
SELECT + col2 * 71 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
11502
259008
545280

query I rowsort
SELECT ALL + col0 * - 58 FROM tab1 AS cor0
----
-174
-3712
-4640

query I rowsort
SELECT - - col2 * + ( - ( col2 ) ) AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL - tab0.col1 * + tab0.col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - - col2 * 85 AS col2 FROM tab1 AS cor0
----
4590
4845
8160

query I rowsort
SELECT ALL - col1 * - ( + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col2 + col2 * col2 AS col0 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT ALL + col0 * - ( - 90 ) AS col2 FROM tab2 cor0
----
630
7020
7110

query I rowsort
SELECT - + col1 + + cor0.col0 + col0 * + col2 FROM tab0 AS cor0
----
-27
7296
730

query I rowsort
SELECT DISTINCT + col1 * + ( + 15 * col1 ) FROM tab1 AS cor0
----
10140
1500
2535

query I rowsort
SELECT + 65 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT - ( + col2 ) + + tab2.col0 - tab2.col1 * - col0 AS col0 FROM tab2
----
1384
197
4654

query I rowsort
SELECT col1 * col2 + - col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT + 43 + - col0 AS col1 FROM tab0
----
-46
19
8

query I rowsort
SELECT ALL tab2.col2 * col1 + col1 + - col1 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT + 0 AS col2 FROM tab0, tab2, tab0 AS cor0
----
0

query I rowsort
SELECT 72 AS col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

query I rowsort
SELECT - - col1 * col2 + - col1 * - col2 + + col1 * - col2 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col0 * - col1 * - col0 + + col1 * - col1 FROM tab2 AS cor0
----
-106386
-2480
-362437

query I rowsort
SELECT - col1 + + 23 FROM tab2
----
-36
-8
6

query I rowsort
SELECT - col1 * cor0.col1 * 78 FROM tab1 AS cor0
----
-13182
-52728
-7800

query I rowsort
SELECT ALL - col0 * + 60 FROM tab0
----
-1440
-2100
-5340

query I rowsort
SELECT + col2 * 28 FROM tab2 AS cor0
----
1064
728
756

query I rowsort
SELECT DISTINCT - 12 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
-12

query I rowsort
SELECT ALL 6 AS col1 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to f1e8f0199f3714ee8fcc24ce0cc3ea04

query I rowsort
SELECT DISTINCT col2 * col2 + ( + 87 ) FROM tab1 AS cor0
----
3003
3336
9303

query I rowsort
SELECT - 19 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-1691
-456
-665

query I rowsort
SELECT DISTINCT + ( + cor0.col1 ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - - 79 * + col2 * + col1 + 38 + col1 * - col1 FROM tab0 AS cor0
----
-1708
216844
581255

query I rowsort
SELECT DISTINCT + cor0.col1 * + col0 + + col0 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0, tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT 66 + - col0 + 45 FROM tab0 AS cor0
----
22
76
87

query I rowsort
SELECT DISTINCT + + col0 * - col0 + - 71 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-12080
-222
-8640

query I rowsort
SELECT col0 * 19 FROM tab1 AS cor0
----
1216
1520
57

query I rowsort
SELECT DISTINCT - col0 + + 98 + col1 FROM tab0 AS cor0
----
100
160

onlyif mysql # use DIV operator for integer division
query I rowsort label-3340
SELECT ALL + - col2 DIV - col1 col0 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3340
SELECT ALL + - col2 / - col1 col0 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT ALL + col1 * 62 AS col2 FROM tab1 AS cor0
----
1612
620
806

query I rowsort
SELECT DISTINCT + col1 + - 38 + col1 FROM tab1 AS cor0
----
-12
-18
14

query I rowsort
SELECT + cor0.col1 * ( col0 ) + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - col0 + - col2 * - 62 + cor0.col0 AS col2 FROM tab1 AS cor0
----
3348
3534
5952

query I rowsort
SELECT DISTINCT - col2 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col1 + 45 AS col1 FROM tab2 AS cor0
----
104
62
76

query I rowsort
SELECT ALL + - col1 * - 50 FROM tab2 AS cor0
----
1550
2950
850

onlyif mysql # use DIV operator for integer division
query I rowsort label-3348
SELECT DISTINCT - - cor0.col2 DIV - 47 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-3348
SELECT DISTINCT - - cor0.col2 / - 47 FROM tab0 AS cor0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3349
SELECT col0 DIV - tab1.col1 + - col1 DIV col1 AS col1 FROM tab1
----
-1
-7
-7

skipif mysql # not compatible
query I rowsort label-3349
SELECT col0 / - tab1.col1 + - col1 / col1 AS col1 FROM tab1
----
-1
-7
-7

query I rowsort
SELECT - + col2 * + cor0.col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col0 + - 50 * - col1 * ( 57 ) FROM tab2 AS cor0
----
168228
48529
88357

query I rowsort
SELECT DISTINCT - - 29 * - 21 - + col1 * - col1 * - col2 FROM tab2 cor0
----
-11591
-26556
-91115

query I rowsort
SELECT - + col0 * + col0 + col1 AS col1 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT - 95 + col2 FROM tab0 AS cor0
----
-13
-62
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 14 + col0 col1 FROM tab1 AS cor0
----
-11
50
66

query I rowsort
SELECT DISTINCT - + cor0.col0 - col0 * + col2 AS col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - - 68 + - 44 * col0 AS col1 FROM tab2 AS cor0
----
-240
-3364
-3408

query I rowsort
SELECT ALL - ( + cor0.col0 ) + - col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL + col2 * - col0 + - cor0.col2 FROM tab2 cor0
----
-2054
-216
-3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3360
SELECT - + CAST( - col0 AS SIGNED ) * col1 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-3360
SELECT - + CAST ( - col0 AS INTEGER ) * col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + cor0.col1 * 58 + col1 * col1 FROM tab0 AS cor0
----
12384
13559
15035

onlyif mysql # use DIV operator for integer division
query I rowsort label-3362
SELECT - col1 DIV 95 FROM tab0 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3362
SELECT - col1 / 95 FROM tab0 cor0
----
-1
0
0

query I rowsort
SELECT ALL + + col0 + 70 - - col2 AS col2 FROM tab2 AS cor0
----
104
174
187

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + col1 ) col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT col0 * - 51 FROM tab1 AS cor0
----
-153
-3264
-4080

query I rowsort
SELECT ALL + col2 * - col0 * col0 FROM tab2 cor0
----
-1323
-158184
-237158

query I rowsort
SELECT ALL + - 1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ( - col2 ) + + col0 AS col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT ( + 7 ) FROM tab0 AS cor0
----
7

query I rowsort
SELECT ALL - - col0 + col0 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT + - cor0.col1 + 45 FROM tab0 AS cor0
----
-41
-46
-52

query I rowsort
SELECT ALL - - col2 + + col2 + col0 FROM tab0 cor0
----
253
37
90

query I rowsort
SELECT ALL + cor0.col2 * col1 + col0 AS col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + ( col2 ) AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT - 69 FROM tab0, tab2 cor0 CROSS JOIN tab2 AS cor1
----
27 values hashing to ca5f4bc365dc2c6b14187d6ffc83a01d

query I rowsort
SELECT - + col2 + col1 * 36 AS col0 FROM tab0 AS cor0
----
3063
3194
3491

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * - cor0.col2 col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3378
SELECT - + 72 * + cor0.col1 * + CAST( + col1 AS SIGNED ) + cor0.col2 * + 6 FROM tab2 AS cor0
----
-20580
-250476
-69030

skipif mysql # not compatible
query I rowsort label-3378
SELECT - + 72 * + cor0.col1 * + CAST ( + col1 AS INTEGER ) + cor0.col2 * + 6 FROM tab2 AS cor0
----
-20580
-250476
-69030

query I rowsort
SELECT + 51 * col0 + - ( 88 ) FROM tab1 AS cor0
----
3176
3992
65

query I rowsort
SELECT - 12 + col2 AS col0 FROM tab2 cor0
----
14
15
26

query I rowsort
SELECT DISTINCT - col2 + col2 * 58 FROM tab0 AS cor0
----
1881
4674
57

query I rowsort
SELECT + 23 * col0 FROM tab1 AS cor0
----
1472
1840
69

query I rowsort
SELECT - 89 * 51 AS col0 FROM tab2
----
-4539
-4539
-4539

query I rowsort
SELECT ( + col0 ) + col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + - col0 * col2 * col1 + col1 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-101088
-37050
-5616

onlyif mysql # use DIV operator for integer division
query I rowsort label-3386
SELECT + 61 + col2 DIV col0 AS col0 FROM tab0 AS cor0
----
61
61
62

skipif mysql # not compatible
query I rowsort label-3386
SELECT + 61 + col2 / col0 AS col0 FROM tab0 AS cor0
----
61
61
62

query I rowsort
SELECT col1 * + col0 * - col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT ALL + 49 FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT ALL + ( - col1 ) * cor0.col0 - - 3 FROM tab1 AS cor0
----
-1037
-637
-75

query I rowsort
SELECT ALL + col1 * cor0.col0 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( ( - col2 ) ) + 70 * col2 col2 FROM tab1 cor0
----
3726
3933
6624

onlyif mysql # use DIV operator for integer division
query I rowsort label-3392
SELECT + col2 DIV - col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-3392
SELECT + col2 / - col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3393
SELECT DISTINCT - col0 + - 0 * 77 * + col0 + - ( + col2 ) DIV - tab2.col0 AS col0 FROM tab2
----
-4
-78
-79

skipif mysql # not compatible
query I rowsort label-3393
SELECT DISTINCT - col0 + - 0 * 77 * + col0 + - ( + col2 ) / - tab2.col0 AS col0 FROM tab2
----
-4
-78
-79

query I rowsort
SELECT DISTINCT 82 AS col2 FROM tab0, tab0 AS cor0
----
82

query I rowsort
SELECT col2 + col1 + - col1 AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT + col2 + + 64 FROM tab1
----
118
121
160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col1 * col1 col2 FROM tab2
----
306
3540
992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3398
SELECT CAST( 77 AS SIGNED ) * col0 FROM tab1 AS cor0
----
231
4928
6160

skipif mysql # not compatible
query I rowsort label-3398
SELECT CAST ( 77 AS INTEGER ) * col0 FROM tab1 AS cor0
----
231
4928
6160

query I rowsort
SELECT - 33 + col0 FROM tab2 AS cor0
----
-26
45
46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3400
SELECT ALL CAST( - col0 AS SIGNED ) * col0 * + col2 AS col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

skipif mysql # not compatible
query I rowsort label-3400
SELECT ALL CAST ( - col0 AS INTEGER ) * col0 * + col2 AS col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT cor0.col0 * col0 + col0 FROM tab2 cor0
----
56
6162
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 81 + + col1 col0 FROM tab0 cor0
----
167
172
178

onlyif mysql # use DIV operator for integer division
query I rowsort label-3403
SELECT col1 + - col2 DIV col1 FROM tab1 AS cor0
----
24
5
6

skipif mysql # not compatible
query I rowsort label-3403
SELECT col1 + - col2 / col1 FROM tab1 AS cor0
----
24
5
6

query I rowsort
SELECT DISTINCT ( col0 ) * - col2 + col1 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT - 86 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 9d2e1e8eda15b3b83dd7136dfc4f19af

query I rowsort
SELECT ALL + ( 38 ) * col0 * 59 + - col1 - col0 * + tab0.col2 FROM tab0
----
192149
52930
78338

onlyif mysql # use DIV operator for integer division
query I rowsort label-3407
SELECT + col1 * - col2 DIV - col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3407
SELECT + col1 * - col2 / - col2 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT + 15 AS col0 FROM tab0, tab1 AS cor0
----
15

query I rowsort
SELECT col1 * + ( cor0.col1 ) * ( - col0 ) FROM tab2 cor0
----
-22831
-271518
-6727

query I rowsort
SELECT 57 + + cor0.col0 + col2 * 92 FROM tab0 AS cor0
----
184
3117
7690

onlyif mysql # use DIV operator for integer division
query I rowsort label-3411
SELECT + 19 DIV tab2.col1 + + 66 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to d605585529432ffca3614fdb22cae6d6

skipif mysql # not compatible
query I rowsort label-3411
SELECT + 19 / tab2.col1 + + 66 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to d605585529432ffca3614fdb22cae6d6

query I rowsort
SELECT - cor0.col0 - 96 FROM tab0, tab1 AS cor0
----
9 values hashing to a7c26aa18194c3edcb963a6765982302

query I rowsort
SELECT DISTINCT - 95 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
-95

query I rowsort
SELECT + ( - col1 ) + col0 * col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT 18 * col1 * - ( - ( + col2 ) * col1 ) AS col2 FROM tab1 AS cor0
----
102600
292032
657072

query I rowsort
SELECT col0 + 3 AS col2 FROM tab1 AS cor0
----
6
67
83

query I rowsort
SELECT - col1 * 49 AS col0 FROM tab2 cor0
----
-1519
-2891
-833

query I rowsort
SELECT - cor0.col1 + + ( col1 ) * col1 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT col2 + 35 AS col1 FROM tab0
----
117
36
68

query I rowsort
SELECT 95 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT DISTINCT col2 * col1 + 99 FROM tab0 AS cor0
----
196
2937
7561

query I rowsort
SELECT 67 FROM tab1, tab0 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT + + col1 + 43 AS col2 FROM tab1 AS cor0
----
53
56
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3424
SELECT ALL - CAST( col0 AS SIGNED ) + col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3424
SELECT ALL - CAST ( col0 AS INTEGER ) + col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( col2 ) * - col0 + - col0 AS col2 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT + + 3 + 79 AS col2 FROM tab2 AS cor0
----
82

query I rowsort
SELECT DISTINCT - ( - ( col1 ) ) - col0 * + col0 FROM tab2 cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL + - ( col0 ) * col1 + col2 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT + col0 * 48 FROM tab0 cor0
----
1152
1680
4272

query I rowsort
SELECT ALL - 50 + col0 AS col0 FROM tab0 AS cor0
----
-15
-26
39

query I rowsort
SELECT tab0.col0 + col0 AS col2 FROM tab0
----
178
48
70

query I rowsort
SELECT - col0 * + 85 + + col1 * col0 FROM tab0
----
24
420
534

query I rowsort
SELECT - col2 + + col2 * + col2 FROM tab2
----
1406
650
702

query I rowsort
SELECT ALL + 41 * col1 - + col2 AS col1 FROM tab0 AS cor0
----
3493
3649
3976

query I rowsort
SELECT ALL 13 * - col1 FROM tab0 AS cor0
----
-1118
-1183
-1261

query I rowsort
SELECT DISTINCT - + ( 37 ) * - col1 + ( col0 ) + + col1 * - 1 AS col0 FROM tab0 cor0
----
3120
3365
3527

query I rowsort
SELECT ALL + 77 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT - 81 * col1 + col0 AS col1 FROM tab2 AS cor0
----
-1298
-2504
-4701

query I rowsort
SELECT cor0.col1 * - cor0.col1 + - col2 FROM tab1 cor0
----
-157
-265
-730

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 * col1 * + col1 + col1 col0 FROM tab2 AS cor0
----
2329
27907
7719

query I rowsort
SELECT 26 + + col0 AS col0 FROM tab1 AS cor0
----
106
29
90

query I rowsort
SELECT - - 53 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
-1643
-3127
-901

query I rowsort
SELECT - 62 + - col2 FROM tab1 AS cor0
----
-116
-119
-158

query I rowsort
SELECT - 27 * cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to d025b01e208ef80f50c1ed29511323b6

query I rowsort
SELECT col0 * + tab2.col0 * col0 FROM tab2
----
343
474552
493039

query I rowsort
SELECT ALL - col1 * - col2 * + col2 FROM tab2 cor0
----
22599
24548
39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-3447
SELECT - 4 DIV + col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3447
SELECT - 4 / + col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - col0 * col0 * - col2 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT + col0 + - col2 * col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL + 25 + col0 * + col0 FROM tab2 cor0
----
6109
6266
74

query I rowsort
SELECT ALL + 30 FROM tab2 AS cor0
----
30
30
30

query I rowsort
SELECT + - 75 + cor0.col2 AS col0 FROM tab1 AS cor0
----
-18
-21
21

query I rowsort
SELECT ALL col2 * ( + col1 ) + - col0 AS col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT - col1 + 72 + col2 AS col0 FROM tab0 AS cor0
----
-24
19
63

query I rowsort
SELECT ( - 15 ) * tab0.col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to b02378e1e82fc5946c6c9794fa4ad3d9

query I rowsort
SELECT ALL + 44 + - col0 * - tab1.col0 AS col1 FROM tab1
----
4140
53
6444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3457
SELECT ALL col1 * + col1 + CAST( NULL AS SIGNED ) + col1 * - col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3457
SELECT ALL col1 * + col1 + CAST ( NULL AS INTEGER ) + col1 * - col1 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3458
SELECT DISTINCT col2 + + col0 + col2 DIV col0 FROM tab0
----
171
36
58

skipif mysql # not compatible
query I rowsort label-3458
SELECT DISTINCT col2 + + col0 + col2 / col0 FROM tab0
----
171
36
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-3459
SELECT DISTINCT col1 + col2 + + col1 DIV + col0 FROM tab2
----
55
62
85

skipif mysql # not compatible
query I rowsort label-3459
SELECT DISTINCT col1 + col2 + + col1 / + col0 FROM tab2
----
55
62
85

query I rowsort
SELECT ALL col0 * col2 + - col1 FROM tab1
----
136
3638
7667

query I rowsort
SELECT + col1 + col0 * + col1 FROM tab1
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-3462
SELECT DISTINCT col1 DIV col0 + + tab2.col0 * col2 AS col0 FROM tab2
----
193
2028
3002

skipif mysql # not compatible
query I rowsort label-3462
SELECT DISTINCT col1 / col0 + + tab2.col0 * col2 AS col0 FROM tab2
----
193
2028
3002

query I rowsort
SELECT + col0 + - col1 * - col1 FROM tab1 cor0
----
164
249
679

query I rowsort
SELECT col2 * - col2 * col0 AS col2 FROM tab0
----
-26136
-35
-598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-3465
SELECT DISTINCT col1 DIV col2 + col2 FROM tab0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-3465
SELECT DISTINCT col1 / col2 + col2 FROM tab0
----
35
83
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3466
SELECT + col0 + + col2 DIV col0 FROM tab2
----
10
78
79

skipif mysql # not compatible
query I rowsort label-3466
SELECT + col0 + + col2 / col0 FROM tab2
----
10
78
79

query I rowsort
SELECT ALL tab0.col0 * col1 FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3468
SELECT + - col1 DIV col0 AS col2 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3468
SELECT + - col1 / col0 AS col2 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT ALL col2 + - tab0.col1 * col0 * + col2 FROM tab0
----
-3394
-664036
-68079

onlyif mysql # use DIV operator for integer division
query I rowsort label-3470
SELECT DISTINCT + - col0 DIV col1 FROM tab1 AS cor0
----
-6
0

skipif mysql # not compatible
query I rowsort label-3470
SELECT DISTINCT + - col0 / col1 FROM tab1 AS cor0
----
-6
0

query I rowsort
SELECT ALL + cor0.col2 * + col0 + col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT col1 * - col2 + + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * col2 col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + - col1 + - cor0.col0 + col0 * - col0 FROM tab0 AS cor0
----
-1357
-686
-8101

query I rowsort
SELECT DISTINCT + col2 * col2 + col2 FROM tab0 cor0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-3476
SELECT DISTINCT - + col0 DIV cor0.col1 AS col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3476
SELECT DISTINCT - + col0 / cor0.col1 AS col1 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + col2 col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - col2 * - cor0.col1 + col0 AS col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL col2 * col0 + - col2 * - col2 FROM tab1 AS cor0
----
16896
3078
6897

onlyif mysql # use DIV operator for integer division
query I rowsort label-3480
SELECT ALL + col0 DIV col1 + col1 DIV + col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3480
SELECT ALL + col0 / col1 + col1 / + col0 FROM tab0
----
1
2
3

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab1, tab1 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3482
SELECT + col2 - col2 DIV col1 AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3482
SELECT + col2 - col2 / col1 AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - - cor0.col1 + - col1 * col0 FROM tab1 AS cor0
----
-1027
-52
-630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 * col0 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL ( col2 ) * col1 + col0 + cor0.col1 FROM tab2 AS cor0
----
1671
742
875

query I rowsort
SELECT DISTINCT - 11 + col0 FROM tab2 AS cor0
----
-4
67
68

query I rowsort
SELECT ALL + 14 + + col0 AS col1 FROM tab0 AS cor0
----
103
38
49

query I rowsort
SELECT DISTINCT + + 12 - cor0.col2 FROM tab1 AS cor0
----
-42
-45
-84

query I rowsort
SELECT ALL - ( - cor0.col2 ) AS col0 FROM tab2 cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + col2 col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + col2 * col0 + col2 * + col0 FROM tab1 AS cor0
----
15360
324
7296

onlyif mysql # use DIV operator for integer division
query I rowsort label-3492
SELECT - + col2 DIV col1 + col1 DIV + cor0.col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3492
SELECT - + col2 / col1 + col1 / + cor0.col0 FROM tab0 AS cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + col0 + - col2 col2 FROM tab0 cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * col0 col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - cor0.col2 * - col0 + - col1 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
-2574
-28
1659

query I rowsort
SELECT - col0 * + col1 * - col2 + col0 AS col0 FROM tab0
----
3430
664207
68136

onlyif mysql # use DIV operator for integer division
query I rowsort label-3497
SELECT col0 * - col0 + col2 DIV col1 FROM tab0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-3497
SELECT col0 * - col0 + col2 / col1 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT - col1 + - col0 * - col0 - col1 * - col2 AS col0 FROM tab2
----
6870
7559
855

onlyif mysql # use DIV operator for integer division
query I rowsort label-3499
SELECT ALL - col0 DIV col1 col1 FROM tab1
----
-6
-6
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3499
SELECT ALL - col0 / col1 col1 FROM tab1
----
-6
-6
0

query I rowsort
SELECT ALL col2 + tab2.col1 + - col0 FROM tab2
----
-24
51
7

query I rowsort
SELECT tab1.col0 * - col0 * - col1 FROM tab1
----
234
40960
83200

query I rowsort
SELECT ALL - col2 * - tab0.col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + col2 * tab1.col2 AS col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT + col1 * - col1 + - col2 AS col0 FROM tab1
----
-157
-265
-730

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col0 + - col0 * col2 * + col1 col1 FROM tab0
----
-3359
-663947
-68055

query I rowsort
SELECT DISTINCT - col2 * tab0.col0 FROM tab0 WHERE NULL NOT IN ( col0 + + col1 * + tab0.col0 * col2 )
----

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab2 WHERE NOT NULL IN ( - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3508
SELECT DISTINCT - col1 DIV col0 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3508
SELECT DISTINCT - col1 / col0 FROM tab0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab0 WHERE NULL NOT IN ( + col0 + - col0 )
----

query I rowsort
SELECT col2 + + cor0.col1 * col1 FROM tab1 AS cor0
----
157
265
730

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + col1 col2 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL col1 * - col0 + - col1 AS col1 FROM tab2
----
-1360
-248
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-3513
SELECT + col2 * col2 DIV col0 + - col0 AS col1 FROM tab0
----
-14
-35
21

skipif mysql # not compatible
query I rowsort label-3513
SELECT + col2 * col2 / col0 + - col0 AS col1 FROM tab0
----
-14
-35
21

query I rowsort
SELECT col1 * col2 * col0 - - tab1.col2 FROM tab1
----
36537
4266
99936

query I rowsort
SELECT DISTINCT + col0 FROM tab2 WHERE NOT NULL IN ( + col0 )
----

query I rowsort
SELECT col2 + - tab1.col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL tab2.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + tab1.col2 + - col1 * - col2 AS col2 FROM tab1
----
1344
1458
627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + tab2.col1 col1 FROM tab2
----
137
38
96

query I rowsort
SELECT + col0 - - tab1.col1 * - col1 AS col2 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT DISTINCT col0 + col1 + + col0 FROM tab1
----
138
173
32

query I rowsort
SELECT col2 * + col0 * + col2 AS col1 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT ALL - col0 * col1 AS col0 FROM tab2
----
-1343
-217
-4602

query III rowsort
SELECT * FROM tab1 WHERE NOT ( col1 / col1 + col0 ) NOT IN ( col1 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) > ( col1 )
----

query I rowsort
SELECT ALL + col2 * col2 * - col1 AS col2 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT ALL + tab1.col1 + col0 FROM tab1
----
29
74
93

query I rowsort
SELECT col1 * col0 * + col1 + + tab0.col0 AS col1 FROM tab0
----
177528
329350
737098

query I rowsort
SELECT col1 + + col0 + col0 * + col2 AS col2 FROM tab0
----
167
7478
902

query I rowsort
SELECT + col1 * - col2 * col2 AS col1 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT ALL - col1 + col1 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 + col0 * col2 + - col2 AS col2 FROM tab0 AS cor0
----
1259
1335
15137

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 WHERE NULL NOT IN ( col2 + - col1 )
----

query I rowsort
SELECT ALL - col2 - + col1 AS col2 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3535
SELECT col1 - col1 DIV + col2 AS col2 FROM tab0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-3535
SELECT col1 - col1 / + col2 AS col2 FROM tab0
----
0
84
90

query I rowsort
SELECT tab2.col1 + - col0 * col0 FROM tab2
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT - col1 * + col1 * col2 + + col2 FROM tab2
----
-10944
-25920
-90480

query I rowsort
SELECT col0 * + col0 * 83 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
340025
531296
801

query I rowsort
SELECT + 55 AS col0 FROM tab2 AS cor0
----
55
55
55

query I rowsort
SELECT 24 AS col1 FROM tab1 AS cor0
----
24
24
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3541
SELECT ALL col1 * col2 / + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3541
SELECT ALL col1 * col2 / + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + col0 FROM tab0 cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col2 * col1 col2 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3544
SELECT DISTINCT CAST( NULL AS DECIMAL ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-3544
SELECT DISTINCT CAST ( NULL AS REAL ) FROM tab2
----
NULL

query I rowsort
SELECT + + cor0.col1 * - cor0.col1 AS col2 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - cor0.col2 * + col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-3547
SELECT ALL + - col0 * ( + 92 ) * col2 + ( col0 ) DIV col0 + 36 * + col1 FROM tab2 AS cor0
----
-16271
-184451
-275571

skipif mysql # not compatible
query I rowsort label-3547
SELECT ALL + - col0 * ( + 92 ) * col2 + ( col0 ) / col0 + 36 * + col1 FROM tab2 AS cor0
----
-16271
-184451
-275571

onlyif mysql # use DIV operator for integer division
query I rowsort label-3548
SELECT DISTINCT + col2 DIV ( 43 ) AS col2 FROM tab1 AS cor0
----
1
2

skipif mysql # not compatible
query I rowsort label-3548
SELECT DISTINCT + col2 / ( 43 ) AS col2 FROM tab1 AS cor0
----
1
2

query I rowsort
SELECT ALL + col0 + col1 + col1 * - col2 FROM tab0 AS cor0
----
-2728
-7282
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col2 * - 47 col2 FROM tab1
----
-2592
-2736
-4608

query I rowsort
SELECT col1 * 6 * col2 FROM tab2 AS cor0
----
3876
5022
9204

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL 98 + col1 * - col2 FROM tab0 AS cor0
----
-2740
-7364
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 41 * col0 col2 FROM tab0 AS cor0
----
1400
3560
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 * + 39 col1 FROM tab2
----
273
3042
3081

query I rowsort
SELECT + 88 FROM tab0, tab2 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT + col1 * ( col0 + - col2 ) FROM tab0
----
-774
3298
637

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 13 * 89 + - col2 col2 FROM tab2 AS cor0
----
-1183
-1184
-1195

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3559
SELECT ( + col1 ) * - col1 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3559
SELECT ( + col1 ) * - col1 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 71 * - 88 * col2 + col0 FROM tab0
----
-206160
-512247
-6213

query I rowsort
SELECT + col1 - - 3 * - col1 AS col1 FROM tab0
----
-172
-182
-194

query I rowsort
SELECT - - 4 * - col2 + + ( ( col2 ) ) * + ( + ( - col2 ) ) + col1 * + col1 FROM tab1 cor0
----
-2456
-3377
-9431

query I rowsort
SELECT ALL - - 45 * - col0 * cor0.col1 FROM tab2 cor0
----
-207090
-60435
-9765

skipif mysql # not compatible
query I rowsort
SELECT col1 + col1 * - CAST ( + col1 AS REAL ) * - col2 + + ( - col0 ) FROM tab2 AS cor0
----
10920
25971
90487

query I rowsort
SELECT DISTINCT - 78 AS col0 FROM tab1 AS cor0
----
-78

query I rowsort
SELECT DISTINCT - - col0 * + col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 81 * - col0 col2 FROM tab0 AS cor0
----
-1944
-2835
-7209

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab2 cor1, tab2 AS cor2
----
972 values hashing to 958533d1a7bf61199ed7c03eadf37f9a

query I rowsort
SELECT - ( + 49 ) + col0 - - col0 FROM tab2
----
-35
107
109

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3570
SELECT CAST( NULL AS SIGNED ) * - tab0.col1 - + tab0.col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3570
SELECT CAST ( NULL AS INTEGER ) * - tab0.col1 - + tab0.col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - tab1.col1 AS col2 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT + col0 * - col2 + 37 FROM tab2 AS cor0
----
-152
-1991
-2965

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - tab2.col0 col1 FROM tab2
----
0
0
0

query I rowsort
SELECT 58 AS col1 FROM tab2 cor0
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * col1 col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - 81 * + col1 FROM tab2 AS cor0
----
-1377
-2511
-4779

query I rowsort
SELECT - col1 + 26 + + col1 * col1 FROM tab1
----
116
182
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3578
SELECT ALL - col1 - - CAST( NULL AS DECIMAL ) * 73 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3578
SELECT ALL - col1 - - CAST ( NULL AS REAL ) * 73 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 + + ( - col0 ) - + col2 FROM tab1 cor0
----
-185
-256
-60

query I rowsort
SELECT DISTINCT col0 * 44 * cor0.col2 + - col0 FROM tab1 AS cor0
----
160448
337840
7125

onlyif mysql # use DIV operator for integer division
query I rowsort label-3581
SELECT ALL + col0 + + cor0.col2 DIV - col1 FROM tab1 AS cor0
----
1
59
73

skipif mysql # not compatible
query I rowsort label-3581
SELECT ALL + col0 + + cor0.col2 / - col1 FROM tab1 AS cor0
----
1
59
73

query I rowsort
SELECT DISTINCT ( + ( col0 ) ) * + col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT + + ( + 83 ) - + col2 AS col2 FROM tab0 cor0
----
1
50
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3584
SELECT ALL - ( col2 ) + - col0 DIV + col1 FROM tab1 AS cor0
----
-102
-54
-63

skipif mysql # not compatible
query I rowsort label-3584
SELECT ALL - ( col2 ) + - col0 / + col1 FROM tab1 AS cor0
----
-102
-54
-63

query I rowsort
SELECT DISTINCT - + col1 * + col0 + - col1 * col0 * col2 AS col2 FROM tab2 AS cor0
----
-124254
-52377
-6076

onlyif mysql # use DIV operator for integer division
query I rowsort label-3586
SELECT 70 DIV + col1 FROM tab2 AS cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-3586
SELECT 70 / + col1 FROM tab2 AS cor0
----
1
2
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3587
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + 46 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3587
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + 46 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - - ( col0 ) * + col1 + col0 * col0 + col1 AS col0 FROM tab1 AS cor0
----
113
4746
7453

query I rowsort
SELECT DISTINCT 61 AS col1 FROM tab1 cor0
----
61

query I rowsort
SELECT + col2 * - ( + ( - col2 ) + col0 ) FROM tab1
----
-399
1536
2754

onlyif mysql # use DIV operator for integer division
query I rowsort label-3591
SELECT - col2 DIV + 17 AS col2 FROM tab1
----
-3
-3
-5

skipif mysql # not compatible
query I rowsort label-3591
SELECT - col2 / + 17 AS col2 FROM tab1
----
-3
-3
-5

query I rowsort
SELECT + col0 * + 3 - - col2 AS col2 FROM tab1 AS cor0
----
249
336
63

query I rowsort
SELECT col0 + + cor0.col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL ( - col0 ) + col1 * + ( - col0 + col0 * cor0.col1 ) FROM tab1 cor0
----
12400
1947
5696

query I rowsort
SELECT - + 3 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-29
-30
-41

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + 5 * - col2 * - col1 + CAST ( + 81 AS REAL ) FROM tab1 AS cor0
----
2931
6321
7101

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( 27 ) + - cor0.col2 col1 FROM tab1 AS cor0
----
-27
-30
-69

query I rowsort
SELECT DISTINCT 6 + + 83 AS col0 FROM tab2 AS cor0
----
89

query I rowsort
SELECT + + col1 + col1 * col0 AS col2 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL - 57 * - col2 FROM tab0 AS cor0
----
1881
4674
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3601
SELECT DISTINCT - + col0 DIV - 35 + - col1 AS col2 FROM tab1 AS cor0
----
-11
-26
-9

skipif mysql # not compatible
query I rowsort label-3601
SELECT DISTINCT - + col0 / - 35 + - col1 AS col2 FROM tab1 AS cor0
----
-11
-26
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3602
SELECT + CAST( NULL AS SIGNED ) - - col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3602
SELECT + CAST ( NULL AS INTEGER ) - - col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 - 32 * 59 FROM tab0 AS cor0
----
-1974
-1979
-1985

query I rowsort
SELECT ALL - ( + 91 ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 745d1c3a09d935465cad552325c5c945

query I rowsort
SELECT ALL - - col1 * ( 75 ) * - col1 + 81 FROM tab0 AS cor0
----
-554619
-620994
-705594

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3606
SELECT DISTINCT + CAST( 3 AS SIGNED ) AS col1 FROM tab1, tab2 AS cor0
----
3

skipif mysql # not compatible
query I rowsort label-3606
SELECT DISTINCT + CAST ( 3 AS INTEGER ) AS col1 FROM tab1, tab2 AS cor0
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * + col0 * col2 + col2 * ( cor0.col2 ) col1 FROM tab1 AS cor0
----
-204687
-5832
-728064

query I rowsort
SELECT col0 + 86 * col1 FROM tab2 AS cor0
----
1541
2673
5152

onlyif mysql # use DIV operator for integer division
query I rowsort label-3609
SELECT DISTINCT + + col0 DIV + 7 - - col1 * col0 col1 FROM tab1 AS cor0
----
1051
649
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3609
SELECT DISTINCT + + col0 / + 7 - - col1 * col0 col1 FROM tab1 AS cor0
----
1051
649
78

query I rowsort
SELECT + col2 * + cor0.col2 + - col1 AS col2 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT - col2 + col0 * - col0 FROM tab0
----
-1226
-609
-8003

query I rowsort
SELECT + + cor0.col0 * + col2 + 65 AS col0 FROM tab1 AS cor0
----
227
3713
7745

query I rowsort
SELECT DISTINCT - col1 + ( + 46 ) AS col2 FROM tab2
----
-13
15
29

query I rowsort
SELECT col2 + 6 AS col1 FROM tab1
----
102
60
63

query I rowsort
SELECT + col1 + - ( 8 ) + - col2 FROM tab0
----
1
45
88

query I rowsort
SELECT DISTINCT 16 FROM tab0, tab1 AS cor0
----
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col2 col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + col2 * - ( col0 ) AS col1 FROM tab1
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col0 col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT col1 * 48 AS col0 FROM tab0
----
4128
4368
4656

query I rowsort
SELECT DISTINCT 35 * + col2 FROM tab1
----
1890
1995
3360

query I rowsort
SELECT DISTINCT - + 16 FROM tab2 cor0
----
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * + col1 * - col2 col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT + - 4 * col1 FROM tab0 cor0
----
-344
-364
-388

query I rowsort
SELECT + 76 AS col1 FROM tab1
----
76
76
76

query I rowsort
SELECT + - cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT DISTINCT + col2 + col0 * - col0 FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT 3 - - col2 AS col2 FROM tab0 AS cor0
----
36
4
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 7 col2 FROM tab0 AS cor0
----
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3630
SELECT - - col1 DIV col0 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-3630
SELECT - - col1 / col0 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT ALL - + col1 * - col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + 3 * col2 + 11 FROM tab1 AS cor0
----
173
182
299

query I rowsort
SELECT DISTINCT col0 * cor0.col1 + col1 * - col1 FROM tab1 cor0
----
-598
540
871

query I rowsort
SELECT ALL + 7 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT DISTINCT - 86 * - col2 FROM tab0 AS cor0
----
2838
7052
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col0 ) col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - tab2.col0 + tab2.col2 * col2 AS col1 FROM tab2
----
1365
598
722

onlyif mysql # use DIV operator for integer division
query I rowsort label-3638
SELECT DISTINCT - col0 * col0 DIV col0 AS col0 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-3638
SELECT DISTINCT - col0 * col0 / col0 AS col0 FROM tab0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3639
SELECT ALL + col1 * col1 DIV - col0 AS col0 FROM tab2
----
-137
-3
-44

skipif mysql # not compatible
query I rowsort label-3639
SELECT ALL + col1 * col1 / - col0 AS col0 FROM tab2
----
-137
-3
-44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3640
SELECT col0 * + col0 * CAST( NULL AS SIGNED ) + - col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3640
SELECT col0 * + col0 * CAST ( NULL AS INTEGER ) + - col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col0 + col2 + col0 col0 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT ALL col2 * col0 + ( col1 + + col0 ) AS col0 FROM tab1 cor0
----
191
3722
7773

query I rowsort
SELECT 65 AS col0 FROM tab2, tab0, tab0 cor0
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT DISTINCT ( col2 * tab1.col1 ) AS col0 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-3645
SELECT + col1 + - col1 DIV - 53 - + col2 AS col2 FROM tab0 AS cor0
----
10
54
97

skipif mysql # not compatible
query I rowsort label-3645
SELECT + col1 + - col1 / - 53 - + col2 AS col2 FROM tab0 AS cor0
----
10
54
97

query I rowsort
SELECT - - col0 * col2 + 6 AS col1 FROM tab2 AS cor0
----
195
2034
3008

query I rowsort
SELECT - 32 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 54c3a9a1fd8612641b43985c0c2f59cd

query I rowsort
SELECT + col1 - ( col2 ) * - cor0.col1 AS col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + + col0 + ( + ( + col0 ) ) * + col1 * - col2 AS col1 FROM tab1 AS cor0
----
-36416
-4209
-99760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3650
SELECT col2 + + CAST( NULL AS SIGNED ) * + col2 - + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3650
SELECT col2 + + CAST ( NULL AS INTEGER ) * + col2 - + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 * 75 * + col1 + col1 AS col1 FROM tab1 AS cor0
----
-47990
-5824
-77987

query I rowsort
SELECT DISTINCT - + col0 + + 55 FROM tab1 cor0
----
-25
-9
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * cor0.col1 col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 2afdaba7b80c700b7635230c4f8524be

query I rowsort
SELECT - ( ( + col0 ) ) * 15 + - 96 AS col1 FROM tab2 cor0
----
-1266
-1281
-201

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3655
SELECT - + CAST( - col2 AS SIGNED ) FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3655
SELECT - + CAST ( - col2 AS INTEGER ) FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL - 24 + + col2 FROM tab1 cor0
----
30
33
72

query I rowsort
SELECT DISTINCT + 27 * col1 FROM tab0 AS cor0
----
2322
2457
2619

query I rowsort
SELECT DISTINCT + col2 * - col2 + col1 AS col0 FROM tab2 AS cor0
----
-1427
-617
-698

onlyif mysql # use DIV operator for integer division
query I rowsort label-3659
SELECT DISTINCT + col0 DIV ( - cor0.col1 * ( + cor0.col2 ) ) + col0 + col2 * - 48 FROM tab1 cor0
----
-2589
-2672
-4528

skipif mysql # not compatible
query I rowsort label-3659
SELECT DISTINCT + col0 / ( - cor0.col1 * ( + cor0.col2 ) ) + col0 + col2 * - 48 FROM tab1 cor0
----
-2589
-2672
-4528

query I rowsort
SELECT 51 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
1581
3009
867

onlyif mysql # use DIV operator for integer division
query I rowsort label-3661
SELECT ALL + tab1.col0 DIV + col2 + col1 FROM tab1
----
11
13
26

skipif mysql # not compatible
query I rowsort label-3661
SELECT ALL + tab1.col0 / + col2 + col1 FROM tab1
----
11
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT - col0 * col1 + - col1 * col0 * + 6 FROM tab1 AS cor0
----
-4480
-546
-7280

query I rowsort
SELECT + + cor0.col0 * ( col1 * - col1 ) FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT + + col1 + - 4 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
-258
-273
-291

query I rowsort
SELECT - - cor0.col0 + col0 AS col1 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT DISTINCT - 88 * + col2 + col0 AS col1 FROM tab0 AS cor0
----
-2880
-53
-7127

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col2 * 52 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
-189696
-399360
-8424

query I rowsort
SELECT DISTINCT 51 * + 62 + col1 FROM tab0 AS cor0
----
3248
3253
3259

query I rowsort
SELECT ALL - 53 + + col2 AS col1 FROM tab1 cor0
----
1
4
43

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab0 cor1, tab1 AS cor2
----
972 values hashing to 2d99dda76af061a3fac120e0e49e6c53

query I rowsort
SELECT - + col0 * - cor0.col0 - - ( col1 ) * col0 AS col1 FROM tab0 AS cor0
----
16020
2640
4620

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - col1 col2 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-3674
SELECT + ( col2 ) + cor0.col0 DIV 83 AS col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-3674
SELECT + ( col2 ) + cor0.col0 / 83 AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + 91 AS col2 FROM tab2
----
91

query I rowsort
SELECT DISTINCT 34 * col2 * 58 FROM tab2
----
51272
53244
74936

query I rowsort
SELECT ALL col1 + + 41 AS col0 FROM tab0 cor0
----
127
132
138

query I rowsort
SELECT ALL - col0 * 45 AS col0 FROM tab1 AS cor0
----
-135
-2880
-3600

query I rowsort
SELECT cor0.col0 * - cor0.col0 - + cor0.col0 * + col0 AS col2 FROM tab1 AS cor0
----
-12800
-18
-8192

onlyif mysql # use DIV operator for integer division
query I rowsort label-3680
SELECT + 96 * 95 DIV cor0.col0 col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 3f1122af5a06301b67e9c00090be38b3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3680
SELECT + 96 * 95 / cor0.col0 col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 3f1122af5a06301b67e9c00090be38b3

query I rowsort
SELECT ALL 27 - col1 FROM tab0
----
-59
-64
-70

query I rowsort
SELECT ALL + 70 AS col1 FROM tab0
----
70
70
70

query I rowsort
SELECT DISTINCT 97 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
97

query I rowsort
SELECT DISTINCT + col2 * 35 + col1 AS col1 FROM tab2 cor0
----
1347
969
976

query I rowsort
SELECT DISTINCT + col1 * + 11 AS col2 FROM tab0 AS cor0
----
1001
1067
946

query I rowsort
SELECT + col0 + + col2 * col2 - - col0 FROM tab2 AS cor0
----
1602
743
832

query I rowsort
SELECT + 98 + 40 FROM tab0, tab1 AS cor0
----
9 values hashing to 8efb07034dc56ab6b9bb87a8b955053a

onlyif mysql # use DIV operator for integer division
query I rowsort label-3688
SELECT - col2 + col1 - ( + col2 ) DIV - col2 AS col1 FROM tab1 cor0
----
-27
-46
-82

skipif mysql # not compatible
query I rowsort label-3688
SELECT - col2 + col1 - ( + col2 ) / - col2 AS col1 FROM tab1 cor0
----
-27
-46
-82

query I rowsort
SELECT DISTINCT col2 * + ( col2 ) + - col0 FROM tab0
----
-34
1065
6635

query I rowsort
SELECT DISTINCT col0 + - 91 AS col1 FROM tab0
----
-2
-56
-67

query I rowsort
SELECT col1 + - ( col2 ) * col0 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT + ( + 76 ) FROM tab0, tab0 AS cor0
----
76

query I rowsort
SELECT DISTINCT 35 AS col2 FROM tab1, tab1 AS cor0
----
35

query I rowsort
SELECT - col2 + 40 AS col2 FROM tab2
----
13
14
2

query I rowsort
SELECT ALL + tab0.col1 + - 45 FROM tab0
----
41
46
52

query I rowsort
SELECT col0 + 14 * ( cor0.col0 * col0 ) - col1 * + col0 FROM tab0 AS cor0
----
102884
13790
6024

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3697
SELECT ALL - cor0.col1 / - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3697
SELECT ALL - cor0.col1 / - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * ( - 51 ) - col2 AS col0 FROM tab0 cor0
----
-4419
-4723
-4948

onlyif mysql # use DIV operator for integer division
query I rowsort label-3699
SELECT ALL + col2 * col1 + - col0 * col2 DIV ( - col0 ) FROM tab1
----
1344
1458
627

skipif mysql # not compatible
query I rowsort label-3699
SELECT ALL + col2 * col1 + - col0 * col2 / ( - col0 ) FROM tab1
----
1344
1458
627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

onlyif mysql # use DIV operator for integer division
query I rowsort label-3701
SELECT DISTINCT col0 DIV - ( col0 ) + - col1 FROM tab2
----
-18
-32
-60

skipif mysql # not compatible
query I rowsort label-3701
SELECT DISTINCT col0 / - ( col0 ) + - col1 FROM tab2
----
-18
-32
-60

query I rowsort
SELECT col1 + - col0 * 79 AS col2 FROM tab1
----
-211
-5046
-6307

query I rowsort
SELECT ALL + ( 95 ) FROM tab2, tab0 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT ALL - 49 * col2 FROM tab2
----
-1274
-1323
-1862

query I rowsort
SELECT + tab0.col0 AS col1 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ( + col2 ) * tab1.col1 - + col0 FROM tab1
----
1168
1401
506

query I rowsort
SELECT DISTINCT col0 * col2 * 83 AS col2 FROM tab2 AS cor0
----
15687
168324
249166

onlyif mysql # use DIV operator for integer division
query I rowsort label-3708
SELECT - - cor0.col0 + 95 DIV + col1 AS col2 FROM tab1 cor0
----
6
73
87

skipif mysql # not compatible
query I rowsort label-3708
SELECT - - cor0.col0 + 95 / + col1 AS col2 FROM tab1 cor0
----
6
73
87

query I rowsort
SELECT + cor0.col0 * cor0.col0 FROM tab1, tab2 cor0
----
9 values hashing to 458b4c13e6825f9686b15a38663930f4

query I rowsort
SELECT col0 - 11 FROM tab1
----
-8
53
69

query I rowsort
SELECT - - 24 * + col1 FROM tab0 AS cor0
----
2064
2184
2328

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3712
SELECT - col0 * - cor0.col0 / + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3712
SELECT - col0 * - cor0.col0 / + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - 80 + - col2 FROM tab0 AS cor0
----
-2
47
79

query I rowsort
SELECT ALL 88 * + col0 AS col0 FROM tab1 AS cor0
----
264
5632
7040

query I rowsort
SELECT ALL + 20 + - col0 + - 98 FROM tab0 AS cor0
----
-102
-113
-167

query I rowsort
SELECT ALL - - col0 * - col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - + 94 * - col0 AS col1 FROM tab0 AS cor0
----
2256
3290
8366

query I rowsort
SELECT ALL + + col1 * col2 * + 67 + col2 AS col0 FROM tab0 AS cor0
----
190179
500036
6500

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 ) col1 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + col2 col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL + col0 + col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT 55 + cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 6a613a62ee31a3bb943733efaa1d4d52

query I rowsort
SELECT ALL col1 * col2 - - cor0.col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT ( + 84 ) * col1 + + ( + col2 ) * col0 AS col0 FROM tab1
----
2346
4488
8772

query I rowsort
SELECT DISTINCT + 44 + col2 AS col0 FROM tab2
----
70
71
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3726
SELECT DISTINCT 47 * - col2 * + col2 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-3726
SELECT DISTINCT 47 * - col2 * + col2 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT 70 * ( col2 + - col0 ) * col2 FROM tab0
----
-2380
-40180
20790

onlyif mysql # use DIV operator for integer division
query I rowsort label-3728
SELECT - tab1.col0 DIV - 10 AS col0 FROM tab1
----
0
6
8

skipif mysql # not compatible
query I rowsort label-3728
SELECT - tab1.col0 / - 10 AS col0 FROM tab1
----
0
6
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-3729
SELECT CAST( + col2 + col1 AS SIGNED ) DIV ( 93 ) FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3729
SELECT CAST ( + col2 + col1 AS INTEGER ) / ( 93 ) FROM tab1
----
0
0
1

query I rowsort
SELECT DISTINCT 63 AS col0 FROM tab1, tab2 AS cor0
----
63

query I rowsort
SELECT ALL - + col1 + - cor0.col1 * + col0 AS col0 FROM tab1 cor0
----
-104
-1053
-650

query I rowsort
SELECT DISTINCT col1 - - 57 AS col2 FROM tab0 AS cor0
----
143
148
154

query I rowsort
SELECT + - col1 * - col0 + ( cor0.col0 + + col1 ) * ( + col2 * - col2 ) FROM tab1 AS cor0
----
-239786
-84486
-856048

query I rowsort
SELECT 58 + + col0 AS col2 FROM tab2 AS cor0
----
136
137
65

query I rowsort
SELECT + col1 + - cor0.col1 * 32 FROM tab2 AS cor0
----
-1829
-527
-961

query I rowsort
SELECT - col1 + + col1 * col0 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT + 47 - + col0 FROM tab1 AS cor0
----
-17
-33
44

query I rowsort
SELECT ( - col2 ) + - 21 AS col2 FROM tab2 AS cor0
----
-47
-48
-59

query I rowsort
SELECT ALL + cor0.col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT - col2 + ( col2 * + 67 ) FROM tab2
----
1716
1782
2508

query I rowsort
SELECT ( col1 ) * col1 + tab0.col2 + - 82 * col2 FROM tab0
----
1639
4723
9328

onlyif mysql # use DIV operator for integer division
query I rowsort label-3742
SELECT CAST( + col1 + - col2 AS SIGNED ) DIV col2 FROM tab0
----
0
1
96

skipif mysql # not compatible
query I rowsort label-3742
SELECT CAST ( + col1 + - col2 AS INTEGER ) / col2 FROM tab0
----
0
1
96

query I rowsort
SELECT DISTINCT + 31 + - col0 * - col0 * col0 AS col2 FROM tab2
----
374
474583
493070

query I rowsort
SELECT ALL - 37 + - col1 FROM tab0
----
-123
-128
-134

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3745
SELECT DISTINCT + - col0 / - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3745
SELECT DISTINCT + - col0 / - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3746
SELECT DISTINCT - col0 * CAST( NULL AS SIGNED ) - + 0 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3746
SELECT DISTINCT - col0 * CAST ( NULL AS INTEGER ) - + 0 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + col0 + - 85 AS col2 FROM tab1 AS cor0
----
-21
-5
-82

query I rowsort
SELECT DISTINCT - - col2 + + 80 * + 75 AS col0 FROM tab2 AS cor0
----
6026
6027
6038

query I rowsort
SELECT DISTINCT col0 + ( - col0 * col1 ) FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL cor0.col2 + + 86 FROM tab0 AS cor0
----
119
168
87

query I rowsort
SELECT - col2 + + col1 * col0 AS col0 FROM tab0
----
2031
3394
8017

query I rowsort
SELECT + col0 - - col0 * 25 FROM tab0
----
2314
624
910

query I rowsort
SELECT DISTINCT - tab2.col0 + col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT DISTINCT - col0 + - ( - 5 ) * + cor0.col0 AS col0 FROM tab0 AS cor0
----
140
356
96

query I rowsort
SELECT + cor0.col0 * - col0 + col1 + col2 FROM tab0 cor0
----
-1127
-457
-7748

onlyif mysql # use DIV operator for integer division
query I rowsort label-3756
SELECT DISTINCT - ( - col1 ) DIV col1 + 20 + - tab2.col1 FROM tab2
----
-10
-38
4

skipif mysql # not compatible
query I rowsort label-3756
SELECT DISTINCT - ( - col1 ) / col1 + 20 + - tab2.col1 FROM tab2
----
-10
-38
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3757
SELECT + col2 DIV col2 + col1 AS col2 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-3757
SELECT + col2 / col2 + col1 AS col2 FROM tab0
----
87
92
98

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT ALL - col1 + ( + ( + col1 ) ) * + ( cor0.col1 ) FROM tab0 cor0
----
7310
8190
9312

query I rowsort
SELECT ALL + - col1 * + ( col2 + - col2 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col1 + + 62 FROM tab0
----
148
153
159

query I rowsort
SELECT ALL col1 * + ( + ( col2 ) ) AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT - col2 * - 43 FROM tab1 AS cor0
----
2322
2451
4128

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * - col2 * - col0 col0 FROM tab1 cor0
----
207936
737280
8748

query I rowsort
SELECT ALL + tab1.col1 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3766
SELECT ALL CAST( NULL AS SIGNED ) + + 51 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3766
SELECT ALL CAST ( NULL AS INTEGER ) + + 51 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + col1 * + tab2.col0 AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT - tab0.col0 * tab0.col2 AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT 98 FROM tab2, tab2 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT + - ( ( + cor0.col1 ) ) AS col1 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT + col2 * + 44 AS col2 FROM tab2 AS cor0
----
1144
1188
1672

query I rowsort
SELECT ALL + 25 FROM tab2 cor0
----
25
25
25

query I rowsort
SELECT + + col0 * + 31 FROM tab0 AS cor0
----
1085
2759
744

query I rowsort
SELECT + + 40 * - 72 * + col0 FROM tab2 AS cor0
----
-20160
-224640
-227520

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT tab0.col1 + ( 49 ) AS col2 FROM tab0, tab2 AS cor0
----
135
140
146

query I rowsort
SELECT DISTINCT + col1 * col1 + 46 FROM tab1 AS cor0
----
146
215
722

query I rowsort
SELECT DISTINCT col0 - + col2 AS col1 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT col0 + col0 * + col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL ( cor0.col1 ) * col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-3781
SELECT col0 DIV col2 + col0 * + col1 FROM tab0 cor0
----
2064
3430
8100

skipif mysql # not compatible
query I rowsort label-3781
SELECT col0 / col2 + col0 * + col1 FROM tab0 cor0
----
2064
3430
8100

query I rowsort
SELECT ALL + cor0.col2 - - col2 * 83 FROM tab2 AS cor0
----
2184
2268
3192

query I rowsort
SELECT + - col0 * col0 + col1 AS col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT ALL - 63 * cor0.col1 FROM tab0 AS cor0
----
-5418
-5733
-6111

query I rowsort
SELECT DISTINCT - col1 + col0 + 80 FROM tab2 AS cor0
----
142
56
99

query I rowsort
SELECT DISTINCT - + ( col2 ) * - col2 + col2 AS col2 FROM tab1 cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT - - ( col2 ) * 14 * + col1 FROM tab0 AS cor0
----
104468
1358
39732

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab1 cor1, tab0, tab1 AS cor2
----
3645 values hashing to f9101173abc9e524c6310e6c0eeefb0c

query I rowsort
SELECT 48 FROM tab0, tab1 cor0, tab2 AS cor1
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT ALL + + col0 * col2 + - col0 AS col1 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT ALL + 80 AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT cor0.col2 + - 36 AS col0 FROM tab1 AS cor0
----
18
21
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3793
SELECT + + col0 + - CAST( NULL AS SIGNED ) - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3793
SELECT + + col0 + - CAST ( NULL AS INTEGER ) - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - 41 * 53 col2 FROM tab1 AS cor0
----
-2147
-2160
-2163

query I rowsort
SELECT + cor0.col0 + - col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - col2 * - col1 AS col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col2 * 99 AS col1 FROM tab2 AS cor0
----
2574
2673
3762

query I rowsort
SELECT - - col1 * + col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + col0 * + 79 AS col0 FROM tab0 AS cor0
----
1896
2765
7031

query I rowsort
SELECT DISTINCT + 13 - col1 AS col1 FROM tab0
----
-73
-78
-84

query I rowsort
SELECT tab1.col1 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL + col2 + col1 - ( col0 * - col1 ) FROM tab0
----
2183
3493
8272

query I rowsort
SELECT ALL col0 - - col2 * - 82 AS col0 FROM tab2
----
-2054
-2207
-3037

onlyif mysql # use DIV operator for integer division
query I rowsort label-3804
SELECT - + col2 + + 77 DIV col0 FROM tab2 cor0
----
-16
-26
-38

skipif mysql # not compatible
query I rowsort label-3804
SELECT - + col2 + + 77 / col0 FROM tab2 cor0
----
-16
-26
-38

query I rowsort
SELECT - cor0.col0 + - 16 - + 15 AS col2 FROM tab0 AS cor0
----
-120
-55
-66

query I rowsort
SELECT ALL + + col1 * + col0 + cor0.col0 AS col2 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT + + col0 * col2 + - col2 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
132
14760
3630

query I rowsort
SELECT + - cor0.col2 * col0 + + 56 FROM tab0 AS cor0
----
-7242
-736
21

query I rowsort
SELECT - col2 * col0 + + col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT col1 * col0 + + col0 + col2 AS col2 FROM tab2
----
1460
251
4706

query I rowsort
SELECT DISTINCT + col2 + tab2.col2 FROM tab2 WHERE + col0 >= col2
----
52
76

query I rowsort
SELECT - col2 + col2 * col0 * - col0 AS col0 FROM tab0
----
-1226
-19041
-649604

query I rowsort
SELECT col1 * tab1.col2 FROM tab1 WHERE NOT + col1 / + col0 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL col0 AS col1 FROM tab2 WHERE NOT NULL <= + col1
----

query III rowsort
SELECT * FROM tab1 WHERE NOT col2 NOT IN ( - col2 * - col0 + col2 )
----

query I rowsort
SELECT + col2 * - tab2.col1 FROM tab2
----
-1534
-646
-837

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) = col0 / + col1
----

query I rowsort
SELECT + tab1.col2 + + col2 * - col0 + col2 * + col1 FROM tab1
----
-3021
-6336
1296

query III rowsort
SELECT * FROM tab0 WHERE NOT - col0 NOT IN ( + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3820
SELECT + + 99 * col2 DIV + cor0.col2 AS col0 FROM tab1 AS cor0
----
99
99
99

skipif mysql # not compatible
query I rowsort label-3820
SELECT + + 99 * col2 / + cor0.col2 AS col0 FROM tab1 AS cor0
----
99
99
99

query I rowsort
SELECT DISTINCT + 91 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
91

query I rowsort
SELECT + col0 + + cor0.col1 * - col2 FROM tab2 AS cor0
----
-1456
-567
-830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 - col2 col1 FROM tab1
----
0

query I rowsort
SELECT + ( + cor0.col0 ) + 5 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
42
468
474

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 50 + col1 col0 FROM tab2 AS cor0
----
-19
-33
9

query I rowsort
SELECT DISTINCT - 67 * cor0.col0 + col0 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-420
858
948

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL > NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 87 + - cor0.col2 col0 FROM tab0 AS cor0
----
-120
-169
-88

query I rowsort
SELECT ALL 15 * + col2 + col2 + + col1 FROM tab0 AS cor0
----
113
1403
614

query I rowsort
SELECT DISTINCT + - col1 * col0 AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col1 + - 37 col2 FROM tab2 AS cor0
----
252
3444
924

query I rowsort
SELECT DISTINCT - 30 AS col0 FROM tab1 AS cor0
----
-30

query I rowsort
SELECT ALL + + cor0.col2 * col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL cor0.col2 * col0 - col1 AS col1 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT DISTINCT - 22 + + col2 AS col0 FROM tab1 AS cor0
----
32
35
74

query I rowsort
SELECT + 40 * - col2 AS col0 FROM tab0 AS cor0
----
-1320
-3280
-40

query I rowsort
SELECT ALL - - 1 * col1 + + col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3838
SELECT ALL + - col0 * col2 - - ( col1 ) DIV col0 AS col1 FROM tab2 AS cor0
----
-185
-2028
-3002

skipif mysql # not compatible
query I rowsort label-3838
SELECT ALL + - col0 * col2 - - ( col1 ) / col0 AS col1 FROM tab2 AS cor0
----
-185
-2028
-3002

query I rowsort
SELECT DISTINCT + - 25 FROM tab2 AS cor0
----
-25

onlyif mysql # use DIV operator for integer division
query I rowsort label-3840
SELECT DISTINCT - - 80 DIV - col1 + ( + cor0.col0 * + col0 ) FROM tab2 AS cor0
----
47
6083
6237

skipif mysql # not compatible
query I rowsort label-3840
SELECT DISTINCT - - 80 / - col1 + ( + cor0.col0 * + col0 ) FROM tab2 AS cor0
----
47
6083
6237

query I rowsort
SELECT ALL - + col1 - - col2 * - col0 * col2 AS col1 FROM tab1 AS cor0
----
-207946
-737293
-8774

query I rowsort
SELECT DISTINCT + col1 * + col1 + col1 * 30 * col0 FROM tab1 AS cor0
----
19300
3016
31369

query I rowsort
SELECT ALL - - col0 * - col2 * - col0 + + col1 + col2 AS col2 FROM tab0 AS cor0
----
1323
19127
649695

query I rowsort
SELECT ALL + 18 * - col1 AS col2 FROM tab2 AS cor0
----
-1062
-306
-558

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1, tab0 AS cor0, tab2 cor1
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3846
SELECT col2 DIV ( - cor0.col1 ) FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-3846
SELECT col2 / ( - cor0.col1 ) FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT ALL - + col1 + - ( 14 ) * col0 * - 9 FROM tab1 cor0
----
10067
352
8054

query I rowsort
SELECT DISTINCT + + col0 + + 41 FROM tab2 AS cor0
----
119
120
48

query I rowsort
SELECT ALL col2 * 7 FROM tab2 AS cor0
----
182
189
266

query I rowsort
SELECT ALL col2 * col0 + 69 + + col0 AS col2 FROM tab2 cor0
----
2175
265
3150

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0, tab2 AS cor1, tab1 cor2
----
972 values hashing to 75a813ebd5ec5ec2e67a66d0593ff763

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3852
SELECT ALL + CAST( col0 AS SIGNED ) * + col0 + - 5 col2 FROM tab1 AS cor0
----
4
4091
6395

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3852
SELECT ALL + CAST ( col0 AS INTEGER ) * + col0 + - 5 col2 FROM tab1 AS cor0
----
4
4091
6395

query I rowsort
SELECT ALL + - 2 + col0 FROM tab2 AS cor0
----
5
76
77

query I rowsort
SELECT DISTINCT 39 * + col2 AS col0 FROM tab2 cor0
----
1014
1053
1482

query I rowsort
SELECT - + 19 + col1 FROM tab1 AS cor0
----
-6
-9
7

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab1 AS cor1, tab0, tab1 cor2
----
3645 values hashing to b3ea820890445d59f3f7464a1521d42d

query I rowsort
SELECT DISTINCT 39 FROM tab1 cor0
----
39

query I rowsort
SELECT DISTINCT - + ( col2 ) FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT col2 * + 47 FROM tab2
----
1222
1269
1786

query I rowsort
SELECT col2 * 61 AS col2 FROM tab1
----
3294
3477
5856

query I rowsort
SELECT DISTINCT - cor0.col0 * - col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT 91 * - col2 AS col1 FROM tab0 AS cor0
----
-3003
-7462
-91

query I rowsort
SELECT DISTINCT 27 AS col0 FROM tab0
----
27

query I rowsort
SELECT ALL + 86 * - cor0.col2 + cor0.col0 + col1 AS col2 FROM tab1 cor0
----
-4615
-4828
-8163

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 31 col2 FROM tab1 AS cor0
----
-31

query I rowsort
SELECT cor1.col2 AS col1 FROM tab2, tab0 cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT - + tab0.col0 FROM tab0, tab2, tab1 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0, tab1 cor0, tab1 AS cor1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3869
SELECT CAST( NULL AS DECIMAL ) + - col1 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3869
SELECT CAST ( NULL AS REAL ) + - col1 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 23 * col0 FROM tab0
----
2047
552
805

query I rowsort
SELECT DISTINCT 59 + col2 FROM tab2 AS cor0
----
85
86
97

query I rowsort
SELECT - - col1 * - col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT col1 + ( col2 ) AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT - 26 AS col0 FROM tab1
----
-26

query I rowsort
SELECT ( 75 ) + col2 + - col1 AS col2 FROM tab2
----
42
71
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 36 col1 FROM tab2
----
-36

query I rowsort
SELECT DISTINCT 96 * 94 FROM tab0
----
9024

query I rowsort
SELECT DISTINCT 76 + col0 AS col1 FROM tab0 AS cor0
----
100
111
165

query I rowsort
SELECT ALL col2 * col0 + col1 FROM tab2 AS cor0
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-3880
SELECT DISTINCT - col0 DIV - 59 col2 FROM tab1 cor0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3880
SELECT DISTINCT - col0 / - 59 col2 FROM tab1 cor0
----
0
1

query I rowsort
SELECT DISTINCT + col2 * - cor0.col2 + col1 FROM tab2 AS cor0
----
-1427
-617
-698

onlyif mysql # use DIV operator for integer division
query I rowsort label-3882
SELECT + 70 DIV + col2 FROM tab0 AS cor0
----
0
2
70

skipif mysql # not compatible
query I rowsort label-3882
SELECT + 70 / + col2 FROM tab0 AS cor0
----
0
2
70

query I rowsort
SELECT ALL + cor0.col0 * col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-3884
SELECT ALL + col2 * col1 DIV - col0 + + cor0.col2 * col1 FROM tab1 AS cor0
----
1233
562
936

skipif mysql # not compatible
query I rowsort label-3884
SELECT ALL + col2 * col1 / - col0 + + cor0.col2 * col1 FROM tab1 AS cor0
----
1233
562
936

query I rowsort
SELECT DISTINCT - col1 * cor0.col1 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT + ( - ( col2 ) ) * col0 + col2 * - col1 FROM tab1
----
-1566
-4218
-8928

query I rowsort
SELECT DISTINCT + col2 + + col1 * tab1.col0 AS col1 FROM tab1
----
1136
132
697

query I rowsort
SELECT DISTINCT + col1 * 26 + + col0 FROM tab2
----
1612
521
813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 + col2 * col0 col2 FROM tab2
----
158
1969
2985

query I rowsort
SELECT 50 * col0 * + col0 + tab2.col0 AS col1 FROM tab2
----
2457
304278
312129

query I rowsort
SELECT - col0 AS col0 FROM tab2 AS cor0 WHERE ( col1 + col1 / col1 ) > NULL
----

query I rowsort
SELECT - col1 + tab2.col1 * col1 AS col1 FROM tab2
----
272
3422
930

query I rowsort
SELECT ALL - col2 * col0 + + col0 + col2 AS col1 FROM tab0
----
-7127
-735
1

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) NOT IN ( + col0 + - col2 )
----

query I rowsort
SELECT col1 + col1 * + col0 FROM tab0 AS cor0 WHERE NOT ( col1 ) <> NULL
----

query IIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 WHERE NOT NULL >= - cor0.col2
----

query I rowsort
SELECT ALL tab2.col0 + - col1 * - col1 FROM tab2
----
3559
368
968

query I rowsort
SELECT + col1 + + tab0.col1 * tab0.col2 FROM tab0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col1 - + col2 * col2 col2 FROM tab0
----
-14823
-3153
-3396

query I rowsort
SELECT - tab1.col0 - col2 AS col2 FROM tab1
----
-121
-176
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 * col1 col2 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT col1 * col2 + col0 * - col2 FROM tab2 WHERE NULL <> NULL
----

query I rowsort
SELECT - col1 - + col0 AS col1 FROM tab0
----
-110
-132
-180

query III rowsort
SELECT * FROM tab1 WHERE col2 NOT IN ( + col2 )
----

query I rowsort
SELECT + col1 + - col0 * - col2 AS col0 FROM tab0
----
132
7389
878

query III rowsort
SELECT * FROM tab0 WHERE NOT + col1 <> NULL
----

query III rowsort
SELECT ALL * FROM tab1 WHERE col1 < + col2 + + col0
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

onlyif mysql # use DIV operator for integer division
query I rowsort label-3908
SELECT ALL col1 * - col2 + + col1 DIV - col0 col1 FROM tab2
----
-1534
-646
-841

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3908
SELECT ALL col1 * - col2 + + col1 / - col0 col1 FROM tab2
----
-1534
-646
-841

query I rowsort
SELECT - col1 + + col2 * col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT - col0 - - col2 AS col0 FROM tab2 AS cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 + + col0 col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT + col1 * col0 + - col1 AS col2 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT + col2 * cor0.col2 * + col2 - cor0.col0 AS col1 FROM tab2 AS cor0
----
17498
19676
54793

onlyif mysql # use DIV operator for integer division
query I rowsort label-3914
SELECT col2 DIV cor0.col1 + + col0 AS col0 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-3914
SELECT col2 / cor0.col1 + + col0 AS col0 FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT col0 * col0 - + col2 * + col2 FROM tab1 AS cor0
----
-2816
-2907
847

onlyif mysql # use DIV operator for integer division
query I rowsort label-3916
SELECT - col0 * - col1 DIV col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3916
SELECT - col0 * - col1 / col1 FROM tab0
----
24
35
89

query I rowsort
SELECT - col0 + col2 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL - col1 + col2 * col1 FROM tab1
----
1235
1378
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col1 col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT tab0.col2 * col2 AS col1 FROM tab0
----
1
1089
6724

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE col1 NOT IN ( col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3922
SELECT ALL - col2 DIV col1 + + col0 DIV col2 AS col0 FROM tab1 WHERE NOT ( + col0 * + col0 + col1 * col0 * - col2 ) >= + col0 * - col1
----
-2
-4
-7

skipif mysql # not compatible
query I rowsort label-3922
SELECT ALL - col2 / col1 + + col0 / col2 AS col0 FROM tab1 WHERE NOT ( + col0 * + col0 + col1 * col0 * - col2 ) >= + col0 * - col1
----
-2
-4
-7

query I rowsort
SELECT - col1 * col0 * col0 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL - tab1.col2 * - col0 AS col1 FROM tab1
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 col1 FROM tab1 WHERE NOT ( NULL ) <= ( NULL )
----

query I rowsort
SELECT DISTINCT - tab0.col0 * - col2 AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT + - col1 * col1 * cor0.col0 + - col2 * col2 - col2 FROM tab1 AS cor0
----
-22832
-4998
-9706

query I rowsort
SELECT - - col2 * col1 + - col0 FROM tab1 cor0
----
1168
1401
506

query I rowsort
SELECT + col1 + + col0 - - col2 * - col0 FROM tab0 AS cor0
----
-682
-7118
97

query I rowsort
SELECT - - col2 + + col0 * + col2 + - cor0.col1 AS col1 FROM tab1 cor0
----
190
3695
7763

query I rowsort
SELECT + tab0.col1 * col2 AS col0 FROM tab0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col2 * + col2 col1 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT 88 * - col1 AS col2 FROM tab0 cor0
----
-7568
-8008
-8536

query I rowsort
SELECT ALL - 76 * col1 * col1 FROM tab1 AS cor0
----
-12844
-51376
-7600

query I rowsort
SELECT DISTINCT 79 FROM tab0, tab0 AS cor0
----
79

query I rowsort
SELECT DISTINCT - - cor0.col2 * - cor0.col0 AS col2 FROM tab2, tab1, tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - + 80 AS col0 FROM tab1 AS cor0
----
-80
-80
-80

query I rowsort
SELECT ALL - ( col2 ) * - cor0.col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + - col0 * cor0.col1 - + ( - col1 ) * col1 AS col1 FROM tab1 AS cor0
----
-540
-871
598

query I rowsort
SELECT + tab0.col1 * - ( + tab0.col1 ) * col1 FROM tab0
----
-636056
-753571
-912673

query I rowsort
SELECT ALL - 95 FROM tab2, tab1 AS cor0
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab1 AS cor2
----
3645 values hashing to f464d40c605db608927f2c4d66190a23

query I rowsort
SELECT + 72 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT + col1 * col2 * + tab2.col0 FROM tab2
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-3945
SELECT - col2 + col2 * + cor0.col2 + + cor0.col1 DIV col2 FROM tab0 AS cor0
----
1058
6643
97

skipif mysql # not compatible
query I rowsort label-3945
SELECT - col2 + col2 * + cor0.col2 + + cor0.col1 / col2 FROM tab0 AS cor0
----
1058
6643
97

query I rowsort
SELECT DISTINCT + ( - 82 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-82

query I rowsort
SELECT DISTINCT 73 FROM tab1, tab1 AS cor0
----
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-3948
SELECT col0 + - col2 DIV tab1.col2 AS col2 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-3948
SELECT col0 + - col2 / tab1.col2 AS col2 FROM tab1
----
2
63
79

query I rowsort
SELECT + tab0.col1 + + col0 AS col1 FROM tab0
----
110
132
180

query I rowsort
SELECT - col2 + 8 * col1 AS col2 FROM tab0 AS cor0
----
646
655
775

query I rowsort
SELECT DISTINCT - cor0.col1 + col0 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT + 32 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT DISTINCT + cor0.col1 + col0 * + col2 AS col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT + - col0 + - col0 AS col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL - + cor0.col0 + + 20 AS col0 FROM tab2 AS cor0
----
-58
-59
13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3956
SELECT col2 + CAST( col0 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-3956
SELECT col2 + CAST ( col0 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3957
SELECT DISTINCT + col0 + CAST( - 64 AS SIGNED ) FROM tab2 AS cor0
----
-57
14
15

skipif mysql # not compatible
query I rowsort label-3957
SELECT DISTINCT + col0 + CAST ( - 64 AS INTEGER ) FROM tab2 AS cor0
----
-57
14
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col0 - 96 * col2 col0 FROM tab1 AS cor0
----
-5155
-5398
-9123

query I rowsort
SELECT - col0 * col2 + col2 * + col2 * col2 AS col1 FROM tab2 AS cor0
----
15548
19494
51870

query I rowsort
SELECT ALL + + col2 * col0 + col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT - col2 * + cor0.col1 + 95 AS col2 FROM tab2 AS cor0
----
-1439
-551
-742

query I rowsort
SELECT ALL + - col0 - + col1 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL + 1 * - col0 * col0 FROM tab2 cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-3964
SELECT DISTINCT + - col2 DIV - 20 FROM tab0 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-3964
SELECT DISTINCT + - col2 / - 20 FROM tab0 AS cor0
----
0
1
4

query I rowsort
SELECT DISTINCT - ( ( tab0.col2 ) * - col0 ) FROM tab0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3966
SELECT ALL - + col1 DIV + 58 AS col0 FROM tab2 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3966
SELECT ALL - + col1 / + 58 AS col0 FROM tab2 cor0
----
-1
0
0

query I rowsort
SELECT - 52 * 90 AS col0 FROM tab2 cor0
----
-4680
-4680
-4680

query I rowsort
SELECT ALL - col0 + - col1 * col2 * + col1 FROM tab1 AS cor0
----
-16304
-36507
-5764

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3969
SELECT DISTINCT - + CAST( 38 AS SIGNED ) + + cor0.col2 FROM tab2 AS cor0
----
-11
-12
0

skipif mysql # not compatible
query I rowsort label-3969
SELECT DISTINCT - + CAST ( 38 AS INTEGER ) + + cor0.col2 FROM tab2 AS cor0
----
-11
-12
0

query I rowsort
SELECT - cor1.col1 AS col2 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT col0 + ( - col0 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 93 * ( - col2 + - 54 ) FROM tab0 cor0
----
12648
5115
8091

query I rowsort
SELECT ALL ( + col0 ) * + col2 + + 27 FROM tab1 AS cor0
----
189
3675
7707

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3975
SELECT ALL 19 DIV - 92 + col2 AS col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-3975
SELECT ALL 19 / - 92 + col2 AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + ( col0 ) * ( + 51 ) AS col0 FROM tab1 AS cor0
----
153
3264
4080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 - - col1 * - col0 col0 FROM tab2
----
-1247
-179
-4465

query I rowsort
SELECT 96 * tab1.col2 AS col0 FROM tab1
----
5184
5472
9216

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + cor1.col0 * 78 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 90b2af43d4359a9670874e72221cff36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 39 * + col2 col0 FROM tab0 AS cor0
----
-1287
-3198
-39

query I rowsort
SELECT ALL col0 - + col1 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT cor0.col1 * - cor0.col2 - col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT - - 43 FROM tab1 cor0
----
43

query I rowsort
SELECT ALL + - 33 FROM tab2 AS cor0
----
-33
-33
-33

query I rowsort
SELECT 33 - - col2 * col0 AS col1 FROM tab1 AS cor0
----
195
3681
7713

query I rowsort
SELECT DISTINCT + col1 + + col1 * col0 + + col2 FROM tab1 AS cor0
----
1149
158
707

onlyif mysql # use DIV operator for integer division
query I rowsort label-3988
SELECT col1 DIV + col0 AS col2 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-3988
SELECT col1 / + col0 AS col2 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT ALL - - col1 * - ( + 63 ) + col2 + + col0 FROM tab2 AS cor0
----
-1919
-3613
-954

query I rowsort
SELECT ALL col0 * 32 FROM tab1 cor0
----
2048
2560
96

query I rowsort
SELECT DISTINCT - - col1 * col1 + 53 AS col0 FROM tab1 AS cor0
----
153
222
729

query I rowsort
SELECT + + col1 + ( col2 * + col1 ) FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT + col0 + - 75 AS col2 FROM tab2 AS cor0
----
-68
3
4

query I rowsort
SELECT DISTINCT + col0 + + col1 * - ( + col1 ) + col0 FROM tab2 cor0
----
-131
-3325
-947

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3995
SELECT ALL + 79 + + col2 * CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3995
SELECT ALL + 79 + + col2 * CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col1 - + tab1.col1 FROM tab1
----
0
0
0

query I rowsort
SELECT + ( - tab0.col0 ) + - 97 * 88 + tab0.col2 AS col2 FROM tab0
----
-8527
-8543
-8570

query I rowsort
SELECT DISTINCT - - 68 FROM tab0, tab2, tab2 AS cor0
----
68

query I rowsort
SELECT DISTINCT 52 + col2 FROM tab2
----
78
79
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - col2 col1 FROM tab0
----
-164
-2
-66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4001
SELECT - col1 * - col1 + - CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4001
SELECT - col1 * - col1 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 2 + - col2 + + col0 FROM tab2
----
-18
43
54

query I rowsort
SELECT + - col0 + - cor0.col2 * + 91 FROM tab2 AS cor0
----
-2444
-2464
-3537

query I rowsort
SELECT DISTINCT 11 FROM tab0, tab2 AS cor0
----
11

query I rowsort
SELECT + col0 * col2 + 65 FROM tab1 AS cor0
----
227
3713
7745

query I rowsort
SELECT - cor1.col0 + 32 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to df64d49376f8772da2122931a068273e

query I rowsort
SELECT - 70 + + 80 AS col2 FROM tab0
----
10
10
10

query I rowsort
SELECT col1 * 21 FROM tab0
----
1806
1911
2037

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4009
SELECT DISTINCT + CAST( NULL AS SIGNED ) / - 51 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-4009
SELECT DISTINCT + CAST ( NULL AS INTEGER ) / - 51 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
NULL

query I rowsort
SELECT - 41 + cor0.col1 * + col2 AS col2 FROM tab2 AS cor0
----
1493
605
796

query I rowsort
SELECT ALL - cor0.col1 + cor0.col0 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT - col0 * - col0 + 60 FROM tab0 AS cor0
----
1285
636
7981

query I rowsort
SELECT ALL - col0 * - col1 AS col2 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + col2 * - tab2.col2 * col1 + col1 + col0 AS col2 FROM tab2
----
-22561
-24452
-39747

query I rowsort
SELECT DISTINCT - col1 + + ( + col2 ) + - col1 FROM tab0
----
-100
-139
-193

query I rowsort
SELECT col1 * - col0 + ( col0 ) FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT 75 FROM tab0, tab1 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT ALL col2 + ( + 60 ) AS col0 FROM tab0 cor0
----
142
61
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col1 + 75 * + col2 - ( - 58 ) col2 FROM tab0 AS cor0
----
14489
9542
9929

query I rowsort
SELECT - + col1 + 77 AS col2 FROM tab0 AS cor0
----
-14
-20
-9

query I rowsort
SELECT 13 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

onlyif mysql # use DIV operator for integer division
query I rowsort label-4022
SELECT col0 DIV ( - 83 ) FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4022
SELECT col0 / ( - 83 ) FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 + + col0 AS col0 FROM tab1
----
0

query I rowsort
SELECT DISTINCT 8 AS col0 FROM tab2 cor0
----
8

query I rowsort
SELECT ALL - 6 * - col2 * col2 AS col0 FROM tab2 AS cor0
----
4056
4374
8664

query I rowsort
SELECT + - cor0.col1 * + ( col1 ) AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + ( - col0 ) AS col2 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - - ( + col0 ) + col2 AS col1 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort
SELECT ALL + - CAST ( 45 AS REAL ) AS col1 FROM tab1 AS cor0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT + col1 + + 11 FROM tab0 AS cor0
----
102
108
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 7 col0 FROM tab2 AS cor0
----
7
7
7

query I rowsort
SELECT col0 * 16 FROM tab0 AS cor0
----
1424
384
560

query I rowsort
SELECT + 39 AS col1 FROM tab2 AS cor0
----
39
39
39

query I rowsort
SELECT 33 - + col0 AS col0 FROM tab0 AS cor0
----
-2
-56
9

query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) + - col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + col0 * col0 * - col1 AS col0 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT ALL ( 87 ) + cor0.col0 * + col0 AS col2 FROM tab0 cor0
----
1312
663
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 78 + + col2 col2 FROM tab2 AS cor0
----
104
105
116

onlyif mysql # use DIV operator for integer division
query I rowsort label-4039
SELECT DISTINCT + cor0.col1 DIV 74 AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4039
SELECT DISTINCT + cor0.col1 / 74 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT - + 47 + col1 AS col1 FROM tab2 AS cor0
----
-16
-30
12

query I rowsort
SELECT ALL 26 FROM tab2, tab1 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT + ( + col2 ) * col2 * col1 AS col1 FROM tab0
----
611884
93654
97

query I rowsort
SELECT - - ( col1 ) * cor0.col2 - col1 * col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + - 80 - 54 AS col1 FROM tab2 AS cor0
----
-134
-134
-134

query I rowsort
SELECT + 81 * col0 + - ( cor0.col2 ) * col2 + ( col2 ) * + col1 AS col2 FROM tab0 AS cor0
----
2931
3693
7947

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4046
SELECT + ( col0 ) * CAST( cor0.col1 + col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
406
4345
6630

skipif mysql # not compatible
query I rowsort label-4046
SELECT + ( col0 ) * CAST ( cor0.col1 + col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
406
4345
6630

query I rowsort
SELECT 47 * + col1 + - cor0.col1 + 23 * col1 FROM tab2 AS cor0
----
1173
2139
4071

query I rowsort
SELECT DISTINCT + 97 FROM tab1
----
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4049
SELECT - 5 DIV + 24 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4049
SELECT - 5 / + 24 FROM tab2
----
0
0
0

query I rowsort
SELECT - 96 AS col0 FROM tab2
----
-96
-96
-96

query I rowsort
SELECT + 21 + col1 * + col0 FROM tab2 AS cor0
----
1364
238
4623

query I rowsort
SELECT DISTINCT col1 * col0 + cor0.col0 + + 81 FROM tab1 AS cor0
----
1201
162
785

query I rowsort
SELECT - 51 + col2 * + 62 AS col0 FROM tab2 AS cor0
----
1561
1623
2305

query I rowsort
SELECT + col1 + + 70 AS col2 FROM tab1 AS cor0
----
80
83
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - 62 col0 FROM tab1 AS cor0
----
-126
-142
-65

query I rowsort
SELECT - - col1 * - 82 FROM tab0 AS cor0
----
-7052
-7462
-7954

query I rowsort
SELECT ALL + + cor0.col1 * + cor0.col2 + + col1 * col2 FROM tab0 AS cor0
----
14924
194
5676

query I rowsort
SELECT - + col2 * + col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + cor0.col0 * col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col2 * 37 + col1 AS col2 FROM tab1 AS cor0
----
2024
2119
3565

query I rowsort
SELECT col0 * - ( + 98 ) + + col1 FROM tab1 AS cor0
----
-268
-6262
-7827

query I rowsort
SELECT + - col1 + - col1 * 24 AS col1 FROM tab0 AS cor0
----
-2150
-2275
-2425

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - ( - col0 ) * - col2 + 74 FROM tab2 cor0
----
-115
-1954
-2928

query I rowsort
SELECT 45 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT col2 + - tab0.col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - - 79 FROM tab2, tab1, tab0 cor0
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4068
SELECT ALL 36 DIV col2 AS col2 FROM tab0 AS cor0
----
0
1
36

skipif mysql # not compatible
query I rowsort label-4068
SELECT ALL 36 / col2 AS col2 FROM tab0 AS cor0
----
0
1
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4069
SELECT DISTINCT + - col2 * col2 + + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4069
SELECT DISTINCT + - col2 * col2 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - + col2 * + ( 86 + - cor0.col2 ) AS col2 FROM tab0 AS cor0
----
-1749
-328
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-4071
SELECT DISTINCT + cor0.col1 * + col2 DIV + cor0.col2 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4071
SELECT DISTINCT + cor0.col1 * + col2 / + cor0.col2 FROM tab0 cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col1 col2 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + col2 + col2 * 58 AS col1 FROM tab1 AS cor0
----
3186
3363
5664

query I rowsort
SELECT ALL + + col0 + col0 * - col0 * + col0 FROM tab2 AS cor0
----
-336
-474474
-492960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4075
SELECT col1 * - CAST( + cor0.col0 * - col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
177504
329315
737009

skipif mysql # not compatible
query I rowsort label-4075
SELECT col1 * - CAST ( + cor0.col0 * - col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
177504
329315
737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 4 * col2 * + 28 + col2 col0 FROM tab0
----
113
3729
9266

query I rowsort
SELECT ALL - col2 + + ( col0 ) FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4078
SELECT - - col2 + 42 DIV col2 FROM tab0 AS cor0
----
34
43
82

skipif mysql # not compatible
query I rowsort label-4078
SELECT - - col2 + 42 / col2 FROM tab0 AS cor0
----
34
43
82

query I rowsort
SELECT ALL - tab2.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT 10 + col2 AS col1 FROM tab2 cor0
----
36
37
48

query I rowsort
SELECT + col2 * + ( - col1 ) + col1 * col0 FROM tab2 AS cor0
----
-620
3068
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-4082
SELECT DISTINCT + + 60 DIV + cor0.col0 + - col0 FROM tab2 AS cor0
----
-78
-79
1

skipif mysql # not compatible
query I rowsort label-4082
SELECT DISTINCT + + 60 / + cor0.col0 + - col0 FROM tab2 AS cor0
----
-78
-79
1

query I rowsort
SELECT ALL + cor0.col1 * + 74 - col2 FROM tab2 AS cor0
----
1220
2267
4340

query I rowsort
SELECT ALL + ( - 67 ) + - col2 FROM tab2 AS cor0
----
-105
-93
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - ( col0 * - col2 + - col1 ) col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL ( - 28 ) * col0 + col0 FROM tab2 AS cor0
----
-189
-2106
-2133

query I rowsort
SELECT + ( + 80 ) * + col1 FROM tab1 AS cor0
----
1040
2080
800

query I rowsort
SELECT ALL + + col0 * 68 - - col1 FROM tab2 AS cor0
----
507
5363
5389

query I rowsort
SELECT DISTINCT col0 * - 5 * - 91 AS col1 FROM tab0
----
10920
15925
40495

query I rowsort
SELECT ALL - 79 - - 79 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL + col0 * - cor0.col1 + col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT 87 * cor0.col0 FROM tab2 AS cor0
----
609
6786
6873

query I rowsort
SELECT ALL col2 - - 84 * - col1 * col1 AS col2 FROM tab2 cor0
----
-24238
-292378
-80697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4094
SELECT - CAST( NULL AS SIGNED ) + - col1 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4094
SELECT - CAST ( NULL AS INTEGER ) + - col1 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 75 + + col0 FROM tab2 AS cor0
----
-68
3
4

query I rowsort
SELECT - 46 * col0 + - col0 FROM tab1 AS cor0
----
-141
-3008
-3760

query I rowsort
SELECT DISTINCT ( col1 ) * col0 + 28 AS col0 FROM tab0 AS cor0
----
2092
3423
8127

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4098
SELECT ALL - + 11 * - col1 / - col0 + + CAST( NULL AS SIGNED ) / + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4098
SELECT ALL - + 11 * - col1 / - col0 + + CAST ( NULL AS INTEGER ) / + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 79 - + col0 AS col1 FROM tab1 AS cor0
----
-1
15
76

query I rowsort
SELECT 7 + col2 * - col1 FROM tab0 cor0
----
-2831
-7455
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col0 + - ( - 72 ) col1 FROM tab2 AS cor0
----
121
6156
6313

query I rowsort
SELECT DISTINCT - - col1 + + cor0.col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - - cor0.col2 - - col2 AS col0 FROM tab0 AS cor0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-4104
SELECT ALL col1 DIV - 98 + + col1 AS col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4104
SELECT ALL col1 / - 98 + + col1 AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT col2 + ( + col0 ) FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4106
SELECT - col0 + col1 DIV col1 AS col0 FROM tab2
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-4106
SELECT - col0 + col1 / col1 AS col0 FROM tab2
----
-6
-77
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4107
SELECT DISTINCT col1 - - col0 DIV col1 FROM tab1 AS cor0
----
16
19
26

skipif mysql # not compatible
query I rowsort label-4107
SELECT DISTINCT col1 - - col0 / col1 FROM tab1 AS cor0
----
16
19
26

query I rowsort
SELECT - + col2 + - cor0.col0 FROM tab0 AS cor0
----
-171
-36
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4109
SELECT ALL 75 * + col1 + ( + cor0.col0 + - col1 ) * CAST( col2 * col1 + col0 AS SIGNED ) FROM tab1 AS cor0
----
-30411
34986
89951

skipif mysql # not compatible
query I rowsort label-4109
SELECT ALL 75 * + col1 + ( + cor0.col0 + - col1 ) * CAST ( col2 * col1 + col0 AS INTEGER ) FROM tab1 AS cor0
----
-30411
34986
89951

query I rowsort
SELECT col2 * col2 AS col0 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT col0 * - col1 + + col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT + 90 * + col1 AS col0 FROM tab1 AS cor0
----
1170
2340
900

onlyif mysql # use DIV operator for integer division
query I rowsort label-4113
SELECT - - 40 + col2 * col0 DIV col1 AS col1 FROM tab2 AS cor0
----
216
46
74

skipif mysql # not compatible
query I rowsort label-4113
SELECT - - 40 + col2 * col0 / col1 AS col1 FROM tab2 AS cor0
----
216
46
74

query I rowsort
SELECT + col1 * col0 + + col0 AS col0 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT ALL - + col2 - col2 AS col2 FROM tab2 AS cor0
----
-52
-54
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4116
SELECT col1 DIV - 84 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4116
SELECT col1 / - 84 FROM tab1
----
0
0
0

query I rowsort
SELECT tab0.col2 * + col2 * col0 + - tab0.col2 * ( col0 ) + tab0.col2 AS col0 FROM tab0
----
1
25377
591220

query I rowsort
SELECT ALL + ( ( col0 ) ) + - 9 + 46 FROM tab1
----
101
117
40

query I rowsort
SELECT DISTINCT + col2 + - tab2.col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT 7 + col2 - col1 FROM tab0
----
-2
-46
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + 65 * + col2 col2 FROM tab1
----
3513
3769
6320

query I rowsort
SELECT ALL col2 * - col2 + - col1 AS col1 FROM tab1
----
-2942
-3259
-9229

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4123
SELECT ALL + + CAST( - 58 AS SIGNED ) * cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to bab7d1274af8faa5925fc59db8efef1f

skipif mysql # not compatible
query I rowsort label-4123
SELECT ALL + + CAST ( - 58 AS INTEGER ) * cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to bab7d1274af8faa5925fc59db8efef1f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 28 col0 FROM tab2 AS cor0
----
-28
-28
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 17 * col0 col1 FROM tab1 AS cor0
----
1088
1360
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col0 col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 3 col1 FROM tab1 AS cor0
----
-3

query I rowsort
SELECT - col1 + col2 FROM tab1 cor0
----
28
47
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4129
SELECT CAST( - 27 AS SIGNED ) AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

skipif mysql # not compatible
query I rowsort label-4129
SELECT CAST ( - 27 AS INTEGER ) AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

query I rowsort
SELECT - + 76 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

query I rowsort
SELECT + col2 * - ( col0 * + col2 ) + - col0 * + ( col1 ) FROM tab1
----
-208576
-738320
-8826

query I rowsort
SELECT ALL + 19 * - ( - col1 ) + - col1 FROM tab0 AS cor0
----
1548
1638
1746

query I rowsort
SELECT col0 * + col1 + cor0.col1 - col2 * col2 FROM tab1 AS cor0
----
-2599
-2812
-8163

query I rowsort
SELECT DISTINCT - col2 + - cor0.col1 + cor0.col0 FROM tab0 AS cor0
----
-63
-84
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-4135
SELECT col2 DIV col2 + col1 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-4135
SELECT col2 / col2 + col1 FROM tab1
----
11
14
27

query I rowsort
SELECT 79 - col2 * cor0.col2 FROM tab1 AS cor0
----
-2837
-3170
-9137

query I rowsort
SELECT DISTINCT - + 92 * + 8 FROM tab2 AS cor0
----
-736

query I rowsort
SELECT DISTINCT - 83 FROM tab1 cor0
----
-83

query I rowsort
SELECT - - ( - col1 ) * col0 - - col0 AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-4140
SELECT DISTINCT + tab2.col1 DIV ( col0 ) + col1 FROM tab2
----
17
35
59

skipif mysql # not compatible
query I rowsort label-4140
SELECT DISTINCT + tab2.col1 / ( col0 ) + col1 FROM tab2
----
17
35
59

query I rowsort
SELECT - col1 * tab1.col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - cor0.col0 + + ( cor0.col0 ) FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL - - 9 * - 56 * col2 AS col1 FROM tab1 AS cor0
----
-27216
-28728
-48384

query I rowsort
SELECT DISTINCT cor0.col1 + col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + + col0 + - 4 AS col0 FROM tab2 AS cor0
----
3
74
75

query I rowsort
SELECT ALL col0 * col0 + 12 AS col0 FROM tab1 AS cor0
----
21
4108
6412

query I rowsort
SELECT col1 + 18 AS col2 FROM tab0 AS cor0
----
104
109
115

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 88 col1 FROM tab0, tab2 AS cor0
----
88

query I rowsort
SELECT col0 * + 89 FROM tab2
----
623
6942
7031

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab0 cor1, tab0, tab1 AS cor2
----
3645 values hashing to d0428a2939e158628acd4bd449471d5b

query I rowsort
SELECT - cor0.col1 * 60 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-5127
-5378
-5819

query I rowsort
SELECT + + col1 + 71 FROM tab0 AS cor0
----
157
162
168

query I rowsort
SELECT - col0 * col2 + col0 FROM tab1 cor0
----
-159
-3584
-7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 - - col2 col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT - - col0 + col2 * - cor0.col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT - col2 * + ( + col2 ) + 72 + - col0 AS col0 FROM tab2 cor0
----
-1451
-664
-682

query I rowsort
SELECT 18 * cor0.col0 AS col1 FROM tab0 AS cor0
----
1602
432
630

query I rowsort
SELECT col2 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT 60 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT ALL 92 FROM tab0, tab1 cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

query I rowsort
SELECT DISTINCT col1 * - col0 + + col1 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT col0 + - col0 * - ( - 80 * - col1 ) AS col2 FROM tab0
----
165144
271635
648009

onlyif mysql # use DIV operator for integer division
query I rowsort label-4163
SELECT + 32 DIV + tab1.col2 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4163
SELECT + 32 / + tab1.col2 AS col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4164
SELECT col2 DIV tab1.col0 AS col1 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-4164
SELECT col2 / tab1.col0 AS col1 FROM tab1
----
0
1
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4165
SELECT DISTINCT - + col2 + col0 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4165
SELECT DISTINCT - + col2 + col0 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - 16 FROM tab2 cor0
----
-16

query I rowsort
SELECT DISTINCT 71 * + col0 * col0 + 51 * + col1 FROM tab0
----
45282
567032
91922

query I rowsort
SELECT 4 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

query I rowsort
SELECT + tab0.col2 * + col0 AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL - 13 AS col0 FROM tab2
----
-13
-13
-13

query I rowsort
SELECT - 40 * + 99 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c734db9ad3b45132c768ae6c828c7e2e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4172
SELECT + - col1 * + CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-4172
SELECT + - col1 * + CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - + 6 * - cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 0481a09faeb522b0e8329193c1c64a7d

query I rowsort
SELECT 64 * + 6 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to af6ba67e280190d1bd38bd7e5d1849fb

query I rowsort
SELECT ALL - col0 * + col2 AS col0 FROM tab2
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4176
SELECT - + col1 * CAST( NULL AS SIGNED ) - + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4176
SELECT - + col1 * CAST ( NULL AS INTEGER ) - + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4177
SELECT col1 + col0 * + col0 + + cor0.col2 DIV - col1 AS col1 FROM tab1 AS cor0
----
33
4101
6406

skipif mysql # not compatible
query I rowsort label-4177
SELECT col1 + col0 * + col0 + + cor0.col2 / - col1 AS col1 FROM tab1 AS cor0
----
33
4101
6406

query I rowsort
SELECT - - col0 * cor0.col1 - - col1 * - col2 AS col2 FROM tab1 cor0
----
-1326
-208
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-4179
SELECT + col1 DIV ( col0 ) FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-4179
SELECT + col1 / ( col0 ) FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT ALL + col1 * + tab0.col2 AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL + 72 AS col0 FROM tab1
----
72
72
72

query I rowsort
SELECT - 44 FROM tab2 AS cor0
----
-44
-44
-44

query I rowsort
SELECT ( col2 + col2 ) * ( - col2 ) AS col1 FROM tab1
----
-18432
-5832
-6498

query I rowsort
SELECT DISTINCT - ( - 23 ) FROM tab2 AS cor0
----
23

query I rowsort
SELECT - col0 + cor0.col1 AS col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT 73 * col1 FROM tab0 AS cor0
----
6278
6643
7081

query I rowsort
SELECT cor0.col2 + - cor0.col1 * + col1 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT + - col0 * col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - - cor0.col2 * + col1 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * col2 col2 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4191
SELECT - - cor0.col1 DIV + cor0.col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4191
SELECT - - cor0.col1 / + cor0.col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + 48 * col1 * 3 AS col1 FROM tab0 AS cor0
----
12384
13104
13968

query I rowsort
SELECT - tab0.col2 * ( - col2 ) FROM tab0
----
1
1089
6724

query I rowsort
SELECT ALL col2 * 43 AS col1 FROM tab1
----
2322
2451
4128

query I rowsort
SELECT - 16 + cor0.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to a9608f5403d9fe5ef74feefd23850743

query I rowsort
SELECT - col2 + tab1.col0 * col2 AS col1 FROM tab1
----
108
3591
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-4197
SELECT col2 DIV - ( + 69 ) + - col2 FROM tab1
----
-54
-57
-97

skipif mysql # not compatible
query I rowsort label-4197
SELECT col2 / - ( + 69 ) + - col2 FROM tab1
----
-54
-57
-97

query I rowsort
SELECT + tab2.col1 * 82 AS col1 FROM tab2
----
1394
2542
4838

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4199
SELECT DISTINCT - col0 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-4199
SELECT DISTINCT - col0 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT - col0 * col0 + col2 * col2 AS col0 FROM tab0
----
-1197
-1224
513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 79 col0 FROM tab0 AS cor0
----
79
79
79

query I rowsort
SELECT ALL + - 65 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1560
-2275
-5785

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 27 * - 98 + - cor0.col0 + col0 col0 FROM tab0 AS cor0
----
2646
2646
2646

query I rowsort
SELECT DISTINCT + - col1 + - col2 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - + col2 + col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 * cor0.col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT 75 * - col1 + col1 AS col1 FROM tab0 AS cor0
----
-6364
-6734
-7178

query I rowsort
SELECT - ( col0 ) + col0 + col1 * cor0.col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL + + col0 * col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - 33 + + 87 * - col2 FROM tab0 AS cor0
----
-120
-2904
-7167

query I rowsort
SELECT DISTINCT + - col0 + + col2 * + col2 FROM tab2 AS cor0
----
1365
598
722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4212
SELECT DISTINCT - CAST( NULL AS SIGNED ) + - 70 * col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4212
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + - 70 * col2 FROM tab0 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4213
SELECT 42 DIV + col1 + 50 * col0 AS col2 FROM tab1 AS cor0
----
151
3204
4003

skipif mysql # not compatible
query I rowsort label-4213
SELECT 42 / + col1 + 50 * col0 AS col2 FROM tab1 AS cor0
----
151
3204
4003

query I rowsort
SELECT 56 AS col1 FROM tab0 AS cor0
----
56
56
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4215
SELECT + col2 + + col1 + - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4215
SELECT + col2 + + col1 + - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 80 * + col0 AS col0 FROM tab1
----
240
5120
6400

query I rowsort
SELECT DISTINCT ( - col1 ) + - ( - col2 ) * + col1 - + 7 FROM tab1
----
1228
1371
553

query I rowsort
SELECT ALL + - 17 * + col0 - + col1 * + 51 AS col2 FROM tab2 AS cor0
----
-1700
-2210
-4335

query I rowsort
SELECT DISTINCT 75 * cor0.col2 FROM tab0 AS cor0
----
2475
6150
75

query I rowsort
SELECT - + 64 * col0 AS col2 FROM tab2 AS cor0
----
-448
-4992
-5056

onlyif mysql # use DIV operator for integer division
query I rowsort label-4221
SELECT ALL - col1 + col0 DIV + col0 FROM tab0 cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-4221
SELECT ALL - col1 + col0 / + col0 FROM tab0 cor0
----
-85
-90
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4222
SELECT - col1 + + CAST( NULL AS DECIMAL ) * - 90 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-4222
SELECT - col1 + + CAST ( NULL AS REAL ) * - 90 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4223
SELECT - - col0 DIV - col2 AS col1 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-4223
SELECT - - col0 / - col2 AS col1 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT DISTINCT - - col1 + 72 AS col2 FROM tab2 AS cor0
----
103
131
89

query I rowsort
SELECT ALL - col2 * + ( - 98 ) FROM tab0 AS cor0
----
3234
8036
98

query I rowsort
SELECT DISTINCT - col1 * - 3 FROM tab1 AS cor0
----
30
39
78

query I rowsort
SELECT 90 * col0 AS col1 FROM tab2
----
630
7020
7110

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4228
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4228
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - + cor0.col2 * - col1 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-4230
SELECT DISTINCT col1 * col0 DIV col0 + col0 + col0 AS col1 FROM tab0 AS cor0
----
134
167
269

skipif mysql # not compatible
query I rowsort label-4230
SELECT DISTINCT col1 * col0 / col0 + col0 + col0 AS col1 FROM tab0 AS cor0
----
134
167
269

query I rowsort
SELECT + - col0 + 13 FROM tab1 AS cor0
----
-51
-67
10

query I rowsort
SELECT - col0 + - 64 AS col0 FROM tab2 AS cor0
----
-142
-143
-71

query I rowsort
SELECT ALL - col2 * - ( + col1 ) + + col2 FROM tab1 cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-4234
SELECT DISTINCT - + col2 DIV col2 + + col1 AS col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-4234
SELECT DISTINCT - + col2 / col2 + + col1 AS col1 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT + col0 * ( + col1 ) + + cor0.col1 * + col0 FROM tab1 AS cor0
----
1280
156
2080

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4236
SELECT DISTINCT col0 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4236
SELECT DISTINCT col0 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4237
SELECT DISTINCT - + col1 + - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4237
SELECT DISTINCT - + col1 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4238
SELECT col0 - CAST( - 0 * col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-4238
SELECT col0 - CAST ( - 0 * col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - cor0.col0 + ( 49 ) AS col0 FROM tab1 AS cor0
----
-15
-31
46

query I rowsort
SELECT col1 * 97 FROM tab1 cor0
----
1261
2522
970

query I rowsort
SELECT ALL 54 * col0 AS col0 FROM tab0
----
1296
1890
4806

query I rowsort
SELECT ALL + ( col1 ) * 54 FROM tab1
----
1404
540
702

query I rowsort
SELECT ALL - + col0 - ( + col0 + + col0 ) AS col2 FROM tab1 AS cor0
----
-192
-240
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4244
SELECT DISTINCT + - col1 * - CAST( + 14 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
140
182
364

skipif mysql # not compatible
query I rowsort label-4244
SELECT DISTINCT + - col1 * - CAST ( + 14 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
140
182
364

onlyif mysql # use DIV operator for integer division
query I rowsort label-4245
SELECT ALL + - col2 * - 98 + - col0 + col1 DIV col1 FROM tab1 cor0
----
5290
5523
9329

skipif mysql # not compatible
query I rowsort label-4245
SELECT ALL + - col2 * - 98 + - col0 + col1 / col1 FROM tab1 cor0
----
5290
5523
9329

query I rowsort
SELECT DISTINCT cor0.col0 - col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT + col1 * col0 - 82 AS col0 FROM tab1 AS cor0
----
-4
558
958

query I rowsort
SELECT DISTINCT + cor0.col1 + ( 45 ) FROM tab1 AS cor0
----
55
58
71

query I rowsort
SELECT ALL col1 * 68 * + col0 AS col1 FROM tab1 AS cor0
----
43520
5304
70720

query I rowsort
SELECT DISTINCT col0 + + 90 AS col2 FROM tab1 AS cor0
----
154
170
93

query I rowsort
SELECT DISTINCT - col1 + - 63 * 23 * + col1 AS col0 FROM tab1
----
-14500
-18850
-37700

query I rowsort
SELECT + col2 * ( + col0 ) AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT 41 + 58 * cor0.col2 FROM tab1 cor0
----
3173
3347
5609

onlyif mysql # use DIV operator for integer division
query I rowsort label-4254
SELECT ALL col1 DIV + col0 + - col1 col2 FROM tab1
----
-10
-13
-18

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4254
SELECT ALL col1 / + col0 + - col1 col2 FROM tab1
----
-10
-13
-18

query I rowsort
SELECT ALL 2 FROM tab2, tab2 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT ALL tab1.col2 * 1 + col0 AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT + col0 * - tab0.col0 * tab0.col2 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL - 39 * - col2 * + col2 FROM tab2 AS cor0
----
26364
28431
56316

query I rowsort
SELECT ALL - ( - col1 ) * - col1 * cor0.col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col1 col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT col2 + + col0 * - col1 * - col2 FROM tab1 cor0
----
36537
4266
99936

onlyif mysql # use DIV operator for integer division
query I rowsort label-4262
SELECT DISTINCT - col0 - col1 DIV - CAST( 32 * - col1 AS SIGNED ) col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4262
SELECT DISTINCT - col0 - col1 / - CAST ( 32 * - col1 AS INTEGER ) col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL col0 * 7 * + col2 FROM tab1
----
1134
25536
53760

query I rowsort
SELECT DISTINCT 81 + col0 * col1 AS col0 FROM tab0 AS cor0
----
2145
3476
8180

query I rowsort
SELECT ALL - + 14 + - col1 AS col1 FROM tab2 AS cor0
----
-31
-45
-73

query I rowsort
SELECT 19 FROM tab1 AS cor0
----
19
19
19

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + 53 col1 FROM tab1
----
117
133
56

query I rowsort
SELECT DISTINCT - - ( + col1 ) AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - col1 + + col0 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT col2 + - col1 - - cor0.col0 AS col2 FROM tab2 AS cor0
----
100
3
45

query I rowsort
SELECT - - ( 68 ) AS col2 FROM tab2 AS cor0
----
68
68
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-4273
SELECT ALL + + col1 DIV col0 AS col0 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4273
SELECT ALL + + col1 / col0 AS col0 FROM tab0 cor0
----
1
2
3

query I rowsort
SELECT cor0.col2 * + col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + ( + 12 ) FROM tab0 AS cor0
----
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-4276
SELECT ALL - - col1 * + col1 + - cor0.col0 DIV col1 AS col2 FROM tab2 AS cor0
----
285
3480
961

skipif mysql # not compatible
query I rowsort label-4276
SELECT ALL - - col1 * + col1 + - cor0.col0 / col1 AS col2 FROM tab2 AS cor0
----
285
3480
961

query I rowsort
SELECT - 40 * col0 * col1 AS col0 FROM tab2 AS cor0
----
-184080
-53720
-8680

query I rowsort
SELECT + + col2 + col0 * - cor0.col1 FROM tab2 cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT - - col0 + col1 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4280
SELECT col0 * + col0 * - CAST( NULL AS SIGNED ) - + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4280
SELECT col0 * + col0 * - CAST ( NULL AS INTEGER ) - + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 * + col0 * + ( + col1 ) AS col1 FROM tab0 AS cor0
----
177504
329315
737009

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0 CROSS JOIN tab0, tab0 AS cor1
----
972 values hashing to 3406497351e4789c89a295ee9b64b201

query I rowsort
SELECT - - 79 * cor0.col1 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 9f356c92ad187127dc66b1253be8643b

query I rowsort
SELECT ALL - - cor0.col1 * 53 FROM tab2, tab2 AS cor0
----
9 values hashing to 50b30f82362dcc3395e29d5b7046c8aa

query I rowsort
SELECT ALL col0 * - 85 + - cor0.col0 FROM tab2 AS cor0
----
-602
-6708
-6794

query I rowsort
SELECT ALL + col1 + cor0.col0 * cor0.col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT - col2 * 5 + + 20 + col2 AS col1 FROM tab1 AS cor0
----
-196
-208
-364

query I rowsort
SELECT DISTINCT 40 + 18 AS col2 FROM tab1, tab0 AS cor0
----
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-4289
SELECT - col2 DIV cor0.col2 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4289
SELECT - col2 / cor0.col2 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - 43 AS REAL ) AS col1 FROM tab0 AS cor0
----
-43
-43
-43

query I rowsort
SELECT - ( 76 ) AS col2 FROM tab0 AS cor0
----
-76
-76
-76

query I rowsort
SELECT - col2 + 39 * - col2 AS col0 FROM tab0 AS cor0
----
-1320
-3280
-40

query I rowsort
SELECT 85 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT col0 * - 43 FROM tab1 cor0
----
-129
-2752
-3440

query I rowsort
SELECT - cor0.col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4296
SELECT DISTINCT + + col0 DIV col0 col0 FROM tab2 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4296
SELECT DISTINCT + + col0 / col0 col0 FROM tab2 AS cor0
----
1

query I rowsort
SELECT ALL - 96 FROM tab1, tab0 AS cor0
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT - + 52 + + col2 FROM tab1 cor0
----
2
44
5

query I rowsort
SELECT 13 + - col2 * tab1.col0 FROM tab1
----
-149
-3635
-7667

query I rowsort
SELECT + col1 * + tab1.col2 * - col1 + - col0 AS col2 FROM tab1
----
-16304
-36507
-5764

query I rowsort
SELECT 18 * + 93 + tab0.col2 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to f70c4327e35428d564fb6be444394c1a

query I rowsort
SELECT - - col0 + - 92 AS col0 FROM tab2 cor0
----
-13
-14
-85

query I rowsort
SELECT col0 * + 93 AS col2 FROM tab1 cor0
----
279
5952
7440

query I rowsort
SELECT - col2 + + cor0.col0 * + col1 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT ALL 55 * col2 AS col1 FROM tab0
----
1815
4510
55

query I rowsort
SELECT + ( - col2 + col2 ) * col2 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + + col1 * + col1 * col1 + + col0 + + col1 FROM tab0 AS cor0
----
636166
753751
912805

query I rowsort
SELECT - col1 * 69 AS col2 FROM tab2
----
-1173
-2139
-4071

query I rowsort
SELECT 70 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

query I rowsort
SELECT - col0 * + 97 + col0 AS col0 FROM tab0 AS cor0
----
-2304
-3360
-8544

query I rowsort
SELECT DISTINCT col0 - + col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT + col0 - + col1 AS col2 FROM tab2
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + tab2.col0 * col0 col2 FROM tab2
----
6110
6279
76

query I rowsort
SELECT 62 FROM tab1, tab2, tab2 AS cor0, tab0
----
81 values hashing to 0bc652564a158b9c0f7952026f90b60a

query I rowsort
SELECT + col2 * tab0.col0 * 83 FROM tab0
----
2905
605734
65736

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4317
SELECT col1 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4317
SELECT col1 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4318
SELECT + col0 - cor0.col0 DIV ( + cor0.col1 ) AS col2 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-4318
SELECT + col0 - cor0.col0 / ( + cor0.col1 ) AS col2 FROM tab2 AS cor0
----
7
75
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-4319
SELECT + - col0 * col2 + - col0 * cor0.col2 DIV col2 AS col1 FROM tab0 cor0
----
-70
-7387
-816

skipif mysql # not compatible
query I rowsort label-4319
SELECT + - col0 * col2 + - col0 * cor0.col2 / col2 AS col1 FROM tab0 cor0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT - col0 + col1 - + 78 * + col0 FROM tab2 cor0
----
-522
-6103
-6224

query I rowsort
SELECT ALL cor0.col0 * 98 FROM tab2 AS cor0
----
686
7644
7742

query I rowsort
SELECT col0 - - col1 * col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT col0 * - col2 * + col0 + + col2 AS col0 FROM tab0
----
-1224
-18975
-649440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col1 + 10 * col2 col0 FROM tab1
----
514
560
947

query I rowsort
SELECT DISTINCT col1 + - col1 * - col1 AS col1 FROM tab2
----
306
3540
992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - ( 49 ) col2 FROM tab1
----
-46
15
31

skipif mysql # not compatible
query I rowsort
SELECT - tab2.col2 * - CAST ( col1 + col1 AS REAL ) FROM tab2
----
1292
1674
3068

query I rowsort
SELECT + tab2.col0 + - col0 + col0 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT + 17 AS col2 FROM tab2
----
17

query I rowsort
SELECT ALL 46 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( + 44 AS REAL ) * - col2 AS col0 FROM tab0
----
1452
3608
44

query I rowsort
SELECT DISTINCT - 18 AS col0 FROM tab1
----
-18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4333
SELECT DISTINCT 6 * col2 / - CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4333
SELECT DISTINCT 6 * col2 / - CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - ( tab1.col1 ) FROM tab1
----
-10
-13
-26

query I rowsort
SELECT col0 + + ( col0 * col1 ) FROM tab1
----
1120
704
81

query I rowsort
SELECT ALL + tab2.col0 * tab2.col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - 73 - col0 * - col1 FROM tab1
----
5
567
967

query I rowsort
SELECT 63 - 79 FROM tab2
----
-16
-16
-16

query I rowsort
SELECT 66 * cor0.col0 FROM tab1 cor0
----
198
4224
5280

query I rowsort
SELECT DISTINCT 41 * cor0.col1 FROM tab2 AS cor0
----
1271
2419
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-4341
SELECT + 37 DIV - col1 AS col1 FROM tab1 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-4341
SELECT + 37 / - col1 AS col1 FROM tab1 AS cor0
----
-1
-2
-3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4342
SELECT + 41 + col2 * CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
1575
687
878

skipif mysql # not compatible
query I rowsort label-4342
SELECT + 41 + col2 * CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
1575
687
878

query I rowsort
SELECT DISTINCT - - col2 * cor0.col1 * ( - cor0.col2 * col1 + - col0 ) AS col2 FROM tab1 AS cor0
----
-1657344
-1975428
-361380

query I rowsort
SELECT DISTINCT col0 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL col1 * - col0 * + col0 AS col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT - ( col2 ) * - 7 * - col1 FROM tab2 AS cor0
----
-10738
-4522
-5859

query I rowsort
SELECT + 54 AS col1 FROM tab1
----
54
54
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-4348
SELECT ALL ( cor0.col2 ) DIV + 21 FROM tab1 cor0
----
2
2
4

skipif mysql # not compatible
query I rowsort label-4348
SELECT ALL ( cor0.col2 ) / + 21 FROM tab1 cor0
----
2
2
4

query I rowsort
SELECT DISTINCT - ( + cor0.col0 ) + ( - ( col2 ) ) AS col0 FROM tab0 AS cor0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( col1 ) col1 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4351
SELECT + - 59 DIV col0 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-4351
SELECT + - 59 / col0 FROM tab0 AS cor0
----
-1
-2
0

query I rowsort
SELECT DISTINCT - 8 + col2 FROM tab1 AS cor0
----
46
49
88

query I rowsort
SELECT + + col2 + col0 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4354
SELECT - - col0 * - CAST( col0 + col1 * 6 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-1351
-14299
-33696

skipif mysql # not compatible
query I rowsort label-4354
SELECT - - col0 * - CAST ( col0 + col1 * 6 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-1351
-14299
-33696

query I rowsort
SELECT ALL col1 * + 60 FROM tab1 AS cor0
----
1560
600
780

query I rowsort
SELECT - col1 + - col2 * col0 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL + - col2 * - 98 AS col0 FROM tab1 AS cor0
----
5292
5586
9408

query I rowsort
SELECT ALL col1 + + 60 * + cor0.col1 FROM tab2 AS cor0
----
1037
1891
3599

query I rowsort
SELECT + + col1 + 2 + col0 AS col1 FROM tab1 AS cor0
----
31
76
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4360
SELECT DISTINCT - + col1 * + CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-4360
SELECT DISTINCT - + col1 * + CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT cor0.col2 * col0 * 29 FROM tab1 AS cor0
----
105792
222720
4698

query I rowsort
SELECT cor0.col2 * col0 * + col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT - + col0 * + ( + col1 ) FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col2 * + cor0.col0 col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-4365
SELECT - + col2 + - col0 + - col2 DIV + 93 FROM tab1 AS cor0
----
-121
-177
-57

skipif mysql # not compatible
query I rowsort label-4365
SELECT - + col2 + - col0 + - col2 / + 93 FROM tab1 AS cor0
----
-121
-177
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4366
SELECT DISTINCT + + CAST( - cor0.col0 AS SIGNED ) * col1 + + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif mysql # not compatible
query I rowsort label-4366
SELECT DISTINCT + + CAST ( - cor0.col0 AS INTEGER ) * col1 + + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT - + col1 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-118
-34
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4368
SELECT - col2 + + cor0.col1 * col0 DIV col1 FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-4368
SELECT - col2 + + cor0.col1 * col0 / col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - ( + col2 ) * - col0 + - 81 FROM tab2 AS cor0
----
108
1947
2921

query I rowsort
SELECT ( 70 ) AS col2 FROM tab0 AS cor0
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 74 col0 FROM tab0 AS cor0
----
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-4372
SELECT ALL + ( col1 ) * + col0 * - col0 + - col2 + col1 DIV - col1 FROM tab0 AS cor0
----
-118827
-49570
-720894

skipif mysql # not compatible
query I rowsort label-4372
SELECT ALL + ( col1 ) * + col0 * - col0 + - col2 + col1 / - col1 FROM tab0 AS cor0
----
-118827
-49570
-720894

query I rowsort
SELECT - 73 AS col2 FROM tab2 AS cor0
----
-73
-73
-73

query I rowsort
SELECT DISTINCT col1 + + col2 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - - ( + col0 ) + col1 * col1 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col1 FROM tab1, tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - + col1 + - cor0.col1 * - col1 * + col0 FROM tab0 AS cor0
----
177418
329218
736918

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4378
SELECT ALL + CAST( - col1 AS SIGNED ) + - cor0.col0 + col1 * 34 AS col0 FROM tab2 AS cor0
----
1016
1869
482

skipif mysql # not compatible
query I rowsort label-4378
SELECT ALL + CAST ( - col1 AS INTEGER ) + - cor0.col0 + col1 * 34 AS col0 FROM tab2 AS cor0
----
1016
1869
482

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col2 AS REAL ) - - cor0.col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL + cor0.col2 + col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4381
SELECT + CAST( col1 AS SIGNED ) + col1 AS col1 FROM tab0 cor0
----
172
182
194

skipif mysql # not compatible
query I rowsort label-4381
SELECT + CAST ( col1 AS INTEGER ) + col1 AS col1 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT + cor0.col2 + - col2 * - col2 * - col1 FROM tab2 cor0
----
-22572
-24510
-39858

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4383
SELECT CAST( NULL AS SIGNED ) + - 73 * - col2 * 73 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4383
SELECT CAST ( NULL AS INTEGER ) + - 73 * - col2 * 73 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4384
SELECT - col0 + - col0 DIV - col0 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-4384
SELECT - col0 + - col0 / - col0 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT DISTINCT + col0 + - 43 - + col0 FROM tab2 AS cor0
----
-43

query I rowsort
SELECT DISTINCT + ( + 90 ) + col1 * - col0 AS col2 FROM tab2 AS cor0
----
-1253
-127
-4512

query I rowsort
SELECT DISTINCT + 81 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-6966
-7371
-7857

query I rowsort
SELECT + 70 + + col1 AS col0 FROM tab2 cor0
----
101
129
87

query I rowsort
SELECT + - cor0.col1 * - col1 + + ( 34 ) FROM tab2 AS cor0
----
323
3515
995

query I rowsort
SELECT ALL + - cor0.col0 + + col1 * + 36 * col1 FROM tab1 cor0
----
24333
3536
6004

query I rowsort
SELECT - 57 FROM tab0, tab1 AS cor0
----
9 values hashing to 520dc393896969e02a72ab6c5d92126b

query I rowsort
SELECT DISTINCT + col2 * col0 + - 27 FROM tab2 AS cor0
----
162
2001
2975

query I rowsort
SELECT - 99 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 64d06513850a26495bc6c2fddeb254b7

query I rowsort
SELECT + + 66 + - 94 * cor0.col2 AS col0 FROM tab2 AS cor0
----
-2378
-2472
-3506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 20 * col2 col2 FROM tab2 AS cor0
----
520
540
760

query I rowsort
SELECT - cor0.col1 + 23 AS col2 FROM tab2 AS cor0
----
-36
-8
6

query I rowsort
SELECT - col1 + cor0.col1 * - col1 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT col2 * - 88 * + col1 AS col0 FROM tab2 AS cor0
----
-134992
-56848
-73656

query I rowsort
SELECT 57 * - col1 AS col0 FROM tab0 AS cor0
----
-4902
-5187
-5529

query I rowsort
SELECT ALL 77 * tab0.col2 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to d4e52df6a5ae2d813759c6c942d529c3

query I rowsort
SELECT + 32 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT 58 AS col0 FROM tab2 AS cor0
----
58
58
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-4403
SELECT ALL - col2 DIV col0 + col2 AS col0 FROM tab1 AS cor0
----
36
57
95

skipif mysql # not compatible
query I rowsort label-4403
SELECT ALL - col2 / col0 + col2 AS col0 FROM tab1 AS cor0
----
36
57
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-4404
SELECT - 1 + col1 + + 48 DIV - col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-4404
SELECT - 1 + col1 + + 48 / - col1 FROM tab0 AS cor0
----
85
90
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4405
SELECT col0 * col0 DIV + col1 FROM tab1 AS cor0
----
0
409
492

skipif mysql # not compatible
query I rowsort label-4405
SELECT col0 * col0 / + col1 FROM tab1 AS cor0
----
0
409
492

query I rowsort
SELECT DISTINCT - col1 + + col2 * - ( + col1 ) FROM tab1 AS cor0
----
-1261
-1430
-580

skipif mysql # not compatible
query I rowsort
SELECT - 11 + col1 * CAST ( + col2 + col0 AS REAL ) FROM tab2 AS cor0
----
1043
1978
6125

query I rowsort
SELECT - 15 + - col2 * 21 AS col2 FROM tab0 AS cor0
----
-1737
-36
-708

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4409
SELECT DISTINCT + col0 * CAST( NULL AS SIGNED ) + col1 / - col0 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4409
SELECT DISTINCT + col0 * CAST ( NULL AS INTEGER ) + col1 / - col0 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + - cor0.col2 + + col0 * + col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT 40 FROM tab1, tab1 cor0
----
40

query I rowsort
SELECT + + cor0.col2 * col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT 49 * cor0.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to c1beb6a8ee6c6b544bff474ec22e11d7

query I rowsort
SELECT 6 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT cor0.col0 * - col0 * - col1 AS col1 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL - + 21 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 631fbd1fd929405aba54a22c2a06c757

query I rowsort
SELECT col2 * + ( col1 ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT col1 + - col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT col1 * + col1 * - col1 + col1 * ( ( + col0 ) * + col0 ) + + col0 AS col1 FROM tab0 AS cor0
----
-32671
-586496
-793813

skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( + 54 AS REAL ) FROM tab2 AS cor0
----
-54
-54
-54

query I rowsort
SELECT ALL - - 97 AS col0 FROM tab1 AS cor0
----
97
97
97

query I rowsort
SELECT + col2 * + cor0.col1 AS col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL - + col1 * - 94 AS col1 FROM tab0 AS cor0
----
8084
8554
9118

query I rowsort
SELECT col1 * - 65 * col2 FROM tab0
----
-184470
-485030
-6305

onlyif mysql # use DIV operator for integer division
query I rowsort label-4425
SELECT DISTINCT col2 DIV col2 col2 FROM tab1
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4425
SELECT DISTINCT col2 / col2 col2 FROM tab1
----
1

query I rowsort
SELECT - col0 * - col0 * col1 FROM tab1
----
234
40960
83200

query I rowsort
SELECT ALL 79 - + col1 FROM tab2
----
20
48
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4428
SELECT ALL + 71 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4428
SELECT ALL + 71 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 - - col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + 46 * col0 AS col1 FROM tab0
----
1104
1610
4094

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 11 col0 FROM tab1
----
11

query I rowsort
SELECT ALL - - col2 * + ( + col1 ) - + col2 AS col0 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT DISTINCT - + col2 + 97 FROM tab0 AS cor0
----
15
64
96

query I rowsort
SELECT ALL - col2 + col2 + col0 AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - col1 * + 72 + col2 AS col1 FROM tab2 AS cor0
----
-1186
-2205
-4222

onlyif mysql # use DIV operator for integer division
query I rowsort label-4436
SELECT + col2 * col1 + + col1 DIV col1 AS col2 FROM tab2 AS cor0
----
1535
647
838

skipif mysql # not compatible
query I rowsort label-4436
SELECT + col2 * col1 + + col1 / col1 AS col2 FROM tab2 AS cor0
----
1535
647
838

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 + col1 col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL - col1 * ( - col1 ) - - col0 AS col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT ALL + + ( + 92 ) + col2 AS col0 FROM tab1 cor0
----
146
149
188

query I rowsort
SELECT ALL 69 FROM tab0, tab1 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT DISTINCT + + 38 + + 87 AS col0 FROM tab0 AS cor0
----
125

query I rowsort
SELECT 72 + col1 * col1 AS col1 FROM tab2
----
1033
3553
361

query I rowsort
SELECT - 32 + col0 FROM tab1 AS cor0
----
-29
32
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 30 ) col0 FROM tab0 AS cor0
----
30
30
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4445
SELECT ALL + - CAST( NULL AS DECIMAL ) / - col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4445
SELECT ALL + - CAST ( NULL AS REAL ) / - col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 11 * - 47 - - cor0.col1 AS col2 FROM tab0 AS cor0
----
-420
-426
-431

query I rowsort
SELECT ALL - ( + 40 ) AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to f02f17e9bc17e514af018c6f245ed7a9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4448
SELECT DISTINCT - - CAST( NULL AS SIGNED ) + col1 * col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4448
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) + col1 * col1 FROM tab2 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col0 ) col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL - cor0.col1 - + col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT + - ( 10 ) + col0 * ( col2 ) AS col2 FROM tab0 AS cor0
----
25
7288
782

query I rowsort
SELECT DISTINCT - - ( + 63 ) + - col0 AS col1 FROM tab2 AS cor0
----
-15
-16
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-4453
SELECT col1 + - col2 DIV 80 AS col0 FROM tab0 AS cor0
----
86
90
97

skipif mysql # not compatible
query I rowsort label-4453
SELECT col1 + - col2 / 80 AS col0 FROM tab0 AS cor0
----
86
90
97

query I rowsort
SELECT ALL + + col0 + col2 * + 54 FROM tab2 AS cor0
----
1465
1482
2131

query I rowsort
SELECT - 83 + col1 FROM tab0 cor0
----
14
3
8

query I rowsort
SELECT ALL - 23 - col2 AS col1 FROM tab0 AS cor0
----
-105
-24
-56

query I rowsort
SELECT ALL col0 * col2 * 72 + + ( + col0 + col0 ) * + 71 AS col0 FROM tab0 AS cor0
----
538094
60432
7490

onlyif mysql # use DIV operator for integer division
query I rowsort label-4458
SELECT DISTINCT col0 DIV - cor0.col0 FROM tab1 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4458
SELECT DISTINCT col0 / - cor0.col0 FROM tab1 cor0
----
-1

query I rowsort
SELECT cor0.col1 - + col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL - col1 * col0 + col2 FROM tab2 AS cor0
----
-1305
-190
-4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( col2 ) col2 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4462
SELECT DISTINCT + - col0 * col2 - + ( col2 ) DIV col1 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3004

skipif mysql # not compatible
query I rowsort label-4462
SELECT DISTINCT + - col0 * col2 - + ( col2 ) / col1 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3004

query I rowsort
SELECT ALL - ( tab2.col0 ) - col2 * col1 FROM tab2
----
-1612
-725
-844

onlyif mysql # use DIV operator for integer division
query I rowsort label-4464
SELECT DISTINCT + - col2 * cor0.col0 - 42 DIV col1 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-4464
SELECT DISTINCT + - col2 * cor0.col0 - 42 / col1 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - + col1 * ( + col1 ) + col0 + cor0.col0 FROM tab2 AS cor0
----
-131
-3325
-947

query I rowsort
SELECT + - col0 * 40 * 53 + col0 FROM tab2 AS cor0
----
-14833
-165282
-167401

query I rowsort
SELECT ALL - col2 * col2 + col0 * + col0 FROM tab1 AS cor0
----
-2816
-2907
847

query I rowsort
SELECT DISTINCT col1 - + col2 * + 51 AS col0 FROM tab0 AS cor0
----
-1597
-4091
46

query I rowsort
SELECT + col0 * 4 + + col0 * + cor0.col1 FROM tab1 AS cor0
----
1360
896
90

query I rowsort
SELECT col2 + - col2 * - 17 FROM tab2 AS cor0
----
468
486
684

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + cor0.col2 col0 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4472
SELECT DISTINCT + col0 + - CAST( + col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-4472
SELECT DISTINCT + col0 + - CAST ( + col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4473
SELECT ALL 98 * col0 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4473
SELECT ALL 98 * col0 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * 28 FROM tab1 AS cor0
----
1792
2240
84

query I rowsort
SELECT ALL + + cor0.col1 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col0 * 8 AS col2 FROM tab0
----
192
280
712

query I rowsort
SELECT cor0.col2 * + ( 9 ) + col2 AS col2 FROM tab1 AS cor0
----
540
570
960

query I rowsort
SELECT ALL + col0 - + 25 FROM tab1 AS cor0
----
-22
39
55

query I rowsort
SELECT DISTINCT + - ( + col1 ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + col0 + + col0 AS col1 FROM tab1
----
128
160
6

query I rowsort
SELECT DISTINCT + col1 * 11 FROM tab1 AS cor0
----
110
143
286

query I rowsort
SELECT DISTINCT col2 + + 68 AS col2 FROM tab0 AS cor0
----
101
150
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-4483
SELECT ALL ( cor0.col2 ) DIV + col0 FROM tab2 cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-4483
SELECT ALL ( cor0.col2 ) / + col0 FROM tab2 cor0
----
0
0
3

query I rowsort
SELECT ALL + 45 + - 88 * cor0.col2 AS col0 FROM tab2 cor0
----
-2243
-2331
-3299

onlyif mysql # use DIV operator for integer division
query I rowsort label-4485
SELECT DISTINCT + 47 DIV col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4485
SELECT DISTINCT + 47 / col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + ( + 17 ) * col1 FROM tab2 AS cor0
----
1003
289
527

query I rowsort
SELECT ALL - ( 12 ) AS col2 FROM tab2 AS cor0
----
-12
-12
-12

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # use DIV operator for integer division
query I rowsort label-4489
SELECT 59 DIV - tab1.col1 FROM tab1
----
-2
-4
-5

skipif mysql # not compatible
query I rowsort label-4489
SELECT 59 / - tab1.col1 FROM tab1
----
-2
-4
-5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4490
SELECT ALL tab0.col0 + col2 * CAST( NULL AS SIGNED ) + col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4490
SELECT ALL tab0.col0 + col2 * CAST ( NULL AS INTEGER ) + col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * - col0 * + ( col0 ) FROM tab1
----
-234
-40960
-83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-4492
SELECT + col0 DIV col2 + - 48 * + col1 + - col2 FROM tab1
----
-1302
-536
-720

skipif mysql # not compatible
query I rowsort label-4492
SELECT + col0 / col2 + - 48 * + col1 + - col2 FROM tab1
----
-1302
-536
-720

query I rowsort
SELECT ALL col1 + col0 * col1 * col0 FROM tab2 AS cor0
----
106114
1550
359015

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 43 + col0 * - 13 col2 FROM tab0 cor0
----
-1114
-269
-412

query I rowsort
SELECT - 11 AS col2 FROM tab2 cor0
----
-11
-11
-11

query I rowsort
SELECT ALL + - col0 - - col1 * + col0 FROM tab0 AS cor0
----
2040
3360
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 18 col2 FROM tab0 AS cor0
----
18
18
18

query I rowsort
SELECT ALL - 3 * col2 FROM tab0 AS cor0
----
-246
-3
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-4499
SELECT DISTINCT + 4 + col1 DIV + col2 AS col0 FROM tab0 cor0
----
101
5
6

skipif mysql # not compatible
query I rowsort label-4499
SELECT DISTINCT + 4 + col1 / + col2 AS col0 FROM tab0 cor0
----
101
5
6

query I rowsort
SELECT ( col0 ) + 49 AS col1 FROM tab0 AS cor0
----
138
73
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 + col2 col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - + col2 * - 87 * col1 AS col0 FROM tab1 AS cor0
----
108576
122148
49590

query I rowsort
SELECT ALL + - col2 * col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT + col1 * + ( + col0 ) AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + - col2 * col2 AS col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT - col2 * 8 FROM tab0 cor0
----
-264
-656
-8

query I rowsort
SELECT - ( tab0.col2 ) * - col0 AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL - 9 + 23 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4509
SELECT + - col2 / col1 + col2 / col0 + CAST( NULL AS SIGNED ) * ( col0 * - ( cor0.col2 ) + - col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4509
SELECT + - col2 / col1 + col2 / col0 + CAST ( NULL AS INTEGER ) * ( col0 * - ( cor0.col2 ) + - col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * + col1 + col2 * + 28 FROM tab1 AS cor0
----
1434
1648
956

query I rowsort
SELECT - - col0 * - col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + 82 * - cor0.col1 - + 39 * + col0 FROM tab0 AS cor0
----
-10933
-7988
-9319

query I rowsort
SELECT - + 45 + + col2 FROM tab0 AS cor0
----
-12
-44
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 24 + - col0 * col2 col0 FROM tab2
----
-165
-2004
-2978

query I rowsort
SELECT + ( 76 ) FROM tab0
----
76
76
76

query I rowsort
SELECT ALL 82 FROM tab1, tab1 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT DISTINCT 2 * + ( col2 ) AS col0 FROM tab2
----
52
54
76

query I rowsort
SELECT + col2 + col1 * 23 FROM tab2 AS cor0
----
1383
429
740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 * col1 ) + 90 + col0 * col2 * col0 col1 FROM tab1
----
234202
615530
654

query I rowsort
SELECT + cor0.col2 * 76 FROM tab0 AS cor0
----
2508
6232
76

query I rowsort
SELECT ALL + 92 + + cor0.col1 FROM tab0 AS cor0
----
178
183
189

query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
24
35
89

skipif mysql # not compatible
query I rowsort
SELECT + col0 * + CAST ( - 27 AS REAL ) FROM tab1
----
-1728
-2160
-81

query I rowsort
SELECT 80 * 67 FROM tab0, tab1 AS cor0
----
9 values hashing to 2d0279ffafb912e2386d1f93ac376db7

query I rowsort
SELECT ALL - col2 * + 98 * col2 + tab1.col1 FROM tab1
----
-285742
-318392
-903155

query I rowsort
SELECT DISTINCT + 24 + - 55 FROM tab2, tab1 AS cor0
----
-31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4527
SELECT CAST( + 29 AS SIGNED ) * col2 AS col0 FROM tab2
----
1102
754
783

skipif mysql # not compatible
query I rowsort label-4527
SELECT CAST ( + 29 AS INTEGER ) * col2 AS col0 FROM tab2
----
1102
754
783

query I rowsort
SELECT DISTINCT 70 AS col2 FROM tab2, tab0 AS cor0
----
70

query I rowsort
SELECT + 5 + col1 * col1 AS col1 FROM tab2
----
294
3486
966

query I rowsort
SELECT - col2 * + tab2.col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT + + col2 * col1 AS col0 FROM tab0 cor0
----
2838
7462
97

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to e7ea8a30caeb35409d15d2ce0abbd5a6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4533
SELECT + col1 + - ( col2 ) - col1 * col0 DIV col1 FROM tab0 AS cor0
----
-80
29
61

skipif mysql # not compatible
query I rowsort label-4533
SELECT + col1 + - ( col2 ) - col1 * col0 / col1 FROM tab0 AS cor0
----
-80
29
61

query I rowsort
SELECT ALL ( - col1 ) + - col1 * ( + col2 ) AS col0 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT + 47 FROM tab2, tab0 AS cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT + col2 * + col2 AS col0 FROM tab0
----
1
1089
6724

query I rowsort
SELECT col0 * 29 AS col2 FROM tab0
----
1015
2581
696

query I rowsort
SELECT ALL + 31 * 30 AS col1 FROM tab2
----
930
930
930

query I rowsort
SELECT - 13 FROM tab0, tab0 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to d1ee13c6e23ea99b2cf17e8ca7cf45ee

query I rowsort
SELECT - col2 + 2 - + col2 * - ( 89 ) AS col1 FROM tab1
----
4754
5018
8450

onlyif mysql # use DIV operator for integer division
query I rowsort label-4541
SELECT - + col2 * col1 DIV cor0.col2 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-4541
SELECT - + col2 * col1 / cor0.col2 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - - col2 col1 FROM tab1 cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + 81 ) + - col1 - + col0 col2 FROM tab0
----
-29
-51
-99

query I rowsort
SELECT DISTINCT 98 + tab2.col0 - col0 AS col2 FROM tab2
----
98

query I rowsort
SELECT + 43 + col1 * - tab1.col0 * col0 FROM tab1
----
-191
-40917
-83157

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4546
SELECT - + CAST( NULL AS DECIMAL ) - 12 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4546
SELECT - + CAST ( NULL AS REAL ) - 12 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col1 col1 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT ALL 78 FROM tab0 AS cor0
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + - col2 col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL - - cor0.col0 + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + 94 AS col1 FROM tab2, tab1 AS cor0
----
94

query I rowsort
SELECT DISTINCT + 40 AS col0 FROM tab2, tab1 cor0, tab2 AS cor1
----
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-4553
SELECT col2 + + cor0.col0 DIV - col1 - CAST( - 58 AS SIGNED ) DIV col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4553
SELECT col2 + + cor0.col0 / - col1 - CAST ( - 58 AS INTEGER ) / col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT 25 * col0 AS col0 FROM tab2 AS cor0
----
175
1950
1975

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4555
SELECT - CAST( col0 AS SIGNED ) * - col0 - CAST( NULL AS SIGNED ) * col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4555
SELECT - CAST ( col0 AS INTEGER ) * - col0 - CAST ( NULL AS INTEGER ) * col1 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4556
SELECT + CAST( NULL AS DECIMAL ) - + cor0.col2 * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4556
SELECT + CAST ( NULL AS REAL ) - + cor0.col2 * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 * - 42 + col2 AS col2 FROM tab0 AS cor0
----
-1353
-3362
-41

onlyif mysql # use DIV operator for integer division
query I rowsort label-4558
SELECT - - ( col0 ) DIV col0 - + 97 col2 FROM tab0 cor0
----
-96
-96
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4558
SELECT - - ( col0 ) / col0 - + 97 col2 FROM tab0 cor0
----
-96
-96
-96

query I rowsort
SELECT + 12 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4560
SELECT + col1 DIV + col1 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4560
SELECT + col1 / + col1 AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + + col0 * + 56 AS col1 FROM tab0 AS cor0
----
1344
1960
4984

query I rowsort
SELECT ALL 7 + - 36 AS col0 FROM tab0 AS cor0
----
-29
-29
-29

query I rowsort
SELECT - ( tab0.col2 ) AS col0 FROM tab0, tab0 cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT + + cor0.col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT cor1.col2 + + 40 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7c0ee6e4ead56b0a5e24d0e10d5e8432

query I rowsort
SELECT DISTINCT ( + cor0.col2 ) * - 11 FROM tab1 AS cor0
----
-1056
-594
-627

onlyif mysql # use DIV operator for integer division
query I rowsort label-4567
SELECT ALL + col2 * col2 DIV 34 FROM tab1 AS cor0
----
271
85
95

skipif mysql # not compatible
query I rowsort label-4567
SELECT ALL + col2 * col2 / 34 FROM tab1 AS cor0
----
271
85
95

query I rowsort
SELECT + col2 * col1 + + cor0.col2 * - 46 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-1119
-436
279

query I rowsort
SELECT - 0 + col0 + col1 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col0 * col0 col2 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT ALL col2 + - col1 * + 71 FROM tab1 AS cor0
----
-1792
-653
-827

query I rowsort
SELECT col2 + - col2 * col2 * col2 AS col0 FROM tab2 AS cor0
----
-17550
-19656
-54834

query I rowsort
SELECT DISTINCT - - 80 FROM tab1 AS cor0
----
80

query I rowsort
SELECT + 43 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 199105619049271147956de52e7f5ed4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 47 + col1 col1 FROM tab1
----
-21
-34
-37

query I rowsort
SELECT DISTINCT col0 + - 24 FROM tab2 AS cor0
----
-17
54
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-4577
SELECT + col2 DIV cor0.col0 AS col0 FROM tab2 cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-4577
SELECT + col2 / cor0.col0 AS col0 FROM tab2 cor0
----
0
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-4578
SELECT DISTINCT - + col0 + col1 * cor0.col2 DIV col0 FROM tab1 cor0
----
-56
-65
465

skipif mysql # not compatible
query I rowsort label-4578
SELECT DISTINCT - + col0 + col1 * cor0.col2 / col0 FROM tab1 cor0
----
-56
-65
465

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4579
SELECT DISTINCT - col1 * CAST( + 87 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-7482
-7917
-8439

skipif mysql # not compatible
query I rowsort label-4579
SELECT DISTINCT - col1 * CAST ( + 87 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-7482
-7917
-8439

onlyif mysql # use DIV operator for integer division
query I rowsort label-4580
SELECT ALL col1 * col0 DIV ( + 91 ) FROM tab2
----
14
2
50

skipif mysql # not compatible
query I rowsort label-4580
SELECT ALL col1 * col0 / ( + 91 ) FROM tab2
----
14
2
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * col1 * - col0 col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4582
SELECT + ( + cor0.col0 ) * - cor0.col2 - CAST( NULL AS SIGNED ) / - col0 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-4582
SELECT + ( + cor0.col0 ) * - cor0.col2 - CAST ( NULL AS INTEGER ) / - col0 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4583
SELECT ALL tab0.col2 / CAST( NULL AS SIGNED ) col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4583
SELECT ALL tab0.col2 / CAST ( NULL AS INTEGER ) col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4584
SELECT ALL + CAST( - 41 AS SIGNED ) * + col2 FROM tab2 AS cor0
----
-1066
-1107
-1558

skipif mysql # not compatible
query I rowsort label-4584
SELECT ALL + CAST ( - 41 AS INTEGER ) * + col2 FROM tab2 AS cor0
----
-1066
-1107
-1558

query I rowsort
SELECT ALL - cor0.col2 + - col1 AS col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT + - 42 * col2 AS col1 FROM tab2 AS cor0
----
-1092
-1134
-1596

query I rowsort
SELECT DISTINCT - + col1 * col1 + col2 AS col1 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT 18 AS col1 FROM tab2 AS cor0
----
18

query I rowsort
SELECT + col2 * - 59 - col2 FROM tab1 cor0
----
-3240
-3420
-5760

query I rowsort
SELECT DISTINCT - col1 + + ( + col0 ) AS col1 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT + col0 + + col1 + + 96 * col0 FROM tab2 AS cor0
----
710
7625
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4592
SELECT ALL cor0.col2 DIV + col0 AS col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4592
SELECT ALL cor0.col2 / + col0 AS col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT + + col1 * col0 AS col0 FROM tab2 cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 col1 FROM tab0 AS cor0
----
38
38
38

query I rowsort
SELECT ALL - col0 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-104
-117
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col0 * col1 + - col0 col0 FROM tab0 cor0
----
2126
3457
8101

query I rowsort
SELECT + 81 * col0 + - 48 * + col1 FROM tab0 AS cor0
----
-1821
-2184
2841

query I rowsort
SELECT ALL - 15 + - col2 * - cor0.col2 FROM tab1 AS cor0
----
2901
3234
9201

query I rowsort
SELECT ALL 21 + col2 AS col1 FROM tab0 AS cor0
----
103
22
54

query I rowsort
SELECT DISTINCT 61 + + col2 AS col0 FROM tab2 AS cor0
----
87
88
99

query I rowsort
SELECT + col0 + - col2 * + col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT ALL col1 + - 88 + col0 FROM tab1
----
-14
-59
5

query I rowsort
SELECT DISTINCT ( + 50 ) * col1 * ( + col2 ) + col1 * - col2 * + col1 FROM tab2
----
-13806
15903
21318

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col0 col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 98 col1 FROM tab1 cor0
----
-98
-98
-98

query I rowsort
SELECT ALL - cor0.col1 * col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + - 46 - - col0 * col0 AS col1 FROM tab2 AS cor0
----
3
6038
6195

onlyif mysql # use DIV operator for integer division
query I rowsort label-4608
SELECT DISTINCT ( + col2 ) + + col1 DIV col1 FROM tab2
----
27
28
39

skipif mysql # not compatible
query I rowsort label-4608
SELECT DISTINCT ( + col2 ) + + col1 / col1 FROM tab2
----
27
28
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 + + cor0.col1 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 1467bd9e09a1c906f2eb99a4159ce1c4

query I rowsort
SELECT col0 + - col2 + 11 AS col2 FROM tab1
----
-40
-5
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-4611
SELECT DISTINCT col1 DIV - col1 AS col2 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-4611
SELECT DISTINCT col1 / - col1 AS col2 FROM tab2
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4612
SELECT - - col2 * + CAST( NULL AS SIGNED ) + + cor0.col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4612
SELECT - - col2 * + CAST ( NULL AS INTEGER ) + + cor0.col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col0 + col0 * + col1 AS col1 FROM tab1 AS cor0
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-4614
SELECT DISTINCT tab2.col2 + - tab2.col2 DIV - 82 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4614
SELECT DISTINCT tab2.col2 + - tab2.col2 / - 82 FROM tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4615
SELECT ALL col0 DIV - col0 AS col0 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4615
SELECT ALL col0 / - col0 AS col0 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col2 col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT + 30 * ( + col0 ) AS col0 FROM tab0 AS cor0
----
1050
2670
720

query I rowsort
SELECT DISTINCT + 54 * col0 AS col2 FROM tab0 AS cor0
----
1296
1890
4806

query I rowsort
SELECT col0 * + 18 AS col2 FROM tab2 AS cor0
----
126
1404
1422

query I rowsort
SELECT - - col1 * col0 * + col2 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL - col1 + + col1 * tab0.col0 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT DISTINCT + + 46 * 16 AS col1 FROM tab2 AS cor0
----
736

query I rowsort
SELECT cor0.col2 * 92 - - col0 AS col1 FROM tab0 cor0
----
127
3060
7633

query I rowsort
SELECT ALL + ( - 97 ) * + cor0.col0 * - cor0.col0 + + col0 FROM tab2 AS cor0
----
4760
590226
605456

query I rowsort
SELECT ALL + + 54 FROM tab0 AS cor0
----
54
54
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4626
SELECT + col1 - - cor0.col1 * + col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4626
SELECT + col1 - - cor0.col1 * + col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + 10 * col1 FROM tab0 cor0
----
774
819
873

query I rowsort
SELECT ALL ( - col1 ) * + col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + - 55 * + col1 AS col2 FROM tab1 cor0
----
-1430
-550
-715

query I rowsort
SELECT ALL - - 88 * + col0 + - col2 AS col0 FROM tab2 AS cor0
----
589
6838
6914

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4631
SELECT - CAST( 77 AS SIGNED ) - col0 AS col2 FROM tab2 AS cor0
----
-155
-156
-84

skipif mysql # not compatible
query I rowsort label-4631
SELECT - CAST ( 77 AS INTEGER ) - col0 AS col2 FROM tab2 AS cor0
----
-155
-156
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4632
SELECT DISTINCT + CAST( NULL AS DECIMAL ) - + 59 * - col2 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4632
SELECT DISTINCT + CAST ( NULL AS REAL ) - + 59 * - col2 AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4633
SELECT tab2.col2 DIV + 7 AS col1 FROM tab2
----
3
3
5

skipif mysql # not compatible
query I rowsort label-4633
SELECT tab2.col2 / + 7 AS col1 FROM tab2
----
3
3
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col0 col0 FROM tab1
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4635
SELECT - col0 * CAST( 1 AS SIGNED ) AS col1 FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-4635
SELECT - col0 * CAST ( 1 AS INTEGER ) AS col1 FROM tab2
----
-7
-78
-79

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab0 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to d8caf2ef7d9c405db0aec8c013a5107c

onlyif mysql # use DIV operator for integer division
query I rowsort label-4637
SELECT - col2 DIV col2 AS col0 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4637
SELECT - col2 / col2 AS col0 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT - col1 + col0 * 60 AS col1 FROM tab0 AS cor0
----
1354
2003
5249

query I rowsort
SELECT - cor0.col2 * col2 + + 32 AS col2 FROM tab1 AS cor0
----
-2884
-3217
-9184

query I rowsort
SELECT + col2 * - col2 * col0 + cor0.col1 FROM tab2 AS cor0
----
-114059
-5072
-52669

query I rowsort
SELECT - ( cor0.col1 ) * col1 + + col0 * + 57 AS col0 FROM tab0 AS cor0
----
-3208
-6028
-7414

onlyif mysql # use DIV operator for integer division
query I rowsort label-4642
SELECT + - 83 * + cor0.col1 + - col0 DIV - 51 AS col2 FROM tab2 AS cor0
----
-1410
-2573
-4896

skipif mysql # not compatible
query I rowsort label-4642
SELECT + - 83 * + cor0.col1 + - col0 / - 51 AS col2 FROM tab2 AS cor0
----
-1410
-2573
-4896

query I rowsort
SELECT DISTINCT tab0.col2 * ( col0 ) * col2 FROM tab0
----
26136
35
598436

query I rowsort
SELECT + ( - 79 ) + - col2 * - col1 AS col2 FROM tab2 AS cor0
----
1455
567
758

query I rowsort
SELECT ALL + 36 AS col0 FROM tab1 AS cor0
----
36
36
36

query I rowsort
SELECT tab1.col2 * - 95 AS col2 FROM tab1
----
-5130
-5415
-9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-4647
SELECT DISTINCT - tab0.col2 DIV + col0 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-4647
SELECT DISTINCT - tab0.col2 / + col0 FROM tab0
----
-1
0

query I rowsort
SELECT + cor0.col1 + + cor0.col1 FROM tab2, tab0, tab0 cor0
----
27 values hashing to 30f96c938ee95872f59e2a087590314f

query I rowsort
SELECT - 4 + + cor0.col1 FROM tab1 cor0
----
22
6
9

query I rowsort
SELECT 27 + - ( - col0 ) * - ( 30 + + col1 ) AS col2 FROM tab2 AS cor0
----
-3686
-400
-6915

query I rowsort
SELECT - + 80 + col1 * col0 + cor0.col1 * + ( cor0.col1 ) AS col1 FROM tab2 AS cor0
----
1098
1552
8003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 31 col1 FROM tab2 AS cor0
----
-31
-31
-31

onlyif mysql # use DIV operator for integer division
query I rowsort label-4653
SELECT + ( ( - col0 ) ) + - ( cor0.col2 ) DIV + col1 col2 FROM tab1 AS cor0
----
-5
-69
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4653
SELECT + ( ( - col0 ) ) + - ( cor0.col2 ) / + col1 col2 FROM tab1 AS cor0
----
-5
-69
-87

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( ( col2 ) AS REAL ) FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4655
SELECT - 10 + + col2 DIV - CAST( col0 + - col2 * - col0 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-10
-10
-10

skipif mysql # not compatible
query I rowsort label-4655
SELECT - 10 + + col2 / - CAST ( col0 + - col2 * - col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-10
-10
-10

query I rowsort
SELECT ALL 20 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT + col0 + - ( + col1 ) FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4658
SELECT + - col0 * + CAST( NULL AS SIGNED ) - - 32 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4658
SELECT + - col0 * + CAST ( NULL AS INTEGER ) - - 32 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 15 AS col1 FROM tab1
----
15
15
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4660
SELECT DISTINCT + col2 * col0 + CAST( col2 AS SIGNED ) + col0 AS col1 FROM tab1
----
219
3769
7856

skipif mysql # not compatible
query I rowsort label-4660
SELECT DISTINCT + col2 * col0 + CAST ( col2 AS INTEGER ) + col0 AS col1 FROM tab1
----
219
3769
7856

onlyif mysql # use DIV operator for integer division
query I rowsort label-4661
SELECT + tab0.col1 DIV ( + 48 ) AS col1 FROM tab0, tab0 cor0
----
9 values hashing to c08e3956186780709ba0eab5eede7b9c

skipif mysql # not compatible
query I rowsort label-4661
SELECT + tab0.col1 / ( + 48 ) AS col1 FROM tab0, tab0 cor0
----
9 values hashing to c08e3956186780709ba0eab5eede7b9c

query I rowsort
SELECT - - col0 * - 93 AS col0 FROM tab2 cor0
----
-651
-7254
-7347

query I rowsort
SELECT ALL + col2 + col1 * + cor0.col1 * cor0.col0 FROM tab1 AS cor0
----
13616
2082
6457

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + 9 col0 FROM tab1 AS cor0
----
-1
-17
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * ( col2 ) col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - col2 * + 92 AS col1 FROM tab2 AS cor0
----
-2392
-2484
-3496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col0 * col0 col0 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT ALL cor0.col0 - + 97 AS col0 FROM tab2 AS cor0
----
-18
-19
-90

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 cor0.col2 * - col0 + cor0.col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL - col0 + 20 FROM tab1 cor0
----
-44
-60
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-4672
SELECT ALL - col0 DIV - col0 - + col2 FROM tab2
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-4672
SELECT ALL - col0 / - col0 - + col2 FROM tab2
----
-25
-26
-37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4673
SELECT + col2 * + CAST( NULL AS SIGNED ) + - col0 - tab0.col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4673
SELECT + col2 * + CAST ( NULL AS INTEGER ) + - col0 - tab0.col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4674
SELECT DISTINCT col2 * CAST( col0 AS SIGNED ) - col0 FROM tab2
----
182
1950
2923

skipif mysql # not compatible
query I rowsort label-4674
SELECT DISTINCT col2 * CAST ( col0 AS INTEGER ) - col0 FROM tab2
----
182
1950
2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4675
SELECT - col2 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4675
SELECT - col2 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * cor0.col1 + col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT 17 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT + - 82 + - col2 * + col0 + + col0 AS col2 FROM tab2 AS cor0
----
-2032
-264
-3005

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col1 + ( + tab2.col2 ) col0 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL + col2 + - 66 FROM tab2
----
-28
-39
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 37 col2 FROM tab1, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT ( col1 * + col2 + col2 * + tab0.col0 ) FROM tab0
----
132
14760
3630

onlyif mysql # use DIV operator for integer division
query I rowsort label-4683
SELECT col1 + col1 DIV + col0 FROM tab0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-4683
SELECT col1 + col1 / + col0 FROM tab0
----
89
92
99

query I rowsort
SELECT DISTINCT + 49 * col2 FROM tab2
----
1274
1323
1862

query I rowsort
SELECT ALL + + 3 FROM tab2 AS cor0
----
3
3
3

query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4687
SELECT col1 + col1 DIV col0 + + col0 * - col1 * + col0 FROM tab0
----
-118726
-49447
-720719

skipif mysql # not compatible
query I rowsort label-4687
SELECT col1 + col1 / col0 + + col0 * - col1 * + col0 FROM tab0
----
-118726
-49447
-720719

query I rowsort
SELECT - col1 + col2 - + col0 FROM tab1
----
-17
25
3

query I rowsort
SELECT DISTINCT + tab0.col2 * col0 * + col1 FROM tab0
----
3395
664118
68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * tab2.col1 col1 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4691
SELECT ALL + col2 DIV col1 FROM tab2 WHERE NOT col2 + + col1 IN ( col1 )
----
0
0
2

skipif mysql # not compatible
query I rowsort label-4691
SELECT ALL + col2 / col1 FROM tab2 WHERE NOT col2 + + col1 IN ( col1 )
----
0
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-4692
SELECT col1 DIV + col0 + - col1 col2 FROM tab0 AS cor0
----
-83
-90
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4692
SELECT col1 / + col0 + - col1 col2 FROM tab0 AS cor0
----
-83
-90
-95

query I rowsort
SELECT ALL + col1 - col1 FROM tab2
----
0
0
0

query I rowsort
SELECT + col1 FROM tab0 WHERE col0 + col1 * - col2 BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT DISTINCT + col1 * - tab1.col1 * tab1.col2 AS col0 FROM tab1
----
-16224
-36504
-5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-4696
SELECT tab2.col1 DIV + col0 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-4696
SELECT tab2.col1 / + col0 FROM tab2
----
0
0
4

query I rowsort
SELECT ALL - col0 * - col0 * + col0 FROM tab2
----
343
474552
493039

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col1 col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col0 * + tab0.col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT + col1 * col0 + - col2 AS col1 FROM tab1
----
24
583
944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4701
SELECT + CAST( NULL AS SIGNED ) * tab1.col0 FROM tab1, tab2 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4701
SELECT + CAST ( NULL AS INTEGER ) * tab1.col0 FROM tab1, tab2 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + col0 * col1 + col2 FROM tab2
----
1381
244
4628

query I rowsort
SELECT 19 + + col2 AS col1 FROM tab2
----
45
46
57

query I rowsort
SELECT + ( + col1 ) * col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + - cor0.col0 * col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + 4 + + col2 * - cor0.col1 * col2 FROM tab2 AS cor0
----
-22595
-24544
-39880

query I rowsort
SELECT DISTINCT - col1 * - col2 + + col2 * 75 FROM tab2 cor0
----
2862
3484
3496

query I rowsort
SELECT ALL - 40 * col0 FROM tab0 AS cor0
----
-1400
-3560
-960

query I rowsort
SELECT ALL col2 * + col2 + - col1 + - col1 AS col1 FROM tab2
----
1410
558
667

query I rowsort
SELECT col0 + col1 - + col2 * col0 FROM tab0
----
-682
-7118
97

query I rowsort
SELECT - col1 * col2 - - col0 / - col2 AS col1 FROM tab2 WHERE NULL NOT IN ( + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4712
SELECT col0 * col0 DIV - col1 FROM tab1
----
-409
-492
0

skipif mysql # not compatible
query I rowsort label-4712
SELECT col0 * col0 / - col1 FROM tab1
----
-409
-492
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col2 + col0 col0 FROM tab0
----
133
143
262

onlyif mysql # use DIV operator for integer division
query I rowsort label-4714
SELECT DISTINCT + col0 * col0 DIV col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4714
SELECT DISTINCT + col0 * col0 / col0 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT col0 + col0 * - col0 * col1 + + col2 AS col0 FROM tab2
----
-105980
-1485
-358852

query I rowsort
SELECT + tab0.col1 * - col1 * - tab0.col0 AS col1 FROM tab0
----
177504
329315
737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-4717
SELECT + col2 * col0 DIV + col0 AS col1 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-4717
SELECT + col2 * col0 / + col0 AS col1 FROM tab1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col2 * - col0 + col1 * col0 + col1 col0 FROM tab0
----
21158
4717
657712

onlyif mysql # use DIV operator for integer division
query I rowsort label-4719
SELECT ALL - col0 DIV + col0 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4719
SELECT ALL - col0 / + col0 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT col1 * col2 AS col0 FROM tab1 WHERE NOT NULL IN ( col1 * + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4721
SELECT DISTINCT col0 DIV + tab2.col0 AS col0 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-4721
SELECT DISTINCT col0 / + tab2.col0 AS col0 FROM tab2
----
1

query I rowsort
SELECT DISTINCT + col0 * col2 + col0 * col0 * - col1 + tab0.col1 * col2 FROM tab0
----
-118693
-45906
-706051

onlyif mysql # use DIV operator for integer division
query I rowsort label-4723
SELECT ALL col1 + + col1 + - col1 DIV - col1 col0 FROM tab0 AS cor0
----
173
183
195

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4723
SELECT ALL col1 + + col1 + - col1 / - col1 col0 FROM tab0 AS cor0
----
173
183
195

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 + col2 * cor0.col2 AS col1 FROM tab1 AS cor0
----
15616
2925
7345

query I rowsort
SELECT ALL + col1 + col2 * col1 AS col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT - col1 * + col2 + col2 * col0 AS col1 FROM tab2
----
-648
2356
494

query I rowsort
SELECT + tab1.col2 * + tab1.col1 + + col2 * col2 FROM tab1
----
10464
3819
4320

query I rowsort
SELECT col1 * col0 + tab1.col0 AS col1 FROM tab1
----
1120
704
81

query I rowsort
SELECT tab1.col1 - - col0 AS col2 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL - tab0.col0 * + col1 * col1 AS col0 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT tab2.col0 - + col0 AS col2 FROM tab2
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4732
SELECT - col2 DIV - col2 + col1 * col1 FROM tab0
----
7397
8282
9410

skipif mysql # not compatible
query I rowsort label-4732
SELECT - col2 / - col2 + col1 * col1 FROM tab0
----
7397
8282
9410

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT - col0 <> col2
----

query III rowsort
SELECT ALL * FROM tab2 WHERE - col1 <> ( col1 * - col2 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT col1 FROM tab0 WHERE NOT ( col2 * col1 ) = ( + col0 )
----
86
91
97

query I rowsort
SELECT ( - col1 + col1 ) FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4737
SELECT ( col2 ) * + col0 DIV + col0 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-4737
SELECT ( col2 ) * + col0 / + col0 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL + + col0 * - col0 * col2 AS col1 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT + + cor0.col0 * - 24 - + col2 * - col1 FROM tab1 AS cor0
----
-672
-966
1332

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4740
SELECT DISTINCT - CAST( col0 AS SIGNED ) + + col2 * - col0 * col2 AS col1 FROM tab2 AS cor0
----
-114155
-5110
-52806

skipif mysql # not compatible
query I rowsort label-4740
SELECT DISTINCT - CAST ( col0 AS INTEGER ) + + col2 * - col0 * col2 AS col1 FROM tab2 AS cor0
----
-114155
-5110
-52806

query I rowsort
SELECT ( - 59 + - col0 ) FROM tab1
----
-123
-139
-62

query I rowsort
SELECT ( - 99 ) FROM tab2
----
-99
-99
-99

query I rowsort
SELECT DISTINCT 64 AS col0 FROM tab2, tab2 AS cor0
----
64

query I rowsort
SELECT 73 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT DISTINCT - 18 FROM tab2
----
-18

query I rowsort
SELECT ALL + 22 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT - 37 + 32 FROM tab1, tab1 AS cor0, tab1 cor1, tab0 AS cor2
----
81 values hashing to ede490c59604723c000449e027e5cf18

query I rowsort
SELECT DISTINCT - + cor0.col2 * cor0.col2 + col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

onlyif mysql # use DIV operator for integer division
query I rowsort label-4749
SELECT + col2 DIV - col0 - + col2 FROM tab0 AS cor0
----
-1
-34
-82

skipif mysql # not compatible
query I rowsort label-4749
SELECT + col2 / - col0 - + col2 FROM tab0 AS cor0
----
-1
-34
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4750
SELECT ALL CAST( NULL AS SIGNED ) * + 12 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4750
SELECT ALL CAST ( NULL AS INTEGER ) * + 12 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 84 + - col1 FROM tab1 AS cor0
----
58
71
74

query I rowsort
SELECT - col0 - col0 * 11 FROM tab0 AS cor0
----
-1068
-288
-420

query I rowsort
SELECT DISTINCT col0 * col0 AS col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT + - 80 + col1 AS col1 FROM tab1 AS cor0
----
-54
-67
-70

query I rowsort
SELECT DISTINCT tab1.col1 + + col1 AS col0 FROM tab1
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col1 + - col2 * col1 col2 FROM tab0
----
-2719
-7289
1

query I rowsort
SELECT - + col1 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - col0 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL - col0 * ( col1 ) + + 84 + 24 AS col1 FROM tab1
----
-532
-932
30

query I rowsort
SELECT col0 + col2 + + tab1.col1 FROM tab1
----
131
189
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4761
SELECT ALL + - col2 + col0 + 11 DIV + col0 FROM tab2 AS cor0
----
-19
41
52

skipif mysql # not compatible
query I rowsort label-4761
SELECT ALL + - col2 + col0 + 11 / + col0 FROM tab2 AS cor0
----
-19
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4762
SELECT DISTINCT - col0 + - CAST( NULL AS SIGNED ) * - col0 * cor0.col0 AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4762
SELECT DISTINCT - col0 + - CAST ( NULL AS INTEGER ) * - col0 * cor0.col0 AS col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 - + col2 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4764
SELECT DISTINCT - col1 + - CAST( col1 AS SIGNED ) - - col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-4764
SELECT DISTINCT - col1 + - CAST ( col1 AS INTEGER ) - - col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 + cor0.col0 col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + - tab0.col2 AS col1 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT cor0.col0 + ( cor0.col0 ) + col1 AS col2 FROM tab2 cor0
----
175
215
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4768
SELECT + - CAST( NULL AS SIGNED ) * col2 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-4768
SELECT + - CAST ( NULL AS INTEGER ) * col2 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT ALL - + col2 * col1 + + col1 AS col0 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT - + col0 * + 53 FROM tab1 AS cor0
----
-159
-3392
-4240

query I rowsort
SELECT ALL cor0.col1 * - col2 - - col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL + 8 * ( - tab0.col0 ) * col2 FROM tab0
----
-280
-58384
-6336

query I rowsort
SELECT DISTINCT + ( + 52 ) * - col0 FROM tab0
----
-1248
-1820
-4628

query I rowsort
SELECT - - cor0.col1 * col2 + - cor0.col0 - col0 AS col2 FROM tab2 AS cor0
----
1378
488
823

onlyif mysql # use DIV operator for integer division
query I rowsort label-4776
SELECT DISTINCT + col2 DIV tab1.col2 AS col1 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-4776
SELECT DISTINCT + col2 / tab1.col2 AS col1 FROM tab1
----
1

query I rowsort
SELECT ( - col0 ) FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT col2 * - col0 + col1 * col1 FROM tab0 cor0
----
6604
9374
983

query I rowsort
SELECT col2 - + col0 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT 87 * - col0 FROM tab0
----
-2088
-3045
-7743

query I rowsort
SELECT + ( + cor0.col0 ) + - cor0.col0 - col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + col2 * col1 + col0 AS col0 FROM tab0 AS cor0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 72 + - col1 col0 FROM tab0 cor0
----
-158
-163
-169

query I rowsort
SELECT + ( + col0 ) * + col2 + col2 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT + col2 + + 87 FROM tab2 AS cor0
----
113
114
125

query I rowsort
SELECT DISTINCT - 95 AS col1 FROM tab1, tab0 AS cor0
----
-95

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab0, tab1 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 93e5b836e3f52f458344e73ebce589b5

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
7
78
79

query I rowsort
SELECT col0 * + ( col0 ) + col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT col1 + - cor0.col0 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - col2 * + ( col0 ) FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4792
SELECT + + col2 DIV - col2 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4792
SELECT + + col2 / - col2 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + col0 + - col1 * col2 FROM tab1 cor0
----
-1168
-1401
-506

query I rowsort
SELECT - + col2 * + 78 AS col2 FROM tab1 AS cor0
----
-4212
-4446
-7488

query I rowsort
SELECT - col2 * cor0.col1 + cor0.col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT + + 33 + col2 * - col2 FROM tab1 AS cor0
----
-2883
-3216
-9183

query IIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0 WHERE NOT ( NULL ) NOT BETWEEN ( NULL ) AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4798
SELECT ( col2 ) DIV - col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-4798
SELECT ( col2 ) / - col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT + col0 * - cor0.col1 FROM tab2 cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 col2 FROM tab1 AS cor0
----
17
17
17

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab2 cor1, tab2, tab0 AS cor2
----
3645 values hashing to 76de18c5bf2cf2620e1f411d7bde86e7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4802
SELECT col0 DIV cor0.col0 AS col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4802
SELECT col0 / cor0.col0 AS col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - col2 + col2 * cor0.col1 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT ALL + + col0 + + col0 AS col1 FROM tab1 cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4805
SELECT + - col0 DIV col1 + - col2 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4805
SELECT + - col0 / col1 + - col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL col2 + - col0 + col1 FROM tab0 AS cor0
----
63
84
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-4807
SELECT ALL + col0 * - col2 + - col1 DIV + col2 AS col1 FROM tab0 AS cor0
----
-132
-7299
-794

skipif mysql # not compatible
query I rowsort label-4807
SELECT ALL + col0 * - col2 + - col1 / + col2 AS col1 FROM tab0 AS cor0
----
-132
-7299
-794

query I rowsort
SELECT DISTINCT + col2 + + col1 + - col0 * + col0 FROM tab1 AS cor0
----
-4029
-6291
71

query I rowsort
SELECT DISTINCT cor0.col1 * col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - + col0 + - col0 AS col0 FROM tab1 cor0
----
-128
-160
-6

query I rowsort
SELECT DISTINCT - col0 * - cor0.col2 * col2 AS col0 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT DISTINCT col0 * + col0 * cor0.col2 + col2 FROM tab0 AS cor0
----
1226
19041
649604

query I rowsort
SELECT ALL col0 * col2 FROM tab2 AS cor0 WHERE NOT col1 > ( NULL )
----

query I rowsort
SELECT DISTINCT cor0.col0 + col2 + + col0 FROM tab1 cor0
----
185
256
60

query I rowsort
SELECT ALL col1 + - cor0.col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT - col2 FROM tab0 WHERE NOT + col0 NOT IN ( col0 * col2 * - col1 )
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT col0 NOT IN ( - col2 * - tab1.col0 + - col1 )
----

query I rowsort
SELECT tab2.col2 AS col0 FROM tab0, tab0 cor0 CROSS JOIN tab2
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4819
SELECT ALL + col2 * cor0.col0 DIV - col2 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-4819
SELECT ALL + col2 * cor0.col0 / - col2 col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col0 * col1 + + col1 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-4821
SELECT - col2 DIV col0 col0 FROM tab0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4821
SELECT - col2 / col0 col0 FROM tab0
----
-1
0
0

query I rowsort
SELECT + col0 + - col0 * + col2 AS col0 FROM tab0 AS cor0
----
-7209
-768
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4823
SELECT ALL - col2 DIV + col2 + col1 * + col1 AS col1 FROM tab1
----
168
675
99

skipif mysql # not compatible
query I rowsort label-4823
SELECT ALL - col2 / + col2 + col1 * + col1 AS col1 FROM tab1
----
168
675
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-4824
SELECT + col2 * col1 DIV col0 + + tab2.col2 * col0 AS col1 FROM tab2
----
2047
3010
308

skipif mysql # not compatible
query I rowsort label-4824
SELECT + col2 * col1 / col0 + + tab2.col2 * col0 AS col1 FROM tab2
----
2047
3010
308

onlyif mysql # use DIV operator for integer division
query I rowsort label-4825
SELECT col2 + col1 * col0 DIV - tab0.col2 FROM tab0
----
-16
-29
-3394

skipif mysql # not compatible
query I rowsort label-4825
SELECT col2 + col1 * col0 / - tab0.col2 FROM tab0
----
-16
-29
-3394

query I rowsort
SELECT DISTINCT + col2 * - col1 + col1 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT - + col2 * + col1 - + col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT - + col2 - col1 AS col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT + col0 + + cor0.col2 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + - col1 - + 1 FROM tab2 AS cor0
----
-18
-32
-60

query I rowsort
SELECT DISTINCT - - col2 + - col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col2 - 25 * - col1 * col2 FROM tab0 AS cor0
----
193848
2460
71742

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4833
SELECT col1 * - CAST( NULL AS SIGNED ) + + col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4833
SELECT col1 * - CAST ( NULL AS INTEGER ) + + col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + - ( - 56 + col1 ) * - col0 FROM tab2 AS cor0
----
-168
-3002
312

query I rowsort
SELECT - col0 - 99 FROM tab1 AS cor0
----
-102
-163
-179

query I rowsort
SELECT ALL col1 + col1 + 22 FROM tab2 AS cor0
----
140
56
84

query I rowsort
SELECT + cor0.col1 * 10 * 48 + col2 * 78 AS col1 FROM tab2 AS cor0
----
11124
16986
30348

onlyif mysql # use DIV operator for integer division
query I rowsort label-4838
SELECT DISTINCT col1 * col0 DIV - CAST( 47 AS SIGNED ) - - col2 AS col2 FROM tab2
----
-71
10
23

skipif mysql # not compatible
query I rowsort label-4838
SELECT DISTINCT col1 * col0 / - CAST ( 47 AS INTEGER ) - - col2 AS col2 FROM tab2
----
-71
10
23

query I rowsort
SELECT + 28 + cor0.col0 AS col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to f3cace96097f55a8b7bcef1d2a4d8660

query I rowsort
SELECT - - col0 - col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT + - col0 * + col1 + + col2 AS col0 FROM tab1 cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT col0 + - cor0.col0 FROM tab2 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4843
SELECT ALL col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4843
SELECT ALL col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 - + ( ( - col1 ) + col0 * col1 ) FROM tab1 AS cor0
----
-573
-931
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-4845
SELECT ALL + col0 + col0 DIV + col0 AS col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-4845
SELECT ALL + col0 + col0 / + col0 AS col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT col1 + 41 FROM tab2 AS cor0
----
100
58
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4847
SELECT - tab2.col1 * - CAST( + 13 AS SIGNED ) col1 FROM tab2
----
221
403
767

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4847
SELECT - tab2.col1 * - CAST ( + 13 AS INTEGER ) col1 FROM tab2
----
221
403
767

query I rowsort
SELECT DISTINCT + 13 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
13

query I rowsort
SELECT ALL col0 * col0 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT ALL + ( 2 ) FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

query I rowsort
SELECT DISTINCT + col1 * col0 - 40 AS col1 FROM tab1 AS cor0
----
1000
38
600

query I rowsort
SELECT ALL - - col0 - cor0.col1 * - ( col0 ) FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT tab1.col2 - - 82 FROM tab1
----
136
139
178

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1, tab1 cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + - col0 * col1 + - col0 AS col2 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT - 76 AS col0 FROM tab1 AS cor0
----
-76
-76
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * + col2 * - cor0.col2 + 10 col0 FROM tab1 AS cor0
----
-207926
-737270
-8738

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 - col0 col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT cor0.col1 AS col0 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-4860
SELECT ALL - - col1 / cor0.col0 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4860
SELECT ALL - - col1 / cor0.col0 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col1 + col1 FROM tab0 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4862
SELECT - + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4862
SELECT - + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - 26 + - col0 * - col0 * - col2 AS col1 FROM tab0 cor0
----
-1251
-19034
-649548

query I rowsort
SELECT 62 * - 76 FROM tab2, tab1, tab0 AS cor0, tab2 AS cor1
----
81 values hashing to 212b4fa334228d268cbb4a0528ebcb1b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4865
SELECT col2 DIV col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4865
SELECT col2 / col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + 85 * 51 FROM tab1, tab0 AS cor0
----
9 values hashing to afc439db2e5d9ceb63ea70bebcf66913

query I rowsort
SELECT 46 FROM tab2, tab2 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
26
27
38

query I rowsort
SELECT + ( 90 ) * col1 * 26 AS col0 FROM tab2
----
138060
39780
72540

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4870
SELECT ALL + - CAST( col0 AS SIGNED ) AS col0 FROM tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-4870
SELECT ALL + - CAST ( col0 AS INTEGER ) AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + - col1 + + 60 * - col0 AS col1 FROM tab2 AS cor0
----
-451
-4739
-4757

query I rowsort
SELECT ALL - + 33 * col2 FROM tab1 AS cor0
----
-1782
-1881
-3168

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4873
SELECT - CAST( NULL AS SIGNED ) + 90 * cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4873
SELECT - CAST ( NULL AS INTEGER ) + 90 * cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor1.col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 49 * cor0.col1 + col1 col0 FROM tab0 AS cor0
----
-4128
-4368
-4656

query I rowsort
SELECT ALL - + col1 * col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4877
SELECT col2 + col2 * - CAST( col2 AS SIGNED ) + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-1080
-35
-6731

skipif mysql # not compatible
query I rowsort label-4877
SELECT col2 + col2 * - CAST ( col2 AS INTEGER ) + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-1080
-35
-6731

query I rowsort
SELECT + cor0.col0 * - cor0.col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - - 73 FROM tab0 AS cor0
----
73
73
73

query I rowsort
SELECT 7 + cor0.col1 FROM tab0 AS cor0
----
104
93
98

query I rowsort
SELECT DISTINCT + col1 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-4882
SELECT 42 DIV + col0 FROM tab0 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4882
SELECT 42 / + col0 FROM tab0 AS cor0
----
0
1
1

query I rowsort
SELECT ALL + 20 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
520
540
760

onlyif mysql # use DIV operator for integer division
query I rowsort label-4884
SELECT + 78 DIV 84 + + col0 AS col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4884
SELECT + 78 / 84 + + col0 AS col2 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4885
SELECT + col2 DIV col0 + col1 * + ( col1 * col2 ) + + ( cor0.col2 * 22 ) AS col1 FROM tab2 AS cor0
----
11818
26544
91078

skipif mysql # not compatible
query I rowsort label-4885
SELECT + col2 / col0 + col1 * + ( col1 * col2 ) + + ( cor0.col2 * 22 ) AS col1 FROM tab2 AS cor0
----
11818
26544
91078

query I rowsort
SELECT - 20 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to f1cccb95c90889319e7a51e4ae9475bb

query I rowsort
SELECT DISTINCT - 37 AS col1 FROM tab1, tab2 AS cor0
----
-37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4888
SELECT CAST( - 56 AS SIGNED ) FROM tab1, tab2 AS cor0
----
9 values hashing to 3d3dab400eef93c098acbbba3fc9bdc6

skipif mysql # not compatible
query I rowsort label-4888
SELECT CAST ( - 56 AS INTEGER ) FROM tab1, tab2 AS cor0
----
9 values hashing to 3d3dab400eef93c098acbbba3fc9bdc6

query I rowsort
SELECT DISTINCT + col2 + col1 * col2 + - 45 AS col0 FROM tab1 AS cor0
----
1299
1413
582

query I rowsort
SELECT + ( 83 * - col1 ) FROM tab1
----
-1079
-2158
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-4891
SELECT DISTINCT + cor0.col2 DIV cor0.col1 + 2 FROM tab1 AS cor0
----
4
7
9

skipif mysql # not compatible
query I rowsort label-4891
SELECT DISTINCT + cor0.col2 / cor0.col1 + 2 FROM tab1 AS cor0
----
4
7
9

query I rowsort
SELECT DISTINCT + col0 + + col0 * col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT ALL - 49 FROM tab2
----
-49
-49
-49

query I rowsort
SELECT - 5 + - col2 FROM tab1
----
-101
-59
-62

query I rowsort
SELECT ALL - ( 82 ) FROM tab1
----
-82
-82
-82

query I rowsort
SELECT + 90 * 77 FROM tab1, tab0, tab2 cor0
----
27 values hashing to c1de1ae44f82ea7b34a380f42e4e4111

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
7
78
79

query I rowsort
SELECT DISTINCT - tab2.col2 * - ( + col0 ) AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - col1 - + col1 * - col0 FROM tab1
----
1027
52
630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4900
SELECT - CAST( NULL AS SIGNED ) * - col2 + + col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4900
SELECT - CAST ( NULL AS INTEGER ) * - col2 + + col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 90 AS col2 FROM tab0
----
90

query I rowsort
SELECT - 23 * tab1.col2 * - col1 + + col2 * col0 FROM tab1
----
16758
32454
36384

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * cor0.col1 col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4904
SELECT col1 * CAST( - ( cor0.col2 ) AS SIGNED ) + ( col0 * col2 ) FROM tab1 AS cor0
----
-1242
3078
6432

skipif mysql # not compatible
query I rowsort label-4904
SELECT col1 * CAST ( - ( cor0.col2 ) AS INTEGER ) + ( col0 * col2 ) FROM tab1 AS cor0
----
-1242
3078
6432

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4905
SELECT + col2 + - CAST( 27 AS SIGNED ) * col1 FROM tab1 cor0
----
-213
-255
-648

skipif mysql # not compatible
query I rowsort label-4905
SELECT + col2 + - CAST ( 27 AS INTEGER ) * col1 FROM tab1 cor0
----
-213
-255
-648

query I rowsort
SELECT ALL 89 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

onlyif mysql # use DIV operator for integer division
query I rowsort label-4907
SELECT DISTINCT + tab1.col1 DIV 81 FROM tab1, tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4907
SELECT DISTINCT + tab1.col1 / 81 FROM tab1, tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4908
SELECT ALL + col0 + CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4908
SELECT ALL + col0 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT tab1.col0 + col0 * col1 AS col2 FROM tab1
----
1120
704
81

query I rowsort
SELECT ALL tab2.col1 * ( - tab2.col2 ) + - col1 FROM tab2
----
-1593
-663
-868

onlyif mysql # use DIV operator for integer division
query I rowsort label-4911
SELECT ALL col0 DIV - col0 AS col1 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4911
SELECT ALL col0 / - col0 AS col1 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT col1 + col0 * col2 * col1 AS col0 FROM tab2 AS cor0
----
119711
51051
5890

onlyif mysql # use DIV operator for integer division
query I rowsort label-4913
SELECT - col0 - tab2.col2 DIV - ( + col1 ) AS col0 FROM tab2
----
-7
-77
-78

skipif mysql # not compatible
query I rowsort label-4913
SELECT - col0 - tab2.col2 / - ( + col1 ) AS col0 FROM tab2
----
-7
-77
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4914
SELECT col0 + CAST( NULL AS SIGNED ) + + ( - col0 ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4914
SELECT col0 + CAST ( NULL AS INTEGER ) + + ( - col0 ) FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4915
SELECT ALL col2 DIV - col2 + col1 AS col0 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-4915
SELECT ALL col2 / - col2 + col1 AS col0 FROM tab0
----
85
90
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 + col1 * col0 * + col2 col1 FROM tab0
----
3430
664207
68136

query I rowsort
SELECT ALL - - 6 FROM tab0 AS cor0
----
6
6
6

query I rowsort
SELECT ( - col0 ) * col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - 24 + - 48 * col1 FROM tab1 AS cor0
----
-1272
-504
-648

onlyif mysql # use DIV operator for integer division
query I rowsort label-4920
SELECT DISTINCT + - 23 DIV col1 col2 FROM tab1 AS cor0
----
-1
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4920
SELECT DISTINCT + - 23 / col1 col2 FROM tab1 AS cor0
----
-1
-2
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4921
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4921
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL 1 + + 80 AS col1 FROM tab2 AS cor0
----
81
81
81

query I rowsort
SELECT - ( - col0 ) * - cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - - 32 FROM tab1 cor0
----
32
32
32

query I rowsort
SELECT col1 * + col2 * - cor0.col2 FROM tab1 AS cor0
----
-119808
-32490
-75816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4926
SELECT DISTINCT + CAST( col2 AS SIGNED ) AS col2 FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4926
SELECT DISTINCT + CAST ( col2 AS INTEGER ) AS col2 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - ( col1 ) * col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT 15 * col1 AS col2 FROM tab2 AS cor0
----
255
465
885

query I rowsort
SELECT DISTINCT - ( - col1 ) + col1 * + 87 AS col2 FROM tab0 AS cor0
----
7568
8008
8536

query I rowsort
SELECT 51 * + col2 + cor0.col2 * col0 AS col1 FROM tab0 AS cor0
----
11480
2475
86

query I rowsort
SELECT DISTINCT 70 * - col1 * + col0 + 17 FROM tab2 AS cor0
----
-15173
-322123
-93993

query I rowsort
SELECT ALL - 4 - 34 AS col2 FROM tab0 AS cor0
----
-38
-38
-38

query I rowsort
SELECT col1 + - col2 + col0 AS col0 FROM tab2
----
11
111
58

query I rowsort
SELECT DISTINCT + tab1.col2 * col1 - col1 AS col2 FROM tab1
----
1235
1378
560

query I rowsort
SELECT DISTINCT + col0 - - tab0.col0 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL + col2 * cor0.col2 + + 87 + 57 FROM tab2 AS cor0
----
1588
820
873

onlyif mysql # use DIV operator for integer division
query I rowsort label-4938
SELECT DISTINCT - cor0.col2 + col2 * 90 DIV - 92 FROM tab2 AS cor0
----
-51
-53
-75

skipif mysql # not compatible
query I rowsort label-4938
SELECT DISTINCT - cor0.col2 + col2 * 90 / - 92 FROM tab2 AS cor0
----
-51
-53
-75

query I rowsort
SELECT - col1 - + cor0.col2 AS col1 FROM tab0 cor0
----
-119
-173
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4940
SELECT col1 * + col1 + - CAST( NULL AS SIGNED ) * + 25 - col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4940
SELECT col1 * + col1 + - CAST ( NULL AS INTEGER ) * + 25 - col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 9 + + col0 * + col2 FROM tab2 cor0
----
198
2037
3011

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4942
SELECT ALL col0 * - CAST( + 28 AS SIGNED ) FROM tab2 AS cor0
----
-196
-2184
-2212

skipif mysql # not compatible
query I rowsort label-4942
SELECT ALL col0 * - CAST ( + 28 AS INTEGER ) FROM tab2 AS cor0
----
-196
-2184
-2212

query I rowsort
SELECT + - col1 + - 73 FROM tab2 AS cor0
----
-104
-132
-90

query I rowsort
SELECT DISTINCT - col1 * + ( col2 ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + + col0 * ( - 97 ) AS col0 FROM tab2 AS cor0
----
-679
-7566
-7663

query I rowsort
SELECT ALL - col0 * + col2 * col2 AS col1 FROM tab0 cor0
----
-26136
-35
-598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-4947
SELECT ALL - tab0.col1 + col2 - col2 DIV col1 FROM tab0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-4947
SELECT ALL - tab0.col1 + col2 - col2 / col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT ALL cor1.col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT col1 + - col1 * + col1 AS col0 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT ALL + + col0 * + col0 + - cor0.col0 * 49 AS col0 FROM tab2 AS cor0
----
-294
2262
2370

query I rowsort
SELECT DISTINCT 43 FROM tab0 AS cor0
----
43

query I rowsort
SELECT - + 15 * + ( + cor0.col1 * 8 + + col1 ) AS col1 FROM tab2 AS cor0
----
-2295
-4185
-7965

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4953
SELECT ALL + CAST( + col2 AS SIGNED ) + col1 * - 74 * + 5 AS col0 FROM tab2 AS cor0
----
-11443
-21804
-6252

skipif mysql # not compatible
query I rowsort label-4953
SELECT ALL + CAST ( + col2 AS INTEGER ) + col1 * - 74 * + 5 AS col0 FROM tab2 AS cor0
----
-11443
-21804
-6252

query I rowsort
SELECT + cor0.col1 * col0 * - col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT + cor0.col0 * ( - cor0.col0 + col2 ) FROM tab1 AS cor0
----
-448
1280
153

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 84 + col2 + col1 * col0 col1 FROM tab2 AS cor0
----
1465
328
4712

query I rowsort
SELECT - + ( col0 ) + + col0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 69 * col2 AS col0 FROM tab0 AS cor0
----
2277
5658
69

query I rowsort
SELECT ALL 67 * + 81 AS col0 FROM tab2 AS cor0
----
5427
5427
5427

onlyif mysql # use DIV operator for integer division
query I rowsort label-4960
SELECT ALL - cor0.col2 DIV 8 AS col2 FROM tab0 AS cor0
----
-10
-4
0

skipif mysql # not compatible
query I rowsort label-4960
SELECT ALL - cor0.col2 / 8 AS col2 FROM tab0 AS cor0
----
-10
-4
0

query I rowsort
SELECT - col2 + 23 * cor0.col1 AS col2 FROM tab2 AS cor0
----
1331
353
686

query I rowsort
SELECT ALL + 71 * + col0 AS col0 FROM tab1 AS cor0
----
213
4544
5680

query I rowsort
SELECT - + 7 AS col0 FROM tab1 AS cor0
----
-7
-7
-7

query I rowsort
SELECT ALL col2 + - col0 * col0 AS col1 FROM tab2 AS cor0
----
-22
-6058
-6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-4965
SELECT 62 + - col2 DIV - col2 AS col1 FROM tab0 AS cor0
----
63
63
63

skipif mysql # not compatible
query I rowsort label-4965
SELECT 62 + - col2 / - col2 AS col1 FROM tab0 AS cor0
----
63
63
63

query I rowsort
SELECT DISTINCT - - cor0.col1 + - col2 * cor0.col2 AS col2 FROM tab2 AS cor0
----
-1427
-617
-698

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4967
SELECT DISTINCT - col1 * - col0 + - CAST( NULL AS SIGNED ) / col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4967
SELECT DISTINCT - col1 * - col0 + - CAST ( NULL AS INTEGER ) / col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - - 64 + cor0.col1 - + 19 AS col0 FROM tab2 cor0
----
104
62
76

query I rowsort
SELECT DISTINCT - 30 AS col2 FROM tab2, tab2 AS cor0
----
-30

query I rowsort
SELECT DISTINCT cor0.col1 + col1 * 97 * col1 AS col0 FROM tab0 cor0
----
717498
803348
912770

query I rowsort
SELECT DISTINCT - cor0.col0 * + col0 * col0 FROM tab1 AS cor0
----
-262144
-27
-512000

query I rowsort
SELECT DISTINCT - cor0.col1 + - col0 AS col2 FROM tab1 cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4973
SELECT DISTINCT - col0 DIV - 47 + col0 * + col0 FROM tab1 cor0
----
4097
6401
9

skipif mysql # not compatible
query I rowsort label-4973
SELECT DISTINCT - col0 / - 47 + col0 * + col0 FROM tab1 cor0
----
4097
6401
9

query I rowsort
SELECT DISTINCT - + col2 * ( col0 ) + - cor0.col0 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT + - 86 + - 16 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 2415a631ce8606b8e4cce4f738cdf609

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 70 col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
-70

query I rowsort
SELECT DISTINCT col1 + col0 * 30 FROM tab0 AS cor0
----
1147
2761
806

query I rowsort
SELECT DISTINCT + - col2 + - ( 8 ) AS col2 FROM tab1 AS cor0
----
-104
-62
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - col0 * - col2 col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL col2 + col1 * - 48 AS col1 FROM tab0 AS cor0
----
-4095
-4286
-4655

query I rowsort
SELECT - col2 - col2 * 44 FROM tab1
----
-2430
-2565
-4320

onlyif mysql # use DIV operator for integer division
query I rowsort label-4982
SELECT + col0 * tab1.col1 - col1 DIV tab1.col1 AS col1 FROM tab1
----
1039
639
77

skipif mysql # not compatible
query I rowsort label-4982
SELECT + col0 * tab1.col1 - col1 / tab1.col1 AS col1 FROM tab1
----
1039
639
77

query I rowsort
SELECT DISTINCT col0 * - 94 + col1 FROM tab1 AS cor0
----
-256
-6006
-7507

query I rowsort
SELECT DISTINCT + 87 + + cor0.col1 * col1 AS col1 FROM tab2 AS cor0
----
1048
3568
376

query I rowsort
SELECT + 54 * 28 FROM tab1 AS cor0
----
1512
1512
1512

query I rowsort
SELECT ALL col0 * 38 AS col2 FROM tab0 AS cor0
----
1330
3382
912

query I rowsort
SELECT 22 FROM tab1 AS cor0
----
22
22
22

onlyif mysql # use DIV operator for integer division
query I rowsort label-4988
SELECT + col1 + - col0 DIV col2 AS col2 FROM tab1
----
13
26
9

skipif mysql # not compatible
query I rowsort label-4988
SELECT + col1 + - col0 / col2 AS col2 FROM tab1
----
13
26
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 * col2 col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT col2 * ( tab1.col2 ) + - tab1.col2 AS col2 FROM tab1
----
2862
3192
9120

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 DISTINCT cor0.col1 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT col2 * col2 + + col1 FROM tab0 cor0
----
1175
6815
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4994
SELECT - - CAST( NULL AS DECIMAL ) * + cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4994
SELECT - - CAST ( NULL AS REAL ) * + cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col2 * + col2 + + col0 AS col1 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT 11 + + cor0.col2 * cor0.col0 FROM tab1 AS cor0
----
173
3659
7691

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4997
SELECT ALL + CAST( + col1 AS SIGNED ) AS col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4997
SELECT ALL + CAST ( + col1 AS INTEGER ) AS col1 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL 23 FROM tab1, tab2, tab0 AS cor0, tab1 cor1
----
81 values hashing to d3b0357ceadb3a70da7f1649b1ef2a30

query I rowsort
SELECT - + 74 * - cor0.col0 + - col0 AS col1 FROM tab0 AS cor0
----
1752
2555
6497

query I rowsort
SELECT DISTINCT - 83 AS col2 FROM tab1 AS cor0
----
-83

query I rowsort
SELECT ALL - ( col2 ) + col1 AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - 38 FROM tab0, tab0 cor0
----
9 values hashing to e571541ae40cb0ddaca16e11f4359507

query I rowsort
SELECT + 25 - + cor1.col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to a540a5768631d5bf1c7d147e66a1ee1f

query I rowsort
SELECT DISTINCT col2 + col2 * - tab0.col0 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT + + cor0.col1 * cor0.col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 7623ebe74018211e6a4da91fc8c37d6d

query I rowsort
SELECT DISTINCT + col2 + col2 AS col2 FROM tab0
----
164
2
66

query I rowsort
SELECT ALL + 78 + col0 * + col0 FROM tab0
----
1303
654
7999

onlyif mysql # use DIV operator for integer division
query I rowsort label-5008
SELECT 38 DIV col1 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5008
SELECT 38 / col1 FROM tab2
----
0
1
2

query I rowsort
SELECT ALL - tab1.col0 * - 40 FROM tab1, tab1 cor0
----
9 values hashing to eb6cf7cf5c5c8f05b389e49640084053

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * col1 * - col2 col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT ALL + ( col0 ) * - 78 AS col2 FROM tab0 AS cor0
----
-1872
-2730
-6942

query I rowsort
SELECT DISTINCT col2 * + col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT col2 * - tab0.col0 + - ( + col0 ) FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT + col0 + + tab1.col1 + col2 * + col2 AS col1 FROM tab1
----
2945
3323
9309

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5015
SELECT col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5015
SELECT col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * - col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL + col2 * ( - 9 + col1 ) FROM tab0 AS cor0
----
2541
6724
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5018
SELECT - col1 * - CAST( NULL AS SIGNED ) 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-5018
SELECT - col1 * - CAST ( NULL AS INTEGER ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * ( + 68 * - col1 ) + col0 AS col1 FROM tab1 AS cor0
----
-38696
-84784
-95469

query I rowsort
SELECT DISTINCT + - col0 * + col0 - + col1 AS col1 FROM tab0 AS cor0
----
-1322
-662
-8012

query I rowsort
SELECT ALL + + col1 * ( col0 * + col0 ) AS col2 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT DISTINCT col2 * + tab1.col0 AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - + col1 * - col2 * 11 AS col2 FROM tab0 AS cor0
----
1067
31218
82082

query I rowsort
SELECT ALL - col1 * 27 FROM tab2 AS cor0
----
-1593
-459
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5025
SELECT - + col0 + - CAST( NULL AS SIGNED ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5025
SELECT - + col0 + - CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 - - col1 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT - + col0 + + 51 FROM tab0 AS cor0
----
-38
16
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-5028
SELECT ALL col1 * 76 DIV col2 - + col1 FROM tab0 AS cor0
----
-7
112
7275

skipif mysql # not compatible
query I rowsort label-5028
SELECT ALL col1 * 76 / col2 - + col1 FROM tab0 AS cor0
----
-7
112
7275

query I rowsort
SELECT + col2 * - 76 * + ( + col1 ) + col2 AS col1 FROM tab2 AS cor0
----
-116558
-49058
-63585

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5030
SELECT cor0.col0 + CAST( col0 AS SIGNED ) * col2 AS col1 FROM tab0 AS cor0
----
70
7387
816

skipif mysql # not compatible
query I rowsort label-5030
SELECT cor0.col0 + CAST ( col0 AS INTEGER ) * col2 AS col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - col0 * col1 * + col1 AS col1 FROM tab0 cor0
----
-177504
-329315
-737009

query I rowsort
SELECT + - 19 AS col0 FROM tab2 AS cor0
----
-19
-19
-19

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0, tab2 cor1, tab2, tab0 AS cor2
----
3645 values hashing to 5ec52b92c3c8d78cc0a61df3fc16f18b

query I rowsort
SELECT 54 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

query I rowsort
SELECT DISTINCT + col1 + - tab2.col0 AS col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT DISTINCT - col1 + cor0.col1 AS col1 FROM tab1 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5037
SELECT - 91 DIV col1 AS col2 FROM tab1 AS cor0
----
-3
-7
-9

skipif mysql # not compatible
query I rowsort label-5037
SELECT - 91 / col1 AS col2 FROM tab1 AS cor0
----
-3
-7
-9

query I rowsort
SELECT ALL - col2 + + ( - col2 * col2 ) AS col0 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT cor0.col0 + ( 47 * col0 ) AS col0 FROM tab1 AS cor0
----
144
3072
3840

query I rowsort
SELECT ALL col1 + - 88 FROM tab1 AS cor0
----
-62
-75
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5041
SELECT + col0 DIV cor0.col1 AS col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-5041
SELECT + col0 / cor0.col1 AS col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT DISTINCT + col2 * + col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL tab1.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL - tab0.col0 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT - 62 AS col0 FROM tab1 AS cor0
----
-62
-62
-62

query I rowsort
SELECT + col2 + cor0.col0 * col2 AS col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT + 32 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
121
56
67

query I rowsort
SELECT - + col2 + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort
SELECT ALL - col1 * CAST ( 12 AS REAL ) + - col1 * - col2 * col2 AS col1 FROM tab0
----
-1067
610792
92622

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 98 col2 FROM tab2 AS cor0
----
-98
-98
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5051
SELECT ALL + col0 * + 11 + col0 * - tab1.col0 DIV tab1.col0 AS col1 FROM tab1
----
30
640
800

skipif mysql # not compatible
query I rowsort label-5051
SELECT ALL + col0 * + 11 + col0 * - tab1.col0 / tab1.col0 AS col1 FROM tab1
----
30
640
800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 91 col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0, tab1, tab0 AS cor1
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT ALL + 64 FROM tab0, tab0 AS cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5055
SELECT cor0.col2 - + col1 DIV col0 FROM tab1 AS cor0
----
46
57
96

skipif mysql # not compatible
query I rowsort label-5055
SELECT cor0.col2 - + col1 / col0 FROM tab1 AS cor0
----
46
57
96

query I rowsort
SELECT - cor0.col2 * - ( col0 ) + - 55 * - col1 AS col0 FROM tab0 AS cor0
----
12303
5370
5522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 47 col0 FROM tab1, tab0 AS cor0
----
47

query I rowsort
SELECT cor0.col1 FROM tab0, tab2 cor0, tab1, tab2 AS cor1
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT col1 * col0 + - col2 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5060
SELECT DISTINCT CAST( + ( cor0.col2 ) AS SIGNED ) / CAST( NULL AS SIGNED ) FROM tab1, tab2, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5060
SELECT DISTINCT CAST ( + ( cor0.col2 ) AS INTEGER ) / CAST ( NULL AS INTEGER ) FROM tab1, tab2, tab2 AS cor0
----
NULL

query I rowsort
SELECT tab1.col1 FROM tab1, tab2 cor0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT 56 * - col2 * col2 FROM tab2
----
-37856
-40824
-80864

query I rowsort
SELECT DISTINCT + ( 45 + col2 ) FROM tab2
----
71
72
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 44 * col1 col2 FROM tab2 AS cor0
----
1364
2596
748

query I rowsort
SELECT + - 17 * + col1 + - 74 * + col1 AS col1 FROM tab0 AS cor0
----
-7826
-8281
-8827

query I rowsort
SELECT + 80 + - col1 FROM tab1 AS cor0
----
54
67
70

query I rowsort
SELECT ALL col0 + cor0.col1 * 53 * + col2 FROM tab1 AS cor0
----
30274
66224
74415

query I rowsort
SELECT ALL - - col1 + col1 * + col0 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL col1 - col1 * + col1 FROM tab2
----
-272
-3422
-930

query I rowsort
SELECT ALL + col2 - + 96 * - tab2.col2 AS col0 FROM tab2
----
2522
2619
3686

query I rowsort
SELECT ( - col1 ) + - col2 + 17 FROM tab0
----
-102
-156
-81

query I rowsort
SELECT + col1 * 14 AS col1 FROM tab0
----
1204
1274
1358

query I rowsort
SELECT DISTINCT + col0 + col0 * - col0 FROM tab2
----
-42
-6006
-6162

query I rowsort
SELECT DISTINCT 24 - col0 AS col0 FROM tab0 AS cor0
----
-11
-65
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 - - col0 col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL col0 + + col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - + ( + col0 ) * - col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5078
SELECT - cor0.col2 + col1 DIV + ( - col2 + - col0 ) AS col2 FROM tab0 AS cor0
----
-3
-34
-82

skipif mysql # not compatible
query I rowsort label-5078
SELECT - cor0.col2 + col1 / + ( - col2 + - col0 ) AS col2 FROM tab0 AS cor0
----
-3
-34
-82

query I rowsort
SELECT ALL + col1 * + col2 * - cor0.col2 + col0 * - cor0.col1 FROM tab1 AS cor0
----
-120848
-33130
-75894

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 * 58 col1 FROM tab0
----
1392
2030
5162

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5081
SELECT - col0 - + CAST( + 70 AS SIGNED ) AS col2 FROM tab2
----
-148
-149
-77

skipif mysql # not compatible
query I rowsort label-5081
SELECT - col0 - + CAST ( + 70 AS INTEGER ) AS col2 FROM tab2
----
-148
-149
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5082
SELECT - col0 * CAST( col1 AS SIGNED ) + cor0.col1 FROM tab1 AS cor0
----
-1027
-52
-630

skipif mysql # not compatible
query I rowsort label-5082
SELECT - col0 * CAST ( col1 AS INTEGER ) + cor0.col1 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5083
SELECT - col2 * + CAST( NULL AS DECIMAL ) * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5083
SELECT - col2 * + CAST ( NULL AS REAL ) * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 24 FROM tab2 cor0
----
-24
-24
-24

onlyif mysql # use DIV operator for integer division
query I rowsort label-5085
SELECT ALL - + ( - col0 ) DIV cor0.col0 - col1 FROM tab2 AS cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-5085
SELECT ALL - + ( - col0 ) / cor0.col0 - col1 FROM tab2 AS cor0
----
-16
-30
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col2 ) * - col2 - ( - col2 ) col1 FROM tab0
----
1122
2
6806

query I rowsort
SELECT DISTINCT + col1 + - ( col0 ) AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL + + col1 * + col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL + 97 * col2 AS col0 FROM tab0 AS cor0
----
3201
7954
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5090
SELECT DISTINCT - CAST( col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-5090
SELECT DISTINCT - CAST ( col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT col2 AS col1 FROM tab1 WHERE NOT NULL IN ( tab1.col0 + - col1 )
----

query I rowsort
SELECT ALL + col2 + col1 * col1 - + col1 FROM tab1 WHERE ( NULL ) NOT IN ( col0 )
----

query I rowsort
SELECT col0 + col1 * tab2.col0 + - tab2.col2 * col0 FROM tab2
----
-1580
2652
35

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT ( NULL ) IN ( col0 / + col2 + + tab2.col1 * tab2.col2 )
----

query I rowsort
SELECT DISTINCT col1 + - col1 AS col1 FROM tab2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 + col0 - col0 col1 FROM tab2
----
-26
-27
-38

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL = - col1
----

query III rowsort
SELECT * FROM tab1 WHERE - col0 BETWEEN NULL AND ( NULL )
----

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT IN ( col2 - col0 )
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL IN ( col1 )
----

query I rowsort
SELECT DISTINCT + col1 * col0 * - col1 + - col1 FROM tab1
----
-13533
-2054
-6410

query I rowsort
SELECT col0 - - tab2.col1 AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT + col2 * col0 - col2 FROM tab1
----
108
3591
7584

query I rowsort
SELECT ALL tab2.col1 FROM tab2 WHERE NULL IN ( col2 * col1 - - col2 )
----

query I rowsort
SELECT - col0 + tab0.col1 AS col1 FROM tab0
----
2
62
62

query I rowsort
SELECT ALL col1 + col0 + - col0 AS col2 FROM tab0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5107
SELECT ALL col0 + col2 * col0 + + col1 DIV + col0 AS col0 FROM tab2
----
200
2106
3081

skipif mysql # not compatible
query I rowsort label-5107
SELECT ALL col0 + col2 * col0 + + col1 / + col0 AS col0 FROM tab2
----
200
2106
3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col2 col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT col0 + - col2 + col2 * - col0 AS col1 FROM tab2
----
-1976
-209
-2961

query I rowsort
SELECT - + col2 * - col2 AS col1 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT ALL + col0 + - col1 * + col1 FROM tab0 AS cor0
----
-7372
-8192
-9374

onlyif mysql # use DIV operator for integer division
query I rowsort label-5112
SELECT - col1 + cor0.col1 * col2 DIV + col0 AS col1 FROM tab2 AS cor0
----
-40
-9
88

skipif mysql # not compatible
query I rowsort label-5112
SELECT - col1 + cor0.col1 * col2 / + col0 AS col1 FROM tab2 AS cor0
----
-40
-9
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5113
SELECT + col1 * cor0.col2 DIV cor0.col0 FROM tab0 AS cor0
----
118
2
83

skipif mysql # not compatible
query I rowsort label-5113
SELECT + col1 * cor0.col2 / cor0.col0 FROM tab0 AS cor0
----
118
2
83

query I rowsort
SELECT ALL tab2.col0 * col1 + col2 FROM tab2
----
1381
244
4628

query I rowsort
SELECT ALL + + col0 * col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT + + col1 * col0 + - col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT ALL - col2 + cor0.col2 * col2 * col1 FROM tab2 AS cor0
----
22572
24510
39858

query I rowsort
SELECT - col2 FROM tab1 AS cor0 WHERE NULL <> NULL
----

query I rowsort
SELECT DISTINCT cor0.col0 * + col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT + col0 FROM tab2 AS cor0 WHERE NOT NULL <= NULL
----

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE NOT col1 * + col0 BETWEEN ( NULL ) AND ( NULL )
----

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT col1 <= NULL
----

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # use DIV operator for integer division
query I rowsort label-5124
SELECT + col0 * col1 DIV - col1 AS col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-5124
SELECT + col0 * col1 / - col1 AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT col0 FROM tab1 AS cor0 WHERE NOT ( NULL ) IN ( - col0 )
----

query I rowsort
SELECT - col2 * + col0 * + col0 + col2 AS col0 FROM tab1 AS cor0
----
-233415
-432
-614304

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + 94 col2 FROM tab2 AS cor0
----
101
172
173

query I rowsort
SELECT DISTINCT + + col2 + + 14 * col0 FROM tab0 AS cor0
----
1328
369
491

query I rowsort
SELECT + col0 + col1 * - col2 FROM tab1 AS cor0
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-5130
SELECT - col1 DIV col1 + - col2 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-5130
SELECT - col1 / col1 + - col2 FROM tab0 AS cor0
----
-2
-34
-83

query I rowsort
SELECT DISTINCT col1 + 42 * col1 AS col0 FROM tab2 AS cor0
----
1333
2537
731

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * ( + col1 ) col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT + col2 * 31 + col0 * - col2 + + 33 FROM tab2 cor0
----
-1189
-1791
681

query I rowsort
SELECT - col2 + 69 + + 26 * cor0.col0 AS col0 FROM tab2 AS cor0
----
2071
2085
224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + ( - 63 ) * - col2 col0 FROM tab2 cor0
----
1664
1728
2432

query I rowsort
SELECT - cor0.col0 + - col0 AS col2 FROM tab1 AS cor0
----
-128
-160
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 49 * - col0 col0 FROM tab1 AS cor0
----
-147
-3136
-3920

query I rowsort
SELECT col1 + + col2 * - col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT col0 * col2 + col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT + col2 * - 72 AS col0 FROM tab0 AS cor0
----
-2376
-5904
-72

query I rowsort
SELECT 82 AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT - tab2.col2 * + col0 AS col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL ( - cor0.col2 ) + col0 AS col1 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT - 74 * col2 FROM tab1 cor0
----
-3996
-4218
-7104

query I rowsort
SELECT - col0 * tab0.col2 FROM tab0 WHERE NOT ( NULL ) NOT BETWEEN NULL AND col0 * tab0.col1 - col0
----

query I rowsort
SELECT - col0 * col0 * + cor0.col1 AS col0 FROM tab1 cor0
----
-234
-40960
-83200

query I rowsort
SELECT col0 * + tab0.col2 FROM tab0 WHERE NULL IN ( tab0.col1 )
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL NOT IN ( + col2 + col0 / + col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col0 * 95 col0 FROM tab0
----
2256
3290
8366

query I rowsort
SELECT 5 * col0 FROM tab2
----
35
390
395

query I rowsort
SELECT - + col0 * col0 + col1 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT ALL + 73 + col1 FROM tab2
----
104
132
90

query I rowsort
SELECT ALL col1 * + col2 + col1 * col0 AS col0 FROM tab0
----
15561
3492
4902

query I rowsort
SELECT - - 66 * cor0.col1 + - 29 AS col2 FROM tab2 AS cor0
----
1093
2017
3865

query I rowsort
SELECT ALL + col1 * - col0 * 99 + col1 FROM tab2 AS cor0
----
-132940
-21452
-455539

onlyif mysql # use DIV operator for integer division
query I rowsort label-5156
SELECT DISTINCT - col0 DIV tab0.col0 AS col0 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-5156
SELECT DISTINCT - col0 / tab0.col0 AS col0 FROM tab0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5157
SELECT + col0 DIV col2 AS col1 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5157
SELECT + col0 / col2 AS col1 FROM tab1
----
0
0
1

query I rowsort
SELECT DISTINCT col0 * 31 - + 74 FROM tab1
----
19
1910
2406

query I rowsort
SELECT + col2 * 6 AS col0 FROM tab1 AS cor0
----
324
342
576

onlyif mysql # use DIV operator for integer division
query I rowsort label-5160
SELECT DISTINCT col0 + tab1.col1 - + tab1.col0 * col0 DIV tab1.col1 AS col0 FROM tab1
----
-335
-399
29

skipif mysql # not compatible
query I rowsort label-5160
SELECT DISTINCT col0 + tab1.col1 - + tab1.col0 * col0 / tab1.col1 AS col0 FROM tab1
----
-335
-399
29

query I rowsort
SELECT - tab0.col0 * + ( + col2 + + col2 ) FROM tab0
----
-14596
-1584
-70

query I rowsort
SELECT - + col0 * - 51 AS col0 FROM tab1 AS cor0
----
153
3264
4080

query I rowsort
SELECT DISTINCT ( 36 ) * tab2.col1 + - tab2.col2 AS col1 FROM tab2
----
1089
2098
574

query I rowsort
SELECT DISTINCT + 23 * col0 + - col0 AS col2 FROM tab0
----
1958
528
770

query I rowsort
SELECT col0 * + 76 + - col1 AS col0 FROM tab1
----
202
4854
6067

onlyif mysql # use DIV operator for integer division
query I rowsort label-5166
SELECT DISTINCT - + 99 + - 34 DIV - col0 AS col2 FROM tab1 AS cor0
----
-88
-99

skipif mysql # not compatible
query I rowsort label-5166
SELECT DISTINCT - + 99 + - 34 / - col0 AS col2 FROM tab1 AS cor0
----
-88
-99

query I rowsort
SELECT - 79 * cor0.col2 FROM tab1 AS cor0
----
-4266
-4503
-7584

query I rowsort
SELECT ALL + ( col1 ) + col1 * col0 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL 8 FROM tab0, tab2 AS cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

query I rowsort
SELECT + cor0.col1 * - col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + + cor0.col1 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT 43 + + ( + col1 ) * + col1 FROM tab0 AS cor0
----
7439
8324
9452

query I rowsort
SELECT DISTINCT + 34 * + col1 FROM tab0
----
2924
3094
3298

onlyif mysql # use DIV operator for integer division
query I rowsort label-5174
SELECT 13 DIV col0 - + 89 FROM tab2
----
-88
-89
-89

skipif mysql # not compatible
query I rowsort label-5174
SELECT 13 / col0 - + 89 FROM tab2
----
-88
-89
-89

query I rowsort
SELECT ALL - 59 * col2 FROM tab0
----
-1947
-4838
-59

query I rowsort
SELECT DISTINCT - col0 + + col1 AS col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT - col1 * + col1 + col2 - - cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
-544
597
967

query I rowsort
SELECT - col1 * ( col2 ) + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT + + col2 * + 94 + col1 FROM tab1 AS cor0
----
5102
5368
9037

onlyif mysql # use DIV operator for integer division
query I rowsort label-5180
SELECT + col2 DIV 6 + col1 * col2 - col1 DIV col1 FROM tab1 AS cor0
----
1263
1412
578

skipif mysql # not compatible
query I rowsort label-5180
SELECT + col2 / 6 + col1 * col2 - col1 / col1 FROM tab1 AS cor0
----
1263
1412
578

query I rowsort
SELECT ALL col1 * - col1 * + 26 AS col2 FROM tab1
----
-17576
-2600
-4394

query I rowsort
SELECT ALL + 92 * + col0 AS col0 FROM tab0
----
2208
3220
8188

query I rowsort
SELECT DISTINCT + tab1.col0 + 57 AS col1 FROM tab1, tab1 AS cor0
----
121
137
60

query I rowsort
SELECT DISTINCT - col2 * ( col1 ) + col2 * col0 + col1 FROM tab0 AS cor0
----
-1960
-73
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-5185
SELECT ALL + col2 DIV col0 + + col2 * - col1 + col1 * col0 FROM tab1 AS cor0
----
-1308
-207
70

skipif mysql # not compatible
query I rowsort label-5185
SELECT ALL + col2 / col0 + + col2 * - col1 + col1 * col0 FROM tab1 AS cor0
----
-1308
-207
70

query I rowsort
SELECT ALL - - col0 - col2 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT + - cor0.col0 * + col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col0 * col0 + - col0 AS col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT ALL col0 + col0 + col1 FROM tab0 AS cor0
----
134
167
269

query I rowsort
SELECT + - cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT ALL - col0 + col1 - col2 AS col2 FROM tab2 cor0
----
-100
-3
-45

query I rowsort
SELECT cor0.col0 - + col1 * - col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT + + col1 * col0 + col1 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT col2 * + col2 + col2 - col0 * col1 AS col0 FROM tab0
----
-1293
-3393
-942

onlyif mysql # use DIV operator for integer division
query I rowsort label-5195
SELECT DISTINCT - col1 * + col2 - col2 DIV - col1 FROM tab1
----
-1241
-1402
-565

skipif mysql # not compatible
query I rowsort label-5195
SELECT DISTINCT - col1 * + col2 - col2 / - col1 FROM tab1
----
-1241
-1402
-565

query I rowsort
SELECT DISTINCT cor0.col1 * - col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5197
SELECT DISTINCT + - col2 + - col0 * col2 DIV col0 FROM tab0 AS cor0
----
-164
-2
-66

skipif mysql # not compatible
query I rowsort label-5197
SELECT DISTINCT + - col2 + - col0 * col2 / col0 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT cor0.col2 * + col0 * - col0 + cor0.col1 * col1 - col0 * col2 FROM tab1 AS cor0
----
-237020
-621911
28

query I rowsort
SELECT DISTINCT - col1 * col0 + - col2 * col2 - - col2 AS col1 FROM tab2
----
-2749
-5252
-919

onlyif mysql # use DIV operator for integer division
query I rowsort label-5200
SELECT DISTINCT + col0 - col2 DIV - col0 FROM tab2
----
10
78
79

skipif mysql # not compatible
query I rowsort label-5200
SELECT DISTINCT + col0 - col2 / - col0 FROM tab2
----
10
78
79

query I rowsort
SELECT ALL + col2 + - tab2.col2 - + col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT col2 + col2 + - col2 AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL + col0 - + tab2.col2 * col2 AS col0 FROM tab2
----
-1365
-598
-722

onlyif mysql # use DIV operator for integer division
query I rowsort label-5204
SELECT col2 DIV - tab0.col2 + col2 col0 FROM tab0
----
0
32
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5204
SELECT col2 / - tab0.col2 + col2 col0 FROM tab0
----
0
32
81

query I rowsort
SELECT ALL - col1 * col0 - cor0.col1 FROM tab2 cor0
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT ( col2 ) + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT + + 72 * - col1 + col0 + - col0 * + col2 FROM tab1 AS cor0
----
-2031
-4304
-8536

query I rowsort
SELECT ALL - + col2 - col2 AS col1 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT - + cor0.col2 * col0 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - col1 + col0 * col0 + col0 * - col2 * col2 FROM tab2 AS cor0
----
-107852
-46703
-5085

query I rowsort
SELECT - ( col0 ) + - col0 * col2 FROM tab1 AS cor0
----
-165
-3712
-7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 33 * + col0 col1 FROM tab1 AS cor0
----
2112
2640
99

query I rowsort
SELECT DISTINCT + col1 * cor0.col0 + col1 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT col0 * + cor0.col2 + - col0 * - cor0.col2 + col0 * col1 AS col2 FROM tab2 AS cor0
----
595
7347
8658

query I rowsort
SELECT DISTINCT 57 * col1 * + col0 - cor0.col2 AS col2 FROM tab2 cor0
----
12342
262288
76513

onlyif mysql # use DIV operator for integer division
query I rowsort label-5216
SELECT ALL - col1 + col2 DIV + col0 FROM tab0 AS cor0
----
-85
-91
-97

skipif mysql # not compatible
query I rowsort label-5216
SELECT ALL - col1 + col2 / + col0 FROM tab0 AS cor0
----
-85
-91
-97

query I rowsort
SELECT ALL 38 * col2 AS col1 FROM tab0 AS cor0
----
1254
3116
38

query I rowsort
SELECT DISTINCT - col2 + col1 * col0 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT + 23 * - col0 AS col1 FROM tab2 AS cor0
----
-161
-1794
-1817

onlyif mysql # use DIV operator for integer division
query I rowsort label-5220
SELECT ALL + 89 + - tab1.col1 DIV + tab1.col0 FROM tab1
----
81
89
89

skipif mysql # not compatible
query I rowsort label-5220
SELECT ALL + 89 + - tab1.col1 / + tab1.col0 FROM tab1
----
81
89
89

query I rowsort
SELECT DISTINCT - ( + 94 ) * col2 + - col0 AS col2 FROM tab2
----
-2522
-2545
-3651

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 - 83 AS col0 FROM tab0
----
-83
-83
-83

query I rowsort
SELECT + 82 * - col2 FROM tab0 AS cor0
----
-2706
-6724
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5225
SELECT + col1 + col2 DIV col0 AS col1 FROM tab2
----
17
34
59

skipif mysql # not compatible
query I rowsort label-5225
SELECT + col1 + col2 / col0 AS col1 FROM tab2
----
17
34
59

query I rowsort
SELECT DISTINCT - + col1 + cor0.col2 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT 9 + col1 * col1 AS col0 FROM tab0 AS cor0
----
7405
8290
9418

query I rowsort
SELECT ALL - col2 * + col0 AS col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col0 * col1 + - cor0.col0 AS col2 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT ALL - ( col1 ) * - col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT - 41 * col0 + + col1 AS col2 FROM tab1 AS cor0
----
-2614
-3267
-97

query I rowsort
SELECT DISTINCT + + col0 * - col1 * 13 + col2 AS col2 FROM tab2 AS cor0
----
-17421
-2794
-59800

query I rowsort
SELECT ALL - col0 + col0 - col2 * cor0.col1 AS col2 FROM tab0 cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5234
SELECT ALL - - col0 DIV col0 AS col2 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5234
SELECT ALL - - col0 / col0 AS col2 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT - 63 + col0 FROM tab2 AS cor0
----
-56
15
16

query I rowsort
SELECT DISTINCT - 22 FROM tab1 AS cor0
----
-22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5237
SELECT - CAST( NULL AS SIGNED ) + - col0 + col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5237
SELECT - CAST ( NULL AS INTEGER ) + - col0 + col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + - col2 + + col0 AS col0 FROM tab0
----
24
35
89

query I rowsort
SELECT ALL - col1 * - col0 + ( 83 ) * + cor0.col2 AS col1 FROM tab2 AS cor0
----
2458
4497
6760

onlyif mysql # use DIV operator for integer division
query I rowsort label-5240
SELECT DISTINCT + - col2 + cor0.col2 DIV + col1 + col2 DIV col0 AS col0 FROM tab1 AS cor0
----
-34
-52
-88

skipif mysql # not compatible
query I rowsort label-5240
SELECT DISTINCT + - col2 + cor0.col2 / + col1 + col2 / col0 AS col0 FROM tab1 AS cor0
----
-34
-52
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5241
SELECT DISTINCT + col0 DIV - col2 AS col2 FROM tab1 cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-5241
SELECT DISTINCT + col0 / - col2 AS col2 FROM tab1 cor0
----
-1
0

query I rowsort
SELECT ALL col1 + - col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col2 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 17 + - col2 col2 FROM tab2 AS cor0
----
-10
-21
-9

query I rowsort
SELECT + - cor0.col0 + col0 * col2 * + col2 FROM tab1 AS cor0
----
207872
737200
8745

query I rowsort
SELECT DISTINCT + - col0 + - col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT + + cor1.col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
54
57
96

query I rowsort
SELECT DISTINCT tab2.col1 - + ( col0 ) AS col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL ( + 17 ) FROM tab0, tab0 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 col0 FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT DISTINCT 74 FROM tab1, tab1 cor0
----
74

query I rowsort
SELECT - col2 * col2 * ( col2 ) + col2 FROM tab2
----
-17550
-19656
-54834

query I rowsort
SELECT + cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5254
SELECT ALL + col2 * CAST( + col1 AS SIGNED ) FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-5254
SELECT ALL + col2 * CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5255
SELECT DISTINCT + - cor0.col2 DIV col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-5255
SELECT DISTINCT + - cor0.col2 / col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT DISTINCT - col2 + + col2 * col0 FROM tab0
----
34
7216
759

query I rowsort
SELECT DISTINCT 47 + + 12 AS col0 FROM tab1
----
59

query I rowsort
SELECT col0 + + cor0.col2 - col2 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5259
SELECT + col0 * col1 DIV - tab0.col2 col0 FROM tab0
----
-3395
-62
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5259
SELECT + col0 * col1 / - tab0.col2 col0 FROM tab0
----
-3395
-62
-98

query I rowsort
SELECT col1 + col0 * col2 * col2 AS col0 FROM tab1
----
207946
737293
8774

query I rowsort
SELECT + - 5 AS col2 FROM tab0 AS cor0
----
-5
-5
-5

query I rowsort
SELECT DISTINCT col0 + - col1 * col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL + - cor0.col1 * ( - col2 ) AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT 12 FROM tab1, tab2 AS cor0
----
12

query I rowsort
SELECT ALL + col1 * 60 + col1 AS col1 FROM tab0 AS cor0
----
5246
5551
5917

query I rowsort
SELECT ALL + 3 - col2 * + col1 AS col0 FROM tab1 AS cor0
----
-1245
-1401
-567

query I rowsort
SELECT - col1 - cor0.col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT + col0 - cor0.col1 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT DISTINCT + col1 + - col2 AS col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT + col1 + - col2 AS col2 FROM tab1
----
-28
-47
-83

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0 CROSS JOIN tab1, tab1 AS cor1
----
972 values hashing to a8481bfbfcb330825976c5896e54bc19

query I rowsort
SELECT ALL ( col2 ) * col0 AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL + + col1 * 89 * + col1 FROM tab2 AS cor0
----
25721
309809
85529

query I rowsort
SELECT + - ( col2 ) AS col2 FROM tab2 cor0
----
-26
-27
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5275
SELECT CAST( NULL AS SIGNED ) + cor0.col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5275
SELECT CAST ( NULL AS INTEGER ) + cor0.col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5276
SELECT + - col0 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5276
SELECT + - col0 / col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col1 AS REAL ) + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL ( col1 ) * - col0 + - cor0.col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT + 18 * + col0 FROM tab0 AS cor0
----
1602
432
630

query I rowsort
SELECT + + 67 - - col0 FROM tab1 AS cor0
----
131
147
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5281
SELECT - col2 + - col0 DIV + col1 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-5281
SELECT - col2 + - col0 / + col1 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - col2 + cor0.col1 * ( col2 ) * + col1 FROM tab0 AS cor0
----
244035
678960
9408

query I rowsort
SELECT tab1.col0 * - 3 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 8853737f589aafd40c7f6d3b3f2f7bfb

query I rowsort
SELECT DISTINCT - cor0.col2 + + col1 + + 29 FROM tab2 AS cor0
----
33
62
8

query I rowsort
SELECT DISTINCT cor0.col0 + - ( 28 ) * + col0 FROM tab1 AS cor0
----
-1728
-2160
-81

query I rowsort
SELECT ALL - col1 * col2 + col2 FROM tab2 AS cor0
----
-1508
-608
-810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 38 col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e8c064543bf0f2e57329db1bb0a411e3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5288
SELECT DISTINCT + cor0.col2 * CAST( NULL AS DECIMAL ) col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5288
SELECT DISTINCT + cor0.col2 * CAST ( NULL AS REAL ) col0 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5289
SELECT + - cor0.col2 DIV - cor0.col1 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5289
SELECT + - cor0.col2 / - cor0.col1 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT - 9 FROM tab2 cor0
----
-9
-9
-9

query I rowsort
SELECT 64 AS col1 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5292
SELECT col1 DIV col1 AS col2 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5292
SELECT col1 / col1 AS col2 FROM tab2 cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5293
SELECT + ( + col2 ) DIV + col2 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5293
SELECT + ( + col2 ) / + col2 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT + - 42 * col0 AS col0 FROM tab2 AS cor0
----
-294
-3276
-3318

onlyif mysql # use DIV operator for integer division
query I rowsort label-5295
SELECT + + ( - col1 ) * cor0.col0 DIV 47 FROM tab2 AS cor0
----
-28
-4
-97

skipif mysql # not compatible
query I rowsort label-5295
SELECT + + ( - col1 ) * cor0.col0 / 47 FROM tab2 AS cor0
----
-28
-4
-97

query I rowsort
SELECT ALL - col2 * - col2 * + 80 FROM tab0
----
537920
80
87120

onlyif mysql # use DIV operator for integer division
query I rowsort label-5297
SELECT ALL + tab2.col2 DIV - col1 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-5297
SELECT ALL + tab2.col2 / - col1 FROM tab2
----
-2
0
0

query I rowsort
SELECT + cor0.col0 * + 20 FROM tab0 AS cor0
----
1780
480
700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5299
SELECT ALL col1 * CAST( 51 AS SIGNED ) * col2 - cor0.col1 AS col2 FROM tab2 AS cor0
----
32929
42656
78175

skipif mysql # not compatible
query I rowsort label-5299
SELECT ALL col1 * CAST ( 51 AS INTEGER ) * col2 - cor0.col1 AS col2 FROM tab2 AS cor0
----
32929
42656
78175

query I rowsort
SELECT DISTINCT + col0 * ( + col0 * + col2 ) FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT DISTINCT + tab0.col2 AS col0 FROM tab0, tab0 cor0, tab1, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT ALL 85 AS col0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT - col1 * ( 63 + - col0 ) * 42 AS col1 FROM tab2
----
-72912
11424
37170

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - + col0 col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT + col1 - col1 AS col1 FROM tab0
----
0

query I rowsort
SELECT col1 - col1 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 - - col2 AS col0 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT ALL col0 * + 50 AS col0 FROM tab0
----
1200
1750
4450

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 ) col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT 90 * - col0 FROM tab0 AS cor0
----
-2160
-3150
-8010

query I rowsort
SELECT - - 75 * + col0 AS col2 FROM tab1 cor0
----
225
4800
6000

query I rowsort
SELECT + + 22 + col1 * - col1 AS col0 FROM tab0 AS cor0
----
-7374
-8259
-9387

query I rowsort
SELECT 30 * col0 FROM tab0 AS cor0
----
1050
2670
720

query I rowsort
SELECT - 2 AS col1 FROM tab2 AS cor0
----
-2
-2
-2

query I rowsort
SELECT + + col1 + + col1 AS col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT col2 + - col2 * + 95 FROM tab0 AS cor0
----
-3102
-7708
-94

query I rowsort
SELECT + 17 + + col1 AS col2 FROM tab1 AS cor0
----
27
30
43

query I rowsort
SELECT + col1 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT col2 + + col2 * col1 AS col0 FROM tab1
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-5320
SELECT cor0.col1 + + 90 DIV - 6 AS col0 FROM tab1, tab2 cor0
----
9 values hashing to 5cf176669ac7ede5ad220855df27577c

skipif mysql # not compatible
query I rowsort label-5320
SELECT cor0.col1 + + 90 / - 6 AS col0 FROM tab1, tab2 cor0
----
9 values hashing to 5cf176669ac7ede5ad220855df27577c

query I rowsort
SELECT col1 * - col1 * 95 + - 10 * col0 * ( + ( col0 ) ) AS col0 FROM tab1
----
-50460
-64310
-80055

query I rowsort
SELECT 14 * + col0 * ( col0 ) + + col1 FROM tab0
----
110985
17247
8150

onlyif mysql # use DIV operator for integer division
query I rowsort label-5323
SELECT - 97 - col1 DIV ( 11 ) FROM tab0
----
-104
-105
-105

skipif mysql # not compatible
query I rowsort label-5323
SELECT - 97 - col1 / ( 11 ) FROM tab0
----
-104
-105
-105

onlyif mysql # use DIV operator for integer division
query I rowsort label-5324
SELECT ALL col1 DIV col1 AS col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5324
SELECT ALL col1 / col1 AS col0 FROM tab2
----
1
1
1

query I rowsort
SELECT - - cor0.col1 + + col2 * + ( - col1 + col2 ) AS col1 FROM tab2 AS cor0
----
-77
-799
815

query I rowsort
SELECT + 14 * col2 AS col2 FROM tab1 AS cor0
----
1344
756
798

query I rowsort
SELECT ALL + - col2 + - col1 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT + col0 * col1 * col1 AS col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT - - col2 * + col2 + + 30 FROM tab0 cor0
----
1119
31
6754

query I rowsort
SELECT ALL - col2 * + 13 AS col1 FROM tab1 AS cor0
----
-1248
-702
-741

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + + ( - cor0.col2 ) * col0 col1 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT + - col2 * 29 FROM tab2 cor0
----
-1102
-754
-783

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5333
SELECT + col0 + - CAST( NULL AS SIGNED ) * - col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5333
SELECT + col0 + - CAST ( NULL AS INTEGER ) * - col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - cor0.col0 + - ( ( col2 ) ) * - col0 FROM tab0 cor0
----
0
7209
768

query I rowsort
SELECT tab2.col1 + + col0 * - col0 FROM tab2
----
-18
-6025
-6224

onlyif mysql # use DIV operator for integer division
query I rowsort label-5336
SELECT ALL tab1.col1 DIV col0 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-5336
SELECT ALL tab1.col1 / col0 FROM tab1
----
0
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 84 col1 FROM tab0, tab1, tab0 AS cor0
----
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-5338
SELECT + 34 DIV - col1 + + 35 FROM tab0
----
35
35
35

skipif mysql # not compatible
query I rowsort label-5338
SELECT + 34 / - col1 + + 35 FROM tab0
----
35
35
35

query I rowsort
SELECT ( col0 ) - + tab0.col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT - + col1 + cor0.col0 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + col0 + col0 * + col1 AS col1 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5342
SELECT ( - col1 * CAST( NULL AS SIGNED ) ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5342
SELECT ( - col1 * CAST ( NULL AS INTEGER ) ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( + ( col1 - + ( + 13 ) - - col0 ) ) + + col0 * + col2 + col2 FROM tab2 AS cor0
----
2178
241
3123

onlyif mysql # use DIV operator for integer division
query I rowsort label-5344
SELECT DISTINCT - CAST( + col2 AS SIGNED ) DIV - col0 - ( 32 ) FROM tab2 AS cor0
----
-29
-32

skipif mysql # not compatible
query I rowsort label-5344
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) / - col0 - ( 32 ) FROM tab2 AS cor0
----
-29
-32

query I rowsort
SELECT ALL 26 FROM tab2 cor0
----
26
26
26

query I rowsort
SELECT - ( - col1 ) + - cor0.col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col0 * - col0 + col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT ALL + 53 FROM tab1 AS cor0
----
53
53
53

query I rowsort
SELECT + 95 - 86 FROM tab2 AS cor0
----
9
9
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5350
SELECT DISTINCT + + CAST( col1 AS SIGNED ) * - col2 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5350
SELECT DISTINCT + + CAST ( col1 AS INTEGER ) * - col2 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + 84 + + ( + col2 ) FROM tab0 AS cor0
----
117
166
85

query I rowsort
SELECT - + col1 * col1 + + col0 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT 22 * + 61 FROM tab0, tab2 AS cor0
----
9 values hashing to eb2c51a93cb89d6f0ff9dc38eb58d3ff

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col2 + + col2 col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT + col0 + col2 * col0 + + ( - 79 ) AS col1 FROM tab1 AS cor0
----
3633
7681
86

query I rowsort
SELECT ALL + 35 + + col0 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
6119
6276
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 34 * + col0 col1 FROM tab1 AS cor0
----
102
2176
2720

query I rowsort
SELECT + 1 - col2 AS col2 FROM tab2 AS cor0
----
-25
-26
-37

onlyif mysql # use DIV operator for integer division
query I rowsort label-5359
SELECT DISTINCT + col0 + ( - col2 ) + - col2 DIV - ( cor0.col0 * + col1 ) col0 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5359
SELECT DISTINCT + col0 + ( - col2 ) + - col2 / - ( cor0.col0 * + col1 ) col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT - 44 * col1 + + col2 FROM tab2 AS cor0
----
-1337
-2570
-710

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 97b43fbe79eecd0bc6921392403b666d

query I rowsort
SELECT ALL + col1 + - 76 * col2 FROM tab1
----
-4078
-4322
-7283

onlyif mysql # use DIV operator for integer division
query I rowsort label-5363
SELECT col1 DIV 82 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5363
SELECT col1 / 82 FROM tab0
----
1
1
1

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 cor0, tab2 AS cor1, tab0 cor2
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT - col1 + col1 * - col2 + col0 AS col0 FROM tab1
----
-1181
-1427
-516

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5366
SELECT DISTINCT col0 / CAST( NULL AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-5366
SELECT DISTINCT col0 / CAST ( NULL AS INTEGER ) FROM tab0
----
NULL

query I rowsort
SELECT ALL - + col0 * - col0 + 92 AS col0 FROM tab0 AS cor0
----
1317
668
8013

query I rowsort
SELECT + col1 * + cor0.col0 + col1 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5369
SELECT CAST( NULL AS SIGNED ) / - col0 + + cor0.col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5369
SELECT CAST ( NULL AS INTEGER ) / - col0 + + cor0.col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + 71 FROM tab1 AS cor0
----
81
84
97

query I rowsort
SELECT + 49 * cor0.col0 AS col2 FROM tab0 AS cor0
----
1176
1715
4361

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - 37 + col0 * 78 col1 FROM tab2 AS cor0
----
-601
3901
5533

query I rowsort
SELECT - 64 * col0 * - col2 - + col1 AS col1 FROM tab1 AS cor0
----
10342
233462
491507

query I rowsort
SELECT col1 + + col1 * - col1 FROM tab2 AS cor0
----
-272
-3422
-930

onlyif mysql # use DIV operator for integer division
query I rowsort label-5375
SELECT col2 DIV col0 + + col1 + col2 * + 22 FROM tab1
----
1232
1264
2126

skipif mysql # not compatible
query I rowsort label-5375
SELECT col2 / col0 + + col1 + col2 * + 22 FROM tab1
----
1232
1264
2126

query I rowsort
SELECT DISTINCT 54 FROM tab2, tab1 AS cor0
----
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5377
SELECT ALL col1 * col0 + - col1 * col1 * + CAST( NULL AS SIGNED ) + col0 * - col1 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5377
SELECT ALL col1 * col0 + - col1 * col1 * + CAST ( NULL AS INTEGER ) + col0 * - col1 AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 * col2 + + ( - 31 * cor0.col1 ) AS col2 FROM tab1 cor0
----
-3559
-3722
-9619

query I rowsort
SELECT ALL col1 * - col0 + col0 + - ( + col0 * col2 ) FROM tab0 AS cor0
----
-15308
-2832
-3395

query I rowsort
SELECT ALL - + col1 + cor0.col1 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col1 * - cor0.col1 + col2 AS col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT - - col2 * col2 + 28 FROM tab0 AS cor0
----
1117
29
6752

query I rowsort
SELECT ALL 65 AS col0 FROM tab0 AS cor0
----
65
65
65

query I rowsort
SELECT ALL + 38 * - col2 FROM tab2 cor0
----
-1026
-1444
-988

query I rowsort
SELECT DISTINCT col1 + col0 + col1 FROM tab1 cor0
----
106
55
84

query I rowsort
SELECT DISTINCT - + col1 * - col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + - 20 + col2 AS col2 FROM tab0 AS cor0
----
-19
13
62

query I rowsort
SELECT - cor0.col2 + - col2 * col1 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT - ( - 95 ) * + tab0.col0 + 80 * 13 AS col0 FROM tab0
----
3320
4365
9495

query I rowsort
SELECT cor0.col2 * + 26 - - 84 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to 0267957ef9d618d1fb4b675ec761f7dc

onlyif mysql # use DIV operator for integer division
query I rowsort label-5391
SELECT - + col2 DIV 97 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5391
SELECT - + col2 / 97 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( - col0 ) + - col1 * col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL col1 * - col1 * + col0 FROM tab0 cor0
----
-177504
-329315
-737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab2, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + - 53 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to fee5c00ad71c23e23683a32c71fe6e7d

query I rowsort
SELECT + ( - 19 ) FROM tab1, tab2 AS cor0
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

query I rowsort
SELECT DISTINCT + 74 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col1 + - cor0.col2 col0 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT col1 * + col2 * col1 AS col1 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT ALL - 18 * col2 AS col1 FROM tab2
----
-468
-486
-684

query I rowsort
SELECT col2 * - 12 FROM tab1
----
-1152
-648
-684

query I rowsort
SELECT ALL - cor0.col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab2
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT ALL + col2 - + 14 * col2 FROM tab0 AS cor0
----
-1066
-13
-429

query I rowsort
SELECT cor0.col2 + col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - cor0.col1 * + col0 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 18 * 70 col2 FROM tab0 AS cor0
----
1260
1260
1260

query I rowsort
SELECT DISTINCT + ( col2 ) * + col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + ( + cor0.col0 ) * - col1 * ( + cor0.col1 ) AS col2 FROM tab2 cor0
----
-22831
-271518
-6727

query I rowsort
SELECT 44 * - col0 AS col1 FROM tab1
----
-132
-2816
-3520

query I rowsort
SELECT DISTINCT + 44 AS col1 FROM tab0
----
44

query I rowsort
SELECT ALL 14 AS col2 FROM tab1 AS cor0
----
14
14
14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5412
SELECT - cor0.col0 * CAST( NULL AS DECIMAL ) FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5412
SELECT - cor0.col0 * CAST ( NULL AS REAL ) FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + ( col1 ) * + ( col0 ) AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col2 * 85 * - col2 FROM tab0 cor0
----
-571540
-85
-92565

query I rowsort
SELECT + col0 * 31 FROM tab0 AS cor0
----
1085
2759
744

query I rowsort
SELECT ALL - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT DISTINCT - col2 * 47 FROM tab2
----
-1222
-1269
-1786

query I rowsort
SELECT DISTINCT - 26 AS col1 FROM tab1 AS cor0
----
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5419
SELECT DISTINCT + CAST( NULL AS SIGNED ) + col1 * + cor0.col1 * 15 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5419
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col1 * + cor0.col1 * 15 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + cor0.col0 * 87 FROM tab1 AS cor0
----
261
5568
6960

query I rowsort
SELECT DISTINCT + + cor0.col0 * 64 FROM tab0 AS cor0
----
1536
2240
5696

query I rowsort
SELECT + ( 57 ) * col0 FROM tab0 AS cor0
----
1368
1995
5073

onlyif mysql # use DIV operator for integer division
query I rowsort label-5423
SELECT ALL + col1 DIV - 28 FROM tab2 cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-5423
SELECT ALL + col1 / - 28 FROM tab2 cor0
----
-1
-2
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5424
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5424
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col1 + - ( col2 ) FROM tab0 AS cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5426
SELECT DISTINCT + + 55 DIV - col0 + col0 DIV ( col0 ) AS col0 FROM tab1 AS cor0
----
-17
1

skipif mysql # not compatible
query I rowsort label-5426
SELECT DISTINCT + + 55 / - col0 + col0 / ( col0 ) AS col0 FROM tab1 AS cor0
----
-17
1

query I rowsort
SELECT ALL ( col2 ) + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT col2 + col1 * col0 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL - 25 * col0 FROM tab1 AS cor0
----
-1600
-2000
-75

query I rowsort
SELECT - - ( - col1 ) + + col0 * + 5 * + 74 FROM tab0 AS cor0
----
12853
32839
8794

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab2 cor1, tab2 AS cor2
----
3645 values hashing to 1a92b418ae3c05ba566f88a890a407ae

query I rowsort
SELECT DISTINCT 13 * - col2 FROM tab1 AS cor0
----
-1248
-702
-741

query I rowsort
SELECT DISTINCT + ( - col2 ) + - ( - col0 ) FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + 98 * col1 FROM tab1 AS cor0
----
1274
2548
980

onlyif mysql # use DIV operator for integer division
query I rowsort label-5435
SELECT ALL + cor0.col1 * 82 + cor0.col1 DIV col0 FROM tab2 AS cor0
----
1394
2546
4838

skipif mysql # not compatible
query I rowsort label-5435
SELECT ALL + cor0.col1 * 82 + cor0.col1 / col0 FROM tab2 AS cor0
----
1394
2546
4838

query I rowsort
SELECT DISTINCT + col0 + - ( + 8 ) * + col1 FROM tab0 AS cor0
----
-639
-664
-741

query I rowsort
SELECT 59 * - col1 AS col2 FROM tab0
----
-5074
-5369
-5723

query I rowsort
SELECT ALL - 48 FROM tab2
----
-48
-48
-48

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5439
SELECT col1 * col2 + + col1 + col0 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5439
SELECT col1 * col2 + + col1 + col0 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + + col0 AS col0 FROM tab1
----
128
160
6

query I rowsort
SELECT DISTINCT - + col1 + - col2 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT + cor1.col0 - 10 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to c34cdd136d9780b6a264bc9103a4f845

query I rowsort
SELECT - + 99 * cor0.col0 + col2 AS col0 FROM tab2 AS cor0
----
-666
-7696
-7783

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + col1 * + col2 col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT - + col2 + + 44 AS col2 FROM tab2 AS cor0
----
17
18
6

query I rowsort
SELECT DISTINCT - col0 + col0 * - col1 * cor0.col1 AS col2 FROM tab2 AS cor0
----
-22910
-271596
-6734

query I rowsort
SELECT ALL col0 + + col1 AS col1 FROM tab2
----
137
38
96

query I rowsort
SELECT + col1 * + col0 + - tab2.col2 FROM tab2
----
1305
190
4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 47 col1 FROM tab2
----
47
47
47

query I rowsort
SELECT DISTINCT + 56 AS col0 FROM tab0, tab2, tab1 AS cor0
----
56

query I rowsort
SELECT ( + 14 ) + - col1 AS col2 FROM tab2 AS cor0
----
-17
-3
-45

query I rowsort
SELECT 56 * + 27 + col2 AS col0 FROM tab0
----
1513
1545
1594

query I rowsort
SELECT DISTINCT - 24 AS col2 FROM tab2, tab0 AS cor0
----
-24

query I rowsort
SELECT ALL - col0 + cor0.col1 * col2 FROM tab2 cor0
----
1456
567
830

query I rowsort
SELECT ALL 87 + - col2 FROM tab1 AS cor0
----
-9
30
33

query I rowsort
SELECT DISTINCT ( col1 ) - + col1 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT + col2 * 93 AS col2 FROM tab1 AS cor0
----
5022
5301
8928

query I rowsort
SELECT ALL col1 * - ( + col0 ) + 0 * + col1 + col0 * ( + col0 ) * - cor0.col2 FROM tab1 AS cor0
----
-234112
-564
-615440

onlyif mysql # use DIV operator for integer division
query I rowsort label-5459
SELECT - ( col0 ) DIV - tab2.col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-5459
SELECT - ( col0 ) / - tab2.col1 FROM tab2
----
0
1
4

query I rowsort
SELECT DISTINCT 2 - + col0 AS col0 FROM tab0
----
-22
-33
-87

query I rowsort
SELECT + 77 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT ALL tab1.col2 * + 21 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to c4b6d2322189d38c245c4892d7ddd3f4

query I rowsort
SELECT ALL col0 - col1 AS col0 FROM tab1
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col2 col2 FROM tab2
----
55
58
85

query I rowsort
SELECT + 65 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT ( - ( cor0.col2 ) ) FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT 66 * col0 + - col2 FROM tab1 AS cor0
----
144
4167
5184

query I rowsort
SELECT + ( + cor0.col0 ) - - col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - + col2 * - 92 AS col2 FROM tab1 AS cor0
----
4968
5244
8832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5470
SELECT ALL - + col1 * + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5470
SELECT ALL - + col1 * + CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col1 + - CAST ( - 30 AS REAL ) * - col1 AS col2 FROM tab1 AS cor0
----
-290
-377
-754

query I rowsort
SELECT ALL + cor0.col1 * cor0.col0 * col0 AS col0 FROM tab1 cor0
----
234
40960
83200

query I rowsort
SELECT DISTINCT + + col0 * 85 + - col2 AS col2 FROM tab2 AS cor0
----
568
6604
6677

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5474
SELECT + col0 + CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
128
160
6

skipif mysql # not compatible
query I rowsort label-5474
SELECT + col0 + CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT + + col0 * - col2 + col1 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT col2 + col1 - col2 AS col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT col0 - - 60 FROM tab1 cor0
----
124
140
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-5478
SELECT ALL + col2 DIV + col0 + col2 FROM tab2 AS cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-5478
SELECT ALL + col2 / + col0 + col2 FROM tab2 AS cor0
----
26
30
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5479
SELECT - 65 * tab1.col0 * + CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5479
SELECT - 65 * tab1.col0 * + CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 17 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 28cd5b4c959cb41fbc56389ab43d167e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5481
SELECT - + col1 * + col2 + + cor0.col1 * col2 - cor0.col0 DIV col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5481
SELECT - + col1 * + col2 + + cor0.col1 * col2 - cor0.col0 / col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT - + col2 + col2 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT + - col1 * - cor0.col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + + col2 * cor0.col2 + - col0 AS col0 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT ALL + col0 - + col1 * col2 AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL - col1 * col1 * col1 FROM tab0
----
-636056
-753571
-912673

query I rowsort
SELECT DISTINCT - 84 + + col0 * col0 FROM tab0 AS cor0
----
1141
492
7837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5488
SELECT ALL - ( col2 ) * col1 + - ( col2 * cor0.col1 ) + - 27 DIV + cor0.col1 FROM tab1 AS cor0
----
-1142
-2498
-2809

skipif mysql # not compatible
query I rowsort label-5488
SELECT ALL - ( col2 ) * col1 + - ( col2 * cor0.col1 ) + - 27 / + cor0.col1 FROM tab1 AS cor0
----
-1142
-2498
-2809

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - col1 col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL col0 + + col0 * + col1 AS col1 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT + 82 + - col2 AS col0 FROM tab2 AS cor0
----
44
55
56

query I rowsort
SELECT DISTINCT + cor0.col1 + col0 * col1 + ( col2 * - 77 ) AS col1 FROM tab1 AS cor0
----
-3739
-4054
-6339

query I rowsort
SELECT - col2 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - col0 * cor0.col1 * - col2 AS col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT ALL - col0 + - col1 AS col0 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT col0 + col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT col2 + 65 * - tab2.col1 AS col2 FROM tab2
----
-1067
-1988
-3809

query I rowsort
SELECT + + 25 FROM tab1 AS cor0
----
25
25
25

query I rowsort
SELECT - col0 * col1 * - col1 + - col0 AS col2 FROM tab2 AS cor0
----
22752
271440
6720

query I rowsort
SELECT ALL + cor0.col0 * col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - col1 + ( col0 ) * + cor0.col2 AS col2 FROM tab1 AS cor0
----
136
3638
7667

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5502
SELECT DISTINCT + cor0.col1 * CAST( NULL AS SIGNED ) + + col0 + col1 AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5502
SELECT DISTINCT + cor0.col1 * CAST ( NULL AS INTEGER ) + + col0 + col1 AS col2 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL + cor0.col0 * + col1 + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT col2 * - col2 + + col0 AS col1 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT ALL - col0 + - 49 * ( col1 ) AS col0 FROM tab0 AS cor0
----
-4238
-4548
-4788

query I rowsort
SELECT DISTINCT + 12 AS col2 FROM tab1, tab0 AS cor0
----
12

query I rowsort
SELECT ALL col0 + - ( - col1 ) FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col2 * - col1 + col0 col0 FROM tab0 AS cor0
----
167
2886
7640

onlyif mysql # use DIV operator for integer division
query I rowsort label-5509
SELECT DISTINCT + col1 + 80 + col0 DIV col2 FROM tab0 AS cor0
----
166
172
212

skipif mysql # not compatible
query I rowsort label-5509
SELECT DISTINCT + col1 + 80 + col0 / col2 FROM tab0 AS cor0
----
166
172
212

query I rowsort
SELECT - col1 + + 26 AS col0 FROM tab1 AS cor0
----
0
13
16

query I rowsort
SELECT DISTINCT - col2 * 13 * col1 AS col1 FROM tab0 AS cor0
----
-1261
-36894
-97006

onlyif mysql # use DIV operator for integer division
query I rowsort label-5512
SELECT col2 DIV col0 + + col1 * col1 + 46 FROM tab0 AS cor0
----
7443
8327
9455

skipif mysql # not compatible
query I rowsort label-5512
SELECT col2 / col0 + + col1 * col1 + 46 FROM tab0 AS cor0
----
7443
8327
9455

query I rowsort
SELECT ALL + cor0.col0 * - col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - col0 * + col0 + 61 FROM tab0 AS cor0
----
-1164
-515
-7860

query I rowsort
SELECT DISTINCT + col2 * - col1 + col0 + + cor0.col2 AS col1 FROM tab1 cor0
----
-1072
-1347
-449

onlyif mysql # use DIV operator for integer division
query I rowsort label-5516
SELECT DISTINCT col0 + - ( col2 ) DIV col1 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5516
SELECT DISTINCT col0 + - ( col2 ) / col1 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + cor0.col0 - 85 AS col0 FROM tab0 AS cor0
----
-50
-61
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5518
SELECT col2 / CAST( NULL AS SIGNED ) + + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5518
SELECT col2 / CAST ( NULL AS INTEGER ) + + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5519
SELECT - col2 * col2 DIV 12 + col0 + + ( - col2 + col2 * + col0 ) AS col2 FROM tab1 AS cor0
----
-132
3385
6896

skipif mysql # not compatible
query I rowsort label-5519
SELECT - col2 * col2 / 12 + col0 + + ( - col2 + col2 * + col0 ) AS col2 FROM tab1 AS cor0
----
-132
3385
6896

query I rowsort
SELECT + col0 + col0 * - col1 AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col1 * - col0 col2 FROM tab1
----
-36480
-4212
-99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5522
SELECT ALL + CAST( - col1 AS SIGNED ) + col0 * - 98 FROM tab1 AS cor0
----
-320
-6282
-7853

skipif mysql # not compatible
query I rowsort label-5522
SELECT ALL + CAST ( - col1 AS INTEGER ) + col0 * - 98 FROM tab1 AS cor0
----
-320
-6282
-7853

query I rowsort
SELECT + cor0.col0 * cor0.col1 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to aff311fa1b3948e179779cc03c1fade4

query I rowsort
SELECT - + 53 AS col2 FROM tab2 AS cor0
----
-53
-53
-53

query I rowsort
SELECT - - col0 * ( col0 ) + col1 AS col2 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT col0 + col1 + col2 FROM tab2
----
134
163
65

query I rowsort
SELECT col0 * 50 AS col1 FROM tab0
----
1200
1750
4450

query I rowsort
SELECT col0 * + tab0.col0 AS col2 FROM tab0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 85 col2 FROM tab2
----
85
85
85

query I rowsort
SELECT ALL 57 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT + - col1 + + cor0.col1 * + col2 AS col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL + 45 * - col1 AS col1 FROM tab2 AS cor0
----
-1395
-2655
-765

query I rowsort
SELECT + col0 + 54 AS col0 FROM tab2 AS cor0
----
132
133
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-5534
SELECT + cor0.col1 DIV 40 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-5534
SELECT + cor0.col1 / 40 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 37 col0 FROM tab2, tab1 AS cor0
----
37

query I rowsort
SELECT ALL 52 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT col2 * - 27 AS col0 FROM tab2
----
-1026
-702
-729

query I rowsort
SELECT ALL 30 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT - col0 - 52 * col0 FROM tab2 AS cor0
----
-371
-4134
-4187

onlyif mysql # use DIV operator for integer division
query I rowsort label-5540
SELECT ALL 80 DIV 42 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-5540
SELECT ALL 80 / 42 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5541
SELECT DISTINCT col1 DIV + col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5541
SELECT DISTINCT col1 / + col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT 14 FROM tab1, tab2 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT ALL + col1 * 48 + col1 + col2 FROM tab1 AS cor0
----
1328
547
733

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - col2 * - col1 + - cor0.col0 + + col1 * + col1 FROM tab0 AS cor0
----
10210
15654
9471

query I rowsort
SELECT col1 * - cor0.col1 * 81 AS col2 FROM tab1 AS cor0
----
-13689
-54756
-8100

query I rowsort
SELECT + 70 * cor0.col0 FROM tab0 cor0
----
1680
2450
6230

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5548
SELECT DISTINCT col0 + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5548
SELECT DISTINCT col0 + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * + col1 col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT col2 * ( cor0.col0 ) * - col0 AS col2 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT DISTINCT + + col1 - - col2 AS col0 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5552
SELECT - + col0 DIV col1 + - 38 * col2 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-107844
-283556
-3686

skipif mysql # not compatible
query I rowsort label-5552
SELECT - + col0 / col1 + - 38 * col2 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-107844
-283556
-3686

query I rowsort
SELECT - col1 * ( cor0.col0 ) - col2 * col2 FROM tab0 AS cor0
----
-14823
-3153
-3396

onlyif mysql # use DIV operator for integer division
query I rowsort label-5554
SELECT + col1 DIV + 55 - cor0.col0 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-5554
SELECT + col1 / + 55 - cor0.col0 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

query I rowsort
SELECT + 93 * col1 + cor0.col2 FROM tab1 cor0
----
1305
2472
987

query I rowsort
SELECT + col0 * + 90 + col1 AS col0 FROM tab2
----
661
7079
7127

query I rowsort
SELECT ALL + col1 + 56 FROM tab1 AS cor0
----
66
69
82

query I rowsort
SELECT DISTINCT cor1.col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
10
13
26

query I rowsort
SELECT DISTINCT + + col0 * col1 + col1 * 47 AS col0 FROM tab0 AS cor0
----
12376
6106
7954

onlyif mysql # use DIV operator for integer division
query I rowsort label-5560
SELECT ALL - 66 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5560
SELECT ALL - 66 / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + + col1 + col1 * col0 FROM tab1 AS cor0
----
104
1053
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 64 col2 FROM tab1 AS cor0
----
64
64
64

query I rowsort
SELECT DISTINCT + - col2 * - col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5564
SELECT CAST( NULL AS DECIMAL ) / + col1 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5564
SELECT CAST ( NULL AS REAL ) / + col1 AS col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5565
SELECT ALL CAST( NULL AS DECIMAL ) + + col0 - - tab2.col1 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5565
SELECT ALL CAST ( NULL AS REAL ) + + col0 - - tab2.col1 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 1 AS col1 FROM tab0, tab1, tab2 AS cor0
----
-1

query I rowsort
SELECT ALL - ( col0 ) - tab0.col0 FROM tab0
----
-178
-48
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 col0 FROM tab0
----
66
66
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-5569
SELECT DISTINCT col2 * col1 DIV + col2 - + col2 AS col2 FROM tab0 AS cor0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-5569
SELECT DISTINCT col2 * col1 / + col2 - + col2 AS col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL - + col1 * + col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL + col2 + col1 * 67 FROM tab2 cor0
----
1177
2104
3979

query I rowsort
SELECT ALL + + col0 + - col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - 59 FROM tab0 AS cor0
----
-59

query I rowsort
SELECT DISTINCT 62 * col1 - col2 AS col2 FROM tab0
----
5299
5560
6013

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5575
SELECT ( + col2 ) * - CAST( NULL AS SIGNED ) + 5 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-5575
SELECT ( + col2 ) * - CAST ( NULL AS INTEGER ) + 5 col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 col0 FROM tab1, tab0, tab2 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + col2 * - col1 + col0 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT ALL + col1 * col0 + 47 * - 65 FROM tab2
----
-1712
-2838
1547

query I rowsort
SELECT ALL - ( col1 ) + 75 * col1 AS col0 FROM tab2
----
1258
2294
4366

onlyif mysql # use DIV operator for integer division
query I rowsort label-5581
SELECT 45 DIV + col0 col0 FROM tab0
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5581
SELECT 45 / + col0 col0 FROM tab0
----
0
1
1

query I rowsort
SELECT col0 * + col2 + 65 FROM tab2
----
2093
254
3067

query I rowsort
SELECT DISTINCT col1 + cor0.col2 + col1 FROM tab0 AS cor0
----
195
205
264

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * col0 + ( 75 ) + - col1 col0 FROM tab2 AS cor0
----
-145
-2012
-2944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * cor0.col1 + col0 * - ( + col2 ) * 36 col0 FROM tab0 AS cor0
----
-21116
-254447
8149

query I rowsort
SELECT DISTINCT + cor2.col1 FROM tab2, tab0 cor0, tab0 AS cor1, tab1 cor2
----
10
13
26

query I rowsort
SELECT ALL + + col2 + - col0 AS col1 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT col1 + col2 * - col2 + col0 AS col0 FROM tab1
----
-2887
-3175
-9123

onlyif mysql # use DIV operator for integer division
query I rowsort label-5589
SELECT DISTINCT - col2 + tab2.col2 DIV - 45 AS col1 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-5589
SELECT DISTINCT - col2 + tab2.col2 / - 45 AS col1 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT + tab0.col1 + col0 + 57 AS col1 FROM tab0
----
167
189
237

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5591
SELECT ALL col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5591
SELECT ALL col0 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * - 2 AS col2 FROM tab0
----
-164
-2
-66

query I rowsort
SELECT ALL 16 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT DISTINCT - col2 * - col1 * 87 FROM tab2
----
133458
56202
72819

query I rowsort
SELECT + 71 + cor0.col0 * + col2 FROM tab1 AS cor0
----
233
3719
7751

query I rowsort
SELECT ALL + 6 - 0 FROM tab2 AS cor0
----
6
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5597
SELECT DISTINCT - ( + col0 ) DIV - cor0.col0 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-5597
SELECT DISTINCT - ( + col0 ) / - cor0.col0 FROM tab2 AS cor0
----
1

query I rowsort
SELECT DISTINCT + col1 + - col1 FROM tab2 cor0
----
0

query I rowsort
SELECT ALL col1 + ( + col2 ) AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + + 42 * col1 * col1 AS col1 FROM tab2 AS cor0
----
12138
146202
40362

query I rowsort
SELECT col1 * tab2.col0 + + ( - col2 ) FROM tab2
----
1305
190
4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + ( col0 ) * tab1.col1 col2 FROM tab1
----
1136
132
697

query I rowsort
SELECT col2 * + ( 14 ) + tab1.col1 * - ( col0 ) AS col1 FROM tab1
----
158
304
678

query I rowsort
SELECT - 84 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
-1428
-2604
-4956

onlyif mysql # use DIV operator for integer division
query I rowsort label-5605
SELECT 49 DIV 32 + col1 col1 FROM tab2
----
18
32
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5605
SELECT 49 / 32 + col1 col1 FROM tab2
----
18
32
60

query I rowsort
SELECT ALL ( + 59 ) * col0 - col1 FROM tab2
----
382
4543
4644

query I rowsort
SELECT + + col1 * - col0 + - col2 * col1 FROM tab2 AS cor0
----
-1054
-1989
-6136

query I rowsort
SELECT DISTINCT + + 93 + - col1 FROM tab1 AS cor0
----
67
80
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5609
SELECT DISTINCT - + CAST( NULL AS SIGNED ) / 82 + col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5609
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) / 82 + col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT col2 * + col2 + col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT ALL 86 * col0 FROM tab1 AS cor0
----
258
5504
6880

query I rowsort
SELECT DISTINCT + 37 * + col0 AS col1 FROM tab1 AS cor0
----
111
2368
2960

query I rowsort
SELECT - 34 * - col2 AS col2 FROM tab0 AS cor0
----
1122
2788
34

query I rowsort
SELECT ALL + - 30 * + 69 FROM tab2 AS cor0
----
-2070
-2070
-2070

query I rowsort
SELECT DISTINCT ( + col1 ) * cor0.col1 + - ( col1 ) * + col0 * 58 FROM tab2 AS cor0
----
-11625
-263435
-77605

query I rowsort
SELECT ALL - cor0.col0 * 60 AS col1 FROM tab2 AS cor0
----
-420
-4680
-4740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 63 col1 FROM tab1 AS cor0
----
63
63
63

query I rowsort
SELECT - - cor0.col0 * - 87 AS col2 FROM tab0 cor0
----
-2088
-3045
-7743

query I rowsort
SELECT ALL + 92 FROM tab1
----
92
92
92

query I rowsort
SELECT ALL + + col0 * col0 + col2 * ( - col1 * - cor0.col2 ) AS col0 FROM tab2 AS cor0
----
22648
30789
45968

onlyif mysql # use DIV operator for integer division
query I rowsort label-5621
SELECT ALL + 3 DIV + col0 AS col1 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5621
SELECT ALL + 3 / + col0 AS col1 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT ALL ( + 88 * + col1 + + ( + col2 ) ) AS col0 FROM tab0
----
7601
8090
8537

onlyif mysql # use DIV operator for integer division
query I rowsort label-5623
SELECT DISTINCT col1 DIV - tab0.col1 + + col1 DIV col0 AS col1 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5623
SELECT DISTINCT col1 / - tab0.col1 + + col1 / col0 AS col1 FROM tab0
----
0
1
2

query I rowsort
SELECT tab1.col0 * - col0 AS col1 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT ALL + col0 + + col0 * - ( + col1 ) * + col2 AS col2 FROM tab0
----
-3360
-664029
-68088

query I rowsort
SELECT - col1 * + col0 + - col2 FROM tab1 AS cor0
----
-1136
-132
-697

onlyif mysql # use DIV operator for integer division
query I rowsort label-5627
SELECT ALL + tab0.col2 DIV - col2 + - col0 * col0 AS col0 FROM tab0
----
-1226
-577
-7922

skipif mysql # not compatible
query I rowsort label-5627
SELECT ALL + tab0.col2 / - col2 + - col0 * col0 AS col0 FROM tab0
----
-1226
-577
-7922

query I rowsort
SELECT DISTINCT 5 * col0 FROM tab0
----
120
175
445

skipif mysql # not compatible
query I rowsort
SELECT col0 - - col2 * CAST ( - col2 * + col2 AS REAL ) FROM tab0 AS cor0
----
-35913
-551279
34

query I rowsort
SELECT DISTINCT + col1 - col2 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - col2 + col0 * ( col2 + col1 * col1 ) FROM tab2 AS cor0
----
25795
273520
6889

query I rowsort
SELECT DISTINCT + col0 + col0 + - col0 * 61 AS col0 FROM tab1
----
-177
-3776
-4720

onlyif mysql # use DIV operator for integer division
query I rowsort label-5633
SELECT DISTINCT - col2 * 97 DIV - ( + col0 * col0 + + col1 ) AS col2 FROM tab2 cor0
----
0
32

skipif mysql # not compatible
query I rowsort label-5633
SELECT DISTINCT - col2 * 97 / - ( + col0 * col0 + + col1 ) AS col2 FROM tab2 cor0
----
0
32

query I rowsort
SELECT DISTINCT col0 + ( - col2 ) * - col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - + col0 * + 64 + - col2 * + col0 AS col0 FROM tab2 AS cor0
----
-637
-7020
-8058

query I rowsort
SELECT ALL + + col1 - ( col2 ) FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT - col0 * + ( - col2 ) AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + cor0.col1 * - col2 + col2 FROM tab2 cor0
----
-1508
-608
-810

query I rowsort
SELECT + - col2 + + ( 80 + + col2 ) FROM tab0 AS cor0
----
80
80
80

query I rowsort
SELECT DISTINCT + col0 - ( + col2 + col1 ) AS col2 FROM tab0 AS cor0
----
-63
-84
-95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5641
SELECT DISTINCT col2 / + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5641
SELECT DISTINCT col2 / + CAST ( NULL AS REAL ) AS col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT - - col0 + 56 FROM tab2 cor0
----
134
135
63

query I rowsort
SELECT - cor0.col1 + 7 AS col2 FROM tab0 AS cor0
----
-79
-84
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 86 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab0, tab2 cor0, tab0 cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col1 FROM tab2, tab1, tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT - - col2 - - cor0.col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5648
SELECT - col2 DIV 73 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5648
SELECT - col2 / 73 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * - col0 + col0 FROM tab1 AS cor0
----
-4032
-6
-6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + + ( + col0 ) * - ( + col0 + - col1 ) col2 FROM tab2 AS cor0
----
-1508
-4936
141

query I rowsort
SELECT col0 + + 21 * col0 FROM tab2 cor0
----
154
1716
1738

query I rowsort
SELECT - - col1 + col1 * + cor0.col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT 97 + col0 AS col1 FROM tab2 AS cor0
----
104
175
176

query I rowsort
SELECT + col0 * + 50 FROM tab0 AS cor0
----
1200
1750
4450

query I rowsort
SELECT - + 36 + - col1 AS col2 FROM tab2 AS cor0
----
-53
-67
-95

query I rowsort
SELECT + - cor0.col1 + + cor0.col0 * + cor0.col2 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT - 76 FROM tab0, tab2 AS cor0
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

query I rowsort
SELECT col0 * + ( 55 ) FROM tab2
----
385
4290
4345

query I rowsort
SELECT col2 * - cor0.col1 * + col2 AS col2 FROM tab2 cor0
----
-22599
-24548
-39884

query I rowsort
SELECT - ( - col2 ) + col2 AS col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL + ( 65 ) AS col0 FROM tab2 AS cor0
----
65
65
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-5662
SELECT ALL - ( cor0.col2 ) DIV - col1 AS col2 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5662
SELECT ALL - ( cor0.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 col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT col1 * + cor0.col2 AS col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT - + col1 + + 84 FROM tab2 AS cor0
----
25
53
67

query I rowsort
SELECT - + 96 * + col1 AS col0 FROM tab0 AS cor0
----
-8256
-8736
-9312

query I rowsort
SELECT ALL + col2 * tab1.col1 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT 50 + col1 AS col2 FROM tab1 AS cor0
----
60
63
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5669
SELECT - col0 + CAST( NULL AS SIGNED ) * cor0.col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5669
SELECT - col0 + CAST ( NULL AS INTEGER ) * cor0.col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col0 * 83 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8a9e6de455cd4a1e9d5248cc1ec144f5

query I rowsort
SELECT - 49 * + col2 AS col1 FROM tab2
----
-1274
-1323
-1862

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5672
SELECT ALL - CAST( NULL AS DECIMAL ) * + 93 + cor0.col2 AS col0 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5672
SELECT ALL - CAST ( NULL AS REAL ) * + 93 + cor0.col2 AS col0 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL col0 + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + - col0 * 37 col1 FROM tab1 AS cor0
----
-137
-2378
-2973

query I rowsort
SELECT ALL 6 AS col1 FROM tab0 AS cor0
----
6
6
6

query I rowsort
SELECT DISTINCT + - ( col2 ) + + col1 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5677
SELECT DISTINCT + col0 * col2 * CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5677
SELECT DISTINCT + col0 * col2 * CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + + 9 FROM tab0 AS cor0
----
9

query I rowsort
SELECT ALL col0 - - col2 AS col1 FROM tab2
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5680
SELECT col2 + col1 * - col2 + - CAST( col0 AS SIGNED ) * tab0.col1 AS col1 FROM tab0
----
-15479
-3491
-4869

skipif mysql # not compatible
query I rowsort label-5680
SELECT col2 + col1 * - col2 + - CAST ( col0 AS INTEGER ) * tab0.col1 AS col1 FROM tab0
----
-15479
-3491
-4869

query I rowsort
SELECT - 62 + - col2 * - col2 + + 85 FROM tab0
----
1112
24
6747

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 - col2 col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT 14 * col2 - col2 FROM tab0
----
1066
13
429

query I rowsort
SELECT DISTINCT + col0 + + tab0.col2 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT tab1.col0 + + tab1.col0 + 34 AS col1 FROM tab1
----
162
194
40

query I rowsort
SELECT ALL + 70 * - cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9331fa328a33cb51db57a6eab5c870af

query I rowsort
SELECT DISTINCT 32 * - col0 + + 81 + 15 * + cor0.col1 AS col0 FROM tab0 cor0
----
-1402
416
603

query I rowsort
SELECT col0 * col2 + - col2 * - 74 * - col1 + ( + col1 * - col2 + - 77 ) FROM tab0 AS cor0
----
-212135
-552429
-7317

query I rowsort
SELECT ALL - + 68 AS col1 FROM tab2 AS cor0
----
-68
-68
-68

query I rowsort
SELECT DISTINCT + 90 * col0 FROM tab0 AS cor0
----
2160
3150
8010

query I rowsort
SELECT DISTINCT - 84 + + col1 * + 10 + - ( col2 ) FROM tab0 AS cor0
----
743
744
885

query I rowsort
SELECT DISTINCT + + cor0.col2 * + cor0.col2 + col1 FROM tab2 AS cor0
----
1461
735
760

onlyif mysql # use DIV operator for integer division
query I rowsort label-5693
SELECT col2 DIV + col1 + - ( col2 + col1 ) FROM tab2 AS cor0
----
-53
-58
-85

skipif mysql # not compatible
query I rowsort label-5693
SELECT col2 / + col1 + - ( col2 + col1 ) FROM tab2 AS cor0
----
-53
-58
-85

query I rowsort
SELECT - 87 + - col2 FROM tab0 AS cor0
----
-120
-169
-88

query I rowsort
SELECT col0 - tab2.col2 * - col2 * col2 AS col2 FROM tab2
----
17654
19690
54951

query I rowsort
SELECT + ( 89 ) - col2 * - col1 FROM tab0 AS cor0
----
186
2927
7551

query I rowsort
SELECT + cor0.col0 + - 48 * + col1 * col2 AS col2 FROM tab0 AS cor0
----
-136200
-358087
-4621

query I rowsort
SELECT ALL - 61 * - ( - col2 ) - - 23 AS col1 FROM tab1 AS cor0
----
-3271
-3454
-5833

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5699
SELECT DISTINCT CAST( NULL AS SIGNED ) - cor0.col0 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5699
SELECT DISTINCT CAST ( NULL AS INTEGER ) - cor0.col0 AS col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5700
SELECT cor1.col0 + CAST( NULL AS SIGNED ) + - cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5700
SELECT cor1.col0 + CAST ( NULL AS INTEGER ) + - cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL + 63 * ( - col2 ) FROM tab2 AS cor0
----
-1638
-1701
-2394

query I rowsort
SELECT ALL - - col2 * 15 AS col1 FROM tab2 AS cor0
----
390
405
570

query I rowsort
SELECT ALL - 46 FROM tab0 AS cor0
----
-46
-46
-46

query I rowsort
SELECT ALL + ( col2 ) * + col0 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT 67 * col1 FROM tab2 AS cor0
----
1139
2077
3953

query I rowsort
SELECT DISTINCT + cor0.col1 + 23 FROM tab1 AS cor0
----
33
36
49

query I rowsort
SELECT DISTINCT - cor0.col0 * col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col0 + + 11 AS col2 FROM tab1 cor0
----
14
75
91

query I rowsort
SELECT ( ( - col1 ) ) + + ( col2 ) AS col2 FROM tab2
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-5710
SELECT ALL - col1 * 95 DIV + col0 AS col2 FROM tab2 AS cor0
----
-20
-420
-71

skipif mysql # not compatible
query I rowsort label-5710
SELECT ALL - col1 * 95 / + col0 AS col2 FROM tab2 AS cor0
----
-20
-420
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + 31 * cor0.col2 AS col1 FROM tab2 cor0
----
1178
806
837

query I rowsort
SELECT + 57 + + col2 FROM tab1 AS cor0
----
111
114
153

query I rowsort
SELECT DISTINCT - 58 * - 34 + col1 FROM tab1 AS cor0
----
1982
1985
1998

query I rowsort
SELECT + - 83 + - 49 * col0 AS col2 FROM tab2 AS cor0
----
-3905
-3954
-426

query I rowsort
SELECT DISTINCT - + 81 + - col1 FROM tab2 AS cor0
----
-112
-140
-98

query I rowsort
SELECT ALL - 70 AS col1 FROM tab2 AS cor0
----
-70
-70
-70

query I rowsort
SELECT + + col2 * 42 FROM tab1 AS cor0
----
2268
2394
4032

query I rowsort
SELECT ALL - col1 * 21 AS col1 FROM tab2 AS cor0
----
-1239
-357
-651

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col1 * - col0 * + col0 col1 FROM tab0 AS cor0
----
118826
49569
720893

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5721
SELECT col0 + - ( - col1 ) / CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5721
SELECT col0 + - ( - col1 ) / CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col0 * col0 * col0 FROM tab1 AS cor0
----
-262144
-27
-512000

query I rowsort
SELECT DISTINCT + 78 * - 20 FROM tab2 AS cor0
----
-1560

query I rowsort
SELECT ALL col0 * col0 * + col1 AS col1 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT 17 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT ALL - cor0.col0 * col0 AS col1 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + 77 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
101
112
166

query I rowsort
SELECT + + 73 AS col1 FROM tab2 AS cor0
----
73
73
73

query I rowsort
SELECT col0 - + col1 * col1 AS col1 FROM tab0 AS cor0
----
-7372
-8192
-9374

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - col0 * + 81 col2 FROM tab2 cor0
----
-536
-6259
-6382

query I rowsort
SELECT 58 - col1 FROM tab0 AS cor0
----
-28
-33
-39

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 CROSS JOIN tab0 cor1
----
243 values hashing to 566180e0144350a78b0ef3318e8f4c00

onlyif mysql # use DIV operator for integer division
query I rowsort label-5733
SELECT + - col0 + - CAST( + 26 AS SIGNED ) DIV + cor0.col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-5733
SELECT + - col0 + - CAST ( + 26 AS INTEGER ) / + cor0.col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + col0 * col1 + col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL - + col2 + + 78 * + col2 AS col2 FROM tab1 AS cor0
----
4158
4389
7392

query I rowsort
SELECT col2 + + col1 * - col1 AS col1 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT - 84 + cor0.col2 + - 68 AS col0 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to ae51285c6f3b5e152a29ebf994c6339c

query I rowsort
SELECT DISTINCT + col0 * + ( col2 ) + + col2 AS col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT - 87 + + col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1335
-1491
-657

onlyif mysql # use DIV operator for integer division
query I rowsort label-5740
SELECT DISTINCT - 2 * col1 DIV + cor0.col2 AS col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5740
SELECT DISTINCT - 2 * col1 / + cor0.col2 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + cor0.col0 * + col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - 95 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

query I rowsort
SELECT 91 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT DISTINCT 62 AS col2 FROM tab1 cor0
----
62

query I rowsort
SELECT + 41 AS col2 FROM tab1 AS cor0
----
41
41
41

query I rowsort
SELECT + + 55 AS col2 FROM tab1 AS cor0
----
55
55
55

query I rowsort
SELECT + - ( col0 ) * 26 + - 70 + col0 FROM tab2 AS cor0
----
-2020
-2045
-245

query I rowsort
SELECT - ( + col2 ) * col0 * + 60 AS col0 FROM tab1
----
-218880
-460800
-9720

query I rowsort
SELECT ALL - 34 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 5b88331e40da4796cc4826c442aa45f7

query I rowsort
SELECT DISTINCT - 7 * col2 FROM tab0
----
-231
-574
-7

query I rowsort
SELECT - col0 * - col1 * + ( - ( col0 ) + + col0 ) AS col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5752
SELECT - col1 + ( + col1 ) DIV col0 FROM tab1 AS cor0
----
-10
-13
-18

skipif mysql # not compatible
query I rowsort label-5752
SELECT - col1 + ( + col1 ) / col0 FROM tab1 AS cor0
----
-10
-13
-18

query I rowsort
SELECT + - col2 * ( - 52 ) AS col1 FROM tab1 cor0
----
2808
2964
4992

query I rowsort
SELECT DISTINCT col2 * - col2 * + col1 AS col1 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT + 69 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

query I rowsort
SELECT 46 * - tab2.col2 AS col0 FROM tab2
----
-1196
-1242
-1748

query I rowsort
SELECT + ( - ( + col1 ) ) * ( - cor0.col0 * + col2 ) - 3 AS col0 FROM tab2 AS cor0
----
119649
51031
5856

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( ( col1 ) AS REAL ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) + col1 col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT + cor0.col2 + col2 AS col0 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-5761
SELECT + col1 + + col1 DIV - tab1.col0 col2 FROM tab1
----
10
13
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5761
SELECT + col1 + + col1 / - tab1.col0 col2 FROM tab1
----
10
13
18

query I rowsort
SELECT DISTINCT ( col1 * - col2 ) + - 91 FROM tab2
----
-1625
-737
-928

query I rowsort
SELECT 55 * 98 * - tab0.col1 AS col2 FROM tab0
----
-463540
-490490
-522830

query I rowsort
SELECT col2 * + ( - col1 ) AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + 65 * - 41 + + col1 FROM tab0 cor0
----
-2568
-2574
-2579

query I rowsort
SELECT ALL + - col0 * cor0.col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT + - col2 * cor0.col1 - + cor0.col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT DISTINCT - - ( col0 ) * col1 * ( - col0 ) FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT ALL - - col0 * col1 + col1 * - 43 FROM tab0 AS cor0
----
-1634
-776
4186

query I rowsort
SELECT DISTINCT - + col2 + 76 * + col1 AS col0 FROM tab1 cor0
----
1922
703
892

query I rowsort
SELECT 15 + col2 AS col2 FROM tab2 AS cor0
----
41
42
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5772
SELECT DISTINCT CAST( col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5772
SELECT DISTINCT CAST ( col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - ( col1 ) + + cor0.col2 + - col2 AS col0 FROM tab0 cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5774
SELECT - 87 * + col2 DIV col2 - - cor0.col1 * ( - col0 ) FROM tab1 AS cor0
----
-1127
-165
-727

skipif mysql # not compatible
query I rowsort label-5774
SELECT - 87 * + col2 / col2 - - cor0.col1 * ( - col0 ) FROM tab1 AS cor0
----
-1127
-165
-727

query I rowsort
SELECT DISTINCT - cor0.col2 + col0 AS col1 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5776
SELECT ALL + + 29 DIV + col0 - + ( - col1 ) FROM tab0 AS cor0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-5776
SELECT ALL + + 29 / + col0 - + ( - col1 ) FROM tab0 AS cor0
----
87
91
97

query I rowsort
SELECT - col1 * cor0.col2 + - col1 * col2 AS col1 FROM tab2 AS cor0
----
-1292
-1674
-3068

query I rowsort
SELECT DISTINCT col2 + col1 AS col2 FROM tab1 AS cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 78 col1 FROM tab0
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + + ( 42 ) * col2 FROM tab0 cor0
----
1386
3444
42

query I rowsort
SELECT + 99 * col0 FROM tab1 AS cor0
----
297
6336
7920

query I rowsort
SELECT ALL ( + 43 ) AS col1 FROM tab2
----
43
43
43

query I rowsort
SELECT DISTINCT - 58 * col2 AS col1 FROM tab0
----
-1914
-4756
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-5786
SELECT col2 * col1 DIV col1 col2 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5786
SELECT col2 * col1 / col1 col2 FROM tab0
----
1
33
82

query I rowsort
SELECT col2 - col1 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5788
SELECT 99 DIV - tab1.col0 AS col1 FROM tab1
----
-1
-1
-33

skipif mysql # not compatible
query I rowsort label-5788
SELECT 99 / - tab1.col0 AS col1 FROM tab1
----
-1
-1
-33

query I rowsort
SELECT DISTINCT col1 * + col0 * 96 - - col0 * - col2 * col1 FROM tab0
----
113386
130032
322525

query I rowsort
SELECT DISTINCT 19 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
19

query I rowsort
SELECT - 43 * + col1 + col1 * col2 - col1 AS col2 FROM tab1
----
130
260
676

query I rowsort
SELECT + + col1 * col1 - + col2 FROM tab1 cor0
----
43
622
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-5793
SELECT + col1 DIV cor0.col1 + + CAST( cor0.col0 AS SIGNED ) * col1 FROM tab2 AS cor0
----
1344
218
4603

skipif mysql # not compatible
query I rowsort label-5793
SELECT + col1 / cor0.col1 + + CAST ( cor0.col0 AS INTEGER ) * col1 FROM tab2 AS cor0
----
1344
218
4603

query I rowsort
SELECT + col0 + + col2 * 50 FROM tab1 AS cor0
----
2703
2914
4880

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5795
SELECT - + cor0.col0 - + col2 * CAST( - col1 * col1 AS SIGNED ) AS col1 FROM tab0 cor0
----
244044
678953
9374

skipif mysql # not compatible
query I rowsort label-5795
SELECT - + cor0.col0 - + col2 * CAST ( - col1 * col1 AS INTEGER ) AS col1 FROM tab0 cor0
----
244044
678953
9374

query I rowsort
SELECT 18 * col0 FROM tab2 AS cor0
----
126
1404
1422

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5797
SELECT 81 + col2 + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5797
SELECT 81 + col2 + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 15 * cor1.col2 + + cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 3bbc2b5c03a0285856833f8a0f9d92f0

query I rowsort
SELECT + col2 + ( - col2 + col1 ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + + col0 + 27 * col2 * - col1 FROM tab2 AS cor0
----
-17363
-22592
-41340

query I rowsort
SELECT DISTINCT - col0 * col1 + col0 * col0 FROM tab1 AS cor0
----
-69
3456
5360

query I rowsort
SELECT col1 + + cor0.col2 * + cor0.col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL cor0.col1 * col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + col0 + cor0.col1 * + cor0.col2 FROM tab1 AS cor0
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( ( col1 ) ) col2 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5806
SELECT + col0 * 8 + ( col1 ) DIV - col2 AS col1 FROM tab0
----
183
190
711

skipif mysql # not compatible
query I rowsort label-5806
SELECT + col0 * 8 + ( col1 ) / - col2 AS col1 FROM tab0
----
183
190
711

query I rowsort
SELECT DISTINCT - cor0.col1 * + 13 + col2 AS col0 FROM tab0 AS cor0
----
-1085
-1101
-1260

query I rowsort
SELECT - + col2 * - col0 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col2 + + 18 - - 59 AS col1 FROM tab0 cor0
----
-5
44
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-5810
SELECT + col1 DIV - col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-5810
SELECT + col1 / - col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT ALL cor0.col0 * + 23 + - 81 * + col1 * - col1 FROM tab0 AS cor0
----
599628
672808
762934

query I rowsort
SELECT ALL + - col2 + col2 * + col2 * - col1 FROM tab1 AS cor0
----
-119904
-32547
-75870

query I rowsort
SELECT DISTINCT col1 * - cor0.col0 * - col2 + cor0.col0 * 13 FROM tab2 AS cor0
----
120666
52061
5950

query I rowsort
SELECT - col2 * + 26 AS col2 FROM tab1 AS cor0
----
-1404
-1482
-2496

query I rowsort
SELECT col2 + - ( + col1 ) - - col1 AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT - tab0.col0 - ( 77 + - tab0.col2 ) FROM tab0
----
-111
-68
-84

query I rowsort
SELECT 68 + 61 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 418f1c817ef9b3406f572acab9f54796

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab0 AS cor1, tab0, tab0 cor2
----
3645 values hashing to db9b93cf4fdd5de4106f0487a66ce0a5

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) FROM tab1, tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - col2 * 66 + + 91 + + tab0.col1 FROM tab0
----
-2001
-5230
122

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 * - 70 * 28 + col2 col1 FROM tab0 AS cor0
----
160802
1961
64713

onlyif mysql # use DIV operator for integer division
query I rowsort label-5822
SELECT col2 DIV - 94 AS col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5822
SELECT col2 / - 94 AS col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL - 1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT DISTINCT 58 * + tab1.col1 FROM tab1
----
1508
580
754

query I rowsort
SELECT DISTINCT 28 - col1 AS col2 FROM tab2 cor0
----
-3
-31
11

query I rowsort
SELECT + - col0 + col0 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + ( + col1 ) + col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT tab0.col2 + col1 * - tab0.col2 AS col1 FROM tab0
----
-2805
-7380
-96

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

query I rowsort
SELECT DISTINCT - 1 AS col1 FROM tab2
----
-1

query I rowsort
SELECT - 15 + - col0 * + 45 FROM tab1 AS cor0
----
-150
-2895
-3615

query I rowsort
SELECT DISTINCT 63 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
63

query I rowsort
SELECT - - 33 FROM tab0 cor0
----
33
33
33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5834
SELECT ALL + + col0 + + col2 + + CAST( NULL AS SIGNED ) 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-5834
SELECT ALL + + col0 + + col2 + + CAST ( NULL AS INTEGER ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 20 * + col0 FROM tab0 AS cor0
----
1780
480
700

query I rowsort
SELECT - + col1 * col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5837
SELECT + + 10 * cor0.col2 * CAST( - 98 * col0 + col0 AS SIGNED ) FROM tab0 AS cor0
----
-33950
-7079060
-768240

skipif mysql # not compatible
query I rowsort label-5837
SELECT + + 10 * cor0.col2 * CAST ( - 98 * col0 + col0 AS INTEGER ) FROM tab0 AS cor0
----
-33950
-7079060
-768240

query I rowsort
SELECT DISTINCT - + cor0.col1 - + cor0.col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL - - col0 * cor0.col0 + col2 - col1 AS col2 FROM tab2 AS cor0
----
45
6051
6262

query I rowsort
SELECT ALL col0 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - - col0 + col1 * + ( + col2 + + col2 ) FROM tab2 AS cor0
----
1371
1681
3146

query I rowsort
SELECT + + col0 * - 4 AS col1 FROM tab2 cor0
----
-28
-312
-316

query I rowsort
SELECT ALL + col2 * + 40 + col0 FROM tab2 cor0
----
1087
1118
1599

query I rowsort
SELECT - 39 FROM tab0, tab1 AS cor0
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

query I rowsort
SELECT ALL - col1 + + 85 * cor0.col0 - col0 AS col0 FROM tab2 cor0
----
557
6493
6619

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5846
SELECT ALL - col0 + CAST( NULL AS SIGNED ) * 37 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-5846
SELECT ALL - col0 + CAST ( NULL AS INTEGER ) * 37 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor1.col2 FROM tab0, tab2 cor0, tab2 cor1
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-5848
SELECT DISTINCT col1 * col1 * col0 + + 23 DIV col0 FROM tab2
----
22831
271518
6730

skipif mysql # not compatible
query I rowsort label-5848
SELECT DISTINCT col1 * col1 * col0 + + 23 / col0 FROM tab2
----
22831
271518
6730

query I rowsort
SELECT - col1 * + col1 + - cor0.col1 FROM tab0 cor0
----
-7482
-8372
-9506

query I rowsort
SELECT 49 AS col2 FROM tab1, tab0 AS cor0, tab0 cor1, tab2 AS cor2
----
81 values hashing to e587c122dea39a2488ff88b884cea462

onlyif mysql # use DIV operator for integer division
query I rowsort label-5851
SELECT ALL + col2 DIV - col0 + col0 FROM tab1
----
-15
64
79

skipif mysql # not compatible
query I rowsort label-5851
SELECT ALL + col2 / - col0 + col0 FROM tab1
----
-15
64
79

query I rowsort
SELECT - ( + cor0.col2 ) + col1 * col0 + - ( - cor0.col2 ) * col0 AS col2 FROM tab1 AS cor0
----
186
4231
8624

query I rowsort
SELECT 38 * + 76 FROM tab0 cor0
----
2888
2888
2888

query I rowsort
SELECT ALL 31 * col0 AS col1 FROM tab2 cor0
----
217
2418
2449

onlyif mysql # use DIV operator for integer division
query I rowsort label-5855
SELECT DISTINCT - 30 DIV col0 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-5855
SELECT DISTINCT - 30 / col0 FROM tab0 AS cor0
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5856
SELECT DISTINCT - + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5856
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT cor0.col1 * + 95 FROM tab1 cor0
----
1235
2470
950

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * - col2 + col2 col2 FROM tab2 cor0
----
1560
684
864

query I rowsort
SELECT ALL + col0 * col1 + cor0.col2 AS col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT - 18 * col0 + + ( col2 ) + - col2 FROM tab1 AS cor0
----
-1152
-1440
-54

query I rowsort
SELECT ALL + col0 * - col0 * col2 AS col2 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT 27 + + col2 * ( col2 ) + - col2 AS col2 FROM tab0 cor0
----
1083
27
6669

query I rowsort
SELECT ALL - - 30 + - col2 * + ( + col0 ) AS col2 FROM tab2 AS cor0
----
-159
-1998
-2972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 58 col2 FROM tab2 cor0
----
58

query I rowsort
SELECT + + 86 AS col2 FROM tab2 AS cor0
----
86
86
86

query I rowsort
SELECT ALL + + ( cor0.col0 ) * col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5867
SELECT ALL - CAST( NULL AS SIGNED ) + 35 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5867
SELECT ALL - CAST ( NULL AS INTEGER ) + 35 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 0 * 90 + cor0.col2 AS col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT col1 + col1 * + col2 AS col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL - col1 * col0 + - col2 AS col2 FROM tab1
----
-1136
-132
-697

query I rowsort
SELECT 36 - + col2 FROM tab2
----
-2
10
9

query I rowsort
SELECT ALL ( + col0 ) + col0 FROM tab1
----
128
160
6

query I rowsort
SELECT - col0 * + ( 94 ) + col2 AS col2 FROM tab0
----
-2223
-3289
-8284

query I rowsort
SELECT - col0 * + 13 FROM tab2 AS cor0
----
-1014
-1027
-91

query I rowsort
SELECT DISTINCT 28 FROM tab2, tab0 cor0
----
28

query I rowsort
SELECT col0 * - cor0.col0 * col0 + col1 + + col1 * cor0.col0 FROM tab1 AS cor0
----
-261494
-510947
77

query I rowsort
SELECT ALL + col1 + 61 AS col1 FROM tab1 AS cor0
----
71
74
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - 15 col2 FROM tab0 AS cor0
----
20
74
9

query I rowsort
SELECT - + ( col0 ) * col2 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5880
SELECT - CAST( - col2 AS SIGNED ) * - col0 FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-5880
SELECT - CAST ( - col2 AS INTEGER ) * - col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL ( col2 ) + + col2 * ( 17 ) + col2 AS col1 FROM tab2 AS cor0
----
494
513
722

onlyif mysql # use DIV operator for integer division
query I rowsort label-5882
SELECT + 52 DIV + col1 + - col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-5882
SELECT + 52 / + col1 + - col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - col1 + + col2 * + col1 FROM tab0
----
0
2752
7371

query I rowsort
SELECT - + col2 + - cor0.col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT - col2 * col2 + - col0 AS col0 FROM tab1
----
-2919
-3313
-9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col1 col1 FROM tab2
----
137
38
96

query I rowsort
SELECT + - cor0.col1 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5888
SELECT DISTINCT + - col2 + - col2 DIV 78 FROM tab1 AS cor0
----
-54
-57
-97

skipif mysql # not compatible
query I rowsort label-5888
SELECT DISTINCT + - col2 + - col2 / 78 FROM tab1 AS cor0
----
-54
-57
-97

query I rowsort
SELECT + 71 + - col1 AS col2 FROM tab1 AS cor0
----
45
58
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-5890
SELECT - cor0.col2 DIV + cor0.col1 + cor0.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

skipif mysql # not compatible
query I rowsort label-5890
SELECT - cor0.col2 / + cor0.col1 + cor0.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT + col2 * 21 FROM tab0 AS cor0
----
1722
21
693

query I rowsort
SELECT DISTINCT - 18 AS col1 FROM tab0
----
-18

query I rowsort
SELECT + - cor0.col2 + + col1 * col2 * + col2 FROM tab2 AS cor0
----
22572
24510
39858

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5894
SELECT ALL col0 * col2 * CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5894
SELECT ALL col0 * col2 * CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 93 * + col2 * + 41 AS col2 FROM tab2
----
102951
144894
99138

onlyif mysql # use DIV operator for integer division
query I rowsort label-5896
SELECT + - col2 + cor0.col2 DIV - col2 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-5896
SELECT + - col2 + cor0.col2 / - col2 FROM tab1 AS cor0
----
-55
-58
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5897
SELECT - cor0.col1 DIV col0 AS col1 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-5897
SELECT - cor0.col1 / col0 AS col1 FROM tab2 AS cor0
----
-4
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5898
SELECT + col0 * col1 DIV + 43 AS col0 FROM tab2 AS cor0
----
107
31
5

skipif mysql # not compatible
query I rowsort label-5898
SELECT + col0 * col1 / + 43 AS col0 FROM tab2 AS cor0
----
107
31
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5899
SELECT DISTINCT + col1 DIV + 84 + - cor0.col0 * col0 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-5899
SELECT DISTINCT + col1 / + 84 + - cor0.col0 * col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - ( 65 ) AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - cor0.col2 ) col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT ( - 0 ) * col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT col2 * ( col1 ) FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ALL + 38 AS col2 FROM tab2 AS cor0
----
38
38
38

query I rowsort
SELECT ALL tab2.col0 * 68 AS col2 FROM tab2
----
476
5304
5372

onlyif mysql # use DIV operator for integer division
query I rowsort label-5906
SELECT tab1.col1 + col0 DIV tab1.col1 FROM tab1
----
16
19
26

skipif mysql # not compatible
query I rowsort label-5906
SELECT tab1.col1 + col0 / tab1.col1 FROM tab1
----
16
19
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5907
SELECT col0 + - ( tab1.col1 ) DIV + col2 AS col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-5907
SELECT col0 + - ( tab1.col1 ) / + col2 AS col0 FROM tab1
----
3
64
80

query I rowsort
SELECT - col1 * - col0 - tab1.col0 FROM tab1
----
576
75
960

query I rowsort
SELECT col2 + ( col0 ) FROM tab1
----
121
176
57

query I rowsort
SELECT ( - 15 ) AS col2 FROM tab0
----
-15
-15
-15

query I rowsort
SELECT - 74 * cor0.col1 FROM tab1 AS cor0
----
-1924
-740
-962

query I rowsort
SELECT ALL ( col0 ) * + col0 * - col0 FROM tab0
----
-13824
-42875
-704969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col1 col1 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col0 + col2 col1 FROM tab1
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 col1 FROM tab0 AS cor0
----
17
17
17

query I rowsort
SELECT ALL + 36 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 4d1892e880125dc90345721151acb22c

onlyif mysql # use DIV operator for integer division
query I rowsort label-5917
SELECT col1 DIV col1 + col1 + + col2 FROM tab0 cor0
----
120
174
99

skipif mysql # not compatible
query I rowsort label-5917
SELECT col1 / col1 + col1 + + col2 FROM tab0 cor0
----
120
174
99

query I rowsort
SELECT - col1 + col0 * 6 FROM tab1 AS cor0
----
-8
374
467

query I rowsort
SELECT - - 39 AS col2 FROM tab0 AS cor0
----
39
39
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-5920
SELECT + 61 + tab2.col0 * col0 DIV + col0 FROM tab2
----
139
140
68

skipif mysql # not compatible
query I rowsort label-5920
SELECT + 61 + tab2.col0 * col0 / + col0 FROM tab2
----
139
140
68

query I rowsort
SELECT 57 * - cor0.col2 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to d10c55a16d55d5a363430caea75bc93c

query I rowsort
SELECT DISTINCT + 28 AS col0 FROM tab1
----
28

query I rowsort
SELECT DISTINCT + ( + 35 ) AS col1 FROM tab0 AS cor0
----
35

query I rowsort
SELECT ALL - - ( + 82 ) AS col1 FROM tab1 AS cor0
----
82
82
82

query I rowsort
SELECT DISTINCT - - col2 + + col1 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + 65 + - col2 * + col1 FROM tab0 cor0
----
-2773
-32
-7397

query I rowsort
SELECT col1 * col0 + col2 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL + col0 + + col1 AS col1 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col1 col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - + col0 * col0 + - 85 * + ( - col2 + + 28 ) AS col1 FROM tab2 AS cor0
----
-134
-5391
-6254

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col1 * ( + col1 ) col2 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT DISTINCT + 65 + + col0 * + col0 FROM tab0 AS cor0
----
1290
641
7986

onlyif mysql # use DIV operator for integer division
query I rowsort label-5933
SELECT DISTINCT + + col1 * cor0.col2 DIV col0 FROM tab1 AS cor0
----
15
468
8

skipif mysql # not compatible
query I rowsort label-5933
SELECT DISTINCT + + col1 * cor0.col2 / col0 FROM tab1 AS cor0
----
15
468
8

query I rowsort
SELECT ALL + + 47 * + col1 + cor0.col0 FROM tab2 AS cor0
----
1464
2851
878

query I rowsort
SELECT DISTINCT col1 - col1 * col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT - col2 + - ( col0 ) FROM tab0
----
-171
-36
-57

query I rowsort
SELECT ALL + + 18 AS col0 FROM tab1 AS cor0
----
18
18
18

query I rowsort
SELECT ALL cor0.col2 * cor0.col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT col1 * - col1 + + 78 FROM tab1 AS cor0
----
-22
-598
-91

query I rowsort
SELECT ALL ( - col1 ) * col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + col1 + + col0 + + col0 FROM tab1 AS cor0
----
138
173
32

query I rowsort
SELECT ALL - col0 + - ( 56 ) AS col0 FROM tab1 AS cor0
----
-120
-136
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5943
SELECT - + col2 DIV + col2 + col1 DIV - col1 FROM tab0 AS cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-5943
SELECT - + col2 / + col2 + col1 / - col1 FROM tab0 AS cor0
----
-2
-2
-2

query I rowsort
SELECT col0 * col0 + - ( - cor0.col2 ) + col2 FROM tab1 AS cor0
----
117
4210
6592

query I rowsort
SELECT + + col0 + - col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - + col0 + ( col2 ) * col2 AS col1 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT ALL - + cor0.col1 * - 62 + col0 + col0 AS col0 FROM tab2 AS cor0
----
1212
1936
3814

query I rowsort
SELECT + tab2.col2 * col1 AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT - ( - col2 ) * - col2 * 4 FROM tab1
----
-11664
-12996
-36864

query I rowsort
SELECT DISTINCT - 77 * col0 FROM tab2
----
-539
-6006
-6083

query I rowsort
SELECT + cor0.col1 * ( + cor0.col0 ) FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT col2 + - col1 * col1 AS col2 FROM tab1 cor0
----
-43
-622
-73

query I rowsort
SELECT ALL - col1 + - ( + col2 * col1 ) FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL - col2 + + col2 * 86 FROM tab1 AS cor0
----
4590
4845
8160

onlyif mysql # use DIV operator for integer division
query I rowsort label-5955
SELECT ALL - col2 - 18 DIV + cor0.col1 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-5955
SELECT ALL - col2 - 18 / + cor0.col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - - 95 + - 8 FROM tab2 AS cor0
----
87
87
87

query I rowsort
SELECT DISTINCT 48 AS col2 FROM tab1, tab0 AS cor0
----
48

query I rowsort
SELECT + ( + ( col0 - + col2 - col0 - col0 ) ) + col1 + ( col0 + - col2 ) FROM tab2 AS cor0
----
-23
-59
7

query I rowsort
SELECT DISTINCT - + 61 * - col1 FROM tab0 AS cor0
----
5246
5551
5917

query I rowsort
SELECT col0 + + col0 + - col0 * col2 AS col0 FROM tab0
----
-7120
-744
35

query I rowsort
SELECT - - 32 FROM tab1 cor0
----
32
32
32

query I rowsort
SELECT - + 12 * + col0 + col2 FROM tab0 AS cor0
----
-255
-419
-986

query I rowsort
SELECT + col2 + 0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - ( 40 ) * - col0 FROM tab2 AS cor0
----
280
3120
3160

query I rowsort
SELECT ALL - col1 * col0 + - col1 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL - col0 + + ( col1 ) * 92 * + 23 FROM tab2 AS cor0
----
124766
35893
65589

query I rowsort
SELECT + - 72 * cor0.col0 * + col2 AS col2 FROM tab1 AS cor0
----
-11664
-262656
-552960

query I rowsort
SELECT ALL + col0 * tab1.col0 + col2 + col1 FROM tab1
----
4163
6509
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5969
SELECT ALL col1 * - col2 + col1 DIV + col1 FROM tab0
----
-2837
-7461
-96

skipif mysql # not compatible
query I rowsort label-5969
SELECT ALL col1 * - col2 + col1 / + col1 FROM tab0
----
-2837
-7461
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5970
SELECT DISTINCT col1 + ( col2 ) DIV col2 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-5970
SELECT DISTINCT col1 + ( col2 ) / col2 FROM tab0
----
87
92
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - ( + col0 ) col2 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT + cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL + - col1 + 62 FROM tab2 cor0
----
3
31
45

query I rowsort
SELECT ALL + col0 * col1 + col0 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5975
SELECT + CAST( + col0 AS SIGNED ) FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5975
SELECT + CAST ( + col0 AS INTEGER ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT col1 + - col2 * + col1 AS col0 FROM tab1 AS cor0
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5977
SELECT - CAST( 9 AS SIGNED ) AS col2 FROM tab2 cor0
----
-9
-9
-9

skipif mysql # not compatible
query I rowsort label-5977
SELECT - CAST ( 9 AS INTEGER ) AS col2 FROM tab2 cor0
----
-9
-9
-9

query I rowsort
SELECT - + 81 + + col2 * col0 + + col2 FROM tab2 AS cor0
----
135
1973
2959

query I rowsort
SELECT DISTINCT + 8 FROM tab1 cor0
----
8

query I rowsort
SELECT ALL - ( col0 ) * ( 9 ) - + tab1.col0 AS col1 FROM tab1
----
-30
-640
-800

query I rowsort
SELECT - col2 * tab0.col0 * + 62 FROM tab0
----
-2170
-452476
-49104

query I rowsort
SELECT DISTINCT + + col0 * - col0 + col1 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT - tab2.col0 * col1 AS col0 FROM tab2
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + col0 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col0 * - col2 - - col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL + ( col1 ) * - 8 + ( col1 ) AS col1 FROM tab0
----
-602
-637
-679

query I rowsort
SELECT - col2 * col0 + - col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL tab2.col2 - cor1.col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to aeacae5af20bd0633e30a28372b3b085

query I rowsort
SELECT DISTINCT + + col1 * col2 + col0 AS col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + col2 - ( ( cor0.col1 ) ) AS col0 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5991
SELECT ALL - col1 DIV col2 + col2 * col0 FROM tab1
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-5991
SELECT ALL - col1 / col2 + col2 * col0 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5992
SELECT - col0 DIV + 75 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5992
SELECT - col0 / + 75 FROM tab1
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 - 10 * + col2 * col1 col1 FROM tab1 AS cor0
----
-12400
-14037
-5636

query I rowsort
SELECT DISTINCT + + cor0.col0 + 9 * - col0 * col2 AS col0 FROM tab1 AS cor0
----
-1455
-32768
-69040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5995
SELECT ALL - col1 * - CAST( 49 AS SIGNED ) FROM tab2 AS cor0
----
1519
2891
833

skipif mysql # not compatible
query I rowsort label-5995
SELECT ALL - col1 * - CAST ( 49 AS INTEGER ) FROM tab2 AS cor0
----
1519
2891
833

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5996
SELECT + - col0 - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5996
SELECT + - col0 - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 - + ( - col0 ) FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT col0 FROM tab2 WHERE NOT NULL = col2 - col1
----

query I rowsort
SELECT DISTINCT - tab0.col1 * + tab0.col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - + col0 * + col1 + - col1 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL BETWEEN col2 AND NULL
----

query I rowsort
SELECT DISTINCT col2 FROM tab2 WHERE NOT col2 NOT IN ( tab2.col2 - + col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6003
SELECT + tab1.col1 DIV col0 + + tab1.col1 col2 FROM tab1
----
10
13
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6003
SELECT + tab1.col1 / col0 + + tab1.col1 col2 FROM tab1
----
10
13
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab1, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT col0 * + col2 * + col0 + - col2 AS col2 FROM tab1 AS cor0
----
233415
432
614304

onlyif mysql # use DIV operator for integer division
query I rowsort label-6006
SELECT tab1.col2 DIV col2 + col2 * col1 FROM tab1
----
1249
1405
571

skipif mysql # not compatible
query I rowsort label-6006
SELECT tab1.col2 / col2 + col2 * col1 FROM tab1
----
1249
1405
571

query I rowsort
SELECT DISTINCT - col2 + - col2 * + tab0.col1 * col0 FROM tab0
----
-3396
-664200
-68145

query I rowsort
SELECT ALL - tab2.col2 * - col0 FROM tab2 WHERE ( + col2 ) IN ( + col1 * col2 )
----

query III rowsort
SELECT * FROM tab1 WHERE NOT ( col0 ) <= NULL
----

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2, tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - tab0.col2 * tab0.col0 * - col2 FROM tab0
----
26136
35
598436

query I rowsort
SELECT - tab1.col2 * + col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + col1 + - col2 * cor0.col0 * - col1 AS col2 FROM tab0 AS cor0
----
3492
664209
68198

onlyif mysql # use DIV operator for integer division
query I rowsort label-6014
SELECT ALL - col0 - col2 DIV + col2 AS col0 FROM tab1 cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-6014
SELECT ALL - col0 - col2 / + col2 AS col0 FROM tab1 cor0
----
-4
-65
-81

query I rowsort
SELECT DISTINCT + + col0 + - col0 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT col0 + col2 * + col1 - - cor0.col1 FROM tab0 AS cor0
----
229
2948
7642

query I rowsort
SELECT col0 * + col1 * + col2 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT DISTINCT col1 * col2 * tab1.col1 AS col1 FROM tab1
----
16224
36504
5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col2 * + col2 * + 81 + + col2 + col0 * tab1.col0 col2 FROM tab1
----
236259
267322
752992

query I rowsort
SELECT col0 * + 32 AS col2 FROM tab2 cor0
----
224
2496
2528

query I rowsort
SELECT + col1 * cor0.col1 * - col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT DISTINCT tab0.col0 * - col0 AS col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT + - col0 * + col0 * - col2 FROM tab2 cor0
----
1323
158184
237158

query I rowsort
SELECT + col2 * 81 FROM tab2 AS cor0
----
2106
2187
3078

query I rowsort
SELECT ALL col1 * - 72 * ( + col0 ) FROM tab2 AS cor0
----
-15624
-331344
-96696

query I rowsort
SELECT DISTINCT + + cor0.col0 * + 12 FROM tab2 AS cor0
----
84
936
948

query I rowsort
SELECT - 89 * - 8 FROM tab0, tab0 cor0, tab2 cor1
----
27 values hashing to 12beb52dbe2912f13226783a560ad60d

query I rowsort
SELECT + col0 + + tab0.col1 + col0 AS col0 FROM tab0
----
134
167
269

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col2 col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT col0 * - col1 * + col1 + col1 FROM tab0
----
-177418
-329218
-736918

query I rowsort
SELECT ALL + col0 * + col2 AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT - col1 * col2 AS col2 FROM tab2 WHERE NOT ( NULL ) <= ( NULL )
----

query I rowsort
SELECT DISTINCT + col2 * col0 * + col0 FROM tab1
----
233472
486
614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-6034
SELECT DISTINCT + col0 DIV col0 + col2 + + col1 * - col1 col2 FROM tab2
----
-250
-3454
-933

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6034
SELECT DISTINCT + col0 / col0 + col2 + + col1 * - col1 col2 FROM tab2
----
-250
-3454
-933

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col1 * - col2 col1 FROM tab2
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-6036
SELECT ALL col0 DIV col1 - + col0 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6036
SELECT ALL col0 / col1 - + col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT - col2 * col2 * col0 + - col1 AS col2 FROM tab2 WHERE NULL <= ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 + - col0 col2 FROM tab2
----
-19
-62
24

query I rowsort
SELECT DISTINCT - col0 * + col0 * col0 FROM tab1
----
-262144
-27
-512000

query I rowsort
SELECT + col0 + + col1 FROM tab0 WHERE NOT NULL <> col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + col1 col0 FROM tab0
----
2
62
62

query I rowsort
SELECT DISTINCT + col0 + col2 * col2 AS col1 FROM tab1 WHERE ( NULL ) <= NULL
----

query I rowsort
SELECT + tab2.col1 * col2 + col0 AS col2 FROM tab2
----
1612
725
844

query I rowsort
SELECT + col2 + + col0 * col0 AS col1 FROM tab1
----
4153
63
6496

onlyif mysql # use DIV operator for integer division
query I rowsort label-6045
SELECT ALL + col2 * col2 + + col1 DIV col1 AS col2 FROM tab2
----
1445
677
730

skipif mysql # not compatible
query I rowsort label-6045
SELECT ALL + col2 * col2 + + col1 / col1 AS col2 FROM tab2
----
1445
677
730

query I rowsort
SELECT tab2.col0 * col1 + + col2 FROM tab2
----
1381
244
4628

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT + col1 NOT IN ( + col0 * col2 * tab1.col2 )
----

query I rowsort
SELECT tab1.col0 + + col0 * + col0 AS col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT tab1.col2 + - col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT ALL tab2.col1 + col1 - + col0 AS col2 FROM tab2
----
-45
40
55

query I rowsort
SELECT + tab0.col2 * col0 AS col0 FROM tab0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6052
SELECT ALL + tab1.col1 * - col0 DIV + col0 FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-6052
SELECT ALL + tab1.col1 * - col0 / + col0 FROM tab1
----
-10
-13
-26

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( NULL ) = NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( NULL ) > - col2
----

query I rowsort
SELECT ALL + 99 + - col0 FROM tab2
----
20
21
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-6056
SELECT ALL - 32 + col1 * ( + col0 ) DIV + col1 FROM tab2
----
-25
46
47

skipif mysql # not compatible
query I rowsort label-6056
SELECT ALL - 32 + col1 * ( + col0 ) / + col1 FROM tab2
----
-25
46
47

query I rowsort
SELECT ALL col1 + - col2 * + 52 AS col2 FROM tab0
----
-1630
-4173
45

query I rowsort
SELECT DISTINCT - 89 FROM tab0, tab1, tab1 AS cor0
----
-89

query I rowsort
SELECT - + col0 + col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 37 * + col1 + + 6 * col0 col1 FROM tab0
----
3326
3799
3901

query I rowsort
SELECT + 91 + + col0 FROM tab0
----
115
126
180

query I rowsort
SELECT tab2.col2 + - tab2.col1 AS col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL 99 + col0 + + col1 FROM tab1
----
128
173
192

query I rowsort
SELECT col2 * col0 * col1 + + col2 * col2 AS col0 FROM tab2
----
120328
52478
6588

query I rowsort
SELECT ALL 83 + + col2 FROM tab0
----
116
165
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-6066
SELECT DISTINCT col2 + - CAST( - 36 AS SIGNED ) + cor0.col2 DIV + col0 FROM tab0 AS cor0
----
118
37
70

skipif mysql # not compatible
query I rowsort label-6066
SELECT DISTINCT col2 + - CAST ( - 36 AS INTEGER ) + cor0.col2 / + col0 FROM tab0 AS cor0
----
118
37
70

query I rowsort
SELECT ALL + cor0.col0 * 86 + col1 AS col0 FROM tab0 AS cor0
----
2150
3107
7745

query I rowsort
SELECT DISTINCT + - col2 + ( col0 ) AS col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL - cor0.col0 - + 60 AS col1 FROM tab2 AS cor0
----
-138
-139
-67

query I rowsort
SELECT - + cor0.col2 + - 56 AS col1 FROM tab0 AS cor0
----
-138
-57
-89

query I rowsort
SELECT ALL - cor0.col2 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - col0 + - col0 FROM tab0 cor0
----
-178
-48
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + 35 * + col0 * + col2 col1 FROM tab2 cor0
----
105053
6584
70921

onlyif mysql # use DIV operator for integer division
query I rowsort label-6074
SELECT ALL - col2 + + ( cor0.col1 ) * col0 DIV col2 col1 FROM tab0 AS cor0
----
16
29
3394

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6074
SELECT ALL - col2 + + ( cor0.col1 ) * col0 / col2 col1 FROM tab0 AS cor0
----
16
29
3394

query I rowsort
SELECT ALL col1 * - col1 + col1 * col2 * col1 + - col1 AS col2 FROM tab0 AS cor0
----
-97
236586
670670

query I rowsort
SELECT ALL + col1 * + col2 * col1 + + col0 * - col2 + - col2 AS col0 FROM tab1 AS cor0
----
1995
36288
8448

query I rowsort
SELECT ALL + col0 - - ( col2 + + col1 ) FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT col2 * + col1 + cor0.col2 AS col0 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT + ( + 53 ) FROM tab2 cor0
----
53
53
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-6080
SELECT - + col0 * cor0.col0 DIV - col0 AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6080
SELECT - + col0 * cor0.col0 / - col0 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + col1 - - col2 * + col1 FROM tab0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-6082
SELECT - col1 DIV + col1 FROM tab2 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6082
SELECT - col1 / + col1 FROM tab2 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 6 * - col2 + col1 FROM tab2 AS cor0
----
193
215
245

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6084
SELECT DISTINCT - CAST( - ( - col2 ) AS SIGNED ) + + ( col0 ) AS col2 FROM tab2 AS cor0
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-6084
SELECT DISTINCT - CAST ( - ( - col2 ) AS INTEGER ) + + ( col0 ) AS col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - ( col2 ) * + cor0.col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + 58 FROM tab1 cor0
----
58
58
58

query I rowsort
SELECT + col0 * + col2 + col0 - col2 * col1 AS col0 FROM tab1 AS cor0
----
-1239
3142
6512

query I rowsort
SELECT col2 + 10 - col1 AS col2 FROM tab2 AS cor0
----
-23
31
6

query I rowsort
SELECT + 69 AS col2 FROM tab2 cor0
----
69
69
69

query I rowsort
SELECT col1 * cor0.col0 * - 75 FROM tab2 AS cor0
----
-100725
-16275
-345150

query I rowsort
SELECT ALL - 49 * - col0 * col0 FROM tab2 AS cor0
----
2401
298116
305809

onlyif mysql # use DIV operator for integer division
query I rowsort label-6092
SELECT DISTINCT - ( - col2 ) DIV + 87 AS col0 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-6092
SELECT DISTINCT - ( - col2 ) / + 87 AS col0 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT + col1 * cor0.col0 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + - cor0.col2 + col2 FROM tab2 cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6095
SELECT ALL - col1 * cor0.col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6095
SELECT ALL - col1 * cor0.col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6096
SELECT DISTINCT 64 DIV - 19 FROM tab0, tab1 AS cor0
----
-3

skipif mysql # not compatible
query I rowsort label-6096
SELECT DISTINCT 64 / - 19 FROM tab0, tab1 AS cor0
----
-3

query I rowsort
SELECT ALL - + cor0.col1 * col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6098
SELECT + + col0 + col0 DIV col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-6098
SELECT + + col0 + col0 / col0 FROM tab0 AS cor0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 745d1c3a09d935465cad552325c5c945

query I rowsort
SELECT DISTINCT - 88 AS col1 FROM tab2 AS cor0
----
-88

query I rowsort
SELECT ALL ( tab2.col2 ) FROM tab2
----
26
27
38

query I rowsort
SELECT + - ( col2 ) * cor0.col2 + col1 AS col0 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT col0 * col2 - col1 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT DISTINCT + 75 FROM tab2 AS cor0
----
75

query I rowsort
SELECT ALL + 29 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
1102
754
783

query I rowsort
SELECT DISTINCT + col1 * col0 AS col2 FROM tab1 cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6107
SELECT DISTINCT col2 - + 72 DIV tab0.col1 AS col0 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6107
SELECT DISTINCT col2 - + 72 / tab0.col1 AS col0 FROM tab0
----
1
33
82

query I rowsort
SELECT - col2 * - col0 + - col2 FROM tab2 cor0
----
162
2002
2964

query I rowsort
SELECT DISTINCT + 45 + col1 FROM tab1 AS cor0
----
55
58
71

query I rowsort
SELECT - - 96 * + col2 FROM tab0 AS cor0
----
3168
7872
96

query I rowsort
SELECT ALL + col1 + col1 AS col2 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - cor0.col2 * + col0 + + col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT 14 * col0 + col1 AS col1 FROM tab1
----
1133
68
906

query I rowsort
SELECT ALL + tab2.col2 + col0 * col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT - col1 + - col1 + + tab1.col0 FROM tab1
----
-49
44
54

query I rowsort
SELECT - 1 * col1 AS col2 FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col1 + - col2 * col1 + - col2 col1 FROM tab1 AS cor0
----
-1175
-527
-782

query I rowsort
SELECT ALL 21 FROM tab1, tab2 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( cor0.col1 AS REAL ) AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - col1 * cor0.col2 + - col1 + cor0.col0 * + col1 FROM tab0 AS cor0
----
-860
3201
546

query I rowsort
SELECT DISTINCT - col2 + col0 + col0 FROM tab1 cor0
----
-48
64
71

query I rowsort
SELECT DISTINCT - col2 + + col0 * col0 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT + 67 * + 65 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 2d3fe29cb22b2f40494a53494bb2b016

query I rowsort
SELECT ALL + col2 * - 70 AS col2 FROM tab1
----
-3780
-3990
-6720

onlyif mysql # use DIV operator for integer division
query I rowsort label-6125
SELECT 7 DIV + ( - col2 ) FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6125
SELECT 7 / + ( - col2 ) FROM tab1
----
0
0
0

query I rowsort
SELECT ALL col1 - - 28 AS col0 FROM tab0
----
114
119
125

query I rowsort
SELECT DISTINCT - tab0.col1 * + col1 + - col2 - + col2 * col2 AS col2 FROM tab0
----
-15087
-8518
-9411

query I rowsort
SELECT col1 * + 71 + - col0 + col1 * + col1 AS col1 FROM tab1
----
1012
2519
746

query I rowsort
SELECT - col1 + 93 + - col1 FROM tab2
----
-25
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 19 * + cor0.col0 col1 FROM tab0 AS cor0
----
1691
456
665

query I rowsort
SELECT ALL + 95 + + col1 AS col0 FROM tab1 cor0
----
105
108
121

query I rowsort
SELECT ALL 23 FROM tab1, tab0 cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT col2 * - col1 * cor0.col2 AS col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT ( col0 ) + + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - - col1 * col1 + + col1 * + cor0.col2 FROM tab0 AS cor0
----
10234
15743
9506

query I rowsort
SELECT + + 12 * + 72 * col1 AS col0 FROM tab2 AS cor0
----
14688
26784
50976

query I rowsort
SELECT col0 + + 80 FROM tab2
----
158
159
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-6138
SELECT col1 + - col0 DIV ( col0 ) AS col2 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-6138
SELECT col1 + - col0 / ( col0 ) AS col2 FROM tab1
----
12
25
9

query I rowsort
SELECT + ( + cor0.col2 ) * - col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT + + 17 + col0 * + col1 + 42 AS col0 FROM tab2 AS cor0
----
1402
276
4661

query I rowsort
SELECT DISTINCT - 14 * + ( + col2 ) FROM tab2
----
-364
-378
-532

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6142
SELECT - col0 / col1 + col1 * + col2 / CAST( NULL AS DECIMAL ) + + cor0.col1 * col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6142
SELECT - col0 / col1 + col1 * + col2 / CAST ( NULL AS REAL ) + + cor0.col1 * col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + col2 * + col0 AS col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT + 67 AS col0 FROM tab1, tab2 cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT - tab2.col1 * - col2 * + tab2.col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT ALL + col0 + 41 FROM tab1 AS cor0
----
105
121
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-6147
SELECT DISTINCT - col2 + + col0 * col2 DIV - col2 AS col1 FROM tab0 AS cor0
----
-171
-36
-57

skipif mysql # not compatible
query I rowsort label-6147
SELECT DISTINCT - col2 + + col0 * col2 / - col2 AS col1 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + + col2 + ( - col0 ) * + col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT + col1 * ( - col1 ) FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - + col2 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 83 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT DISTINCT 92 * + col2 + - tab2.col0 + + col1 FROM tab2
----
2373
2508
3434

query I rowsort
SELECT + 71 * - col0 AS col0 FROM tab1
----
-213
-4544
-5680

query I rowsort
SELECT + - col0 + 36 AS col1 FROM tab1 AS cor0
----
-28
-44
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 + + col0 col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL - ( ( col2 ) ) AS col2 FROM tab2 cor0
----
-26
-27
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6157
SELECT DISTINCT CAST( NULL AS SIGNED ) * col1 * col0 + 61 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6157
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col1 * col0 + 61 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT 61 AS col1 FROM tab1 cor0
----
61
61
61

query I rowsort
SELECT DISTINCT + 4 + 11 AS col2 FROM tab1 AS cor0
----
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 97 * col0 col2 FROM tab1 AS cor0
----
291
6208
7760

query I rowsort
SELECT DISTINCT - cor0.col1 + + ( col0 ) AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - col1 * + col0 - - 25 FROM tab1
----
-1015
-53
-615

query I rowsort
SELECT + 57 FROM tab0
----
57
57
57

query I rowsort
SELECT DISTINCT cor1.col0 * 30 FROM tab0, tab1 cor0, tab2 AS cor1
----
210
2340
2370

query I rowsort
SELECT + + col0 + + col0 * cor0.col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL - + col2 + col0 - col1 AS col1 FROM tab0 AS cor0
----
-63
-84
-95

query I rowsort
SELECT ALL - col1 * cor0.col2 + - col1 AS col1 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT + col1 + col1 * - col1 FROM tab1 cor0
----
-156
-650
-90

query I rowsort
SELECT - cor0.col2 + col0 * col1 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6170
SELECT col0 + + CAST( + cor0.col1 AS SIGNED ) FROM tab1 cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-6170
SELECT col0 + + CAST ( + cor0.col1 AS INTEGER ) FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT ALL + ( col2 ) * - tab0.col0 AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + 32 * col0 FROM tab1
----
2048
2560
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col2 * - tab1.col2 col1 FROM tab1, tab2, tab0 cor0
----
27 values hashing to 255bedb67400f83d272763889db4ca4f

query I rowsort
SELECT + col2 * + ( + col0 ) - cor0.col2 * + 66 FROM tab1 AS cor0
----
-114
-3402
1344

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - cor0.col1 ) col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT - 97 * cor0.col2 FROM tab1 cor0
----
-5238
-5529
-9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 27 col1 FROM tab0 AS cor0
----
27

query I rowsort
SELECT DISTINCT + ( - col1 ) * + col1 AS col0 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - col2 - - col0 AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT 55 + - cor0.col2 + ( + cor0.col1 + col1 ) AS col0 FROM tab0 AS cor0
----
155
194
248

query I rowsort
SELECT - col2 + col0 AS col0 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6182
SELECT ALL + col0 + - col2 + col2 DIV + 99 FROM tab2
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-6182
SELECT ALL + col0 + - col2 + col2 / + 99 FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
19

query I rowsort
SELECT ALL tab0.col2 + - col1 AS col1 FROM tab0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6185
SELECT - col1 + + tab2.col1 + - ( - ( - col0 ) ) DIV 69 AS col0 FROM tab2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-6185
SELECT - col1 + + tab2.col1 + - ( - ( - col0 ) ) / 69 AS col0 FROM tab2
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6186
SELECT ALL + col2 * - col1 + col2 DIV col0 AS col2 FROM tab2
----
-1534
-646
-834

skipif mysql # not compatible
query I rowsort label-6186
SELECT ALL + col2 * - col1 + col2 / col0 AS col2 FROM tab2
----
-1534
-646
-834

query I rowsort
SELECT ALL + tab2.col1 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) * col2 + - col1 col1 FROM tab1 AS cor0
----
-1261
-1430
-580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * col0 + ( ( cor0.col0 ) ) col1 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT DISTINCT + - col2 + - col2 AS col1 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT - ( col1 ) * col0 + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL - 21 + tab0.col1 AS col2 FROM tab0
----
65
70
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + tab2.col2 col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - col0 - - ( col0 ) FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + 36 * col2 col1 FROM tab1 AS cor0
----
1941
1988
3376

query I rowsort
SELECT ( 98 ) FROM tab1 AS cor0
----
98
98
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6197
SELECT + col2 DIV - col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-6197
SELECT + col2 / - col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT ALL col0 + 60 FROM tab2 AS cor0
----
138
139
67

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( + cor0.col1 AS REAL ) * col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT col2 + 58 FROM tab1
----
112
115
154

query I rowsort
SELECT col0 + ( col2 ) AS col2 FROM tab1
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - tab2.col1 col1 FROM tab2
----
-33
-4
21

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0 CROSS JOIN tab2, tab2 AS cor1
----
972 values hashing to 163d7732097d78f1cda7f65c2cea5a08

query I rowsort
SELECT DISTINCT - cor0.col1 + - col1 * - col0 AS col1 FROM tab2 cor0
----
1326
186
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-6205
SELECT ( - col1 ) DIV col2 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6205
SELECT ( - col1 ) / col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL ( - tab0.col0 ) + tab0.col1 FROM tab0
----
2
62
62

query I rowsort
SELECT DISTINCT - tab0.col1 + col2 + col1 AS col1 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 2 + 64 col0 FROM tab2 AS cor0
----
62
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col1 + col2 col0 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT DISTINCT + col1 - - 2 AS col0 FROM tab2 AS cor0
----
19
33
61

query I rowsort
SELECT - col1 + - col0 FROM tab1 cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6212
SELECT DISTINCT - col0 DIV - col2 + col1 FROM tab0 AS cor0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-6212
SELECT DISTINCT - col0 / - col2 + col1 FROM tab0 AS cor0
----
132
86
92

query I rowsort
SELECT DISTINCT col0 * col1 * cor0.col1 - + 39 FROM tab2 cor0
----
22792
271479
6688

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6214
SELECT ALL + - CAST( col2 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-6214
SELECT ALL + - CAST ( col2 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 + col0 col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT cor0.col0 + 70 AS col2 FROM tab2 AS cor0
----
148
149
77

query I rowsort
SELECT + + ( ( col1 ) ) FROM tab0 cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( ( + cor0.col2 ) ) + 96 * 22 col0 FROM tab2 AS cor0
----
2138
2139
2150

query I rowsort
SELECT ALL col0 * 16 + + col2 AS col2 FROM tab0 AS cor0
----
1506
417
561

query I rowsort
SELECT ALL + cor0.col0 + - col0 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6221
SELECT ALL + CAST( - col0 + + col0 AS SIGNED ) AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6221
SELECT ALL + CAST ( - col0 + + col0 AS INTEGER ) AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + + 44 + - col0 * col0 FROM tab2 cor0
----
-5
-6040
-6197

query I rowsort
SELECT DISTINCT - + 72 * + col0 + - ( + col0 ) AS col2 FROM tab1 AS cor0
----
-219
-4672
-5840

query I rowsort
SELECT - col1 * - cor0.col1 - cor0.col1 FROM tab1 cor0
----
156
650
90

query I rowsort
SELECT - - 0 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6226
SELECT + col1 DIV col2 + - col1 * col1 FROM tab0 AS cor0
----
-7394
-8280
-9312

skipif mysql # not compatible
query I rowsort label-6226
SELECT + col1 / col2 + - col1 * col1 FROM tab0 AS cor0
----
-7394
-8280
-9312

query I rowsort
SELECT tab2.col0 + + col0 * + col0 FROM tab2
----
56
6162
6320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6228
SELECT - CAST( + col1 AS SIGNED ) + - col2 FROM tab1
----
-109
-67
-80

skipif mysql # not compatible
query I rowsort label-6228
SELECT - CAST ( + col1 AS INTEGER ) + - col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT + - col2 + col0 * 36 AS col1 FROM tab0 AS cor0
----
1259
3122
831

query I rowsort
SELECT + 16 - cor0.col1 FROM tab2 AS cor0
----
-1
-15
-43

query I rowsort
SELECT + col0 + col2 + - col1 AS col2 FROM tab1 AS cor0
----
111
163
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col1 * - CAST ( col1 AS REAL ) * + col0 col2 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT - cor0.col0 * - col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6234
SELECT + col1 + + 72 + + ( col2 ) / + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6234
SELECT + col1 + + 72 + + ( col2 ) / + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - cor0.col1 + + 25 AS col2 FROM tab0 cor0
----
-61
-66
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + col0 * + col1 + 47 FROM tab0 AS cor0
----
2111
3442
8146

onlyif mysql # use DIV operator for integer division
query I rowsort label-6238
SELECT cor0.col1 * 46 + cor0.col2 DIV col1 col0 FROM tab0 AS cor0
----
3956
4186
4462

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6238
SELECT cor0.col1 * 46 + cor0.col2 / col1 col0 FROM tab0 AS cor0
----
3956
4186
4462

query I rowsort
SELECT col2 * - col1 * - 19 AS col0 FROM tab2 AS cor0
----
12274
15903
29146

query I rowsort
SELECT ALL col1 * - 90 AS col1 FROM tab0 AS cor0
----
-7740
-8190
-8730

query I rowsort
SELECT col2 * - 82 AS col2 FROM tab2 AS cor0
----
-2132
-2214
-3116

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6242
SELECT + - CAST( NULL AS SIGNED ) * col2 + - col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6242
SELECT + - CAST ( NULL AS INTEGER ) * col2 + - col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 22 + 3 * col2 FROM tab0 AS cor0
----
121
25
268

query I rowsort
SELECT ALL + 31 * - 35 + + col1 FROM tab0 AS cor0
----
-988
-994
-999

query I rowsort
SELECT ALL 16 - - col0 FROM tab1 AS cor0
----
19
80
96

query I rowsort
SELECT 21 AS col2 FROM tab1 cor0
----
21
21
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6247
SELECT col2 + - col0 DIV + ( + col1 + col0 * + 33 ) FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-6247
SELECT col2 + - col0 / + ( + col1 + col0 * + 33 ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + - col0 + + col0 * - col2 FROM tab0 cor0
----
-70
-7387
-816

query I rowsort
SELECT - cor0.col2 + col2 * + col1 * - col2 FROM tab0 AS cor0
----
-611966
-93687
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6250
SELECT - 30 * - col2 DIV col2 - col1 FROM tab0 cor0
----
-56
-61
-67

skipif mysql # not compatible
query I rowsort label-6250
SELECT - 30 * - col2 / col2 - col1 FROM tab0 cor0
----
-56
-61
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + cor0.col0 col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - cor0.col2 * - col2 * col2 FROM tab2 AS cor0
----
17576
19683
54872

query I rowsort
SELECT + cor0.col0 * col0 * ( col0 ) FROM tab0 AS cor0
----
13824
42875
704969

query I rowsort
SELECT DISTINCT - 22 * + 84 * + cor0.col1 FROM tab2, tab1 AS cor0
----
-18480
-24024
-48048

onlyif mysql # use DIV operator for integer division
query I rowsort label-6255
SELECT col2 DIV cor0.col0 + col0 + + col0 * ( + col2 + + col1 ) * 39 AS col2 FROM tab1 cor0
----
167296
340161
9381

skipif mysql # not compatible
query I rowsort label-6255
SELECT col2 / cor0.col0 + col0 + + col0 * ( + col2 + + col1 ) * 39 AS col2 FROM tab1 cor0
----
167296
340161
9381

query I rowsort
SELECT - + col1 * - 68 FROM tab0 AS cor0
----
5848
6188
6596

query I rowsort
SELECT ALL 53 * + tab2.col0 FROM tab2
----
371
4134
4187

query I rowsort
SELECT 10 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT tab2.col1 * tab2.col2 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT + - cor0.col1 FROM tab1, tab0 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to 786a240f80bef6f9c6a190e92cd4f9e8

query I rowsort
SELECT ALL - ( - col2 ) * - col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT - - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL tab1.col1 + 46 * + cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to b65de6166be9ebe5472422d8d15ca8a2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6264
SELECT + ( - col1 ) * col1 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6264
SELECT + ( - col1 ) * col1 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( - 91 ) * + col0 FROM tab2 AS cor0
----
-637
-7098
-7189

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + col1 * - ( - col2 ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - - 50 * - cor0.col0 * - col1 FROM tab2 AS cor0
----
10850
230100
67150

query I rowsort
SELECT + - col2 * col1 + cor0.col1 * - cor0.col1 * - col2 - col1 FROM tab0 AS cor0
----
241144
671489
9215

query I rowsort
SELECT + 83 AS col2 FROM tab1 AS cor0
----
83
83
83

query I rowsort
SELECT 96 FROM tab2, tab2 AS cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query I rowsort
SELECT DISTINCT tab0.col0 AS col1 FROM tab0, tab1 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT col0 * + 90 + - col1 AS col1 FROM tab0
----
2074
3053
7919

query I rowsort
SELECT DISTINCT 72 AS col1 FROM tab1, tab0, tab1 AS cor0, tab0 AS cor1
----
72

query I rowsort
SELECT ALL ( + 17 ) * - col2 AS col2 FROM tab2
----
-442
-459
-646

query I rowsort
SELECT col1 - cor0.col0 AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL + 31 + + tab0.col2 * col2 + + col0 AS col1 FROM tab0
----
1144
67
6844

onlyif mysql # use DIV operator for integer division
query I rowsort label-6278
SELECT ALL + col2 * - col2 DIV - col2 + + col1 AS col1 FROM tab0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-6278
SELECT ALL + col2 * - col2 / - col2 + + col1 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT col1 * col0 + + col1 * col2 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
1023
1972
6077

query I rowsort
SELECT + col1 * - 45 + col0 FROM tab0 cor0
----
-3846
-4006
-4330

query I rowsort
SELECT DISTINCT 11 + cor0.col1 + + col1 FROM tab1 AS cor0
----
31
37
63

query I rowsort
SELECT DISTINCT + cor0.col1 * 66 FROM tab1 AS cor0
----
1716
660
858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 32 + + cor0.col1 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to a6e8125d0013a043afcf24c2440d3b52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6284
SELECT DISTINCT + CAST( NULL AS SIGNED ) / 30 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6284
SELECT DISTINCT + CAST ( NULL AS INTEGER ) / 30 AS col2 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT - 94 FROM tab1
----
-94

query I rowsort
SELECT - col1 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6288
SELECT + - col0 DIV - col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6288
SELECT + - col0 / - col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT - - col2 + - col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - - 80 + col0 FROM tab0 AS cor0
----
104
115
169

query I rowsort
SELECT ALL - col0 * - col2 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - 37 * tab2.col0 + ( + cor0.col2 ) AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 27c78dec687662bc691007b7e63ecbc4

query I rowsort
SELECT col0 + col1 * 60 - col2 AS col2 FROM tab2
----
1061
1840
3592

query I rowsort
SELECT 81 * + tab0.col1 - col0 FROM tab0
----
6942
7282
7822

query I rowsort
SELECT DISTINCT + + 33 AS col0 FROM tab2, tab1, tab2 cor0
----
33

query I rowsort
SELECT + 55 * + col2 FROM tab2
----
1430
1485
2090

query I rowsort
SELECT + ( + cor0.col1 ) * + 94 FROM tab1 cor0
----
1222
2444
940

query I rowsort
SELECT ALL - 3 + - col2 * col0 * 98 FROM tab1
----
-15879
-357507
-752643

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - 22 col2 FROM tab2
----
-1298
-374
-682

query I rowsort
SELECT 64 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT 29 * + 36 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 372f156d9edf9dbc882af66edb82647e

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # use DIV operator for integer division
query I rowsort label-6303
SELECT + col2 + ( - tab2.col2 ) DIV + col0 FROM tab2
----
24
26
38

skipif mysql # not compatible
query I rowsort label-6303
SELECT + col2 + ( - tab2.col2 ) / + col0 FROM tab2
----
24
26
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6304
SELECT CAST( NULL AS SIGNED ) * col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6304
SELECT CAST ( NULL AS INTEGER ) * col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 65 FROM tab1
----
65
65
65

query I rowsort
SELECT DISTINCT - - col0 * 51 AS col0 FROM tab0 AS cor0
----
1224
1785
4539

query I rowsort
SELECT - 89 + 38 * col1 AS col1 FROM tab2 AS cor0
----
1089
2153
557

query I rowsort
SELECT col2 * - 9 + col0 FROM tab2 AS cor0
----
-156
-236
-263

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6309
SELECT CAST( - ( col0 ) AS SIGNED ) FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6309
SELECT CAST ( - ( col0 ) AS INTEGER ) FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6310
SELECT ALL col1 * + CAST( col2 + col2 AS SIGNED ) * col0 FROM tab2 cor0
----
102068
11718
239304

skipif mysql # not compatible
query I rowsort label-6310
SELECT ALL col1 * + CAST ( col2 + col2 AS INTEGER ) * col0 FROM tab2 cor0
----
102068
11718
239304

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6311
SELECT + CAST( NULL AS SIGNED ) col0 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6311
SELECT + CAST ( NULL AS INTEGER ) col0 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - - col0 * col2 * col0 AS col1 FROM tab0 cor0
----
1225
19008
649522

query I rowsort
SELECT + - cor0.col0 * 15 AS col2 FROM tab0 AS cor0
----
-1335
-360
-525

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6314
SELECT ALL + col0 * + CAST( ( col1 ) AS SIGNED ) + + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6314
SELECT ALL + col0 * + CAST ( ( col1 ) AS INTEGER ) + + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6315
SELECT DISTINCT + col0 + - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6315
SELECT DISTINCT + col0 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col1 + 64 + col1 FROM tab2 AS cor0
----
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-6317
SELECT ALL col1 DIV + col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6317
SELECT ALL col1 / + col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - + 88 + col2 FROM tab0 AS cor0
----
-55
-6
-87

query I rowsort
SELECT 91 * - 11 + col2 FROM tab1 AS cor0
----
-905
-944
-947

query I rowsort
SELECT col0 + - ( + col1 ) - col1 FROM tab0
----
-148
-159
-93

query I rowsort
SELECT DISTINCT + col0 * - col1 - col1 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-6322
SELECT DISTINCT ( col2 ) DIV - cor0.col1 AS col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6322
SELECT DISTINCT ( col2 ) / - cor0.col1 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + ( cor0.col2 ) + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + ( 76 ) * + col1 - 12 AS col0 FROM tab0 AS cor0
----
6524
6904
7360

query I rowsort
SELECT DISTINCT + col1 * - col0 + col0 * - col1 FROM tab2 AS cor0
----
-2686
-434
-9204

query I rowsort
SELECT ALL + 35 - + col0 AS col1 FROM tab0 cor0
----
-54
0
11

query I rowsort
SELECT col2 * - col1 + col2 AS col0 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT + - col0 * + col0 + col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT tab0.col0 + + col1 + + col2 AS col1 FROM tab0
----
133
143
262

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6330
SELECT DISTINCT + col2 + + CAST( NULL AS SIGNED ) - 55 * col1 AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6330
SELECT DISTINCT + col2 + + CAST ( NULL AS INTEGER ) - 55 * col1 AS col1 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT - col1 - - ( - col2 ) * col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT + 21 FROM tab2, tab1 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

query I rowsort
SELECT - col2 * + 8 + - 11 + col1 * col1 FROM tab0
----
7121
7614
9390

onlyif mysql # use DIV operator for integer division
query I rowsort label-6334
SELECT cor0.col1 DIV - col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-6334
SELECT cor0.col1 / - col0 FROM tab2 AS cor0
----
-4
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6335
SELECT - + 48 DIV + col0 AS col2 FROM tab1 cor0
----
-16
0
0

skipif mysql # not compatible
query I rowsort label-6335
SELECT - + 48 / + col0 AS col2 FROM tab1 cor0
----
-16
0
0

query I rowsort
SELECT DISTINCT - ( - col0 ) + col1 * - col1 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT col2 * - col1 + + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL - + col0 + col2 * + col0 FROM tab1 AS cor0
----
159
3584
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - 1 + - col2 * 40 AS col1 FROM tab2 AS cor0
----
-1041
-1081
-1521

query I rowsort
SELECT ALL + ( - col0 ) * - cor0.col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 AS col0 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-6343
SELECT - 6 DIV col1 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6343
SELECT - 6 / col1 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 + col1 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + 95 * + col0 FROM tab1 AS cor0
----
285
6080
7600

query I rowsort
SELECT + ( col0 + - tab0.col2 ) * 48 AS col1 FROM tab0
----
-432
1632
336

query I rowsort
SELECT tab1.col0 FROM tab1, tab2, tab2 cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ALL - col2 + - col2 * - col2 + + 38 AS col1 FROM tab1
----
2900
3230
9158

query I rowsort
SELECT ALL 26 + cor0.col0 FROM tab2 AS cor0
----
104
105
33

query I rowsort
SELECT ALL + - ( cor0.col0 ) * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-6351
SELECT col2 DIV + col0 + + ( + col2 ) DIV - col2 AS col2 FROM tab1
----
-1
0
17

skipif mysql # not compatible
query I rowsort label-6351
SELECT col2 / + col0 + + ( + col2 ) / - col2 AS col2 FROM tab1
----
-1
0
17

query I rowsort
SELECT + + 32 FROM tab1 cor0
----
32
32
32

query I rowsort
SELECT ( col0 + + col2 ) FROM tab1
----
121
176
57

query I rowsort
SELECT - ( col1 * col0 ) + col1 * col1 * col0 AS col1 FROM tab0
----
175440
325920
728910

query I rowsort
SELECT - col0 + + 77 AS col0 FROM tab2
----
-1
-2
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6356
SELECT DISTINCT tab2.col2 * CAST( + col0 AS SIGNED ) FROM tab2
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-6356
SELECT DISTINCT tab2.col2 * CAST ( + col0 AS INTEGER ) FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT col0 + + 7 * col2 * - col0 + + 72 AS col0 FROM tab1 AS cor0
----
-1059
-25400
-53608

query I rowsort
SELECT ALL col2 * + ( col0 + col1 ) FROM tab1 AS cor0
----
1566
4218
8928

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + 66 * col2 col0 FROM tab1 AS cor0
----
3618
3819
6432

query I rowsort
SELECT - col1 * + 53 AS col2 FROM tab1 AS cor0
----
-1378
-530
-689

query I rowsort
SELECT DISTINCT col1 * + 58 FROM tab2 AS cor0
----
1798
3422
986

query I rowsort
SELECT ALL col2 + col2 + + col0 FROM tab2 cor0
----
130
155
61

query I rowsort
SELECT col1 + 93 AS col2 FROM tab1 cor0
----
103
106
119

query I rowsort
SELECT ALL - - col0 + + ( + col2 ) FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + - col1 * - col2 - + col2 * - col0 FROM tab0 AS cor0
----
132
14760
3630

query I rowsort
SELECT - col2 * + 52 AS col2 FROM tab0
----
-1716
-4264
-52

query I rowsort
SELECT DISTINCT 84 * - 45 * - col1 + - col2 FROM tab1
----
37743
49044
98226

query I rowsort
SELECT - - col0 + 3 AS col1 FROM tab0 cor0
----
27
38
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6369
SELECT DISTINCT + CAST( - 2 AS SIGNED ) * + col1 + + col0 FROM tab0 AS cor0
----
-148
-159
-93

skipif mysql # not compatible
query I rowsort label-6369
SELECT DISTINCT + CAST ( - 2 AS INTEGER ) * + col1 + + col0 FROM tab0 AS cor0
----
-148
-159
-93

query I rowsort
SELECT ALL - - ( - col2 ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6371
SELECT CAST( NULL AS SIGNED ) * col1 + + col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6371
SELECT CAST ( NULL AS INTEGER ) * col1 + + col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - + 14 - ( cor0.col1 * + col0 ) FROM tab2 AS cor0
----
-1357
-231
-4616

query I rowsort
SELECT DISTINCT - + 58 AS col2 FROM tab0 AS cor0
----
-58

query I rowsort
SELECT - col2 * col0 + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL 79 + + 89 FROM tab1 AS cor0
----
168
168
168

query I rowsort
SELECT DISTINCT - - ( + col1 ) + col2 AS col2 FROM tab0 cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col2 col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL 56 * - col1 + - cor0.col0 FROM tab2 AS cor0
----
-1031
-1743
-3382

query I rowsort
SELECT DISTINCT + cor0.col2 * + col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL + ( col1 ) * - 95 FROM tab1 AS cor0
----
-1235
-2470
-950

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * cor0.col1 col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - 79 * + col0 + + 5 AS col1 FROM tab2 AS cor0
----
-548
-6157
-6236

query I rowsort
SELECT DISTINCT + col0 - + col0 FROM tab1 cor0
----
0

query I rowsort
SELECT DISTINCT - - col1 * + col1 AS col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + col1 - - col2 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - col2 + col1 * + col1 AS col1 FROM tab2 AS cor0
----
251
3455
934

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + col2 * col1 - col2 * col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6390
SELECT - col1 DIV - tab1.col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6390
SELECT - col1 / - tab1.col2 FROM tab1
----
0
0
0

query I rowsort
SELECT col1 * - col1 + col1 AS col0 FROM tab0 AS cor0
----
-7310
-8190
-9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col1 + col0 * col1 col2 FROM tab0 cor0
----
2236
3589
8281

query I rowsort
SELECT + col2 + col1 * + col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col0 + col2 - - col1 col0 FROM tab1
----
131
189
83

query I rowsort
SELECT col1 * - col0 - col2 * + col2 FROM tab2 AS cor0
----
-2787
-5278
-946

query I rowsort
SELECT ALL 89 - - col0 FROM tab2 AS cor0
----
167
168
96

query I rowsort
SELECT - - 86 * - col1 FROM tab1 AS cor0
----
-1118
-2236
-860

query I rowsort
SELECT ALL ( + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT col0 + cor0.col0 * - col0 + cor0.col0 * - col0 FROM tab1 AS cor0
----
-12720
-15
-8128

query I rowsort
SELECT - col1 + - col0 * - col1 * col2 AS col2 FROM tab1 AS cor0
----
36470
4186
99827

query I rowsort
SELECT + col2 + + col0 * col1 * + col1 AS col1 FROM tab0 AS cor0
----
177537
329316
737091

onlyif mysql # use DIV operator for integer division
query I rowsort label-6402
SELECT DISTINCT + col1 * cor0.col0 - col2 DIV cor0.col2 AS col0 FROM tab1 AS cor0
----
1039
639
77

skipif mysql # not compatible
query I rowsort label-6402
SELECT DISTINCT + col1 * cor0.col0 - col2 / cor0.col2 AS col0 FROM tab1 AS cor0
----
1039
639
77

query I rowsort
SELECT + 35 + cor0.col2 FROM tab2 AS cor0
----
61
62
73

query I rowsort
SELECT col0 * col1 FROM tab0 WHERE NOT NULL <= + col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6405
SELECT col0 + + col2 DIV col1 AS col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6405
SELECT col0 + + col2 / col1 AS col1 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 - col2 * - col0 * + col1 col1 FROM tab1 WHERE NOT - col2 <= NULL
----

query I rowsort
SELECT - tab1.col2 * + col0 AS col0 FROM tab1
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col0 col0 FROM tab1
----
128
160
6

query I rowsort
SELECT col1 * + col1 + + col2 + tab2.col1 AS col0 FROM tab2
----
1019
344
3566

query I rowsort
SELECT DISTINCT col0 + col0 AS col0 FROM tab2
----
14
156
158

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT + col2 * - col0 NOT IN ( col0 * tab1.col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + tab2.col1 col2 FROM tab2
----
118
34
62

query I rowsort
SELECT ALL + cor0.col0 + + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + 8 AS col0 FROM tab2 AS cor0
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col2 ) * + cor0.col1 + + cor0.col1 col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL - col1 - col1 AS col1 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT ALL + col2 * tab0.col2 AS col1 FROM tab0 WHERE NOT NULL NOT IN ( + col1 * - col0 + col0 )
----

query I rowsort
SELECT col2 + col0 * col0 + + col2 FROM tab1
----
117
4210
6592

query I rowsort
SELECT - col2 FROM tab2 WHERE NOT + col0 * col1 = NULL
----

query I rowsort
SELECT col1 + col0 + col0 FROM tab0 AS cor0
----
134
167
269

query I rowsort
SELECT - col0 + col2 + col2 * + col1 FROM tab1 AS cor0
----
1264
1455
563

query I rowsort
SELECT DISTINCT + col1 + col0 + + col0 * - col0 FROM tab0 AS cor0
----
-1093
-466
-7741

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # use DIV operator for integer division
query I rowsort label-6424
SELECT ALL - col0 * tab0.col0 DIV col0 AS col2 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6424
SELECT ALL - col0 * tab0.col0 / col0 AS col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT tab2.col1 AS col0 FROM tab2 WHERE NOT - col2 = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6426
SELECT col0 + col0 DIV col1 AS col2 FROM tab2
----
7
79
83

skipif mysql # not compatible
query I rowsort label-6426
SELECT col0 + col0 / col1 AS col2 FROM tab2
----
7
79
83

query I rowsort
SELECT DISTINCT - col2 * col1 * + col1 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT - col2 + col0 + col2 * + col2 * - col1 AS col0 FROM tab1
----
-119824
-32483
-75867

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 * col0 col1 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT + cor0.col0 FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT + ( 38 ) * + col1 - + col0 * - col1 FROM tab1 AS cor0
----
1020
1066
1534

query I rowsort
SELECT DISTINCT + + ( col0 ) + col2 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + 63 * - 53 - col2 FROM tab0 AS cor0
----
-3340
-3372
-3421

query I rowsort
SELECT ALL + cor0.col0 * ( col0 ) AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - + 50 * + 75 * col1 AS col2 FROM tab1 AS cor0
----
-37500
-48750
-97500

query I rowsort
SELECT DISTINCT - col0 + - col1 + 13 * col2 * col0 FROM tab1 AS cor0
----
2077
47350
99747

query I rowsort
SELECT 87 * col0 AS col1 FROM tab2 AS cor0
----
609
6786
6873

query I rowsort
SELECT + + 92 AS col2 FROM tab0 cor0
----
92
92
92

query I rowsort
SELECT ALL cor0.col2 + col1 AS col2 FROM tab2 cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 + col1 col2 FROM tab2 AS cor0
----
113
141
99

query I rowsort
SELECT col1 * + ( col2 ) - tab2.col2 AS col2 FROM tab2
----
1508
608
810

query I rowsort
SELECT ALL col0 + cor0.col1 + 94 AS col1 FROM tab2 AS cor0
----
132
190
231

query I rowsort
SELECT ALL - + 51 + col0 FROM tab2 AS cor0
----
-44
27
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-6444
SELECT DISTINCT - col2 DIV + 33 FROM tab1 cor0
----
-1
-2

skipif mysql # not compatible
query I rowsort label-6444
SELECT DISTINCT - col2 / + 33 FROM tab1 cor0
----
-1
-2

query I rowsort
SELECT col0 + + 5 * - col0 FROM tab1
----
-12
-256
-320

query I rowsort
SELECT + 14 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

query I rowsort
SELECT + + col2 * + 1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL + col2 * ( col0 ) * col2 AS col2 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT + - col2 * ( col0 ) * + col1 AS col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-6450
SELECT DISTINCT - col2 DIV ( - col0 * col2 ) FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6450
SELECT DISTINCT - col2 / ( - col0 * col2 ) FROM tab0 AS cor0
----
0

query I rowsort
SELECT cor0.col2 + ( + col0 ) * - col2 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT col2 * col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + 24 + - cor0.col2 * - col1 AS col0 FROM tab1 cor0
----
1272
1428
594

query I rowsort
SELECT col1 * - cor0.col2 + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-6455
SELECT ALL - col0 DIV 53 - col2 AS col2 FROM tab1 AS cor0
----
-54
-58
-97

skipif mysql # not compatible
query I rowsort label-6455
SELECT ALL - col0 / 53 - col2 AS col2 FROM tab1 AS cor0
----
-54
-58
-97

query I rowsort
SELECT ( 66 ) AS col1 FROM tab2 AS cor0
----
66
66
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6457
SELECT DISTINCT + CAST( NULL AS SIGNED ) + col2 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6457
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col2 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col1 * 1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + 71 * col2 FROM tab0 AS cor0
----
2343
5822
71

query I rowsort
SELECT ALL - cor0.col0 * - col1 + col0 + 79 * col2 * col0 AS col1 FROM tab2 AS cor0
----
15155
164892
238580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * - 16 * - col1 col2 FROM tab0 AS cor0
----
118336
132496
150544

query I rowsort
SELECT DISTINCT - col2 * - 22 - - col2 AS col2 FROM tab1 AS cor0
----
1242
1311
2208

query I rowsort
SELECT ALL - 58 FROM tab1 AS cor0
----
-58
-58
-58

query I rowsort
SELECT - 13 + + col0 * - col1 FROM tab2 AS cor0
----
-1356
-230
-4615

query I rowsort
SELECT DISTINCT + col0 + + 9 AS col1 FROM tab1 AS cor0
----
12
73
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col0 + col0 col0 FROM tab0
----
70
7387
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col2 * - 53 * - col0 + col1 col2 FROM tab1
----
-193334
-407027
-8560

onlyif mysql # use DIV operator for integer division
query I rowsort label-6468
SELECT ALL + col2 DIV - ( - col0 ) + col2 FROM tab1
----
57
72
97

skipif mysql # not compatible
query I rowsort label-6468
SELECT ALL + col2 / - ( - col0 ) + col2 FROM tab1
----
57
72
97

query I rowsort
SELECT - col2 * - cor0.col2 * col2 + col1 + - col2 * col1 FROM tab0 cor0
----
1
33185
543997

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( - col2 ) * - col2 col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT col2 * + 79 + - 3 + tab1.col1 FROM tab1
----
4289
4510
7594

query I rowsort
SELECT col0 * - 96 AS col1 FROM tab2
----
-672
-7488
-7584

query I rowsort
SELECT - 12 FROM tab0, tab2 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

query I rowsort
SELECT ( - col2 ) * - col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT + col2 * 12 FROM tab0
----
12
396
984

query I rowsort
SELECT ALL ( col1 + - tab1.col2 * + col1 ) FROM tab1
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6477
SELECT CAST( col0 AS SIGNED ) + col2 FROM tab2
----
104
117
34

skipif mysql # not compatible
query I rowsort label-6477
SELECT CAST ( col0 AS INTEGER ) + col2 FROM tab2
----
104
117
34

query I rowsort
SELECT + 91 + + col1 * - cor0.col1 AS col1 FROM tab1 cor0
----
-585
-78
-9

query I rowsort
SELECT - + col2 + - col2 * - col0 + col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT cor0.col1 + col1 * col2 AS col2 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-6481
SELECT ALL + 81 DIV col0 col0 FROM tab0
----
0
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6481
SELECT ALL + 81 / col0 col0 FROM tab0
----
0
2
3

query I rowsort
SELECT ALL - col2 * + 89 AS col0 FROM tab1
----
-4806
-5073
-8544

query I rowsort
SELECT - tab1.col2 * - col0 AS col1 FROM tab1
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6484
SELECT CAST( NULL AS SIGNED ) + - col2 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6484
SELECT CAST ( NULL AS INTEGER ) + - col2 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 95 AS col2 FROM tab0
----
-95
-95
-95

query I rowsort
SELECT + col0 + col0 * + col0 + col2 FROM tab1
----
4217
6576
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6487
SELECT CAST( NULL AS SIGNED ) * 63 * - col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6487
SELECT CAST ( NULL AS INTEGER ) * 63 * - col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + col2 * col1 * col2 AS col1 FROM tab1 AS cor0
----
119888
32554
75819

query I rowsort
SELECT - 13 + + col0 * ( col2 ) + col2 * col0 AS col0 FROM tab2
----
365
4043
5991

query I rowsort
SELECT DISTINCT + 13 + col0 - - col1 FROM tab1
----
106
42
87

query I rowsort
SELECT + + col2 + + col1 * col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT - col2 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + col2 - - 85 * + col1 AS col0 FROM tab0 AS cor0
----
7343
7817
8246

query I rowsort
SELECT - ( + col0 ) * ( - 13 ) + + tab0.col2 FROM tab0
----
1239
345
456

query I rowsort
SELECT - tab0.col1 * + col0 + 27 + 53 AS col1 FROM tab0
----
-1984
-3315
-8019

query I rowsort
SELECT col0 + + col0 AS col0 FROM tab0
----
178
48
70

query I rowsort
SELECT + col0 * - 69 FROM tab0
----
-1656
-2415
-6141

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 1b06ddc48fd89ff2b1df6d82072316da

query I rowsort
SELECT - col0 * - col1 + col2 + - col1 AS col1 FROM tab1
----
106
1123
687

query I rowsort
SELECT ALL + 94 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT ALL + - col2 * col2 + col1 AS col0 FROM tab1 cor0
----
-2890
-3239
-9203

query I rowsort
SELECT DISTINCT + - col2 * - 64 + + col0 * + col1 AS col1 FROM tab0 AS cor0
----
13347
3459
4176

onlyif mysql # use DIV operator for integer division
query I rowsort label-6503
SELECT DISTINCT + col1 + col1 DIV - col1 + col1 AS col1 FROM tab1 AS cor0
----
19
25
51

skipif mysql # not compatible
query I rowsort label-6503
SELECT DISTINCT + col1 + col1 / - col1 + col1 AS col1 FROM tab1 AS cor0
----
19
25
51

query I rowsort
SELECT col1 + - 25 FROM tab0 AS cor0
----
61
66
72

query I rowsort
SELECT + col2 * col0 - 75 * + col0 FROM tab0 AS cor0
----
-1008
-2590
623

query I rowsort
SELECT col1 + + col2 * + col2 AS col0 FROM tab0 AS cor0
----
1175
6815
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6507
SELECT + + col0 + + 48 DIV + 78 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6507
SELECT + + col0 + + 48 / + 78 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + ( + col0 ) * - col0 * + col0 - - col0 col0 FROM tab2 AS cor0
----
-367
-474533
-492977

onlyif mysql # use DIV operator for integer division
query I rowsort label-6509
SELECT - + col2 DIV col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-6509
SELECT - + col2 / col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6510
SELECT - - col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6510
SELECT - - col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6511
SELECT - col1 DIV - cor0.col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-6511
SELECT - col1 / - cor0.col0 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT col0 + + col2 * + col2 AS col1 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT - col2 + + 64 FROM tab2 AS cor0
----
26
37
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6514
SELECT col0 + 24 DIV - cor0.col0 FROM tab1 AS cor0
----
-5
64
80

skipif mysql # not compatible
query I rowsort label-6514
SELECT col0 + 24 / - cor0.col0 FROM tab1 AS cor0
----
-5
64
80

query I rowsort
SELECT cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL + tab2.col1 * + ( + 9 ) AS col1 FROM tab2
----
153
279
531

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1, tab2 cor2
----
3645 values hashing to df00d19f178a708f636b036dcb6c6f87

query I rowsort
SELECT + 3 * tab1.col0 AS col2 FROM tab1
----
192
240
9

query I rowsort
SELECT - 34 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 40442a74794ded4c78101eefe525a5bb

query I rowsort
SELECT DISTINCT - 74 + - col0 FROM tab1 AS cor0
----
-138
-154
-77

query I rowsort
SELECT ALL 91 FROM tab1 AS cor0
----
91
91
91

query I rowsort
SELECT - - 25 + col0 FROM tab2 AS cor0
----
103
104
32

query I rowsort
SELECT ALL + cor0.col0 * + 21 FROM tab1 cor0
----
1344
1680
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 38 col0 FROM tab2 AS cor0
----
-38
-38
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col2 ) + col1 * col1 col2 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT DISTINCT - col1 + - col2 AS col0 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT + 76 AS col0 FROM tab2
----
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * - col1 col0 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT tab1.col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - - 49 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to 5e90817546f910a557285348e10199b6

query I rowsort
SELECT - cor0.col2 + - col2 * col1 AS col0 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT - + col1 * + col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + 82 + - tab1.col0 FROM tab1
----
18
2
79

query I rowsort
SELECT + 85 + col2 FROM tab1 AS cor0
----
139
142
181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 54 col2 FROM tab1 AS cor0
----
54

query I rowsort
SELECT col1 + + col2 + col1 FROM tab0 cor0
----
195
205
264

query I rowsort
SELECT ALL + - col0 * - col0 AS col1 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT - - 70 FROM tab0 AS cor0
----
70
70
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6539
SELECT - col0 * cor0.col1 + - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6539
SELECT - col0 * cor0.col1 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 + - col0 * + col0 AS col1 FROM tab1 AS cor0
----
-4039
-6304
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6541
SELECT DISTINCT - col0 + + CAST( + 23 * + col0 AS SIGNED ) col2 FROM tab2 AS cor0
----
154
1716
1738

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6541
SELECT DISTINCT - col0 + + CAST ( + 23 * + col0 AS INTEGER ) col2 FROM tab2 AS cor0
----
154
1716
1738

query I rowsort
SELECT DISTINCT - 47 FROM tab0, tab0 AS cor0
----
-47

query I rowsort
SELECT DISTINCT - + cor1.col0 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab0, tab0 AS cor2
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6544
SELECT ALL - col1 + col0 DIV - 94 AS col1 FROM tab2 cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6544
SELECT ALL - col1 + col0 / - 94 AS col1 FROM tab2 cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - + col2 col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6546
SELECT ALL + col0 + + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6546
SELECT ALL + col0 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col2 + 84 - col2 FROM tab1 AS cor0
----
-108
-24
-30

query I rowsort
SELECT DISTINCT - 63 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( 54 ) * + col2 * col2 + + 98 col2 FROM tab2 AS cor0
----
-36406
-39268
-77878

query I rowsort
SELECT - 79 AS col1 FROM tab2 cor0
----
-79
-79
-79

query I rowsort
SELECT ALL - col1 + col0 - col1 AS col0 FROM tab1
----
-49
44
54

query I rowsort
SELECT + 80 - + col2 * - col0 AS col2 FROM tab0 AS cor0
----
115
7378
872

query I rowsort
SELECT DISTINCT + ( col1 ) * col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL cor0.col1 * 15 FROM tab1, tab1 cor0
----
9 values hashing to e86c1144a1443e69e90e4492f722df0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-6555
SELECT DISTINCT - - col1 DIV - 63 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-6555
SELECT DISTINCT - - col1 / - 63 FROM tab1 cor0
----
0

query I rowsort
SELECT DISTINCT + ( 66 * col2 ) AS col2 FROM tab2
----
1716
1782
2508

query I rowsort
SELECT 44 * ( col0 ) FROM tab1
----
132
2816
3520

query I rowsort
SELECT 64 AS col0 FROM tab1
----
64
64
64

query I rowsort
SELECT - col1 * - 57 FROM tab0
----
4902
5187
5529

query I rowsort
SELECT ALL + 25 AS col2 FROM tab1 AS cor0
----
25
25
25

query I rowsort
SELECT DISTINCT + + col1 - + col1 * col2 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT col0 + col1 + - col2 AS col1 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT DISTINCT col0 - col1 AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - + col1 + col1 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT - + col0 + + col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL col1 * - col1 - - col1 * col2 * - 60 FROM tab0
----
-15229
-177676
-456001

query I rowsort
SELECT ALL + 40 FROM tab2
----
40
40
40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6568
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab2, tab0, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6568
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab2, tab0, tab0 AS cor0
----
NULL

query I rowsort
SELECT ( - col1 ) AS col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT ALL + 37 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT DISTINCT - tab2.col0 * col0 + + col1 AS col1 FROM tab2
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT - col1 * 5 FROM tab2 AS cor0
----
-155
-295
-85

query I rowsort
SELECT ( 5 ) FROM tab2 AS cor0
----
5
5
5

query I rowsort
SELECT DISTINCT - - ( + 57 ) FROM tab1 AS cor0
----
57

query I rowsort
SELECT ALL + col1 * - 14 * col1 FROM tab0 AS cor0
----
-103544
-115934
-131726

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
3
64
80

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2, tab1 AS cor3
----
3645 values hashing to 199388980dc5177ebebcfdbc0408ba02

query I rowsort
SELECT ALL col1 * - col0 AS col2 FROM tab1
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6579
SELECT ALL CAST( col1 AS SIGNED ) * + col2 FROM tab2
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-6579
SELECT ALL CAST ( col1 AS INTEGER ) * + col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT + ( tab0.col1 * - tab0.col2 ) AS col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - 10 + ( col1 ) AS col2 FROM tab2 AS cor0
----
21
49
7

query I rowsort
SELECT ALL - - ( cor0.col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0, tab2 cor1, tab1 AS cor2
----
972 values hashing to 4634d10e8b6b37510bb99745aade36ab

query I rowsort
SELECT DISTINCT + col2 * cor0.col0 + col1 FROM tab0 AS cor0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-6585
SELECT ALL + col1 * + col0 DIV cor0.col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6585
SELECT ALL + col1 * + col0 / cor0.col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT tab1.col2 * + col2 + col2 * + 84 - col0 AS col1 FROM tab1
----
17200
7449
7973

onlyif mysql # use DIV operator for integer division
query I rowsort label-6587
SELECT - col2 * col2 DIV - CAST( - col1 + + col0 AS SIGNED ) FROM tab1
----
-126
137
60

skipif mysql # not compatible
query I rowsort label-6587
SELECT - col2 * col2 / - CAST ( - col1 + + col0 AS INTEGER ) FROM tab1
----
-126
137
60

query I rowsort
SELECT ALL 53 - tab1.col0 * + 18 AS col2 FROM tab1
----
-1
-1099
-1387

query I rowsort
SELECT + 85 + - col1 AS col0 FROM tab1 AS cor0
----
59
72
75

query I rowsort
SELECT ALL col1 + + 87 FROM tab0 AS cor0
----
173
178
184

query I rowsort
SELECT col1 * ( col0 ) + col1 * - ( + col2 ) AS col1 FROM tab1 cor0
----
-1326
-208
70

query I rowsort
SELECT + col2 * ( 62 ) * + col2 - cor0.col0 FROM tab0 AS cor0
----
27
416799
67494

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6593
SELECT ALL + col1 + CAST( NULL AS SIGNED ) * - col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6593
SELECT ALL + col1 + CAST ( NULL AS INTEGER ) * - col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 + - 87 * col1 AS col2 FROM tab2 AS cor0
----
-1558
-2704
-5211

query I rowsort
SELECT DISTINCT col2 * - ( col0 ) + col1 * + col1 FROM tab1 AS cor0
----
-3548
-7511
514

query I rowsort
SELECT 24 * - col2 * - col0 AS col1 FROM tab2
----
4536
48672
72048

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-6598
SELECT DISTINCT + col1 + col0 * col2 DIV col1 FROM tab2 cor0
----
193
37
93

skipif mysql # not compatible
query I rowsort label-6598
SELECT DISTINCT + col1 + col0 * col2 / col1 FROM tab2 cor0
----
193
37
93

query I rowsort
SELECT - - col2 + 89 FROM tab0 cor0
----
122
171
90

query I rowsort
SELECT col0 * col0 * + 53 + cor0.col2 AS col1 FROM tab2 AS cor0
----
2624
322478
330811

query I rowsort
SELECT DISTINCT cor0.col0 + col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT ALL + col1 - 52 AS col2 FROM tab2 AS cor0
----
-21
-35
7

query I rowsort
SELECT + col0 * 92 + 66 * - col0 FROM tab1 AS cor0
----
1664
2080
78

query I rowsort
SELECT DISTINCT - 41 AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
-41

query I rowsort
SELECT - col1 * - 68 - 16 FROM tab1 cor0
----
1752
664
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6606
SELECT CAST( NULL AS SIGNED ) * + cor0.col0 col2 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6606
SELECT CAST ( NULL AS INTEGER ) * + cor0.col0 col2 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - - col2 + 44 - + col1 FROM tab0 cor0
----
-52
-9
35

query I rowsort
SELECT DISTINCT + - cor0.col2 * 32 FROM tab1 AS cor0
----
-1728
-1824
-3072

query I rowsort
SELECT DISTINCT - col0 * + ( - cor0.col1 + col1 ) AS col2 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6610
SELECT + + col2 DIV col0 + ( + col1 ) - + col2 * cor0.col0 AS col2 FROM tab0 cor0
----
-705
-7207
62

skipif mysql # not compatible
query I rowsort label-6610
SELECT + + col2 / col0 + ( + col1 ) - + col2 * cor0.col0 AS col2 FROM tab0 cor0
----
-705
-7207
62

query I rowsort
SELECT + col1 * ( + col2 ) - + col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT - - ( 54 ) + cor0.col2 * - col2 FROM tab1 cor0
----
-2862
-3195
-9162

query I rowsort
SELECT + - 93 + col1 FROM tab1 cor0
----
-67
-80
-83

query I rowsort
SELECT col2 + - col0 * - col0 FROM tab2 AS cor0
----
6110
6279
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6615
SELECT - - CAST( + 51 AS SIGNED ) + col1 AS col0 FROM tab2 AS cor0
----
110
68
82

skipif mysql # not compatible
query I rowsort label-6615
SELECT - - CAST ( + 51 AS INTEGER ) + col1 AS col0 FROM tab2 AS cor0
----
110
68
82

query I rowsort
SELECT + col1 + + col2 AS col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL col2 * col2 + + col0 FROM tab0
----
1113
36
6813

query I rowsort
SELECT col1 * col1 + - col2 FROM tab0
----
7363
8199
9408

query I rowsort
SELECT ALL + col1 * + col2 + ( - col2 ) FROM tab1
----
1152
1350
513

query I rowsort
SELECT - col0 + - 39 * + col2 * col0 AS col0 FROM tab1 cor0
----
-142336
-299600
-6321

query I rowsort
SELECT + + col0 * + col1 * + cor0.col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL - + col0 + col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT col2 + - col0 * col1 AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT 44 * + cor0.col2 + - col2 FROM tab1 AS cor0
----
2322
2451
4128

onlyif mysql # use DIV operator for integer division
query I rowsort label-6625
SELECT DISTINCT + col0 DIV + col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6625
SELECT DISTINCT + col0 / + col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT + 89 * col2 FROM tab2 AS cor0
----
2314
2403
3382

query I rowsort
SELECT ( + col2 ) + col2 AS col2 FROM tab2
----
52
54
76

query I rowsort
SELECT + col1 + ( + col2 ) FROM tab0
----
119
173
98

query I rowsort
SELECT col1 * col1 + + col2 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT - - col2 + 85 FROM tab2 AS cor0
----
111
112
123

query I rowsort
SELECT DISTINCT + col1 * - col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL + col0 * col2 + + col0 * col0 FROM tab0 AS cor0
----
1260
1368
15219

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 cor0, tab0 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to b34c9987c389223e07378cde8a36e94f

query I rowsort
SELECT 21 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
1134
1197
2016

query I rowsort
SELECT ALL + col1 + - ( - col2 + col1 ) * col1 FROM tab1
----
1092
480
754

query I rowsort
SELECT DISTINCT 48 + + col0 FROM tab0
----
137
72
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6638
SELECT ALL + CAST( NULL AS DECIMAL ) * - tab1.col1 + - col2 * ( tab1.col2 ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6638
SELECT ALL + CAST ( NULL AS REAL ) * - tab1.col1 + - col2 * ( tab1.col2 ) FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6639
SELECT ALL + col1 DIV cor0.col1 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6639
SELECT ALL + col1 / cor0.col1 AS col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - col2 + 91 FROM tab2 AS cor0
----
53
64
65

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ( cor0.col0 ) * col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + + 33 * - col0 + 93 AS col0 FROM tab1 AS cor0
----
-2019
-2547
-6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6644
SELECT ALL col0 + col2 / CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6644
SELECT ALL col0 + col2 / CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col2 + cor0.col0 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - - col1 * - col1 + col2 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 * + 1 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT col1 + - col0 + - col2 AS col2 FROM tab2 AS cor0
----
-100
-3
-45

query I rowsort
SELECT col2 + - col1 * - ( + col1 ) FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT - 23 + + col2 * col2 FROM tab2 AS cor0
----
1421
653
706

query I rowsort
SELECT - - ( col1 ) + ( - 8 ) FROM tab2 AS cor0
----
23
51
9

query I rowsort
SELECT DISTINCT + 15 + - col0 * cor0.col2 AS col1 FROM tab2 AS cor0
----
-174
-2013
-2987

query I rowsort
SELECT + 89 FROM tab2
----
89
89
89

query I rowsort
SELECT col0 * - ( 28 * col2 ) + ( - col0 ) AS col1 FROM tab1 AS cor0
----
-102208
-215120
-4539

onlyif mysql # use DIV operator for integer division
query I rowsort label-6655
SELECT + col1 DIV 15 - + 55 AS col1 FROM tab2 cor0
----
-52
-53
-54

skipif mysql # not compatible
query I rowsort label-6655
SELECT + col1 / 15 - + 55 AS col1 FROM tab2 cor0
----
-52
-53
-54

query I rowsort
SELECT + col0 + + cor0.col2 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6657
SELECT + col1 + col0 DIV col0 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-6657
SELECT + col1 + col0 / col0 FROM tab1 AS cor0
----
11
14
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - cor0.col1 col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT - col1 * + col2 + + col0 * col1 AS col2 FROM tab0 AS cor0
----
-774
3298
637

query I rowsort
SELECT - col1 - - col1 AS col0 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6661
SELECT ALL + 79 + tab0.col1 DIV col0 + 21 FROM tab0
----
101
102
103

skipif mysql # not compatible
query I rowsort label-6661
SELECT ALL + 79 + tab0.col1 / col0 + 21 FROM tab0
----
101
102
103

query I rowsort
SELECT ( tab0.col1 ) FROM tab0
----
86
91
97

query I rowsort
SELECT col0 * ( col2 ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT cor0.col1 * - col1 + col0 + - col0 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-6665
SELECT ALL col1 DIV - col2 + + 38 * - col0 col0 FROM tab1
----
-114
-2432
-3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6665
SELECT ALL col1 / - col2 + + 38 * - col0 col0 FROM tab1
----
-114
-2432
-3040

query I rowsort
SELECT col2 * - cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + col1 * - col1 + col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT + 89 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT 35 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 43 col0 FROM tab0 AS cor0
----
-43

query I rowsort
SELECT - col0 - + col1 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT - col2 * 47 FROM tab2
----
-1222
-1269
-1786

query I rowsort
SELECT ALL + col2 * + col1 + + col0 FROM tab0 cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-6674
SELECT + ( + 48 ) DIV col1 - - col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6674
SELECT + ( + 48 ) / col1 - - col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - ( - cor0.col2 ) + + col2 FROM tab2 AS cor0
----
52
54
76

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + 73 AS REAL ) + + cor0.col2 FROM tab0 AS cor0
----
-40
-72
9

query I rowsort
SELECT - + col2 * col0 + - col2 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT + 65 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

skipif mysql # not compatible
query I rowsort
SELECT + col0 * CAST ( col2 * col0 + col2 AS REAL ) AS col1 FROM tab0
----
1260
19800
656820

query I rowsort
SELECT DISTINCT tab1.col2 * + 63 - + col2 AS col1 FROM tab1
----
3348
3534
5952

query I rowsort
SELECT col0 * col0 - 34 AS col2 FROM tab0
----
1191
542
7887

query I rowsort
SELECT DISTINCT col2 * - col0 + + col1 * col2 - + ( + 53 ) * col0 FROM tab1
----
-10672
-6470
1083

query I rowsort
SELECT col0 * + ( col2 ) * col1 + + 89 AS col1 FROM tab0
----
3484
664207
68201

query I rowsort
SELECT 39 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

onlyif mysql # use DIV operator for integer division
query I rowsort label-6685
SELECT ALL col2 - col0 * 30 DIV col0 AS col1 FROM tab0
----
-29
3
52

skipif mysql # not compatible
query I rowsort label-6685
SELECT ALL col2 - col0 * 30 / col0 AS col1 FROM tab0
----
-29
3
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 + - col2 ) col0 FROM tab1
----
28
47
83

query I rowsort
SELECT DISTINCT tab2.col0 * 21 + + tab2.col0 FROM tab2
----
154
1716
1738

query I rowsort
SELECT cor0.col1 + - col2 * + col0 * col2 AS col1 FROM tab0 AS cor0
----
-26050
-598345
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6689
SELECT ALL - - CAST( NULL AS SIGNED ) + - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6689
SELECT ALL - - CAST ( NULL AS INTEGER ) + - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6690
SELECT ALL - ( - 48 ) DIV + col2 + col2 FROM tab0 AS cor0
----
34
49
82

skipif mysql # not compatible
query I rowsort label-6690
SELECT ALL - ( - 48 ) / + col2 + col2 FROM tab0 AS cor0
----
34
49
82

query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col2 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6692
SELECT CAST( NULL AS SIGNED ) * 6 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6692
SELECT CAST ( NULL AS INTEGER ) * 6 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 75 FROM tab1 AS cor0
----
-75

query I rowsort
SELECT - 10 + cor0.col0 + + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ec71ac9bd95b2e512e11a8a44d1e618d

query I rowsort
SELECT ALL + cor1.col2 + 97 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 64b28c86e19477c17cfc8ee358d1395b

query I rowsort
SELECT ( - col0 ) * + col0 AS col1 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL ( - col1 ) FROM tab0
----
-86
-91
-97

query I rowsort
SELECT + col2 - cor0.col0 AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT cor0.col2 - + col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + col2 + ( + 28 ) AS col1 FROM tab0 AS cor0
----
110
29
61

query I rowsort
SELECT + col1 - + ( - col1 ) * - col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT col0 + - 62 AS col0 FROM tab2
----
-55
16
17

query I rowsort
SELECT + 55 AS col2 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT ALL + tab0.col2 + - col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - col0 - + ( - col2 ) FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + col2 * + 92 FROM tab1 cor0
----
4968
5244
8832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6707
SELECT ALL col1 + CAST( + col0 AS SIGNED ) FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-6707
SELECT ALL col1 + CAST ( + col0 AS INTEGER ) FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6708
SELECT DISTINCT + col0 * CAST( NULL AS SIGNED ) + col2 * - col0 * 50 - - col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6708
SELECT DISTINCT + col0 * CAST ( NULL AS INTEGER ) + col2 * - col0 * 50 - - col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col1 * + 52 + col1 AS col1 FROM tab2 AS cor0
----
1643
3127
901

query I rowsort
SELECT DISTINCT ( cor0.col2 ) * + col0 + - 48 AS col1 FROM tab1 cor0
----
114
3600
7632

query I rowsort
SELECT + - 42 + - col0 * cor0.col1 FROM tab1 AS cor0
----
-1082
-120
-682

query I rowsort
SELECT DISTINCT + 92 + - col0 * - col2 FROM tab2 AS cor0
----
2120
281
3094

query I rowsort
SELECT ALL - 92 - + col1 AS col1 FROM tab0 AS cor0
----
-178
-183
-189

query I rowsort
SELECT ALL 17 * col0 - 27 AS col1 FROM tab0 AS cor0
----
1486
381
568

query I rowsort
SELECT + - col1 * + col0 AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6716
SELECT + ( col2 ) * cor0.col1 DIV cor0.col0 FROM tab2 AS cor0
----
119
19
8

skipif mysql # not compatible
query I rowsort label-6716
SELECT + ( col2 ) * cor0.col1 / cor0.col0 FROM tab2 AS cor0
----
119
19
8

query I rowsort
SELECT ALL col0 * col1 - + ( col2 + col0 ) AS col2 FROM tab0 AS cor0
----
2007
3359
7928

query I rowsort
SELECT - col2 + + col1 - ( + 9 ) FROM tab0 AS cor0
----
0
44
87

query I rowsort
SELECT DISTINCT 9 FROM tab0, tab2 cor0
----
9

query I rowsort
SELECT + - col0 + col0 * - col0 AS col1 FROM tab1 AS cor0
----
-12
-4160
-6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-6721
SELECT col2 DIV col1 + + col1 AS col1 FROM tab2
----
19
31
59

skipif mysql # not compatible
query I rowsort label-6721
SELECT col2 / col1 + + col1 AS col1 FROM tab2
----
19
31
59

query I rowsort
SELECT - 52 * col0 * - cor0.col2 FROM tab0 AS cor0
----
1820
379496
41184

query I rowsort
SELECT DISTINCT + + col1 * + col1 AS col1 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT + - col0 * + cor0.col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT - + col1 * col2 + col2 FROM tab1 AS cor0
----
-1152
-1350
-513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * ( + 24 ) col0 FROM tab2 AS cor0
----
-1416
-408
-744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - cor0.col0 ) * + col1 + 6 col2 FROM tab0 AS cor0
----
-2058
-3389
-8093

query I rowsort
SELECT ALL ( cor0.col0 ) FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT - + 57 FROM tab1 AS cor0
----
-57
-57
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6730
SELECT - col2 * cor0.col1 DIV - col2 AS col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6730
SELECT - col2 * cor0.col1 / - col2 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col1 + ( tab0.col0 ) AS col2 FROM tab0
----
110
132
180

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab2, tab2 cor1, tab1 AS cor2
----
972 values hashing to 263f0eb7d5dfd4076c74918bc141bd9b

onlyif mysql # use DIV operator for integer division
query I rowsort label-6733
SELECT - 75 DIV - col1 col1 FROM tab1
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6733
SELECT - 75 / - col1 col1 FROM tab1
----
2
5
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6734
SELECT ALL ( + 95 ) * col2 + CAST( NULL AS SIGNED ) + - 8 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6734
SELECT ALL ( + 95 ) * col2 + CAST ( NULL AS INTEGER ) + - 8 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( 65 ) - col0 FROM tab0
----
-24
30
41

query I rowsort
SELECT col0 + - col1 + col1 AS col0 FROM tab1
----
3
64
80

query I rowsort
SELECT - 84 FROM tab0, tab1 cor0
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

query I rowsort
SELECT DISTINCT 8 - col2 AS col0 FROM tab0
----
-25
-74
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6739
SELECT - 49 DIV col1 AS col2 FROM tab1
----
-1
-3
-4

skipif mysql # not compatible
query I rowsort label-6739
SELECT - 49 / col1 AS col2 FROM tab1
----
-1
-3
-4

query I rowsort
SELECT 30 FROM tab1, tab1 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT + cor0.col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-6742
SELECT col1 DIV + ( col0 ) FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-6742
SELECT col1 / + ( col0 ) FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT DISTINCT - + col1 + col1 + cor0.col0 * col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + ( col2 ) * - col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL col2 * 81 FROM tab1
----
4374
4617
7776

query I rowsort
SELECT DISTINCT cor0.col1 + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + 92 * col0 AS col1 FROM tab2 AS cor0
----
644
7176
7268

query I rowsort
SELECT 29 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - cor0.col0 - 67 col2 FROM tab1 AS cor0
----
-229
-3715
-7747

query I rowsort
SELECT ALL + 21 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query I rowsort
SELECT ALL - + cor0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT col1 * 34 FROM tab2
----
1054
2006
578

query I rowsort
SELECT ALL - col0 + - ( col0 ) * - col2 FROM tab2 AS cor0
----
182
1950
2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6754
SELECT ALL + col2 + + ( + ( cor0.col0 ) ) + CAST( + col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
182
196
41

skipif mysql # not compatible
query I rowsort label-6754
SELECT ALL + col2 + + ( + ( cor0.col0 ) ) + CAST ( + col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT ALL + 64 + cor1.col1 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to fb2b68e27cc55e70db4792e082986dd6

query I rowsort
SELECT - - col0 + ( + cor0.col0 ) * - col0 AS col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT ALL cor0.col2 * col0 * - cor0.col2 + - col0 FROM tab0 AS cor0
----
-26160
-598525
-70

query I rowsort
SELECT - + ( + 80 ) FROM tab0 AS cor0
----
-80
-80
-80

query I rowsort
SELECT ALL 75 - + 42 AS col0 FROM tab2 AS cor0
----
33
33
33

query I rowsort
SELECT DISTINCT - ( + col0 ) * + col2 + + col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT - - cor0.col1 FROM tab0 cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 + col1 col2 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL + + 91 * - col2 AS col2 FROM tab1 AS cor0
----
-4914
-5187
-8736

query I rowsort
SELECT ALL - 68 FROM tab1, tab2 AS cor0
----
9 values hashing to 5febf382d36d6e0191889c41b928786f

onlyif mysql # use DIV operator for integer division
query I rowsort label-6765
SELECT - col1 DIV 57 + + col0 AS col0 FROM tab2
----
7
77
79

skipif mysql # not compatible
query I rowsort label-6765
SELECT - col1 / 57 + + col0 AS col0 FROM tab2
----
7
77
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - 21 col2 FROM tab2 AS cor0
----
17
5
6

query I rowsort
SELECT ( - col2 ) * - col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT 84 * + col2 AS col2 FROM tab0
----
2772
6888
84

query I rowsort
SELECT DISTINCT ( - col0 ) AS col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ALL col0 - + col0 * + ( + tab1.col2 ) FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT 85 * col1 AS col0 FROM tab1
----
1105
2210
850

query I rowsort
SELECT ALL ( col1 + col0 ) FROM tab1
----
29
74
93

query I rowsort
SELECT - + 93 + + col2 AS col0 FROM tab1 AS cor0
----
-36
-39
3

query I rowsort
SELECT - col0 + - 58 FROM tab1 AS cor0
----
-122
-138
-61

query I rowsort
SELECT col2 + cor0.col1 * - ( col0 ) FROM tab0 AS cor0
----
-2031
-3394
-8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 * + col1 col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT col0 * cor0.col2 + col2 * col0 FROM tab2 AS cor0
----
378
4056
6004

query I rowsort
SELECT DISTINCT 44 * col0 AS col0 FROM tab0
----
1056
1540
3916

query I rowsort
SELECT ALL col2 + 40 FROM tab1 AS cor0
----
136
94
97

query I rowsort
SELECT DISTINCT - col2 - - col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + + col1 * + 88 + col2 FROM tab2 AS cor0
----
1534
2755
5218

query I rowsort
SELECT 11 * + 4 FROM tab1 cor0
----
44
44
44

query I rowsort
SELECT ALL - col2 * + tab2.col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT 69 * col1 * - col1 FROM tab1 AS cor0
----
-11661
-46644
-6900

query I rowsort
SELECT + ( + col2 ) * - col2 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-6786
SELECT + 98 + col2 * col1 DIV 91 FROM tab2 cor0
----
105
107
114

skipif mysql # not compatible
query I rowsort label-6786
SELECT + 98 + col2 * col1 / 91 FROM tab2 cor0
----
105
107
114

query I rowsort
SELECT - col0 + cor0.col0 * + col2 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT + 38 AS col2 FROM tab1 AS cor0
----
38
38
38

query I rowsort
SELECT + - 23 FROM tab2 AS cor0
----
-23
-23
-23

query I rowsort
SELECT - 33 AS col2 FROM tab1 AS cor0
----
-33
-33
-33

query I rowsort
SELECT ( - col1 ) * col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6792
SELECT + ( - tab2.col2 + + tab2.col2 ) * - CAST( col1 AS SIGNED ) FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6792
SELECT + ( - tab2.col2 + + tab2.col2 ) * - CAST ( col1 AS INTEGER ) FROM tab2
----
0
0
0

query I rowsort
SELECT + cor1.col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - ( - col2 ) * - col2 AS col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT - - 36 + col1 AS col0 FROM tab0 AS cor0
----
122
127
133

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( col2 ) col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - + 90 FROM tab1 AS cor0
----
-90
-90
-90

query I rowsort
SELECT + col1 * col1 * 15 FROM tab1 AS cor0
----
10140
1500
2535

query I rowsort
SELECT ALL + + col1 * - col1 * - col2 AS col1 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT DISTINCT + + ( col1 ) * col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT col2 + - col2 * + 53 FROM tab1 AS cor0
----
-2808
-2964
-4992

onlyif mysql # use DIV operator for integer division
query I rowsort label-6802
SELECT ALL + - col0 + - col2 DIV col1 + + 12 DIV col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6802
SELECT ALL + - col0 + - col2 / col1 + + 12 / col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + 83 * col2 AS col1 FROM tab0 AS cor0
----
2739
6806
83

query I rowsort
SELECT 15 - col2 FROM tab1 AS cor0
----
-39
-42
-81

query I rowsort
SELECT ALL + 84 * - col2 FROM tab0 AS cor0
----
-2772
-6888
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 1 col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + cor0.col0 + col2 FROM tab1 cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6808
SELECT + + 49 DIV col0 col0 FROM tab0 AS cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6808
SELECT + + 49 / col0 col0 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT DISTINCT 8 FROM tab0, tab1 AS cor0
----
8

query I rowsort
SELECT ALL tab0.col1 - - col1 * tab0.col1 AS col2 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT + 72 + 33 * cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 727554aa7666e47c65ff4b45a2273d01

query I rowsort
SELECT + 28 * col1 + ( - col2 ) * - col0 AS col1 FROM tab1 AS cor0
----
3928
8044
890

query I rowsort
SELECT - + col1 * - col1 + + col0 - col2 AS col0 FROM tab2 AS cor0
----
330
3533
941

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab1, tab1 cor1
----
972 values hashing to d222ba302bd1ddd1c8b2ddf1a4d0b07a

onlyif mysql # use DIV operator for integer division
query I rowsort label-6815
SELECT ALL + cor0.col2 + + col2 DIV col0 AS col2 FROM tab0 AS cor0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-6815
SELECT ALL + cor0.col2 + + col2 / col0 AS col2 FROM tab0 AS cor0
----
1
34
82

query I rowsort
SELECT ALL + ( col2 ) + cor0.col2 * 50 AS col0 FROM tab1 AS cor0
----
2754
2907
4896

onlyif mysql # use DIV operator for integer division
query I rowsort label-6817
SELECT - col1 DIV col2 AS col0 FROM tab0 cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-6817
SELECT - col1 / col2 AS col0 FROM tab0 cor0
----
-1
-2
-97

query I rowsort
SELECT DISTINCT + 56 AS col2 FROM tab2 AS cor0
----
56

query I rowsort
SELECT - col0 + ( col1 ) * + col1 * col2 AS col1 FROM tab2
----
10903
25940
90428

query I rowsort
SELECT DISTINCT col2 + - col0 * ( - col1 * + col1 ) AS col2 FROM tab1
----
13616
2082
6457

query I rowsort
SELECT col1 + + 33 AS col1 FROM tab2
----
50
64
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-6822
SELECT DISTINCT 84 DIV + tab1.col0 FROM tab1
----
1
28

skipif mysql # not compatible
query I rowsort label-6822
SELECT DISTINCT 84 / + tab1.col0 FROM tab1
----
1
28

query I rowsort
SELECT ALL 56 FROM tab0
----
56
56
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6824
SELECT DISTINCT - ( + col0 ) / col2 + + CAST( NULL AS SIGNED ) + col2 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6824
SELECT DISTINCT - ( + col0 ) / col2 + + CAST ( NULL AS INTEGER ) + col2 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL - col1 + 25 * col2 AS col0 FROM tab2 AS cor0
----
591
644
933

query I rowsort
SELECT DISTINCT - col0 * col0 - col1 * - col0 FROM tab2 AS cor0
----
-1482
-4898
168

query I rowsort
SELECT col2 * 46 AS col2 FROM tab1 AS cor0
----
2484
2622
4416

query I rowsort
SELECT DISTINCT - + cor0.col0 * col1 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL col2 * ( + col1 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT col1 * 77 * + col0 FROM tab1 AS cor0
----
49280
6006
80080

query I rowsort
SELECT ALL + - col2 * 69 FROM tab1 AS cor0
----
-3726
-3933
-6624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 + col0 col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6833
SELECT ALL - col0 / + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6833
SELECT ALL - col0 / + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6834
SELECT DISTINCT + - col2 DIV 87 + - col1 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6834
SELECT DISTINCT + - col2 / 87 + - col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - col1 * cor0.col0 - - col1 * col2 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT + - cor0.col2 * + col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - + cor0.col1 + - 89 FROM tab1 AS cor0
----
-102
-115
-99

query I rowsort
SELECT - + col0 + + col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 60 + 5 FROM tab2 AS cor0
----
65

query I rowsort
SELECT + ( col2 ) - col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 * 11 FROM tab2, tab1 AS cor0
----
9 values hashing to 3cc87622a8962ac006100580f8aa516b

query I rowsort
SELECT - col0 - - 88 FROM tab1 AS cor0
----
24
8
85

query I rowsort
SELECT ALL col0 - - col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT + 75 + col1 AS col2 FROM tab0 AS cor0
----
161
166
172

query I rowsort
SELECT ALL + 33 AS col2 FROM tab0 AS cor0
----
33
33
33

query I rowsort
SELECT + + 78 * + col2 FROM tab2 AS cor0
----
2028
2106
2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-6847
SELECT DISTINCT + cor0.col2 DIV + 67 AS col1 FROM tab0, tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6847
SELECT DISTINCT + cor0.col2 / + 67 AS col1 FROM tab0, tab2 AS cor0
----
0

query I rowsort
SELECT ALL col1 - ( - tab1.col1 + - col0 ) * - col0 * col2 FROM tab1
----
-269942
-4672
-714227

query I rowsort
SELECT ALL col0 - 96 FROM tab2
----
-17
-18
-89

query I rowsort
SELECT ALL + - 35 AS col0 FROM tab1 AS cor0
----
-35
-35
-35

query I rowsort
SELECT ALL + 1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + cor0.col1 * col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT + 84 + + col1 * col1 FROM tab2 AS cor0
----
1045
3565
373

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6854
SELECT ALL + CAST( NULL AS SIGNED ) / tab0.col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6854
SELECT ALL + CAST ( NULL AS INTEGER ) / tab0.col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * 10 - + col0 FROM tab0
----
821
836
935

query I rowsort
SELECT col2 * col2 + + 50 FROM tab1 AS cor0
----
2966
3299
9266

query I rowsort
SELECT - tab0.col2 * col0 + + col1 AS col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT - col0 * - ( - col0 ) AS col1 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL tab1.col1 + - tab1.col0 AS col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to bae587a8285614200d114dd089f83a2b

query I rowsort
SELECT DISTINCT + 50 FROM tab0
----
50

query I rowsort
SELECT - col1 + - col0 * + ( col2 ) FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT ( 14 ) AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

query I rowsort
SELECT tab0.col0 * + col2 * + col2 + ( + col0 ) FROM tab0
----
26160
598525
70

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0, tab0 AS cor0, tab1 AS cor1
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6865
SELECT - col2 * CAST( NULL AS DECIMAL ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6865
SELECT - col2 * CAST ( NULL AS REAL ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 20 FROM tab2, tab1 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT ALL + ( - col0 ) AS col0 FROM tab0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6868
SELECT - col1 DIV col0 + ( col2 ) AS col0 FROM tab1
----
46
57
96

skipif mysql # not compatible
query I rowsort label-6868
SELECT - col1 / col0 + ( col2 ) AS col0 FROM tab1
----
46
57
96

query I rowsort
SELECT + 99 FROM tab1, tab0 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + 74 * - col0 col1 FROM tab0
----
-42624
-586154
-90650

onlyif mysql # use DIV operator for integer division
query I rowsort label-6871
SELECT col1 DIV - ( col1 + - col0 ) AS col1 FROM tab0 cor0
----
-1
-1
-45

skipif mysql # not compatible
query I rowsort label-6871
SELECT col1 / - ( col1 + - col0 ) AS col1 FROM tab0 cor0
----
-1
-1
-45

onlyif mysql # use DIV operator for integer division
query I rowsort label-6872
SELECT ALL + col0 DIV + col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6872
SELECT ALL + col0 / + col0 FROM tab2
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6873
SELECT DISTINCT - col2 * - CAST( col1 AS SIGNED ) col0 FROM tab1
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6873
SELECT DISTINCT - col2 * - CAST ( col1 AS INTEGER ) col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT + ( + col0 * col2 ) + ( tab2.col2 * + col0 ) AS col1 FROM tab2
----
378
4056
6004

query I rowsort
SELECT ALL tab1.col0 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + ( + col2 ) col1 FROM tab1
----
-7
16
51

query I rowsort
SELECT ALL ( + ( col0 ) ) + + col0 * 56 * + col1 AS col1 FROM tab2
----
12159
257790
75287

query I rowsort
SELECT ( + col0 ) * ( + col1 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + cor1.col1 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL + cor0.col1 * col2 + col1 + - col2 FROM tab0 cor0
----
193
2891
7471

query I rowsort
SELECT ALL 42 + col0 * - col1 FROM tab0 AS cor0
----
-2022
-3353
-8057

query I rowsort
SELECT DISTINCT - col0 + col0 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - col0 + - col2 + ( col2 ) FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * + col1 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + 79 * cor1.col1 * cor0.col2 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 458406b6c7a35284e9dce5a6e4164591

query I rowsort
SELECT - 46 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 491ad1fb79fec0b5715ea54949d1aa2d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col0 ) + col1 col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT 64 + cor0.col2 AS col0 FROM tab0 AS cor0
----
146
65
97

query I rowsort
SELECT DISTINCT + cor0.col2 + - col2 + - col1 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-6890
SELECT + col0 DIV col0 + + col0 * + col1 col0 FROM tab2 AS cor0
----
1344
218
4603

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6890
SELECT + col0 / col0 + + col0 * + col1 col0 FROM tab2 AS cor0
----
1344
218
4603

onlyif mysql # use DIV operator for integer division
query I rowsort label-6891
SELECT ALL + col0 DIV col1 AS col2 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-6891
SELECT ALL + col0 / col1 AS col2 FROM tab1 AS cor0
----
0
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-6892
SELECT DISTINCT - + col0 DIV col0 AS col1 FROM tab2 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-6892
SELECT DISTINCT - + col0 / col0 AS col1 FROM tab2 cor0
----
-1

query I rowsort
SELECT DISTINCT - + col0 + + col1 * ( 20 ) FROM tab1 AS cor0
----
136
180
517

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col2 * - col1 + + ( + col0 ) col2 FROM tab0 AS cor0
----
-611795
-62
-93630

onlyif mysql # use DIV operator for integer division
query I rowsort label-6895
SELECT + ( col0 ) DIV 90 + + 45 + col2 FROM tab1
----
102
141
99

skipif mysql # not compatible
query I rowsort label-6895
SELECT + ( col0 ) / 90 + + 45 + col2 FROM tab1
----
102
141
99

query I rowsort
SELECT ALL 68 - col0 FROM tab0
----
-21
33
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( tab0.col1 ) + col2 - col2 col0 FROM tab0
----
86
91
97

query I rowsort
SELECT tab2.col1 - col1 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT tab1.col2 * col2 * + 55 + col2 AS col0 FROM tab1
----
160434
178752
506976

query I rowsort
SELECT DISTINCT + col1 * + col0 * tab0.col0 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT - 12 * + col0 AS col2 FROM tab2
----
-84
-936
-948

query I rowsort
SELECT - col0 - - col2 AS col2 FROM tab2
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-6903
SELECT + col0 DIV col0 - + col0 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-6903
SELECT + col0 / col0 - + col0 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT + + col2 + col0 * - ( 99 ) - col0 FROM tab2 AS cor0
----
-673
-7774
-7862

query I rowsort
SELECT + 46 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT + 88 AS col1 FROM tab2, tab1 AS cor0
----
88

query I rowsort
SELECT 88 * col1 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
14872
59488
8800

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 3581f59ff9574f9d6290fc6bca0b5e4d

query I rowsort
SELECT + col2 + 17 AS col2 FROM tab0 AS cor0
----
18
50
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-6911
SELECT DISTINCT - + col0 DIV + col2 + col2 + ( col2 ) DIV col2 FROM tab1 AS cor0
----
55
57
97

skipif mysql # not compatible
query I rowsort label-6911
SELECT DISTINCT - + col0 / + col2 + col2 + ( col2 ) / col2 FROM tab1 AS cor0
----
55
57
97

query I rowsort
SELECT ( col2 ) * col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - 97 FROM tab1 cor0
----
-97
-97
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col1 ) col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - 56 + + 70 FROM tab0 AS cor0
----
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-6916
SELECT DISTINCT + col0 + - col2 DIV cor0.col0 AS col0 FROM tab0 cor0
----
23
35
89

skipif mysql # not compatible
query I rowsort label-6916
SELECT DISTINCT + col0 + - col2 / cor0.col0 AS col0 FROM tab0 cor0
----
23
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6917
SELECT DISTINCT + + 77 DIV col2 + - col2 FROM tab1 AS cor0
----
-53
-56
-96

skipif mysql # not compatible
query I rowsort label-6917
SELECT DISTINCT + + 77 / col2 + - col2 FROM tab1 AS cor0
----
-53
-56
-96

query I rowsort
SELECT - 64 AS col1 FROM tab0
----
-64
-64
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - col2 col2 FROM tab0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-6920
SELECT ALL + cor0.col2 DIV + cor0.col2 FROM tab1, tab1 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-6920
SELECT ALL + cor0.col2 / + cor0.col2 FROM tab1, tab1 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT + ( col0 ) * - col1 + 84 AS col0 FROM tab2
----
-1259
-133
-4518

query I rowsort
SELECT ALL - - ( - col1 ) + col1 * col0 - 0 * col1 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT - + 74 + col1 * col2 FROM tab2 AS cor0
----
1460
572
763

query I rowsort
SELECT ALL col2 + 62 FROM tab0 AS cor0
----
144
63
95

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0, tab2 cor1, tab0 AS cor2
----
972 values hashing to 380241bbc503a31e70494611a87ffd99

query I rowsort
SELECT DISTINCT + ( + col2 ) * + col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL + col0 * - col0 + col1 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT ALL - + col1 + + ( + col2 ) * + col2 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT ALL cor1.col1 + + cor0.col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to dbf53c8d395fe624f70bcff710ecddf8

query I rowsort
SELECT - - ( 6 ) * + cor0.col1 FROM tab0 AS cor0
----
516
546
582

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6931
SELECT ALL - - cor0.col0 * col0 * CAST( 92 AS SIGNED ) FROM tab0 AS cor0
----
112700
52992
728732

skipif mysql # not compatible
query I rowsort label-6931
SELECT ALL - - cor0.col0 * col0 * CAST ( 92 AS INTEGER ) FROM tab0 AS cor0
----
112700
52992
728732

query I rowsort
SELECT - col2 + + col1 * 34 FROM tab1 AS cor0
----
283
346
830

query I rowsort
SELECT DISTINCT col1 * cor0.col1 + - ( col0 ) FROM tab1 cor0
----
36
673
89

query I rowsort
SELECT + 86 * - col2 FROM tab0 AS cor0
----
-2838
-7052
-86

query I rowsort
SELECT ALL + - cor0.col0 + col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6936
SELECT - + ( - col1 ) * + CAST( col2 AS SIGNED ) + col1 AS col0 FROM tab1 AS cor0
----
1261
1430
580

skipif mysql # not compatible
query I rowsort label-6936
SELECT - + ( - col1 ) * + CAST ( col2 AS INTEGER ) + col1 AS col0 FROM tab1 AS cor0
----
1261
1430
580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + - col2 * - ( 78 ) col2 FROM tab0 AS cor0
----
2541
6314
77

query I rowsort
SELECT - col2 * col1 + 60 AS col0 FROM tab1 AS cor0
----
-1188
-1344
-510

onlyif mysql # use DIV operator for integer division
query I rowsort label-6939
SELECT DISTINCT - + ( col1 ) DIV col0 + col1 FROM tab1 AS cor0
----
10
13
18

skipif mysql # not compatible
query I rowsort label-6939
SELECT DISTINCT - + ( col1 ) / col0 + col1 FROM tab1 AS cor0
----
10
13
18

query I rowsort
SELECT ALL 6 - cor0.col0 FROM tab1 AS cor0
----
-58
-74
3

query I rowsort
SELECT DISTINCT + + cor0.col1 * cor0.col0 + - col1 AS col2 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT + col2 + tab0.col0 AS col0 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT 76 AS col0 FROM tab0 AS cor0
----
76

query I rowsort
SELECT DISTINCT - - 12 * + col0 + ( col2 ) * cor0.col1 AS col0 FROM tab0 cor0
----
3126
517
8530

query I rowsort
SELECT DISTINCT 11 FROM tab2 AS cor0
----
11

query I rowsort
SELECT ALL - cor0.col1 * - col1 + col0 * col2 * col0 FROM tab0 AS cor0
----
10634
26404
657803

query I rowsort
SELECT - cor0.col2 * 90 + 33 AS col0 FROM tab0 AS cor0
----
-2937
-57
-7347

query I rowsort
SELECT DISTINCT - + cor0.col2 * ( - 37 ) - - col0 FROM tab2 AS cor0
----
1006
1040
1485

query I rowsort
SELECT ALL cor0.col1 * - col0 AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + cor0.col2 + - col0 * + cor0.col1 + col2 FROM tab1 AS cor0
----
-526
-848
30

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col2 + CAST ( 16 AS REAL ) + + cor0.col0 FROM tab2 AS cor0
----
120
133
50

query I rowsort
SELECT - + col2 * col1 * - col0 + col2 + - 41 FROM tab2 AS cor0
----
119637
51031
5845

query I rowsort
SELECT + cor0.col2 * + ( + 12 ) AS col0 FROM tab0 AS cor0
----
12
396
984

query I rowsort
SELECT DISTINCT + col2 + - cor0.col1 AS col0 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT - - col0 + + col1 AS col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT col1 * 21 * cor0.col1 AS col0 FROM tab2 AS cor0
----
20181
6069
73101

query I rowsort
SELECT DISTINCT - col2 * + 15 FROM tab2 AS cor0
----
-390
-405
-570

query I rowsort
SELECT - cor0.col2 * 51 FROM tab0 AS cor0
----
-1683
-4182
-51

query I rowsort
SELECT col2 * 63 AS col1 FROM tab2
----
1638
1701
2394

query I rowsort
SELECT col0 * - 86 FROM tab0 AS cor0
----
-2064
-3010
-7654

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 25 * - col1 + - 81 * col1 * - col0 FROM tab2
----
108358
16802
371287

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col2 col0 FROM tab0
----
-164
-2
-66

query I rowsort
SELECT ALL + 57 * cor0.col0 * + 71 AS col0 FROM tab0, tab1, tab0 cor0
----
27 values hashing to a81a51bd9a4bd7fc852bfbe10d4bd018

query I rowsort
SELECT DISTINCT col2 * + tab1.col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT 77 AS col0 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

onlyif mysql # use DIV operator for integer division
query I rowsort label-6967
SELECT DISTINCT + col1 DIV + col0 FROM tab2
----
0
4

skipif mysql # not compatible
query I rowsort label-6967
SELECT DISTINCT + col1 / + col0 FROM tab2
----
0
4

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL + 83 AS col1 FROM tab1, tab0 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 5ced3720d5aeff0dd77d5059a38001b6

onlyif mysql # use DIV operator for integer division
query I rowsort label-6970
SELECT + - col1 DIV cor0.col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6970
SELECT + - col1 / cor0.col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + col2 * ( + col0 ) FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6972
SELECT + col1 DIV - 31 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6972
SELECT + col1 / - 31 AS col2 FROM tab1 AS cor0
----
0
0
0

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT + col2 + - col0 > NULL
----

query I rowsort
SELECT col0 * + col0 + + col0 AS col1 FROM tab1
----
12
4160
6480

query I rowsort
SELECT + tab1.col2 * + col0 + - col2 AS col1 FROM tab1
----
108
3591
7584

query I rowsort
SELECT ALL col0 * - col1 * tab0.col0 AS col0 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT col2 - - col1 * tab2.col1 FROM tab2 WHERE NOT ( NULL ) <= ( NULL )
----

query I rowsort
SELECT ALL + tab1.col0 * col1 * col2 FROM tab1
----
36480
4212
99840

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NULL ) <= ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col2 col1 FROM tab0
----
119
173
98

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) NOT BETWEEN ( col2 ) AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6982
SELECT DISTINCT col1 DIV + col0 - col0 FROM tab0
----
-21
-33
-88

skipif mysql # not compatible
query I rowsort label-6982
SELECT DISTINCT col1 / + col0 - col0 FROM tab0
----
-21
-33
-88

query I rowsort
SELECT - col2 * col0 * - col1 + + col2 * col2 AS col0 FROM tab2
----
120328
52478
6588

query I rowsort
SELECT DISTINCT + col1 * + col2 + - col2 AS col2 FROM tab2
----
1508
608
810

query I rowsort
SELECT DISTINCT col2 - col0 AS col1 FROM tab0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + - col0 * cor0.col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6987
SELECT - + cor0.col2 DIV - col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6987
SELECT - + cor0.col2 / - col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT ALL col0 + + cor0.col0 * col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT ALL + + 29 + + col2 * + col1 FROM tab0 AS cor0
----
126
2867
7491

query I rowsort
SELECT col0 * - col2 + 12 FROM tab1 cor0
----
-150
-3636
-7668

query I rowsort
SELECT DISTINCT 7 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-182
-70
-91

query I rowsort
SELECT col2 * + tab0.col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT col1 * col1 + - col2 * - col1 FROM tab2
----
1798
5015
935

query I rowsort
SELECT DISTINCT - + 79 AS col1 FROM tab2 AS cor0
----
-79

query I rowsort
SELECT - col2 * col2 + 12 AS col1 FROM tab2 AS cor0
----
-1432
-664
-717

query I rowsort
SELECT - cor0.col0 - - col1 * cor0.col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT - + 73 * + col2 + - cor0.col1 * col1 * + col0 AS col2 FROM tab2 AS cor0
----
-25605
-273416
-8698

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 82 * + col2 + + cor0.col1 col0 FROM tab0 AS cor0
----
-2620
-6633
15

query I rowsort
SELECT - 54 + - cor1.col1 FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to 8eab693c8d6aff56af142fbd82e27f36

query I rowsort
SELECT col2 * 14 AS col0 FROM tab2 AS cor0
----
364
378
532

query I rowsort
SELECT ALL + col2 + 74 FROM tab1 AS cor0
----
128
131
170

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col2 col1 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7003
SELECT + col1 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7003
SELECT + col1 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( 61 ) + col1 FROM tab2
----
120
78
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-7005
SELECT 69 DIV col1 + + col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7005
SELECT 69 / col1 + + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - cor0.col2 + col1 * + col0 AS col0 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT ALL 14 + col0 + col1 * - 91 AS col2 FROM tab1
----
-1089
-2349
-832

query I rowsort
SELECT ALL 7 AS col1 FROM tab0
----
7
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 48 col0 FROM tab0, tab1 cor0
----
9 values hashing to 31c94943c073954e4ca20b170ab61f8c

query I rowsort
SELECT + ( - col1 ) * - col0 + + col1 * col2 AS col2 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT + 75 * + 6 + col1 AS col1 FROM tab1 AS cor0
----
460
463
476

query I rowsort
SELECT ALL - 54 * col0 FROM tab2
----
-378
-4212
-4266

query I rowsort
SELECT DISTINCT col0 * + 14 FROM tab0
----
1246
336
490

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 68 col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 5febf382d36d6e0191889c41b928786f

query I rowsort
SELECT - ( + 90 + - col2 ) * + 22 FROM tab1
----
-726
-792
132

query I rowsort
SELECT DISTINCT + cor0.col2 * col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + col0 + ( col1 ) AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + + col2 * + ( - col1 ) * col1 FROM tab2 cor0
----
-10982
-25947
-90506

query I rowsort
SELECT cor0.col2 + 34 FROM tab1 AS cor0
----
130
88
91

query I rowsort
SELECT ALL col1 + - col1 * - 96 AS col0 FROM tab1 cor0
----
1261
2522
970

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7021
SELECT + CAST( - 61 AS SIGNED ) * col1 FROM tab2 AS cor0
----
-1037
-1891
-3599

skipif mysql # not compatible
query I rowsort label-7021
SELECT + CAST ( - 61 AS INTEGER ) * col1 FROM tab2 AS cor0
----
-1037
-1891
-3599

query I rowsort
SELECT - - col2 * cor0.col1 + + col0 * 60 * - col1 - col0 FROM tab2 cor0
----
-12190
-274664
-80013

query I rowsort
SELECT - + col1 + 81 * ( col1 ) FROM tab2 AS cor0
----
1360
2480
4720

query I rowsort
SELECT DISTINCT - col2 * + 3 FROM tab2
----
-114
-78
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-7025
SELECT DISTINCT + col1 DIV col0 AS col0 FROM tab1 AS cor0
----
0
8

skipif mysql # not compatible
query I rowsort label-7025
SELECT DISTINCT + col1 / col0 AS col0 FROM tab1 AS cor0
----
0
8

query I rowsort
SELECT - 13 + - cor0.col1 FROM tab2 AS cor0
----
-30
-44
-72

query I rowsort
SELECT - 68 * - col0 FROM tab2
----
476
5304
5372

query I rowsort
SELECT tab2.col1 * 52 AS col0 FROM tab2
----
1612
3068
884

query I rowsort
SELECT ALL cor0.col0 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - - col2 * - col1 + - col1 * + col2 FROM tab0 cor0
----
-14924
-194
-5676

query I rowsort
SELECT ALL col0 * + ( - cor0.col0 ) + col1 AS col0 FROM tab1 AS cor0
----
-4086
-6387
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * - 39 col2 FROM tab1 AS cor0
----
1014
390
507

query I rowsort
SELECT - tab0.col2 * col1 - - ( tab0.col1 ) AS col0 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT ( col0 ) + + 66 AS col2 FROM tab1
----
130
146
69

query I rowsort
SELECT 92 + + col1 + + tab2.col0 AS col2 FROM tab2
----
130
188
229

query I rowsort
SELECT ALL + - col2 * 50 * col0 AS col0 FROM tab0 AS cor0
----
-1750
-364900
-39600

onlyif mysql # use DIV operator for integer division
query I rowsort label-7037
SELECT - + col2 * col1 DIV + col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-7037
SELECT - + col2 * col1 / + col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - + cor0.col1 * col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * cor0.col1 col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + - cor0.col2 + - 13 AS col0 FROM tab0 AS cor0
----
-14
-46
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 + - 56 col2 FROM tab0 AS cor0
----
-145
-80
-91

query I rowsort
SELECT DISTINCT col0 * - ( col1 ) AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - col0 + + 10 FROM tab0 AS cor0
----
-14
-25
-79

query I rowsort
SELECT - col1 * - 62 FROM tab2 AS cor0
----
1054
1922
3658

query I rowsort
SELECT ALL - col2 + ( col0 ) * - cor0.col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT cor0.col2 + - 73 AS col2 FROM tab1 AS cor0
----
-16
-19
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-7047
SELECT DISTINCT + + col2 DIV 64 + col0 AS col0 FROM tab0 AS cor0
----
24
35
90

skipif mysql # not compatible
query I rowsort label-7047
SELECT DISTINCT + + col2 / 64 + col0 AS col0 FROM tab0 AS cor0
----
24
35
90

query I rowsort
SELECT DISTINCT + col1 + col2 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + col2 * + col2 + + col0 AS col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT - cor0.col1 + 2 AS col2 FROM tab0 AS cor0
----
-84
-89
-95

query I rowsort
SELECT ALL + col2 * - 14 + col0 * + col1 * - 51 FROM tab0 cor0
----
-105726
-173159
-414197

onlyif mysql # use DIV operator for integer division
query I rowsort label-7052
SELECT col0 DIV + ( + col1 ) FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7052
SELECT col0 / + ( + col1 ) FROM tab0 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * ( - col0 ) + col1 col0 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT ALL + - col1 * ( + col1 ) FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-7055
SELECT - col2 * col0 DIV col1 AS col0 FROM tab0
----
-80
-9
0

skipif mysql # not compatible
query I rowsort label-7055
SELECT - col2 * col0 / col1 AS col0 FROM tab0
----
-80
-9
0

query I rowsort
SELECT DISTINCT + col0 + 58 FROM tab1
----
122
138
61

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
3645 values hashing to 93e5b836e3f52f458344e73ebce589b5

query I rowsort
SELECT col2 - 74 FROM tab2 AS cor0
----
-36
-47
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 61 * col0 col0 FROM tab0 cor0
----
1464
2135
5429

query I rowsort
SELECT 96 * col0 * - col1 + - col2 AS col1 FROM tab1 AS cor0
----
-61497
-7542
-99936

query I rowsort
SELECT ALL + - col0 * col2 * + col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7062
SELECT CAST( 55 AS SIGNED ) + col2 FROM tab2 AS cor0
----
81
82
93

skipif mysql # not compatible
query I rowsort label-7062
SELECT CAST ( 55 AS INTEGER ) + col2 FROM tab2 AS cor0
----
81
82
93

query I rowsort
SELECT ALL + - col1 + + 86 AS col2 FROM tab2 AS cor0
----
27
55
69

query I rowsort
SELECT DISTINCT - + col0 * - 48 AS col1 FROM tab2 AS cor0
----
336
3744
3792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7065
SELECT DISTINCT CAST( NULL AS DECIMAL ) FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7065
SELECT DISTINCT CAST ( NULL AS REAL ) FROM tab0 cor0
----
NULL

query I rowsort
SELECT cor0.col1 * - 73 + + col0 AS col1 FROM tab2 cor0
----
-1162
-2256
-4229

query I rowsort
SELECT + 65 - col1 * col0 FROM tab2 cor0
----
-1278
-152
-4537

query I rowsort
SELECT ALL - 21 + ( - col1 ) FROM tab2 AS cor0
----
-38
-52
-80

query I rowsort
SELECT - 32 AS col0 FROM tab1 cor0
----
-32
-32
-32

query I rowsort
SELECT + 64 AS col0 FROM tab1 AS cor0
----
64
64
64

query I rowsort
SELECT DISTINCT + 21 * + cor0.col0 + col1 FROM tab0 cor0
----
1960
590
832

query I rowsort
SELECT ALL col0 * col0 * 38 + col0 * - col2 FROM tab0 AS cor0
----
21096
293700
46515

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 61 col0 FROM tab2 AS cor0
----
-61
-61
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * + col0 + col1 col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ( col1 ) + + col1 * - cor0.col1 FROM tab0 cor0
----
-7310
-8190
-9312

query I rowsort
SELECT + + 14 * 43 FROM tab2 cor0
----
602
602
602

query I rowsort
SELECT - col0 + - col1 + col2 AS col0 FROM tab1 AS cor0
----
-17
25
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7078
SELECT ALL + CAST( NULL AS SIGNED ) + - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7078
SELECT ALL + CAST ( NULL AS INTEGER ) + - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 + ( + col1 ) AS col0 FROM tab0 cor0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7080
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col2 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7080
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col2 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - col0 * col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - + ( col0 ) + + col1 + col1 AS col0 FROM tab1 cor0
----
-44
-54
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + + col1 col1 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7084
SELECT DISTINCT CAST( - col1 AS SIGNED ) + col0 AS col0 FROM tab0 cor0
----
-2
-62

skipif mysql # not compatible
query I rowsort label-7084
SELECT DISTINCT CAST ( - col1 AS INTEGER ) + col0 AS col0 FROM tab0 cor0
----
-2
-62

query I rowsort
SELECT - col0 + - cor0.col0 * + col1 AS col2 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT ALL col0 + col2 * ( col0 ) FROM tab1
----
165
3712
7760

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
26
27
38

query I rowsort
SELECT + - col2 + 65 FROM tab0 AS cor0
----
-17
32
64

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 CROSS JOIN tab0, tab1, tab2 AS cor1
----
3645 values hashing to 47906197307eee6829150d762058792a

query I rowsort
SELECT ALL + - ( - col1 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT ( col1 ) AS col2 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-7092
SELECT + + col1 * - col1 DIV - col1 + + 96 + cor0.col1 AS col1 FROM tab1 AS cor0
----
116
122
148

skipif mysql # not compatible
query I rowsort label-7092
SELECT + + col1 * - col1 / - col1 + + 96 + cor0.col1 AS col1 FROM tab1 AS cor0
----
116
122
148

query I rowsort
SELECT ALL ( - col2 ) AS col1 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT - ( - col1 ) * - ( col0 * col2 ) + col2 FROM tab2
----
-119626
-50996
-5832

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col2 * + col0 + - CAST ( + col2 AS REAL ) FROM tab1 AS cor0
----
-216
-3705
-7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7096
SELECT DISTINCT ( - col0 ) + CAST( NULL AS DECIMAL ) * + 13 / + col0 AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7096
SELECT DISTINCT ( - col0 ) + CAST ( NULL AS REAL ) * + 13 / + col0 AS col0 FROM tab1
----
NULL

query I rowsort
SELECT cor0.col2 - col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL cor0.col2 * - 94 + + ( - cor0.col2 ) * col2 AS col1 FROM tab0 cor0
----
-14432
-4191
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-7099
SELECT DISTINCT + - col1 DIV ( + 91 * col0 ) col2 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7099
SELECT DISTINCT + - col1 / ( + 91 * col0 ) col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col1 * col1 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT - 54 FROM tab2, tab0 cor0
----
-54

query I rowsort
SELECT ALL + - col0 + - cor0.col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + col1 * - ( cor0.col1 ) * col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT - col2 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - col1 + col0 * - col1 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT col0 * - 62 * col0 FROM tab0
----
-35712
-491102
-75950

query I rowsort
SELECT + + cor0.col2 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + cor0.col0 + - col0 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7109
SELECT DISTINCT col2 * CAST( - col0 AS SIGNED ) + col1 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

skipif mysql # not compatible
query I rowsort label-7109
SELECT DISTINCT col2 * CAST ( - col0 AS INTEGER ) + col1 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7110
SELECT CAST( col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7110
SELECT CAST ( col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT col2 - - 24 * col2 * - col0 FROM tab1 AS cor0
----
-184224
-3834
-87495

onlyif mysql # use DIV operator for integer division
query I rowsort label-7112
SELECT ALL col2 DIV - tab0.col0 + - col2 FROM tab0
----
-1
-34
-82

skipif mysql # not compatible
query I rowsort label-7112
SELECT ALL col2 / - tab0.col0 + - col2 FROM tab0
----
-1
-34
-82

query I rowsort
SELECT DISTINCT - 24 + 71 FROM tab0
----
47

query I rowsort
SELECT DISTINCT 18 AS col2 FROM tab0, tab2, tab1 AS cor0
----
18

query I rowsort
SELECT - col2 + 5 AS col1 FROM tab1
----
-49
-52
-91

query I rowsort
SELECT ALL + - ( col2 ) + - col0 * cor0.col0 FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT DISTINCT - + col1 - - col0 AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT col2 + col1 * - 71 FROM tab1 AS cor0
----
-1792
-653
-827

query I rowsort
SELECT + + cor0.col0 - col0 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 58 col0 FROM tab2
----
58
58
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-7121
SELECT col2 * col0 DIV - col1 + ( + col2 * ( tab2.col0 ) + - col1 ) FROM tab2
----
152
1935
2809

skipif mysql # not compatible
query I rowsort label-7121
SELECT col2 * col0 / - col1 + ( + col2 * ( tab2.col0 ) + - col1 ) FROM tab2
----
152
1935
2809

onlyif mysql # use DIV operator for integer division
query I rowsort label-7122
SELECT DISTINCT + 46 + + 98 * tab2.col2 DIV col0 FROM tab2
----
424
78
93

skipif mysql # not compatible
query I rowsort label-7122
SELECT DISTINCT + 46 + + 98 * tab2.col2 / col0 FROM tab2
----
424
78
93

query I rowsort
SELECT col1 * 76 + + col1 * 68 * 11 FROM tab0
----
70864
74984
79928

query I rowsort
SELECT col1 * + 99 + tab0.col0 FROM tab0
----
8538
9098
9638

query I rowsort
SELECT 94 * col2 AS col1 FROM tab0
----
3102
7708
94

query I rowsort
SELECT 11 + + col0 * col2 FROM tab1 AS cor0
----
173
3659
7691

onlyif mysql # use DIV operator for integer division
query I rowsort label-7127
SELECT ALL col1 * col1 - col1 DIV - cor0.col0 AS col1 FROM tab0 cor0
----
7399
8282
9411

skipif mysql # not compatible
query I rowsort label-7127
SELECT ALL col1 * col1 - col1 / - cor0.col0 AS col1 FROM tab0 cor0
----
7399
8282
9411

query I rowsort
SELECT ALL + + col2 * + col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + cor0.col2 * + 64 + cor0.col2 AS col2 FROM tab0 AS cor0
----
2145
5330
65

query I rowsort
SELECT + col0 + 63 AS col1 FROM tab0 AS cor0
----
152
87
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 58 + - col0 * + ( - col1 ) col1 FROM tab1 AS cor0
----
20
582
982

query I rowsort
SELECT DISTINCT - - cor0.col2 * - col0 + + col2 + - 59 FROM tab2 AS cor0
----
-2061
-221
-3023

query I rowsort
SELECT ALL 33 + - col1 FROM tab2 AS cor0
----
-26
16
2

query I rowsort
SELECT - cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - 79 AS col2 FROM tab1 AS cor0
----
-79
-79
-79

query I rowsort
SELECT + 27 FROM tab1, tab0 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

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 DISTINCT ( - cor0.col1 + - 93 ) FROM tab1, tab2 AS cor0, tab1 AS cor1
----
-110
-124
-152

query I rowsort
SELECT ALL + col1 * col1 + col2 AS col2 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT - 7 * tab2.col1 AS col1 FROM tab2
----
-119
-217
-413

onlyif mysql # use DIV operator for integer division
query I rowsort label-7141
SELECT ALL col0 DIV 41 FROM tab0 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-7141
SELECT ALL col0 / 41 FROM tab0 AS cor0
----
0
0
2

query I rowsort
SELECT - + 81 + - ( col2 ) * - col2 AS col0 FROM tab2 AS cor0
----
1363
595
648

query I rowsort
SELECT ALL + - col1 * + col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + - 80 * col0 AS col2 FROM tab1 AS cor0
----
-240
-5120
-6400

query I rowsort
SELECT DISTINCT - 31 * - cor0.col2 FROM tab0 AS cor0
----
1023
2542
31

query I rowsort
SELECT ALL + 28 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

query I rowsort
SELECT ALL + cor0.col0 * col1 - - cor0.col0 * 73 FROM tab1 AS cor0
----
297
5312
6880

onlyif mysql # use DIV operator for integer division
query I rowsort label-7148
SELECT - + ( + col2 ) + col1 DIV 93 AS col0 FROM tab0 AS cor0
----
-33
-82
0

skipif mysql # not compatible
query I rowsort label-7148
SELECT - + ( + col2 ) + col1 / 93 AS col0 FROM tab0 AS cor0
----
-33
-82
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7149
SELECT DISTINCT - cor0.col0 DIV col1 + - cor0.col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-7149
SELECT DISTINCT - cor0.col0 / col1 + - cor0.col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + col1 * cor0.col0 - col1 AS col2 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT ALL col0 - col2 * - col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT + - cor0.col0 * - col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - 28 * + 31 FROM tab1 AS cor0
----
-868

query I rowsort
SELECT ALL + - col0 * - 19 AS col1 FROM tab2 cor0
----
133
1482
1501

query I rowsort
SELECT - col2 + - col2 AS col0 FROM tab0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT col2 - - tab0.col1 FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * ( + tab0.col2 ) + + col2 - 75 col1 FROM tab0
----
23
2796
7469

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * ( tab2.col0 ) col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT 53 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT DISTINCT col0 + 23 * col2 AS col1 FROM tab2 AS cor0
----
628
676
953

onlyif mysql # use DIV operator for integer division
query I rowsort label-7161
SELECT col1 DIV - 17 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7161
SELECT col1 / - 17 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 60 col1 FROM tab0, tab2 cor0
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7163
SELECT ALL + CAST( - ( col0 ) AS SIGNED ) * col1 * 65 AS col2 FROM tab1 AS cor0
----
-41600
-5070
-67600

skipif mysql # not compatible
query I rowsort label-7163
SELECT ALL + CAST ( - ( col0 ) AS INTEGER ) * col1 * 65 AS col2 FROM tab1 AS cor0
----
-41600
-5070
-67600

onlyif mysql # use DIV operator for integer division
query I rowsort label-7164
SELECT DISTINCT ( + cor0.col2 ) DIV + cor0.col1 AS col1 FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-7164
SELECT DISTINCT ( + cor0.col2 ) / + cor0.col1 AS col1 FROM tab2 AS cor0
----
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-7165
SELECT col1 DIV 66 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7165
SELECT col1 / 66 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT + cor0.col1 * 10 * + 44 FROM tab2, tab0 AS cor0
----
9 values hashing to d061f3aa76bf34830f305aa4b4953793

query I rowsort
SELECT - col1 * col2 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT - ( - col1 ) * - col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - col1 * - col0 * col2 + + ( - col2 ) FROM tab2
----
119626
50996
5832

onlyif mysql # use DIV operator for integer division
query I rowsort label-7171
SELECT 76 * col0 - - col1 DIV + 11 AS col0 FROM tab0
----
1831
2668
6772

skipif mysql # not compatible
query I rowsort label-7171
SELECT 76 * col0 - - col1 / + 11 AS col0 FROM tab0
----
1831
2668
6772

query I rowsort
SELECT - - 55 + col2 * 88 FROM tab0 AS cor0
----
143
2959
7271

query I rowsort
SELECT + 69 FROM tab0
----
69
69
69

query I rowsort
SELECT DISTINCT - col0 * + col1 + - col2 FROM tab1
----
-1136
-132
-697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 + - col0 col0 FROM tab0
----
0
7209
768

query I rowsort
SELECT 72 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT ALL + cor0.col0 + 35 FROM tab1 AS cor0
----
115
38
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col2 ) col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - + ( cor0.col0 ) + + col2 AS col2 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT 98 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 6624b1f09c0594f5576803ac29f4499d

onlyif mysql # use DIV operator for integer division
query I rowsort label-7181
SELECT ALL 79 + col0 DIV col0 AS col0 FROM tab0
----
80
80
80

skipif mysql # not compatible
query I rowsort label-7181
SELECT ALL 79 + col0 / col0 AS col0 FROM tab0
----
80
80
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7182
SELECT DISTINCT + 98 DIV + col0 + + col0 * - col2 FROM tab1
----
-130
-3647
-7679

skipif mysql # not compatible
query I rowsort label-7182
SELECT DISTINCT + 98 / + col0 + + col0 * - col2 FROM tab1
----
-130
-3647
-7679

query I rowsort
SELECT + 6 - + col1 AS col2 FROM tab0
----
-80
-85
-91

query I rowsort
SELECT DISTINCT + + col2 * col0 AS col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT ALL + col0 + ( + 79 ) * col0 * col0 AS col1 FROM tab2 AS cor0
----
3878
480714
493118

query I rowsort
SELECT ALL - + col2 + - col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT col1 * + col2 + 15 FROM tab1
----
1263
1419
585

query I rowsort
SELECT - + 17 AS col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 28cd5b4c959cb41fbc56389ab43d167e

onlyif mysql # use DIV operator for integer division
query I rowsort label-7189
SELECT col2 DIV + 30 FROM tab1
----
1
1
3

skipif mysql # not compatible
query I rowsort label-7189
SELECT col2 / + 30 FROM tab1
----
1
1
3

query I rowsort
SELECT col2 + + 9 AS col1 FROM tab2 AS cor0
----
35
36
47

query I rowsort
SELECT ALL - cor0.col2 * 52 AS col0 FROM tab1 AS cor0
----
-2808
-2964
-4992

onlyif mysql # use DIV operator for integer division
query I rowsort label-7192
SELECT + + col1 * col0 DIV col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7192
SELECT + + col1 * col0 / col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - + col2 * + ( 34 * - col2 ) FROM tab2 AS cor0
----
22984
24786
49096

query I rowsort
SELECT col0 + col2 * - col1 AS col1 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT + cor0.col2 + ( col0 ) + col1 AS col1 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT + cor0.col2 + + 96 * + col1 * - col1 FROM tab2 AS cor0
----
-27706
-334150
-92229

query I rowsort
SELECT - col1 * + 94 * - col1 FROM tab2 AS cor0
----
27166
327214
90334

query I rowsort
SELECT DISTINCT + col0 + - 22 * 86 FROM tab2 cor0
----
-1813
-1814
-1885

query I rowsort
SELECT DISTINCT + col2 + + col2 * + ( col1 ) * col2 FROM tab1 AS cor0
----
119904
32547
75870

query I rowsort
SELECT + 47 AS col1 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

onlyif mysql # use DIV operator for integer division
query I rowsort label-7201
SELECT - - col2 - + col2 DIV - 51 AS col2 FROM tab0 AS cor0
----
1
33
83

skipif mysql # not compatible
query I rowsort label-7201
SELECT - - col2 - + col2 / - 51 AS col2 FROM tab0 AS cor0
----
1
33
83

query I rowsort
SELECT ALL - 61 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c91d7b51e91f33d302e697913fb438b6

query I rowsort
SELECT - 86 - col0 FROM tab1 AS cor0
----
-150
-166
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7204
SELECT DISTINCT + col0 * col1 DIV - col1 + col2 AS col1 FROM tab2 AS cor0
----
-41
-52
20

skipif mysql # not compatible
query I rowsort label-7204
SELECT DISTINCT + col0 * col1 / - col1 + col2 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL + - 72 AS col2 FROM tab1 AS cor0
----
-72
-72
-72

query I rowsort
SELECT - col0 * + col0 - - 9 AS col1 FROM tab1 AS cor0
----
-4087
-6391
0

query I rowsort
SELECT - - cor0.col1 + 69 FROM tab1 cor0
----
79
82
95

query I rowsort
SELECT + col2 * col2 + col2 * cor0.col0 FROM tab1 AS cor0
----
16896
3078
6897

query I rowsort
SELECT - + col0 + - col1 * col0 - col0 FROM tab1 cor0
----
-1200
-768
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7210
SELECT - col0 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7210
SELECT - col0 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 74 + col1 FROM tab1
----
100
84
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 + + tab0.col1 col0 FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + 36 * + cor0.col0 col1 FROM tab0 AS cor0
----
1357
3295
950

query I rowsort
SELECT col1 + - col0 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL tab2.col0 + + 4 FROM tab2, tab0 AS cor0
----
9 values hashing to 5be202143ce02071b100652028ee1958

query I rowsort
SELECT - col2 + + col1 AS col0 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT - 25 + + col1 AS col1 FROM tab2
----
-8
34
6

query I rowsort
SELECT ALL - col1 * 85 FROM tab1 AS cor0
----
-1105
-2210
-850

query I rowsort
SELECT - ( + cor0.col2 ) * col2 + + cor0.col1 FROM tab0 AS cor0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7220
SELECT 56 * - col0 DIV - col0 FROM tab1 AS cor0
----
56
56
56

skipif mysql # not compatible
query I rowsort label-7220
SELECT 56 * - col0 / - col0 FROM tab1 AS cor0
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 70 ) col1 FROM tab0 AS cor0
----
70

query I rowsort
SELECT col0 * col1 + + col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT + cor0.col0 * - col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + ( - col0 ) * - col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - col0 * - 90 + col0 AS col0 FROM tab0 AS cor0
----
2184
3185
8099

query I rowsort
SELECT ALL + - col1 * 3 * col1 AS col2 FROM tab0 AS cor0
----
-22188
-24843
-28227

query I rowsort
SELECT 81 * col0 AS col1 FROM tab2 AS cor0
----
567
6318
6399

query I rowsort
SELECT - + 64 FROM tab0 AS cor0
----
-64
-64
-64

query I rowsort
SELECT col0 * - 15 AS col2 FROM tab2 AS cor0
----
-105
-1170
-1185

query I rowsort
SELECT ALL ( + 9 ) + col0 AS col2 FROM tab0
----
33
44
98

query I rowsort
SELECT - ( - tab2.col1 ) FROM tab2
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7232
SELECT DISTINCT col0 + - col1 DIV CAST( col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7232
SELECT DISTINCT col0 + - col1 / CAST ( col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - - 27 * col2 AS col1 FROM tab0 cor0
----
2214
27
891

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7234
SELECT DISTINCT - cor0.col0 * + col2 + + CAST( 67 AS SIGNED ) * col2 FROM tab1 AS cor0
----
-1248
171
3456

skipif mysql # not compatible
query I rowsort label-7234
SELECT DISTINCT - cor0.col0 * + col2 + + CAST ( 67 AS INTEGER ) * col2 FROM tab1 AS cor0
----
-1248
171
3456

query I rowsort
SELECT + - cor0.col1 * + col0 * 59 FROM tab2 AS cor0
----
-12803
-271518
-79237

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7236
SELECT CAST( tab0.col2 AS SIGNED ) FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7236
SELECT CAST ( tab0.col2 AS INTEGER ) FROM tab0
----
1
33
82

query I rowsort
SELECT - ( + cor0.col0 ) FROM tab1, tab2 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT DISTINCT + 67 FROM tab2, tab0 AS cor0
----
67

query I rowsort
SELECT DISTINCT - tab2.col2 * - cor0.col0 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to 1fcf8ce9be0db19b3883c362d1041dbe

query I rowsort
SELECT DISTINCT - col2 * tab1.col2 * col2 FROM tab1
----
-157464
-185193
-884736

query I rowsort
SELECT + 64 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT DISTINCT 9 - 88 FROM tab0, tab2 cor0, tab1 AS cor1
----
-79

query I rowsort
SELECT - col2 + col0 * 31 FROM tab2 AS cor0
----
190
2392
2411

query I rowsort
SELECT col1 * - col1 * ( + cor0.col2 ) AS col1 FROM tab1 cor0
----
-16224
-36504
-5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7246
SELECT ALL col0 * + CAST( - 13 AS SIGNED ) + col2 AS col0 FROM tab1 AS cor0
----
-775
-944
15

skipif mysql # not compatible
query I rowsort label-7246
SELECT ALL col0 * + CAST ( - 13 AS INTEGER ) + col2 AS col0 FROM tab1 AS cor0
----
-775
-944
15

query I rowsort
SELECT ALL + + col2 + + ( + col0 ) * + col0 * + 10 FROM tab1 AS cor0
----
144
41017
64096

query I rowsort
SELECT 10 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT + 37 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to b8def841e97863779a391f3a05d3eb92

query I rowsort
SELECT ALL - 2 FROM tab1
----
-2
-2
-2

query I rowsort
SELECT + ( col1 ) * - cor0.col1 * - col2 FROM tab0 cor0
----
244068
679042
9409

skipif mysql # not compatible
query I rowsort
SELECT - - CAST ( + col0 AS REAL ) FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7253
SELECT ALL + - cor0.col0 + cor0.col2 DIV - col1 FROM tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-7253
SELECT ALL + - cor0.col0 + cor0.col2 / - col1 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT 29 AS col2 FROM tab0 AS cor0
----
29
29
29

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

onlyif mysql # use DIV operator for integer division
query I rowsort label-7256
SELECT + col0 DIV - col2 AS col1 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-7256
SELECT + col0 / - col2 AS col1 FROM tab0
----
-1
-35
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + col1 * col2 * col0 col0 FROM tab1 AS cor0
----
36490
4238
99853

onlyif mysql # use DIV operator for integer division
query I rowsort label-7258
SELECT ALL + col1 DIV col0 + col0 + col1 AS col1 FROM tab2
----
137
42
96

skipif mysql # not compatible
query I rowsort label-7258
SELECT ALL + col1 / col0 + col0 + col1 AS col1 FROM tab2
----
137
42
96

query I rowsort
SELECT + col1 + - col2 * - col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT - + col0 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 60 + 95 * col0 AS col2 FROM tab2
----
725
7470
7565

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 * - 7 + - col2 * + col1 col0 FROM tab0
----
-3531
-790
-8155

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7263
SELECT CAST( NULL AS SIGNED ) - + ( - tab1.col2 ) * col1 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7263
SELECT CAST ( NULL AS INTEGER ) - + ( - tab1.col2 ) * col1 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 - - col1 FROM tab0
----
119
173
98

query I rowsort
SELECT + col1 - - col1 * tab1.col1 FROM tab1
----
110
182
702

query I rowsort
SELECT ALL 52 * col2 AS col1 FROM tab1 AS cor0
----
2808
2964
4992

query I rowsort
SELECT + - col0 * + col1 * - col2 - - col2 FROM tab1 AS cor0
----
36537
4266
99936

query I rowsort
SELECT DISTINCT - col1 * col1 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT + col0 - + cor0.col1 AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - + 1 + col1 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT col0 - col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 53 * col2 FROM tab2
----
1378
1431
2014

query I rowsort
SELECT ALL 38 AS col2 FROM tab0
----
38
38
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7274
SELECT ( - col1 ) DIV + col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7274
SELECT ( - col1 ) / + col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - col1 + cor0.col0 * + col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT - col1 * + col0 + + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT + 7 + col1 FROM tab0 AS cor0
----
104
93
98

query I rowsort
SELECT - col2 - - col1 AS col0 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7279
SELECT DISTINCT - - col0 DIV + col0 + col0 * col0 * col2 FROM tab0 cor0
----
1226
19009
649523

skipif mysql # not compatible
query I rowsort label-7279
SELECT DISTINCT - - col0 / + col0 + col0 * col0 * col2 FROM tab0 cor0
----
1226
19009
649523

onlyif mysql # use DIV operator for integer division
query I rowsort label-7280
SELECT ALL - cor0.col2 + + col2 DIV + col0 + - col1 * - col2 FROM tab1 AS cor0
----
1153
1368
513

skipif mysql # not compatible
query I rowsort label-7280
SELECT ALL - cor0.col2 + + col2 / + col0 + - col1 * - col2 FROM tab1 AS cor0
----
1153
1368
513

query I rowsort
SELECT ALL col0 + - col0 * col0 * + col1 FROM tab1 AS cor0
----
-231
-40896
-83120

onlyif mysql # use DIV operator for integer division
query I rowsort label-7282
SELECT - col1 DIV col2 + col1 AS col1 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-7282
SELECT - col1 / col2 + col1 AS col1 FROM tab1
----
10
13
26

query I rowsort
SELECT tab1.col1 + tab1.col0 FROM tab1
----
29
74
93

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL NOT IN ( - col1 + + col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7285
SELECT col1 DIV + col0 + col1 FROM tab0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-7285
SELECT col1 / + col0 + col1 FROM tab0
----
89
92
99

query I rowsort
SELECT ALL - col0 * - col0 AS col0 FROM tab1
----
4096
6400
9

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT - col0 IN ( - col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT - cor0.col0 - - col2 * col0 AS col0 FROM tab0 cor0
----
0
7209
768

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE col0 / col2 NOT IN ( + col0 * - col2 * col2 + - cor0.col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT - col0 + col1 - col0 FROM tab2
----
-141
-97
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-7291
SELECT DISTINCT - col0 DIV - col2 AS col0 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7291
SELECT DISTINCT - col0 / - col2 AS col0 FROM tab0
----
0
1
35

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) IN ( col0 * col2 + - col0 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT col2 / col0 - col2 * - col2 * - col2 > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7294
SELECT + col0 * col2 DIV col2 AS col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7294
SELECT + col0 * col2 / col2 AS col1 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7295
SELECT ALL - tab2.col2 DIV + col1 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-7295
SELECT ALL - tab2.col2 / + col1 FROM tab2
----
-2
0
0

query I rowsort
SELECT col1 * + col1 * col1 FROM tab2
----
205379
29791
4913

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL < - col2
----

query I rowsort
SELECT DISTINCT col0 * col0 * col0 AS col2 FROM tab0
----
13824
42875
704969

query I rowsort
SELECT DISTINCT col2 + col2 + col0 * col2 FROM tab2
----
2080
243
3078

query I rowsort
SELECT ALL + col2 * tab0.col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT - tab2.col2 * col2 * col1 - tab2.col1 * col2 AS col1 FROM tab2
----
-23436
-25194
-41418

query I rowsort
SELECT - col0 * col1 * + tab1.col0 AS col2 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT col2 + col0 + - col2 FROM tab2
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7304
SELECT ALL - col0 DIV - tab2.col0 + + col0 + - col2 FROM tab2
----
-19
42
53

skipif mysql # not compatible
query I rowsort label-7304
SELECT ALL - col0 / - tab2.col0 + + col0 + - col2 FROM tab2
----
-19
42
53

query I rowsort
SELECT DISTINCT + tab1.col0 + - col2 * - col1 + + col1 FROM tab1 WHERE NOT ( NULL ) NOT IN ( col1 + - col2 + col1 * col1 )
----

query I rowsort
SELECT - col0 + + col2 AS col1 FROM tab0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + col0 + - col2 AS col1 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT + col1 + col0 * col2 FROM tab2 AS cor0
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-7309
SELECT col0 * col1 DIV - col0 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-7309
SELECT col0 * col1 / - col0 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + cor0.col0 * col1 col1 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT ALL + cor0.col1 + col2 * col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + col1 * col1 * col1 AS col1 FROM tab2 AS cor0
----
205379
29791
4913

query I rowsort
SELECT DISTINCT - + col0 + col1 * col0 * - col0 FROM tab0 AS cor0
----
-118860
-49560
-720900

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col0 * col2 * col0 col0 FROM tab0
----
-1224
-18975
-649440

onlyif mysql # use DIV operator for integer division
query I rowsort label-7315
SELECT ALL col2 + col1 DIV col0 + - col0 FROM tab1
----
-7
16
59

skipif mysql # not compatible
query I rowsort label-7315
SELECT ALL col2 + col1 / col0 + - col0 FROM tab1
----
-7
16
59

query I rowsort
SELECT + col0 * col1 + - col0 AS col2 FROM tab2
----
1264
210
4524

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7318
SELECT col2 * - col2 + col0 DIV tab2.col0 col0 FROM tab2
----
-1443
-675
-728

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7318
SELECT col2 * - col2 + col0 / tab2.col0 col0 FROM tab2
----
-1443
-675
-728

query I rowsort
SELECT + col0 + cor0.col0 AS col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ( ( - tab0.col2 ) ) AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT ALL tab0.col2 * 77 AS col1 FROM tab0
----
2541
6314
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - 65 col0 FROM tab2
----
1105
2015
3835

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 * - ( + col1 ) * col1 + - col0 col1 FROM tab2
----
-22910
-271596
-6734

query I rowsort
SELECT + 4 FROM tab2, tab0 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7325
SELECT ALL col0 DIV 7 AS col2 FROM tab0
----
12
3
5

skipif mysql # not compatible
query I rowsort label-7325
SELECT ALL col0 / 7 AS col2 FROM tab0
----
12
3
5

query I rowsort
SELECT ALL col1 * col1 + 73 * - col0 + - 71 AS col1 FROM tab1 AS cor0
----
-4643
-5742
386

query I rowsort
SELECT ALL + col0 * + col0 + 55 * col2 FROM tab1 AS cor0
----
11680
2979
7231

query I rowsort
SELECT DISTINCT + - 93 + - 52 FROM tab1 AS cor0
----
-145

query I rowsort
SELECT ALL ( 27 ) * col1 + - 5 FROM tab1 AS cor0
----
265
346
697

query I rowsort
SELECT + 99 - + cor0.col1 AS col2 FROM tab1 AS cor0
----
73
86
89

query I rowsort
SELECT col0 * - col2 + + col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-7332
SELECT - col2 DIV - ( + col1 ) + cor0.col2 FROM tab1 AS cor0
----
103
56
62

skipif mysql # not compatible
query I rowsort label-7332
SELECT - col2 / - ( + col1 ) + cor0.col2 FROM tab1 AS cor0
----
103
56
62

query I rowsort
SELECT ALL + + 18 AS col2 FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT ALL cor0.col2 + + 52 FROM tab2 cor0
----
78
79
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 + 66 col1 FROM tab1 AS cor0
----
130
146
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * ( - col1 ) - - col2 * cor0.col1 col2 FROM tab1 AS cor0
----
1079
470
728

query I rowsort
SELECT + - 20 * + 20 + + col0 AS col0 FROM tab2 AS cor0
----
-321
-322
-393

onlyif mysql # use DIV operator for integer division
query I rowsort label-7338
SELECT + 9 DIV + col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7338
SELECT + 9 / + col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7339
SELECT - CAST( NULL AS SIGNED ) + 28 / col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7339
SELECT - CAST ( NULL AS INTEGER ) + 28 / col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col2 * - col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + 30 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-2460
-30
-990

query I rowsort
SELECT - 55 + col1 FROM tab2 cor0
----
-24
-38
4

query I rowsort
SELECT - 31 AS col0 FROM tab0 AS cor0
----
-31
-31
-31

query I rowsort
SELECT ALL - 11 AS col2 FROM tab2 AS cor0
----
-11
-11
-11

query I rowsort
SELECT ALL + 62 * + col1 + - col1 AS col0 FROM tab2 AS cor0
----
1037
1891
3599

query I rowsort
SELECT DISTINCT - - 71 AS col2 FROM tab1 AS cor0
----
71

query I rowsort
SELECT ALL col2 + col1 + + col2 AS col2 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT DISTINCT - cor0.col0 - - col0 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - 16 + + col2 FROM tab2 AS cor0
----
10
11
22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7350
SELECT - 57 * col1 + - CAST( NULL AS SIGNED ) * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7350
SELECT - 57 * col1 + - CAST ( NULL AS INTEGER ) * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( col0 ) + - col1 FROM tab0 cor0
----
-2
-62

query I rowsort
SELECT - col2 * + col2 + + ( - ( - col1 ) ) AS col1 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT DISTINCT 84 + - col1 * col0 FROM tab1 AS cor0
----
-556
-956
6

query I rowsort
SELECT ALL - col2 * col2 + + col2 * - col2 * + col2 + col0 AS col2 FROM tab2 AS cor0
----
-18174
-20405
-56237

query I rowsort
SELECT ALL + + cor0.col0 * + col0 - col1 AS col0 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT ALL + 53 * - cor0.col1 + + col1 * 94 FROM tab0 cor0
----
3526
3731
3977

query I rowsort
SELECT - col0 + + col0 * col0 FROM tab0
----
1190
552
7832

query I rowsort
SELECT DISTINCT col0 * 0 - col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + - col0 * - cor0.col1 + - col2 AS col0 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT - col1 * + col1 + ( + col1 ) AS col0 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT + + 18 * - 6 AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ab1bc5e2f6f0be65bdb55f5590ed33f3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor1.col1 col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
10
13
26

skipif mysql # not compatible
query I rowsort
SELECT - col1 * CAST ( col1 * col0 AS REAL ) AS col0 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT ALL 3 AS col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 3e22859a313d85a6146c6df5f23d77cf

query I rowsort
SELECT + col2 + col0 * 9 AS col0 FROM tab2
----
728
749
90

query I rowsort
SELECT - col0 + + 63 AS col0 FROM tab0 AS cor0
----
-26
28
39

query I rowsort
SELECT 72 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT col1 * - col0 * - col0 FROM tab2
----
106097
1519
358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col2 col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT + 75 * 6 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 316d050d2ccd85699e32c52a5108a588

onlyif mysql # use DIV operator for integer division
query I rowsort label-7371
SELECT DISTINCT - 90 DIV col0 AS col2 FROM tab1
----
-1
-30

skipif mysql # not compatible
query I rowsort label-7371
SELECT DISTINCT - 90 / col0 AS col2 FROM tab1
----
-1
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 35 col0 FROM tab0
----
35

query I rowsort
SELECT DISTINCT + 43 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1
----
43

query I rowsort
SELECT 86 * - col0 FROM tab2 AS cor0
----
-602
-6708
-6794

query I rowsort
SELECT + ( - col0 ) * + col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + + 86 + + col0 * + 25 AS col0 FROM tab2 AS cor0
----
2036
2061
261

query I rowsort
SELECT - col0 * col2 + col2 - 54 * col0 AS col0 FROM tab1 AS cor0
----
-11904
-270
-7047

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * col2 col1 FROM tab0 AS cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 48 col1 FROM tab1 AS cor0
----
48

query I rowsort
SELECT - 60 * - col1 + col1 + 60 * col1 FROM tab0 AS cor0
----
10406
11011
11737

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL 30 * col1 + + CAST ( cor0.col1 AS REAL ) col1 FROM tab1 AS cor0
----
310
403
806

query I rowsort
SELECT ALL + col2 * - col1 AS col0 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT + 97 * - col0 * - col2 + - col2 - cor0.col0 AS col2 FROM tab0 AS cor0
----
3359
707735
76767

query I rowsort
SELECT + 19 AS col1 FROM tab2
----
19
19
19

query I rowsort
SELECT DISTINCT 17 AS col2 FROM tab2 AS cor0
----
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col0 + - 71 col0 FROM tab0 AS cor0
----
1154
505
7850

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col0 + cor0.col2 * + col2 * + col0 col1 FROM tab1 AS cor0
----
207943
737264
8697

query I rowsort
SELECT tab0.col1 * - col0 + ( - 51 ) * col2 + col1 * + col1 FROM tab0
----
-4000
3649
5963

onlyif mysql # use DIV operator for integer division
query I rowsort label-7389
SELECT ALL - col2 DIV + col2 + - 5 AS col2 FROM tab1 AS cor0
----
-6
-6
-6

skipif mysql # not compatible
query I rowsort label-7389
SELECT ALL - col2 / + col2 + - 5 AS col2 FROM tab1 AS cor0
----
-6
-6
-6

query I rowsort
SELECT ALL + ( - 17 ) FROM tab0, tab0 AS cor0
----
9 values hashing to 490d008f3fb5b70d3971cfc6d84503f4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 + col0 ) * col2 col2 FROM tab1
----
-16896
-3078
-6897

query I rowsort
SELECT - col0 + col1 * 6 FROM tab1 AS cor0
----
-2
-4
153

query I rowsort
SELECT + 37 + col2 AS col2 FROM tab2 AS cor0
----
63
64
75

query I rowsort
SELECT DISTINCT + 82 * col1 * col2 + - col0 AS col0 FROM tab0 AS cor0
----
232692
611795
7919

query I rowsort
SELECT DISTINCT 41 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7396
SELECT DISTINCT - + CAST( NULL AS SIGNED ) * 50 * col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7396
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) * 50 * col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col1 * + tab2.col1 * - 23 + col2 FROM tab2
----
-22076
-6609
-80037

query I rowsort
SELECT ALL + 16 * col1 FROM tab1
----
160
208
416

query I rowsort
SELECT 21 * - col1 + col0 AS col0 FROM tab2
----
-1161
-278
-644

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7400
SELECT CAST( NULL AS SIGNED ) * + col2 * + col0 - col0 * + col0 / - col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7400
SELECT CAST ( NULL AS INTEGER ) * + col2 * + col0 - col0 * + col0 / - col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 22 * + col1 FROM tab1 cor0
----
-220
-286
-572

query I rowsort
SELECT ALL - 36 AS col0 FROM tab2 AS cor0
----
-36
-36
-36

onlyif mysql # use DIV operator for integer division
query I rowsort label-7403
SELECT + - 96 DIV col2 FROM tab0 AS cor0
----
-1
-2
-96

skipif mysql # not compatible
query I rowsort label-7403
SELECT + - 96 / col2 FROM tab0 AS cor0
----
-1
-2
-96

query I rowsort
SELECT + + ( + 84 ) * col2 * + col1 FROM tab2 AS cor0
----
128856
54264
70308

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 col2 FROM tab2
----
7
78
79

query I rowsort
SELECT - tab0.col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT ALL + 17 * + 61 FROM tab1 AS cor0
----
1037
1037
1037

query I rowsort
SELECT DISTINCT - - ( col2 ) * - cor0.col0 * - cor0.col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT + col1 * - 41 + col2 FROM tab2 AS cor0
----
-1244
-2393
-659

query I rowsort
SELECT ALL + col2 + + col1 * col1 AS col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT ALL - + 58 + - col2 FROM tab1 cor0
----
-112
-115
-154

query I rowsort
SELECT + col2 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col2 * + col0 * ( + 45 ) FROM tab2 AS cor0
----
135090
8505
91260

query I rowsort
SELECT DISTINCT + + col2 + col1 + 15 * - col1 AS col0 FROM tab2 AS cor0
----
-200
-407
-800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * - col2 + cor0.col2 col2 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT ALL - col0 * + cor0.col2 * + col1 + + ( - cor0.col2 ) FROM tab0 AS cor0
----
-3396
-664200
-68145

query I rowsort
SELECT DISTINCT - 35 AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
-35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7418
SELECT tab1.col0 * - CAST( NULL AS SIGNED ) FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7418
SELECT tab1.col0 * - CAST ( NULL AS INTEGER ) FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7419
SELECT col2 DIV col0 AS col1 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7419
SELECT col2 / col0 AS col1 FROM tab0 cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7420
SELECT + col2 DIV - col0 AS col1 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-7420
SELECT + col2 / - col0 AS col1 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT + col2 * tab1.col2 AS col1 FROM tab1
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - col0 * col1 col2 FROM tab2
----
-1360
-248
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-7423
SELECT ALL + col2 DIV 32 AS col0 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7423
SELECT ALL + col2 / 32 AS col0 FROM tab2 AS cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7424
SELECT DISTINCT + cor0.col0 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7424
SELECT DISTINCT + cor0.col0 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col0 * + col2 * col0 + cor0.col1 FROM tab2 AS cor0
----
1354
158243
237175

query I rowsort
SELECT DISTINCT - cor0.col1 * - col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - 53 * cor0.col2 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 64a9412550990dd1493da19947240b9a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 12 col2 FROM tab1 AS cor0
----
-12
-12
-12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + col0 ) col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 36 + + 79 * + col2 col0 FROM tab1 AS cor0
----
4302
4539
7620

query I rowsort
SELECT + col2 * 48 + col1 * ( col0 ) FROM tab2 cor0
----
1513
3167
5850

query I rowsort
SELECT ALL - 37 + col1 AS col1 FROM tab1 AS cor0
----
-11
-24
-27

query I rowsort
SELECT DISTINCT - col0 * - 67 - col2 AS col2 FROM tab1 AS cor0
----
147
4231
5264

query I rowsort
SELECT DISTINCT col2 * + col2 - col0 * col1 AS col0 FROM tab2 AS cor0
----
-3926
101
512

query I rowsort
SELECT ALL - 39 * 12 AS col0 FROM tab2 AS cor0
----
-468
-468
-468

query I rowsort
SELECT - col2 + - ( + col0 ) AS col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT - + ( col0 ) FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7438
SELECT DISTINCT + 3 * + 62 + col1 DIV col1 FROM tab2 AS cor0
----
187

skipif mysql # not compatible
query I rowsort label-7438
SELECT DISTINCT + 3 * + 62 + col1 / col1 FROM tab2 AS cor0
----
187

query I rowsort
SELECT - ( 64 ) FROM tab1 AS cor0
----
-64
-64
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 97 - 31 col0 FROM tab1 AS cor0
----
66
66
66

query I rowsort
SELECT DISTINCT + col0 * - col1 AS col2 FROM tab1 cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7442
SELECT ( + col1 ) + col2 * CAST( col1 AS SIGNED ) AS col2 FROM tab2 cor0
----
1593
663
868

skipif mysql # not compatible
query I rowsort label-7442
SELECT ( + col1 ) + col2 * CAST ( col1 AS INTEGER ) AS col2 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT ALL - - 5 * col1 + col1 AS col0 FROM tab1 AS cor0
----
156
60
78

query I rowsort
SELECT ALL col0 + - col0 AS col0 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7445
SELECT CAST( 18 AS SIGNED ) * - tab0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 23a2c19c534c15444997235cc7292278

skipif mysql # not compatible
query I rowsort label-7445
SELECT CAST ( 18 AS INTEGER ) * - tab0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 23a2c19c534c15444997235cc7292278

query I rowsort
SELECT ALL + col1 + ( col0 ) AS col1 FROM tab2
----
137
38
96

query I rowsort
SELECT + col1 * + 3 AS col2 FROM tab1 AS cor0
----
30
39
78

query I rowsort
SELECT ALL - col0 + 7 FROM tab2
----
-71
-72
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 0 col1 FROM tab2, tab0 AS cor0, tab1 cor1
----
0

query I rowsort
SELECT tab2.col1 * tab2.col2 + - 69 AS col0 FROM tab2
----
1465
577
768

query I rowsort
SELECT ALL 45 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT col2 * + 46 + ( col1 ) AS col0 FROM tab1 AS cor0
----
2510
2632
4429

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col0 * - col0 col2 FROM tab0 AS cor0
----
13824
42875
704969

query I rowsort
SELECT DISTINCT + ( + tab2.col1 ) FROM tab2
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 28 - cor1.col2 col1 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to 12b34d5fd40b54d7d75d1da639780cd9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7456
SELECT ALL - col2 * - CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7456
SELECT ALL - col2 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + - col0 AS col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7458
SELECT ALL col1 + - ( tab2.col2 ) DIV col1 AS col2 FROM tab2
----
15
31
59

skipif mysql # not compatible
query I rowsort label-7458
SELECT ALL col1 + - ( tab2.col2 ) / col1 AS col2 FROM tab2
----
15
31
59

query I rowsort
SELECT DISTINCT + 40 * col2 * col0 FROM tab1
----
145920
307200
6480

query I rowsort
SELECT + 86 * + 38 * col1 AS col1 FROM tab2 AS cor0
----
101308
192812
55556

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7461
SELECT DISTINCT + - col2 * col1 + col1 / CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7461
SELECT DISTINCT + - col2 * col1 + col1 / CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col1 * - ( + col0 ) FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT 39 * + 77 * + col2 FROM tab0
----
246246
3003
99099

query I rowsort
SELECT DISTINCT 54 * - col2 AS col1 FROM tab0
----
-1782
-4428
-54

query I rowsort
SELECT ALL - col0 * - col0 + + col0 FROM tab2 AS cor0
----
56
6162
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + - col1 col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT col0 * - col1 + - cor0.col1 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT + - 31 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

query I rowsort
SELECT + - 25 AS col0 FROM tab0 AS cor0
----
-25
-25
-25

query I rowsort
SELECT - 69 + - col2 + ( - col0 + col1 ) FROM tab0 AS cor0
----
-149
-40
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * + col1 col2 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col0 * col1 + - ( col1 ) AS col0 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT cor0.col1 * cor0.col0 + - ( - cor0.col1 * + col0 ) AS col0 FROM tab2 AS cor0
----
2686
434
9204

query I rowsort
SELECT - col1 + + col0 * 98 AS col2 FROM tab2 AS cor0
----
655
7585
7725

query I rowsort
SELECT + 31 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to c3c6f92f0ca72d71793339f88a57e336

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 10 col1 FROM tab0
----
-10
-10
-10

onlyif mysql # use DIV operator for integer division
query I rowsort label-7477
SELECT DISTINCT + 70 DIV col0 + col2 AS col0 FROM tab1
----
58
77
96

skipif mysql # not compatible
query I rowsort label-7477
SELECT DISTINCT + 70 / col0 + col2 AS col0 FROM tab1
----
58
77
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 77 col2 FROM tab0
----
-77

query I rowsort
SELECT DISTINCT + 77 AS col0 FROM tab2
----
77

query I rowsort
SELECT - + col1 * + col0 + cor0.col1 AS col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT - ( cor0.col2 ) * cor0.col0 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 9bb5096fcd17e3f131152e7a67a5338f

query I rowsort
SELECT ALL + ( - col1 ) * col2 * 38 + - col2 FROM tab1
----
-21717
-47520
-53406

query I rowsort
SELECT col1 * - col1 + - tab2.col0 AS col2 FROM tab2
----
-3559
-368
-968

query I rowsort
SELECT - col2 + + col2 + col2 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7485
SELECT - - col2 DIV 93 + - col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-7485
SELECT - - col2 / 93 + - col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - col2 * col1 + col1 FROM tab2 AS cor0
----
-1475
-629
-806

onlyif mysql # use DIV operator for integer division
query I rowsort label-7487
SELECT col2 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7487
SELECT col2 / cor0.col2 AS col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - - cor0.col2 + ( - col0 ) FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT - col1 * + ( - cor0.col0 ) FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - - col1 * col0 + - col0 + - col1 FROM tab0 AS cor0
----
1954
3263
7919

query I rowsort
SELECT - - col0 * - 95 FROM tab2 AS cor0
----
-665
-7410
-7505

query I rowsort
SELECT 51 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col1 * col2 col0 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT ALL col2 * 86 FROM tab2 cor0
----
2236
2322
3268

query I rowsort
SELECT col2 * + col1 * + col0 + col1 + col1 AS col2 FROM tab1 AS cor0
----
36500
4264
99866

query I rowsort
SELECT col1 - col1 * col1 AS col2 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT + ( - col0 ) * - col2 + + col1 * col0 AS col2 FROM tab1 AS cor0
----
240
4288
8720

query I rowsort
SELECT + col0 + + 89 * - col0 FROM tab2 AS cor0
----
-616
-6864
-6952

query I rowsort
SELECT ALL 69 * + col2 AS col1 FROM tab0
----
2277
5658
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-7500
SELECT col2 DIV tab1.col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7500
SELECT col2 / tab1.col2 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - 53 * col0 col0 FROM tab1 AS cor0
----
-162
-3456
-4320

query I rowsort
SELECT + 7 + 36 FROM tab1 AS cor0
----
43
43
43

query I rowsort
SELECT col0 + + col1 AS col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT 94 FROM tab1 AS cor0
----
94
94
94

query I rowsort
SELECT ALL + ( col1 ) * 9 AS col0 FROM tab1 AS cor0
----
117
234
90

query I rowsort
SELECT + - 92 AS col0 FROM tab1 AS cor0
----
-92
-92
-92

query I rowsort
SELECT - - col1 + col0 AS col2 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT + - 95 * col2 - col1 * col1 FROM tab1 AS cor0
----
-5515
-5806
-9289

query I rowsort
SELECT ALL + cor1.col0 + - ( 19 ) FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 967dc145588f46cdf64552b33ee9deb0

query I rowsort
SELECT DISTINCT - + col0 * - 76 AS col2 FROM tab1 AS cor0
----
228
4864
6080

query I rowsort
SELECT DISTINCT + - col1 + ( col2 ) AS col2 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL col0 * col0 - col1 * col1 FROM tab0 AS cor0
----
-360
-6820
-8184

query I rowsort
SELECT ALL - col0 * + col1 * col1 + + col1 FROM tab1 AS cor0
----
-13507
-2002
-6390

query I rowsort
SELECT DISTINCT - + col1 * + col2 - + col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT - col2 + - col2 * cor0.col1 * col2 AS col0 FROM tab0 AS cor0
----
-611966
-93687
-98

query I rowsort
SELECT DISTINCT + col2 * + ( + cor0.col0 ) + cor0.col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL cor0.col0 + + ( col2 + col0 ) FROM tab1 AS cor0
----
185
256
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-7518
SELECT ALL + - col0 DIV 81 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7518
SELECT ALL + - col0 / 81 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + col0 * cor0.col1 - + ( + col0 ) AS col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT - col1 * col2 + col0 * cor0.col2 FROM tab2 cor0
----
-648
2356
494

query I rowsort
SELECT ALL + + col0 + + ( - 61 * + col1 ) AS col0 FROM tab1 AS cor0
----
-1583
-546
-713

query I rowsort
SELECT ALL + col0 * cor0.col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7523
SELECT DISTINCT col1 DIV + 83 AS col1 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7523
SELECT DISTINCT col1 / + 83 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - - col2 * 74 * col2 FROM tab1 AS cor0
----
215784
240426
681984

query I rowsort
SELECT DISTINCT - col2 * col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL - ( + col2 ) * - col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL + 20 + col1 * + col1 FROM tab1 AS cor0
----
120
189
696

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 - + col2 col1 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT + + ( col0 ) * col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - 91 * + cor0.col2 FROM tab0 AS cor0
----
-3003
-7462
-91

query I rowsort
SELECT - 67 * cor0.col0 FROM tab2 AS cor0
----
-469
-5226
-5293

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + cor0.col1 + + 82 + col2 * col0 col2 FROM tab2 AS cor0
----
1108
3644
3730

query I rowsort
SELECT ALL - cor2.col1 FROM tab1, tab1 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 96e9ef2950805bca93a295eeea43ef5b

query I rowsort
SELECT - + col0 * + col2 * cor0.col2 AS col2 FROM tab0 cor0
----
-26136
-35
-598436

query I rowsort
SELECT ALL + 76 * col0 FROM tab0
----
1824
2660
6764

query I rowsort
SELECT col2 * - col1 + col2 * 62 FROM tab0 AS cor0
----
-2378
-35
-792

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT 42 + col1 * - CAST ( col0 AS REAL ) + + cor0.col0 AS col2 FROM tab2 AS cor0
----
-1222
-168
-4482

query I rowsort
SELECT DISTINCT - cor0.col0 * - col0 - 25 AS col2 FROM tab2 AS cor0
----
24
6059
6216

query I rowsort
SELECT - 51 * col2 AS col2 FROM tab1
----
-2754
-2907
-4896

query I rowsort
SELECT + col2 - - col1 * ( col2 * col2 ) FROM tab0
----
611966
93687
98

query I rowsort
SELECT ALL - 9 + + col1 AS col2 FROM tab2
----
22
50
8

query I rowsort
SELECT ALL - col1 * tab2.col0 * col0 FROM tab2
----
-106097
-1519
-358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - ( col2 ) * - col1 col0 FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT + tab2.col0 AS col2 FROM tab2, tab2 cor0
----
7
78
79

query I rowsort
SELECT DISTINCT 93 * col1 * ( col1 ) FROM tab2
----
26877
323733
89373

query I rowsort
SELECT ALL 31 + tab1.col1 AS col2 FROM tab1
----
41
44
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 + 71 col0 FROM tab2
----
1515
747
800

query I rowsort
SELECT - - col1 * cor0.col1 + cor0.col2 AS col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT + tab0.col1 * - 15 FROM tab0, tab1 AS cor0
----
-1290
-1365
-1455

query I rowsort
SELECT col2 * + col1 + col0 FROM tab2
----
1612
725
844

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7552
SELECT DISTINCT - cor0.col0 * CAST( - 99 * col1 + - 76 AS SIGNED ) FROM tab1 AS cor0
----
109040
68224
7950

skipif mysql # not compatible
query I rowsort label-7552
SELECT DISTINCT - cor0.col0 * CAST ( - 99 * col1 + - 76 AS INTEGER ) FROM tab1 AS cor0
----
109040
68224
7950

query I rowsort
SELECT - col2 + + cor0.col1 + cor0.col0 FROM tab0 cor0
----
131
77
98

query I rowsort
SELECT DISTINCT + col0 + - col0 * col1 + tab0.col0 AS col2 FROM tab0
----
-2016
-3325
-7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7555
SELECT DISTINCT - CAST( NULL AS DECIMAL ) + tab2.col2 FROM tab2, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7555
SELECT DISTINCT - CAST ( NULL AS REAL ) + tab2.col2 FROM tab2, tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col2 * 16 FROM tab1
----
-1536
-864
-912

query I rowsort
SELECT 20 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7559
SELECT ALL + col1 * + CAST( col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-7559
SELECT ALL + col1 * + CAST ( col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7560
SELECT ALL + col0 DIV + 47 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7560
SELECT ALL + col0 / + 47 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT DISTINCT 23 + col1 * col0 FROM tab2
----
1366
240
4625

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7562
SELECT ALL - CAST( NULL AS SIGNED ) * col1 * col1 + 33 col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7562
SELECT ALL - CAST ( NULL AS INTEGER ) * col1 * col1 + 33 col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 74 * - col0 + col2 * col1 AS col2 FROM tab2
----
1355
6492
7306

query I rowsort
SELECT DISTINCT col2 + col2 * - col2 FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT - cor1.col2 AS col2 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 38 * tab1.col2 col2 FROM tab1
----
-138624
-291840
-6156

query I rowsort
SELECT DISTINCT col0 - + 3 * + col2 FROM tab2
----
-35
-74
0

query I rowsort
SELECT DISTINCT - - col1 * - col0 * col1 AS col2 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL - 16 + + col0 AS col0 FROM tab1 AS cor0
----
-13
48
64

query I rowsort
SELECT col2 - col2 * col1 AS col1 FROM tab1 AS cor0
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-7571
SELECT DISTINCT + col1 DIV + col1 + col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-7571
SELECT DISTINCT + col1 / + col1 + col2 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT - 69 + 25 * + col0 AS col2 FROM tab0 AS cor0
----
2156
531
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-7573
SELECT - col0 DIV - col0 + cor0.col1 AS col0 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-7573
SELECT - col0 / - col0 + cor0.col1 AS col0 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT ALL + 60 + col2 AS col1 FROM tab1 AS cor0
----
114
117
156

query I rowsort
SELECT DISTINCT - col2 * - col0 + + cor0.col1 AS col2 FROM tab1 cor0
----
188
3658
7693

query I rowsort
SELECT ALL + col2 * - col2 + + col1 * col0 + + col0 AS col2 FROM tab0 AS cor0
----
1464
3429
999

query I rowsort
SELECT 21 FROM tab0 cor0
----
21
21
21

query I rowsort
SELECT ALL - + 6 * col2 + + 93 AS col2 FROM tab0 AS cor0
----
-105
-399
87

query I rowsort
SELECT ALL + - cor0.col2 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - + col1 * col0 + + col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL ( col0 ) AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - + col1 + col1 FROM tab2 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col0 col0 FROM tab2 cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 85 col0 FROM tab2 AS cor0
----
85
85
85

query I rowsort
SELECT col0 - + tab1.col0 * col0 AS col0 FROM tab1
----
-4032
-6
-6320

query I rowsort
SELECT 71 * + col1 AS col2 FROM tab2
----
1207
2201
4189

query I rowsort
SELECT ALL - col1 + col2 * col1 FROM tab0 cor0
----
0
2752
7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-7588
SELECT DISTINCT - + cor0.col2 DIV + col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-7588
SELECT DISTINCT - + cor0.col2 / + col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT DISTINCT + ( col1 ) * - col2 AS col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT - 90 * + col0 FROM tab1 AS cor0
----
-270
-5760
-7200

onlyif mysql # use DIV operator for integer division
query I rowsort label-7591
SELECT - 17 + col0 + 57 DIV + ( - col1 ) col0 FROM tab2 AS cor0
----
-11
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7591
SELECT - 17 + col0 + 57 / + ( - col1 ) col0 FROM tab2 AS cor0
----
-11
59
61

query I rowsort
SELECT + 59 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT + - 35 + + col1 * col1 AS col1 FROM tab1 AS cor0
----
134
641
65

query I rowsort
SELECT col1 * - 62 AS col2 FROM tab0
----
-5332
-5642
-6014

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7595
SELECT col0 + - CAST( 33 AS SIGNED ) + col1 col2 FROM tab0
----
147
77
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7595
SELECT col0 + - CAST ( 33 AS INTEGER ) + col1 col2 FROM tab0
----
147
77
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 2 col1 FROM tab0 cor0
----
-2
-2
-2

query I rowsort
SELECT cor0.col0 * col2 + 20 FROM tab1 AS cor0
----
182
3668
7700

query I rowsort
SELECT - 34 * - col0 FROM tab1
----
102
2176
2720

query I rowsort
SELECT ALL - 17 AS col1 FROM tab0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT 75 FROM tab2
----
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 82 col1 FROM tab0
----
-82

query I rowsort
SELECT + 69 AS col2 FROM tab1
----
69
69
69

query I rowsort
SELECT 15 FROM tab2, tab0 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7604
SELECT - col0 + - CAST( - col2 AS SIGNED ) * cor0.col2 - + col1 * col2 FROM tab1 AS cor0
----
1509
2615
7888

skipif mysql # not compatible
query I rowsort label-7604
SELECT - col0 + - CAST ( - col2 AS INTEGER ) * cor0.col2 - + col1 * col2 FROM tab1 AS cor0
----
1509
2615
7888

query I rowsort
SELECT - - col0 + ( + col2 ) AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + 58 + col1 FROM tab2
----
117
75
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7607
SELECT + col1 * col2 + 2 DIV col0 + + tab2.col0 * col0 FROM tab2
----
6887
7618
886

skipif mysql # not compatible
query I rowsort label-7607
SELECT + col1 * col2 + 2 / col0 + + tab2.col0 * col0 FROM tab2
----
6887
7618
886

query I rowsort
SELECT DISTINCT tab0.col2 * col2 + col1 FROM tab0
----
1175
6815
98

query I rowsort
SELECT ALL - tab1.col0 AS col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 cor1
----
243 values hashing to 877a8dbac0e29b86e845fb64ed9d2242

query I rowsort
SELECT DISTINCT col2 * 38 AS col0 FROM tab0 AS cor0
----
1254
3116
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + col1 col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT - col1 * + 99 AS col2 FROM tab1 AS cor0
----
-1287
-2574
-990

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7614
SELECT - col1 * CAST( - 13 AS SIGNED ) FROM tab0
----
1118
1183
1261

skipif mysql # not compatible
query I rowsort label-7614
SELECT - col1 * CAST ( - 13 AS INTEGER ) FROM tab0
----
1118
1183
1261

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7615
SELECT - col2 * CAST( + col1 AS SIGNED ) FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-7615
SELECT - col2 * CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - + cor0.col1 * 92 + + 18 AS col0 FROM tab2 cor0
----
-1546
-2834
-5410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * 43 * col0 - col0 col0 FROM tab0 AS cor0
----
-146020
-348346
-88776

query I rowsort
SELECT ALL ( col2 ) + col1 FROM tab2 cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7619
SELECT DISTINCT + CAST( + cor0.col2 AS SIGNED ) + - col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7619
SELECT DISTINCT + CAST ( + cor0.col2 AS INTEGER ) + - col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT 10 * 2 + - col1 AS col1 FROM tab0 AS cor0
----
-66
-71
-77

query I rowsort
SELECT 39 - col2 FROM tab2 AS cor0
----
1
12
13

query I rowsort
SELECT DISTINCT 73 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
73

query I rowsort
SELECT ALL 16 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

query I rowsort
SELECT + col0 * - col2 AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + ( + tab1.col0 ) FROM tab1, tab0 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * col2 - col0 col2 FROM tab1 AS cor0
----
-2919
-3313
-9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-7627
SELECT DISTINCT + col0 DIV 31 AS col2 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7627
SELECT DISTINCT + col0 / 31 AS col2 FROM tab0
----
0
1
2

query I rowsort
SELECT - 31 + - col0 * - col2 AS col0 FROM tab0 AS cor0
----
4
7267
761

query I rowsort
SELECT + 52 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT + ( cor0.col1 ) - + col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT 95 * cor0.col2 * - col1 FROM tab1 AS cor0
----
-118560
-133380
-54150

query I rowsort
SELECT - + col1 - + col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + - ( - col1 ) * col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + col1 + - 3 AS col2 FROM tab0 AS cor0
----
83
88
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 86 * 34 + cor0.col2 + - col2 col1 FROM tab2 AS cor0
----
2924
2924
2924

query I rowsort
SELECT + col2 + col1 * col1 + 49 FROM tab2 AS cor0
----
1037
3556
376

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - - ( cor0.col1 ) + col2 FROM tab2 cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-7639
SELECT ALL - col1 + + col1 DIV - 31 + col2 FROM tab2 AS cor0
----
-34
-5
21

skipif mysql # not compatible
query I rowsort label-7639
SELECT ALL - col1 + + col1 / - 31 + col2 FROM tab2 AS cor0
----
-34
-5
21

query I rowsort
SELECT 9 AS col1 FROM tab1 AS cor0
----
9
9
9

query I rowsort
SELECT - ( cor0.col1 ) AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab1, tab0 AS cor2
----
243 values hashing to aad6a39cc782d0570960622f04a07424

query I rowsort
SELECT col2 + - col1 * + 84 FROM tab1 AS cor0
----
-2130
-783
-996

onlyif mysql # use DIV operator for integer division
query I rowsort label-7643
SELECT + col0 DIV + col1 AS col0 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-7643
SELECT + col0 / + col1 AS col0 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT col1 - 60 FROM tab0
----
26
31
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + + 15 col0 FROM tab1
----
-39
-42
-81

query I rowsort
SELECT ALL + 41 AS col2 FROM tab0 cor0
----
41
41
41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7647
SELECT + CAST( col2 AS SIGNED ) + - col0 AS col1 FROM tab0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-7647
SELECT + CAST ( col2 AS INTEGER ) + - col0 AS col1 FROM tab0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7648
SELECT col0 DIV + col0 - col2 * col0 AS col0 FROM tab0
----
-34
-7297
-791

skipif mysql # not compatible
query I rowsort label-7648
SELECT col0 / + col0 - col2 * col0 AS col0 FROM tab0
----
-34
-7297
-791

query I rowsort
SELECT 20 * col1 AS col2 FROM tab0 AS cor0
----
1720
1820
1940

query I rowsort
SELECT ALL - col2 + ( + col1 ) FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL ( col1 ) + col2 FROM tab2
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * 4 + - col0 col0 FROM tab0
----
-31
108
239

query I rowsort
SELECT col2 + col0 * + col1 AS col2 FROM tab2
----
1381
244
4628

query I rowsort
SELECT ALL - + col0 AS col1 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT - + col1 * + col0 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - + col2 * + col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT 42 + + col0 AS col0 FROM tab1 AS cor0
----
106
122
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-7658
SELECT ALL - + col2 DIV - col2 + col1 AS col2 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-7658
SELECT ALL - + col2 / - col2 + col1 AS col2 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT ALL 68 * col2 FROM tab0 AS cor0
----
2244
5576
68

query I rowsort
SELECT + 33 * + col0 FROM tab1 AS cor0
----
2112
2640
99

query I rowsort
SELECT - - 12 + col2 * + col0 AS col0 FROM tab0 AS cor0
----
47
7310
804

query I rowsort
SELECT 34 * + col1 AS col0 FROM tab0 cor0
----
2924
3094
3298

query I rowsort
SELECT ALL - col0 * col1 * col0 FROM tab1 AS cor0
----
-234
-40960
-83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-7664
SELECT DISTINCT - cor0.col0 + col2 DIV + col1 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-7664
SELECT DISTINCT - cor0.col0 + col2 / + col1 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 85 + + col1 * col1 col2 FROM tab1 AS cor0
----
185
254
761

query I rowsort
SELECT ALL + + 83 * cor0.col1 * col2 AS col2 FROM tab0 AS cor0
----
235554
619346
8051

onlyif mysql # use DIV operator for integer division
query I rowsort label-7667
SELECT DISTINCT - ( col2 ) DIV + col0 col1 FROM tab0 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7667
SELECT DISTINCT - ( col2 ) / + col0 col1 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT 54 * cor0.col0 AS col0 FROM tab1 AS cor0
----
162
3456
4320

onlyif mysql # use DIV operator for integer division
query I rowsort label-7669
SELECT ALL + - col2 DIV + cor0.col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-7669
SELECT ALL + - col2 / + cor0.col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT DISTINCT + 18 * + col0 AS col1 FROM tab2 cor0
----
126
1404
1422

query I rowsort
SELECT DISTINCT + 16 * - cor0.col2 AS col0 FROM tab1 cor0
----
-1536
-864
-912

query I rowsort
SELECT - - col2 * + col2 * col0 + col2 FROM tab2 AS cor0
----
114114
5130
52754

query I rowsort
SELECT ALL - col2 * + 22 + cor0.col0 + - col2 FROM tab2 AS cor0
----
-520
-614
-795

query I rowsort
SELECT - col1 + - ( - col2 ) * - col0 AS col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT + col2 * - 70 FROM tab2 AS cor0
----
-1820
-1890
-2660

query I rowsort
SELECT + col1 * + 56 AS col0 FROM tab2 AS cor0
----
1736
3304
952

query I rowsort
SELECT col0 - + 15 FROM tab1 AS cor0
----
-12
49
65

query I rowsort
SELECT ALL + + col2 * ( col0 ) * col2 + - col1 * - col2 FROM tab2 AS cor0
----
114722
54262
5940

query I rowsort
SELECT + - cor0.col2 + - 25 + - 38 FROM tab1 AS cor0
----
-117
-120
-159

query I rowsort
SELECT DISTINCT + + col2 * - 47 + 54 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1134
-2139
-3810

query I rowsort
SELECT col0 * - 12 FROM tab2 AS cor0
----
-84
-936
-948

query I rowsort
SELECT ALL - cor0.col1 * col2 + cor0.col0 FROM tab1 cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL col0 + - ( - col0 ) AS col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT + 32 * col0 + col1 FROM tab2 AS cor0
----
2545
255
2555

onlyif mysql # use DIV operator for integer division
query I rowsort label-7685
SELECT 85 + 28 DIV cor0.col0 col1 FROM tab2 cor0
----
85
85
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7685
SELECT 85 + 28 / cor0.col0 col1 FROM tab2 cor0
----
85
85
89

query I rowsort
SELECT DISTINCT - - col2 * + col2 + col1 AS col0 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT col2 + cor0.col2 AS col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL + 20 * col1 FROM tab2 AS cor0
----
1180
340
620

onlyif mysql # use DIV operator for integer division
query I rowsort label-7689
SELECT ALL + col0 DIV 97 + - 5 FROM tab0
----
-5
-5
-5

skipif mysql # not compatible
query I rowsort label-7689
SELECT ALL + col0 / 97 + - 5 FROM tab0
----
-5
-5
-5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7690
SELECT ALL - CAST( NULL AS SIGNED ) + - col2 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7690
SELECT ALL - CAST ( NULL AS INTEGER ) + - col2 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 84 AS col1 FROM tab2, tab0 AS cor0
----
84

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab0, tab0 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to 9046c86f4ecdb3416770671e3173d46c

query I rowsort
SELECT DISTINCT col2 * - col1 + + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT - cor0.col0 * - col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + col2 * + cor0.col2 * - col2 FROM tab0 AS cor0
----
-1
-35937
-551368

query I rowsort
SELECT + col0 + col1 * col0 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT ALL - col1 - col1 * col0 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT ALL - - cor0.col2 + + col0 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT col0 * - col1 + col2 * col0 FROM tab2 cor0
----
-2574
-28
1659

onlyif mysql # use DIV operator for integer division
query I rowsort label-7700
SELECT + col2 DIV - col2 + col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-7700
SELECT + col2 / - col2 + col0 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT col1 * col0 - cor0.col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT + col0 + + col0 + - col1 * col0 FROM tab2
----
-1185
-203
-4446

query I rowsort
SELECT DISTINCT col0 * - col2 - + col1 AS col2 FROM tab2
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-7704
SELECT ALL - col0 * - col2 DIV col2 AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7704
SELECT ALL - col0 * - col2 / col2 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - + col1 * - col2 + + col0 FROM tab0 AS cor0
----
132
2862
7551

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE ( NULL ) NOT BETWEEN NULL AND ( col2 )
----

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT ( - col0 - col0 ) < NULL
----

query I rowsort
SELECT - col1 + col1 + - tab2.col1 AS col0 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT DISTINCT col1 * + col2 + col2 AS col0 FROM tab0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 67 col1 FROM tab0
----
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-7711
SELECT - col1 DIV - col2 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7711
SELECT - col1 / - col2 AS col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7712
SELECT ALL col0 + col1 DIV tab0.col1 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-7712
SELECT ALL col0 + col1 / tab0.col1 FROM tab0
----
25
36
90

query I rowsort
SELECT DISTINCT col2 * col1 + col2 + col0 AS col1 FROM tab2
----
1638
763
871

query I rowsort
SELECT DISTINCT col0 - - col0 * col1 AS col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT + col1 + col0 * tab1.col0 + col2 * - col1 * tab1.col1 FROM tab1
----
-1594
-36469
-9811

query I rowsort
SELECT - col1 + - tab1.col0 * col0 * col0 FROM tab1
----
-262154
-512013
-53

onlyif mysql # use DIV operator for integer division
query I rowsort label-7717
SELECT col1 DIV - col0 col1 FROM tab2
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7717
SELECT col1 / - col0 col1 FROM tab2
----
-4
0
0

query I rowsort
SELECT DISTINCT col2 + col1 * - tab0.col1 AS col0 FROM tab0
----
-7363
-8199
-9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-7719
SELECT DISTINCT + col2 + tab0.col2 DIV tab0.col2 AS col2 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-7719
SELECT DISTINCT + col2 + tab0.col2 / tab0.col2 AS col2 FROM tab0
----
2
34
83

query I rowsort
SELECT DISTINCT col2 * - col0 * + cor0.col1 + col0 + + col2 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
-108976
-39665
-7125

query I rowsort
SELECT + + col2 + + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT ALL - + col1 * cor0.col2 - col1 AS col2 FROM tab2 AS cor0
----
-1593
-663
-868

onlyif mysql # use DIV operator for integer division
query I rowsort label-7723
SELECT DISTINCT col2 + - col1 + col0 DIV + col0 AS col2 FROM tab0
----
-52
-8
-95

skipif mysql # not compatible
query I rowsort label-7723
SELECT DISTINCT col2 + - col1 + col0 / + col0 AS col2 FROM tab0
----
-52
-8
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-7724
SELECT col0 * col2 + col2 DIV col0 AS col1 FROM tab2
----
192
2028
3002

skipif mysql # not compatible
query I rowsort label-7724
SELECT col0 * col2 + col2 / col0 AS col1 FROM tab2
----
192
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7725
SELECT tab2.col0 / CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7725
SELECT tab2.col0 / CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7726
SELECT 50 DIV col0 FROM tab2
----
0
0
7

skipif mysql # not compatible
query I rowsort label-7726
SELECT 50 / col0 FROM tab2
----
0
0
7

query I rowsort
SELECT ALL - ( tab0.col2 ) AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT + col0 * - col0 * col0 FROM tab2
----
-343
-474552
-493039

query I rowsort
SELECT - tab1.col0 * col2 AS col1 FROM tab1
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7730
SELECT + col2 + + col1 * col0 DIV + col1 AS col2 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-7730
SELECT + col2 + + col1 * col0 / + col1 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT col2 + cor0.col0 * - ( col2 ) FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT - + col0 - - col1 AS col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - 21 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-147
-1638
-1659

query I rowsort
SELECT ALL - col2 + + cor0.col2 * - col0 * col1 AS col0 FROM tab0 AS cor0
----
-3396
-664200
-68145

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7735
SELECT - cor0.col1 * - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7735
SELECT - cor0.col1 * - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + + 95 AS col1 FROM tab0 AS cor0
----
128
177
96

query I rowsort
SELECT col1 * 93 FROM tab0 AS cor0
----
7998
8463
9021

query I rowsort
SELECT ALL - ( - 23 ) * col0 + 92 AS col1 FROM tab2 AS cor0
----
1886
1909
253

query I rowsort
SELECT ALL - - 3 * col1 + - col0 FROM tab1 AS cor0
----
-34
-41
75

query I rowsort
SELECT ALL + cor1.col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL 80 FROM tab1, tab2 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT + + 18 * - 52 FROM tab0 AS cor0
----
-936
-936
-936

query I rowsort
SELECT + + col1 + cor0.col2 AS col0 FROM tab1 AS cor0
----
109
67
80

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab0 cor1, tab1 cor2
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col2 col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - + 6 * col2 + 63 * col1 FROM tab0 AS cor0
----
5220
5241
6105

query I rowsort
SELECT - + col0 - cor0.col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT + 59 FROM tab1, tab0 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT - col0 * - 40 + tab2.col0 FROM tab2
----
287
3198
3239

query I rowsort
SELECT 21 AS col0 FROM tab0
----
21
21
21

query I rowsort
SELECT + ( 20 ) AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT - + col1 * col2 + - col0 AS col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL + 80 AS col1 FROM tab2
----
80
80
80

query I rowsort
SELECT ALL ( - col1 ) * - col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - + cor0.col2 + 59 FROM tab2, tab1 AS cor0
----
-37
2
5

query I rowsort
SELECT DISTINCT + + 44 + col0 FROM tab1 cor0
----
108
124
47

query I rowsort
SELECT ALL + 75 AS col2 FROM tab2
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * col1 col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL cor0.col0 + col2 AS col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT - col0 * - col2 * - col0 - - col2 FROM tab0 AS cor0
----
-1224
-18975
-649440

query I rowsort
SELECT ALL - col1 + - col2 * + col2 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT DISTINCT + 52 * cor0.col1 AS col2 FROM tab1 AS cor0
----
1352
520
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 72 + col2 col2 FROM tab2 AS cor0
----
110
98
99

query I rowsort
SELECT + - col2 + col1 + col2 * cor0.col0 FROM tab2 AS cor0
----
193
2061
2981

onlyif mysql # use DIV operator for integer division
query I rowsort label-7765
SELECT ALL + col1 DIV + 5 FROM tab1
----
2
2
5

skipif mysql # not compatible
query I rowsort label-7765
SELECT ALL + col1 / + 5 FROM tab1
----
2
2
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-7766
SELECT DISTINCT col1 DIV + CAST( col1 + col2 AS SIGNED ) col0 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7766
SELECT DISTINCT col1 / + CAST ( col1 + col2 AS INTEGER ) col0 FROM tab0
----
0

query I rowsort
SELECT - 76 * + col0 FROM tab0 AS cor0
----
-1824
-2660
-6764

query I rowsort
SELECT - col1 + cor0.col0 + - cor0.col2 FROM tab2 cor0
----
-51
-7
24

query I rowsort
SELECT ALL + col2 * + col2 + col2 AS col0 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT DISTINCT - - 61 FROM tab0 AS cor0
----
61

query I rowsort
SELECT - + ( 22 ) * - col0 FROM tab2 cor0
----
154
1716
1738

query I rowsort
SELECT 93 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col1 * col2 col1 FROM tab2
----
22599
24548
39884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7774
SELECT + col1 - + ( col1 * - CAST( NULL AS SIGNED ) ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7774
SELECT + col1 - + ( col1 * - CAST ( NULL AS INTEGER ) ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * 3 + - cor0.col0 AS col1 FROM tab1 AS cor0
----
107
159
208

query I rowsort
SELECT + - 44 * + col0 + - col1 + + ( cor0.col2 ) * + col1 AS col0 FROM tab2 cor0
----
-1957
-2847
498

query I rowsort
SELECT - 95 + + col1 + + col0 FROM tab1 AS cor0
----
-2
-21
-66

query I rowsort
SELECT 83 * col1 * col0 FROM tab2 cor0
----
111469
18011
381966

query I rowsort
SELECT - col1 + col2 * + col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT ALL + + ( - col0 ) AS col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - - col1 * col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - 82 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to f800b0aad28b82b2deb67f7045c9a45c

query I rowsort
SELECT col1 * cor0.col0 + col2 + 29 AS col2 FROM tab1 AS cor0
----
1165
161
726

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + ( + col2 ) * cor0.col2 col0 FROM tab0 AS cor0
----
-26136
-35
-598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7785
SELECT DISTINCT + CAST( 40 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
40

skipif mysql # not compatible
query I rowsort label-7785
SELECT DISTINCT + CAST ( 40 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
40

query I rowsort
SELECT ALL 51 * - cor0.col0 FROM tab1 AS cor0
----
-153
-3264
-4080

query I rowsort
SELECT + - col1 * col0 + + col2 * + col2 FROM tab0 cor0
----
-1375
-3394
-975

query I rowsort
SELECT ALL 1 + col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT - 2 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to ec11209ab257030053484fc13a1f6d17

query I rowsort
SELECT + + cor0.col1 AS col2 FROM tab1, tab2, tab2 cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT col0 * col2 * 62 + col0 + 96 AS col1 FROM tab0
----
2301
452661
49224

onlyif mysql # use DIV operator for integer division
query I rowsort label-7792
SELECT col0 + + col1 DIV col2 AS col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7792
SELECT col0 + + col1 / col2 AS col0 FROM tab1
----
3
64
80

query I rowsort
SELECT + col0 - 78 FROM tab1
----
-14
-75
2

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7795
SELECT CAST( NULL AS SIGNED ) + 48 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7795
SELECT CAST ( NULL AS INTEGER ) + 48 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - col1 ) * col2 * - 20 AS col1 FROM tab1 cor0
----
11400
24960
28080

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + 14 AS REAL ) + - col0 * ( col1 ) FROM tab0 AS cor0
----
-2050
-3381
-8085

query I rowsort
SELECT DISTINCT - 94 + + 54 * + col1 FROM tab0 AS cor0
----
4550
4820
5144

query I rowsort
SELECT + col0 * 38 + cor0.col1 * - col1 FROM tab1 AS cor0
----
-562
2332
2871

onlyif mysql # use DIV operator for integer division
query I rowsort label-7800
SELECT ALL 70 DIV - col0 AS col1 FROM tab0 AS cor0
----
-2
-2
0

skipif mysql # not compatible
query I rowsort label-7800
SELECT ALL 70 / - col0 AS col1 FROM tab0 AS cor0
----
-2
-2
0

query I rowsort
SELECT + - 42 FROM tab2 AS cor0
----
-42
-42
-42

query I rowsort
SELECT DISTINCT - 63 AS col1 FROM tab0 cor0 CROSS JOIN tab2 cor1
----
-63

onlyif mysql # use DIV operator for integer division
query I rowsort label-7803
SELECT + col2 * col2 DIV col1 AS col2 FROM tab2 AS cor0
----
11
23
84

skipif mysql # not compatible
query I rowsort label-7803
SELECT + col2 * col2 / col1 AS col2 FROM tab2 AS cor0
----
11
23
84

query I rowsort
SELECT + col0 + col2 * col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT - + col0 * - ( col0 ) AS col2 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-7806
SELECT DISTINCT + - col1 DIV + col1 AS col2 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-7806
SELECT DISTINCT + - col1 / + col1 AS col2 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT ALL + col1 * 89 + col1 AS col2 FROM tab1 AS cor0
----
1170
2340
900

query I rowsort
SELECT DISTINCT - col2 + - 15 AS col0 FROM tab1 AS cor0
----
-111
-69
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7809
SELECT DISTINCT + col1 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7809
SELECT DISTINCT + col1 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + - col2 + col1 * - col2 FROM tab2 AS cor0
----
-1560
-684
-864

onlyif mysql # use DIV operator for integer division
query I rowsort label-7811
SELECT + col2 + 79 DIV - col2 FROM tab0 AS cor0
----
-78
31
82

skipif mysql # not compatible
query I rowsort label-7811
SELECT + col2 + 79 / - col2 FROM tab0 AS cor0
----
-78
31
82

query I rowsort
SELECT ALL + 12 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

query I rowsort
SELECT ALL + col0 * - col0 AS col1 FROM tab2 cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + 20 col2 FROM tab0 AS cor0
----
-1640
-20
-660

query I rowsort
SELECT - 19 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 0fbbff28a7b63c37b01cf369f9325662

query I rowsort
SELECT ALL + col2 + ( 77 * - col2 ) FROM tab0 cor0
----
-2508
-6232
-76

query I rowsort
SELECT - + col0 + - col0 FROM tab2 cor0
----
-14
-156
-158

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0, tab2, tab2 AS cor1
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT DISTINCT col2 + ( col0 ) AS col1 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL col1 + - 58 FROM tab2 AS cor0
----
-27
-41
1

query I rowsort
SELECT DISTINCT - + col0 * + 24 * + col2 AS col2 FROM tab1 AS cor0
----
-184320
-3888
-87552

query I rowsort
SELECT DISTINCT 12 AS col2 FROM tab1 cor0
----
12

query I rowsort
SELECT ALL 8 * 7 AS col0 FROM tab2 AS cor0
----
56
56
56

skipif mysql # not compatible
query I rowsort
SELECT + + CAST ( + 39 AS REAL ) * col2 - - ( - cor0.col2 ) AS col0 FROM tab0 cor0
----
1254
3116
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7825
SELECT DISTINCT + CAST( NULL AS SIGNED ) + + col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7825
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + + col0 FROM tab2 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 + col1 * - cor0.col0 col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 40e4acd618698dd2305f1f7b8b547f7a

query I rowsort
SELECT ALL col0 + + 14 * + 2 FROM tab2
----
106
107
35

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col1 AS REAL ) * + cor0.col1 + + col1 + col0 AS col0 FROM tab2 AS cor0
----
-193
-3344
-923

query I rowsort
SELECT DISTINCT + + 4 AS col1 FROM tab2 AS cor0
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + col1 col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + - 4 * col0 FROM tab1 AS cor0
----
-12
-256
-320

query I rowsort
SELECT - col0 + - col2 AS col1 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL - 0 * cor0.col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 + + col1 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT col0 + col1 * + col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT + 60 * - col1 FROM tab1 cor0
----
-1560
-600
-780

onlyif mysql # use DIV operator for integer division
query I rowsort label-7838
SELECT ALL - col1 DIV col2 + col0 + col0 FROM tab1 cor0
----
128
160
6

skipif mysql # not compatible
query I rowsort label-7838
SELECT ALL - col1 / col2 + col0 + col0 FROM tab1 cor0
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 49 col1 FROM tab2
----
49

query I rowsort
SELECT - ( - col1 ) + col2 * col0 FROM tab0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - tab1.col0 * col2 col1 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT - + col1 * - 44 * + col1 FROM tab2 AS cor0
----
12716
153164
42284

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + 72 col0 FROM tab1 AS cor0
----
3888
4104
6912

query I rowsort
SELECT col1 * col0 + + 61 AS col0 FROM tab2
----
1404
278
4663

query I rowsort
SELECT - 97 AS col1 FROM tab0
----
-97
-97
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 66 col2 FROM tab1
----
66

query I rowsort
SELECT + 22 + - col1 * col0 AS col0 FROM tab1
----
-1018
-56
-618

query I rowsort
SELECT tab0.col2 + col1 AS col0 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL col1 * col0 * tab1.col0 - - col1 FROM tab1
----
260
40970
83213

query I rowsort
SELECT ALL - tab2.col1 - + col2 AS col0 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT col0 AS col2 FROM tab2 WHERE col2 / col2 BETWEEN ( col1 ) AND NULL
----

query I rowsort
SELECT col2 FROM tab1 WHERE NOT ( - col1 * col0 ) BETWEEN - col1 * col1 + - col2 * col0 AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL BETWEEN + col2 * col1 AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( NULL ) = NULL
----

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab2 WHERE ( col1 ) <> - col2 * + col2
----
7
78
79

query I rowsort
SELECT col2 + + col2 * col1 AS col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT tab1.col1 + + col2 AS col2 FROM tab1
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7858
SELECT col1 DIV cor0.col2 - - ( 25 ) DIV cor0.col0 FROM tab0 AS cor0
----
1
3
97

skipif mysql # not compatible
query I rowsort label-7858
SELECT col1 / cor0.col2 - - ( 25 ) / cor0.col0 FROM tab0 AS cor0
----
1
3
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7859
SELECT col2 - col2 DIV + col0 FROM tab0 cor0
----
1
32
82

skipif mysql # not compatible
query I rowsort label-7859
SELECT col2 - col2 / + col0 FROM tab0 cor0
----
1
32
82

query I rowsort
SELECT - + col1 * - col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col1 * tab0.col2 FROM tab0 WHERE NOT ( NULL ) = col2
----

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab1 AS cor0 WHERE NOT NULL IN ( col2 + + cor0.col2 / - col0 + + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7863
SELECT ALL col0 DIV tab2.col1 + - col0 AS col0 FROM tab2
----
-7
-75
-77

skipif mysql # not compatible
query I rowsort label-7863
SELECT ALL col0 / tab2.col1 + - col0 AS col0 FROM tab2
----
-7
-75
-77

query I rowsort
SELECT ALL col1 + + col0 FROM tab0 WHERE NOT NULL IN ( tab0.col1 * col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 * col1 * col0 - - col2 col0 FROM tab1
----
288
41017
83296

query I rowsort
SELECT - col2 - col1 AS col0 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT col0 + col1 - col1 AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT - col2 * tab0.col0 AS col1 FROM tab0 WHERE NOT NULL = NULL
----

query I rowsort
SELECT col0 + + col2 * - tab0.col2 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT - tab2.col2 AS col1 FROM tab2 WHERE col1 * + col0 BETWEEN ( col2 * col2 ) AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL NOT IN ( col1 * + tab2.col0 )
----

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 3ef3d333138b2b558b77004bad9bdabc

query I rowsort
SELECT + 8 + + col0 FROM tab1 AS cor0
----
11
72
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7874
SELECT DISTINCT CAST( + col2 AS SIGNED ) * cor0.col2 + 30 AS col1 FROM tab1 AS cor0
----
2946
3279
9246

skipif mysql # not compatible
query I rowsort label-7874
SELECT DISTINCT CAST ( + col2 AS INTEGER ) * cor0.col2 + 30 AS col1 FROM tab1 AS cor0
----
2946
3279
9246

onlyif mysql # use DIV operator for integer division
query I rowsort label-7875
SELECT - + col2 * cor0.col1 + col2 DIV + 64 AS col0 FROM tab0 cor0
----
-2838
-7461
-97

skipif mysql # not compatible
query I rowsort label-7875
SELECT - + col2 * cor0.col1 + col2 / + 64 AS col0 FROM tab0 cor0
----
-2838
-7461
-97

query I rowsort
SELECT + - col1 * - col0 + col0 FROM tab1 AS cor0
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 68 + cor0.col1 col1 FROM tab2 AS cor0
----
127
85
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7878
SELECT DISTINCT - + CAST( NULL AS DECIMAL ) - - col1 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7878
SELECT DISTINCT - + CAST ( NULL AS REAL ) - - col1 AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + + 65 FROM tab2 cor0
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col2 ) + - cor0.col1 col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT - 95 * - col2 + 58 FROM tab2 AS cor0
----
2528
2623
3668

query I rowsort
SELECT ALL col0 * col2 + + col2 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL col0 * - col2 + - cor0.col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT - col0 * col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - col2 + + col1 FROM tab1 cor0
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7886
SELECT DISTINCT + col1 + cor0.col1 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7886
SELECT DISTINCT + col1 + cor0.col1 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 89 FROM tab0 AS cor0
----
89

query I rowsort
SELECT ALL - + col0 + + cor0.col0 * - col2 AS col1 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT ALL 31 * + col2 + col1 + - col0 AS col1 FROM tab2 AS cor0
----
1116
787
861

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7890
SELECT DISTINCT - CAST( NULL AS SIGNED ) / - col1 AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-7890
SELECT DISTINCT - CAST ( NULL AS INTEGER ) / - col1 AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col2 AS REAL ) FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT + tab0.col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
24
35
89

query I rowsort
SELECT col2 + - col2 * col0 FROM tab2 cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-7894
SELECT + cor0.col2 DIV col2 - + col2 AS col1 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-7894
SELECT + cor0.col2 / col2 - + col2 AS col1 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT + - col0 * + col0 + - 23 FROM tab0 AS cor0
----
-1248
-599
-7944

query I rowsort
SELECT col1 + ( + col0 + col0 ) AS col2 FROM tab1 AS cor0
----
138
173
32

query I rowsort
SELECT col0 * ( col1 * + col1 ) FROM tab1 AS cor0
----
13520
2028
6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col0 * + col2 col2 FROM tab2 cor0
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT - ( + col2 ) + col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL tab1.col1 * col2 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT 24 + col1 FROM tab1 cor0
----
34
37
50

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
24
35
89

query I rowsort
SELECT - col0 * col0 * - 83 + col1 FROM tab1 AS cor0
----
339978
531213
773

query I rowsort
SELECT 62 - cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 4393ec7ccbd29591e2eec2eb5fc6043e

query I rowsort
SELECT ALL col1 * + cor0.col0 - ( - col2 + + col0 ) FROM tab1 AS cor0
----
1056
129
633

query I rowsort
SELECT + col2 + col0 * - ( - cor0.col1 ) * col1 FROM tab1 cor0
----
13616
2082
6457

query I rowsort
SELECT ALL - + 40 + col1 AS col2 FROM tab2 AS cor0
----
-23
-9
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col1 col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT + col1 + + cor0.col1 * + cor0.col0 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT ALL + col0 + + cor0.col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT 30 AS col2 FROM tab2 AS cor0
----
30

query I rowsort
SELECT ALL col0 - col0 AS col1 FROM tab1 AS cor0
----
0
0
0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to b62c1ebc681aca72d13feadb888b3be7

query I rowsort
SELECT + col0 + col2 * + 37 FROM tab0 AS cor0
----
1245
3123
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - + col1 * - 35 col0 FROM tab0
----
3043
3267
3396

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7916
SELECT 56 * col0 - CAST( NULL AS SIGNED ) col0 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7916
SELECT 56 * col0 - CAST ( NULL AS INTEGER ) col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col0 * 4 + col0 FROM tab2 AS cor0
----
35
390
395

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7919
SELECT + - col1 - + CAST( NULL AS DECIMAL ) * + col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7919
SELECT + - col1 - + CAST ( NULL AS REAL ) * + col2 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7920
SELECT DISTINCT + col1 * ( + col2 ) + cor0.col1 * 34 DIV + col1 + col2 FROM tab0 AS cor0
----
132
2905
7578

skipif mysql # not compatible
query I rowsort label-7920
SELECT DISTINCT + col1 * ( + col2 ) + cor0.col1 * 34 / + col1 + col2 FROM tab0 AS cor0
----
132
2905
7578

query I rowsort
SELECT ( - 54 ) AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 71e27a12767d3a987ce05e4d6edad211

query I rowsort
SELECT DISTINCT ( + col1 ) + - col1 FROM tab1
----
0

query I rowsort
SELECT ALL - col0 - - tab1.col2 AS col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT - col2 + col1 * col0 + + col2 AS col1 FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7925
SELECT ALL + col2 DIV + 88 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7925
SELECT ALL + col2 / + 88 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT 44 * - col1 AS col2 FROM tab0 AS cor0
----
-3784
-4004
-4268

query I rowsort
SELECT ALL - + 72 * col0 * - col1 AS col2 FROM tab1 AS cor0
----
46080
5616
74880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 42 * + col1 col0 FROM tab2 cor0
----
1302
2478
714

query I rowsort
SELECT DISTINCT + + 8 * ( + col1 ) AS col2 FROM tab1 AS cor0
----
104
208
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7930
SELECT DISTINCT + cor0.col1 * + ( - col1 ) - + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7930
SELECT DISTINCT + cor0.col1 * + ( - col1 ) - + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT 13 + + 39 AS col1 FROM tab0 AS cor0
----
52

query I rowsort
SELECT ALL - + 49 + col0 * col1 FROM tab2 AS cor0
----
1294
168
4553

query I rowsort
SELECT DISTINCT + + ( - col1 ) - + col2 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT col2 * 81 * tab1.col2 FROM tab1
----
236196
263169
746496

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) FROM tab2, tab0 AS cor0, tab0 AS cor1
----
-1
-33
-82

query I rowsort
SELECT ALL + col1 * - col0 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-7937
SELECT + + col0 DIV + col0 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7937
SELECT + + col0 / + col0 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT col1 + + ( tab0.col1 ) FROM tab0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-7939
SELECT + col2 DIV col2 - - col2 AS col2 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-7939
SELECT + col2 / col2 - - col2 AS col2 FROM tab0
----
2
34
83

query I rowsort
SELECT + ( + col0 ) AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT - col2 * col0 + col0 * col1 FROM tab0
----
1272
3360
801

query I rowsort
SELECT - ( + 49 ) * col0 FROM tab0 AS cor0
----
-1176
-1715
-4361

query I rowsort
SELECT 51 FROM tab2, tab2 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT - - 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 0 * col2 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - ( cor0.col2 ) FROM tab1 cor0
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7947
SELECT + CAST( NULL AS SIGNED ) * - 44 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7947
SELECT + CAST ( NULL AS INTEGER ) * - 44 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - col1 ) * col0 AS col1 FROM tab2
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 col0 FROM tab1
----
14
14
14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7950
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7950
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + 90 FROM tab1
----
90
90
90

query I rowsort
SELECT - 76 * - col1 AS col1 FROM tab0 AS cor0
----
6536
6916
7372

query I rowsort
SELECT - col2 * col1 AS col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + 37 AS col1 FROM tab2 cor0
----
37
37
37

query I rowsort
SELECT + col2 * - col2 * col2 AS col1 FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT DISTINCT + cor0.col2 * + col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + + col2 + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - + col0 * col0 * col0 - col1 AS col0 FROM tab1 AS cor0
----
-262154
-512013
-53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7959
SELECT DISTINCT CAST( NULL AS SIGNED ) + 2 AS col0 FROM tab2, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7959
SELECT DISTINCT CAST ( NULL AS INTEGER ) + 2 AS col0 FROM tab2, tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7960
SELECT ALL + cor0.col2 * - CAST( NULL AS SIGNED ) + + 93 * + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7960
SELECT ALL + cor0.col2 * - CAST ( NULL AS INTEGER ) + + 93 * + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col1 * - col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + - cor0.col1 + 99 * col2 FROM tab0 AS cor0
----
2
3181
8027

onlyif mysql # use DIV operator for integer division
query I rowsort label-7963
SELECT - 25 * tab1.col1 DIV cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 459ab730530955026e4dc41767dc2388

skipif mysql # not compatible
query I rowsort label-7963
SELECT - 25 * tab1.col1 / cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 459ab730530955026e4dc41767dc2388

query I rowsort
SELECT - 36 + - col1 AS col2 FROM tab0 AS cor0
----
-122
-127
-133

query I rowsort
SELECT DISTINCT + 29 * 15 AS col1 FROM tab1 AS cor0
----
435

query I rowsort
SELECT + col0 * + 98 * - col1 FROM tab1 AS cor0
----
-101920
-62720
-7644

onlyif mysql # use DIV operator for integer division
query I rowsort label-7967
SELECT ALL + + col0 DIV + cor0.col2 AS col0 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7967
SELECT ALL + + col0 / + cor0.col2 AS col0 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT cor0.col0 + 15 AS col2 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to c2805c0e5f4c8398570c7ab76c05de70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7969
SELECT ALL - CAST( + 31 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-31
-31
-31

skipif mysql # not compatible
query I rowsort label-7969
SELECT ALL - CAST ( + 31 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-31
-31
-31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7970
SELECT ALL CAST( NULL AS DECIMAL ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7970
SELECT ALL CAST ( NULL AS REAL ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT col0 + 34 + col1 * + tab0.col1 FROM tab0
----
7454
8404
9478

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 cor0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to 89714dd446b7a97f8787d5744bdbf323

query I rowsort
SELECT + tab2.col1 * - 72 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 5d5ef1574947049fb8562a7412c6d88b

query I rowsort
SELECT - col1 * + col2 * + col1 FROM tab0 cor0
----
-244068
-679042
-9409

query I rowsort
SELECT + - col1 + - ( cor0.col2 ) AS col0 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT ALL - ( cor0.col1 ) * + col0 + + col0 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL - + col2 * cor0.col1 AS col0 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - 18 * - col1 AS col0 FROM tab1 cor0
----
180
234
468

query I rowsort
SELECT 0 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT 33 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7981
SELECT - ( col0 ) + - CAST( NULL AS SIGNED ) + 69 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7981
SELECT - ( col0 ) + - CAST ( NULL AS INTEGER ) + 69 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 43 * col2 * col2 FROM tab2 AS cor0
----
-29068
-31347
-62092

query I rowsort
SELECT ALL ( 1 ) * tab2.col2 FROM tab2
----
26
27
38

query I rowsort
SELECT ( - col0 ) * col0 * col1 FROM tab2
----
-106097
-1519
-358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 59 * - tab0.col0 col2 FROM tab0
----
1416
2065
5251

query I rowsort
SELECT ALL + 53 FROM tab0 AS cor0
----
53
53
53

query I rowsort
SELECT - tab1.col1 + - col1 + - 93 * - col2 FROM tab1
----
4970
5281
8902

skipif mysql # not compatible
query I rowsort
SELECT + col0 + - CAST ( col1 AS REAL ) * + col1 * + CAST ( + col0 AS INTEGER ) + - cor0.col1 AS col1 FROM tab1 AS cor0
----
-13453
-2051
-6346

query I rowsort
SELECT + 54 * col1 AS col1 FROM tab1 cor0
----
1404
540
702

query I rowsort
SELECT + col1 * col0 + - ( col0 ) FROM tab1 AS cor0
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-7991
SELECT col0 * + col0 - ( + col2 ) DIV cor0.col1 FROM tab0 AS cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-7991
SELECT col0 * + col0 - ( + col2 ) / cor0.col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT + cor0.col1 * 82 AS col1 FROM tab2 AS cor0
----
1394
2542
4838

query I rowsort
SELECT + col2 + 71 FROM tab2 AS cor0
----
109
97
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7994
SELECT ALL - col1 + - CAST( - col1 + col1 AS SIGNED ) DIV + ( + col0 ) AS col1 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-7994
SELECT ALL - col1 + - CAST ( - col1 + col1 AS INTEGER ) / + ( + col0 ) AS col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT ALL col1 * - tab2.col0 + + col0 AS col1 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT ALL + col0 + - 93 AS col1 FROM tab1
----
-13
-29
-90

query I rowsort
SELECT DISTINCT col2 * - ( - col2 ) AS col0 FROM tab2 AS cor0
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7998
SELECT ALL + col2 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7998
SELECT ALL + col2 + 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 - col0 + + cor0.col1 col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL - col2 * cor0.col2 * 3 AS col2 FROM tab1 AS cor0
----
-27648
-8748
-9747

query I rowsort
SELECT - col1 + - 4 AS col2 FROM tab2 cor0
----
-21
-35
-63

query I rowsort
SELECT DISTINCT + - col2 + 29 * col1 FROM tab1 AS cor0
----
233
281
700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - col0 col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + 34 AS col1 FROM tab2, tab2 AS cor0
----
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-8005
SELECT col0 DIV col0 AS col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8005
SELECT col0 / col0 AS col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + 91 AS col1 FROM tab1 AS cor0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col2 col2 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8008
SELECT DISTINCT + + 77 + col2 * CAST( + 55 AS SIGNED ) * + cor0.col2 AS col0 FROM tab1 AS cor0
----
160457
178772
506957

skipif mysql # not compatible
query I rowsort label-8008
SELECT DISTINCT + + 77 + col2 * CAST ( + 55 AS INTEGER ) * + cor0.col2 AS col0 FROM tab1 AS cor0
----
160457
178772
506957

query I rowsort
SELECT + col1 * + col1 + + cor0.col2 FROM tab1 cor0
----
157
265
730

query I rowsort
SELECT DISTINCT + 17 * - col2 AS col1 FROM tab0 AS cor0
----
-1394
-17
-561

query I rowsort
SELECT ALL ( - col0 ) + - ( col1 ) AS col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT - - 67 AS col2 FROM tab2 AS cor0
----
67
67
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-8013
SELECT DISTINCT + col2 * col0 + - col2 DIV + col0 FROM tab1 AS cor0
----
144
3648
7679

skipif mysql # not compatible
query I rowsort label-8013
SELECT DISTINCT + col2 * col0 + - col2 / + col0 FROM tab1 AS cor0
----
144
3648
7679

onlyif mysql # use DIV operator for integer division
query I rowsort label-8014
SELECT + col1 * + col0 + - 54 DIV + col0 AS col2 FROM tab0 AS cor0
----
2062
3394
8099

skipif mysql # not compatible
query I rowsort label-8014
SELECT + col1 * + col0 + - 54 / + col0 AS col2 FROM tab0 AS cor0
----
2062
3394
8099

query I rowsort
SELECT + - 44 + col0 + - col1 FROM tab0 AS cor0
----
-106
-106
-46

query I rowsort
SELECT + + 41 * col0 + 81 + col0 AS col2 FROM tab1 cor0
----
207
2769
3441

query I rowsort
SELECT ALL + tab1.col1 * + col1 FROM tab1
----
100
169
676

query I rowsort
SELECT ALL + col1 * - 35 AS col2 FROM tab0
----
-3010
-3185
-3395

onlyif mysql # use DIV operator for integer division
query I rowsort label-8019
SELECT - + col2 * - col0 * col1 - col2 DIV + col1 AS col0 FROM tab0 AS cor0
----
3395
664118
68112

skipif mysql # not compatible
query I rowsort label-8019
SELECT - + col2 * - col0 * col1 - col2 / + col1 AS col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL + col0 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-8021
SELECT DISTINCT + cor0.col1 DIV + col0 + + col1 AS col1 FROM tab0 cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-8021
SELECT DISTINCT + cor0.col1 / + col0 + + col1 AS col1 FROM tab0 cor0
----
89
92
99

query I rowsort
SELECT - cor0.col1 * cor0.col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-8023
SELECT DISTINCT + cor0.col0 * - cor0.col2 * + 35 + - ( + col0 ) DIV - 12 AS col2 FROM tab1 AS cor0
----
-127675
-268794
-5670

skipif mysql # not compatible
query I rowsort label-8023
SELECT DISTINCT + cor0.col0 * - cor0.col2 * + 35 + - ( + col0 ) / - 12 AS col2 FROM tab1 AS cor0
----
-127675
-268794
-5670

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8024
SELECT col1 + CAST( - col0 AS SIGNED ) FROM tab2
----
-19
-62
24

skipif mysql # not compatible
query I rowsort label-8024
SELECT col1 + CAST ( - col0 AS INTEGER ) FROM tab2
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-8025
SELECT col2 + + 2 DIV - 10 AS col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8025
SELECT col2 + + 2 / - 10 AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT - 4 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 39ed23475412c3cbba02ecdd2d7018e6

onlyif mysql # use DIV operator for integer division
query I rowsort label-8027
SELECT + col2 + + ( col0 ) DIV col0 AS col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-8027
SELECT + col2 + + ( col0 ) / col0 AS col2 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT DISTINCT - col2 + 0 + - col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT + + col0 + + col1 + col2 * - col0 FROM tab1 AS cor0
----
-133
-3574
-7587

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col2 FROM tab1, tab0, tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8031
SELECT DISTINCT - - col0 + col2 DIV col0 + col1 AS col1 FROM tab0 AS cor0
----
111
132
180

skipif mysql # not compatible
query I rowsort label-8031
SELECT DISTINCT - - col0 + col2 / col0 + col1 AS col1 FROM tab0 AS cor0
----
111
132
180

skipif mysql # not compatible
query I rowsort
SELECT ALL + cor0.col1 * CAST ( cor0.col2 * - col0 + col0 AS REAL ) FROM tab0 AS cor0
----
-656019
-66048
0

query I rowsort
SELECT ALL col2 * ( + col0 ) FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col2 + + ( col2 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + col0 + + col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT col0 * col0 + col2 * ( col0 ) FROM tab2 cor0
----
238
8112
9243

query I rowsort
SELECT DISTINCT 50 * 45 AS col1 FROM tab0 AS cor0
----
2250

query I rowsort
SELECT DISTINCT - col0 + 52 + col1 FROM tab2 AS cor0
----
-10
33
76

query I rowsort
SELECT DISTINCT + - col0 * + col1 + col1 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-8040
SELECT ALL col0 * - col2 + col2 DIV - ( col2 ) AS col0 FROM tab0 AS cor0
----
-36
-7299
-793

skipif mysql # not compatible
query I rowsort label-8040
SELECT ALL col0 * - col2 + col2 / - ( col2 ) AS col0 FROM tab0 AS cor0
----
-36
-7299
-793

query I rowsort
SELECT - - ( + 74 ) + - col1 FROM tab0 AS cor0
----
-12
-17
-23

query I rowsort
SELECT ALL - col1 * 63 FROM tab2 AS cor0
----
-1071
-1953
-3717

query I rowsort
SELECT DISTINCT 1 AS col2 FROM tab0 AS cor0
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8044
SELECT ALL + col1 * - cor0.col2 + col1 * + col2 + + col0 DIV col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8044
SELECT ALL + col1 * - cor0.col2 + col1 * + col2 + + col0 / col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT col2 * - 9 FROM tab2 cor0
----
-234
-243
-342

query I rowsort
SELECT ALL - ( cor0.col2 ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - - col2 + cor0.col1 AS col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + - col1 + ( - col0 ) FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL ( - 71 ) FROM tab0 cor0
----
-71
-71
-71

query I rowsort
SELECT ALL - - 99 * + col2 FROM tab2 AS cor0
----
2574
2673
3762

query I rowsort
SELECT 80 AS col2 FROM tab1 AS cor0
----
80
80
80

query I rowsort
SELECT DISTINCT 81 + - 28 FROM tab0 AS cor0
----
53

query I rowsort
SELECT 15 AS col1 FROM tab1 AS cor0
----
15
15
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 + + col2 * col0 col1 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT ALL + 81 - + cor0.col2 AS col2 FROM tab2 AS cor0
----
43
54
55

query I rowsort
SELECT DISTINCT - + 25 - - col2 FROM tab0 AS cor0
----
-24
57
8

query I rowsort
SELECT ALL - + ( col1 ) * col1 + 7 * + cor0.col0 FROM tab1 AS cor0
----
-655
348
391

query I rowsort
SELECT - col1 * + col1 * col2 + 1 FROM tab2 AS cor0
----
-10981
-25946
-90505

query I rowsort
SELECT ALL + - 40 * col0 * - col1 + col1 AS col0 FROM tab0 AS cor0
----
135897
324051
82646

query I rowsort
SELECT - ( - col1 ) + ( col2 ) FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT cor0.col2 - - cor0.col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + ( + col0 ) * col1 * - 53 AS col0 FROM tab2 AS cor0
----
-11501
-243906
-71179

query I rowsort
SELECT DISTINCT + 50 AS col0 FROM tab2
----
50

query I rowsort
SELECT - 16 FROM tab0 AS cor0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT - 51 + col0 FROM tab1 AS cor0
----
-48
13
29

query I rowsort
SELECT col1 * ( - col0 + - col1 ) AS col1 FROM tab1
----
-1209
-740
-754

query I rowsort
SELECT - ( col0 + col1 ) * + 37 AS col0 FROM tab2
----
-1406
-3552
-5069

query I rowsort
SELECT ALL 4 + cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to fc24c9ec8ac6397766aa451efecf4cfc

query I rowsort
SELECT + 29 * col1 * col0 + 38 * cor0.col0 FROM tab1 cor0
----
20992
2376
33200

query I rowsort
SELECT ALL - ( + col1 ) * 34 FROM tab2 AS cor0
----
-1054
-2006
-578

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8071
SELECT CAST( NULL AS DECIMAL ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8071
SELECT CAST ( NULL AS REAL ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - + col1 * cor0.col2 + + col2 + col1 FROM tab0 AS cor0
----
-2719
-7289
1

query I rowsort
SELECT ALL - cor0.col1 * col1 + - col1 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT ALL - cor0.col1 * col0 + - col0 + col2 FROM tab0 AS cor0
----
-2055
-3429
-8106

query I rowsort
SELECT col1 * col0 + - ( + 76 ) FROM tab1
----
2
564
964

onlyif mysql # use DIV operator for integer division
query I rowsort label-8076
SELECT DISTINCT - col2 + col2 DIV col0 FROM tab0
----
-1
-32
-82

skipif mysql # not compatible
query I rowsort label-8076
SELECT DISTINCT - col2 + col2 / col0 FROM tab0
----
-1
-32
-82

query I rowsort
SELECT - + col2 * ( - 76 ) AS col0 FROM tab1 AS cor0
----
4104
4332
7296

query I rowsort
SELECT + - col2 + + ( col0 ) FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT col1 + col2 * - col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT ALL + + col0 + col2 * + col2 FROM tab2 AS cor0
----
1523
736
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-8081
SELECT DISTINCT - + col1 + + col1 - col1 DIV col1 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-8081
SELECT DISTINCT - + col1 + + col1 - col1 / col1 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT + col0 * + 83 + - col0 + + col0 FROM tab2 AS cor0
----
581
6474
6557

query I rowsort
SELECT - col0 + - 2 FROM tab1 cor0
----
-5
-66
-82

query I rowsort
SELECT ALL col1 + tab1.col1 FROM tab1
----
20
26
52

query I rowsort
SELECT - col1 * + ( col0 + col2 ) AS col2 FROM tab0 AS cor0
----
-15561
-3492
-4902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col0 * tab2.col1 + + col1 col1 FROM tab2
----
1281
241
4583

query I rowsort
SELECT - col1 * col0 + col2 FROM tab1 cor0
----
-24
-583
-944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8088
SELECT ALL + col0 + + col2 * CAST( - col1 AS SIGNED ) AS col2 FROM tab1
----
-1168
-1401
-506

skipif mysql # not compatible
query I rowsort label-8088
SELECT ALL + col0 + + col2 * CAST ( - col1 AS INTEGER ) AS col2 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT 26 FROM tab1, tab0 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT - col0 + 60 AS col2 FROM tab1 AS cor0
----
-20
-4
57

query I rowsort
SELECT DISTINCT - - col1 - col0 AS col2 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT DISTINCT col1 * col0 + - col2 FROM tab1 cor0
----
24
583
944

query I rowsort
SELECT DISTINCT col1 * - ( 14 ) - + col1 * - 21 AS col2 FROM tab1 AS cor0
----
182
70
91

query I rowsort
SELECT - cor1.col0 * cor1.col2 * 10 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to a33570b6767420466241a84e8e4c251e

query I rowsort
SELECT ALL + ( col0 ) - col1 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT cor0.col2 FROM tab1, tab2 cor0 CROSS JOIN tab0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-8097
SELECT col2 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8097
SELECT col2 / cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT + 31 FROM tab1, tab1 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

onlyif mysql # use DIV operator for integer division
query I rowsort label-8099
SELECT ( + col1 + col2 ) DIV - col1 AS col2 FROM tab2
----
-1
-1
-3

skipif mysql # not compatible
query I rowsort label-8099
SELECT ( + col1 + col2 ) / - col1 AS col2 FROM tab2
----
-1
-1
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-8100
SELECT - ( + tab1.col1 ) DIV col0 AS col0 FROM tab1
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-8100
SELECT - ( + tab1.col1 ) / col0 AS col0 FROM tab1
----
-8
0
0

query I rowsort
SELECT ALL + 68 FROM tab2, tab2 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT ( col2 ) * col0 * 51 - + cor0.col1 * col0 FROM tab2 AS cor0
----
151759
9422
98826

query I rowsort
SELECT ALL - ( + col1 * + col1 ) + + col2 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT col0 + + 73 * + col2 * col2 AS col2 FROM tab2
----
105491
49426
53224

query I rowsort
SELECT ALL 83 * - col0 * - col0 FROM tab1
----
339968
531200
747

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT ALL - - 4 * + col2 FROM tab1 AS cor0
----
216
228
384

query I rowsort
SELECT - 38 - col1 AS col2 FROM tab0 AS cor0
----
-124
-129
-135

query I rowsort
SELECT ALL + 5 + tab1.col1 AS col1 FROM tab1
----
15
18
31

query I rowsort
SELECT DISTINCT cor1.col2 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT ALL tab2.col2 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL 69 * col2 FROM tab2 AS cor0
----
1794
1863
2622

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( - cor0.col2 ) * 12 + + col1 * + col1 col2 FROM tab1 AS cor0
----
-584
-983
28

query I rowsort
SELECT DISTINCT 23 * - cor0.col0 FROM tab2 AS cor0
----
-161
-1794
-1817

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col0 col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT 99 * col0 FROM tab0 AS cor0
----
2376
3465
8811

query I rowsort
SELECT + 84 * - col0 FROM tab0 AS cor0
----
-2016
-2940
-7476

query I rowsort
SELECT - + col0 + col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT + col2 * + ( - col0 ) + - col0 FROM tab2 AS cor0
----
-196
-2106
-3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-8120
SELECT - col0 + col0 DIV - col0 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-8120
SELECT - col0 + col0 / - col0 FROM tab1 AS cor0
----
-4
-65
-81

query I rowsort
SELECT + col1 * + col2 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT - ( col1 ) + + col2 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8123
SELECT - col1 * - col0 + col0 DIV + col0 AS col2 FROM tab1 cor0
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-8123
SELECT - col1 * - col0 + col0 / + col0 AS col2 FROM tab1 cor0
----
1041
641
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8124
SELECT DISTINCT 25 DIV - col1 FROM tab2
----
-1
0

skipif mysql # not compatible
query I rowsort label-8124
SELECT DISTINCT 25 / - col1 FROM tab2
----
-1
0

query I rowsort
SELECT ALL - - col0 * cor0.col0 + - ( col0 ) * - col1 FROM tab2 AS cor0
----
10686
266
7584

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab2, tab2 cor1
----
3645 values hashing to f8426cd4d01ba96a72d7348574fbbc8e

query I rowsort
SELECT DISTINCT - 67 AS col1 FROM tab2
----
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + 7 + - col2 * col1 col1 FROM tab2 AS cor0
----
-1121
-527
-620

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8129
SELECT col0 * - CAST( col0 AS DECIMAL ) - - cor0.col1 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8129
SELECT col0 * - CAST ( col0 AS REAL ) - - cor0.col1 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 57 AS col1 FROM tab1, tab2 AS cor0
----
-57

query I rowsort
SELECT col2 * + cor0.col1 + - col2 * - col1 AS col2 FROM tab1 AS cor0
----
1140
2496
2808

query I rowsort
SELECT - col2 * 40 - + col0 FROM tab0 AS cor0
----
-1344
-3369
-75

query I rowsort
SELECT + col1 * 45 FROM tab2
----
1395
2655
765

query I rowsort
SELECT - col0 * tab0.col2 AS col2 FROM tab0
----
-35
-7298
-792

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 ALL + tab0.col2 * - ( col0 ) FROM tab0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + col1 AS REAL ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - col1 * - cor0.col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + col1 + + col0 * - col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8140
SELECT ALL - - CAST( NULL AS DECIMAL ) * - col2 * + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8140
SELECT ALL - - CAST ( NULL AS REAL ) * - col2 * + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( + col1 ) * col2 + 50 FROM tab2 AS cor0
----
1584
696
887

query I rowsort
SELECT + col2 * - col2 * + col2 FROM tab1 AS cor0
----
-157464
-185193
-884736

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab1, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to 64ce0e736818e884f0a9ecd075da5eb7

query I rowsort
SELECT DISTINCT tab2.col1 + col0 + + col0 FROM tab2
----
175
215
45

query I rowsort
SELECT - 99 + col2 FROM tab1
----
-3
-42
-45

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col1 AS REAL ) + col0 FROM tab0
----
110
132
180

query I rowsort
SELECT + col1 * col1 * col2 + + col0 AS col2 FROM tab2
----
11061
25954
90584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col1 * col0 * - col0 + 9 col2 FROM tab1
----
-199
-40941
-83178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 + col1 - + col1 col2 FROM tab2
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( tab0.col0 ) col1 FROM tab0, tab0 AS cor0
----
24
35
89

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2, tab2 AS cor0 WHERE NULL <= NULL
----

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - col2 AS REAL ) * col1 - + ( + col0 ) FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT - 84 AS col2 FROM tab1
----
-84
-84
-84

query I rowsort
SELECT DISTINCT + 79 AS col1 FROM tab0
----
79

query I rowsort
SELECT DISTINCT + 60 * col2 AS col1 FROM tab2
----
1560
1620
2280

query I rowsort
SELECT ALL - 10 AS col0 FROM tab2, tab0 cor0, tab1 AS cor1
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT 87 AS col0 FROM tab2
----
87
87
87

query I rowsort
SELECT ALL + ( tab2.col1 ) AS col0 FROM tab2
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8159
SELECT - cor0.col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8159
SELECT - cor0.col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col2 * col0 * - col2 FROM tab1 AS cor0
----
207936
737280
8748

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8161
SELECT + + col0 * CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-8161
SELECT + + col0 * CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-8162
SELECT DISTINCT + col2 DIV 68 AS col2 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8162
SELECT DISTINCT + col2 / 68 AS col2 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT ALL col0 * 67 FROM tab0 AS cor0
----
1608
2345
5963

query I rowsort
SELECT - col1 * - ( + cor0.col0 ) AS col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col0 * col2 + 19 FROM tab0
----
54
7317
811

query I rowsort
SELECT 14 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

query I rowsort
SELECT + cor0.col0 * col2 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + col1 * + col2 * + ( - col0 ) + col2 AS col0 FROM tab2 AS cor0
----
-119626
-50996
-5832

query I rowsort
SELECT DISTINCT - - 42 + 49 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
91

query I rowsort
SELECT DISTINCT 57 + + col2 * col1 + + 69 FROM tab0
----
223
2964
7588

query I rowsort
SELECT col1 * + 15 AS col1 FROM tab2 AS cor0
----
255
465
885

query I rowsort
SELECT - col2 * 17 FROM tab2 AS cor0
----
-442
-459
-646

query I rowsort
SELECT ALL + + col1 + - 69 * + cor0.col0 FROM tab2 AS cor0
----
-452
-5323
-5434

query I rowsort
SELECT DISTINCT + col1 - + ( - 8 * - col0 ) AS col1 FROM tab2 AS cor0
----
-25
-565
-615

query I rowsort
SELECT DISTINCT - tab1.col1 * + col2 AS col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT 45 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT - tab1.col1 - - tab1.col0 FROM tab1
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-8178
SELECT 5 DIV col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8178
SELECT 5 / col0 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT col2 + - 12 FROM tab0
----
-11
21
70

query I rowsort
SELECT tab2.col0 - + tab2.col0 * + col0 FROM tab2
----
-42
-6006
-6162

query I rowsort
SELECT DISTINCT - ( + tab0.col2 ) AS col1 FROM tab0, tab1 cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8182
SELECT DISTINCT + col2 + + col1 DIV - col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8182
SELECT DISTINCT + col2 + + col1 / - col2 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8183
SELECT ALL + ( - ( + col1 ) ) DIV - col2 AS col1 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8183
SELECT ALL + ( - ( + col1 ) ) / - col2 AS col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT col0 * + col2 + + col1 AS col1 FROM tab2
----
2087
220
3019

query I rowsort
SELECT col0 + 95 * col2 FROM tab1
----
5133
5479
9200

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT col1 + col0 * col0 AS col1 FROM tab2 AS cor0
----
6143
6258
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8188
SELECT DISTINCT - - col2 DIV col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-8188
SELECT DISTINCT - - col2 / col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT + - 72 * - col2 AS col1 FROM tab2 AS cor0
----
1872
1944
2736

query I rowsort
SELECT DISTINCT + 23 * - col1 AS col2 FROM tab1 AS cor0
----
-230
-299
-598

query I rowsort
SELECT col2 * col1 + col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT + - col2 * + col1 + col0 + + 18 AS col0 FROM tab1 AS cor0
----
-1150
-1383
-488

query I rowsort
SELECT DISTINCT - col2 + col0 * - ( + col1 + cor0.col1 ) AS col2 FROM tab2 AS cor0
----
-2724
-461
-9230

query I rowsort
SELECT + cor0.col0 * col0 AS col2 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT cor0.col2 * - col0 + + 30 FROM tab1 AS cor0
----
-132
-3618
-7650

query I rowsort
SELECT ALL + 75 FROM tab2 cor0
----
75
75
75

query I rowsort
SELECT DISTINCT + col2 - col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT + col2 * tab1.col0 + tab1.col0 - ( + col0 ) FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8199
SELECT - ( col0 ) + cor0.col2 DIV + ( - col0 + - col0 ) FROM tab2 AS cor0
----
-78
-79
-8

skipif mysql # not compatible
query I rowsort label-8199
SELECT - ( col0 ) + cor0.col2 / + ( - col0 + - col0 ) FROM tab2 AS cor0
----
-78
-79
-8

query I rowsort
SELECT + - 76 * - col1 FROM tab1 AS cor0
----
1976
760
988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + col0 * 90 col2 FROM tab1 AS cor0
----
216
5703
7104

query I rowsort
SELECT DISTINCT col1 * col0 + + 61 * - col2 AS col1 FROM tab1 AS cor0
----
-2837
-3216
-4816

query I rowsort
SELECT - col2 * - col0 * ( - col1 ) AS col2 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT - col1 + cor0.col0 AS col2 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL + 91 + col2 FROM tab1 AS cor0
----
145
148
187

query I rowsort
SELECT DISTINCT col1 * col1 * - ( + tab2.col1 ) FROM tab2
----
-205379
-29791
-4913

query I rowsort
SELECT - col2 - - col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT + - col2 + + col2 * ( col0 ) AS col2 FROM tab0 AS cor0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 94 + col1 * + 58 col2 FROM tab0 AS cor0
----
5082
5372
5720

query I rowsort
SELECT ALL + + 86 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

onlyif mysql # use DIV operator for integer division
query I rowsort label-8211
SELECT - + col1 + CAST( + col0 AS SIGNED ) + + col2 DIV + 24 AS col0 FROM tab2 AS cor0
----
-23
20
63

skipif mysql # not compatible
query I rowsort label-8211
SELECT - + col1 + CAST ( + col0 AS INTEGER ) + + col2 / + 24 AS col0 FROM tab2 AS cor0
----
-23
20
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-8212
SELECT + col1 * ( + col0 ) DIV - col1 + col0 + col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-8212
SELECT + col1 * ( + col0 ) / - col1 + col0 + col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + cor0.col0 + + col1 * - col0 + col2 FROM tab2 AS cor0
----
-1226
-183
-4498

query I rowsort
SELECT - col0 * col2 + - col1 + - col2 AS col1 FROM tab1 cor0
----
-242
-3715
-7789

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - col2 * - col2 col0 FROM tab0
----
611884
93654
97

query I rowsort
SELECT - col1 * - 11 AS col2 FROM tab1 AS cor0
----
110
143
286

query I rowsort
SELECT col1 + + cor0.col0 * + 43 FROM tab0 AS cor0
----
1118
1602
3918

query I rowsort
SELECT + 89 * - col0 AS col2 FROM tab1
----
-267
-5696
-7120

query I rowsort
SELECT ALL + col2 - - cor0.col0 * - col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8220
SELECT - + CAST( NULL AS SIGNED ) + - cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8220
SELECT - + CAST ( NULL AS INTEGER ) + - cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col2 * - 38 + - col1 AS col2 FROM tab1 AS cor0
----
2026
2156
3635

query I rowsort
SELECT 22 * cor0.col0 FROM tab0 AS cor0
----
1958
528
770

query I rowsort
SELECT + ( col0 ) + cor0.col0 * + col0 AS col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT - cor0.col0 * 6 FROM tab1 cor0
----
-18
-384
-480

query I rowsort
SELECT - + ( + col2 ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - col2 * col2 + + col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT DISTINCT 81 * + cor0.col1 + col2 AS col0 FROM tab0 AS cor0
----
6999
7453
7858

query I rowsort
SELECT DISTINCT + - 42 * 19 FROM tab0 AS cor0
----
-798

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( - col2 AS REAL ) + + col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8230
SELECT DISTINCT - + 59 DIV + col1 + col2 AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8230
SELECT DISTINCT - + 59 / + col1 + col2 AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - 33 * cor0.col2 FROM tab1 AS cor0
----
-1782
-1881
-3168

query I rowsort
SELECT + + col0 + + ( + col0 ) * ( - ( - cor0.col1 ) * - col1 ) FROM tab0 AS cor0
----
-177480
-329280
-736920

query I rowsort
SELECT - col2 * + col0 * + col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8234
SELECT ALL - CAST( NULL AS SIGNED ) + tab0.col1 * col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8234
SELECT ALL - CAST ( NULL AS INTEGER ) + tab0.col1 * col1 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 82 + + col1 AS col1 FROM tab0
----
168
173
179

onlyif mysql # use DIV operator for integer division
query I rowsort label-8236
SELECT DISTINCT - - ( + col1 ) DIV col0 + 90 DIV ( - col2 ) AS col2 FROM tab1 AS cor0
----
-1
0
7

skipif mysql # not compatible
query I rowsort label-8236
SELECT DISTINCT - - ( + col1 ) / col0 + 90 / ( - col2 ) AS col2 FROM tab1 AS cor0
----
-1
0
7

query I rowsort
SELECT + cor1.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # use DIV operator for integer division
query I rowsort label-8238
SELECT ALL col2 + + col1 DIV col1 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-8238
SELECT ALL col2 + + col1 / col1 FROM tab0
----
2
34
83

query III rowsort
SELECT ALL * FROM tab1 WHERE col1 <= ( NULL )
----

query I rowsort
SELECT col2 * + col0 + col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT ALL col1 - + col1 AS col2 FROM tab0 WHERE - col0 / + col2 + + col1 NOT IN ( col1 * - col2 )
----
0
0
0

query I rowsort
SELECT col0 * col1 - col0 AS col0 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT col2 + tab0.col0 * col1 FROM tab0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-8244
SELECT ALL + col1 DIV + col1 col2 FROM tab2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8244
SELECT ALL + col1 / + col1 col2 FROM tab2
----
1
1
1

query I rowsort
SELECT - col2 * + col2 - - tab2.col2 FROM tab2
----
-1406
-650
-702

query III rowsort
SELECT * FROM tab2 WHERE NULL <= col2 * + col1
----

query I rowsort
SELECT ALL col2 + col2 - col0 * - col0 FROM tab0
----
1227
642
8085

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col2 * tab2.col2 - col2 col2 FROM tab2
----
1423
709
733

query I rowsort
SELECT - tab0.col0 + col2 + col0 * + col2 * col2 AS col0 FROM tab0
----
1
26145
598429

query I rowsort
SELECT DISTINCT - tab1.col1 * col2 * + col2 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT ALL + col1 AS col0 FROM tab2 WHERE NULL <> ( + col1 )
----

query I rowsort
SELECT DISTINCT col1 * + col0 * col1 AS col2 FROM tab2
----
22831
271518
6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-8253
SELECT - tab1.col2 DIV col1 + col2 FROM tab1
----
52
52
89

skipif mysql # not compatible
query I rowsort label-8253
SELECT - tab1.col2 / col1 + col2 FROM tab1
----
52
52
89

query I rowsort
SELECT - col0 * tab2.col1 * + col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT ALL - col0 * tab0.col0 AS col2 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT - col1 * col2 + - col1 FROM tab2
----
-1593
-663
-868

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT ( NULL ) IN ( + col0 * tab2.col1 * col0 + + tab2.col2 * + col2 )
----

query I rowsort
SELECT DISTINCT col0 - - col1 * - col2 FROM tab2
----
-1456
-567
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-8259
SELECT col0 DIV + col1 + col0 AS col1 FROM tab1
----
3
70
86

skipif mysql # not compatible
query I rowsort label-8259
SELECT col0 / + col1 + col0 AS col1 FROM tab1
----
3
70
86

query I rowsort
SELECT + col0 * - col1 - - col1 AS col0 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT - tab0.col2 * col2 * col0 FROM tab0
----
-26136
-35
-598436

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab0
----
54 values hashing to b8667d60d280879b35ad1450a82b3a49

query III rowsort
SELECT * FROM tab1 WHERE NOT ( - col2 ) = col1
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT col0 FROM tab1 WHERE + col2 / col2 + col1 + + col1 NOT IN ( tab1.col2 * - col0 )
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col1 * - col0 col1 FROM tab1 cor0
----
-24
-583
-944

query I rowsort
SELECT col0 * + 18 FROM tab1 AS cor0
----
1152
1440
54

query I rowsort
SELECT + tab2.col2 + col0 * 53 FROM tab2
----
398
4160
4225

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8268
SELECT DISTINCT + col0 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8268
SELECT DISTINCT + col0 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8269
SELECT + + cor0.col2 DIV + 27 AS col2 FROM tab0 AS cor0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-8269
SELECT + + cor0.col2 / + 27 AS col2 FROM tab0 AS cor0
----
0
1
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-8270
SELECT - + col2 + - col2 DIV col1 FROM tab1 cor0
----
-103
-56
-62

skipif mysql # not compatible
query I rowsort label-8270
SELECT - + col2 + - col2 / col1 FROM tab1 cor0
----
-103
-56
-62

query I rowsort
SELECT DISTINCT + col0 + 51 * - 9 FROM tab0 AS cor0
----
-370
-424
-435

query I rowsort
SELECT DISTINCT - col1 + - ( cor0.col0 ) AS col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL + col2 + - col1 * cor0.col2 AS col2 FROM tab2 AS cor0
----
-1508
-608
-810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 + col1 col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - col0 * col1 + + col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL cor0.col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + cor0.col0 * + col0 + + 68 * col1 * col1 AS col1 FROM tab0 AS cor0
----
503504
571029
641037

onlyif mysql # use DIV operator for integer division
query I rowsort label-8278
SELECT DISTINCT - + col1 DIV cor0.col1 + 70 AS col0 FROM tab2 cor0
----
69

skipif mysql # not compatible
query I rowsort label-8278
SELECT DISTINCT - + col1 / cor0.col1 + 70 AS col0 FROM tab2 cor0
----
69

query I rowsort
SELECT ALL + - col1 - + col0 * + 55 FROM tab1 cor0
----
-191
-3530
-4413

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8280
SELECT ALL + CAST( - col2 AS SIGNED ) + - col2 * col1 FROM tab2 AS cor0
----
-1560
-684
-864

skipif mysql # not compatible
query I rowsort label-8280
SELECT ALL + CAST ( - col2 AS INTEGER ) + - col2 * col1 FROM tab2 AS cor0
----
-1560
-684
-864

onlyif mysql # use DIV operator for integer division
query I rowsort label-8281
SELECT + 24 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8281
SELECT + 24 / col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8282
SELECT + - CAST( NULL AS SIGNED ) * cor0.col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8282
SELECT + - CAST ( NULL AS INTEGER ) * cor0.col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8283
SELECT DISTINCT - cor0.col1 + col2 * col0 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8283
SELECT DISTINCT - cor0.col1 + col2 * col0 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL + + col1 + - 1 * col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT + - cor0.col1 + col1 + + ( 62 ) * col0 FROM tab1 AS cor0
----
186
3968
4960

query I rowsort
SELECT DISTINCT + 30 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
30

query I rowsort
SELECT ALL + col2 * - col2 * + col1 + col2 * + col1 FROM tab0 AS cor0
----
-604422
-90816
0

query I rowsort
SELECT ALL - col0 - - col2 AS col0 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT + + 85 * col0 FROM tab2 AS cor0
----
595
6630
6715

query I rowsort
SELECT ALL col1 * + col0 + + col2 + + 74 AS col0 FROM tab0 AS cor0
----
2171
3470
8255

query I rowsort
SELECT 49 AS col2 FROM tab2 AS cor0
----
49
49
49

query I rowsort
SELECT - tab1.col1 * col0 - col1 FROM tab1
----
-104
-1053
-650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col1 * - col0 * + col0 col2 FROM tab2
----
106018
1512
358878

query I rowsort
SELECT - col0 FROM tab0 WHERE NOT - col1 NOT BETWEEN ( - col1 + - col2 ) AND - col1
----
-24
-35
-89

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT col0 BETWEEN col2 AND col1
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT - - cor0.col1 * col0 + col1 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-8298
SELECT ALL + 54 DIV col0 AS col1 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-8298
SELECT ALL + 54 / col0 AS col1 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT tab0.col1 - col0 AS col2 FROM tab0
----
2
62
62

query I rowsort
SELECT DISTINCT - - 12 AS col1 FROM tab0, tab2, tab0 AS cor0
----
12

query I rowsort
SELECT - cor0.col1 + + col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2, tab0, tab0 AS cor0, tab1
----
86
91
97

query I rowsort
SELECT ALL - 23 FROM tab1, tab0, tab1 cor0
----
27 values hashing to 9bd721f99d79dce21b1de2860fd51ed5

query I rowsort
SELECT + cor1.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + ( 97 ) FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

query I rowsort
SELECT ALL - 40 FROM tab2
----
-40
-40
-40

onlyif mysql # use DIV operator for integer division
query I rowsort label-8307
SELECT DISTINCT - + ( col1 ) DIV col0 AS col2 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-8307
SELECT DISTINCT - + ( col1 ) / col0 AS col2 FROM tab0 AS cor0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * + ( col1 * - col1 + col1 ) col1 FROM tab2 AS cor0
----
-201898
-28830
-4624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

onlyif mysql # use DIV operator for integer division
query I rowsort label-8310
SELECT ALL 91 DIV + cor0.col0 + - col0 - cor0.col0 * 18 FROM tab2 AS cor0
----
-120
-1481
-1500

skipif mysql # not compatible
query I rowsort label-8310
SELECT ALL 91 / + cor0.col0 + - col0 - cor0.col0 * 18 FROM tab2 AS cor0
----
-120
-1481
-1500

query I rowsort
SELECT DISTINCT + + ( + col2 ) * + col1 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 col0 FROM tab0 cor0
----
82
82
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8313
SELECT + ( col1 ) + col1 DIV ( - 40 * col0 ) AS col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8313
SELECT + ( col1 ) + col1 / ( - 40 * col0 ) AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + - col2 * - 31 + cor0.col1 * col2 FROM tab2 AS cor0
----
1674
1824
2340

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 98 col1 FROM tab2, tab2 cor0
----
98

query I rowsort
SELECT ALL + 41 + col0 FROM tab2
----
119
120
48

query I rowsort
SELECT ALL + ( - tab0.col1 ) FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col1 col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT tab1.col0 + + col2 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT - tab0.col2 * - col0 AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT + 70 + col0 AS col1 FROM tab1
----
134
150
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * col1 col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + col1 * - col2 + + col2 FROM tab1 AS cor0
----
-1152
-1350
-513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT - tab2.col1 + + col0 AS col2 FROM tab2
----
-24
19
62

query I rowsort
SELECT 92 AS col0 FROM tab1
----
92
92
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-8327
SELECT ALL + 77 DIV + tab1.col0 AS col1 FROM tab1
----
0
1
25

skipif mysql # not compatible
query I rowsort label-8327
SELECT ALL + 77 / + tab1.col0 AS col1 FROM tab1
----
0
1
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8328
SELECT + tab2.col2 * CAST( NULL AS SIGNED ) / 32 col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8328
SELECT + tab2.col2 * CAST ( NULL AS INTEGER ) / 32 col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col0 * 36 FROM tab2 cor0
----
-252
-2808
-2844

onlyif mysql # use DIV operator for integer division
query I rowsort label-8330
SELECT DISTINCT + col1 DIV + ( + col0 ) FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-8330
SELECT DISTINCT + col1 / + ( + col0 ) FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT DISTINCT - col1 - cor0.col0 AS col0 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8332
SELECT - - col1 DIV + CAST( 91 * - cor0.col1 AS SIGNED ) + col1 * - 71 AS col0 FROM tab1 AS cor0
----
-1846
-710
-923

skipif mysql # not compatible
query I rowsort label-8332
SELECT - - col1 / + CAST ( 91 * - cor0.col1 AS INTEGER ) + col1 * - 71 AS col0 FROM tab1 AS cor0
----
-1846
-710
-923

query I rowsort
SELECT - - col1 - - col0 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT col1 * + col2 + col1 + + col1 AS col0 FROM tab1 AS cor0
----
1274
1456
590

query I rowsort
SELECT ALL - - col2 * col0 - - col2 AS col0 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8336
SELECT - col1 * - CAST( NULL AS DECIMAL ) + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8336
SELECT - col1 * - CAST ( NULL AS REAL ) + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 - 20 AS col0 FROM tab0 AS cor0
----
66
71
77

query I rowsort
SELECT col0 * col0 + col2 + col0 * 66 * - col2 FROM tab2 AS cor0
----
-12398
-127738
-191853

onlyif mysql # use DIV operator for integer division
query I rowsort label-8339
SELECT + - col2 + + 24 DIV col1 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-8339
SELECT + - col2 + + 24 / col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL col0 * cor0.col1 AS col1 FROM tab2 cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-8341
SELECT ALL col0 DIV + col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8341
SELECT ALL col0 / + col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - col2 * + 55 AS col1 FROM tab1
----
-2970
-3135
-5280

query I rowsort
SELECT DISTINCT col2 + 56 AS col1 FROM tab2
----
82
83
94

query I rowsort
SELECT ALL 86 FROM tab0, tab2 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

onlyif mysql # use DIV operator for integer division
query I rowsort label-8345
SELECT ALL - col0 DIV + col2 AS col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-8345
SELECT ALL - col0 / + col2 AS col2 FROM tab0
----
-1
-35
0

query I rowsort
SELECT - col0 + + col2 * + col1 * + col1 AS col0 FROM tab0 AS cor0
----
244044
678953
9374

query I rowsort
SELECT ALL - + col2 + + ( - col2 ) AS col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT col1 * + ( - 89 ) AS col1 FROM tab1 AS cor0
----
-1157
-2314
-890

query I rowsort
SELECT DISTINCT col1 * - 32 FROM tab0 AS cor0
----
-2752
-2912
-3104

query I rowsort
SELECT DISTINCT 25 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
25

query I rowsort
SELECT DISTINCT + + col1 * col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - 92 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to a0e6b76227d870d10c4d9f46545a7c83

query I rowsort
SELECT DISTINCT - col1 + 56 FROM tab2 AS cor0
----
-3
25
39

query I rowsort
SELECT - 87 * - col1 FROM tab1 cor0
----
1131
2262
870

query I rowsort
SELECT - - col2 * - col1 - + col0 AS col0 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT ALL + ( col2 ) AS col0 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8357
SELECT col2 * col2 + - col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8357
SELECT col2 * col2 + - col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * + cor0.col2 col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + - ( + 79 ) - col1 * col2 FROM tab0 AS cor0
----
-176
-2917
-7541

query I rowsort
SELECT + ( + ( - col2 ) ) - ( 27 ) FROM tab1 AS cor0
----
-123
-81
-84

query I rowsort
SELECT DISTINCT - ( tab1.col0 ) AS col0 FROM tab1, tab0 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 2 + - 30 + - col1 col2 FROM tab0
----
-164
-197
-299

query I rowsort
SELECT + cor0.col0 - col0 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - ( + col1 ) + + col2 - + col1 * 27 FROM tab1 AS cor0
----
-223
-268
-674

query I rowsort
SELECT + ( col1 ) + col2 * 85 FROM tab1 cor0
----
4616
4855
8173

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 98 col0 FROM tab0 AS cor0
----
98
98
98

query I rowsort
SELECT + 60 AS col1 FROM tab2 AS cor0
----
60
60
60

query I rowsort
SELECT ALL + cor0.col0 + + cor0.col1 + 28 FROM tab0 AS cor0
----
138
160
208

query I rowsort
SELECT DISTINCT - 86 + col2 FROM tab0 AS cor0
----
-4
-53
-85

query I rowsort
SELECT DISTINCT col0 * - col1 + - ( - col0 ) AS col1 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL + - ( col2 ) + col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 + col2 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT ALL - - col0 * - col0 AS col1 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT - - col1 * - col2 + cor0.col1 AS col2 FROM tab1 cor0
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-8375
SELECT ALL 85 DIV - col2 FROM tab0 AS cor0
----
-1
-2
-85

skipif mysql # not compatible
query I rowsort label-8375
SELECT ALL 85 / - col2 FROM tab0 AS cor0
----
-1
-2
-85

query I rowsort
SELECT + col0 * - cor0.col2 + + cor0.col1 * - col2 AS col1 FROM tab1 cor0
----
-1566
-4218
-8928

query I rowsort
SELECT ALL - cor0.col0 - + col2 AS col2 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT 52 * - col2 AS col0 FROM tab0 AS cor0
----
-1716
-4264
-52

query I rowsort
SELECT DISTINCT + cor0.col1 * col2 + - ( col0 ) * - col2 + 62 * + col2 AS col0 FROM tab1 AS cor0
----
14880
4914
7752

query I rowsort
SELECT DISTINCT - col1 * + cor0.col1 + 97 * cor0.col2 * col0 FROM tab0 AS cor0
----
-6014
69428
699625

query I rowsort
SELECT DISTINCT - + col1 + - col1 AS col0 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT ALL 24 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT + col0 * + ( - cor0.col2 + - col2 ) AS col2 FROM tab0 AS cor0
----
-14596
-1584
-70

query I rowsort
SELECT + ( cor0.col2 ) * cor0.col1 * col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL - + 46 * - col0 FROM tab2 cor0
----
322
3588
3634

query I rowsort
SELECT 52 FROM tab2, tab0 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT ALL 34 * col0 * 36 AS col1 FROM tab2
----
8568
95472
96696

query I rowsort
SELECT col0 * - col2 * - 26 AS col0 FROM tab2
----
4914
52728
78052

query I rowsort
SELECT ALL + 90 - col2 AS col2 FROM tab1
----
-6
33
36

query I rowsort
SELECT + tab2.col2 + tab2.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to b24047a4766c1dbbfa5abb9df45d1883

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8391
SELECT DISTINCT CAST( NULL AS SIGNED ) * - 65 FROM tab2, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8391
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - 65 FROM tab2, tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8392
SELECT ALL - col0 + + 0 DIV - col0 col2 FROM tab0 cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8392
SELECT ALL - col0 + + 0 / - col0 col2 FROM tab0 cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + 90 ) col1 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to 3b4644ef0734ed220952cae7e0648c4b

query I rowsort
SELECT + col0 + 19 * col0 FROM tab2 AS cor0
----
140
1560
1580

query I rowsort
SELECT ALL ( tab0.col2 ) AS col2 FROM tab0, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT + + 81 + 78 FROM tab2 AS cor0
----
159
159
159

query I rowsort
SELECT DISTINCT + 37 AS col1 FROM tab2, tab2 AS cor0
----
37

query I rowsort
SELECT - cor0.col1 + 59 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 756f695c2ee12cd9d1a3419e406c69e1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8399
SELECT CAST( NULL AS SIGNED ) * - 14 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8399
SELECT CAST ( NULL AS INTEGER ) * - 14 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0, tab0 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to 47906197307eee6829150d762058792a

query I rowsort
SELECT ALL + cor0.col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ALL - 71 + - 19 AS col0 FROM tab1 AS cor0
----
-90
-90
-90

query I rowsort
SELECT DISTINCT + 72 * col0 FROM tab1 AS cor0
----
216
4608
5760

onlyif mysql # use DIV operator for integer division
query I rowsort label-8404
SELECT - col2 DIV + col0 FROM tab1 cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-8404
SELECT - col2 / + col0 FROM tab1 cor0
----
-1
-18
0

query I rowsort
SELECT ALL + col0 * 73 * col1 + cor0.col0 * col1 + col0 AS col1 FROM tab0 AS cor0
----
152760
251265
599415

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 47 col0 FROM tab0 cor0
----
47

query I rowsort
SELECT ALL - ( + col0 ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8408
SELECT - + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8408
SELECT - + 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-8409
SELECT - + cor0.col0 + col0 DIV - 33 col2 FROM tab1 AS cor0
----
-3
-65
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8409
SELECT - + cor0.col0 + col0 / - 33 col2 FROM tab1 AS cor0
----
-3
-65
-82

query I rowsort
SELECT DISTINCT - - col0 + + col1 * cor0.col1 AS col2 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT + 43 + col0 * col0 FROM tab1 cor0
----
4139
52
6443

query I rowsort
SELECT ALL + - col2 * col1 * col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT 29 AS col0 FROM tab0 AS cor0
----
29
29
29

query I rowsort
SELECT 82 + + cor0.col1 FROM tab1 AS cor0
----
108
92
95

query I rowsort
SELECT - 71 FROM tab0, tab2 AS cor0
----
9 values hashing to e72f95c346714d3065a96d67a6fd5062

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8416
SELECT - cor0.col1 + + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8416
SELECT - cor0.col1 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + ( col0 ) AS col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT - + col1 * + col1 + col2 FROM tab2 AS cor0
----
-251
-3455
-934

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8419
SELECT - col0 * - ( col2 ) + - CAST( ( col2 ) AS SIGNED ) FROM tab1 AS cor0
----
108
3591
7584

skipif mysql # not compatible
query I rowsort label-8419
SELECT - col0 * - ( col2 ) + - CAST ( ( col2 ) AS INTEGER ) FROM tab1 AS cor0
----
108
3591
7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8420
SELECT DISTINCT - CAST( - col2 AS SIGNED ) + - col1 * + 91 FROM tab0 cor0
----
-7793
-8199
-8826

skipif mysql # not compatible
query I rowsort label-8420
SELECT DISTINCT - CAST ( - col2 AS INTEGER ) + - col1 * + 91 FROM tab0 cor0
----
-7793
-8199
-8826

onlyif mysql # use DIV operator for integer division
query I rowsort label-8421
SELECT + ( + col1 ) DIV col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8421
SELECT + ( + col1 ) / col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ALL 96 FROM tab1 AS cor0
----
96
96
96

query I rowsort
SELECT - - 27 * - col1 AS col1 FROM tab0 AS cor0
----
-2322
-2457
-2619

query I rowsort
SELECT + + col2 + + col1 AS col1 FROM tab2 cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + 47 col0 FROM tab2 AS cor0
----
20
21
9

query I rowsort
SELECT DISTINCT + ( 81 ) + col0 + - 15 AS col1 FROM tab1 AS cor0
----
130
146
69

query I rowsort
SELECT col1 + 34 + ( + col0 * - 59 ) FROM tab0
----
-1296
-1934
-5126

query I rowsort
SELECT + col1 * col2 * 24 + - col1 FROM tab1
----
13670
29939
33670

query I rowsort
SELECT DISTINCT - 11 FROM tab2, tab1 AS cor0
----
-11

query I rowsort
SELECT col0 * + 0 * - col1 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - col2 + col1 + + 67 AS col1 FROM tab2
----
100
46
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-8432
SELECT + 56 DIV + col2 AS col1 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8432
SELECT + 56 / + col2 AS col1 FROM tab1
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8433
SELECT ALL - col1 DIV + col0 AS col1 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-8433
SELECT ALL - col1 / + col0 AS col1 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + 81 * - col1 + CAST ( col1 AS REAL ) * + col1 FROM tab2 AS cor0
----
-1088
-1298
-1550

query I rowsort
SELECT ALL + 96 - cor0.col2 AS col0 FROM tab0 AS cor0
----
14
63
95

query I rowsort
SELECT ALL - + col1 + col0 + + cor0.col1 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - 97 + + col0 FROM tab1 AS cor0
----
-17
-33
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-8438
SELECT ALL - 50 DIV - col0 AS col2 FROM tab1 AS cor0
----
0
0
16

skipif mysql # not compatible
query I rowsort label-8438
SELECT ALL - 50 / - col0 AS col2 FROM tab1 AS cor0
----
0
0
16

query I rowsort
SELECT DISTINCT 28 * - col2 AS col0 FROM tab1 AS cor0
----
-1512
-1596
-2688

query I rowsort
SELECT ALL - + 51 AS col1 FROM tab1 cor0
----
-51
-51
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-8441
SELECT DISTINCT - + ( - col2 ) + col1 * col0 + - cor0.col1 DIV ( + col0 ) FROM tab1 AS cor0
----
1136
124
697

skipif mysql # not compatible
query I rowsort label-8441
SELECT DISTINCT - + ( - col2 ) + col1 * col0 + - cor0.col1 / ( + col0 ) FROM tab1 AS cor0
----
1136
124
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-8442
SELECT ALL + cor0.col1 DIV - col1 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8442
SELECT ALL + cor0.col1 / - col1 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - col1 * + col2 + col1 AS col0 FROM tab2 cor0
----
-1475
-629
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + col1 col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + 59 * + col2 + cor0.col1 FROM tab1 AS cor0
----
3212
3373
5677

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( col0 ) * + col1 col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - col2 * - ( col1 ) FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - + col1 * + 17 * ( col0 ) FROM tab2 AS cor0
----
-22831
-3689
-78234

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * ( - cor0.col0 ) * - col0 col2 FROM tab0 AS cor0
----
-13824
-42875
-704969

skipif mysql # not compatible
query I rowsort
SELECT - col1 + + CAST ( - col1 AS REAL ) * - col0 * cor0.col2 FROM tab2 AS cor0
----
119593
51017
5828

query I rowsort
SELECT col1 + - 5 * - cor0.col1 FROM tab0 AS cor0
----
516
546
582

query I rowsort
SELECT DISTINCT + col2 + - col2 + tab1.col1 AS col1 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL 88 + + col2 FROM tab1 AS cor0
----
142
145
184

query I rowsort
SELECT ALL 66 * col2 + + col1 * + col1 * + cor0.col1 FROM tab2 AS cor0
----
207095
31573
7421

query I rowsort
SELECT 6 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8456
SELECT DISTINCT - CAST( ( - col2 ) AS SIGNED ) * - col2 * - cor0.col1 + col1 + 5 FROM tab1 AS cor0
----
119826
32505
75847

skipif mysql # not compatible
query I rowsort label-8456
SELECT DISTINCT - CAST ( ( - col2 ) AS INTEGER ) * - col2 * - cor0.col1 + col1 + 5 FROM tab1 AS cor0
----
119826
32505
75847

query I rowsort
SELECT DISTINCT + - col0 * - 77 + + cor0.col1 * 86 AS col1 FROM tab1 AS cor0
----
2467
5788
7278

query I rowsort
SELECT 72 AS col2 FROM tab2 AS cor0
----
72
72
72

query I rowsort
SELECT - ( col2 ) + cor0.col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + - col2 * - 46 FROM tab2 AS cor0
----
1196
1242
1748

query I rowsort
SELECT DISTINCT 17 * col2 AS col0 FROM tab1 AS cor0
----
1632
918
969

query I rowsort
SELECT ALL cor0.col2 + + 26 FROM tab2 AS cor0
----
52
53
64

query I rowsort
SELECT DISTINCT col0 * + col2 - + col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT + - col1 * - cor0.col0 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
1305
190
4576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8465
SELECT DISTINCT + CAST( col1 AS SIGNED ) + - col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8465
SELECT DISTINCT + CAST ( col1 AS INTEGER ) + - col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + 64 * ( + cor0.col1 + + col0 ) AS col2 FROM tab1 AS cor0
----
1856
4736
5952

query I rowsort
SELECT col2 + ( + col2 ) AS col1 FROM tab1
----
108
114
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8468
SELECT + CAST( - col2 AS SIGNED ) * col2 + col2 AS col1 FROM tab2
----
-1406
-650
-702

skipif mysql # not compatible
query I rowsort label-8468
SELECT + CAST ( - col2 AS INTEGER ) * col2 + col2 AS col1 FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT ALL - 17 FROM tab2, tab2 AS cor0
----
9 values hashing to 490d008f3fb5b70d3971cfc6d84503f4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 23 col2 FROM tab0, tab2, tab0 AS cor0
----
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8471
SELECT + CAST( NULL AS SIGNED ) * + 42 + - col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8471
SELECT + CAST ( NULL AS INTEGER ) * + 42 + - col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8472
SELECT CAST( + cor0.col1 AS SIGNED ) FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif mysql # not compatible
query I rowsort label-8472
SELECT CAST ( + cor0.col1 AS INTEGER ) FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT ( 48 ) AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
48

query I rowsort
SELECT - ( tab0.col2 ) AS col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT 91 * tab0.col1 AS col1 FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
81 values hashing to e5d03dc1b2118ced65fd81afc935d371

query I rowsort
SELECT - - cor0.col1 * col0 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col2 ) col0 FROM tab0
----
1
33
82

query I rowsort
SELECT + tab1.col2 + 35 AS col1 FROM tab1
----
131
89
92

query I rowsort
SELECT 15 AS col0 FROM tab2
----
15
15
15

query I rowsort
SELECT DISTINCT 83 AS col2 FROM tab2
----
83

query I rowsort
SELECT + cor0.col1 * + 35 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 12fe836cfdec4b594740ca0729e43eb0

query I rowsort
SELECT DISTINCT - 54 AS col0 FROM tab1 cor0
----
-54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8483
SELECT - CAST( NULL AS DECIMAL ) AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8483
SELECT - CAST ( NULL AS REAL ) AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 98 AS col2 FROM tab1
----
98
98
98

query I rowsort
SELECT col1 + + col2 * + col0 FROM tab0
----
132
7389
878

query I rowsort
SELECT DISTINCT + 83 FROM tab1, tab0 AS cor0
----
83

query I rowsort
SELECT + 63 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT + col0 + + 42 * + col0 FROM tab2 AS cor0
----
301
3354
3397

query I rowsort
SELECT col1 + - cor0.col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + tab0.col1 * tab0.col2 + 8 + col2 AS col2 FROM tab0
----
106
2879
7552

query I rowsort
SELECT ALL col0 * + col2 * 6 FROM tab0
----
210
43788
4752

query I rowsort
SELECT DISTINCT + col2 * - 14 FROM tab2 AS cor0
----
-364
-378
-532

query I rowsort
SELECT ALL cor0.col0 + ( + cor0.col0 ) * ( + col0 ) * col0 FROM tab2 AS cor0
----
350
474630
493118

query I rowsort
SELECT ALL + col1 * - ( + col2 + ( - col1 ) ) AS col0 FROM tab0 AS cor0
----
4558
819
9312

query I rowsort
SELECT ALL 98 FROM tab1, tab0 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
972 values hashing to 5342fb4caf4767cb98bd21989bad099f

query I rowsort
SELECT col2 + - 34 * + col0 * - col1 AS col0 FROM tab2 AS cor0
----
156494
45700
7405

query I rowsort
SELECT - + 10 * - ( + col1 ) + - col2 + col0 AS col0 FROM tab2 AS cor0
----
211
290
642

query I rowsort
SELECT + col2 * + col1 + + col0 * + 36 FROM tab2 AS cor0
----
1089
3490
4342

query I rowsort
SELECT + 58 * col0 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
1368
1995
5073

query I rowsort
SELECT + cor0.col2 * col0 * col2 + - col1 * col1 * + cor0.col0 FROM tab0 cor0
----
-138573
-151368
-329280

onlyif mysql # use DIV operator for integer division
query I rowsort label-8502
SELECT + - 17 * + col2 + + col0 DIV col0 + col1 FROM tab0 AS cor0
----
-1302
-474
81

skipif mysql # not compatible
query I rowsort label-8502
SELECT + - 17 * + col2 + + col0 / col0 + col1 FROM tab0 AS cor0
----
-1302
-474
81

query I rowsort
SELECT - + ( col1 ) + - cor0.col1 FROM tab0 cor0
----
-172
-182
-194

onlyif mysql # use DIV operator for integer division
query I rowsort label-8504
SELECT - + col2 + 17 * col2 DIV 31 AS col0 FROM tab2 AS cor0
----
-12
-13
-18

skipif mysql # not compatible
query I rowsort label-8504
SELECT - + col2 + 17 * col2 / 31 AS col0 FROM tab2 AS cor0
----
-12
-13
-18

query I rowsort
SELECT ( + cor0.col2 ) + + col0 + - col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT col1 * - 25 FROM tab2
----
-1475
-425
-775

query I rowsort
SELECT DISTINCT col2 * 12 AS col1 FROM tab0
----
12
396
984

query I rowsort
SELECT ALL - col1 + + col0 * col1 * + col0 + 46 * cor0.col0 FROM tab1 cor0
----
346
43894
86867

query I rowsort
SELECT ALL - col2 + ( col0 ) FROM tab1 AS cor0
----
-16
-51
7

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 cor0, tab0 AS cor1, tab2, tab0 cor2
----
3645 values hashing to ba0381921410f59519cc658d8e65eee3

query I rowsort
SELECT ALL + col1 + ( - col0 ) AS col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL 71 * - 96 AS col0 FROM tab2 AS cor0
----
-6816
-6816
-6816

onlyif mysql # use DIV operator for integer division
query I rowsort label-8513
SELECT + ( + cor0.col2 ) DIV - col1 AS col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-8513
SELECT + ( + cor0.col2 ) / - col1 AS col1 FROM tab2 AS cor0
----
-2
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8514
SELECT DISTINCT - + cor0.col1 + col2 DIV col2 AS col2 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-8514
SELECT DISTINCT - + cor0.col1 + col2 / col2 AS col2 FROM tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT ALL + 81 * + 47 AS col1 FROM tab2 cor0
----
3807
3807
3807

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8516
SELECT - CAST( + 51 AS SIGNED ) FROM tab0 AS cor0
----
-51
-51
-51

skipif mysql # not compatible
query I rowsort label-8516
SELECT - CAST ( + 51 AS INTEGER ) FROM tab0 AS cor0
----
-51
-51
-51

query I rowsort
SELECT DISTINCT - 82 + col1 * + col0 FROM tab2 AS cor0
----
1261
135
4520

query I rowsort
SELECT - + 51 FROM tab2 AS cor0
----
-51
-51
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-8519
SELECT ALL + - 77 DIV + 85 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8519
SELECT ALL + - 77 / + 85 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + - col1 * - cor0.col2 AS col2 FROM tab1 cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( - cor0.col0 AS REAL ) * col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT + - 61 AS col1 FROM tab0 AS cor0
----
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( cor0.col1 ) col2 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8524
SELECT - CAST( col2 AS SIGNED ) * + col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-8524
SELECT - CAST ( col2 AS INTEGER ) * + col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - ( col1 ) * - col2 + - 0 AS col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8526
SELECT col2 + 82 DIV col1 FROM tab2 AS cor0
----
27
29
42

skipif mysql # not compatible
query I rowsort label-8526
SELECT col2 + 82 / col1 FROM tab2 AS cor0
----
27
29
42

query I rowsort
SELECT ALL 52 + 57 FROM tab0 cor0
----
109
109
109

query I rowsort
SELECT ( col0 ) * col0 * - col0 + col1 FROM tab1 AS cor0
----
-1
-262134
-511987

query I rowsort
SELECT - - col0 + - col0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + 89 + - col0 * - 13 AS col2 FROM tab0 cor0
----
1246
401
544

query I rowsort
SELECT - 82 + - col1 * col1 FROM tab2 AS cor0
----
-1043
-3563
-371

query I rowsort
SELECT - 1 * + col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 46 col2 FROM tab1
----
46
46
46

query I rowsort
SELECT ALL - 10 * + col2 * col2 - + col0 FROM tab1 AS cor0
----
-29163
-32554
-92240

query I rowsort
SELECT DISTINCT - - 40 * + cor0.col2 + col0 * - 89 AS col2 FROM tab1 cor0
----
-3280
-3416
1893

query I rowsort
SELECT ALL + col2 + 1 FROM tab2 AS cor0
----
27
28
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-8537
SELECT ALL 42 + col0 DIV col1 AS col1 FROM tab1
----
42
48
48

skipif mysql # not compatible
query I rowsort label-8537
SELECT ALL 42 + col0 / col1 AS col1 FROM tab1
----
42
48
48

query I rowsort
SELECT - col1 + - ( - col0 ) AS col2 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8539
SELECT ALL + col1 DIV col2 + + col2 AS col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8539
SELECT ALL + col1 / col2 + + col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL col2 * - 35 * + ( - col2 ) + ( + col2 + + col2 ) FROM tab0 AS cor0
----
235504
37
38181

query I rowsort
SELECT DISTINCT col1 - - cor0.col2 * - col0 FROM tab1 cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL + + col1 * 60 AS col1 FROM tab1 cor0
----
1560
600
780

onlyif mysql # use DIV operator for integer division
query I rowsort label-8543
SELECT ALL - + col1 + - col0 DIV - col0 col1 FROM tab1 AS cor0
----
-12
-25
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8543
SELECT ALL - + col1 + - 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 + + 92 + - col1 col0 FROM tab2 AS cor0
----
34
37
7

query I rowsort
SELECT ALL col1 * col1 + cor0.col2 AS col0 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT + - col2 + - 27 * col2 * + col2 FROM tab0 cor0
----
-181630
-28
-29436

query I rowsort
SELECT + col1 + + tab2.col1 AS col0 FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT + col2 + tab2.col1 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT col2 * + col1 + - tab1.col0 + 26 * - tab1.col0 * + col0 FROM tab1
----
-105990
-165232
1167

query I rowsort
SELECT - col0 * + col2 + - col0 AS col0 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT DISTINCT - 84 + + tab2.col1 FROM tab2
----
-25
-53
-67

query I rowsort
SELECT DISTINCT 16 + - cor0.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 AS cor2
----
-48
-64
13

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 cor2, tab1 AS cor3
----
3645 values hashing to f3ede863c793df0de5c26c654290b3b7

query I rowsort
SELECT col0 + + 28 FROM tab0 AS cor0
----
117
52
63

query I rowsort
SELECT + col1 + ( + col0 ) * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT + col0 * + ( col0 + - col2 ) AS col2 FROM tab0 AS cor0
----
-216
1190
623

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8557
SELECT DISTINCT + - col1 * CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8557
SELECT DISTINCT + - col1 * CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col0 * - col1 + + 21 AS col2 FROM tab0 AS cor0
----
-2043
-3374
-8078

query I rowsort
SELECT + cor0.col2 + - cor0.col0 FROM tab0 cor0
----
-34
-7
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8560
SELECT + col1 * + CAST( + 32 AS SIGNED ) FROM tab1 AS cor0
----
320
416
832

skipif mysql # not compatible
query I rowsort label-8560
SELECT + col1 * + CAST ( + 32 AS INTEGER ) FROM tab1 AS cor0
----
320
416
832

query I rowsort
SELECT + col0 * - col0 + - tab2.col0 AS col2 FROM tab2
----
-56
-6162
-6320

query I rowsort
SELECT col1 + - col2 * col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT - col0 + - col1 * + cor0.col2 * - ( - col0 * + col2 + ( + col2 ) ) AS col0 FROM tab2 AS cor0
----
-135601
-1914823
-3071146

query I rowsort
SELECT - - 57 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
-1881
-4674
-57

query I rowsort
SELECT ALL - col2 * col1 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8566
SELECT + col0 * col0 DIV + 97 FROM tab1
----
0
42
65

skipif mysql # not compatible
query I rowsort label-8566
SELECT + col0 * col0 / + 97 FROM tab1
----
0
42
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-8567
SELECT ALL + 78 DIV col2 col0 FROM tab1 cor0
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8567
SELECT ALL + 78 / col2 col0 FROM tab1 cor0
----
0
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8568
SELECT - CAST( cor0.col2 AS SIGNED ) AS col1 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

skipif mysql # not compatible
query I rowsort label-8568
SELECT - CAST ( cor0.col2 AS INTEGER ) AS col1 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT - + 19 * - cor0.col2 + 5 * + col0 FROM tab2 AS cor0
----
1117
548
884

query I rowsort
SELECT - 48 + col1 - + col0 FROM tab0 AS cor0
----
-46
14
14

query I rowsort
SELECT DISTINCT - - cor0.col0 * + col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT col0 * ( 28 ) * + col0 + - col2 AS col1 FROM tab1
----
114631
179104
198

query I rowsort
SELECT col2 + + ( col0 ) * - col0 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT + - col2 * col1 + - ( col0 + - cor0.col1 ) FROM tab1 cor0
----
-1315
-1381
-624

query I rowsort
SELECT ALL + cor0.col0 * + col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-8576
SELECT DISTINCT - col1 DIV col2 AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8576
SELECT DISTINCT - col1 / col2 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT cor0.col0 + - 29 AS col1 FROM tab2 AS cor0
----
-22
49
50

query I rowsort
SELECT + col0 * 28 * - col0 FROM tab0 AS cor0
----
-16128
-221788
-34300

query I rowsort
SELECT ALL + + col0 * + ( + col2 ) AS col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT - 52 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

query I rowsort
SELECT + ( - col0 ) + - col2 * - col1 AS col1 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT DISTINCT - 24 AS col2 FROM tab0 AS cor0
----
-24

query I rowsort
SELECT + - 28 FROM tab0 cor0
----
-28
-28
-28

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - ( + col1 ) AS REAL ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT col0 * + col2 * - col2 AS col0 FROM tab1
----
-207936
-737280
-8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col0 * - col2 col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT - 56 AS col2 FROM tab0 cor0
----
-56
-56
-56

query I rowsort
SELECT ALL + ( 70 ) * col2 FROM tab2 AS cor0
----
1820
1890
2660

query I rowsort
SELECT cor0.col0 FROM tab1, tab0, tab1 cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT - - ( col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - col1 + col2 AS col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - cor0.col2 + 52 FROM tab0, tab0 cor0
----
9 values hashing to 31fb6dbe17189e1bc0e3eb9f97be42a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-8593
SELECT ALL + col2 DIV - col0 col1 FROM tab0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8593
SELECT ALL + col2 / - col0 col1 FROM tab0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 77 col0 FROM tab0 AS cor0
----
-77

query I rowsort
SELECT - - 95 + + col1 FROM tab1 cor0
----
105
108
121

query I rowsort
SELECT DISTINCT + + col2 * col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + col1 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-8598
SELECT ALL + - col1 DIV col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8598
SELECT ALL + - col1 / col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col0 + 29 * - 10 FROM tab1 AS cor0
----
-210
-226
-287

onlyif mysql # use DIV operator for integer division
query I rowsort label-8600
SELECT col1 DIV - 24 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8600
SELECT col1 / - 24 FROM tab1 AS cor0
----
-1
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8601
SELECT - - col1 + - CAST( 31 AS SIGNED ) * - cor0.col1 AS col0 FROM tab2 AS cor0
----
1888
544
992

skipif mysql # not compatible
query I rowsort label-8601
SELECT - - col1 + - CAST ( 31 AS INTEGER ) * - cor0.col1 AS col0 FROM tab2 AS cor0
----
1888
544
992

query I rowsort
SELECT DISTINCT - col0 * 90 FROM tab1 AS cor0
----
-270
-5760
-7200

query I rowsort
SELECT + col1 * - col1 + col0 * - col0 * - cor0.col2 FROM tab1 AS cor0
----
-190
233372
614231

query I rowsort
SELECT DISTINCT - - col0 * - ( col2 ) AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-8605
SELECT DISTINCT + + cor0.col0 DIV - ( 79 ) col1 FROM tab2 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8605
SELECT DISTINCT + + cor0.col0 / - ( 79 ) col1 FROM tab2 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT col1 * - col2 + + 0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + + cor0.col0 AS col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT - col1 + + col2 * ( - tab0.col1 ) * col0 FROM tab0
----
-3492
-664209
-68198

query I rowsort
SELECT 34 * tab2.col1 FROM tab2
----
1054
2006
578

onlyif mysql # use DIV operator for integer division
query I rowsort label-8610
SELECT ALL - col0 + col1 + + 88 DIV + col2 FROM tab1
----
-53
-67
24

skipif mysql # not compatible
query I rowsort label-8610
SELECT ALL - col0 + col1 + + 88 / + col2 FROM tab1
----
-53
-67
24

query I rowsort
SELECT ALL - col1 + tab0.col0 * - 78 AS col2 FROM tab0
----
-1958
-2827
-7033

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col2 * - col0 * col0 col1 FROM tab1 AS cor0
----
-233536
-489
-614480

query I rowsort
SELECT - col1 * col2 * + col1 AS col0 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT - col2 + + col0 * - col2 AS col2 FROM tab1 AS cor0
----
-216
-3705
-7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-8615
SELECT + + col0 DIV cor0.col0 AS col2 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8615
SELECT + + col0 / cor0.col0 AS col2 FROM tab2 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8616
SELECT DISTINCT + col0 DIV tab2.col0 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-8616
SELECT DISTINCT + col0 / tab2.col0 FROM tab2
----
1

query I rowsort
SELECT + - 82 + col0 AS col1 FROM tab1 AS cor0
----
-18
-2
-79

query I rowsort
SELECT + 10 * col1 - + cor0.col2 * + col2 FROM tab0 cor0
----
-229
-5814
969

query I rowsort
SELECT + ( col2 ) + - col2 * col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT - - col1 * col1 + + col2 AS col2 FROM tab0 cor0
----
7429
8363
9410

query I rowsort
SELECT + ( - col2 ) + col1 * col0 + tab2.col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - ( - col2 ) + col1 * + col1 + - col0 * col0 FROM tab0
----
442
6853
8185

query I rowsort
SELECT + 82 + - 46 FROM tab2
----
36
36
36

query I rowsort
SELECT ( col1 ) + col0 * col0 FROM tab0
----
1322
662
8012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + tab1.col0 col1 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT 83 * col2 + col2 + col2 * col1 FROM tab2
----
3105
3718
3838

query I rowsort
SELECT DISTINCT col1 + ( col1 ) AS col0 FROM tab0
----
172
182
194

query I rowsort
SELECT ALL + col0 * + 94 * col2 + + col0 FROM tab2
----
17773
190710
282267

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * tab0.col2 col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT - tab2.col0 * - col2 * - tab2.col1 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT + tab0.col1 * - col1 FROM tab0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-8632
SELECT ALL tab1.col0 + + col0 DIV + col1 AS col1 FROM tab1
----
3
70
86

skipif mysql # not compatible
query I rowsort label-8632
SELECT ALL tab1.col0 + + col0 / + col1 AS col1 FROM tab1
----
3
70
86

query I rowsort
SELECT DISTINCT + 64 * col1 FROM tab1 AS cor0
----
1664
640
832

query I rowsort
SELECT ALL + - cor0.col1 * + col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL cor0.col0 * tab2.col0 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 12930ec3ed2e24e506ebb47d036ed597

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col2 * - 93 + + tab2.col1 col0 FROM tab2
----
-2359
-2480
-3517

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8638
SELECT CAST( NULL AS DECIMAL ) * col1 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8638
SELECT CAST ( NULL AS REAL ) * col1 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col0 ) + - col2 + + 86 * tab0.col2 * - tab0.col1 col2 FROM tab0
----
-244077
-641725
-8308

query I rowsort
SELECT ( + ( col0 ) ) + - col2 AS col0 FROM tab0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8641
SELECT CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8641
SELECT CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 79 * cor0.col1 FROM tab0, tab1 AS cor0
----
1027
2054
790

query I rowsort
SELECT + 81 + cor0.col0 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to eb7e09d56aeb6b294bc773efb05e889c

query I rowsort
SELECT col0 + col1 AS col2 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT - ( + 87 ) FROM tab2
----
-87
-87
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-8646
SELECT + - 96 DIV col2 + col0 * col1 DIV ( col1 ) FROM tab0 AS cor0
----
-61
22
88

skipif mysql # not compatible
query I rowsort label-8646
SELECT + - 96 / col2 + col0 * col1 / ( col1 ) FROM tab0 AS cor0
----
-61
22
88

query I rowsort
SELECT 4 * - cor0.col0 FROM tab2 AS cor0
----
-28
-312
-316

query I rowsort
SELECT - col2 * col2 * 51 AS col0 FROM tab0 AS cor0
----
-342924
-51
-55539

query I rowsort
SELECT - cor0.col2 + + col2 * col0 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
155
1924
2885

query I rowsort
SELECT ALL col0 * - col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col1 + + col0 AS col2 FROM tab1 AS cor0
----
111
163
31

query I rowsort
SELECT DISTINCT - 60 * col1 FROM tab0
----
-5160
-5460
-5820

query I rowsort
SELECT - 38 + col2 * col2 FROM tab1 AS cor0
----
2878
3211
9178

query I rowsort
SELECT + - 10 * - col2 + - cor0.col2 * col0 + - col0 FROM tab0 AS cor0
----
-486
-60
-6567

query I rowsort
SELECT DISTINCT col0 * - col1 * - cor0.col2 + col1 AS col2 FROM tab2 AS cor0
----
119711
51051
5890

query I rowsort
SELECT col0 + - col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT col1 * - col0 + + col1 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-8658
SELECT ALL - col2 DIV - 3 FROM tab1
----
18
19
32

skipif mysql # not compatible
query I rowsort label-8658
SELECT ALL - col2 / - 3 FROM tab1
----
18
19
32

query I rowsort
SELECT + col0 * ( cor0.col2 ) * + col1 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-8660
SELECT - + col1 DIV 35 AS col0 FROM tab0 AS cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-8660
SELECT - + col1 / 35 AS col0 FROM tab0 AS cor0
----
-2
-2
-2

query I rowsort
SELECT + col1 + ( col1 ) * - 14 + - col2 * col1 FROM tab1 AS cor0
----
-1417
-1742
-700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 88 col1 FROM tab0 AS cor0
----
88
88
88

query I rowsort
SELECT DISTINCT - 77 * 49 FROM tab1 AS cor0
----
-3773

query I rowsort
SELECT - ( col1 ) * + col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - 61 + cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e1d96af71bab85331e5548b95b58425f

query I rowsort
SELECT DISTINCT col0 * 22 FROM tab2
----
154
1716
1738

query I rowsort
SELECT - col0 * - ( + col0 ) FROM tab0
----
1225
576
7921

query I rowsort
SELECT - 52 - + col0 * + col2 FROM tab0 cor0
----
-7350
-844
-87

query I rowsort
SELECT DISTINCT + 96 * + col2 + col1 * - col2 AS col0 FROM tab1 AS cor0
----
3780
4902
7968

onlyif mysql # use DIV operator for integer division
query I rowsort label-8670
SELECT + - CAST( col2 AS SIGNED ) * + cor0.col2 + col2 DIV col0 AS col0 FROM tab0 AS cor0
----
-1
-1088
-6724

skipif mysql # not compatible
query I rowsort label-8670
SELECT + - CAST ( col2 AS INTEGER ) * + cor0.col2 + col2 / col0 AS col0 FROM tab0 AS cor0
----
-1
-1088
-6724

query I rowsort
SELECT ALL + + col2 - - 78 FROM tab0 AS cor0
----
111
160
79

query I rowsort
SELECT - - col2 * + col1 * col2 + col0 AS col0 FROM tab1 AS cor0
----
119888
32554
75819

query I rowsort
SELECT DISTINCT - - 31 * - cor0.col2 + + col0 FROM tab0 AS cor0
----
-2453
-999
4

query I rowsort
SELECT DISTINCT - col2 * - col0 + col1 * - col0 + 33 FROM tab1 cor0
----
117
3041
6673

query I rowsort
SELECT + + col0 + col1 * col2 AS col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL - - col0 + - 24 FROM tab0 AS cor0
----
0
11
65

query I rowsort
SELECT ( col1 ) - - col2 * + col2 FROM tab1 cor0
----
2942
3259
9229

query I rowsort
SELECT ALL - ( - col0 ) + cor0.col1 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT col0 * - col1 + - col1 + 73 AS col1 FROM tab0 AS cor0
----
-2077
-3419
-8117

query I rowsort
SELECT + - 92 - 43 AS col0 FROM tab1 cor0
----
-135
-135
-135

query I rowsort
SELECT ALL 88 * 5 - col0 AS col2 FROM tab0 AS cor0
----
351
405
416

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 98 * - cor0.col0 col1 FROM tab0 AS cor0
----
-2352
-3430
-8722

query I rowsort
SELECT + + cor0.col2 * - col1 + cor0.col2 FROM tab0 cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL - ( - 56 ) * + col1 + + 41 FROM tab2 AS cor0
----
1777
3345
993

query I rowsort
SELECT ALL - - 54 - col1 AS col2 FROM tab1 AS cor0
----
28
41
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-8686
SELECT col1 DIV col1 - cor0.col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-8686
SELECT col1 / col1 - cor0.col1 FROM tab0 AS cor0
----
-85
-90
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8687
SELECT ALL - ( col0 ) DIV col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-8687
SELECT ALL - ( col0 ) / col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT 38 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT DISTINCT col1 + col1 AS col0 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT - col1 * col2 * col0 - col2 AS col2 FROM tab2 AS cor0
----
-119678
-51072
-5886

query I rowsort
SELECT DISTINCT - col2 * + 39 - + 46 FROM tab2 AS cor0
----
-1060
-1099
-1528

query I rowsort
SELECT ALL - col0 * tab1.col0 AS col1 FROM tab1
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8693
SELECT col1 DIV - col0 + - col0 AS col1 FROM tab1
----
-11
-64
-80

skipif mysql # not compatible
query I rowsort label-8693
SELECT col1 / - col0 + - col0 AS col1 FROM tab1
----
-11
-64
-80

query I rowsort
SELECT + ( 12 ) FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT + 15 + 69 * cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c2187fc877665ec02e07d52deb5fd20f

onlyif mysql # use DIV operator for integer division
query I rowsort label-8696
SELECT - col2 * 65 DIV 44 + col1 FROM tab2
----
-39
-8
21

skipif mysql # not compatible
query I rowsort label-8696
SELECT - col2 * 65 / 44 + col1 FROM tab2
----
-39
-8
21

query I rowsort
SELECT DISTINCT tab2.col0 * 91 AS col2 FROM tab2
----
637
7098
7189

query I rowsort
SELECT DISTINCT + - col1 * + ( - col2 ) AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + col1 + + 76 * - col2 AS col0 FROM tab0 AS cor0
----
-2422
-6141
21

query I rowsort
SELECT - ( + 82 ) AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to f800b0aad28b82b2deb67f7045c9a45c

query I rowsort
SELECT - cor0.col1 * 65 + col2 AS col1 FROM tab1 AS cor0
----
-1636
-593
-749

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + col1 col1 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 + + col1 * col2 col0 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT + col0 * + col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - 29 + tab1.col1 AS col0 FROM tab1
----
-16
-19
-3

query I rowsort
SELECT col1 * tab1.col1 AS col2 FROM tab1
----
100
169
676

query I rowsort
SELECT + 50 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 314aace40e704c20a6be06204a329f80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col1 col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + tab0.col0 col0 FROM tab0
----
178
48
70

query I rowsort
SELECT + 29 * 4 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 1b203c14e07bd085fccb96893918131a

query I rowsort
SELECT ALL + + col1 - + 41 * - ( + col0 ) AS col0 FROM tab2 AS cor0
----
318
3256
3257

query I rowsort
SELECT DISTINCT - - col2 + + 11 AS col1 FROM tab1 AS cor0
----
107
65
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8713
SELECT ALL CAST( NULL AS DECIMAL ) + col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8713
SELECT ALL CAST ( NULL AS REAL ) + col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8714
SELECT DISTINCT 52 * + 61 + col2 + CAST( NULL AS SIGNED ) col2 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8714
SELECT DISTINCT 52 * + 61 + col2 + CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8715
SELECT + - ( + col2 ) * col2 + + CAST( NULL AS SIGNED ) - + 82 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8715
SELECT + - ( + col2 ) * col2 + + CAST ( NULL AS INTEGER ) - + 82 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( - col2 AS REAL ) + col0 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT - - col2 - - col1 * + col0 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8718
SELECT - CAST( + 93 AS SIGNED ) FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ea79c61f7a02d25805171f5e85229fba

skipif mysql # not compatible
query I rowsort label-8718
SELECT - CAST ( + 93 AS INTEGER ) FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ea79c61f7a02d25805171f5e85229fba

query I rowsort
SELECT + 53 * - col0 AS col1 FROM tab1 AS cor0
----
-159
-3392
-4240

query I rowsort
SELECT DISTINCT + ( col2 ) * - col2 AS col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-8721
SELECT ALL - - col0 DIV col1 AS col2 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-8721
SELECT ALL - - col0 / col1 AS col2 FROM tab1 AS cor0
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8723
SELECT CAST( - 43 AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ab0c314d2b589ccedb9a875beeb1f86a

skipif mysql # not compatible
query I rowsort label-8723
SELECT CAST ( - 43 AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ab0c314d2b589ccedb9a875beeb1f86a

query I rowsort
SELECT + 70 * tab0.col2 AS col1 FROM tab0
----
2310
5740
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8725
SELECT + + col2 * cor0.col2 + CAST( NULL AS SIGNED ) * col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8725
SELECT + + col2 * cor0.col2 + CAST ( NULL AS INTEGER ) * col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 5 * + col2 + col0 AS col2 FROM tab0 AS cor0
----
189
40
499

onlyif mysql # use DIV operator for integer division
query I rowsort label-8727
SELECT DISTINCT - 26 DIV + col1 FROM tab1
----
-1
-2

skipif mysql # not compatible
query I rowsort label-8727
SELECT DISTINCT - 26 / + col1 FROM tab1
----
-1
-2

onlyif mysql # use DIV operator for integer division
query I rowsort label-8728
SELECT - - col1 + - col2 DIV + ( 50 ) AS col1 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-8728
SELECT - - col1 + - col2 / + ( 50 ) AS col1 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8729
SELECT - - col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8729
SELECT - - col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * + col1 + + col0 AS col2 FROM tab2
----
3559
368
968

query I rowsort
SELECT - col1 - - col1 * + col2 FROM tab0
----
0
2752
7371

query I rowsort
SELECT DISTINCT col2 + - 64 * + col0 AS col1 FROM tab2
----
-421
-4966
-5018

onlyif mysql # use DIV operator for integer division
query I rowsort label-8733
SELECT - - col2 * 99 DIV - 18 + col2 + col2 col0 FROM tab0 AS cor0
----
-115
-287
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8733
SELECT - - col2 * 99 / - 18 + col2 + col2 col0 FROM tab0 AS cor0
----
-115
-287
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-8734
SELECT col1 DIV - ( + col0 ) AS col1 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-8734
SELECT col1 / - ( + col0 ) AS col1 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT - col1 * 5 + col0 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-1105
-208
-690

onlyif mysql # use DIV operator for integer division
query I rowsort label-8736
SELECT ALL - col2 DIV - tab0.col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8736
SELECT ALL - col2 / - tab0.col1 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + col1 * cor0.col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 30 col0 FROM tab2, tab0 cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT - - 6 + + col0 * - col2 AS col1 FROM tab2 cor0
----
-183
-2022
-2996

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8740
SELECT DISTINCT - CAST( + cor0.col0 AS SIGNED ) AS col2 FROM tab0, tab2, tab2 cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-8740
SELECT DISTINCT - CAST ( + cor0.col0 AS INTEGER ) AS col2 FROM tab0, tab2, tab2 cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8741
SELECT ALL col1 * 97 DIV col2 AS col1 FROM tab1
----
13
17
46

skipif mysql # not compatible
query I rowsort label-8741
SELECT ALL col1 * 97 / col2 AS col1 FROM tab1
----
13
17
46

query I rowsort
SELECT ALL cor0.col2 FROM tab2, tab1 cor0, tab0 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8743
SELECT + col2 DIV + col0 AS col2 FROM tab2 cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-8743
SELECT + col2 / + col0 AS col2 FROM tab2 cor0
----
0
0
3

query I rowsort
SELECT - col0 * cor0.col0 + col2 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT 74 * tab0.col0 * - 8 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 7641317a5a5bdeeea3973390a64add39

onlyif mysql # use DIV operator for integer division
query I rowsort label-8746
SELECT col0 + + ( + col0 + tab2.col2 ) DIV + col0 AS col2 FROM tab2
----
11
79
80

skipif mysql # not compatible
query I rowsort label-8746
SELECT col0 + + ( + col0 + tab2.col2 ) / + col0 AS col2 FROM tab2
----
11
79
80

query I rowsort
SELECT ( 82 ) AS col0 FROM tab0
----
82
82
82

query I rowsort
SELECT ALL - - col0 * - col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT col0 * cor0.col2 + col0 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL + ( - 53 ) * col2 FROM tab0 AS cor0
----
-1749
-4346
-53

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab1 AS cor1, tab1 cor2
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

query I rowsort
SELECT DISTINCT - + col0 + + col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT + 99 FROM tab1, tab2, tab0 AS cor0
----
99

query I rowsort
SELECT DISTINCT - tab0.col1 + + col2 * - tab0.col1 FROM tab0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT 32 + col2 AS col1 FROM tab2
----
58
59
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - + col0 col2 FROM tab2
----
-41
-52
20

query I rowsort
SELECT 39 AS col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

onlyif mysql # use DIV operator for integer division
query I rowsort label-8759
SELECT DISTINCT 91 DIV col2 AS col2 FROM tab0
----
1
2
91

skipif mysql # not compatible
query I rowsort label-8759
SELECT DISTINCT 91 / col2 AS col2 FROM tab0
----
1
2
91

query I rowsort
SELECT + 33 * - col1 + col2 * + 22 * 50 FROM tab1
----
105171
58542
62370

query I rowsort
SELECT 1 FROM tab1, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT - 4 * - ( + col0 ) FROM tab2 AS cor0
----
28
312
316

query I rowsort
SELECT 31 AS col2 FROM tab0
----
31
31
31

query I rowsort
SELECT ALL + tab0.col0 * - col2 FROM tab0
----
-35
-7298
-792

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to db9b93cf4fdd5de4106f0487a66ce0a5

query I rowsort
SELECT ALL 35 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT + col1 + - 22 * + col1 FROM tab0 AS cor0
----
-1806
-1911
-2037

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 cor2
----
972 values hashing to 75a813ebd5ec5ec2e67a66d0593ff763

query I rowsort
SELECT col1 * col0 + col0 - col0 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT + 10 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT - col0 * - 52 FROM tab2 AS cor0
----
364
4056
4108

query I rowsort
SELECT ALL + cor0.col0 * 52 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-107328
-176540
-421148

query I rowsort
SELECT DISTINCT col1 * - col0 + 16 FROM tab0 cor0
----
-2048
-3379
-8083

query I rowsort
SELECT col1 * 76 FROM tab1 AS cor0
----
1976
760
988

query I rowsort
SELECT DISTINCT + + col1 * + col2 AS col1 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8776
SELECT ALL + - col1 + - ( + col0 ) * col2 DIV - ( col1 ) FROM tab0 AS cor0
----
-11
-77
-97

skipif mysql # not compatible
query I rowsort label-8776
SELECT ALL + - col1 + - ( + col0 ) * col2 / - ( col1 ) FROM tab0 AS cor0
----
-11
-77
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8777
SELECT - col2 + col2 DIV + ( + col1 ) col2 FROM tab2
----
-26
-27
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8777
SELECT - col2 + col2 / + ( + col1 ) col2 FROM tab2
----
-26
-27
-36

query I rowsort
SELECT DISTINCT col0 * ( + 54 ) FROM tab1
----
162
3456
4320

query I rowsort
SELECT ALL - col2 + 57 FROM tab2 AS cor0
----
19
30
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-8780
SELECT + col1 DIV col0 AS col2 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-8780
SELECT + col1 / col0 AS col2 FROM tab1 AS cor0
----
0
0
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-8781
SELECT ALL col0 DIV col2 + - col0 * col0 FROM tab1 AS cor0
----
-4095
-6400
-9

skipif mysql # not compatible
query I rowsort label-8781
SELECT ALL col0 / col2 + - col0 * col0 FROM tab1 AS cor0
----
-4095
-6400
-9

query I rowsort
SELECT - cor0.col2 + + cor0.col0 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to 1c0f12b2ac8c8b522b92205460500f94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8783
SELECT ALL - CAST( col1 AS SIGNED ) * col1 * ( col1 ) AS col2 FROM tab2 AS cor0
----
-205379
-29791
-4913

skipif mysql # not compatible
query I rowsort label-8783
SELECT ALL - CAST ( col1 AS INTEGER ) * col1 * ( col1 ) AS col2 FROM tab2 AS cor0
----
-205379
-29791
-4913

query I rowsort
SELECT + - ( + col2 ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - ( + 82 ) + col0 AS col2 FROM tab0 cor0
----
-47
-58
7

query I rowsort
SELECT + ( 16 ) - - col0 * col1 AS col2 FROM tab1 AS cor0
----
1056
656
94

query I rowsort
SELECT ALL - ( cor0.col1 ) * - col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ( - col0 ) * - col0 * cor0.col0 FROM tab0 AS cor0
----
13824
42875
704969

query I rowsort
SELECT ALL - 86 + 12 AS col1 FROM tab0 AS cor0
----
-74
-74
-74

query I rowsort
SELECT + 38 + + ( col0 ) FROM tab0 AS cor0
----
127
62
73

query I rowsort
SELECT + ( - 22 ) + + col0 AS col2 FROM tab0 cor0
----
13
2
67

query I rowsort
SELECT ALL - col0 - col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL + col2 * - 31 + + col0 FROM tab0 AS cor0
----
-2453
-999
4

query I rowsort
SELECT DISTINCT - cor0.col2 - + cor0.col2 FROM tab0 AS cor0
----
-164
-2
-66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8795
SELECT ALL - CAST( col2 AS SIGNED ) * + col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort label-8795
SELECT ALL - CAST ( col2 AS INTEGER ) * + col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL + col0 * + ( + col0 ) FROM tab0
----
1225
576
7921

query I rowsort
SELECT DISTINCT - col0 * - cor0.col1 AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + - ( col0 ) * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 36 + - 63 * - col0 col0 FROM tab0 AS cor0
----
1548
2241
5643

query I rowsort
SELECT - + 43 * 68 FROM tab1 cor0
----
-2924
-2924
-2924

query I rowsort
SELECT - col0 * + col0 + - ( + cor0.col2 ) FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT DISTINCT - col2 * col1 + col0 * col1 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT DISTINCT 62 * col1 + 30 + - 0 AS col1 FROM tab1 cor0
----
1642
650
836

query I rowsort
SELECT + ( cor0.col2 ) + cor0.col1 AS col1 FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col1 + col1 * col0 col0 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT - + col1 + col0 AS col0 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT - - 25 FROM tab1 AS cor0
----
25
25
25

query I rowsort
SELECT DISTINCT - 49 FROM tab0
----
-49

onlyif mysql # use DIV operator for integer division
query I rowsort label-8809
SELECT + 34 DIV - col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8809
SELECT + 34 / - col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 + col0 * 8 FROM tab1 AS cor0
----
-30
455
544

query I rowsort
SELECT DISTINCT + col1 - + col1 * - 51 * col1 FROM tab2 cor0
----
14756
177590
49042

query I rowsort
SELECT 35 FROM tab2, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT ALL ( 85 ) AS col0 FROM tab0
----
85
85
85

query I rowsort
SELECT DISTINCT - 47 * col2 FROM tab1 AS cor0
----
-2538
-2679
-4512

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 51 + col1 col1 FROM tab2 AS cor0
----
-20
-34
8

query I rowsort
SELECT ALL + cor0.col1 + - col0 * - col1 - col2 * - col0 FROM tab2 AS cor0
----
4362
437
6689

onlyif mysql # use DIV operator for integer division
query I rowsort label-8817
SELECT DISTINCT + 49 DIV - col1 AS col1 FROM tab2 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-8817
SELECT DISTINCT + 49 / - col1 AS col1 FROM tab2 AS cor0
----
-1
-2
0

query I rowsort
SELECT ( + col0 ) + - col0 + + col0 AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + + col1 * - col2 * + col0 AS col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - - col1 * - 23 + col1 * + 18 + + col2 FROM tab0 AS cor0
----
-373
-397
-484

query I rowsort
SELECT ALL 33 AS col0 FROM tab1 cor0
----
33
33
33

query I rowsort
SELECT - - col2 * + 87 + - col0 + col0 FROM tab1 AS cor0
----
4698
4959
8352

query I rowsort
SELECT ALL - - col0 * + ( col1 ) + - 37 FROM tab2 AS cor0
----
1306
180
4565

query I rowsort
SELECT + col1 * + cor0.col0 - col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT + ( 67 ) + col2 AS col0 FROM tab1 AS cor0
----
121
124
163

query I rowsort
SELECT DISTINCT col2 + 22 FROM tab2
----
48
49
60

query I rowsort
SELECT ALL 47 * - 77 + - col1 AS col0 FROM tab2 AS cor0
----
-3636
-3650
-3678

query I rowsort
SELECT - + 1 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ( col0 ) + 54 + col0 AS col0 FROM tab2 AS cor0
----
210
212
68

query I rowsort
SELECT ALL 53 - - 88 FROM tab2, tab1 cor0 CROSS JOIN tab1
----
27 values hashing to 1dba1efab97ddd582afcd3f3f6e1fb1f

query I rowsort
SELECT ALL 36 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 4d1892e880125dc90345721151acb22c

query I rowsort
SELECT + ( - col0 ) + - ( + cor0.col2 ) FROM tab0 AS cor0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8833
SELECT DISTINCT col1 * ( + col2 ) DIV - col1 AS col0 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-8833
SELECT DISTINCT col1 * ( + col2 ) / - col1 AS col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT - 86 + col0 AS col1 FROM tab1
----
-22
-6
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 - + cor0.col0 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - col0 + col2 * - col1 FROM tab2 AS cor0
----
-1612
-725
-844

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8837
SELECT DISTINCT + - col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8837
SELECT DISTINCT + - col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
24
35
89

query I rowsort
SELECT + 40 FROM tab1
----
40
40
40

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col0 + CAST ( - col0 AS REAL ) AS col1 FROM tab0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8841
SELECT - col2 * col0 * + col1 + col2 + CAST( NULL AS SIGNED ) * tab2.col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8841
SELECT - col2 * col0 * + col1 + col2 + CAST ( NULL AS INTEGER ) * tab2.col1 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 4 FROM tab0, tab1 AS cor0
----
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-8843
SELECT col0 DIV + col0 + col0 * - col0 + 33 FROM tab1
----
-4062
-6366
25

skipif mysql # not compatible
query I rowsort label-8843
SELECT col0 / + col0 + col0 * - col0 + 33 FROM tab1
----
-4062
-6366
25

query I rowsort
SELECT DISTINCT + col1 + + ( + tab2.col0 ) FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8845
SELECT + col2 DIV + 2 AS col1 FROM tab1
----
27
28
48

skipif mysql # not compatible
query I rowsort label-8845
SELECT + col2 / + 2 AS col1 FROM tab1
----
27
28
48

query I rowsort
SELECT + col2 * - 17 FROM tab1
----
-1632
-918
-969

query I rowsort
SELECT DISTINCT + + col2 + 8 * cor0.col2 * cor0.col1 AS col2 FROM tab2 AS cor0
----
12298
5206
6723

query I rowsort
SELECT tab0.col1 + + 22 FROM tab0, tab1 AS cor0
----
9 values hashing to ecc40f22db3be52650304cd9d3449cc4

query I rowsort
SELECT DISTINCT col0 - ( col0 ) AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - 60 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab0 cor1, tab2, tab2 AS cor2
----
3645 values hashing to bb6428239bf7f3ea361f6a10500a581d

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to a8f0522dfcc0ffd1116145dd0d0134ff

query I rowsort
SELECT ALL + 51 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 * col0 col2 FROM tab0
----
1602
432
630

query I rowsort
SELECT ALL + 61 + + tab1.col2 * 65 FROM tab1, tab1 AS cor0
----
9 values hashing to 80e90723897d4f18aeabd9002cac93dc

onlyif mysql # use DIV operator for integer division
query I rowsort label-8856
SELECT - 26 DIV + col0 AS col2 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8856
SELECT - 26 / + col0 AS col2 FROM tab0
----
-1
0
0

query I rowsort
SELECT ALL ( - tab0.col1 ) AS col2 FROM tab0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8858
SELECT DISTINCT tab0.col2 DIV - col0 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-8858
SELECT DISTINCT tab0.col2 / - col0 FROM tab0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8859
SELECT DISTINCT - + ( - col1 ) DIV - 24 AS col0 FROM tab2 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-8859
SELECT DISTINCT - + ( - col1 ) / - 24 AS col0 FROM tab2 AS cor0
----
-1
-2
0

query I rowsort
SELECT 36 + - col0 AS col2 FROM tab2 AS cor0
----
-42
-43
29

query I rowsort
SELECT DISTINCT + col2 + col1 * 11 AS col0 FROM tab2 AS cor0
----
225
368
675

query I rowsort
SELECT DISTINCT col1 * col2 AS col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT + col1 * + col1 + col1 FROM tab0 AS cor0
----
7482
8372
9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * col0 col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - col2 * - ( + col2 ) + col1 + 38 AS col2 FROM tab0 AS cor0
----
1213
136
6853

query I rowsort
SELECT ALL + cor0.col0 - ( cor0.col0 ) * col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT + col0 * col1 AS col2 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT - cor0.col2 * - 9 + - col0 FROM tab2 AS cor0
----
156
236
263

onlyif mysql # use DIV operator for integer division
query I rowsort label-8869
SELECT ALL 79 DIV - col1 AS col0 FROM tab1
----
-3
-6
-7

skipif mysql # not compatible
query I rowsort label-8869
SELECT ALL 79 / - col1 AS col0 FROM tab1
----
-3
-6
-7

query I rowsort
SELECT + + col2 + col2 * + col0 FROM tab0 AS cor0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col1 col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT - 52 * + col0 FROM tab2 cor0
----
-364
-4056
-4108

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 36 + col0 col0 FROM tab1 AS cor0
----
-33
28
44

query I rowsort
SELECT DISTINCT + - col1 * + col1 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT + - 96 + - col1 AS col0 FROM tab2 AS cor0
----
-113
-127
-155

query I rowsort
SELECT DISTINCT - 48 - col0 AS col0 FROM tab2 AS cor0
----
-126
-127
-55

onlyif mysql # use DIV operator for integer division
query I rowsort label-8878
SELECT ALL 72 DIV - col0 AS col0 FROM tab2
----
-10
0
0

skipif mysql # not compatible
query I rowsort label-8878
SELECT ALL 72 / - col0 AS col0 FROM tab2
----
-10
0
0

query I rowsort
SELECT + cor0.col2 + - 63 FROM tab0 AS cor0
----
-30
-62
19

query I rowsort
SELECT + + cor0.col0 * + 63 AS col1 FROM tab1 AS cor0
----
189
4032
5040

query I rowsort
SELECT + cor0.col0 - + col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL col1 * - 29 FROM tab1 AS cor0
----
-290
-377
-754

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8883
SELECT DISTINCT - col2 + + CAST( cor0.col0 AS SIGNED ) * - col0 FROM tab2 cor0
----
-6110
-6279
-76

skipif mysql # not compatible
query I rowsort label-8883
SELECT DISTINCT - col2 + + CAST ( cor0.col0 AS INTEGER ) * - col0 FROM tab2 cor0
----
-6110
-6279
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-8884
SELECT col1 * col2 DIV - 73 + col1 + + col1 * col2 AS col0 FROM tab0 AS cor0
----
193
2886
7451

skipif mysql # not compatible
query I rowsort label-8884
SELECT col1 * col2 / - 73 + col1 + + col1 * col2 AS col0 FROM tab0 AS cor0
----
193
2886
7451

query I rowsort
SELECT ALL 70 - + col0 FROM tab1
----
-10
6
67

query I rowsort
SELECT tab1.col0 * - col0 * - col0 + 94 * - col1 + + ( - ( col0 ) + 18 ) * + col0 * - col0 FROM tab1
----
-2552
449620
907578

query I rowsort
SELECT DISTINCT - col1 * - col1 - 78 FROM tab2
----
211
3403
883

query I rowsort
SELECT DISTINCT 2 AS col2 FROM tab1, tab0 AS cor0, tab2 cor1
----
2

query I rowsort
SELECT DISTINCT + col0 + 20 * + col0 + col0 FROM tab1 AS cor0
----
1408
1760
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8890
SELECT + - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8890
SELECT + - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * col2 + cor0.col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL + - ( + 46 ) AS col1 FROM tab1 cor0
----
-46
-46
-46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + 42 col1 FROM tab2
----
294
3276
3318

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * tab0.col0 * col1 col2 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT col2 * ( col2 ) FROM tab2
----
1444
676
729

query I rowsort
SELECT - tab2.col2 * + col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - col0 + col1 * tab1.col1 FROM tab1
----
36
673
89

query I rowsort
SELECT - 20 - 98 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to f1c3709f55402cce8c76ca8e8ed2d726

query I rowsort
SELECT + tab1.col1 - 52 AS col1 FROM tab1
----
-26
-39
-42

query I rowsort
SELECT + - ( - col2 ) + + col0 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + + 56 * + cor0.col0 col2 FROM tab0 AS cor0
----
1368
1995
5073

query I rowsort
SELECT + 3 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
258
273
291

query I rowsort
SELECT DISTINCT ( + 38 ) + col0 * + 78 AS col0 FROM tab1
----
272
5030
6278

query I rowsort
SELECT DISTINCT 64 FROM tab1, tab0 cor0
----
64

query I rowsort
SELECT ALL ( col2 ) * - col1 + - col2 FROM tab0
----
-2871
-7544
-98

query I rowsort
SELECT DISTINCT + + col0 * + col0 - cor0.col1 * - col2 * col2 AS col2 FROM tab0 AS cor0
----
1322
619805
94230

onlyif mysql # use DIV operator for integer division
query I rowsort label-8907
SELECT ALL col0 DIV col2 + - 21 FROM tab0 AS cor0
----
-20
-21
14

skipif mysql # not compatible
query I rowsort label-8907
SELECT ALL col0 / col2 + - 21 FROM tab0 AS cor0
----
-20
-21
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-8908
SELECT - ( - 32 * col0 ) + CAST( col0 AS SIGNED ) DIV col0 FROM tab2
----
225
2497
2529

skipif mysql # not compatible
query I rowsort label-8908
SELECT - ( - 32 * col0 ) + CAST ( col0 AS INTEGER ) / col0 FROM tab2
----
225
2497
2529

query I rowsort
SELECT 54 FROM tab0, tab1 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT DISTINCT + col2 + col0 * col1 FROM tab1 cor0
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * col0 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + col1 + col2 * + 26 AS col0 FROM tab0 AS cor0
----
123
2223
944

query I rowsort
SELECT - 12 + col1 * cor0.col0 AS col1 FROM tab1 AS cor0
----
1028
628
66

query I rowsort
SELECT ALL col0 * + cor0.col2 * - ( - col2 ) AS col2 FROM tab0 cor0
----
26136
35
598436

query I rowsort
SELECT - ( - col1 ) * 27 AS col0 FROM tab1 cor0
----
270
351
702

query I rowsort
SELECT ALL + 30 * + col2 FROM tab0 cor0
----
2460
30
990

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - col1 col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT + + 64 + col2 AS col2 FROM tab0 AS cor0
----
146
65
97

query I rowsort
SELECT ALL + col1 + cor0.col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT 92 * col2 AS col2 FROM tab0 AS cor0
----
3036
7544
92

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 cor1, tab2 AS cor2, tab1 AS cor3
----
3645 values hashing to 40a052eaf1d698dbf3ba319dc3e245ee

onlyif mysql # use DIV operator for integer division
query I rowsort label-8922
SELECT + col2 + - col1 DIV col1 FROM tab2 AS cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-8922
SELECT + col2 + - col1 / col1 FROM tab2 AS cor0
----
25
26
37

query I rowsort
SELECT ALL - col2 + 94 + 4 AS col1 FROM tab1
----
2
41
44

query I rowsort
SELECT col0 + + ( + col2 ) * - cor0.col0 AS col2 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT ALL + col1 + + 11 * ( col1 ) * ( - col2 * - col0 ) FROM tab2 AS cor0
----
1316231
561391
64480

query I rowsort
SELECT col0 * - col0 * + col0 - col2 FROM tab2 AS cor0
----
-370
-474578
-493077

onlyif mysql # use DIV operator for integer division
query I rowsort label-8927
SELECT ALL col0 DIV + ( - 48 ) FROM tab0 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8927
SELECT ALL col0 / + ( - 48 ) FROM tab0 cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - - col2 + + ( + col2 ) FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT - + cor0.col2 * - col1 + - col2 * cor0.col2 FROM tab2 AS cor0
----
-798
108
858

query I rowsort
SELECT ALL - col2 * - col1 + + col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - col0 * + cor0.col1 AS col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col2 * ( col1 ) AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - col0 * 49 + + col2 * col1 * - col1 AS col1 FROM tab0 AS cor0
----
-11124
-245244
-683403

query I rowsort
SELECT col0 * + ( col2 ) + - col0 * col1 FROM tab0 AS cor0
----
-1272
-3360
-801

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 + col0 FROM tab2 AS cor0
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-8937
SELECT + ( + cor0.col2 ) * - col2 + + cor0.col1 + 6 DIV cor0.col0 FROM tab0 AS cor0
----
-1003
-6633
96

skipif mysql # not compatible
query I rowsort label-8937
SELECT + ( + cor0.col2 ) * - col2 + + cor0.col1 + 6 / cor0.col0 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT ( + col0 ) + col0 * ( + 96 ) FROM tab2 AS cor0
----
679
7566
7663

query I rowsort
SELECT + 38 * col0 * - col1 AS col2 FROM tab0 AS cor0
----
-129010
-307762
-78432

query I rowsort
SELECT ALL ( 39 ) * + col0 * 26 FROM tab2 AS cor0
----
7098
79092
80106

query I rowsort
SELECT ALL - col1 + + 26 AS col1 FROM tab2 AS cor0
----
-33
-5
9

query I rowsort
SELECT ALL + - 22 AS col2 FROM tab0 AS cor0
----
-22
-22
-22

query I rowsort
SELECT ALL 85 FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 cor2
----
81 values hashing to 5e8deeabad7bbbaf313fcdcb4adc75eb

query I rowsort
SELECT DISTINCT 13 * - 80 FROM tab1 AS cor0
----
-1040

query I rowsort
SELECT ALL + + ( 65 ) * col2 AS col0 FROM tab0 AS cor0
----
2145
5330
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-8946
SELECT ALL - + 78 DIV 67 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8946
SELECT ALL - + 78 / 67 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + col0 * 2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT + col2 + col0 * - ( col1 ) AS col0 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT col0 * - col1 * ( + col1 ) AS col2 FROM tab2
----
-22831
-271518
-6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-8950
SELECT col1 DIV + col2 + - tab0.col0 + + col0 * col2 * + col2 col1 FROM tab0
----
26114
598348
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8950
SELECT col1 / + col2 + - tab0.col0 + + col0 * col2 * + col2 col1 FROM tab0
----
26114
598348
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8951
SELECT DISTINCT col1 + - col0 * - col1 DIV col1 AS col0 FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-8951
SELECT DISTINCT col1 + - col0 * - col1 / col1 AS col0 FROM tab2
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 * 51 col0 FROM tab2, tab2 cor0
----
9 values hashing to 0f429f30e77e6cc16a691e9bfe817d9a

query I rowsort
SELECT ALL - 64 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 100c625e45715c20368551989514ba64

query I rowsort
SELECT ALL 43 AS col0 FROM tab0
----
43
43
43

query I rowsort
SELECT col2 * + col1 - col1 * - col1 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT + + col1 - + col1 * col1 FROM tab2 AS cor0
----
-272
-3422
-930

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8957
SELECT - col0 + CAST( - col1 + + col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-11
-111
-58

skipif mysql # not compatible
query I rowsort label-8957
SELECT - col0 + CAST ( - col1 + + col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-11
-111
-58

query I rowsort
SELECT ALL + col2 * - 66 + col0 FROM tab1 AS cor0
----
-3561
-3698
-6256

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col2 col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + col0 * - col1 + col2 AS col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8961
SELECT - cor0.col0 + + CAST( NULL AS SIGNED ) * cor0.col1 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8961
SELECT - cor0.col0 + + CAST ( NULL AS INTEGER ) * cor0.col1 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 34 AS col2 FROM tab0, tab1, tab2 cor0
----
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + 84 - + cor0.col2 col2 FROM tab0 AS cor0
----
84
84
84

query I rowsort
SELECT + col2 * + col0 + col0 AS col2 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT ALL + col1 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT 56 + cor0.col0 * cor0.col2 AS col2 FROM tab1 AS cor0
----
218
3704
7736

query I rowsort
SELECT DISTINCT 33 * - 66 AS col1 FROM tab0 cor0
----
-2178

query I rowsort
SELECT - 18 * col1 AS col1 FROM tab0 AS cor0
----
-1548
-1638
-1746

query I rowsort
SELECT - 69 * 61 AS col2 FROM tab1 cor0
----
-4209
-4209
-4209

query I rowsort
SELECT col1 * - col2 + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL ( col1 ) + - col2 AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT + 5 FROM tab2 AS cor0
----
5
5
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-8973
SELECT DISTINCT 3 DIV - ( + col1 ) FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8973
SELECT DISTINCT 3 / - ( + col1 ) FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8974
SELECT + col2 + col1 DIV + col1 AS col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-8974
SELECT + col2 + col1 / + col1 AS col2 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT + 48 + - col0 FROM tab1 cor0
----
-16
-32
45

query I rowsort
SELECT DISTINCT - cor0.col1 + - col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT - 86 FROM tab0 AS cor0
----
-86
-86
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col0 * col0 col0 FROM tab2 cor0
----
6143
6258
80

query I rowsort
SELECT - 55 * - col0 AS col0 FROM tab0 AS cor0
----
1320
1925
4895

query I rowsort
SELECT DISTINCT + 54 FROM tab1
----
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 5 col1 FROM tab0 AS cor0
----
5
5
5

query I rowsort
SELECT 73 * col1 * - col2 FROM tab0 AS cor0
----
-207174
-544726
-7081

query I rowsort
SELECT + + col1 + col1 * - col2 AS col2 FROM tab2 cor0
----
-1475
-629
-806

query I rowsort
SELECT ALL cor0.col2 * col0 * + col1 - + col2 FROM tab2 AS cor0
----
119626
50996
5832

query I rowsort
SELECT DISTINCT col2 * + col0 + col0 FROM tab2 AS cor0
----
196
2106
3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 38 col2 FROM tab0 AS cor0
----
38
38
38

query I rowsort
SELECT - 16 FROM tab2, tab0 AS cor0
----
9 values hashing to be22ac76b42c6f7212ecc0ba7c89eb34

query I rowsort
SELECT - 15 * cor0.col0 + col1 AS col2 FROM tab0 AS cor0
----
-1244
-274
-428

query I rowsort
SELECT - 36 * + col0 FROM tab2 AS cor0
----
-252
-2808
-2844

query I rowsort
SELECT 65 - + tab2.col2 * col0 * + col2 AS col2 FROM tab2
----
-114011
-5038
-52663

query I rowsort
SELECT ALL - 30 AS col2 FROM tab2
----
-30
-30
-30

query I rowsort
SELECT 48 * col1 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
1222
470
611

query I rowsort
SELECT + col2 + 2 FROM tab1
----
56
59
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 60 col2 FROM tab1 AS cor0
----
1560
600
780

query I rowsort
SELECT col2 * + ( - 64 ) FROM tab1
----
-3456
-3648
-6144

query I rowsort
SELECT ALL - ( - col1 ) AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT 32 * - tab2.col0 FROM tab2
----
-224
-2496
-2528

query I rowsort
SELECT DISTINCT + ( + col2 * - col0 ) AS col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT + ( tab1.col2 ) AS col1 FROM tab1
----
54
57
96

query I rowsort
SELECT + ( col1 ) AS col2 FROM tab2
----
17
31
59

query I rowsort
SELECT - 92 * col0 AS col0 FROM tab0
----
-2208
-3220
-8188

query I rowsort
SELECT + col0 * - ( + cor0.col0 ) FROM tab0 cor0
----
-1225
-576
-7921

query IIIIIIIII rowsort
SELECT * FROM tab1, tab0, tab1 cor0 WHERE NULL BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9004
SELECT + col0 DIV ( col1 ) FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-9004
SELECT + col0 / ( col1 ) FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT - - col1 + + 54 + 60 * - col2 FROM tab0 AS cor0
----
-1840
-4775
91

query I rowsort
SELECT DISTINCT - col0 + ( - col2 * + col1 + + col0 ) AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9007
SELECT - col1 * - CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9007
SELECT - col1 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 + + ( + col2 ) FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT ALL + cor0.col1 + 64 AS col1 FROM tab0 AS cor0
----
150
155
161

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - 24 + - 59 + cor0.col1 * + cor0.col1 col2 FROM tab1 AS cor0
----
1409
1913
2414

query I rowsort
SELECT + 33 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

onlyif mysql # use DIV operator for integer division
query I rowsort label-9012
SELECT + - col2 * 9 DIV + col1 AS col2 FROM tab1 cor0
----
-18
-51
-66

skipif mysql # not compatible
query I rowsort label-9012
SELECT + - col2 * 9 / + col1 AS col2 FROM tab1 cor0
----
-18
-51
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col1 + - col2 col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - col0 + - ( cor0.col0 * col1 ) FROM tab0 cor0
----
-2088
-3430
-8188

query I rowsort
SELECT + 56 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 9cee91ca9c60ba6e45a33b388a3b7d9b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9016
SELECT DISTINCT + - CAST( col2 AS SIGNED ) - - col0 * col1 * ( + cor0.col2 ) FROM tab1 AS cor0
----
36423
4158
99744

skipif mysql # not compatible
query I rowsort label-9016
SELECT DISTINCT + - CAST ( col2 AS INTEGER ) - - col0 * col1 * ( + cor0.col2 ) FROM tab1 AS cor0
----
36423
4158
99744

onlyif mysql # use DIV operator for integer division
query I rowsort label-9017
SELECT + ( - 85 ) DIV + col0 FROM tab2 AS cor0
----
-1
-1
-12

skipif mysql # not compatible
query I rowsort label-9017
SELECT + ( - 85 ) / + col0 FROM tab2 AS cor0
----
-1
-1
-12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9018
SELECT ALL + 65 + cor0.col0 * - col1 * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9018
SELECT ALL + 65 + cor0.col0 * - col1 * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col1 ) - col1 col0 FROM tab1 AS cor0
----
-20
-26
-52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9020
SELECT DISTINCT - + CAST( col0 AS SIGNED ) * - col1 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-9020
SELECT DISTINCT - + CAST ( col0 AS INTEGER ) * - col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + - ( ( col1 ) ) * col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - - 6 AS col0 FROM tab0 AS cor0
----
6
6
6

query I rowsort
SELECT DISTINCT - cor0.col0 * 97 AS col0 FROM tab1 AS cor0
----
-291
-6208
-7760

query I rowsort
SELECT tab0.col1 - + col2 * - 36 FROM tab0
----
1274
133
3043

query I rowsort
SELECT DISTINCT tab2.col0 + - col1 AS col0 FROM tab2
----
-24
19
62

query I rowsort
SELECT ALL + 20 AS col2 FROM tab1 AS cor0
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 + + cor0.col0 col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - + cor0.col2 + + col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - 37 * + col1 AS col1 FROM tab2 AS cor0
----
-1147
-2183
-629

query I rowsort
SELECT DISTINCT + - col0 * - col0 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9031
SELECT - + col0 + + CAST( NULL AS DECIMAL ) * + ( + col0 ) * CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9031
SELECT - + col0 + + CAST ( NULL AS REAL ) * + ( + col0 ) * CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9032
SELECT ALL + cor0.col0 DIV + 95 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9032
SELECT ALL + cor0.col0 / + 95 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 + col2 AS col0 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT ALL - col0 + - 2 FROM tab0 AS cor0
----
-26
-37
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-9035
SELECT ALL - col0 * - col2 * + tab0.col0 + 19 + col0 DIV 90 FROM tab0
----
1244
19027
649541

skipif mysql # not compatible
query I rowsort label-9035
SELECT ALL - col0 * - col2 * + tab0.col0 + 19 + col0 / 90 FROM tab0
----
1244
19027
649541

query I rowsort
SELECT col0 * + col0 - col1 * + tab2.col2 FROM tab2
----
-788
4550
5595

query I rowsort
SELECT + tab0.col0 * tab0.col2 * + ( - 85 ) AS col1 FROM tab0
----
-2975
-620330
-67320

query I rowsort
SELECT + 66 + + col1 AS col2 FROM tab0
----
152
157
163

query I rowsort
SELECT col2 - - tab1.col2 AS col2 FROM tab1
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-9040
SELECT ALL col1 * col2 DIV + col1 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-9040
SELECT ALL col1 * col2 / + col1 FROM tab1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - col1 col1 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT + col1 + ( col1 ) AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL - col1 * + 74 + - 92 - col0 AS col2 FROM tab0 AS cor0
----
-6480
-6915
-7305

query I rowsort
SELECT DISTINCT + col0 * - 61 FROM tab0 AS cor0
----
-1464
-2135
-5429

onlyif mysql # use DIV operator for integer division
query I rowsort label-9045
SELECT col1 DIV + cor0.col0 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-9045
SELECT col1 / + cor0.col0 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT ALL ( + col0 ) * ( + col0 ) + - col2 AS col0 FROM tab2
----
22
6058
6203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 13 col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9048
SELECT col1 * CAST( NULL AS SIGNED ) + + cor0.col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9048
SELECT col1 * CAST ( NULL AS INTEGER ) + + cor0.col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 + + 15 FROM tab1
----
25
28
41

query I rowsort
SELECT - col2 + 30 FROM tab1
----
-24
-27
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-9051
SELECT - col1 DIV + 38 + tab0.col0 FROM tab0
----
22
33
87

skipif mysql # not compatible
query I rowsort label-9051
SELECT - col1 / + 38 + tab0.col0 FROM tab0
----
22
33
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 * - 99 col2 FROM tab2 AS cor0
----
-1287
-1287
-1287

query I rowsort
SELECT ( - col1 ) + + col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL - col0 * 67 FROM tab2 AS cor0
----
-469
-5226
-5293

query I rowsort
SELECT + col2 + col1 + + 6 AS col2 FROM tab1 AS cor0
----
115
73
86

query I rowsort
SELECT DISTINCT - - ( - col1 ) + col0 * col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT ALL - - 50 + - col1 FROM tab2 AS cor0
----
-9
19
33

query I rowsort
SELECT ( col0 ) + - col1 * col1 AS col2 FROM tab1
----
-36
-673
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9059
SELECT ( - tab1.col2 ) DIV + col0 + col1 FROM tab1
----
10
12
8

skipif mysql # not compatible
query I rowsort label-9059
SELECT ( - tab1.col2 ) / + col0 + col1 FROM tab1
----
10
12
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9060
SELECT DISTINCT + - 65 * col2 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9060
SELECT DISTINCT + - 65 * col2 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL ( col2 ) + ( ( col2 ) ) * - col1 AS col1 FROM tab1
----
-1152
-1350
-513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 - + col1 col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL - + 59 FROM tab1 AS cor0
----
-59
-59
-59

query I rowsort
SELECT ALL + col0 * col2 + + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT ( col1 ) * - col2 + + col0 - + col1 AS col1 FROM tab2 cor0
----
-1515
-584
-861

onlyif mysql # use DIV operator for integer division
query I rowsort label-9066
SELECT - cor0.col2 - - col1 DIV cor0.col1 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-9066
SELECT - cor0.col2 - - col1 / cor0.col1 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT ALL + + col2 * + col1 AS col2 FROM tab2 cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 - + col2 * col2 col2 FROM tab2 AS cor0
----
-1378
-610
-663

query I rowsort
SELECT - 72 * cor0.col2 + 56 FROM tab1 AS cor0
----
-3832
-4048
-6856

query I rowsort
SELECT DISTINCT + ( - col2 ) + col1 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - col2 + col0 + ( 88 ) FROM tab1 AS cor0
----
37
72
95

query I rowsort
SELECT ALL col1 * col1 * + 18 + 93 * col0 * col2 FROM tab2 cor0
----
251262
284388
34875

query I rowsort
SELECT ALL + col0 - col1 * col2 FROM tab2 cor0
----
-1456
-567
-830

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 - 65 AS col1 FROM tab2 cor0
----
-65
-65
-65

query I rowsort
SELECT + + 41 + col1 AS col0 FROM tab1 AS cor0
----
51
54
67

query I rowsort
SELECT col1 + - 7 FROM tab1
----
19
3
6

query I rowsort
SELECT 85 FROM tab2, tab2 AS cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT ALL + 21 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

query I rowsort
SELECT - 64 FROM tab2
----
-64
-64
-64

query I rowsort
SELECT DISTINCT 70 AS col2 FROM tab2
----
70

query I rowsort
SELECT + 94 + + col1 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-2744
-3
-7368

query I rowsort
SELECT DISTINCT + - col1 * col0 + + col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT + 20 * + col0 FROM tab0 AS cor0
----
1780
480
700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9085
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-9085
SELECT ALL col0 * col2 + CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 - col0 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9087
SELECT ALL - - col0 + col1 * CAST( NULL AS SIGNED ) / 75 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9087
SELECT ALL - - col0 + col1 * CAST ( NULL AS INTEGER ) / 75 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9088
SELECT DISTINCT + - col2 DIV + col0 - - col1 AS col2 FROM tab1 AS cor0
----
10
12
8

skipif mysql # not compatible
query I rowsort label-9088
SELECT DISTINCT + - col2 / + col0 - - col1 AS col2 FROM tab1 AS cor0
----
10
12
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-9089
SELECT DISTINCT + + col2 DIV - col0 col0 FROM tab0 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9089
SELECT DISTINCT + + col2 / - col0 col0 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT ALL + col1 * ( col1 ) AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT + col1 + cor0.col1 AS col1 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT col1 * - col1 + + ( + cor0.col2 ) + - 92 AS col2 FROM tab1 AS cor0
----
-135
-165
-714

query I rowsort
SELECT + - col0 + + col2 * + 20 + - col1 * - col2 FROM tab0 AS cor0
----
3474
82
9013

query I rowsort
SELECT DISTINCT cor0.col0 * col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - cor0.col1 + 73 * col0 FROM tab1 AS cor0
----
193
4662
5827

query I rowsort
SELECT ALL - + col0 + - 62 * + 3 FROM tab0 AS cor0
----
-210
-221
-275

query I rowsort
SELECT + col1 * - ( + col1 ) + col2 + - ( + col0 ) FROM tab2 AS cor0
----
-330
-3533
-941

onlyif mysql # use DIV operator for integer division
query I rowsort label-9098
SELECT DISTINCT - - col2 DIV col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-9098
SELECT DISTINCT - - col2 / col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT DISTINCT 34 * + col2 + + cor0.col2 AS col2 FROM tab1 AS cor0
----
1890
1995
3360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 5 col1 FROM tab1 cor0
----
5

query I rowsort
SELECT tab2.col0 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9102
SELECT ALL CAST( NULL AS SIGNED ) + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9102
SELECT ALL CAST ( NULL AS INTEGER ) + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( 3 ) FROM tab1 AS cor0
----
3
3
3

query I rowsort
SELECT ALL col2 + + col0 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT col2 * - col0 + - col0 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT - 50 + col2 AS col2 FROM tab1 AS cor0
----
4
46
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9107
SELECT - col2 DIV col2 + + col1 + - col1 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9107
SELECT - col2 / col2 + + col1 + - col1 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT tab2.col1 + 1 AS col2 FROM tab2
----
18
32
60

query I rowsort
SELECT + col0 * col1 * col0 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT - col2 + 60 * + col2 AS col0 FROM tab2 AS cor0
----
1534
1593
2242

query I rowsort
SELECT cor0.col2 + + ( + col1 * - col2 ) FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT - 69 + - 40 FROM tab2 AS cor0
----
-109
-109
-109

query I rowsort
SELECT - 78 AS col0 FROM tab2 AS cor0
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col0 ) col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT + col0 + - 47 AS col2 FROM tab0 AS cor0
----
-12
-23
42

query I rowsort
SELECT + 13 AS col2 FROM tab1 AS cor0
----
13
13
13

query I rowsort
SELECT + 17 + col0 AS col2 FROM tab1 AS cor0
----
20
81
97

query I rowsort
SELECT 11 * + 85 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to bd8294529329f10e9e8bf7b306307f0e

onlyif mysql # use DIV operator for integer division
query I rowsort label-9119
SELECT ALL 84 DIV + tab2.col1 FROM tab2
----
1
2
4

skipif mysql # not compatible
query I rowsort label-9119
SELECT ALL 84 / + tab2.col1 FROM tab2
----
1
2
4

query I rowsort
SELECT col1 * - 7 FROM tab0 AS cor0
----
-602
-637
-679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9121
SELECT - cor0.col1 - + CAST( NULL AS SIGNED ) * - col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9121
SELECT - cor0.col1 - + CAST ( NULL AS INTEGER ) * - col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - tab0.col1 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT - col0 + + ( 79 ) AS col0 FROM tab2 AS cor0
----
0
1
72

query I rowsort
SELECT col0 * tab0.col0 * col1 AS col0 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT + cor0.col0 - - cor0.col2 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 8a206af99264e378e55b667df888459e

query I rowsort
SELECT - col2 * - col2 * col1 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT ALL + tab2.col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT col1 + col1 * + col2 * col2 + tab2.col2 AS col0 FROM tab2
----
22657
24603
39969

query III rowsort
SELECT DISTINCT * FROM tab2 cor0 WHERE NULL IN ( col0 * col2 )
----

query I rowsort
SELECT + col1 * col2 * + col2 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT ALL - col2 + + col2 * + col2 AS col2 FROM tab1
----
2862
3192
9120

query III rowsort
SELECT ALL * FROM tab1 cor0 WHERE NOT ( - col1 * col1 * + col0 + col1 ) < col1 - + col2 OR NOT NULL >= - col2 + + col1
----

query I rowsort
SELECT ALL tab1.col2 + tab1.col0 + col0 * col2 AS col1 FROM tab1
----
219
3769
7856

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - col0 col1 FROM tab1
----
-29
-74
-93

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT - col1 = NULL
----

query I rowsort
SELECT + col0 + col0 * + col2 FROM tab0
----
70
7387
816

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT BETWEEN NULL AND ( + col2 )
----

query I rowsort
SELECT tab0.col2 + + tab0.col0 * col1 + - col2 AS col1 FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-9139
SELECT DISTINCT col2 DIV + col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-9139
SELECT DISTINCT col2 / + col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT ALL - col0 + col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

query IIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 WHERE NOT NULL < NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9142
SELECT col0 DIV col1 + + col1 + - col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9142
SELECT col0 / col1 + + col1 + - col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col2 - - col2 * col2 AS col1 FROM tab0
----
1122
2
6806

query I rowsort
SELECT ALL col2 - + tab1.col1 * col0 * - col1 AS col2 FROM tab1
----
13616
2082
6457

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col0 + + col2 col1 FROM tab0
----
260
71
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-9146
SELECT DISTINCT col1 DIV - tab2.col0 + + col0 - - col0 col0 FROM tab2
----
10
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9146
SELECT DISTINCT col1 / - tab2.col0 + + col0 - - col0 col0 FROM tab2
----
10
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-9147
SELECT ALL col1 - + col1 DIV + col2 FROM tab0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-9147
SELECT ALL col1 - + col1 / + col2 FROM tab0
----
0
84
90

query I rowsort
SELECT col1 * cor0.col2 - col2 AS col0 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT - - col0 * - col2 * + col2 AS col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL + - col2 * + col1 FROM tab0 cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9151
SELECT DISTINCT - + col0 DIV + col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9151
SELECT DISTINCT - + col0 / + col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - cor0.col0 * - col1 * cor0.col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT - col2 * col0 * cor0.col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 col0 FROM tab0 cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9155
SELECT - col0 + + col0 DIV col2 AS col2 FROM tab1 AS cor0
----
-3
-63
-80

skipif mysql # not compatible
query I rowsort label-9155
SELECT - col0 + + col0 / col2 AS col2 FROM tab1 AS cor0
----
-3
-63
-80

query I rowsort
SELECT col0 * + cor0.col1 * col1 AS col2 FROM tab1 AS cor0
----
13520
2028
6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * + col1 col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE ( NULL ) IN ( + col2 ) OR NOT NULL BETWEEN col0 AND NULL
----

query I rowsort
SELECT + col2 * col0 * col2 AS col1 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT - + col1 * col2 + - col2 * col0 FROM tab0 AS cor0
----
-132
-14760
-3630

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 WHERE NOT NULL = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9162
SELECT ALL - col1 DIV - col1 AS col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9162
SELECT ALL - col1 / - col1 AS col0 FROM tab1
----
1
1
1

query I rowsort
SELECT + - col1 - - col1 * + col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT DISTINCT - + col0 + - col1 * col0 FROM tab1 AS cor0
----
-1120
-704
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-9165
SELECT ALL + - cor0.col2 DIV col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-9165
SELECT ALL + - cor0.col2 / col1 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT - + col1 + + col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL - + col0 * col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9168
SELECT 3 DIV + col2 FROM tab0 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-9168
SELECT 3 / + col2 FROM tab0 AS cor0
----
0
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-9169
SELECT 27 DIV col0 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-9169
SELECT 27 / col0 FROM tab2
----
0
0
3

query I rowsort
SELECT ALL 80 * col2 + - ( + col1 * + col2 + ( col2 ) ) FROM tab1
----
2862
3933
6336

query I rowsort
SELECT DISTINCT - col1 + + col1 * ( col0 * col1 ) FROM tab0 cor0
----
177418
329218
736918

query I rowsort
SELECT - 87 * col0 FROM tab0 AS cor0
----
-2088
-3045
-7743

query I rowsort
SELECT DISTINCT + cor0.col0 * col1 + ( col2 ) + - col0 FROM tab2 AS cor0
----
1302
237
4550

onlyif mysql # use DIV operator for integer division
query I rowsort label-9174
SELECT col2 * 56 DIV cor0.col2 + + col1 * 29 AS col1 FROM tab1 AS cor0
----
346
433
810

skipif mysql # not compatible
query I rowsort label-9174
SELECT col2 * 56 / cor0.col2 + + col1 * 29 AS col1 FROM tab1 AS cor0
----
346
433
810

query I rowsort
SELECT - col1 + ( - col1 ) * - cor0.col1 AS col1 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT - col1 * col1 + - col0 * col0 + 12 FROM tab0 AS cor0
----
-10622
-16190
-7960

onlyif mysql # use DIV operator for integer division
query I rowsort label-9177
SELECT DISTINCT + 6 DIV 20 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
0

skipif mysql # not compatible
query I rowsort label-9177
SELECT DISTINCT + 6 / 20 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
0

query I rowsort
SELECT ALL + + col0 + ( + col1 ) AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + - col0 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9180
SELECT 37 DIV - tab0.col2 AS col0 FROM tab0
----
-1
-37
0

skipif mysql # not compatible
query I rowsort label-9180
SELECT 37 / - tab0.col2 AS col0 FROM tab0
----
-1
-37
0

query I rowsort
SELECT DISTINCT - col2 + + tab1.col2 FROM tab1
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9182
SELECT col0 * + tab0.col1 + - CAST( NULL AS SIGNED ) * 76 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9182
SELECT col0 * + tab0.col1 + - CAST ( NULL AS INTEGER ) * 76 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - col2 ) * col1 + + col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT 1 + - col2 FROM tab1
----
-53
-56
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-9185
SELECT col0 DIV col0 + col0 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-9185
SELECT col0 / col0 + col0 FROM tab0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 60 col1 FROM tab2
----
60
60
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-9187
SELECT col0 DIV + tab0.col2 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-9187
SELECT col0 / + tab0.col2 FROM tab0
----
0
1
35

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( + col2 ) IN ( + col0 )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT col2 < + col0 * col1
----

query I rowsort
SELECT ALL tab2.col2 * + col1 FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND col0 * col1
----

query I rowsort
SELECT DISTINCT col0 - col1 AS col1 FROM tab0
----
-2
-62

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( NULL ) BETWEEN col2 + - col2 AND ( NULL )
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE - col2 <= NULL
----

query I rowsort
SELECT ALL col2 * - col0 * - col1 + col2 FROM tab2
----
119678
51072
5886

query I rowsort
SELECT + tab2.col2 * - col1 + col1 + + col2 FROM tab2
----
-1449
-591
-779

query III rowsort
SELECT * FROM tab0 WHERE + col0 <> NULL
----

query I rowsort
SELECT ALL col0 + col0 * col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT + tab0.col0 + + col0 AS col0 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL - col2 + col1 * col0 FROM tab0
----
2031
3394
8017

query I rowsort
SELECT col1 * + col0 + col2 + - col2 AS col0 FROM tab1
----
1040
640
78

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL NOT IN ( col1 )
----

query I rowsort
SELECT - col0 + - col0 + col1 * col2 FROM tab1
----
1088
1398
442

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 col2 FROM tab0 WHERE NOT NULL <> NULL
----

query III rowsort
SELECT * FROM tab0 WHERE NULL <> NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT + col0 - + col0 * + col2 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT + col1 * + 90 FROM tab1
----
1170
2340
900

query I rowsort
SELECT col0 + ( cor0.col2 ) * - col0 AS col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL - col1 * 39 FROM tab1 cor0
----
-1014
-390
-507

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab2 cor1, tab1 cor2
----
972 values hashing to 75a813ebd5ec5ec2e67a66d0593ff763

query I rowsort
SELECT + - col2 + ( 58 ) FROM tab0 AS cor0
----
-24
25
57

query I rowsort
SELECT + + 20 * cor0.col2 AS col2 FROM tab1 AS cor0
----
1080
1140
1920

query I rowsort
SELECT ALL col2 * 85 * ( + col1 ) FROM tab1
----
106080
119340
48450

query I rowsort
SELECT - col2 * col2 + - ( 96 ) FROM tab1 AS cor0
----
-3012
-3345
-9312

query I rowsort
SELECT - col2 + cor0.col2 * - col2 FROM tab0 AS cor0
----
-1122
-2
-6806

query I rowsort
SELECT - + 77 + - col0 * - cor0.col0 * col0 FROM tab0 cor0
----
13747
42798
704892

query I rowsort
SELECT + - cor0.col2 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT tab2.col2 + 19 AS col0 FROM tab2
----
45
46
57

query I rowsort
SELECT ( col0 ) * - col0 * col2 AS col0 FROM tab2
----
-1323
-158184
-237158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9220
SELECT DISTINCT CAST( NULL AS SIGNED ) + col0 * col1 AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-9220
SELECT DISTINCT CAST ( NULL AS INTEGER ) + col0 * col1 AS col0 FROM tab0
----
NULL

query I rowsort
SELECT tab0.col1 + - tab0.col0 AS col2 FROM tab0
----
2
62
62

query I rowsort
SELECT ALL col2 * - col1 + + col2 FROM tab0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 + ( col2 * col1 ) + + col2 col0 FROM tab0
----
137
2910
7583

query I rowsort
SELECT DISTINCT + col0 + + 53 * - col0 AS col1 FROM tab1
----
-156
-3328
-4160

onlyif mysql # use DIV operator for integer division
query I rowsort label-9225
SELECT 76 DIV col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9225
SELECT 76 / col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL + 78 AS col0 FROM tab0 AS cor0
----
78
78
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-9228
SELECT DISTINCT + col1 + col0 + + ( col1 + col1 ) DIV col2 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-9228
SELECT DISTINCT + col1 + col0 + + ( col1 + col1 ) / col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - + col0 + col0 * - 68 FROM tab0 AS cor0
----
-1656
-2415
-6141

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + cor0.col1 * + col0 col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - + col2 * - col1 + - ( + col1 + + col0 ) * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
7
78
79

query I rowsort
SELECT DISTINCT col1 * col1 + col0 AS col1 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT DISTINCT 11 + + col0 FROM tab2 cor0
----
18
89
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-9235
SELECT + - col1 * - col0 + cor0.col0 DIV cor0.col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-9235
SELECT + - col1 * - col0 + cor0.col0 / cor0.col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - col0 + - ( 84 ) * - col0 FROM tab1 cor0
----
249
5312
6640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * 54 col2 FROM tab2 AS cor0
----
378
4212
4266

query I rowsort
SELECT + + col2 - + col2 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * - col0 col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL + col0 * + 51 AS col2 FROM tab2 cor0
----
357
3978
4029

onlyif mysql # use DIV operator for integer division
query I rowsort label-9241
SELECT + col1 + - col0 * 12 DIV + col1 AS col0 FROM tab0 AS cor0
----
80
83
93

skipif mysql # not compatible
query I rowsort label-9241
SELECT + col1 + - col0 * 12 / + col1 AS col0 FROM tab0 AS cor0
----
80
83
93

query I rowsort
SELECT ALL 2 - + col1 FROM tab0
----
-84
-89
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 - col2 col0 FROM tab2
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-9244
SELECT - 35 DIV + col0 AS col0 FROM tab1
----
-11
0
0

skipif mysql # not compatible
query I rowsort label-9244
SELECT - 35 / + col0 AS col0 FROM tab1
----
-11
0
0

query I rowsort
SELECT ALL 76 * tab2.col2 * - 4 FROM tab2
----
-11552
-7904
-8208

query I rowsort
SELECT - col0 + - 17 * - col0 AS col2 FROM tab0 AS cor0
----
1424
384
560

query I rowsort
SELECT ALL - col1 + - ( col2 ) AS col2 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT ALL col2 * col2 * col2 + col1 AS col0 FROM tab2
----
17635
19714
54889

query I rowsort
SELECT ALL + col1 * + col1 + col2 AS col0 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT ALL - + col0 - col0 * col2 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT + col0 * ( col1 ) + col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL - cor1.col0 AS col0 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT DISTINCT 99 AS col1 FROM tab1, tab2 AS cor0
----
99

query I rowsort
SELECT - cor0.col2 FROM tab0, tab2 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to c569638e8a09ff819458d62ddbde994c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor1.col2 col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT - + ( 23 ) * cor0.col0 AS col2 FROM tab2 AS cor0
----
-161
-1794
-1817

query I rowsort
SELECT col2 * - 81 * + col1 FROM tab1 AS cor0
----
-101088
-113724
-46170

query I rowsort
SELECT - cor0.col2 * + col0 * - col0 AS col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT - + col0 + + col0 * col2 AS col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT + - col1 * col2 - + col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT + 10 - + cor0.col2 FROM tab1 cor0
----
-44
-47
-86

query I rowsort
SELECT + + col0 * col2 + ( col0 ) * + col1 AS col0 FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT - 54 + - col1 FROM tab2 AS cor0
----
-113
-71
-85

query I rowsort
SELECT - - col2 + + col0 - col0 * cor0.col0 FROM tab0 cor0
----
-1189
-519
-7750

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col2 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 88 col2 FROM tab0 cor0
----
88
88
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-9267
SELECT + col1 DIV + col1 - col1 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-9267
SELECT + col1 / + col1 - col1 FROM tab1 AS cor0
----
-12
-25
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9268
SELECT DISTINCT CAST( cor0.col0 AS SIGNED ) * - col2 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-9268
SELECT DISTINCT CAST ( cor0.col0 AS INTEGER ) * - col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ( + 78 ) + - col1 * col2 * - ( - col2 ) + + 72 * col1 AS col2 FROM tab0 AS cor0
----
-605254
-87384
6965

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col2 ) + col2 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col0 + col2 * - col2 FROM tab0 cor0
----
-1113
-36
-6813

query I rowsort
SELECT - cor0.col2 * 22 FROM tab2 AS cor0
----
-572
-594
-836

query I rowsort
SELECT col2 * - 25 + + col1 AS col2 FROM tab1 AS cor0
----
-1324
-1415
-2387

query I rowsort
SELECT DISTINCT - col1 + col1 AS col0 FROM tab1 cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9275
SELECT - CAST( 62 AS SIGNED ) AS col2 FROM tab0 cor0
----
-62
-62
-62

skipif mysql # not compatible
query I rowsort label-9275
SELECT - CAST ( 62 AS INTEGER ) AS col2 FROM tab0 cor0
----
-62
-62
-62

query I rowsort
SELECT ALL + 64 * - col2 - col2 FROM tab1 AS cor0
----
-3510
-3705
-6240

query I rowsort
SELECT ALL col1 + 40 * + col1 AS col2 FROM tab0 AS cor0
----
3526
3731
3977

query I rowsort
SELECT - + cor0.col1 + - col2 * + col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT DISTINCT - + 85 FROM tab0 AS cor0
----
-85

query I rowsort
SELECT 8 * col1 + col1 + + 89 AS col2 FROM tab1 AS cor0
----
179
206
323

query I rowsort
SELECT DISTINCT + 97 AS col1 FROM tab1, tab1 AS cor0
----
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9282
SELECT col0 / - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9282
SELECT col0 / - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * - col2 * 54 AS col2 FROM tab1
----
-157464
-175446
-497664

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - + ( 92 * tab0.col1 ) col0 FROM tab0
----
-7879
-8290
-8923

query I rowsort
SELECT ALL + 8 + - col1 * - col1 AS col0 FROM tab1 AS cor0
----
108
177
684

query I rowsort
SELECT + col1 + - col2 + - col2 AS col2 FROM tab0 AS cor0
----
-73
20
95

query I rowsort
SELECT DISTINCT + ( + 96 ) AS col2 FROM tab1 AS cor0
----
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + 37 col0 FROM tab0 AS cor0
----
123
128
134

query I rowsort
SELECT DISTINCT + 12 * - 80 AS col2 FROM tab0 AS cor0
----
-960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col2 col2 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - col0 col0 FROM tab2 AS cor0
----
-104
-117
-34

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0 CROSS JOIN tab0, tab1, tab1 cor1
----
3645 values hashing to 028fd38910121a0fa7c5b9a24c207cf0

query I rowsort
SELECT ALL - ( - col1 ) + tab0.col0 + + col1 * tab0.col1 FROM tab0
----
7506
8461
9541

query I rowsort
SELECT ALL + col0 + col1 * - col2 + col0 FROM tab0 AS cor0
----
-27
-2790
-7284

query I rowsort
SELECT 22 + col0 AS col2 FROM tab1 AS cor0
----
102
25
86

query I rowsort
SELECT DISTINCT + + 78 * col0 AS col0 FROM tab2 AS cor0
----
546
6084
6162

query I rowsort
SELECT ALL + 96 + tab1.col1 FROM tab1
----
106
109
122

query I rowsort
SELECT ALL + + col1 + + col2 AS col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + 15 + + 87 AS col0 FROM tab2
----
102
102
102

query I rowsort
SELECT ALL + col0 * + tab1.col1 + + col2 + tab1.col2 FROM tab1
----
1232
186
754

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0 CROSS JOIN tab1, tab2, tab1 AS cor1
----
3645 values hashing to db56d052e81a1ceebb4c3aea124670be

query I rowsort
SELECT ALL - + col2 + - 49 + col0 FROM tab2 cor0
----
-69
-8
3

skipif mysql # not compatible
query I rowsort
SELECT ALL + - col0 * CAST ( - col1 AS REAL ) - col0 AS col1 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT - - col1 * - 58 AS col0 FROM tab0 AS cor0
----
-4988
-5278
-5626

query I rowsort
SELECT 50 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

onlyif mysql # use DIV operator for integer division
query I rowsort label-9306
SELECT DISTINCT - tab1.col1 DIV - 66 AS col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-9306
SELECT DISTINCT - tab1.col1 / - 66 AS col2 FROM tab1
----
0

query I rowsort
SELECT DISTINCT ( + 5 ) AS col0 FROM tab0, tab0 AS cor0
----
5

query I rowsort
SELECT DISTINCT cor0.col2 + + tab1.col2 FROM tab1, tab2, tab2 AS cor0
----
9 values hashing to 08980ba33c72425c650f4b0533f5a9d7

query I rowsort
SELECT DISTINCT + col0 * - col2 + - col2 AS col2 FROM tab1 cor0
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT - col2 + 56 FROM tab0 AS cor0
----
-26
23
55

query I rowsort
SELECT ALL + + col2 - col0 * + col1 AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT - cor0.col2 * 85 FROM tab2 AS cor0
----
-2210
-2295
-3230

onlyif mysql # use DIV operator for integer division
query I rowsort label-9313
SELECT DISTINCT - col2 + + cor0.col0 DIV + col0 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-9313
SELECT DISTINCT - col2 + + cor0.col0 / + col0 FROM tab0 AS cor0
----
-32
-81
0

query I rowsort
SELECT ALL + - cor0.col2 * col0 - - cor0.col2 FROM tab1 AS cor0
----
-108
-3591
-7584

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col2 * - CAST ( 18 AS REAL ) + - col0 FROM tab0 AS cor0
----
-1565
-53
-618

query I rowsort
SELECT ALL - 70 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c2a2994a4e94583683ccda2cc098c58f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9317
SELECT DISTINCT col2 + CAST( + col1 AS SIGNED ) * - col1 AS col0 FROM tab1 AS cor0
----
-43
-622
-73

skipif mysql # not compatible
query I rowsort label-9317
SELECT DISTINCT col2 + CAST ( + col1 AS INTEGER ) * - col1 AS col0 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT + cor2.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

query I rowsort
SELECT - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 AS cor2, tab0 AS cor3
----
243 values hashing to 7f0405f8197238fbd342972ef0bcee12

query I rowsort
SELECT + - ( col0 ) - cor0.col1 * ( col0 ) FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL + + 36 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
132
90
93

query I rowsort
SELECT + 0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col2 * col0 + col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT col1 + ( - col2 ) FROM tab1
----
-28
-47
-83

query I rowsort
SELECT ALL - 11 + col2 AS col2 FROM tab1
----
43
46
85

query I rowsort
SELECT + - col0 + + col1 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL - - ( - col2 ) + + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col1 - col0 * + col0 FROM tab2 cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL - 81 * tab1.col2 * - col1 FROM tab1
----
101088
113724
46170

query I rowsort
SELECT ALL + 33 * - col2 AS col1 FROM tab1 AS cor0
----
-1782
-1881
-3168

query I rowsort
SELECT DISTINCT 74 * col0 AS col2 FROM tab2 cor0
----
518
5772
5846

query I rowsort
SELECT + col1 + col2 * + 27 AS col1 FROM tab1 AS cor0
----
1484
1549
2605

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 75 col2 FROM tab2
----
75
75
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-9334
SELECT - 83 DIV - 69 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

skipif mysql # not compatible
query I rowsort label-9334
SELECT - 83 / - 69 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9335
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9335
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - - 41 * col2 FROM tab1 AS cor0
----
2214
2337
3936

query I rowsort
SELECT DISTINCT - col2 + col0 * + 44 FROM tab2 AS cor0
----
281
3406
3438

onlyif mysql # use DIV operator for integer division
query I rowsort label-9338
SELECT + + cor0.col2 DIV + col1 + col0 * col1 + - col2 FROM tab1 AS cor0
----
26
588
951

skipif mysql # not compatible
query I rowsort label-9338
SELECT + + cor0.col2 / + col1 + col0 * col1 + - col2 FROM tab1 AS cor0
----
26
588
951

query I rowsort
SELECT ALL + cor0.col0 + + 7 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 8d0e02b442e609af0d0214bcf4a41b90

query I rowsort
SELECT DISTINCT 34 * col2 AS col0 FROM tab0 AS cor0
----
1122
2788
34

query I rowsort
SELECT DISTINCT 82 FROM tab1 AS cor0
----
82

query I rowsort
SELECT + cor0.col1 + - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 - - col2 * - col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL + col0 - - col1 * 75 FROM tab2 cor0
----
1354
2332
4503

onlyif mysql # use DIV operator for integer division
query I rowsort label-9345
SELECT - + col0 DIV - col2 AS col0 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9345
SELECT - + col0 / - col2 AS col0 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT ALL - col2 * + col0 * col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL - - col2 * 54 FROM tab1 AS cor0
----
2916
3078
5184

query I rowsort
SELECT + col1 + - cor0.col2 * + col2 AS col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT col0 * col2 + - ( - ( + col1 ) ) FROM tab2
----
2087
220
3019

query I rowsort
SELECT - col2 * 29 AS col0 FROM tab1 AS cor0
----
-1566
-1653
-2784

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9351
SELECT DISTINCT 65 + - col0 * CAST( NULL AS SIGNED ) + col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-9351
SELECT DISTINCT 65 + - col0 * CAST ( NULL AS INTEGER ) + col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - col0 * + col1 + col2 AS REAL ) AS col0 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT - 88 * + 0 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 29 * - col1 col0 FROM tab1
----
-290
-377
-754

onlyif mysql # use DIV operator for integer division
query I rowsort label-9355
SELECT ALL - col2 DIV - 35 FROM tab1
----
1
1
2

skipif mysql # not compatible
query I rowsort label-9355
SELECT ALL - col2 / - 35 FROM tab1
----
1
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9356
SELECT + 70 DIV ( col2 ) FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-9356
SELECT + 70 / ( col2 ) FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT + ( 69 ) + col2 FROM tab0 AS cor0
----
102
151
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 - col2 col1 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT col0 * - ( + col2 ) * - col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT - 99 * col0 AS col2 FROM tab2 AS cor0
----
-693
-7722
-7821

query I rowsort
SELECT - 3 + - col0 FROM tab1 cor0
----
-6
-67
-83

query I rowsort
SELECT + col0 * cor0.col1 + col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT 13 * + 53 AS col1 FROM tab2
----
689

query I rowsort
SELECT - ( cor0.col1 ) + cor0.col2 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT col1 * + col0 + - tab2.col1 AS col2 FROM tab2
----
1326
186
4543

query I rowsort
SELECT + col0 + - col1 * + col1 AS col1 FROM tab1 AS cor0
----
-36
-673
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9367
SELECT ALL + col0 * col0 / ( - col1 * CAST( NULL AS SIGNED ) ) + + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9367
SELECT ALL + col0 * col0 / ( - col1 * CAST ( NULL AS INTEGER ) ) + + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9368
SELECT ALL + col1 + + CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9368
SELECT ALL + col1 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * 51 AS col2 FROM tab2 AS cor0
----
1581
3009
867

onlyif mysql # use DIV operator for integer division
query I rowsort label-9370
SELECT col1 DIV + cor0.col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9370
SELECT col1 / + cor0.col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT 55 AS col2 FROM tab1
----
55
55
55

query I rowsort
SELECT DISTINCT col0 + - 43 AS col1 FROM tab2
----
-36
35
36

query I rowsort
SELECT ALL 53 * cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 37deedd72d3c58c8113d18491d6fb749

query I rowsort
SELECT DISTINCT 7 FROM tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2, tab2 AS cor3
----
7

query I rowsort
SELECT col0 * + 0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + ( - 86 ) AS col0 FROM tab0 AS cor0
----
-86
-86
-86

query I rowsort
SELECT 94 * + col1 FROM tab1 AS cor0
----
1222
2444
940

query I rowsort
SELECT - + ( - cor0.col1 ) AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL 69 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT ALL + col2 + + col0 + tab1.col0 AS col1 FROM tab1
----
185
256
60

query I rowsort
SELECT DISTINCT - + col0 * col0 * col1 + + 90 * + cor0.col1 FROM tab0 AS cor0
----
-110095
-41796
-712621

query I rowsort
SELECT ALL + - col2 * - cor0.col0 + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT + - col1 * + col2 AS col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT - cor0.col1 * 31 FROM tab2 AS cor0
----
-1829
-527
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 * col1 col0 FROM tab0
----
-2064
-3395
-8099

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0, tab0, tab0 cor1
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

query I rowsort
SELECT + - col1 * col0 + cor0.col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT - cor0.col0 - + col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT cor0.col1 - cor0.col1 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 5 * ( + col1 ) AS col2 FROM tab0 AS cor0
----
430
455
485

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 4 ) col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT - ( - col2 * 42 ) FROM tab1
----
2268
2394
4032

query I rowsort
SELECT - col0 * - col2 * - ( - 32 ) AS col0 FROM tab0
----
1120
233536
25344

query I rowsort
SELECT DISTINCT ( - col0 ) * col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + + col2 + - col1 * ( + 61 ) + col1 AS col0 FROM tab0 AS cor0
----
-5127
-5378
-5819

query I rowsort
SELECT - + col2 * + 92 AS col1 FROM tab1 AS cor0
----
-4968
-5244
-8832

query I rowsort
SELECT ALL - col2 * - 75 FROM tab1
----
4050
4275
7200

query I rowsort
SELECT + col0 + + col2 * - ( - col1 ) AS col2 FROM tab1 cor0
----
1328
1407
634

query I rowsort
SELECT ( - cor0.col0 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT + col2 * - col2 * + 88 AS col2 FROM tab1 cor0
----
-256608
-285912
-811008

query I rowsort
SELECT DISTINCT - col2 * col1 AS col1 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9402
SELECT ALL + - 77 * col1 + + col2 DIV col1 FROM tab1 AS cor0
----
-2000
-765
-994

skipif mysql # not compatible
query I rowsort label-9402
SELECT ALL + - 77 * col1 + + col2 / col1 FROM tab1 AS cor0
----
-2000
-765
-994

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 4 col2 FROM tab1 AS cor0
----
-4
-4
-4

query I rowsort
SELECT ALL col2 + cor0.col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT 14 + cor0.col1 FROM tab1 AS cor0
----
24
27
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 73 * col0 col1 FROM tab0 AS cor0
----
1752
2555
6497

onlyif mysql # use DIV operator for integer division
query I rowsort label-9407
SELECT ( cor0.col1 ) DIV - col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-9407
SELECT ( cor0.col1 ) / - col2 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT ALL + col0 + + col1 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-9409
SELECT - cor0.col2 DIV - col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-9409
SELECT - cor0.col2 / - col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT DISTINCT + col0 * - 88 FROM tab1 AS cor0
----
-264
-5632
-7040

query I rowsort
SELECT - cor0.col2 * - ( col0 ) FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9412
SELECT DISTINCT + col1 DIV + 29 col0 FROM tab2 cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9412
SELECT DISTINCT + col1 / + 29 col0 FROM tab2 cor0
----
0
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9413
SELECT - col2 DIV - 65 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9413
SELECT - col2 / - 65 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9414
SELECT col0 * col0 DIV 18 col2 FROM tab1 cor0
----
0
227
355

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9414
SELECT col0 * col0 / 18 col2 FROM tab1 cor0
----
0
227
355

onlyif mysql # use DIV operator for integer division
query I rowsort label-9415
SELECT ALL - - col0 DIV - cor0.col1 - + col2 DIV col1 FROM tab2 AS cor0
----
-1
-6
0

skipif mysql # not compatible
query I rowsort label-9415
SELECT ALL - - col0 / - cor0.col1 - + col2 / col1 FROM tab2 AS cor0
----
-1
-6
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9416
SELECT ALL col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9416
SELECT ALL col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 + col0 * + col1 col1 FROM tab2
----
1419
293
4678

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9418
SELECT ALL - + CAST( NULL AS SIGNED ) + - 87 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9418
SELECT ALL - + CAST ( NULL AS INTEGER ) + - 87 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - cor0.col1 + + col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + tab2.col1 * ( col0 ) FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT + - col1 + - col0 AS col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT - col1 * - ( - col2 ) + - col0 AS col2 FROM tab0 AS cor0
----
-132
-2862
-7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9423
SELECT + CAST( NULL AS SIGNED ) + + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9423
SELECT + CAST ( NULL AS INTEGER ) + + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9424
SELECT 86 DIV 62 + tab0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to c86fbf0880dadcf9d3206018ed8a57ad

skipif mysql # not compatible
query I rowsort label-9424
SELECT 86 / 62 + tab0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to c86fbf0880dadcf9d3206018ed8a57ad

query I rowsort
SELECT DISTINCT + tab2.col0 * + col0 * - col2 FROM tab2
----
-1323
-158184
-237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-9426
SELECT + 29 + - 32 DIV col1 FROM tab0
----
29
29
29

skipif mysql # not compatible
query I rowsort label-9426
SELECT + 29 + - 32 / col1 FROM tab0
----
29
29
29

query I rowsort
SELECT ALL ( + 93 * col1 ) FROM tab0
----
7998
8463
9021

onlyif mysql # use DIV operator for integer division
query I rowsort label-9428
SELECT 35 DIV - col2 + col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-9428
SELECT 35 / - col2 + col2 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT - 54 + col2 * - col2 FROM tab0 AS cor0
----
-1143
-55
-6778

query I rowsort
SELECT DISTINCT + col2 * - ( - tab2.col2 ) AS col1 FROM tab2
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-9431
SELECT ALL - - 73 * cor0.col2 + 91 DIV + col0 FROM tab2 AS cor0
----
1899
1984
2775

skipif mysql # not compatible
query I rowsort label-9431
SELECT ALL - - 73 * cor0.col2 + 91 / + col0 FROM tab2 AS cor0
----
1899
1984
2775

query I rowsort
SELECT + 50 FROM tab0
----
50
50
50

query I rowsort
SELECT DISTINCT - - col2 * cor0.col1 + + 76 FROM tab0 AS cor0
----
173
2914
7538

query I rowsort
SELECT - ( + col1 ) * + col0 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT 36 FROM tab0 AS cor0
----
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9436
SELECT DISTINCT col1 * - col2 + CAST( 33 AS SIGNED ) FROM tab2 cor0
----
-1501
-613
-804

skipif mysql # not compatible
query I rowsort label-9436
SELECT DISTINCT col1 * - col2 + CAST ( 33 AS INTEGER ) FROM tab2 cor0
----
-1501
-613
-804

onlyif mysql # use DIV operator for integer division
query I rowsort label-9437
SELECT ALL + - col0 * - col1 + ( - col0 ) DIV col0 FROM tab0 AS cor0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-9437
SELECT ALL + - col0 * - col1 + ( - col0 ) / col0 FROM tab0 AS cor0
----
2063
3394
8098

query I rowsort
SELECT ALL + col0 * - col2 + ( - col2 ) AS col0 FROM tab0 cor0
----
-36
-7380
-825

query I rowsort
SELECT - + 81 * + col0 + + 80 * + col1 FROM tab1 cor0
----
-4384
-5440
1837

query I rowsort
SELECT DISTINCT - + cor0.col2 + - col2 * ( col1 + - cor0.col2 ) * + col1 FROM tab2 cor0
----
-3375
-50648
13528

query I rowsort
SELECT col1 + 30 FROM tab2
----
47
61
89

query I rowsort
SELECT + tab1.col0 * + col2 + - 97 * col1 AS col2 FROM tab1
----
-2360
2678
6419

query I rowsort
SELECT + 92 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c64cb7a81da51f4be0b6906a223e8817

query I rowsort
SELECT DISTINCT - col0 * - col2 + + ( col2 ) + ( tab0.col0 ) AS col0 FROM tab0
----
71
7469
849

query I rowsort
SELECT ALL 25 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT DISTINCT 61 + 41 FROM tab2, tab0 AS cor0
----
102

query I rowsort
SELECT ALL + + col1 * - col0 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-9448
SELECT ALL + col1 * col1 + col1 DIV col2 AS col1 FROM tab0
----
7398
8282
9506

skipif mysql # not compatible
query I rowsort label-9448
SELECT ALL + col1 * col1 + col1 / col2 AS col1 FROM tab0
----
7398
8282
9506

query I rowsort
SELECT DISTINCT - col0 * col2 + + col2 AS col2 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT col1 * ( col0 ) AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT col0 + - col0 * col1 + - col0 AS col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - 31 FROM tab2, tab0, tab2 AS cor0, tab1
----
81 values hashing to cb21a77465f6a7c6b5c4c99bafc9df52

query I rowsort
SELECT DISTINCT + + 82 * - col1 AS col0 FROM tab2 cor0
----
-1394
-2542
-4838

query I rowsort
SELECT ALL + 69 + + 20 AS col1 FROM tab2 AS cor0
----
89
89
89

query I rowsort
SELECT DISTINCT col0 * col2 + + col0 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL + 72 - + col1 FROM tab0 AS cor0
----
-14
-19
-25

query I rowsort
SELECT ALL - 5 * + col2 + col1 FROM tab2 AS cor0
----
-104
-173
-71

query I rowsort
SELECT ( + 50 ) AS col0 FROM tab0 AS cor0
----
50
50
50

query I rowsort
SELECT DISTINCT ( 18 ) - col2 FROM tab2 AS cor0
----
-20
-8
-9

query I rowsort
SELECT ALL + col1 * 24 FROM tab2 cor0
----
1416
408
744

query I rowsort
SELECT ( tab0.col0 ) AS col2 FROM tab0
----
24
35
89

query I rowsort
SELECT ALL col1 - 79 FROM tab0 AS cor0
----
12
18
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * 21 col1 FROM tab2 AS cor0
----
-546
-567
-798

query I rowsort
SELECT - ( col2 ) * col0 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col0 + + col2 * + col1 AS col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT - + 39 * col0 + + col2 * + col1 AS col0 FROM tab2 AS cor0
----
-1508
-2435
564

query I rowsort
SELECT ALL + + col2 * + col1 + cor0.col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + - 58 FROM tab2 AS cor0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT ( col1 ) - + cor0.col1 * cor0.col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL ( col1 ) * col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - + 89 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 924a74d31360fa4301c953b423a4710e

query I rowsort
SELECT cor1.col1 * cor1.col2 AS col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b2e5b025b1c725661248b0f29aaef908

query I rowsort
SELECT ALL col2 * tab1.col0 AS col0 FROM tab1
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col0 FROM tab1
----
8
8
8

query I rowsort
SELECT 39 * col2 AS col1 FROM tab0 AS cor0
----
1287
3198
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9476
SELECT - - CAST( NULL AS SIGNED ) - 22 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9476
SELECT - - CAST ( NULL AS INTEGER ) - 22 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 34 AS col0 FROM tab1 AS cor0
----
-34
-34
-34

query I rowsort
SELECT ALL + 98 * col1 FROM tab2
----
1666
3038
5782

query I rowsort
SELECT - col0 * cor0.col2 * + ( col1 ) AS col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT + 29 FROM tab2 cor0
----
29
29
29

query I rowsort
SELECT ALL + + ( - col1 ) FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9482
SELECT - col2 * CAST( col2 + col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-13448
-2
-2178

skipif mysql # not compatible
query I rowsort label-9482
SELECT - col2 * CAST ( col2 + col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-13448
-2
-2178

query I rowsort
SELECT col0 * 48 AS col0 FROM tab2 AS cor0
----
336
3744
3792

query I rowsort
SELECT col1 * ( - 50 * col0 ) FROM tab0 AS cor0
----
-103200
-169750
-404950

query I rowsort
SELECT col2 * - ( - 83 ) * col2 FROM tab2 AS cor0
----
119852
56108
60507

query I rowsort
SELECT - col2 * ( col1 ) AS col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT + col0 + - cor0.col0 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT col2 * col2 + ( cor0.col0 ) AS col1 FROM tab1 AS cor0
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-9489
SELECT ALL tab1.col0 DIV ( col0 ) AS col1 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9489
SELECT ALL tab1.col0 / ( col0 ) AS col1 FROM tab1
----
1
1
1

query I rowsort
SELECT - col2 + + 97 * 67 * + col2 AS col2 FROM tab2 cor0
----
168948
175446
246924

query I rowsort
SELECT DISTINCT - col1 * - col2 + col0 FROM tab2 AS cor0
----
1612
725
844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * col0 col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + col1 + ( col0 ) * - col1 + - ( - col1 * - col0 ) AS col2 FROM tab1 AS cor0
----
-1270
-130
-2067

query I rowsort
SELECT DISTINCT - col0 + col1 AS col0 FROM tab2 cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * col2 + + col0 col2 FROM tab1 AS cor0
----
165
3712
7760

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-9497
SELECT - + CAST( NULL AS DECIMAL ) + + col2 * cor0.col2 col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9497
SELECT - + CAST ( NULL AS REAL ) + + col2 * cor0.col2 col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 20 AS col0 FROM tab2 AS cor0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT + 72 * - ( - col1 ) AS col2 FROM tab2 AS cor0
----
1224
2232
4248

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 97 * col2 col1 FROM tab1 cor0
----
5238
5529
9312

query I rowsort
SELECT + col0 + - 20 * col1 FROM tab2 AS cor0
----
-1102
-261
-613

query I rowsort
SELECT + ( + col1 ) * - col2 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + 97 AS col1 FROM tab2 AS cor0
----
97
97
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9504
SELECT - 54 DIV col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9504
SELECT - 54 / col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT - col2 * col0 * - col0 - col0 AS col1 FROM tab2
----
1316
158106
237079

query I rowsort
SELECT DISTINCT 81 AS col2 FROM tab0, tab2 AS cor0
----
81

query I rowsort
SELECT DISTINCT + 18 + cor0.col1 * + col1 FROM tab2 AS cor0
----
307
3499
979

onlyif mysql # use DIV operator for integer division
query I rowsort label-9508
SELECT - col2 + + col2 DIV col0 + col2 AS col2 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-9508
SELECT - col2 + + col2 / col0 + col2 AS col2 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT ALL - ( col2 ) * ( - 60 ) + + col0 FROM tab1 cor0
----
3243
3484
5840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9510
SELECT - col2 * - col0 * CAST( col0 * col2 AS SIGNED ) + - col0 + - col1 AS col1 FROM tab2 AS cor0
----
35683
4112647
9011908

skipif mysql # not compatible
query I rowsort label-9510
SELECT - col2 * - col0 * CAST ( col0 * col2 AS INTEGER ) + - col0 + - col1 AS col1 FROM tab2 AS cor0
----
35683
4112647
9011908

query I rowsort
SELECT - + col0 * - col2 + - col1 * + col0 AS col2 FROM tab0 AS cor0
----
-1272
-3360
-801

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col1 col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL + cor0.col2 * cor0.col1 * + 14 AS col1 FROM tab1 AS cor0
----
17472
19656
7980

query I rowsort
SELECT ALL 29 FROM tab1
----
29
29
29

query I rowsort
SELECT ALL + col2 * 82 FROM tab1 AS cor0
----
4428
4674
7872

query I rowsort
SELECT + cor0.col1 * + col0 AS col2 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT - col1 + col2 * + col1 FROM tab0
----
0
2752
7371

query I rowsort
SELECT + tab1.col1 - + col1 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 * - tab0.col2 FROM tab0, tab2, tab0 AS cor0
----
9 values hashing to 38ae4ab6a8fdfcd855d57a73fb99e326

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 WHERE NULL NOT IN ( col2 + col2 ) OR NULL <= - col0 * + col0 + col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col0 * + col0 col0 FROM tab0
----
1322
662
8012

query I rowsort
SELECT DISTINCT col0 * tab1.col0 AS col2 FROM tab1
----
4096
6400
9

query I rowsort
SELECT + col1 * - col2 * col0 + col0 AS col1 FROM tab1
----
-36416
-4209
-99760

query I rowsort
SELECT ALL col1 + col0 + cor0.col2 AS col1 FROM tab2 cor0
----
134
163
65

query I rowsort
SELECT ALL + + col1 + col2 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + - col1 * + cor0.col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT col2 FROM tab0 WHERE ( NULL ) = ( col0 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) BETWEEN - col2 AND ( NULL )
----

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL IN ( - col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9530
SELECT DISTINCT + + cor0.col0 DIV col1 + col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-9530
SELECT DISTINCT + + cor0.col0 / col1 + col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - + col0 + col0 * col1 - + col2 AS col1 FROM tab2 AS cor0
----
1226
183
4498

query I rowsort
SELECT ALL - + cor0.col1 * - col2 + col1 * col2 FROM tab2 cor0
----
1292
1674
3068

query I rowsort
SELECT DISTINCT - + col2 + - col2 + col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - col0 * + col1 + + col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL - col2 + - col0 * + col1 + col0 AS col1 FROM tab2
----
-1302
-237
-4550

query I rowsort
SELECT DISTINCT + 36 * - col0 AS col2 FROM tab2 AS cor0
----
-252
-2808
-2844

query I rowsort
SELECT + col1 * cor0.col1 + + col2 + col1 AS col2 FROM tab1 AS cor0
----
167
278
756

query I rowsort
SELECT 96 * col1 AS col0 FROM tab2 AS cor0
----
1632
2976
5664

onlyif mysql # use DIV operator for integer division
query I rowsort label-9539
SELECT + 47 DIV + col0 + + col1 FROM tab2 cor0
----
17
37
59

skipif mysql # not compatible
query I rowsort label-9539
SELECT + 47 / + col0 + + col1 FROM tab2 cor0
----
17
37
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-9540
SELECT + col1 DIV + col2 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9540
SELECT + col1 / + col2 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * col2 col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + - ( + col2 ) * col0 - + col2 FROM tab0 cor0
----
-36
-7380
-825

onlyif mysql # use DIV operator for integer division
query I rowsort label-9543
SELECT - 10 DIV + col1 + col1 AS col0 FROM tab1 AS cor0
----
13
26
9

skipif mysql # not compatible
query I rowsort label-9543
SELECT - 10 / + col1 + col1 AS col0 FROM tab1 AS cor0
----
13
26
9

query I rowsort
SELECT ALL - col2 + col2 * col1 * - col0 AS col1 FROM tab2 AS cor0
----
-119678
-51072
-5886

query I rowsort
SELECT ALL 76 * col2 AS col2 FROM tab1 cor0
----
4104
4332
7296

query I rowsort
SELECT ALL + + col0 * col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - - cor0.col0 + - col2 * col0 + col2 AS col2 FROM tab2 cor0
----
-155
-1924
-2885

query I rowsort
SELECT DISTINCT col0 * - col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + col0 + cor0.col2 * col0 FROM tab0 AS cor0
----
70
7387
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL + col0 + - col1 + - col0 * + col2 AS col2 FROM tab2 AS cor0
----
-2009
-213
-2940

query I rowsort
SELECT DISTINCT + + cor0.col2 * cor0.col2 * col0 FROM tab2 AS cor0
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-9553
SELECT ALL + + cor0.col1 DIV col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-9553
SELECT ALL + + cor0.col1 / col2 FROM tab0 AS cor0
----
1
2
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9554
SELECT DISTINCT - col2 + col0 + col2 DIV col0 FROM tab2
----
-17
41
52

skipif mysql # not compatible
query I rowsort label-9554
SELECT DISTINCT - col2 + col0 + col2 / col0 FROM tab2
----
-17
41
52

query I rowsort
SELECT DISTINCT - col2 * cor0.col0 + - col0 FROM tab0 AS cor0
----
-70
-7387
-816

onlyif mysql # use DIV operator for integer division
query I rowsort label-9556
SELECT - - col1 + col0 DIV + col0 col1 FROM tab0 AS cor0
----
87
92
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9556
SELECT - - col1 + col0 / + col0 col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT DISTINCT - ( col1 ) * + col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL col0 * col1 - col0 FROM tab2
----
1264
210
4524

query III rowsort
SELECT ALL * FROM tab2 WHERE col0 > col2
----
78
59
26
79
17
38

query I rowsort
SELECT DISTINCT col0 - col2 * col0 AS col1 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT col2 - + col1 AS col0 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL tab0.col0 + - col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - tab1.col0 * + col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT + col2 + - col0 + + col2 * col2 * - col2 AS col2 FROM tab0
----
-35
-35928
-551375

query I rowsort
SELECT ALL + col2 * tab0.col2 AS col2 FROM tab0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-9566
SELECT + col2 DIV + col2 + col0 DIV col2 FROM tab1
----
1
1
2

skipif mysql # not compatible
query I rowsort label-9566
SELECT + col2 / + col2 + col0 / col2 FROM tab1
----
1
1
2

query I rowsort
SELECT col0 * tab0.col1 * + col2 AS col1 FROM tab0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-9568
SELECT ALL + col0 DIV + col1 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-9568
SELECT ALL + col0 / + col1 FROM tab1
----
0
6
6

query I rowsort
SELECT - tab2.col1 * - col1 * - col1 AS col0 FROM tab2
----
-205379
-29791
-4913

onlyif mysql # use DIV operator for integer division
query I rowsort label-9570
SELECT DISTINCT - col0 DIV col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-9570
SELECT DISTINCT - col0 / col2 FROM tab0
----
-1
-35
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9571
SELECT DISTINCT + col0 DIV - col2 AS col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-9571
SELECT DISTINCT + col0 / - col2 AS col2 FROM tab0
----
-1
-35
0

query I rowsort
SELECT ALL tab2.col2 / + col2 FROM tab2 WHERE NOT NULL BETWEEN ( NULL ) AND col0
----

query I rowsort
SELECT DISTINCT - tab2.col2 + col1 FROM tab2
----
-21
33
4

query III rowsort
SELECT * FROM tab0 WHERE ( col0 ) < ( - col1 * col2 + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9575
SELECT col1 + col2 DIV col2 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-9575
SELECT col1 + col2 / col2 FROM tab1
----
11
14
27

query I rowsort
SELECT - tab2.col2 AS col2 FROM tab2 WHERE col2 = NULL
----

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) NOT IN ( - tab0.col1 )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT ( tab2.col0 ) IN ( - col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT - col0 - + col2 AS col2 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT col2 * col1 * col1 AS col1 FROM tab1
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-9581
SELECT - col1 DIV + col0 col2 FROM tab0 cor0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9581
SELECT - col1 / + col0 col2 FROM tab0 cor0
----
-1
-2
-3

query I rowsort
SELECT - col1 + + col0 AS col1 FROM tab2
----
-24
19
62

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL IN ( - col2 / col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9584
SELECT + col0 + col2 DIV col0 FROM tab1
----
21
64
81

skipif mysql # not compatible
query I rowsort label-9584
SELECT + col0 + col2 / col0 FROM tab1
----
21
64
81

query I rowsort
SELECT DISTINCT - col0 + tab1.col0 AS col0 FROM tab1
----
0

query I rowsort
SELECT - tab1.col0 * + col2 * + col2 AS col2 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT + col1 AS col0 FROM tab1 WHERE NOT + col0 * col0 * + col1 + col0 NOT BETWEEN + col0 AND col1
----

query I rowsort
SELECT col1 - col1 * col1 * - col0 AS col1 FROM tab0 WHERE NOT ( NULL ) IN ( - col1 )
----

query I rowsort
SELECT DISTINCT - col2 * + col1 FROM tab2
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col1 - col1 col2 FROM tab1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 + - tab0.col1 + + col0 col1 FROM tab0
----
-2126
-3457
-8101

query I rowsort
SELECT - col2 + col2 + col0 * - col1 FROM tab0 WHERE NOT ( NULL ) IN ( col1 )
----

query I rowsort
SELECT ALL + col1 + - col0 + col1 AS col1 FROM tab0
----
148
159
93

query I rowsort
SELECT DISTINCT + col1 + + col1 * col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL col1 * col0 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT col2 - + cor0.col0 * col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL - col2 * tab1.col1 AS col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - col2 * + tab0.col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT col1 + - col1 - col0 AS col2 FROM tab2 WHERE ( NULL ) > ( NULL )
----

query I rowsort
SELECT ALL col0 * + col2 + + col2 * + tab2.col0 FROM tab2
----
378
4056
6004

query IIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 WHERE NOT NULL <> NULL
----

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to d6a6e32c6adcc8525ed3eb7827781237

query I rowsort
SELECT - - 46 * + col1 FROM tab1 cor0
----
1196
460
598

query I rowsort
SELECT ALL - - col1 * col2 + col0 AS col2 FROM tab0 AS cor0
----
132
2862
7551

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab0 cor1, tab0, tab0 AS cor2
----
3645 values hashing to db9b93cf4fdd5de4106f0487a66ce0a5

onlyif mysql # use DIV operator for integer division
query I rowsort label-9606
SELECT DISTINCT col2 * tab2.col2 DIV + 21 FROM tab2
----
32
34
68

skipif mysql # not compatible
query I rowsort label-9606
SELECT DISTINCT col2 * tab2.col2 / + 21 FROM tab2
----
32
34
68

query I rowsort
SELECT + ( - cor0.col1 ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - col0 * 81 FROM tab2 AS cor0
----
-567
-6318
-6399

query I rowsort
SELECT ALL - 90 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9610
SELECT ALL + + CAST( NULL AS SIGNED ) + col1 + col1 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-9610
SELECT ALL + + CAST ( NULL AS INTEGER ) + col1 + col1 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 28 * col1 AS col0 FROM tab0 cor0
----
2408
2548
2716

query I rowsort
SELECT + col2 + - 86 FROM tab0 AS cor0
----
-4
-53
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9613
SELECT col2 DIV col1 + - tab2.col2 * - 45 AS col1 FROM tab2
----
1170
1215
1712

skipif mysql # not compatible
query I rowsort label-9613
SELECT col2 / col1 + - tab2.col2 * - 45 AS col1 FROM tab2
----
1170
1215
1712

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 60 - - col2 col0 FROM tab2
----
447
4706
4778

query I rowsort
SELECT ALL - col2 * - col1 AS col0 FROM tab2
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-9616
SELECT DISTINCT 16 DIV col1 AS col2 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-9616
SELECT DISTINCT 16 / col1 AS col2 FROM tab2
----
0

query I rowsort
SELECT + 2 * col1 AS col0 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT + - col1 + cor0.col2 * - col1 FROM tab0 cor0
----
-194
-2924
-7553

query I rowsort
SELECT + ( col2 ) + col1 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + + 47 + - col1 * - 1 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
47
47
47

query I rowsort
SELECT + ( - col0 * 68 ) + col2 FROM tab1
----
-150
-4295
-5344

query I rowsort
SELECT DISTINCT + - col1 + + col0 * col1 * + 4 FROM tab2 AS cor0
----
18349
5355
837

query I rowsort
SELECT - 41 + col0 * 90 * - 89 FROM tab2 AS cor0
----
-56111
-624821
-632831

query I rowsort
SELECT ALL + ( + cor0.col2 ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT 77 - - col2 * col1 FROM tab2 AS cor0
----
1611
723
914

query I rowsort
SELECT DISTINCT + col0 * col2 + col0 - col2 FROM tab1 AS cor0
----
111
3655
7664

query I rowsort
SELECT 18 * + col0 + col2 AS col2 FROM tab0 AS cor0
----
1684
465
631

query I rowsort
SELECT ALL + + col1 + col2 AS col2 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9630
SELECT ALL cor0.col1 + col0 * CAST( col2 + + col2 AS SIGNED ) FROM tab0 AS cor0
----
14687
167
1670

skipif mysql # not compatible
query I rowsort label-9630
SELECT ALL cor0.col1 + col0 * CAST ( col2 + + col2 AS INTEGER ) FROM tab0 AS cor0
----
14687
167
1670

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - col0 * + col0 col0 FROM tab2 AS cor0
----
-343
-474552
-493039

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9632
SELECT - col0 * - CAST( NULL AS SIGNED ) / cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9632
SELECT - col0 * - CAST ( NULL AS INTEGER ) / cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + - col1 + col1 FROM tab2
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 + - 30 * col0 col1 FROM tab1 AS cor0
----
-1820
-2231
586

query I rowsort
SELECT col2 + + 85 * 85 AS col1 FROM tab1 AS cor0
----
7279
7282
7321

query I rowsort
SELECT DISTINCT + - col2 + - col1 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT - + col2 + col2 * col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT col0 * + cor0.col2 + + col2 - col0 * - col0 FROM tab2 AS cor0
----
265
8138
9281

onlyif mysql # use DIV operator for integer division
query I rowsort label-9639
SELECT - + col2 DIV col1 + + col0 col1 FROM tab2 AS cor0
----
7
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9639
SELECT - + col2 / col1 + + col0 col1 FROM tab2 AS cor0
----
7
77
78

query I rowsort
SELECT + 99 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT + 19 + col2 * + col1 AS col2 FROM tab1 AS cor0
----
1267
1423
589

query I rowsort
SELECT + col1 * col1 * col1 AS col2 FROM tab0 cor0
----
636056
753571
912673

onlyif mysql # use DIV operator for integer division
query I rowsort label-9643
SELECT DISTINCT col2 DIV ( col2 ) AS col1 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-9643
SELECT DISTINCT col2 / ( col2 ) AS col1 FROM tab0
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9644
SELECT col1 DIV + ( 87 ) AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9644
SELECT col1 / + ( 87 ) AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT + 91 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT - col0 * + 85 FROM tab1
----
-255
-5440
-6800

query I rowsort
SELECT ALL col1 * + 70 AS col2 FROM tab1
----
1820
700
910

query I rowsort
SELECT ALL - col2 * 47 - + col0 * + col0 * col1 FROM tab0 cor0
----
-118872
-51087
-724665

query I rowsort
SELECT DISTINCT - col1 * col0 + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + col2 + col0 * - cor0.col0 + col2 AS col1 FROM tab1 AS cor0
----
-3982
-6208
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 24 col2 FROM tab0
----
-24
-24
-24

query I rowsort
SELECT ALL 1 + col0 * ( - col2 ) AS col2 FROM tab0
----
-34
-7297
-791

query I rowsort
SELECT DISTINCT - 44 + tab1.col2 * col1 * - tab1.col0 AS col2 FROM tab1
----
-36524
-4256
-99884

query I rowsort
SELECT + - col2 + + col2 * - 66 AS col0 FROM tab1 AS cor0
----
-3618
-3819
-6432

query I rowsort
SELECT DISTINCT - + col0 + - col0 AS col2 FROM tab0 AS cor0
----
-178
-48
-70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9656
SELECT + col2 + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9656
SELECT + col2 + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + ( col0 + col1 ) col2 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT + - cor0.col2 + + 47 FROM tab1 AS cor0
----
-10
-49
-7

query I rowsort
SELECT ALL + col0 * - 15 AS col0 FROM tab0 AS cor0
----
-1335
-360
-525

onlyif mysql # use DIV operator for integer division
query I rowsort label-9660
SELECT ( - col0 ) DIV - ( tab2.col1 ) + col0 * 71 * col2 AS col1 FROM tab2
----
13419
143989
213146

skipif mysql # not compatible
query I rowsort label-9660
SELECT ( - col0 ) / - ( tab2.col1 ) + col0 * 71 * col2 AS col1 FROM tab2
----
13419
143989
213146

onlyif mysql # use DIV operator for integer division
query I rowsort label-9661
SELECT 51 + col1 DIV + col2 - 5 AS col0 FROM tab0
----
143
47
48

skipif mysql # not compatible
query I rowsort label-9661
SELECT 51 + col1 / + col2 - 5 AS col0 FROM tab0
----
143
47
48

query I rowsort
SELECT DISTINCT - tab1.col1 + tab1.col0 AS col1 FROM tab1
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-9663
SELECT - col0 + - col0 DIV - 9 AS col1 FROM tab0
----
-22
-32
-80

skipif mysql # not compatible
query I rowsort label-9663
SELECT - col0 + - col0 / - 9 AS col1 FROM tab0
----
-22
-32
-80

query I rowsort
SELECT DISTINCT + col1 + + tab1.col1 AS col2 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL tab1.col1 + col0 * - col0 AS col1 FROM tab1
----
-4086
-6387
17

query I rowsort
SELECT ALL cor1.col1 * cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 51855bb230a34802a628192d3e332a79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9667
SELECT DISTINCT - col0 * + CAST( NULL AS SIGNED ) / 92 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9667
SELECT DISTINCT - col0 * + CAST ( NULL AS INTEGER ) / 92 FROM tab1 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9668
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-9668
SELECT ALL - - col2 + CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 * 73 FROM tab2 cor0
----
-1898
-1971
-2774

query I rowsort
SELECT ALL + - col1 * - 35 + col2 FROM tab0 AS cor0
----
3043
3267
3396

query I rowsort
SELECT + col2 * - col0 + cor0.col2 * col0 AS col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL col1 + + 92 AS col2 FROM tab1 AS cor0
----
102
105
118

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9673
SELECT DISTINCT + - col2 + CAST( + cor0.col0 AS SIGNED ) AS col1 FROM tab1 cor0
----
-16
-51
7

skipif mysql # not compatible
query I rowsort label-9673
SELECT DISTINCT + - col2 + CAST ( + cor0.col0 AS INTEGER ) AS col1 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL - - col2 + - ( col1 + col2 ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - col0 + col1 * 21 FROM tab0 AS cor0
----
1782
1822
2002

query I rowsort
SELECT DISTINCT + cor0.col1 + col0 * + col2 AS col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT col2 + - 23 * col1 - ( tab0.col0 + tab0.col1 * col0 ) FROM tab0
----
-10199
-4033
-5660

onlyif mysql # use DIV operator for integer division
query I rowsort label-9678
SELECT DISTINCT 65 DIV + ( tab0.col0 ) - 68 AS col1 FROM tab0
----
-66
-67
-68

skipif mysql # not compatible
query I rowsort label-9678
SELECT DISTINCT 65 / + ( tab0.col0 ) - 68 AS col1 FROM tab0
----
-66
-67
-68

query I rowsort
SELECT + cor0.col0 * col0 * col0 FROM tab2 AS cor0
----
343
474552
493039

query I rowsort
SELECT DISTINCT + 75 * col0 * col0 FROM tab0 AS cor0
----
43200
594075
91875

query I rowsort
SELECT ALL + + 8 AS col1 FROM tab2 cor0
----
8
8
8

query I rowsort
SELECT ALL + 52 + - col1 * - col2 FROM tab2
----
1586
698
889

query I rowsort
SELECT + col1 + tab0.col1 AS col2 FROM tab0
----
172
182
194

query I rowsort
SELECT ALL 6 + col1 AS col0 FROM tab0
----
103
92
97

query I rowsort
SELECT - ( ( - cor0.col1 ) ) * - cor1.col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 29760b2f582ecfa8189eb18d08ead3fd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col1 * - col0 col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL 29 AS col0 FROM tab1, tab2 cor0, tab0 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

query I rowsort
SELECT DISTINCT + + 50 + col2 FROM tab0 AS cor0
----
132
51
83

query I rowsort
SELECT - col1 * col1 + 99 * + col1 FROM tab0 AS cor0
----
1118
194
728

query I rowsort
SELECT ALL + ( - cor0.col0 ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT - - 87 FROM tab2 cor0
----
87
87
87

query I rowsort
SELECT DISTINCT + ( - col1 ) + - col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL 26 + - cor0.col1 FROM tab2 AS cor0
----
-33
-5
9

query I rowsort
SELECT + ( cor0.col0 ) + ( + 59 ) AS col1 FROM tab2 AS cor0
----
137
138
66

query I rowsort
SELECT DISTINCT cor0.col0 * - col2 + col0 AS col1 FROM tab1 AS cor0
----
-159
-3584
-7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9696
SELECT cor0.col2 * cor0.col1 + CAST( - col2 + col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-9696
SELECT cor0.col2 * cor0.col1 + CAST ( - col2 + col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - col1 * - col2 FROM tab2 cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-9698
SELECT - + cor0.col2 - col2 DIV 76 FROM tab1 AS cor0
----
-54
-57
-97

skipif mysql # not compatible
query I rowsort label-9698
SELECT - + cor0.col2 - col2 / 76 FROM tab1 AS cor0
----
-54
-57
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + cor0.col2 * 61 col1 FROM tab0 AS cor0
----
1980
4920
60

query I rowsort
SELECT DISTINCT - - 46 * col2 FROM tab0 AS cor0
----
1518
3772
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-9701
SELECT ALL cor0.col1 DIV - col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-9701
SELECT ALL cor0.col1 / - col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 AS col0 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT - cor0.col1 + 37 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to aae0167ec630cf67cf742ea4eb0683f3

query I rowsort
SELECT DISTINCT + + col1 * 58 + - col0 * - 58 * + col2 FROM tab1 AS cor0
----
10904
212164
446194

onlyif mysql # use DIV operator for integer division
query I rowsort label-9705
SELECT ALL + - 50 * col0 DIV + col0 FROM tab1 AS cor0
----
-50
-50
-50

skipif mysql # not compatible
query I rowsort label-9705
SELECT ALL + - 50 * col0 / + col0 FROM tab1 AS cor0
----
-50
-50
-50

query I rowsort
SELECT DISTINCT - - col1 + - col1 FROM tab0 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9707
SELECT 5 + + cor0.col1 DIV 26 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 500002c30d80cbd2fb4d9536749aa2f6

skipif mysql # not compatible
query I rowsort label-9707
SELECT 5 + + cor0.col1 / 26 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 500002c30d80cbd2fb4d9536749aa2f6

query I rowsort
SELECT ALL - 89 FROM tab1 cor0
----
-89
-89
-89

query I rowsort
SELECT ALL + 68 + col1 * col2 * col2 FROM tab0 AS cor0
----
165
611952
93722

onlyif mysql # use DIV operator for integer division
query I rowsort label-9710
SELECT DISTINCT + + col0 + col2 DIV cor0.col1 AS col1 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-9710
SELECT DISTINCT + + col0 + col2 / cor0.col1 AS col1 FROM tab1 AS cor0
----
5
69
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9711
SELECT ALL - col0 + - CAST( NULL AS SIGNED ) col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9711
SELECT ALL - col0 + - CAST ( NULL AS INTEGER ) col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 9 * col1 FROM tab1 AS cor0
----
117
234
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-9713
SELECT + ( - 3 ) + - col0 DIV ( + col0 ) FROM tab0 AS cor0
----
-4
-4
-4

skipif mysql # not compatible
query I rowsort label-9713
SELECT + ( - 3 ) + - col0 / ( + col0 ) FROM tab0 AS cor0
----
-4
-4
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-9714
SELECT DISTINCT + - CAST( 65 AS SIGNED ) * col2 DIV + col2 FROM tab0 AS cor0
----
-65

skipif mysql # not compatible
query I rowsort label-9714
SELECT DISTINCT + - CAST ( 65 AS INTEGER ) * col2 / + col2 FROM tab0 AS cor0
----
-65

query I rowsort
SELECT ALL col2 * 6 + - col2 AS col1 FROM tab0 AS cor0
----
165
410
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 65 + 0 col1 FROM tab2 AS cor0
----
-65
-65
-65

query I rowsort
SELECT ALL 87 * - ( - col1 ) FROM tab2
----
1479
2697
5133

onlyif mysql # use DIV operator for integer division
query I rowsort label-9718
SELECT + - 6 DIV + col0 FROM tab1 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-9718
SELECT + - 6 / + col0 FROM tab1 AS cor0
----
-2
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9719
SELECT + + col0 + + col1 DIV col0 AS col0 FROM tab2 AS cor0
----
11
78
79

skipif mysql # not compatible
query I rowsort label-9719
SELECT + + col0 + + col1 / col0 AS col0 FROM tab2 AS cor0
----
11
78
79

query I rowsort
SELECT ALL 94 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9721
SELECT + CAST( ( col2 ) AS SIGNED ) FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-9721
SELECT + CAST ( ( col2 ) AS INTEGER ) FROM tab0
----
1
33
82

query I rowsort
SELECT col0 * - 38 + + cor0.col0 FROM tab0 AS cor0
----
-1295
-3293
-888

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to d222ba302bd1ddd1c8b2ddf1a4d0b07a

query I rowsort
SELECT + col2 + 19 FROM tab0 AS cor0
----
101
20
52

query I rowsort
SELECT cor0.col2 + - col2 * + col0 + + col1 FROM tab2 cor0
----
-131
-1943
-2947

query I rowsort
SELECT col2 + + col1 * 64 + - col0 * + col1 AS col1 FROM tab2 cor0
----
-217
-800
1794

query I rowsort
SELECT + col0 + col1 + + col2 AS col2 FROM tab0 AS cor0
----
133
143
262

onlyif mysql # use DIV operator for integer division
query I rowsort label-9728
SELECT ALL - col1 DIV col0 + cor0.col0 AS col1 FROM tab1 AS cor0
----
-5
64
80

skipif mysql # not compatible
query I rowsort label-9728
SELECT ALL - col1 / col0 + cor0.col0 AS col1 FROM tab1 AS cor0
----
-5
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9729
SELECT - + CAST( NULL AS SIGNED ) * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9729
SELECT - + CAST ( NULL AS INTEGER ) * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9730
SELECT col0 * + CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9730
SELECT col0 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 98 FROM tab1, tab2 cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT ALL - 83 + col1 - col1 FROM tab0 AS cor0
----
-83
-83
-83

query I rowsort
SELECT + ( cor0.col0 ) * ( col2 ) FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + 64 * - col0 + + col1 + + col0 * col0 FROM tab0
----
-874
-918
2316

query I rowsort
SELECT 38 + cor0.col1 * + col0 FROM tab2 AS cor0
----
1381
255
4640

query I rowsort
SELECT + col0 * col2 + ( ( - col2 ) ) FROM tab2 cor0
----
162
2002
2964

query I rowsort
SELECT col0 * + col1 * + col0 FROM tab2
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-9738
SELECT - - col0 + + ( 42 ) + col2 DIV ( + col1 ) FROM tab2 cor0
----
120
123
49

skipif mysql # not compatible
query I rowsort label-9738
SELECT - - col0 + + ( 42 ) + col2 / ( + col1 ) FROM tab2 cor0
----
120
123
49

query I rowsort
SELECT DISTINCT + - col0 * col2 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT col2 * + ( col0 * - cor0.col2 + ( - col1 ) ) AS col2 FROM tab0 AS cor0
----
-132
-28974
-605898

query I rowsort
SELECT ALL + col1 * + ( ( - col2 ) ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - col0 * - 97 + + 25 * - col0 + col1 FROM tab1 AS cor0
----
242
4618
5773

query I rowsort
SELECT - 45 FROM tab1, tab1 cor0
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT ALL col2 + col1 * col1 AS col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT - + col2 + + 71 * col1 FROM tab1 cor0
----
1792
653
827

query I rowsort
SELECT DISTINCT - 37 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + - 90 col1 FROM tab2
----
-31
-59
-73

query I rowsort
SELECT ALL tab2.col1 + + col0 * - col2 AS col0 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT - col0 - + ( 44 + col0 ) AS col2 FROM tab2
----
-200
-202
-58

query I rowsort
SELECT - col0 + ( + col2 ) AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL + tab0.col0 * + tab0.col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT + - col2 + + 30 * col0 + - col2 AS col0 FROM tab2 cor0
----
156
2288
2294

query I rowsort
SELECT + col2 * 40 * - col0 - + col2 * 68 FROM tab1 AS cor0
----
-10152
-149796
-313728

query I rowsort
SELECT ALL col2 * - 33 AS col0 FROM tab0 AS cor0
----
-1089
-2706
-33

query I rowsort
SELECT DISTINCT col1 * - col1 * + ( - col0 ) + col1 + col1 FROM tab0
----
177676
329509
737191

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9756
SELECT DISTINCT + CAST( NULL AS SIGNED ) col0 FROM tab2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9756
SELECT DISTINCT + CAST ( NULL AS INTEGER ) col0 FROM tab2
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9757
SELECT DISTINCT CAST( 87 * + col0 AS SIGNED ) FROM tab2
----
609
6786
6873

skipif mysql # not compatible
query I rowsort label-9757
SELECT DISTINCT CAST ( 87 * + col0 AS INTEGER ) FROM tab2
----
609
6786
6873

query I rowsort
SELECT DISTINCT 61 + + col0 AS col0 FROM tab1 AS cor0
----
125
141
64

query I rowsort
SELECT + 77 AS col0 FROM tab0
----
77
77
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9760
SELECT DISTINCT CAST( NULL AS SIGNED ) * ( col0 ) AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-9760
SELECT DISTINCT CAST ( NULL AS INTEGER ) * ( col0 ) AS col1 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 col2 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT - 37 + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 487a95869370133d72caf183e595df6f

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + - col2 + + cor0.col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT 91 * cor0.col2 - 64 * + col0 FROM tab1 AS cor0
----
1091
3616
4722

query I rowsort
SELECT - 76 + col2 AS col2 FROM tab1 cor0
----
-19
-22
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-9767
SELECT ALL 98 * col2 DIV col0 AS col2 FROM tab1 AS cor0
----
117
1764
87

skipif mysql # not compatible
query I rowsort label-9767
SELECT ALL 98 * col2 / col0 AS col2 FROM tab1 AS cor0
----
117
1764
87

query I rowsort
SELECT + 95 + col1 AS col0 FROM tab0 AS cor0
----
181
186
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) * + col0 - + col0 col2 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT - ( col2 ) + + col1 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + col1 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + 76 AS col1 FROM tab2
----
76
76
76

query I rowsort
SELECT + ( col2 ) + - col1 + + 92 * - tab2.col1 AS col0 FROM tab2
----
-1543
-2856
-5461

query I rowsort
SELECT - col2 * + 18 FROM tab2
----
-468
-486
-684

query I rowsort
SELECT DISTINCT 85 * - col2 + col2 AS col2 FROM tab2
----
-2184
-2268
-3192

onlyif mysql # use DIV operator for integer division
query I rowsort label-9776
SELECT ALL col1 DIV - cor0.col1 col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9776
SELECT ALL col1 / - cor0.col1 col0 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9777
SELECT - ( 24 ) DIV + col0 AS col2 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-9777
SELECT - ( 24 ) / + col0 AS col2 FROM tab1 AS cor0
----
-8
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9778
SELECT ALL col0 DIV col1 AS col2 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-9778
SELECT ALL col0 / col1 AS col2 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT + ( - col2 ) * - col1 - col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT col2 + 16 * + cor0.col1 FROM tab2 AS cor0
----
310
523
970

query I rowsort
SELECT DISTINCT col0 + + 74 * cor0.col1 AS col2 FROM tab0 AS cor0
----
6388
6823
7213

onlyif mysql # use DIV operator for integer division
query I rowsort label-9782
SELECT col1 DIV col0 + + ( - 24 ) AS col1 FROM tab0 AS cor0
----
-21
-22
-23

skipif mysql # not compatible
query I rowsort label-9782
SELECT col1 / col0 + + ( - 24 ) AS col1 FROM tab0 AS cor0
----
-21
-22
-23

query I rowsort
SELECT 85 + col0 AS col2 FROM tab2
----
163
164
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9784
SELECT cor0.col1 * col0 * - CAST( NULL AS DECIMAL ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9784
SELECT cor0.col1 * col0 * - CAST ( NULL AS REAL ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + 24 + + col0 FROM tab0 AS cor0
----
0
11
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-9786
SELECT col0 + col2 DIV + col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-9786
SELECT col0 + col2 / + col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + - col0 + col2 * ( + col1 ) FROM tab1 cor0
----
1168
1401
506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col0 ) col1 FROM tab2
----
7
78
79

query I rowsort
SELECT col2 * col0 + - col0 FROM tab1
----
159
3584
7600

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1, tab2 AS cor0, tab1 cor1
----
972 values hashing to dd771e0c15d524f62127686e9bd43f9a

onlyif mysql # use DIV operator for integer division
query I rowsort label-9791
SELECT DISTINCT col0 DIV + col1 + col2 + + tab0.col2 FROM tab0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-9791
SELECT DISTINCT col0 / + col1 + col2 + + tab0.col2 FROM tab0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 18 * - ( - tab0.col1 ) * col1 + col2 col0 FROM tab0
----
-133095
-148976
-169361

query I rowsort
SELECT ALL col2 * 96 AS col1 FROM tab1 AS cor0
----
5184
5472
9216

query I rowsort
SELECT DISTINCT col1 * - ( col0 ) + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT ALL col1 * - 31 - - col2 FROM tab2 cor0
----
-1803
-489
-934

onlyif mysql # use DIV operator for integer division
query I rowsort label-9796
SELECT ALL + - col2 DIV cor0.col1 + col0 * cor0.col1 * + col1 FROM tab0 AS cor0
----
177504
329315
737009

skipif mysql # not compatible
query I rowsort label-9796
SELECT ALL + - col2 / cor0.col1 + col0 * cor0.col1 * + col1 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT - col1 * 28 + + col1 * + col0 FROM tab2 AS cor0
----
-651
2950
867

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9798
SELECT ALL col2 * CAST( + 27 AS SIGNED ) FROM tab2 cor0
----
1026
702
729

skipif mysql # not compatible
query I rowsort label-9798
SELECT ALL col2 * CAST ( + 27 AS INTEGER ) FROM tab2 cor0
----
1026
702
729

query I rowsort
SELECT - 13 - col0 AS col2 FROM tab1
----
-16
-77
-93

query I rowsort
SELECT - 68 FROM tab0
----
-68
-68
-68

query I rowsort
SELECT ALL 12 AS col1 FROM tab1
----
12
12
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-9802
SELECT + col1 DIV col1 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9802
SELECT + col1 / col1 FROM tab2 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - col1 * + 71 FROM tab1
----
-1846
-710
-923

query I rowsort
SELECT 17 * 87 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to d6a04a9abbbd678770b385a8b09c6c59

query I rowsort
SELECT ALL col0 * ( 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 36 col1 FROM tab0, tab0 AS cor0
----
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9807
SELECT + + CAST( NULL AS SIGNED ) + ( col1 ) * + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9807
SELECT + + CAST ( NULL AS INTEGER ) + ( col1 ) * + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9808
SELECT CAST( 73 AS SIGNED ) * col0 AS col1 FROM tab1 AS cor0
----
219
4672
5840

skipif mysql # not compatible
query I rowsort label-9808
SELECT CAST ( 73 AS INTEGER ) * col0 AS col1 FROM tab1 AS cor0
----
219
4672
5840

onlyif mysql # use DIV operator for integer division
query I rowsort label-9809
SELECT - 37 DIV col0 FROM tab2 AS cor0
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-9809
SELECT - 37 / col0 FROM tab2 AS cor0
----
-5
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9810
SELECT DISTINCT + CAST( NULL AS SIGNED ) * ( col2 ) * - 36 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9810
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * ( col2 ) * - 36 AS col2 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9811
SELECT - - CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9811
SELECT - - CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9812
SELECT + + col2 * col1 + - col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9812
SELECT + + col2 * col1 + - col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col2 * 86 FROM tab2 AS cor0
----
2236
2322
3268

query I rowsort
SELECT ALL - col0 - col2 * - col1 FROM tab1 AS cor0
----
1168
1401
506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col2 * 84 + + 78 col0 FROM tab0 AS cor0
----
238470
626886
8226

query I rowsort
SELECT col2 + cor0.col0 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - 23 * cor0.col2 + - cor0.col1 FROM tab0 cor0
----
-120
-1977
-845

query I rowsort
SELECT - cor0.col2 * col1 AS col2 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9819
SELECT DISTINCT + 44 DIV - col0 FROM tab1 AS cor0
----
-14
0

skipif mysql # not compatible
query I rowsort label-9819
SELECT DISTINCT + 44 / - col0 FROM tab1 AS cor0
----
-14
0

query I rowsort
SELECT - + ( + col2 ) + - cor0.col2 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT ALL - col2 + - cor0.col2 + - col1 FROM tab0 AS cor0
----
-152
-255
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 - + col2 col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL - + ( col1 ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - cor0.col1 + col1 * - ( - col2 ) FROM tab2 cor0
----
1475
629
806

query I rowsort
SELECT ALL col2 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - cor0.col1 * - cor0.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 815fccd4c3d372b28d3f3fb103025775

query I rowsort
SELECT DISTINCT col0 * - col2 + - 57 * col1 FROM tab1 AS cor0
----
-1644
-4218
-8421

query I rowsort
SELECT DISTINCT + col2 + + ( + col2 ) * col0 AS col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL - + col0 + + ( + col1 ) FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT + col1 * + 21 FROM tab2 AS cor0
----
1239
357
651

query I rowsort
SELECT DISTINCT - 39 AS col2 FROM tab1, tab2 cor0, tab1 cor1
----
-39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 * col2 col2 FROM tab0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col0 ) * + col1 col1 FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-9834
SELECT - 75 DIV - col0 AS col0 FROM tab0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-9834
SELECT - 75 / - col0 AS col0 FROM tab0
----
0
2
3

query I rowsort
SELECT DISTINCT tab1.col2 * col0 FROM tab1
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 + - col1 ) * - col1 col1 FROM tab2
----
-1054
-1121
744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - 78 col0 FROM tab2 cor0
----
2028
2106
2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-9838
SELECT - - 98 + + col0 * col0 DIV col0 FROM tab1 AS cor0
----
101
162
178

skipif mysql # not compatible
query I rowsort label-9838
SELECT - - 98 + + col0 * col0 / col0 FROM tab1 AS cor0
----
101
162
178

onlyif mysql # use DIV operator for integer division
query I rowsort label-9839
SELECT ALL + col0 DIV + col0 + 35 FROM tab2 AS cor0
----
36
36
36

skipif mysql # not compatible
query I rowsort label-9839
SELECT ALL + col0 / + col0 + 35 FROM tab2 AS cor0
----
36
36
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9840
SELECT + col2 * col0 + CAST( NULL AS SIGNED ) / + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9840
SELECT + col2 * col0 + CAST ( NULL AS INTEGER ) / + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + - col0 * - ( + 11 ) AS col2 FROM tab0 AS cor0
----
1068
288
420

query I rowsort
SELECT + col1 + col2 AS col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0, tab1 AS cor0, tab0 cor1
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9844
SELECT - col2 DIV ( cor0.col0 + col0 ) AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9844
SELECT - col2 / ( cor0.col0 + col0 ) AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + + col1 * ( + col0 ) * + cor0.col1 AS col1 FROM tab0 AS cor0
----
177504
329315
737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-9846
SELECT DISTINCT - col0 DIV tab0.col2 AS col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-9846
SELECT DISTINCT - col0 / tab0.col2 AS col2 FROM tab0
----
-1
-35
0

query I rowsort
SELECT DISTINCT - ( 12 ) AS col2 FROM tab1, tab0 cor0
----
-12

query I rowsort
SELECT DISTINCT ( 9 ) FROM tab1, tab0 AS cor0
----
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9849
SELECT DISTINCT + col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-9849
SELECT DISTINCT + col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL

query I rowsort
SELECT + + col1 * + 26 AS col0 FROM tab2 cor0
----
1534
442
806

query I rowsort
SELECT - 7 AS col2 FROM tab0 AS cor0
----
-7
-7
-7

query I rowsort
SELECT - col0 * + col1 * - col2 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT + - col0 * col1 - col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9854
SELECT + + CAST( NULL AS SIGNED ) + 10 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9854
SELECT + + CAST ( NULL AS INTEGER ) + 10 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 - 27 AS col0 FROM tab0 AS cor0
----
-113
-118
-124

query I rowsort
SELECT DISTINCT + col1 * - ( col2 + col1 ) AS col2 FROM tab1
----
-1417
-2080
-670

onlyif mysql # use DIV operator for integer division
query I rowsort label-9857
SELECT DISTINCT + col1 * 63 DIV 95 FROM tab0
----
57
60
64

skipif mysql # not compatible
query I rowsort label-9857
SELECT DISTINCT + col1 * 63 / 95 FROM tab0
----
57
60
64

query I rowsort
SELECT DISTINCT col1 + + col2 * col0 * - col2 FROM tab0
----
-26050
-598345
62

query I rowsort
SELECT DISTINCT + col2 + ( - col0 * col2 + - tab0.col2 ) AS col0 FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9860
SELECT DISTINCT - col0 * - CAST( ( col1 ) AS SIGNED ) + col0 DIV + col1 + col0 col0 FROM tab1
----
1126
710
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9860
SELECT DISTINCT - col0 * - CAST ( ( col1 ) AS INTEGER ) + col0 / + col1 + col0 col0 FROM tab1
----
1126
710
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-9861
SELECT col2 DIV + 92 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9861
SELECT col2 / + 92 AS col0 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9862
SELECT ALL - 92 DIV col1 FROM tab2 AS cor0
----
-1
-2
-5

skipif mysql # not compatible
query I rowsort label-9862
SELECT ALL - 92 / col1 FROM tab2 AS cor0
----
-1
-2
-5

query I rowsort
SELECT DISTINCT 27 + + cor0.col1 FROM tab1, tab2 AS cor0
----
44
58
86

query I rowsort
SELECT 76 * col0 AS col1 FROM tab1 AS cor0
----
228
4864
6080

query I rowsort
SELECT DISTINCT - 79 FROM tab1 AS cor0
----
-79

query I rowsort
SELECT + 56 FROM tab2, tab1 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT DISTINCT 86 AS col2 FROM tab1, tab1 AS cor0
----
86

query I rowsort
SELECT cor0.col2 * col2 + col0 * col2 AS col2 FROM tab2 cor0
----
2704
4446
918

query I rowsort
SELECT cor0.col2 * - tab1.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 5c440a304f6abc2ed68f0784f7d7d3bf

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9870
SELECT DISTINCT CAST( NULL AS DECIMAL ) * 33 * - col2 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9870
SELECT DISTINCT CAST ( NULL AS REAL ) * 33 * - col2 AS col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9871
SELECT 83 DIV - cor0.col0 AS col2 FROM tab0 AS cor0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-9871
SELECT 83 / - cor0.col0 AS col2 FROM tab0 AS cor0
----
-2
-3
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9872
SELECT DISTINCT + col0 DIV - col0 FROM tab1 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-9872
SELECT DISTINCT + col0 / - col0 FROM tab1 cor0
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9873
SELECT ALL - CAST( NULL AS SIGNED ) + + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9873
SELECT ALL - CAST ( NULL AS INTEGER ) + + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9874
SELECT - 78 + 45 DIV col0 FROM tab0 AS cor0
----
-77
-77
-78

skipif mysql # not compatible
query I rowsort label-9874
SELECT - 78 + 45 / col0 FROM tab0 AS cor0
----
-77
-77
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-9875
SELECT ALL col2 * + cor0.col1 + - col0 DIV cor0.col1 col2 FROM tab2 AS cor0
----
1533
642
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9875
SELECT ALL col2 * + cor0.col1 + - col0 / cor0.col1 col2 FROM tab2 AS cor0
----
1533
642
837

query I rowsort
SELECT ALL 70 AS col0 FROM tab1
----
70
70
70

query I rowsort
SELECT DISTINCT col0 * - col1 AS col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - col2 * + col1 + - col0 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT cor0.col1 * + col1 - cor0.col0 FROM tab0 AS cor0
----
7372
8192
9374

query I rowsort
SELECT ALL + cor0.col1 * col2 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9881
SELECT ALL - col1 - - col2 DIV - tab2.col0 AS col1 FROM tab2
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort label-9881
SELECT ALL - col1 - - col2 / - tab2.col0 AS col1 FROM tab2
----
-17
-34
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-9882
SELECT + 75 DIV - col0 FROM tab1
----
-1
-25
0

skipif mysql # not compatible
query I rowsort label-9882
SELECT + 75 / - col0 FROM tab1
----
-1
-25
0

query I rowsort
SELECT col0 * - col2 AS col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL - col2 - + 9 AS col2 FROM tab1
----
-105
-63
-66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9885
SELECT ALL CAST( 5 AS SIGNED ) - + col1 FROM tab2
----
-12
-26
-54

skipif mysql # not compatible
query I rowsort label-9885
SELECT ALL CAST ( 5 AS INTEGER ) - + col1 FROM tab2
----
-12
-26
-54

query I rowsort
SELECT DISTINCT - col0 + ( col1 * + col2 ) AS col1 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT col1 * + 53 AS col2 FROM tab0 AS cor0
----
4558
4823
5141

onlyif mysql # use DIV operator for integer division
query I rowsort label-9888
SELECT ALL - col1 DIV + col0 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-9888
SELECT ALL - col1 / + col0 FROM tab0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - cor0.col0 col0 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT ALL col0 + - col1 + - col0 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-9891
SELECT DISTINCT - - col2 DIV col1 - - 12 FROM tab1 AS cor0
----
14
17
19

skipif mysql # not compatible
query I rowsort label-9891
SELECT DISTINCT - - col2 / col1 - - 12 FROM tab1 AS cor0
----
14
17
19

query I rowsort
SELECT - col2 + 4 FROM tab1 AS cor0
----
-50
-53
-92

query I rowsort
SELECT DISTINCT + ( col2 * col0 ) FROM tab2
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + ( ( + col0 ) ) col0 FROM tab2
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * ( + col0 * col1 ) col0 FROM tab2
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-9896
SELECT - col0 + + col2 DIV col2 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-9896
SELECT - col0 + + col2 / col2 FROM tab0 AS cor0
----
-23
-34
-88

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 cor2
----
972 values hashing to 9364ef7545b07c67767dceb70f02c643

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT + col2 + col0 * col0 AS col0 FROM tab0
----
1226
609
8003

query I rowsort
SELECT ALL + 2 * + col1 * col2 FROM tab2
----
1292
1674
3068

query I rowsort
SELECT DISTINCT tab1.col2 + + cor0.col2 * tab1.col0 FROM tab1, tab2, tab1 AS cor0
----
9 values hashing to 3a5e6c1131683162005a0e8bb95fc6d9

query I rowsort
SELECT tab1.col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT + + 82 * col0 + ( col2 ) FROM tab0 AS cor0
----
2001
2871
7380

query I rowsort
SELECT + 17 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT DISTINCT 22 AS col1 FROM tab0 AS cor0
----
22

query I rowsort
SELECT cor0.col1 + cor0.col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + - col1 + col1 * 3 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL + 75 AS col0 FROM tab1
----
75
75
75

query I rowsort
SELECT 53 AS col2 FROM tab0 AS cor0
----
53
53
53

query I rowsort
SELECT DISTINCT - cor0.col2 * ( 6 ) FROM tab0 cor0
----
-198
-492
-6

query I rowsort
SELECT ALL - col0 * - 94 AS col2 FROM tab0 AS cor0
----
2256
3290
8366

query I rowsort
SELECT - col0 - ( col0 ) FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9913
SELECT - col0 + + cor0.col0 DIV col0 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-9913
SELECT - col0 + + cor0.col0 / col0 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

query I rowsort
SELECT ALL col2 - - 12 FROM tab1 AS cor0
----
108
66
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-9915
SELECT col0 - col1 DIV col1 FROM tab0 AS cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-9915
SELECT col0 - col1 / col1 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT DISTINCT - col0 * + cor0.col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - cor0.col2 + col1 AS col0 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT + col0 + + ( col1 ) FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT ALL - col2 * 37 + col1 FROM tab1 AS cor0
----
-1972
-2099
-3539

skipif mysql # not compatible
query I rowsort
SELECT + - col1 * CAST ( 15 AS REAL ) * + cor0.col2 + cor0.col1 * 98 FROM tab1 AS cor0
----
-17446
-18512
-7570

query I rowsort
SELECT col2 + col0 * col2 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9922
SELECT ALL CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-9922
SELECT ALL CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL col2 * + col2 + col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT + 37 * + cor0.col1 + col1 AS col2 FROM tab2 AS cor0
----
1178
2242
646

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 44 * 81 col0 FROM tab1 AS cor0
----
-3564

onlyif mysql # use DIV operator for integer division
query I rowsort label-9926
SELECT + 73 DIV ( + col1 ) + col1 col1 FROM tab2 AS cor0
----
21
33
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9926
SELECT + 73 / ( + col1 ) + col1 col1 FROM tab2 AS cor0
----
21
33
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9927
SELECT ALL - - CAST( NULL AS SIGNED ) * col2 + cor0.col2 * - 98 * + 23 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9927
SELECT ALL - - CAST ( NULL AS INTEGER ) * col2 + cor0.col2 * - 98 * + 23 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col0 * 36 * col1 FROM tab1 AS cor0
----
-23040
-2808
-37440

query I rowsort
SELECT - + 91 FROM tab2 cor0
----
-91
-91
-91

query I rowsort
SELECT - cor1.col0 AS col2 FROM tab1, tab2 cor0, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT + cor1.col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT 56 FROM tab2 AS cor0
----
56
56
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-9933
SELECT ALL - - ( col1 ) + col1 DIV cor0.col1 col1 FROM tab0 AS cor0
----
87
92
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9933
SELECT ALL - - ( col1 ) + col1 / cor0.col1 col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT col0 + + col1 * + col1 + ( col2 ) * cor0.col0 FROM tab2 AS cor0
----
1157
3370
5587

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9935
SELECT col0 * + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9935
SELECT col0 * + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * - 86 FROM tab2 AS cor0
----
-602
-6708
-6794

query I rowsort
SELECT DISTINCT + col2 + 55 * + col2 FROM tab0 AS cor0
----
1848
4592
56

query I rowsort
SELECT - col1 + + 71 AS col1 FROM tab2 cor0
----
12
40
54

query I rowsort
SELECT ALL - col1 * 24 AS col1 FROM tab2 AS cor0
----
-1416
-408
-744

onlyif mysql # use DIV operator for integer division
query I rowsort label-9940
SELECT - CAST( col2 AS SIGNED ) DIV + col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-9940
SELECT - CAST ( col2 AS INTEGER ) / + col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9941
SELECT ALL + + cor0.col1 DIV col1 + + 85 * ( col0 ) FROM tab0 cor0
----
2041
2976
7566

skipif mysql # not compatible
query I rowsort label-9941
SELECT ALL + + cor0.col1 / col1 + + 85 * ( col0 ) FROM tab0 cor0
----
2041
2976
7566

query I rowsort
SELECT - - 66 AS col2 FROM tab0 AS cor0
----
66
66
66

query I rowsort
SELECT col0 + cor0.col1 * - col1 FROM tab0 cor0
----
-7372
-8192
-9374

query I rowsort
SELECT - + col0 + + col0 * + col1 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT ALL - col2 + col1 * 55 FROM tab2 AS cor0
----
1678
3219
897

query I rowsort
SELECT + + col0 * cor0.col2 + - col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT ALL ( cor0.col1 ) FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9948
SELECT col2 DIV + col1 + + cor0.col0 FROM tab2 AS cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-9948
SELECT col2 / + col1 + + cor0.col0 FROM tab2 AS cor0
----
7
78
81

query I rowsort
SELECT 23 AS col0 FROM tab0, tab2, tab0 AS cor0, tab1 AS cor1
----
81 values hashing to d3b0357ceadb3a70da7f1649b1ef2a30

query I rowsort
SELECT DISTINCT ( 32 ) FROM tab0
----
32

query I rowsort
SELECT + - col1 + + col1 AS col1 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9952
SELECT col1 DIV - col0 AS col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-9952
SELECT col1 / - col0 AS col0 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT DISTINCT + tab1.col1 * col2 + col2 * - tab1.col2 FROM tab1
----
-1512
-2679
-7968

query I rowsort
SELECT DISTINCT + + ( 34 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9955
SELECT ALL - - col1 * col1 * CAST( + col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
22831
271518
6727

skipif mysql # not compatible
query I rowsort label-9955
SELECT ALL - - col1 * col1 * CAST ( + col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT ALL + col0 * + tab0.col0 + col2 * col1 FROM tab0
----
1322
15383
3414

query I rowsort
SELECT col2 * - col1 + col1 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT ALL - 0 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL + 39 AS col1 FROM tab2
----
39
39
39

query I rowsort
SELECT DISTINCT - 69 AS col2 FROM tab2, tab0 AS cor0
----
-69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9961
SELECT DISTINCT + - CAST( + col1 AS SIGNED ) * col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-9961
SELECT DISTINCT + - CAST ( + col1 AS INTEGER ) * col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL - + ( col1 ) * col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - + col2 + col2 AS col1 FROM tab1 cor0
----
0

query I rowsort
SELECT - - col1 + + col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 * - col2 FROM tab1 cor0
----
-2862
-3192
-9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-9966
SELECT DISTINCT - col0 DIV - col0 + col0 * - col0 FROM tab1 AS cor0
----
-4095
-6399
-8

skipif mysql # not compatible
query I rowsort label-9966
SELECT DISTINCT - col0 / - col0 + col0 * - col0 FROM tab1 AS cor0
----
-4095
-6399
-8

query I rowsort
SELECT DISTINCT col1 * - col0 + + col2 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-1272
-3360
-801

query I rowsort
SELECT ALL + col0 - 92 AS col2 FROM tab2 cor0
----
-13
-14
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9969
SELECT + ( - col0 ) + - col2 DIV + col1 FROM tab2 cor0
----
-7
-78
-81

skipif mysql # not compatible
query I rowsort label-9969
SELECT + ( - col0 ) + - col2 / + col1 FROM tab2 cor0
----
-7
-78
-81

query I rowsort
SELECT + ( - 66 ) - col0 AS col0 FROM tab0 AS cor0
----
-101
-155
-90

query I rowsort
SELECT DISTINCT + - col0 * - 92 + cor0.col2 AS col2 FROM tab2 cor0
----
671
7202
7306

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col0 col2 FROM tab0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 * col2 col2 FROM tab0
----
1749
4346
53

query I rowsort
SELECT DISTINCT + ( + 26 ) - - tab1.col2 AS col2 FROM tab1
----
122
80
83

query I rowsort
SELECT DISTINCT - col2 * - 72 - + col1 FROM tab0
----
-25
2290
5813

query I rowsort
SELECT - col1 * - col2 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT - cor0.col2 * + 99 - col0 AS col0 FROM tab0 AS cor0
----
-134
-3291
-8207

onlyif mysql # use DIV operator for integer division
query I rowsort label-9978
SELECT + cor0.col1 DIV + col0 + - col2 FROM tab1 cor0
----
-46
-57
-96

skipif mysql # not compatible
query I rowsort label-9978
SELECT + cor0.col1 / + col0 + - col2 FROM tab1 cor0
----
-46
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9979
SELECT + 91 * - ( col2 ) * - 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-9979
SELECT + 91 * - ( col2 ) * - CAST ( NULL AS INTEGER ) + col0 * + col1 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9980
SELECT col1 DIV 95 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9980
SELECT col1 / 95 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9981
SELECT + col2 + 62 DIV - col1 FROM tab1 cor0
----
51
52
92

skipif mysql # not compatible
query I rowsort label-9981
SELECT + col2 + 62 / - col1 FROM tab1 cor0
----
51
52
92

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab2, tab2 AS cor1
----
3645 values hashing to e3826bc27970dd1a441a9cd4c13b096d

query I rowsort
SELECT ALL - col2 + 43 + cor0.col2 AS col0 FROM tab2 cor0
----
43
43
43

query I rowsort
SELECT ALL + 90 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT col0 * col0 + col2 * col1 FROM tab0
----
1322
15383
3414

query I rowsort
SELECT DISTINCT + col2 * 86 AS col0 FROM tab1 AS cor0
----
4644
4902
8256

query I rowsort
SELECT ALL + ( cor0.col0 ) AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 85 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT - 12 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

query I rowsort
SELECT 98 FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2, tab2 AS cor3
----
243 values hashing to d130086b8d8a18a3ac49ce2321d35e00

query I rowsort
SELECT - col2 + + 99 AS col0 FROM tab0
----
17
66
98

query I rowsort
SELECT DISTINCT col1 + 28 * col2 AS col2 FROM tab0 cor0
----
1010
125
2387

query I rowsort
SELECT DISTINCT + col2 + col1 * + col0 + - col0 AS col1 FROM tab1 AS cor0
----
1056
129
633

query I rowsort
SELECT ALL cor0.col0 + - ( col2 ) - + cor0.col1 FROM tab1 AS cor0
----
-29
-3
-77

query I rowsort
SELECT + - cor0.col2 * + 95 AS col0 FROM tab1 AS cor0
----
-5130
-5415
-9120

query I rowsort
SELECT - cor0.col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + - col2 * - col1 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - cor1.col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8