sqllogictest

Artifact [4da0794b5d]
Login

Artifact 4da0794b5d11b7ccd986fef54cb0a94aad899bfc:


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 DISTINCT - tab2.col2 - col1 * + 40 * - col0 AS col1 FROM tab2
----
184054
53682
8653

query I rowsort
SELECT DISTINCT col0 + - 22 - col2 FROM tab2
----
-42
19
30

query I rowsort
SELECT + 52 * + 95 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 69b7ca89141c2aa32deda045c9de059a

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

query I rowsort
SELECT DISTINCT - col1 + ( col0 * col1 ) FROM tab2
----
1326
186
4543

query I rowsort
SELECT - + col1 + + 84 FROM tab1 AS cor0
----
58
71
74

skipif mysql # not compatible
query I rowsort
SELECT + ( - col0 ) + - col2 * CAST ( - 77 AS REAL ) FROM tab1 AS cor0
----
4155
4325
7312

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

query I rowsort
SELECT DISTINCT + col1 + - 24 + - cor0.col2 * 50 * - col2 AS col1 FROM tab1 AS cor0
----
145802
162436
460789

query I rowsort
SELECT DISTINCT - 55 + ( col0 ) * - col1 * col2 FROM tab2 cor0
----
-119707
-51089
-5914

query I rowsort
SELECT ALL + 54 * - col2 FROM tab1 AS cor0
----
-2916
-3078
-5184

query I rowsort
SELECT col0 + 22 AS col1 FROM tab1 AS cor0
----
102
25
86

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

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

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

query I rowsort
SELECT - + col2 * col0 + col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT col2 + 11 * + col0 FROM tab1 cor0
----
761
87
976

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

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

query I rowsort
SELECT - + ( 29 ) * - col1 FROM tab2 AS cor0
----
1711
493
899

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

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

skipif mysql # not compatible
query I rowsort label-21
SELECT + col0 / col2 + + col1 FROM tab0 cor0
----
132
86
92

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

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

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

query I rowsort
SELECT DISTINCT - + ( + ( col0 ) ) + - 75 + col1 FROM tab0 AS cor0
----
-13
-73

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

query I rowsort
SELECT ALL 99 - + 41 FROM tab0 cor0
----
58
58
58

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

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

query I rowsort
SELECT 16 + - col1 * + col2 FROM tab2 AS cor0
----
-1518
-630
-821

query I rowsort
SELECT + 99 * + col2 AS col0 FROM tab2 AS cor0
----
2574
2673
3762

query I rowsort
SELECT - - 65 * col1 FROM tab1 AS cor0
----
1690
650
845

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-34
SELECT ALL 18 * col0 DIV CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
18
18
18

skipif mysql # not compatible
query I rowsort label-34
SELECT ALL 18 * col0 / CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT DISTINCT + 75 * - col1 + + 4 FROM tab1 AS cor0
----
-1946
-746
-971

query I rowsort
SELECT 98 * col0 AS col2 FROM tab2 AS cor0
----
686
7644
7742

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

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + 52 col0 FROM tab2 AS cor0
----
130
131
59

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

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

query I rowsort
SELECT col1 + 11 * cor0.col0 * col0 AS col1 FROM tab1 AS cor0
----
125
45066
70413

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

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

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

query I rowsort
SELECT DISTINCT col0 + 21 FROM tab1 AS cor0
----
101
24
85

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-52
SELECT col1 DIV - ( cor0.col2 * col1 ) FROM tab0 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-52
SELECT col1 / - ( cor0.col2 * col1 ) FROM tab0 cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT - + col0 * 82 FROM tab2 AS cor0
----
-574
-6396
-6478

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

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2, tab1 cor0, tab1
----
972 values hashing to fe55095fff3a5ecc2f113d14a8c6f823

query I rowsort
SELECT ALL col1 + 14 + + 95 FROM tab2 AS cor0
----
126
140
168

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

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

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

query I rowsort
SELECT - col1 * + 65 AS col0 FROM tab2 AS cor0
----
-1105
-2015
-3835

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-68
SELECT DISTINCT col2 DIV - 23 + col1 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-68
SELECT DISTINCT col2 / - 23 + col1 FROM tab2
----
16
30
58

query I rowsort
SELECT DISTINCT ( - 86 ) * + col1 + col1 AS col0 FROM tab2
----
-1445
-2635
-5015

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

query I rowsort
SELECT - ( + col0 ) + 66 FROM tab1
----
-14
2
63

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

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

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

query I rowsort
SELECT ALL 77 FROM tab2
----
77
77
77

query I rowsort
SELECT DISTINCT + + 87 * + col0 FROM tab0 AS cor0
----
2088
3045
7743

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

query I rowsort
SELECT - + 4 + - col1 * + ( col2 ) * + col2 FROM tab1 AS cor0
----
-119812
-32494
-75820

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-79
SELECT ALL - 52 DIV - cor0.col2 col2 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-79
SELECT ALL - 52 / - cor0.col2 col2 FROM tab1 cor0
----
0
0
0

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

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

query I rowsort
SELECT DISTINCT + 75 FROM tab1 AS cor0
----
75

query I rowsort
SELECT + 93 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

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

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

query I rowsort
SELECT DISTINCT - col2 * - 33 * col2 - col0 * - 64 AS col0 FROM tab0 AS cor0
----
2273
227588
37473

query I rowsort
SELECT 50 FROM tab1 AS cor0
----
50
50
50

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-90
SELECT CAST( - 2 AS SIGNED ) * col1 FROM tab0 AS cor0
----
-172
-182
-194

skipif mysql # not compatible
query I rowsort label-90
SELECT CAST ( - 2 AS INTEGER ) * col1 FROM tab0 AS cor0
----
-172
-182
-194

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

query I rowsort
SELECT DISTINCT + col2 * cor0.col2 * col2 AS col2 FROM tab2 AS cor0
----
17576
19683
54872

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

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

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

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

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

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

query I rowsort
SELECT - 33 FROM tab0, tab1 cor0
----
9 values hashing to 8035c665a75d22be5922be1a4e574e03

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-100
SELECT DISTINCT - + col1 + - CAST( 24 AS SIGNED ) FROM tab2 AS cor0
----
-41
-55
-83

skipif mysql # not compatible
query I rowsort label-100
SELECT DISTINCT - + col1 + - CAST ( 24 AS INTEGER ) FROM tab2 AS cor0
----
-41
-55
-83

query I rowsort
SELECT - col1 + - col0 - col0 FROM tab2 AS cor0
----
-175
-215
-45

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

query I rowsort
SELECT - 81 FROM tab2, tab2 AS cor0
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

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

skipif mysql # not compatible
query I rowsort label-104
SELECT - col1 + col1 / tab0.col1 AS col1 FROM tab0
----
-85
-90
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 58 + - col2 col2 FROM tab0 cor0
----
-24
25
57

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

query I rowsort
SELECT + 89 * - col1 FROM tab0 AS cor0
----
-7654
-8099
-8633

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

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

query I rowsort
SELECT - col2 * col1 + col1 * 82 FROM tab1 AS cor0
----
-182
250
728

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

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

query I rowsort
SELECT ALL - - 37 * - ( col1 ) * - col2 + col0 FROM tab1 AS cor0
----
21154
46256
51951

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

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

query I rowsort
SELECT ALL cor1.col2 * - 49 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 1e946e3e976e3b702801268c4bf236ef

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

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

query I rowsort
SELECT + 17 FROM tab2, tab1, tab2 cor0
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT ALL - + col2 * - col2 * + 29 FROM tab2 AS cor0
----
19604
21141
41876

query I rowsort
SELECT ALL + 86 * + col0 FROM tab2 AS cor0
----
602
6708
6794

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col0 ) col1 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 55 * col0 + - col1 col0 FROM tab1
----
139
3510
4387

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

query I rowsort
SELECT 37 AS col2 FROM tab2
----
37
37
37

query I rowsort
SELECT 18 FROM tab2, tab1 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

onlyif mysql # use DIV operator for integer division
query I rowsort label-124
SELECT DISTINCT col1 DIV 9 + + col1 * col1 * col0 FROM tab1
----
13521
2030
6401

skipif mysql # not compatible
query I rowsort label-124
SELECT DISTINCT col1 / 9 + + col1 * col1 * col0 FROM tab1
----
13521
2030
6401

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col0 * - ( 26 ) + - col0 col0 FROM tab1
----
199600
4209
94784

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

query I rowsort
SELECT DISTINCT 77 * col2 * ( + col2 ) + col0 * 6 AS col2 FROM tab2 AS cor0
----
111662
52520
56175

query I rowsort
SELECT 80 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT + col1 * 13 FROM tab1 AS cor0
----
130
169
338

query I rowsort
SELECT - 62 * + tab0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 8ccb8323d1fa2c60b5f7496854776f8c

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

query I rowsort
SELECT + col1 * + cor0.col1 - - col1 FROM tab0 AS cor0
----
7482
8372
9506

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

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

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

query I rowsort
SELECT ALL - cor0.col2 + - col2 AS col0 FROM tab0 cor0 WHERE + col2 >= NULL
----

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

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

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

query I rowsort
SELECT - col0 + col2 * col2 AS col1 FROM tab0
----
-34
1065
6635

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

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

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

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

query I rowsort
SELECT DISTINCT + col0 * + col1 + col2 * + col1 + col2 * + col1 FROM tab0
----
23023
3589
7740

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-153
SELECT DISTINCT col0 * col0 DIV tab0.col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-153
SELECT DISTINCT col0 * col0 / tab0.col0 FROM tab0
----
24
35
89

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

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

query I rowsort
SELECT ALL col0 * + tab1.col2 + - col2 + - tab1.col2 FROM tab1
----
3534
54
7488

query I rowsort
SELECT DISTINCT - col0 * col0 + - col0 + col1 FROM tab2
----
-25
-6103
-6303

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-157
SELECT DISTINCT - col1 / tab2.col0 col2 FROM tab2
----
-4
0

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT col1 - - col2 <> NULL
----

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

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

query I rowsort
SELECT ALL col1 + col1 + - col0 FROM tab1
----
-44
-54
49

query I rowsort
SELECT DISTINCT cor0.col0 * col1 * cor0.col0 AS col2 FROM tab0 AS cor0
----
118825
49536
720811

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

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

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

skipif mysql # not compatible
query I rowsort label-163
SELECT DISTINCT + col1 + + col1 / + col0 AS col0 FROM tab2
----
17
35
59

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

query I rowsort
SELECT DISTINCT tab1.col2 AS col1 FROM tab1 WHERE NULL IN ( + col1 + - col2 * + col0 )
----

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

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

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

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

query I rowsort
SELECT col1 * - col0 + + col0 + col0 FROM tab1
----
-512
-72
-880

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

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

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

query I rowsort
SELECT ALL - col1 + col0 * - col2 + - col2 * - col2 AS col2 FROM tab2
----
-1411
-1575
509

query IIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 WHERE NULL < NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-176
SELECT - col0 * - col1 + - col2 DIV + col0 FROM tab1 AS cor0
----
1039
60
640

skipif mysql # not compatible
query I rowsort label-176
SELECT - col0 * - col1 + - col2 / + col0 FROM tab1 AS cor0
----
1039
60
640

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

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

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

query I rowsort
SELECT - cor0.col1 * - col1 FROM tab2 cor0
----
289
3481
961

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - col2 + + cor0.col0 * col2 col0 FROM tab2 AS cor0
----
135
1976
2926

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

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

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

query I rowsort
SELECT - tab1.col1 * + col1 + col0 * 94 AS col0 FROM tab1
----
-394
5916
7351

query I rowsort
SELECT + ( col2 ) * 65 FROM tab1
----
3510
3705
6240

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

query I rowsort
SELECT col0 + cor0.col1 * - 65 FROM tab2 AS cor0
----
-1026
-2008
-3757

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-191
SELECT DISTINCT 65 * col0 + - 79 DIV col2 FROM tab1 cor0
----
194
4159
5200

skipif mysql # not compatible
query I rowsort label-191
SELECT DISTINCT 65 * col0 + - 79 / col2 FROM tab1 cor0
----
194
4159
5200

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

query I rowsort
SELECT + - ( col1 ) + col1 * - 17 AS col2 FROM tab2 cor0
----
-1062
-306
-558

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col0 ) * - 19 + col0 * col1 col1 FROM tab1 AS cor0
----
135
1856
2560

query I rowsort
SELECT - + 80 + col0 FROM tab2 AS cor0
----
-1
-2
-73

query I rowsort
SELECT DISTINCT col0 * - 21 AS col0 FROM tab1 AS cor0
----
-1344
-1680
-63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-197
SELECT ALL + col0 + CAST( 98 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
101
162
178

skipif mysql # not compatible
query I rowsort label-197
SELECT ALL + col0 + CAST ( 98 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
101
162
178

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

query I rowsort
SELECT DISTINCT + col0 - 54 * - col1 * - col1 FROM tab1 AS cor0
----
-36501
-5336
-9046

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

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

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

query I rowsort
SELECT ALL 22 AS col0 FROM tab0
----
22
22
22

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

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

query I rowsort
SELECT - col1 * + tab1.col0 - col0 FROM tab1
----
-1120
-704
-81

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

query III rowsort
SELECT * FROM tab0 WHERE NOT ( - col2 * col1 ) <> NULL
----

query I rowsort
SELECT ALL + tab1.col0 * - col2 + col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT tab2.col2 * - col0 * col1 + + tab2.col2 AS col0 FROM tab2
----
-119626
-50996
-5832

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-212
SELECT + tab1.col2 DIV + col1 + - col1 AS col1 FROM tab1
----
-24
-5
-6

skipif mysql # not compatible
query I rowsort label-212
SELECT + tab1.col2 / + col1 + - col1 AS col1 FROM tab1
----
-24
-5
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-213
SELECT ALL + tab1.col2 DIV - col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-213
SELECT ALL + tab1.col2 / - col2 FROM tab1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 + tab2.col0 col2 FROM tab2
----
137
38
96

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-216
SELECT DISTINCT col1 DIV col1 + col1 FROM tab2
----
18
32
60

skipif mysql # not compatible
query I rowsort label-216
SELECT DISTINCT col1 / col1 + col1 FROM tab2
----
18
32
60

query I rowsort
SELECT col0 * col1 + col2 * - tab1.col0 * col2 FROM tab1
----
-207296
-736240
-8670

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

query I rowsort
SELECT - col2 * col0 - col0 AS col1 FROM tab2
----
-196
-2106
-3081

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

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL <= ( + col0 )
----

query I rowsort
SELECT DISTINCT - col0 * cor0.col1 + + 12 * - col1 + col1 FROM tab1 AS cor0
----
-1183
-364
-750

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

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

query I rowsort
SELECT ALL col0 * col0 AS col2 FROM tab1
----
4096
6400
9

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) < ( - col1 )
----

query I rowsort
SELECT - tab1.col1 FROM tab1 WHERE - col0 + col1 / col0 IN ( + col1 )
----

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

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

query I rowsort
SELECT ALL + col0 * + col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + col0 + col1 * + tab2.col2 + + col1 AS col1 FROM tab2
----
1671
742
875

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

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

query I rowsort
SELECT - col1 + + tab2.col2 + - col1 AS col1 FROM tab2
----
-35
-92
4

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

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

query I rowsort
SELECT col1 * col2 * col1 + + col1 FROM tab0
----
244154
679133
9506

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

query I rowsort
SELECT + col0 + + ( 8 * - col0 ) AS col2 FROM tab0 AS cor0
----
-168
-245
-623

query I rowsort
SELECT col2 * + 76 + + col1 FROM tab0 AS cor0
----
173
2594
6323

onlyif mysql # use DIV operator for integer division
query I rowsort label-240
SELECT + col2 DIV 28 col0 FROM tab1 AS cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-240
SELECT + col2 / 28 col0 FROM tab1 AS cor0
----
1
2
3

query I rowsort
SELECT DISTINCT 34 FROM tab1, tab0, tab1 cor0
----
34

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col0 * + 61 col1 FROM tab1
----
-39040
-4758
-63440

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

query I rowsort
SELECT + cor0.col2 * - 45 FROM tab2 cor0
----
-1170
-1215
-1710

query I rowsort
SELECT - col1 * 69 AS col0 FROM tab0 AS cor0
----
-5934
-6279
-6693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + 59 col1 FROM tab2 AS cor0
----
137
138
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-249
SELECT + CAST( + ( - col1 ) AS SIGNED ) AS col2 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-249
SELECT + CAST ( + ( - col1 ) AS INTEGER ) AS col2 FROM tab2
----
-17
-31
-59

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

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

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
972 values hashing to 465d072d2d9eababbfc8e88b82707474

onlyif mysql # use DIV operator for integer division
query I rowsort label-253
SELECT col1 DIV - 94 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-253
SELECT col1 / - 94 FROM tab0
----
-1
0
0

query I rowsort
SELECT + 92 * - col1 - - cor0.col1 AS col1 FROM tab1 cor0
----
-1183
-2366
-910

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

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

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

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

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

query I rowsort
SELECT ALL + + 34 * + col0 + col2 AS col1 FROM tab1 AS cor0
----
156
2233
2816

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

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

query I rowsort
SELECT DISTINCT 83 FROM tab1
----
83

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

query I rowsort
SELECT 82 * - col1 + 58 AS col2 FROM tab1 cor0
----
-1008
-2074
-762

query I rowsort
SELECT - - 18 FROM tab2 AS cor0
----
18
18
18

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

query I rowsort
SELECT - 9 * + col2 FROM tab1
----
-486
-513
-864

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

query I rowsort
SELECT - 75 * + col2 + col0 * + 38 AS col1 FROM tab2 AS cor0
----
-1759
1014
152

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

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

query I rowsort
SELECT - 42 - col0 * col1 FROM tab1
----
-1082
-120
-682

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

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

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

query I rowsort
SELECT DISTINCT - + 82 * - col2 + + col2 FROM tab1 AS cor0
----
4482
4731
7968

query I rowsort
SELECT - + col1 * + col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-278
SELECT DISTINCT col0 * col2 * col0 + - col2 DIV + col1 FROM tab0 AS cor0
----
1225
19008
649522

skipif mysql # not compatible
query I rowsort label-278
SELECT DISTINCT col0 * col2 * col0 + - col2 / + col1 FROM tab0 AS cor0
----
1225
19008
649522

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

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

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

query I rowsort
SELECT 3 FROM tab1
----
3
3
3

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

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

query I rowsort
SELECT ALL + 4 AS col2 FROM tab1
----
4
4
4

query I rowsort
SELECT - + ( 79 ) + - col0 FROM tab0 AS cor0
----
-103
-114
-168

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + 19 * - col1 col1 FROM tab0 AS cor0
----
-1610
-1640
-1808

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

query I rowsort
SELECT ( 76 * + col2 ) AS col0 FROM tab1
----
4104
4332
7296

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

query I rowsort
SELECT ALL + 92 * + col2 + col2 * + col1 FROM tab0 AS cor0
----
15006
189
5874

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-293
SELECT ALL - 14 DIV - cor0.col2 + col0 col1 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-293
SELECT ALL - 14 / - cor0.col2 + col0 col1 FROM tab1 AS cor0
----
3
64
80

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-296
SELECT - col2 - + col0 DIV + col2 AS col0 FROM tab1 cor0
----
-54
-58
-96

skipif mysql # not compatible
query I rowsort label-296
SELECT - col2 - + col0 / + col2 AS col0 FROM tab1 cor0
----
-54
-58
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 * - 61 col0 FROM tab0
----
-5307
-5307
-5307

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

query I rowsort
SELECT ALL tab1.col2 * - col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL + 64 * + col0 FROM tab1
----
192
4096
5120

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

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

query I rowsort
SELECT 90 AS col2 FROM tab0
----
90
90
90

query I rowsort
SELECT ALL + ( 63 ) * - col0 FROM tab2 AS cor0
----
-441
-4914
-4977

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

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

query I rowsort
SELECT - col1 * 84 FROM tab0 AS cor0
----
-7224
-7644
-8148

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

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

query I rowsort
SELECT DISTINCT - ( - 85 ) * col0 FROM tab2 AS cor0
----
595
6630
6715

query I rowsort
SELECT DISTINCT ( col1 ) + + col1 AS col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT 44 + - 62 * col2 FROM tab2 cor0
----
-1568
-1630
-2312

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

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

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

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

query I rowsort
SELECT - col1 * 15 AS col2 FROM tab2 AS cor0
----
-255
-465
-885

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

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

query I rowsort
SELECT 14 FROM tab0, tab1 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT ALL + 59 * + col2 + + 22 FROM tab2 AS cor0
----
1556
1615
2264

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 42 * - col1 col0 FROM tab2 cor0
----
1302
2478
714

query I rowsort
SELECT ALL - 92 + - cor0.col1 FROM tab0 AS cor0
----
-178
-183
-189

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-322
SELECT DISTINCT - 94 + col2 DIV 18 FROM tab1 AS cor0
----
-89
-91

skipif mysql # not compatible
query I rowsort label-322
SELECT DISTINCT - 94 + col2 / 18 FROM tab1 AS cor0
----
-89
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-323
SELECT DISTINCT + - col0 * col1 DIV 75 - col0 col0 FROM tab1 AS cor0
----
-4
-72
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-323
SELECT DISTINCT + - col0 * col1 / 75 - col0 col0 FROM tab1 AS cor0
----
-4
-72
-93

query I rowsort
SELECT + - 65 * - col0 * 32 AS col0 FROM tab0 AS cor0
----
185120
49920
72800

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

query I rowsort
SELECT ALL col2 + 28 FROM tab0 cor0
----
110
29
61

query I rowsort
SELECT - - col0 + 13 FROM tab2 AS cor0
----
20
91
92

query I rowsort
SELECT DISTINCT + col2 * 9 FROM tab1 AS cor0
----
486
513
864

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col1 + - col0 + col2 AS col0 FROM tab2 AS cor0
----
-1586
-687
-817

query I rowsort
SELECT DISTINCT + col1 + - ( - 8 ) AS col1 FROM tab1 AS cor0
----
18
21
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-331
SELECT ALL col0 + ( - ( col1 ) ) * + CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
-210
-3403
-954

skipif mysql # not compatible
query I rowsort label-331
SELECT ALL col0 + ( - ( col1 ) ) * + CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT - - col0 * - col2 + 55 + + cor0.col1 AS col1 FROM tab1 AS cor0
----
-3583
-7612
-81

query I rowsort
SELECT DISTINCT + col0 * + 54 AS col0 FROM tab1 AS cor0
----
162
3456
4320

query I rowsort
SELECT ALL - col0 * col1 + 34 + col0 AS col1 FROM tab0 AS cor0
----
-2006
-3326
-7976

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

query I rowsort
SELECT + col1 + 84 + col0 FROM tab1 AS cor0
----
113
158
177

query I rowsort
SELECT ALL + tab0.col2 * col1 * + col2 + col2 * col2 - - 46 FROM tab0
----
144
618654
94789

query I rowsort
SELECT DISTINCT + tab2.col0 + 30 AS col0 FROM tab2, tab1 AS cor0
----
108
109
37

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0, tab0 cor0, tab0 AS cor1
----
972 values hashing to 3406497351e4789c89a295ee9b64b201

query I rowsort
SELECT ALL - + 93 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to ea79c61f7a02d25805171f5e85229fba

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

query I rowsort
SELECT tab1.col0 * - col0 AS col2 FROM tab1
----
-4096
-6400
-9

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-345
SELECT - cor0.col1 DIV cor0.col1 + col1 col1 FROM tab2 AS cor0
----
16
30
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-345
SELECT - cor0.col1 / cor0.col1 + col1 col1 FROM tab2 AS cor0
----
16
30
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-346
SELECT col2 * col2 DIV - col1 AS col1 FROM tab2 AS cor0
----
-11
-23
-84

skipif mysql # not compatible
query I rowsort label-346
SELECT col2 * col2 / - col1 AS col1 FROM tab2 AS cor0
----
-11
-23
-84

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

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

query I rowsort
SELECT + col0 * - 30 FROM tab2 AS cor0
----
-210
-2340
-2370

query I rowsort
SELECT DISTINCT col1 * + col0 * 78 + tab2.col0 FROM tab2
----
104833
16933
359034

onlyif mysql # use DIV operator for integer division
query I rowsort label-350
SELECT - col2 + 72 + - col1 DIV + tab1.col1 FROM tab1
----
-25
14
17

skipif mysql # not compatible
query I rowsort label-350
SELECT - col2 + 72 + - col1 / + tab1.col1 FROM tab1
----
-25
14
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-351
SELECT - col0 * - CAST( + 38 AS SIGNED ) + + col1 + + tab0.col2 DIV col0 AS col2 FROM tab0
----
1427
3473
999

skipif mysql # not compatible
query I rowsort label-351
SELECT - col0 * - CAST ( + 38 AS INTEGER ) + + col1 + + tab0.col2 / col0 AS col2 FROM tab0
----
1427
3473
999

onlyif mysql # use DIV operator for integer division
query I rowsort label-352
SELECT + 99 * + col1 DIV col1 FROM tab1 AS cor0
----
99
99
99

skipif mysql # not compatible
query I rowsort label-352
SELECT + 99 * + col1 / col1 FROM tab1 AS cor0
----
99
99
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - ( + col0 ) col2 FROM tab0
----
-171
-36
-57

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-355
SELECT DISTINCT - col0 DIV ( tab0.col0 ) + tab0.col0 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-355
SELECT DISTINCT - col0 / ( tab0.col0 ) + tab0.col0 FROM tab0
----
23
34
88

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

query I rowsort
SELECT ALL col0 * ( 88 ) + - tab1.col2 AS col2 FROM tab1
----
210
5575
6944

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

query I rowsort
SELECT DISTINCT - + col0 * 13 + - col2 AS col1 FROM tab2 cor0
----
-1040
-1065
-118

query I rowsort
SELECT ALL + - ( 64 ) * + col1 FROM tab0 AS cor0
----
-5504
-5824
-6208

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

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

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

query I rowsort
SELECT - ( 2 ) * + col2 + - col0 AS col0 FROM tab0 AS cor0
----
-253
-37
-90

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-366
SELECT ALL + ( - col0 ) * col2 DIV + ( col0 ) + col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1344
-1458
-627

skipif mysql # not compatible
query I rowsort label-366
SELECT ALL + ( - col0 ) * col2 / + ( col0 ) + col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL + 35 * - col1 + + col0 AS col2 FROM tab0 AS cor0
----
-2986
-3096
-3360

query I rowsort
SELECT + col2 * 53 + - col2 AS col0 FROM tab0 AS cor0
----
1716
4264
52

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

query I rowsort
SELECT DISTINCT - - 11 * col0 AS col0 FROM tab0 AS cor0
----
264
385
979

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

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

query I rowsort
SELECT DISTINCT + - 21 - col2 * - col2 FROM tab0 AS cor0
----
-20
1068
6703

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-375
SELECT ALL col0 + - col1 + - col1 DIV - cor0.col1 FROM tab1 AS cor0
----
-22
55
68

skipif mysql # not compatible
query I rowsort label-375
SELECT ALL col0 + - col1 + - col1 / - cor0.col1 FROM tab1 AS cor0
----
-22
55
68

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

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

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

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

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

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

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

query I rowsort
SELECT + - col0 + 79 AS col2 FROM tab1 AS cor0
----
-1
15
76

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

query I rowsort
SELECT - col0 + - 31 FROM tab0 AS cor0
----
-120
-55
-66

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

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

query I rowsort
SELECT DISTINCT - 95 AS col0 FROM tab0, tab2 cor0
----
-95

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

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

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

query I rowsort
SELECT ALL - col2 + - col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-395
SELECT col1 + col1 - + col2 DIV - cor0.col0 FROM tab1 AS cor0
----
20
27
70

skipif mysql # not compatible
query I rowsort label-395
SELECT col1 + col1 - + col2 / - cor0.col0 FROM tab1 AS cor0
----
20
27
70

query I rowsort
SELECT - - col0 * - col0 + 49 AS col1 FROM tab0 AS cor0
----
-1176
-527
-7872

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

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

query I rowsort
SELECT 36 FROM tab0, tab2 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

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

query I rowsort
SELECT DISTINCT + 77 * - 90 + - col2 FROM tab2
----
-6956
-6957
-6968

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

query I rowsort
SELECT + col0 * + col2 + + 75 + + 60 AS col2 FROM tab2 AS cor0
----
2163
3137
324

query I rowsort
SELECT 34 + col1 + - 96 FROM tab1 AS cor0
----
-36
-49
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-405
SELECT tab0.col2 * 86 DIV + col2 FROM tab0
----
86
86
86

skipif mysql # not compatible
query I rowsort label-405
SELECT tab0.col2 * 86 / + col2 FROM tab0
----
86
86
86

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

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

skipif mysql # not compatible
query I rowsort label-407
SELECT CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

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

query I rowsort
SELECT + 2 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-413
SELECT ALL + tab1.col2 DIV 67 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-413
SELECT ALL + tab1.col2 / 67 FROM tab1
----
0
0
1

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

query I rowsort
SELECT 66 FROM tab0, tab0 cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

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

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

query I rowsort
SELECT DISTINCT + ( + 65 ) * cor0.col1 FROM tab1, tab0, tab2 AS cor0
----
1105
2015
3835

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-419
SELECT DISTINCT CAST( + col2 AS SIGNED ) * col2 + + col0 AS col2 FROM tab0
----
1113
36
6813

skipif mysql # not compatible
query I rowsort label-419
SELECT DISTINCT CAST ( + col2 AS INTEGER ) * col2 + + col0 AS col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT DISTINCT ( + col2 + + col2 ) FROM tab1
----
108
114
192

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

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

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

skipif mysql # not compatible
query I rowsort label-423
SELECT + CAST ( col1 AS INTEGER ) + col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT + - 20 AS col1 FROM tab2 AS cor0
----
-20
-20
-20

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

skipif mysql # not compatible
query I rowsort label-425
SELECT + + col0 + + col1 / col1 AS col0 FROM tab2 cor0
----
79
8
80

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

query I rowsort
SELECT ALL cor1.col1 * 37 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to eff25e6f10b5f9b840aa8567ca654166

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

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

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

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

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

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

query I rowsort
SELECT - col0 + col0 - - 57 FROM tab2
----
57
57
57

query I rowsort
SELECT DISTINCT + 92 - - col2 FROM tab2
----
118
119
130

onlyif mysql # use DIV operator for integer division
query I rowsort label-435
SELECT + col0 * tab2.col1 DIV + 5 col2 FROM tab2
----
268
43
920

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-435
SELECT + col0 * tab2.col1 / + 5 col2 FROM tab2
----
268
43
920

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

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

query I rowsort
SELECT ALL - 58 + - col2 AS col1 FROM tab0 AS cor0
----
-140
-59
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-439
SELECT DISTINCT + tab2.col1 DIV + 1 + - 37 DIV col1 FROM tab2
----
15
30
59

skipif mysql # not compatible
query I rowsort label-439
SELECT DISTINCT + tab2.col1 / + 1 + - 37 / col1 FROM tab2
----
15
30
59

query I rowsort
SELECT 51 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-442
SELECT - col2 * col1 * col1 + - col0 DIV - col1 FROM tab2 AS cor0
----
-10978
-25947
-90505

skipif mysql # not compatible
query I rowsort label-442
SELECT - col2 * col1 * col1 + - col0 / - col1 FROM tab2 AS cor0
----
-10978
-25947
-90505

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 + col0 * col0 col0 FROM tab0 AS cor0
----
1311
662
8007

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

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

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

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

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-454
SELECT - CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-454
SELECT - CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT tab0.col2 * + 34 + - col2 AS col1 FROM tab0
----
1089
2706
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + ( + ( + col2 ) ) col2 FROM tab1
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col0 + 9 col2 FROM tab0
----
2073
3404
8108

query I rowsort
SELECT ALL - col2 * col2 + col0 AS col1 FROM tab1
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT - col1 * col1 + + col0 AS col2 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT ALL 94 * - col1 + - ( col2 ) + - col0 FROM tab2 AS cor0
----
-1715
-2948
-5650

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-464
SELECT cor0.col0 - + col0 * CAST( - col1 AS SIGNED ) AS col0 FROM tab2 cor0
----
1422
224
4680

skipif mysql # not compatible
query I rowsort label-464
SELECT cor0.col0 - + col0 * CAST ( - col1 AS INTEGER ) AS col0 FROM tab2 cor0
----
1422
224
4680

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

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

query I rowsort
SELECT ALL - - col2 + col2 AS col2 FROM tab1 AS cor0
----
108
114
192

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

query I rowsort
SELECT ALL 79 * col0 * - col2 FROM tab1 AS cor0
----
-12798
-288192
-606720

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

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

query I rowsort
SELECT - col1 + cor0.col0 * - 63 FROM tab2 AS cor0
----
-472
-4973
-4994

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-473
SELECT DISTINCT col1 + ( - col2 ) DIV col0 + CAST( col0 AS SIGNED ) AS col1 FROM tab2 cor0
----
137
35
96

skipif mysql # not compatible
query I rowsort label-473
SELECT DISTINCT col1 + ( - col2 ) / col0 + CAST ( col0 AS INTEGER ) AS col1 FROM tab2 cor0
----
137
35
96

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

query I rowsort
SELECT DISTINCT + col2 + - col0 + + 6 FROM tab0 AS cor0
----
-1
-28
15

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

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

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

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

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

query I rowsort
SELECT ALL col2 + + ( col1 ) * - col2 * 57 AS col0 FROM tab1 AS cor0
----
-32433
-71040
-79974

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

query I rowsort
SELECT + cor0.col1 + col1 * - 9 AS col0 FROM tab2 AS cor0
----
-136
-248
-472

query I rowsort
SELECT - 66 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to cd4a3594ee8b45223ebf9f25840cd112

onlyif mysql # use DIV operator for integer division
query I rowsort label-485
SELECT ALL col0 * col1 DIV col0 - + col0 * - col2 FROM tab0 AS cor0
----
132
7389
878

skipif mysql # not compatible
query I rowsort label-485
SELECT ALL col0 * col1 / col0 - + col0 * - col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + cor0.col1 FROM tab0, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col2 + - tab1.col1 * tab1.col1 + col2 * + col0 col0 FROM tab1
----
16727
2402
6797

query I rowsort
SELECT + col2 + col2 + col2 FROM tab0
----
246
3
99

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

query I rowsort
SELECT + 47 + tab1.col1 FROM tab1
----
57
60
73

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

skipif mysql # not compatible
query I rowsort label-494
SELECT ALL + CAST ( - col2 AS INTEGER ) + col1 FROM tab1 cor0
----
-28
-47
-83

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

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

skipif mysql # not compatible
query I rowsort label-496
SELECT DISTINCT CAST ( - 66 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-497
SELECT ALL col0 * col1 * col0 + + CAST( - 88 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
106009
1431
358868

skipif mysql # not compatible
query I rowsort label-497
SELECT ALL col0 * col1 * col0 + + CAST ( - 88 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
106009
1431
358868

query I rowsort
SELECT ALL - 82 + + 36 * col2 FROM tab2 AS cor0
----
1286
854
890

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

query I rowsort
SELECT DISTINCT - 57 FROM tab1 AS cor0
----
-57

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

query I rowsort
SELECT ( 49 ) FROM tab0 AS cor0
----
49
49
49

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

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

query I rowsort
SELECT DISTINCT - col0 * + col0 + - col0 * col2 FROM tab1 AS cor0
----
-14080
-171
-7744

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-507
SELECT DISTINCT - - 26 + col1 DIV ( col0 ) AS col0 FROM tab2 AS cor0
----
26
30

skipif mysql # not compatible
query I rowsort label-507
SELECT DISTINCT - - 26 + col1 / ( col0 ) AS col0 FROM tab2 AS cor0
----
26
30

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-510
SELECT + col0 DIV + col2 + + col0 FROM tab1 cor0
----
3
65
80

skipif mysql # not compatible
query I rowsort label-510
SELECT + col0 / + col2 + + col0 FROM tab1 cor0
----
3
65
80

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

query I rowsort
SELECT DISTINCT 50 * - col2 + 28 FROM tab1 AS cor0
----
-2672
-2822
-4772

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

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

query I rowsort
SELECT 57 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT + 6 * - 3 FROM tab2
----
-18
-18
-18

query I rowsort
SELECT ALL 91 - - 8 * col1 FROM tab1
----
171
195
299

query I rowsort
SELECT ALL ( tab1.col1 ) * col0 - 95 AS col1 FROM tab1
----
-17
545
945

query I rowsort
SELECT DISTINCT + col2 * tab0.col1 * + col0 - ( col0 ) * + col0 AS col0 FROM tab0
----
2170
656197
67536

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + 96 * + 82 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 89ce77171255312d4009200b8428e9da

query I rowsort
SELECT DISTINCT - col1 * - col1 * - 40 FROM tab1 AS cor0
----
-27040
-4000
-6760

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 2ba47a833971d4c4b0287e849fb0cfb8

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

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

query I rowsort
SELECT - tab0.col2 * col0 + + col2 AS col0 FROM tab0
----
-34
-7216
-759

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col0 * tab0.col0 col1 FROM tab0
----
1322
662
8012

query I rowsort
SELECT ( - col1 ) * + col2 * + 16 FROM tab1
----
-19968
-22464
-9120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 78 + col1 + col1 col2 FROM tab1
----
104
130
98

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

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

query I rowsort
SELECT DISTINCT 63 * tab0.col1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
5418
5733
6111

query I rowsort
SELECT DISTINCT - + col0 + col1 * col0 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
177480
329280
736920

query I rowsort
SELECT ALL + cor0.col2 FROM tab1, tab0, tab0 cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - 81 * + col2 AS col0 FROM tab0
----
-2673
-6642
-81

query I rowsort
SELECT - tab2.col1 + col0 + + 25 FROM tab2
----
1
44
87

query I rowsort
SELECT col1 * col2 + 59 FROM tab1
----
1307
1463
629

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

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

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

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # use DIV operator for integer division
query I rowsort label-549
SELECT DISTINCT col1 DIV 15 AS col0 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-549
SELECT DISTINCT col1 / 15 AS col0 FROM tab1
----
0
1

query I rowsort
SELECT - tab0.col1 + + ( 73 ) * + cor0.col1 AS col1 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to 7299c8cecde33c3b9e3c5f19b4a8520f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-551
SELECT ALL + CAST( 23 AS SIGNED ) * cor0.col2 + + col2 FROM tab0 AS cor0
----
1968
24
792

skipif mysql # not compatible
query I rowsort label-551
SELECT ALL + CAST ( 23 AS INTEGER ) * cor0.col2 + + col2 FROM tab0 AS cor0
----
1968
24
792

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

query I rowsort
SELECT + ( - col0 ) + - col0 * + 14 FROM tab0 AS cor0
----
-1335
-360
-525

query I rowsort
SELECT DISTINCT + col2 + 97 * col0 * - 54 FROM tab2 AS cor0
----
-36639
-408538
-413764

query I rowsort
SELECT DISTINCT 90 + - col2 FROM tab0 cor0
----
57
8
89

query I rowsort
SELECT + 35 * + col2 FROM tab0 AS cor0
----
1155
2870
35

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-561
SELECT DISTINCT - CAST ( - cor0.col2 AS INTEGER ) + col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

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

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

query I rowsort
SELECT DISTINCT 44 * + col2 AS col0 FROM tab0 AS cor0
----
1452
3608
44

query I rowsort
SELECT ALL + 40 * 65 + - col2 * 93 * - 22 + + col0 FROM tab2 AS cor0
----
55874
57849
80427

query I rowsort
SELECT 57 FROM tab2, tab2 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col0 col0 FROM tab1
----
3
64
80

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

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + col0 AS REAL ) / col0 - ( ( cor0.col0 ) ) AS col0 FROM tab1 cor0
----
-2
-63
-79

query I rowsort
SELECT col1 + - 4 AS col2 FROM tab2 AS cor0
----
13
27
55

query I rowsort
SELECT + col1 + - cor0.col1 * col0 AS col2 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL - col2 * - col2 + 65 AS col0 FROM tab1
----
2981
3314
9281

query I rowsort
SELECT ALL col2 * 42 FROM tab2
----
1092
1134
1596

onlyif mysql # use DIV operator for integer division
query I rowsort label-575
SELECT + ( col2 ) DIV col1 + col1 col0 FROM tab2 AS cor0
----
19
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-575
SELECT + ( col2 ) / col1 + col1 col0 FROM tab2 AS cor0
----
19
31
59

query I rowsort
SELECT + 85 - ( col1 ) FROM tab1 AS cor0
----
59
72
75

query I rowsort
SELECT ( 9 ) FROM tab0 AS cor0
----
9
9
9

query I rowsort
SELECT DISTINCT - - 71 + col0 * col1 * + col1 - col2 FROM tab2 AS cor0
----
22864
271563
6771

query I rowsort
SELECT ALL - cor0.col2 + cor0.col0 + + cor0.col0 FROM tab0 AS cor0
----
15
69
96

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

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

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

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

query I rowsort
SELECT + - 19 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
190
247
494

query I rowsort
SELECT DISTINCT + col1 + + col0 * + col2 + col1 FROM tab2 cor0
----
2146
251
3036

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

query I rowsort
SELECT ( - col0 ) * + 50 FROM tab0 cor0
----
-1200
-1750
-4450

query I rowsort
SELECT + + 28 + col2 * - 53 AS col0 FROM tab0 cor0
----
-1721
-25
-4318

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

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

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

query I rowsort
SELECT ALL - 55 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT ALL col1 + + 93 * - col0 FROM tab2 AS cor0
----
-620
-7195
-7330

onlyif mysql # use DIV operator for integer division
query I rowsort label-592
SELECT DISTINCT col2 DIV ( - col2 ) FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-592
SELECT DISTINCT col2 / ( - col2 ) FROM tab0 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + 11 * - col0 col1 FROM tab2 AS cor0
----
-108
-886
-917

query I rowsort
SELECT DISTINCT + - col2 * - 85 AS col0 FROM tab0 AS cor0
----
2805
6970
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * - 98 * col0 col0 FROM tab1 AS cor0
----
101920
62720
7644

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

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

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

query I rowsort
SELECT DISTINCT - 61 FROM tab2
----
-61

query I rowsort
SELECT + 49 + col0 AS col0 FROM tab2
----
127
128
56

query I rowsort
SELECT ALL - 61 + - col2 + - col0 FROM tab0
----
-118
-232
-97

query I rowsort
SELECT DISTINCT + + cor0.col1 FROM tab2 cor0
----
17
31
59

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

query I rowsort
SELECT - cor0.col1 FROM tab0, tab0 cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-607
SELECT ALL - 94 DIV 77 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

skipif mysql # not compatible
query I rowsort label-607
SELECT ALL - 94 / 77 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

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

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

skipif mysql # not compatible
query I rowsort label-609
SELECT + col2 / + 96 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 * 83 AS col2 FROM tab1 AS cor0
----
-249
-5312
-6640

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

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

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

query I rowsort
SELECT DISTINCT 19 + - col2 AS col2 FROM tab0 AS cor0
----
-14
-63
18

query I rowsort
SELECT 59 * col2 + - ( col2 ) * + col1 AS col1 FROM tab2 AS cor0
----
0
1596
756

query I rowsort
SELECT DISTINCT - - 70 FROM tab1 AS cor0
----
70

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

query I rowsort
SELECT - tab0.col1 * - 39 AS col0 FROM tab0
----
3354
3549
3783

query I rowsort
SELECT - + col2 * cor0.col0 * col2 + 34 * col0 - + cor0.col1 FROM tab2 AS cor0
----
-111407
-4896
-50135

query I rowsort
SELECT 85 + - col2 * - 91 FROM tab1
----
4999
5272
8821

query I rowsort
SELECT - tab2.col0 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT - col1 * + col1 * - ( + 90 ) - col1 FROM tab1
----
15197
60814
8990

onlyif mysql # use DIV operator for integer division
query I rowsort label-623
SELECT DISTINCT col2 DIV col0 + col0 * - col1 FROM tab2
----
-1343
-214
-4602

skipif mysql # not compatible
query I rowsort label-623
SELECT DISTINCT col2 / col0 + col0 * - col1 FROM tab2
----
-1343
-214
-4602

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

query I rowsort
SELECT + col0 + - col0 * - 12 FROM tab0
----
1157
312
455

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

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

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

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

query I rowsort
SELECT - 34 * - col2 FROM tab0 AS cor0
----
1122
2788
34

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

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

query I rowsort
SELECT col1 + col0 + col0 FROM tab1
----
138
173
32

query I rowsort
SELECT DISTINCT + col1 - 6 AS col0 FROM tab1
----
20
4
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 16 + + col0 col0 FROM tab0 AS cor0
----
19
73
8

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

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

query I rowsort
SELECT - col0 * + 88 + - tab2.col0 - - tab2.col2 FROM tab2
----
-596
-6916
-6993

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - + ( + 34 ) * col2 col0 FROM tab1
----
-1810
-1928
-3251

query I rowsort
SELECT ALL - col0 + - 75 * tab0.col1 FROM tab0
----
-6474
-6914
-7310

query I rowsort
SELECT ALL + 32 FROM tab2, tab2 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-642
SELECT DISTINCT CAST( + col2 AS SIGNED ) * - tab1.col2 + 82 FROM tab1
----
-2834
-3167
-9134

skipif mysql # not compatible
query I rowsort label-642
SELECT DISTINCT CAST ( + col2 AS INTEGER ) * - tab1.col2 + 82 FROM tab1
----
-2834
-3167
-9134

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

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

query I rowsort
SELECT + tab0.col2 * 61 AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to aa046f259654ffc9aa7d51b683567d20

onlyif mysql # use DIV operator for integer division
query I rowsort label-646
SELECT ALL ( + 97 ) * col2 + 4 * 59 DIV + col0 FROM tab2
----
2525
2652
3688

skipif mysql # not compatible
query I rowsort label-646
SELECT ALL ( + 97 ) * col2 + 4 * 59 / + col0 FROM tab2
----
2525
2652
3688

query I rowsort
SELECT ALL + ( - 3 ) + col1 * - col2 FROM tab0
----
-100
-2841
-7465

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-650
SELECT + - col1 DIV col1 + - col1 + 24 DIV - col1 AS col1 FROM tab2 AS cor0
----
-19
-32
-60

skipif mysql # not compatible
query I rowsort label-650
SELECT + - col1 / col1 + - col1 + 24 / - col1 AS col1 FROM tab2 AS cor0
----
-19
-32
-60

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

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

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

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

query I rowsort
SELECT - 43 * - col0 - - col2 FROM tab2
----
328
3380
3435

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

query I rowsort
SELECT DISTINCT + 75 + + col1 FROM tab1 AS cor0
----
101
85
88

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

query I rowsort
SELECT ALL - 43 FROM tab2
----
-43
-43
-43

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

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

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

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

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

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

query I rowsort
SELECT ALL - - col1 * cor0.col0 + 45 AS col1 FROM tab1 AS cor0
----
1085
123
685

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

query I rowsort
SELECT DISTINCT col1 - 65 AS col0 FROM tab2 AS cor0
----
-34
-48
-6

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-669
SELECT col1 DIV + 11 FROM tab2 AS cor0
----
1
2
5

skipif mysql # not compatible
query I rowsort label-669
SELECT col1 / + 11 FROM tab2 AS cor0
----
1
2
5

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-671
SELECT ALL cor0.col2 * + CAST( col2 AS SIGNED ) * cor0.col0 FROM tab2 cor0
----
114076
5103
52728

skipif mysql # not compatible
query I rowsort label-671
SELECT ALL cor0.col2 * + CAST ( col2 AS INTEGER ) * cor0.col0 FROM tab2 cor0
----
114076
5103
52728

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

query I rowsort
SELECT ALL col2 * col1 + + cor0.col0 + + col1 * col2 FROM tab1 AS cor0
----
1204
2576
2811

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

query I rowsort
SELECT DISTINCT + col1 * + col0 + - ( col2 + cor0.col1 ) * - col0 AS col1 FROM tab2 AS cor0
----
11232
5688
623

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

query I rowsort
SELECT DISTINCT - col2 * ( col0 ) + + col2 * col2 AS col0 FROM tab1 AS cor0
----
-399
1536
2754

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

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

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

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

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

query I rowsort
SELECT DISTINCT 5 * + cor0.col0 FROM tab0, tab2 AS cor0
----
35
390
395

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

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

query I rowsort
SELECT ALL 16 + col2 * - col2 FROM tab1 AS cor0
----
-2900
-3233
-9200

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

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

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

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

query I rowsort
SELECT col0 * ( 92 ) * + col0 + + 6 FROM tab0
----
112706
52998
728738

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

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

query I rowsort
SELECT ALL - col2 + col2 * - 86 FROM tab2 AS cor0
----
-2262
-2349
-3306

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - col2 + 20 AS col0 FROM tab0
----
-13
-62
19

query I rowsort
SELECT tab2.col1 * - 95 AS col1 FROM tab2
----
-1615
-2945
-5605

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

skipif mysql # not compatible
query I rowsort label-702
SELECT + - 16 / col0 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT + col1 + col0 + + 54 * ( + cor0.col1 ) AS col2 FROM tab0 AS cor0
----
4754
5094
5370

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

query I rowsort
SELECT 14 * + cor0.col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 19cdf2e63d73f2e95474e66cad10eb35

query I rowsort
SELECT DISTINCT - 12 + + col0 FROM tab0
----
12
23
77

query I rowsort
SELECT 50 + - col0 AS col1 FROM tab0
----
-39
15
26

query I rowsort
SELECT - 94 + col2 AS col2 FROM tab0
----
-12
-61
-93

query I rowsort
SELECT + col2 + - col2 * - ( 52 ) * + col2 AS col1 FROM tab0
----
349730
53
56661

query I rowsort
SELECT - 52 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-711
SELECT ( - tab1.col0 ) + CAST( + 77 AS SIGNED ) * col1 AS col0 FROM tab1
----
1999
706
921

skipif mysql # not compatible
query I rowsort label-711
SELECT ( - tab1.col0 ) + CAST ( + 77 AS INTEGER ) * col1 AS col0 FROM tab1
----
1999
706
921

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

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

query I rowsort
SELECT DISTINCT + - col1 + col2 * col0 * 26 AS col2 FROM tab0 cor0
----
189657
20506
813

query I rowsort
SELECT ( col0 ) + 18 FROM tab1 cor0
----
21
82
98

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

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

query I rowsort
SELECT - 81 FROM tab1
----
-81
-81
-81

query I rowsort
SELECT - 90 FROM tab1
----
-90
-90
-90

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

query I rowsort
SELECT - 83 + - col2 FROM tab2 AS cor0
----
-109
-110
-121

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

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

query I rowsort
SELECT ALL 82 - cor1.col2 AS col1 FROM tab1, tab2 cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to f6aacdf8c412916d9dbfa609a1f358ff

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

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

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0, tab0 cor1
----
243 values hashing to 3581f59ff9574f9d6290fc6bca0b5e4d

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

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

skipif mysql # not compatible
query I rowsort label-727
SELECT - cor0.col0 / col1 AS col1 FROM tab1 AS cor0
----
-6
-6
0

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

query I rowsort
SELECT + 46 * - col2 FROM tab2 AS cor0
----
-1196
-1242
-1748

query I rowsort
SELECT tab0.col1 * col0 * - col1 + - 16 * - col1 AS col2 FROM tab0
----
-176128
-327763
-735553

query I rowsort
SELECT DISTINCT - 0 AS col0 FROM tab1
----
0

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

query I rowsort
SELECT 91 * + col0 + - 30 FROM tab2 AS cor0
----
607
7068
7159

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

query I rowsort
SELECT DISTINCT col0 * 51 - col1 * col2 AS col2 FROM tab1 AS cor0
----
-1251
2694
2832

query I rowsort
SELECT ALL 75 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT + 18 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 cor2
----
81 values hashing to a13db73ec93475d2821cb4a6d0eff298

query I rowsort
SELECT + col1 + + 93 FROM tab1 AS cor0
----
103
106
119

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

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

query I rowsort
SELECT DISTINCT - + col2 + + cor0.col1 - + 78 FROM tab2 AS cor0
----
-45
-74
-99

query I rowsort
SELECT + col2 * - 45 AS col1 FROM tab0 cor0
----
-1485
-3690
-45

query I rowsort
SELECT - + col0 + + col1 + - col2 FROM tab2 AS cor0
----
-100
-3
-45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-744
SELECT - CAST( - col0 AS SIGNED ) + col0 * 94 AS col0 FROM tab1 cor0
----
285
6080
7600

skipif mysql # not compatible
query I rowsort label-744
SELECT - CAST ( - col0 AS INTEGER ) + col0 * 94 AS col0 FROM tab1 cor0
----
285
6080
7600

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

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

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

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

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

query I rowsort
SELECT col0 * + 90 FROM tab0 cor0
----
2160
3150
8010

query I rowsort
SELECT - ( 86 ) + - col1 * - col0 FROM tab1 AS cor0
----
-8
554
954

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-752
SELECT DISTINCT - CAST( col0 AS SIGNED ) FROM tab1 cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-752
SELECT DISTINCT - CAST ( col0 AS INTEGER ) FROM tab1 cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-753
SELECT - col1 DIV - col2 + col0 * ( + col1 ) + cor0.col1 col1 FROM tab0 cor0
----
2152
3589
8191

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-753
SELECT - col1 / - col2 + col0 * ( + col1 ) + cor0.col1 col1 FROM tab0 cor0
----
2152
3589
8191

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

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

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

query I rowsort
SELECT ALL + 76 FROM tab0 AS cor0
----
76
76
76

query I rowsort
SELECT ALL - - ( + 89 ) + col2 AS col0 FROM tab1 AS cor0
----
143
146
185

query I rowsort
SELECT + 53 * - col0 + + col2 * col1 + col2 * - col2 AS col0 FROM tab0 cor0
----
-1759
-3979
477

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

skipif mysql # not compatible
query I rowsort label-760
SELECT DISTINCT + CAST ( col2 AS INTEGER ) + + cor0.col1 * col2 FROM tab0 cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-761
SELECT ALL - 99 * col0 DIV - col2 FROM tab0 AS cor0
----
107
3465
72

skipif mysql # not compatible
query I rowsort label-761
SELECT ALL - 99 * col0 / - col2 FROM tab0 AS cor0
----
107
3465
72

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-763
SELECT DISTINCT - 41 + - col0 DIV 78 FROM tab0 AS cor0
----
-41
-42

skipif mysql # not compatible
query I rowsort label-763
SELECT DISTINCT - 41 + - col0 / 78 FROM tab0 AS cor0
----
-41
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + col2 * col0 + + col2 col0 FROM tab1 AS cor0
----
219
3769
7856

query I rowsort
SELECT ALL + - col1 * ( + cor0.col2 ) + - col2 * - col0 AS col0 FROM tab1 AS cor0
----
-1242
3078
6432

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

query I rowsort
SELECT ALL - col1 * 12 * - col0 FROM tab0 AS cor0
----
24768
40740
97188

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-769
SELECT ALL cor1.col1 DIV - 72 AS col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

skipif mysql # not compatible
query I rowsort label-769
SELECT ALL cor1.col1 / - 72 AS col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-771
SELECT + cor0.col0 DIV 7 + 3 FROM tab2, tab0 AS cor0
----
9 values hashing to 0201278f8492b40103dae684826c494e

skipif mysql # not compatible
query I rowsort label-771
SELECT + cor0.col0 / 7 + 3 FROM tab2, tab0 AS cor0
----
9 values hashing to 0201278f8492b40103dae684826c494e

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

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

query I rowsort
SELECT - col0 * 38 AS col0 FROM tab2
----
-266
-2964
-3002

query I rowsort
SELECT ALL - col1 * - 4 FROM tab1
----
104
40
52

query I rowsort
SELECT col0 * ( col2 ) + col0 * 64 + col1 FROM tab0 cor0
----
13085
2372
2414

query I rowsort
SELECT - + col2 + 3 * col2 AS col0 FROM tab2 AS cor0
----
52
54
76

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

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

query I rowsort
SELECT col1 * + 27 FROM tab0
----
2322
2457
2619

query I rowsort
SELECT col1 * + 22 + - col2 * + col2 AS col0 FROM tab1
----
-2344
-3029
-8930

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

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

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

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

query I rowsort
SELECT ALL + col0 + + 14 FROM tab1 cor0
----
17
78
94

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

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

query I rowsort
SELECT DISTINCT - col1 + - col0 + + col0 FROM tab1 AS cor0
----
-10
-13
-26

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

query I rowsort
SELECT ALL col1 + + col1 FROM tab2 AS cor0
----
118
34
62

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

query I rowsort
SELECT + col1 * 30 FROM tab1 AS cor0
----
300
390
780

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 51 - + tab1.col0 col1 FROM tab1
----
-13
-29
48

query I rowsort
SELECT + col0 + col1 * 27 AS col0 FROM tab2 AS cor0
----
1671
538
844

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-798
SELECT - + col1 - - col1 * col2 DIV + col0 FROM tab2 AS cor0
----
-40
-9
88

skipif mysql # not compatible
query I rowsort label-798
SELECT - + col1 - - col1 * col2 / + col0 FROM tab2 AS cor0
----
-40
-9
88

query I rowsort
SELECT DISTINCT 81 * 8 AS col1 FROM tab2, tab1 cor0
----
648

query I rowsort
SELECT 86 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT + 85 + + 66 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to cf22002891a88578dbc2596c0472ad61

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

skipif mysql # not compatible
query I rowsort label-802
SELECT DISTINCT CAST ( NULL AS INTEGER ) - - 61 * cor0.col1 AS col0 FROM tab0, tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + col1 * - col2 * - 51 AS col2 FROM tab1 AS cor0
----
29070
63648
71604

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

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

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

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

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

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

query I rowsort
SELECT ALL - col1 * + col0 * col0 + - 18 FROM tab1
----
-252
-40978
-83218

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

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

query I rowsort
SELECT DISTINCT - 93 * col0 * + ( - col2 ) FROM tab0
----
3255
678714
73656

query I rowsort
SELECT - tab2.col2 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT DISTINCT 47 * 48 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
2256

query I rowsort
SELECT - col2 * 61 * + ( + cor0.col2 ) FROM tab0 cor0
----
-410164
-61
-66429

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

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-826
SELECT - cor0.col2 + col0 * col2 DIV - col1 AS col2 FROM tab0 AS cor0
----
-1
-162
-42

skipif mysql # not compatible
query I rowsort label-826
SELECT - cor0.col2 + col0 * col2 / - col1 AS col2 FROM tab0 AS cor0
----
-1
-162
-42

query I rowsort
SELECT DISTINCT - 41 FROM tab2
----
-41

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

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

query I rowsort
SELECT + 71 * - 69 FROM tab0
----
-4899
-4899
-4899

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

skipif mysql # not compatible
query I rowsort label-831
SELECT ALL 80 / - col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-11

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-833
SELECT - - CAST( + 75 AS SIGNED ) + - col1 FROM tab2 cor0
----
16
44
58

skipif mysql # not compatible
query I rowsort label-833
SELECT - - CAST ( + 75 AS INTEGER ) + - col1 FROM tab2 cor0
----
16
44
58

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-836
SELECT DISTINCT - 88 DIV - col0 col2 FROM tab0 AS cor0
----
0
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-836
SELECT DISTINCT - 88 / - col0 col2 FROM tab0 AS cor0
----
0
2
3

query I rowsort
SELECT DISTINCT - 91 + + cor0.col0 * - col0 FROM tab2 AS cor0
----
-140
-6175
-6332

query I rowsort
SELECT + + col1 + + cor0.col0 * + 12 FROM tab0 cor0
----
1159
374
517

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-844
SELECT ALL + 85 DIV col0 FROM tab0 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-844
SELECT ALL + 85 / col0 FROM tab0 AS cor0
----
0
2
3

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

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

query I rowsort
SELECT - col1 + col1 * + col1 + - col2 * - col1 FROM tab1
----
1404
2054
660

onlyif mysql # use DIV operator for integer division
query I rowsort label-848
SELECT ALL 96 + - col1 + - col2 * col1 DIV + col0 AS col1 FROM tab1
----
-398
68
78

skipif mysql # not compatible
query I rowsort label-848
SELECT ALL 96 + - col1 + - col2 * col1 / + col0 AS col1 FROM tab1
----
-398
68
78

query I rowsort
SELECT - 66 * - cor0.col1 FROM tab2 AS cor0
----
1122
2046
3894

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

query I rowsort
SELECT - + ( + 94 ) + col2 AS col1 FROM tab1 AS cor0
----
-37
-40
2

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

skipif mysql # not compatible
query I rowsort label-852
SELECT + CAST ( + col2 AS INTEGER ) * col1 + col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT 58 AS col1 FROM tab0, tab2 cor0, tab2 AS cor1, tab2 cor2
----
81 values hashing to 793ce5fda3f22b0a251dca7e8a07baed

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

query I rowsort
SELECT DISTINCT - ( - 82 ) FROM tab0 AS cor0 CROSS JOIN tab2, tab2 cor1
----
82

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT col2 * col0 + + col1 * col0 FROM tab2 cor0
----
406
4345
6630

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

query I rowsort
SELECT DISTINCT ( col0 * + col2 + 62 ) FROM tab2
----
2090
251
3064

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

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

query I rowsort
SELECT + - 38 + - tab2.col0 AS col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 4b8405698565f1590ec05968f8fbed5d

query I rowsort
SELECT DISTINCT 6 + + col2 FROM tab0
----
39
7
88

query I rowsort
SELECT col0 * - col2 + col2 FROM tab0
----
-34
-7216
-759

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

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

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

query I rowsort
SELECT - + cor0.col1 + ( 63 ) FROM tab2 AS cor0
----
32
4
46

query I rowsort
SELECT ALL cor0.col0 + 26 * - cor0.col1 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 5120ab356e0d733b54c59f154668e9ab

query I rowsort
SELECT DISTINCT - 49 + + cor0.col1 + cor0.col2 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
18
31
60

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

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

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

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

skipif mysql # not compatible
query I rowsort label-877
SELECT ALL 53 / col0 FROM tab0
----
0
1
2

query I rowsort
SELECT ( 70 ) AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

query I rowsort
SELECT ALL col1 - ( - ( - col2 ) ) AS col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT 87 FROM tab2, tab0 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

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

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

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

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

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

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

query I rowsort
SELECT + - col2 + + col0 + col2 * + col0 AS col1 FROM tab1 AS cor0
----
111
3655
7664

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-887
SELECT DISTINCT + col1 - CAST( 90 AS SIGNED ) * tab0.col0 AS col1 FROM tab0
----
-2074
-3053
-7919

skipif mysql # not compatible
query I rowsort label-887
SELECT DISTINCT + col1 - CAST ( 90 AS INTEGER ) * tab0.col0 AS col1 FROM tab0
----
-2074
-3053
-7919

onlyif mysql # use DIV operator for integer division
query I rowsort label-888
SELECT + col2 + + col1 DIV 67 - + col1 FROM tab1
----
28
47
83

skipif mysql # not compatible
query I rowsort label-888
SELECT + col2 + + col1 / 67 - + col1 FROM tab1
----
28
47
83

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

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

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

query I rowsort
SELECT DISTINCT col1 + 8 * + col2 FROM tab2
----
247
267
321

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

skipif mysql # not compatible
query I rowsort label-892
SELECT ALL + col2 / - col2 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-896
SELECT CAST( 73 AS SIGNED ) * - cor0.col1 DIV col1 AS col2 FROM tab0 cor0
----
-73
-73
-73

skipif mysql # not compatible
query I rowsort label-896
SELECT CAST ( 73 AS INTEGER ) * - cor0.col1 / col1 AS col2 FROM tab0 cor0
----
-73
-73
-73

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

query I rowsort
SELECT - cor0.col1 * - 48 + + col1 FROM tab0 cor0
----
4214
4459
4753

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-899
SELECT ALL - 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-899
SELECT ALL - CAST ( NULL AS INTEGER ) * - col1 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-900
SELECT + + ( col0 ) + - col0 DIV 29 FROM tab1 AS cor0
----
3
62
78

skipif mysql # not compatible
query I rowsort label-900
SELECT + + ( col0 ) + - col0 / 29 FROM tab1 AS cor0
----
3
62
78

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-903
SELECT + CAST( 60 AS SIGNED ) + + col2 * ( cor0.col0 * - col1 ) AS col1 FROM tab0 cor0
----
-3335
-664058
-68052

skipif mysql # not compatible
query I rowsort label-903
SELECT + CAST ( 60 AS INTEGER ) + + col2 * ( cor0.col0 * - col1 ) AS col1 FROM tab0 cor0
----
-3335
-664058
-68052

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-907
SELECT DISTINCT - col0 + ( col1 ) DIV 85 - col1 FROM tab0 AS cor0
----
-109
-131
-179

skipif mysql # not compatible
query I rowsort label-907
SELECT DISTINCT - col0 + ( col1 ) / 85 - col1 FROM tab0 AS cor0
----
-109
-131
-179

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-909
SELECT ALL - col1 + + ( col1 ) * + CAST( - cor0.col1 AS SIGNED ) FROM tab1 AS cor0
----
-110
-182
-702

skipif mysql # not compatible
query I rowsort label-909
SELECT ALL - col1 + + ( col1 ) * + CAST ( - cor0.col1 AS INTEGER ) FROM tab1 AS cor0
----
-110
-182
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-910
SELECT + + col1 DIV 88 + + col0 * - ( - col0 ) * cor0.col0 AS col2 FROM tab0 AS cor0
----
13824
42876
704970

skipif mysql # not compatible
query I rowsort label-910
SELECT + + col1 / 88 + + col0 * - ( - col0 ) * cor0.col0 AS col2 FROM tab0 AS cor0
----
13824
42876
704970

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - ( + col0 ) + 63 * col1 AS col0 FROM tab0 AS cor0
----
5394
5644
6076

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

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

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

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

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

query I rowsort
SELECT ALL + col1 + col2 * 38 FROM tab0 cor0
----
1340
135
3207

query I rowsort
SELECT + 11 FROM tab2 AS cor0
----
11
11
11

query I rowsort
SELECT - 94 + col1 FROM tab2 AS cor0
----
-35
-63
-77

query I rowsort
SELECT DISTINCT + 80 + + col1 AS col2 FROM tab1 AS cor0
----
106
90
93

query I rowsort
SELECT + - 29 * col1 AS col1 FROM tab2 AS cor0
----
-1711
-493
-899

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

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

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

query I rowsort
SELECT DISTINCT + + col1 + + col1 * 25 FROM tab2 AS cor0
----
1534
442
806

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

query I rowsort
SELECT DISTINCT - 88 FROM tab1
----
-88

query I rowsort
SELECT ALL - ( + col0 ) * - col0 + 5 * + col2 FROM tab0 AS cor0
----
1230
741
8331

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 84 - 20 FROM tab2 AS cor0
----
-104

query I rowsort
SELECT - col0 + - 32 AS col0 FROM tab1 AS cor0
----
-112
-35
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 87 - 62 col1 FROM tab1 AS cor0
----
-149

onlyif mysql # use DIV operator for integer division
query I rowsort label-947
SELECT ALL + 65 DIV col0 + col1 AS col1 FROM tab0 AS cor0
----
88
91
98

skipif mysql # not compatible
query I rowsort label-947
SELECT ALL + 65 / col0 + col1 AS col1 FROM tab0 AS cor0
----
88
91
98

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

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

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

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

query I rowsort
SELECT - cor1.col0 * - 68 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9f35e33e4ecb2a7ab4a8eabcd2625998

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

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

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

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

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

query I rowsort
SELECT ALL col1 * - 78 + col1 - + col0 FROM tab1 AS cor0
----
-1081
-2005
-834

query I rowsort
SELECT DISTINCT - col1 * + col1 + col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT - col0 * ( + col0 * + col2 ) + 26 + + 76 * - col0 AS col2 FROM tab1 AS cor0
----
-238310
-620454
-688

query I rowsort
SELECT + - col1 * + ( + 67 ) - col2 AS col2 FROM tab1 AS cor0
----
-1796
-727
-967

query I rowsort
SELECT - 29 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 56a8aa9e4c5d3c934d1853afeb22653e

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-967
SELECT DISTINCT - col1 * col0 + - 95 DIV + col1 FROM tab0
----
-2065
-3395
-8100

skipif mysql # not compatible
query I rowsort label-967
SELECT DISTINCT - col1 * col0 + - 95 / + col1 FROM tab0
----
-2065
-3395
-8100

query I rowsort
SELECT DISTINCT + + ( 11 ) + cor0.col2 FROM tab1 AS cor0
----
107
65
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-969
SELECT ALL + col2 + + col1 * cor0.col0 DIV ( - col0 + - col2 ) FROM tab1 AS cor0
----
52
53
91

skipif mysql # not compatible
query I rowsort label-969
SELECT ALL + col2 + + col1 * cor0.col0 / ( - col0 + - col2 ) FROM tab1 AS cor0
----
52
53
91

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-971
SELECT col1 * - ( + col1 ) * - col0 + - ( + 88 ) DIV - tab1.col2 FROM tab1
----
13520
2029
6401

skipif mysql # not compatible
query I rowsort label-971
SELECT col1 * - ( + col1 ) * - col0 + - ( + 88 ) / - tab1.col2 FROM tab1
----
13520
2029
6401

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-973
SELECT ALL - col1 + tab0.col2 + 39 DIV col0 FROM tab0
----
-52
-9
-95

skipif mysql # not compatible
query I rowsort label-973
SELECT ALL - col1 + tab0.col2 + 39 / col0 FROM tab0
----
-52
-9
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-974
SELECT ALL tab1.col1 DIV col0 + - 28 + col0 col0 FROM tab1
----
-17
36
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-974
SELECT ALL tab1.col1 / col0 + - 28 + col0 col0 FROM tab1
----
-17
36
52

query I rowsort
SELECT cor1.col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

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

query I rowsort
SELECT ALL col0 + + col2 + + 59 * - col1 FROM tab0
----
-5017
-5198
-5687

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

query I rowsort
SELECT 94 + cor0.col1 FROM tab2 AS cor0
----
111
125
153

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

query I rowsort
SELECT tab0.col0 * ( 65 ) + col0 * ( col0 ) FROM tab0
----
13706
2136
3500

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

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

query I rowsort
SELECT ALL - col1 * 69 AS col2 FROM tab0
----
-5934
-6279
-6693

query I rowsort
SELECT ALL - 88 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 + col2 col0 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT ALL 32 AS col1 FROM tab0 AS cor0
----
32
32
32

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

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

query I rowsort
SELECT ALL 86 + - 25 * + col1 FROM tab2 AS cor0
----
-1389
-339
-689

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 56 col0 FROM tab1, tab0, tab0 cor0
----
27 values hashing to a228dfb9ede9780b082a5a3dfb2fca80

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

query I rowsort
SELECT - 30 + cor0.col1 FROM tab2 cor0
----
-13
1
29

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

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

query I rowsort
SELECT tab1.col0 * col2 + + col2 * col0 AS col2 FROM tab1
----
15360
324
7296

query I rowsort
SELECT ( - cor0.col0 ) FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col2 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-998
SELECT - tab0.col2 + col2 * CAST( 71 AS SIGNED ) AS col0 FROM tab0
----
2310
5740
70

skipif mysql # not compatible
query I rowsort label-998
SELECT - tab0.col2 + col2 * CAST ( 71 AS INTEGER ) AS col0 FROM tab0
----
2310
5740
70

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

query I rowsort
SELECT DISTINCT - col0 * col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

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

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

query I rowsort
SELECT ALL + col2 * 89 FROM tab0 AS cor0
----
2937
7298
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1003
SELECT ALL - col0 * col0 + col2 DIV col0 FROM tab0 AS cor0
----
-1225
-575
-7921

skipif mysql # not compatible
query I rowsort label-1003
SELECT ALL - col0 * col0 + col2 / col0 FROM tab0 AS cor0
----
-1225
-575
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-1004
SELECT + col0 DIV - col2 - - col2 col0 FROM tab0 AS cor0
----
-34
33
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1004
SELECT + col0 / - col2 - - col2 col0 FROM tab0 AS cor0
----
-34
33
81

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

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

query I rowsort
SELECT - + col2 - - ( - 41 ) AS col0 FROM tab0 AS cor0
----
-123
-42
-74

query I rowsort
SELECT - col1 * + 74 + col1 * + col2 * col2 + cor0.col1 FROM tab2 AS cor0
----
20336
23307
35577

query I rowsort
SELECT DISTINCT cor0.col0 + 4 * 77 + col2 FROM tab0 AS cor0
----
344
365
479

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

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

query I rowsort
SELECT - col0 * 7 - col0 FROM tab0 AS cor0
----
-192
-280
-712

query I rowsort
SELECT + col2 + + cor0.col2 * ( 7 ) AS col2 FROM tab1 cor0
----
432
456
768

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

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

query I rowsort
SELECT - 53 - - col2 FROM tab0 AS cor0
----
-20
-52
29

query I rowsort
SELECT col1 * col0 + + ( 29 ) * col2 + col0 FROM tab1 AS cor0
----
1647
2357
3904

query I rowsort
SELECT + col0 + 9 FROM tab0 AS cor0
----
33
44
98

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

query I rowsort
SELECT DISTINCT ( - cor1.col1 ) FROM tab0, tab1 AS cor0, tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT - - col1 * + 48 + - 81 FROM tab2 AS cor0
----
1407
2751
735

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + 22 col1 FROM tab0 AS cor0
----
108
113
119

query I rowsort
SELECT ALL + 75 AS col0 FROM tab2
----
75
75
75

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

query I rowsort
SELECT + - cor0.col0 * 50 AS col1 FROM tab0 AS cor0
----
-1200
-1750
-4450

query I rowsort
SELECT + ( - 12 ) * - col0 AS col0 FROM tab1 AS cor0
----
36
768
960

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

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

query I rowsort
SELECT ALL col0 + - 16 FROM tab2
----
-9
62
63

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

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

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

skipif mysql # not compatible
query I rowsort label-1032
SELECT + CAST ( + 20 AS INTEGER ) * - col1 FROM tab0 cor0
----
-1720
-1820
-1940

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

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

query I rowsort
SELECT ALL - ( 32 * col0 ) FROM tab2
----
-224
-2496
-2528

query I rowsort
SELECT - 10 FROM tab0
----
-10
-10
-10

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

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

query I rowsort
SELECT ALL - 16 AS col1 FROM tab0 AS cor0
----
-16
-16
-16

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * col2 col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - 12 * col2 FROM tab1 AS cor0
----
-1152
-648
-684

query I rowsort
SELECT DISTINCT + 15 * + col1 FROM tab0 AS cor0
----
1290
1365
1455

query I rowsort
SELECT ALL + - 54 - + 30 AS col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 02f1688b8610806ca28739b1735f6ae4

query I rowsort
SELECT - col2 - tab0.col2 AS col1 FROM tab0
----
-164
-2
-66

query I rowsort
SELECT 24 + 1 FROM tab0
----
25
25
25

query I rowsort
SELECT ALL col0 + + col2 * - 90 FROM tab0
----
-2946
-55
-7291

query I rowsort
SELECT ALL + + col0 * - cor0.col2 + 20 * 82 * col1 AS col1 FROM tab2 AS cor0
----
24878
50651
94732

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

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

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

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

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

query I rowsort
SELECT 97 * + col2 - 51 FROM tab0 cor0
----
3150
46
7903

query I rowsort
SELECT cor0.col0 + + col0 + col1 AS col2 FROM tab2 AS cor0
----
175
215
45

query I rowsort
SELECT ALL col0 * col1 * col1 + 94 * + col0 * col1 AS col0 FROM tab2 AS cor0
----
149073
27125
704106

query I rowsort
SELECT ALL ( - 67 ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to b06dbb8370537177bf40dc825f674151

query I rowsort
SELECT + + col1 * col0 + - 62 AS col2 FROM tab2 AS cor0
----
1281
155
4540

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

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

skipif mysql # not compatible
query I rowsort label-1062
SELECT + + 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 ALL + - col1 * + cor0.col2 col1 FROM tab0 AS cor0
----
-2838
-7462
-97

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1066
SELECT ALL col1 / - 73 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + - CAST ( col0 AS REAL ) * col0 + cor0.col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT DISTINCT - 86 * + col2 * + col1 AS col1 FROM tab1 cor0
----
-107328
-120744
-49020

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

query I rowsort
SELECT DISTINCT 90 + + col2 AS col0 FROM tab1
----
144
147
186

query I rowsort
SELECT DISTINCT - tab1.col2 FROM tab1, tab1 cor0
----
-54
-57
-96

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

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

query I rowsort
SELECT + 42 * - col0 FROM tab2
----
-294
-3276
-3318

query I rowsort
SELECT col2 + col0 + col0 FROM tab2
----
182
196
41

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

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

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

skipif mysql # not compatible
query I rowsort label-1078
SELECT DISTINCT - col2 / - col0 + col2 * - col0 * - col2 + - tab0.col0 AS col2 FROM tab0
----
0
26113
598347

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

query I rowsort
SELECT DISTINCT + ( + col1 ) + - col1 * - col2 + + col2 AS col2 FROM tab0
----
195
2957
7635

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * - 16 col2 FROM tab0 AS cor0
----
1424
384
560

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

query I rowsort
SELECT + 80 FROM tab1, tab1 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT DISTINCT - col1 * 96 + 50 FROM tab1 AS cor0
----
-1198
-2446
-910

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 + col0 * + col2 col1 FROM tab0 AS cor0
----
15397
2856
3430

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 * + 31 * ( + col0 ) FROM tab2 AS cor0
----
-142662
-41633
-6727

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

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

query I rowsort
SELECT 7 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

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

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

skipif mysql # not compatible
query I rowsort label-1100
SELECT DISTINCT + CAST ( 56 AS INTEGER ) + col0 + + col1 FROM tab1 AS cor0
----
130
149
85

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

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

query I rowsort
SELECT ALL - 89 - 28 FROM tab0 AS cor0
----
-117
-117
-117

query I rowsort
SELECT DISTINCT col1 + 23 AS col0 FROM tab0 cor0
----
109
114
120

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

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

query I rowsort
SELECT col1 * - 10 * col0 FROM tab0 AS cor0
----
-20640
-33950
-80990

query I rowsort
SELECT ALL - 58 * col1 + + cor0.col1 * - ( - cor0.col0 ) * + cor0.col0 + - col1 * + col0 AS col2 FROM tab0 AS cor0
----
109804
42484
707434

query I rowsort
SELECT DISTINCT col1 - - 4 FROM tab2 AS cor0
----
21
35
63

query I rowsort
SELECT DISTINCT + ( col0 ) * col0 + - col0 AS col1 FROM tab0 cor0
----
1190
552
7832

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

query I rowsort
SELECT ( 42 ) FROM tab1 cor0
----
42
42
42

query I rowsort
SELECT - - col0 * + col0 + 30 AS col1 FROM tab0 cor0
----
1255
606
7951

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

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

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

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

query I rowsort
SELECT DISTINCT 20 FROM tab1 AS cor0
----
20

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1120
SELECT 95 + col1 * col1 - + col0 DIV - 4 FROM tab1
----
211
284
771

skipif mysql # not compatible
query I rowsort label-1120
SELECT 95 + col1 * col1 - + col0 / - 4 FROM tab1
----
211
284
771

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

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

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

query I rowsort
SELECT DISTINCT - 53 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-142
-77
-88

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1125
SELECT ALL cor0.col1 / - cor0.col2 col1 FROM tab0 AS cor0
----
-1
-2
-97

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

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

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1134
SELECT - col0 + ( - 24 + + col2 ) DIV + col0 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-1134
SELECT - col0 + ( - 24 + + col2 ) / + col0 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1139
SELECT - CAST( 70 * - col2 AS SIGNED ) FROM tab0
----
2310
5740
70

skipif mysql # not compatible
query I rowsort label-1139
SELECT - CAST ( 70 * - col2 AS INTEGER ) FROM tab0
----
2310
5740
70

query I rowsort
SELECT 57 FROM tab2
----
57
57
57

query I rowsort
SELECT DISTINCT 57 FROM tab1
----
57

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

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

query I rowsort
SELECT - 83 * 56 FROM tab2 cor0
----
-4648
-4648
-4648

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

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

query I rowsort
SELECT - ( + col0 ) FROM tab2
----
-7
-78
-79

query I rowsort
SELECT DISTINCT ( + col1 + col1 ) * ( + col2 ) FROM tab1
----
1140
2496
2808

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

query I rowsort
SELECT 12 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT ALL + col0 * 86 FROM tab2
----
602
6708
6794

query I rowsort
SELECT - 16 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to be22ac76b42c6f7212ecc0ba7c89eb34

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

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

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

query I rowsort
SELECT + 17 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2, tab1 cor1, tab1 AS cor2
----
81 values hashing to 71801088bb30ca6eac036729ebfbbace

query I rowsort
SELECT cor0.col0 FROM tab0 cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

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

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

skipif mysql # not compatible
query I rowsort label-1159
SELECT col1 / + 60 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL col0 - + col2 * col2 * tab2.col1 FROM tab2
----
-22592
-24469
-39806

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

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

query I rowsort
SELECT col1 + col2 + + col2 * + col2 AS col2 FROM tab1 AS cor0
----
2996
3316
9325

query I rowsort
SELECT + + 79 * col2 * col0 + + 49 AS col1 FROM tab2 AS cor0
----
14980
160261
237207

query I rowsort
SELECT ALL col0 * + col2 + + col2 * col1 AS col2 FROM tab2 cor0
----
1026
3562
3648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 78 + col1 * col1 col2 FROM tab1 cor0
----
178
247
754

query I rowsort
SELECT - 41 FROM tab2 AS cor0
----
-41
-41
-41

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1171
SELECT + col1 + - col0 DIV cor0.col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-1171
SELECT + col1 + - col0 / cor0.col1 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 62 col1 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query I rowsort
SELECT 87 FROM tab1
----
87
87
87

query I rowsort
SELECT + 42 FROM tab1
----
42
42
42

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

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

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

query I rowsort
SELECT + cor0.col0 * + col0 + + 22 AS col2 FROM tab1 AS cor0
----
31
4118
6422

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1179
SELECT DISTINCT col1 / ( 92 * + col1 + - 40 ) col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + col2 * 91 AS col1 FROM tab1 AS cor0
----
4914
5187
8736

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

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

skipif mysql # not compatible
query I rowsort label-1182
SELECT DISTINCT - col2 / 76 + + col2 FROM tab2 AS cor0
----
26
27
38

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

query I rowsort
SELECT ALL col2 * col2 FROM tab0 cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + 54 col0 FROM tab0 AS cor0
----
140
145
151

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

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

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

skipif mysql # not compatible
query I rowsort label-1188
SELECT + CAST ( NULL AS INTEGER ) FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

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

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

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

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

query I rowsort
SELECT DISTINCT + col1 - 70 FROM tab0 AS cor0
----
16
21
27

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1193
SELECT ALL col0 + + 45 / - 35 col1 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT DISTINCT - - 22 AS col2 FROM tab0 AS cor0
----
22

query I rowsort
SELECT DISTINCT + col2 * + col1 * col1 + col1 * col0 * col1 + - col0 AS col0 FROM tab0 cor0
----
1415962
338689
421548

query I rowsort
SELECT ALL - cor0.col0 - - ( - col0 * col2 + - 97 ) FROM tab0 AS cor0
----
-167
-7484
-913

query I rowsort
SELECT DISTINCT - 47 * - col0 AS col1 FROM tab0 AS cor0
----
1128
1645
4183

query I rowsort
SELECT DISTINCT + - 93 * + col1 + cor0.col1 * ( - 96 ) * + col0 FROM tab0 AS cor0
----
-206142
-334941
-785967

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

skipif mysql # not compatible
query I rowsort label-1199
SELECT DISTINCT - CAST ( - col0 AS INTEGER ) * col1 + + ( - col1 ) * + col1 + col0 FROM tab1 AS cor0
----
-595
604
951

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * - col0 + + ( 77 ) col1 FROM tab0 AS cor0
----
112
7375
869

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

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

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

query I rowsort
SELECT DISTINCT + 52 + col2 * + col0 AS col0 FROM tab2 AS cor0
----
2080
241
3054

query I rowsort
SELECT ALL + 51 + + col1 FROM tab2 AS cor0
----
110
68
82

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

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

query I rowsort
SELECT ALL + 54 * col2 AS col0 FROM tab1 AS cor0
----
2916
3078
5184

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

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

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

query I rowsort
SELECT ALL - - 74 + + col0 * + ( - col1 ) FROM tab0 AS cor0
----
-1990
-3321
-8025

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

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

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

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

query I rowsort
SELECT ALL + - 76 + 54 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1232
SELECT - col0 DIV col1 FROM tab1
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-1232
SELECT - col0 / col1 FROM tab1
----
-6
-6
0

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

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

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

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

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

query I rowsort
SELECT col2 + col2 + col2 AS col0 FROM tab0
----
246
3
99

query I rowsort
SELECT ALL + col0 + - col1 AS col0 FROM tab2
----
-24
19
62

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1245
SELECT ALL - + col0 + - col1 DIV - col0 FROM tab2 AS cor0
----
-3
-78
-79

skipif mysql # not compatible
query I rowsort label-1245
SELECT ALL - + col0 + - col1 / - col0 FROM tab2 AS cor0
----
-3
-78
-79

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

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

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

query I rowsort
SELECT DISTINCT + col2 + + col2 FROM tab0 cor0
----
164
2
66

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

query I rowsort
SELECT DISTINCT - 43 * - col1 FROM tab1
----
1118
430
559

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 * - col2 col1 FROM tab2
----
-1612
-725
-844

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

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

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

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

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

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

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

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

query I rowsort
SELECT 27 + - col0 * col1 FROM tab1
----
-1013
-51
-613

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + col1 col1 FROM tab0 AS cor0
----
-2838
-7462
-97

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

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1270
SELECT ALL tab0.col2 + - tab0.col2 / tab0.col0 AS col0 FROM tab0
----
1
32
82

query I rowsort
SELECT DISTINCT + col2 + + col2 AS col1 FROM tab2 WHERE NOT NULL = NULL
----

query I rowsort
SELECT ALL - col1 - - col0 AS col1 FROM tab1
----
-23
54
67

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 39 * - col1 * cor0.col2 FROM tab0 AS cor0
----
-110682
-291018
-3783

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col2 + + col1 * cor0.col2 - col1 FROM tab2 AS cor0
----
1501
667
833

query I rowsort
SELECT col2 * - tab1.col0 + + col0 * + col0 * col2 FROM tab1
----
229824
324
606720

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

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT ( - col0 ) = NULL
----

query I rowsort
SELECT DISTINCT col1 * + col0 * col1 + - col1 FROM tab0 AS cor0
----
177418
329218
736918

query I rowsort
SELECT ALL col0 + - col0 + col1 FROM tab1 AS cor0
----
10
13
26

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

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

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

query III rowsort
SELECT * FROM tab0 WHERE + col0 > col0 * col1
----

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

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

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

query I rowsort
SELECT + col1 + + col1 * + col1 * col1 AS col1 FROM tab1
----
1010
17602
2210

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - tab0.col1 * col1 AS col2 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT col1 * col2 + col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT ALL - col2 + col1 FROM tab2 cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1319
SELECT ALL - col1 * 92 + col2 * + CAST( NULL AS SIGNED ) * col2 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1319
SELECT ALL - col1 * 92 + col2 * + CAST ( NULL AS INTEGER ) * col2 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * + col2 AS col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT - col1 + + col1 * + col0 FROM tab2
----
1326
186
4543

query I rowsort
SELECT - 81 + + col0 FROM tab0 AS cor0
----
-46
-57
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1323
SELECT col0 * - CAST( col1 AS SIGNED ) FROM tab2
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-1323
SELECT col0 * - CAST ( col1 AS INTEGER ) FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col2 AS col2 FROM tab0, tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1325
SELECT - - col2 DIV - col1 + ( col2 ) AS col1 FROM tab1 AS cor0
----
52
52
89

skipif mysql # not compatible
query I rowsort label-1325
SELECT - - col2 / - col1 + ( col2 ) AS col1 FROM tab1 AS cor0
----
52
52
89

query I rowsort
SELECT ALL - 65 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 4ca93c42a91c7dff917e7b7090ba9e57

query I rowsort
SELECT 44 + ( col1 ) * - ( + col0 ) AS col1 FROM tab1 AS cor0
----
-34
-596
-996

query I rowsort
SELECT + col2 * col1 + col0 * col0 FROM tab1 AS cor0
----
1413
4666
7648

query I rowsort
SELECT + - 51 * + col1 AS col1 FROM tab1 AS cor0
----
-1326
-510
-663

query I rowsort
SELECT ( col2 ) + col2 AS col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL - ( - ( - col1 ) ) * - 49 AS col2 FROM tab0 AS cor0
----
4214
4459
4753

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1332
SELECT CAST( NULL AS SIGNED ) + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1332
SELECT CAST ( NULL AS INTEGER ) + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * ( + col1 ) + 73 col1 FROM tab0 cor0
----
2137
3468
8172

query I rowsort
SELECT - cor0.col0 + ( - col1 ) AS col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT + ( col0 ) * cor0.col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-1336
SELECT - 47 DIV + 78 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1336
SELECT - 47 / + 78 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + + 18 * col2 * col2 FROM tab1 AS cor0
----
165888
52488
58482

onlyif mysql # use DIV operator for integer division
query I rowsort label-1338
SELECT 29 + - col0 DIV col2 AS col1 FROM tab1
----
28
29
29

skipif mysql # not compatible
query I rowsort label-1338
SELECT 29 + - col0 / col2 AS col1 FROM tab1
----
28
29
29

query I rowsort
SELECT ALL col0 * col1 + + col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT ALL + ( col1 * col2 ) + col0 * col2 FROM tab2
----
1026
3562
3648

query I rowsort
SELECT col0 + tab2.col2 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL + 38 + ( col2 ) FROM tab0
----
120
39
71

query I rowsort
SELECT ( + col0 ) FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT 44 + col0 AS col1 FROM tab2
----
122
123
51

query I rowsort
SELECT ALL + 94 + 26 + + col0 * + col0 AS col0 FROM tab0 AS cor0
----
1345
696
8041

query I rowsort
SELECT DISTINCT + + col0 * col2 - col2 * col2 * col1 AS col2 FROM tab0 cor0
----
-604586
-62
-92862

query I rowsort
SELECT DISTINCT - - cor0.col1 AS col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - 98 * + cor0.col1 * col0 + col1 * - cor0.col2 FROM tab0 AS cor0
----
-205110
-332807
-801164

query I rowsort
SELECT - 76 - + col2 AS col0 FROM tab0 AS cor0
----
-109
-158
-77

query I rowsort
SELECT - cor0.col0 * col1 + + col1 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL - col0 + - col1 * cor0.col1 FROM tab0 AS cor0
----
-7420
-8370
-9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-1352
SELECT + + ( col2 ) DIV + col2 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1352
SELECT + + ( col2 ) / + col2 FROM tab0 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + cor0.col2 col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + 37 + - col0 + col0 AS col0 FROM tab0 AS cor0
----
37

query I rowsort
SELECT DISTINCT - 59 * col1 + col0 * col2 AS col2 FROM tab1 cor0
----
-1372
3058
6913

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + col2 + col0 * + col2 col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ( + cor0.col0 ) AS col1 FROM tab0 cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1358
SELECT ALL 25 * col2 DIV col1 FROM tab1 cor0
----
142
184
51

skipif mysql # not compatible
query I rowsort label-1358
SELECT ALL 25 * col2 / col1 FROM tab1 cor0
----
142
184
51

query I rowsort
SELECT + - 9 AS col0 FROM tab1 AS cor0
----
-9
-9
-9

query I rowsort
SELECT - col1 - + tab2.col1 AS col0 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT DISTINCT + col1 + - col0 * col1 * - col1 FROM tab1
----
13533
2054
6410

query I rowsort
SELECT - col0 * - col2 * col1 + col0 AS col1 FROM tab0
----
3430
664207
68136

query I rowsort
SELECT 61 FROM tab1, tab0 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT DISTINCT tab2.col0 + tab2.col0 AS col2 FROM tab2
----
14
156
158

query I rowsort
SELECT ( - cor0.col0 ) + cor0.col1 * + col1 FROM tab2 cor0
----
210
3403
954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col1 col2 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - - col0 + - col0 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1368
SELECT DISTINCT - col2 DIV col1 - col2 AS col1 FROM tab1 AS cor0
----
-103
-56
-62

skipif mysql # not compatible
query I rowsort label-1368
SELECT DISTINCT - col2 / col1 - col2 AS col1 FROM tab1 AS cor0
----
-103
-56
-62

query I rowsort
SELECT ALL + - col0 * + col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + - col1 * col0 - 62 AS col2 FROM tab1 AS cor0
----
-1102
-140
-702

query I rowsort
SELECT DISTINCT - col1 + + 6 AS col2 FROM tab2 AS cor0
----
-11
-25
-53

query I rowsort
SELECT ALL + col2 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-1373
SELECT DISTINCT + - col1 - + cor0.col0 DIV - col2 FROM tab1 AS cor0
----
-13
-26
-9

skipif mysql # not compatible
query I rowsort label-1373
SELECT DISTINCT + - col1 - + cor0.col0 / - col2 FROM tab1 AS cor0
----
-13
-26
-9

query I rowsort
SELECT ALL - - col0 * cor0.col2 * - col0 FROM tab0 cor0
----
-1225
-19008
-649522

query I rowsort
SELECT col0 * ( - 90 ) + - col1 AS col2 FROM tab2 AS cor0
----
-661
-7079
-7127

query I rowsort
SELECT - col0 - + 20 FROM tab2 AS cor0
----
-27
-98
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - + 83 col2 FROM tab2 AS cor0
----
-45
-56
-57

query I rowsort
SELECT ALL col1 * ( 40 * col0 ) FROM tab2 AS cor0
----
184080
53720
8680

query I rowsort
SELECT 11 AS col2 FROM tab2
----
11
11
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-1380
SELECT ALL - col0 DIV - col0 AS col1 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1380
SELECT ALL - col0 / - col0 AS col1 FROM tab1
----
1
1
1

query I rowsort
SELECT DISTINCT + + col0 * + col2 + ( col2 ) AS col1 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT - col2 * col2 * cor0.col2 + + col2 AS col2 FROM tab2 AS cor0
----
-17550
-19656
-54834

query I rowsort
SELECT DISTINCT - + col0 * - col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - col2 * col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - col0 * + col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT col0 * - col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 52 FROM tab0, tab0 AS cor0
----
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL - 74 * col0 + col0 * - col0 FROM tab2 AS cor0
----
-11856
-12087
-567

query I rowsort
SELECT DISTINCT col1 - 10 AS col0 FROM tab2
----
21
49
7

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 cor2
----
972 values hashing to 0be13143d898cc667fe1a2dd93b34703

onlyif mysql # use DIV operator for integer division
query I rowsort label-1392
SELECT ALL - - col2 * ( col2 ) + + col2 DIV - col0 AS col1 FROM tab0 AS cor0
----
1
1088
6724

skipif mysql # not compatible
query I rowsort label-1392
SELECT ALL - - col2 * ( col2 ) + + col2 / - col0 AS col1 FROM tab0 AS cor0
----
1
1088
6724

query I rowsort
SELECT DISTINCT col1 + ( + col0 ) AS col2 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - col1 * + col1 + col2 FROM tab1 AS cor0
----
-43
-622
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - ( col2 ) col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL col1 * + ( col0 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT col0 * - 81 AS col0 FROM tab2 AS cor0
----
-567
-6318
-6399

query I rowsort
SELECT - ( - 90 ) + + col1 * col1 FROM tab1 AS cor0
----
190
259
766

query I rowsort
SELECT + 3 AS col2 FROM tab1 AS cor0
----
3
3
3

query I rowsort
SELECT - - col2 - - col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + 15 + + col0 AS col0 FROM tab2 AS cor0
----
22
93
94

query I rowsort
SELECT ALL 49 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT + tab1.col1 + + 98 FROM tab1
----
108
111
124

query I rowsort
SELECT ALL + + col0 + - col2 AS col2 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-1405
SELECT ALL - - cor0.col2 * col1 - - ( - ( + col0 ) ) DIV + 54 FROM tab1 AS cor0
----
1247
1404
569

skipif mysql # not compatible
query I rowsort label-1405
SELECT ALL - - cor0.col2 * col1 - - ( - ( + col0 ) ) / + 54 FROM tab1 AS cor0
----
1247
1404
569

query I rowsort
SELECT - 41 + + col1 FROM tab0 AS cor0
----
45
50
56

query I rowsort
SELECT 1 AS col2 FROM tab2 cor0
----
1
1
1

query I rowsort
SELECT ( - cor0.col2 ) * + 29 FROM tab0 AS cor0
----
-2378
-29
-957

query I rowsort
SELECT ALL + col1 + col2 * col2 * col1 FROM tab2 AS cor0
----
22630
24565
39943

query I rowsort
SELECT DISTINCT + 2 FROM tab0 AS cor0
----
2

query I rowsort
SELECT DISTINCT - ( + col2 ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - col2 + + col2 * 43 FROM tab0 cor0
----
1386
3444
42

query I rowsort
SELECT DISTINCT - + cor0.col2 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT col0 + - col1 AS col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT ALL tab2.col0 + tab2.col0 * + tab2.col2 + ( col1 ) FROM tab2
----
2165
227
3098

query I rowsort
SELECT - + col1 * + cor0.col2 + - col2 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT - + col2 * - col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-1418
SELECT + col0 DIV col1 + + col1 AS col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-1418
SELECT + col0 / col1 + + col1 AS col0 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 + col1 col1 FROM tab2
----
118
34
62

query I rowsort
SELECT ALL + 10 * col2 AS col2 FROM tab0
----
10
330
820

query I rowsort
SELECT - 15 * col1 FROM tab1 AS cor0
----
-150
-195
-390

query I rowsort
SELECT + - col0 * + col2 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - cor0.col2 + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-1122
-2
-6806

query I rowsort
SELECT + col1 * - 23 FROM tab1 AS cor0
----
-230
-299
-598

query I rowsort
SELECT - + col1 * col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - 14 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c2bf0e2420d22cd58d7ee3b30827afcc

query I rowsort
SELECT + col0 * - cor0.col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT cor0.col2 * + col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL - 3 FROM tab2
----
-3
-3
-3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1430
SELECT ALL - cor0.col2 - CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1430
SELECT ALL - cor0.col2 - CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT 53 AS col1 FROM tab2
----
53
53
53

query I rowsort
SELECT ALL col0 * - col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT + 66 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT - - col1 + col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT - - col2 AS col0 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT col2 * ( - col0 ) + + col1 * 88 AS col2 FROM tab0 AS cor0
----
6776
710
8501

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * ( - col0 ) col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT DISTINCT ( 88 ) * col0 FROM tab1 AS cor0
----
264
5632
7040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1441
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - 53 + - col2 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1441
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - 53 + - col2 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + 99 * - ( + col0 ) + col2 FROM tab0 AS cor0
----
-2343
-3464
-8729

onlyif mysql # use DIV operator for integer division
query I rowsort label-1443
SELECT + ( col1 ) - - col2 DIV + col1 FROM tab2 AS cor0
----
19
31
59

skipif mysql # not compatible
query I rowsort label-1443
SELECT + ( col1 ) - - col2 / + col1 FROM tab2 AS cor0
----
19
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1444
SELECT ( 9 ) * + col2 + + CAST( + 1 AS SIGNED ) FROM tab1 AS cor0
----
487
514
865

skipif mysql # not compatible
query I rowsort label-1444
SELECT ( 9 ) * + col2 + + CAST ( + 1 AS INTEGER ) FROM tab1 AS cor0
----
487
514
865

query I rowsort
SELECT ALL - - 24 AS col2 FROM tab2 cor0
----
24
24
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1446
SELECT DISTINCT + CAST( NULL AS DECIMAL ) * - 16 + col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1446
SELECT DISTINCT + CAST ( NULL AS REAL ) * - 16 + col0 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1447
SELECT col2 DIV cor0.col0 + cor0.col2 * 47 AS col2 FROM tab1 cor0
----
2556
2679
4513

skipif mysql # not compatible
query I rowsort label-1447
SELECT col2 / cor0.col0 + cor0.col2 * 47 AS col2 FROM tab1 cor0
----
2556
2679
4513

query I rowsort
SELECT ALL - - ( 46 ) AS col0 FROM tab0 AS cor0
----
46
46
46

query I rowsort
SELECT ALL 39 + + 49 + col2 FROM tab1 AS cor0
----
142
145
184

query I rowsort
SELECT ALL + + 74 AS col2 FROM tab1 AS cor0
----
74
74
74

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 FROM tab1 AS cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col0 col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - col2 + col2 * col2 * col2 FROM tab2 AS cor0
----
17550
19656
54834

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 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT DISTINCT cor0.col1 + col1 * col2 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT - + col1 * - col1 * - 72 + + 78 + col1 * col1 FROM tab2 AS cor0
----
-20441
-247073
-68153

query I rowsort
SELECT 47 + col1 - + col1 FROM tab2 AS cor0
----
47
47
47

query I rowsort
SELECT - 43 + 46 * col0 FROM tab0 AS cor0
----
1061
1567
4051

query I rowsort
SELECT col2 * + 62 + - col1 AS col2 FROM tab0 AS cor0
----
-35
1960
4993

query I rowsort
SELECT - cor0.col1 + + col0 * - col1 AS col0 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT ALL + cor0.col0 * col1 + + col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT - + col0 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1463
SELECT ALL - - CAST( NULL AS DECIMAL ) * col1 + col2 - - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1463
SELECT ALL - - CAST ( NULL AS REAL ) * col1 + col2 - - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 88 col0 FROM tab0 AS cor0
----
88
88
88

query I rowsort
SELECT DISTINCT col1 + col1 AS col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT DISTINCT - cor0.col1 * 8 + col2 FROM tab1 AS cor0
----
-154
-23
-8

query I rowsort
SELECT ALL + ( ( + col0 ) ) + col0 + + col0 * - col0 FROM tab0 AS cor0
----
-1155
-528
-7743

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 + + col2 col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL col0 + 48 AS col1 FROM tab0 cor0
----
137
72
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1470
SELECT DISTINCT CAST( + col1 AS SIGNED ) * + col2 * - col1 + col1 AS col0 FROM tab2 cor0
----
-10965
-25916
-90447

skipif mysql # not compatible
query I rowsort label-1470
SELECT DISTINCT CAST ( + col1 AS INTEGER ) * + col2 * - col1 + col1 AS col0 FROM tab2 cor0
----
-10965
-25916
-90447

onlyif mysql # use DIV operator for integer division
query I rowsort label-1471
SELECT DISTINCT - col2 + col1 DIV - cor0.col0 + + 1 * - col2 FROM tab0 AS cor0
----
-165
-4
-69

skipif mysql # not compatible
query I rowsort label-1471
SELECT DISTINCT - col2 + col1 / - cor0.col0 + + 1 * - col2 FROM tab0 AS cor0
----
-165
-4
-69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1472
SELECT CAST( NULL AS DECIMAL ) * + 20 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-1472
SELECT CAST ( NULL AS REAL ) * + 20 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + cor0.col0 + col2 * col2 + col1 col1 FROM tab1 AS cor0
----
15629
2951
7355

query I rowsort
SELECT ALL col0 - 2 * - col0 * - ( col2 ) AS col0 FROM tab1 AS cor0
----
-15280
-321
-7232

query I rowsort
SELECT + - 92 + - col2 FROM tab0 AS cor0
----
-125
-174
-93

query I rowsort
SELECT - + 43 AS col1 FROM tab1 AS cor0
----
-43
-43
-43

query I rowsort
SELECT DISTINCT - - col2 * - col0 + + cor0.col0 FROM tab0 cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT + 33 FROM tab1 AS cor0
----
33

query I rowsort
SELECT ALL + cor0.col0 * - col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + 98 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT ALL col1 * + 64 + + col1 FROM tab0 AS cor0
----
5590
5915
6305

query I rowsort
SELECT DISTINCT col0 - col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - col0 * 14 - + col1 AS col0 FROM tab2 AS cor0
----
-1123
-1151
-129

query I rowsort
SELECT DISTINCT - - cor0.col2 - 39 FROM tab1 AS cor0
----
15
18
57

query I rowsort
SELECT - + col1 - - cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 + 42 AS col1 FROM tab0 AS cor0
----
124
43
75

query I rowsort
SELECT ALL - 31 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

query I rowsort
SELECT + + col1 * - ( - 82 ) + cor0.col2 FROM tab0 AS cor0
----
7085
7544
7955

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col0 + cor0.col2 col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL + ( tab0.col0 ) FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1491
SELECT col2 DIV - col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1491
SELECT col2 / - col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * - col0 * + col0 AS col2 FROM tab0
----
-118825
-49536
-720811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col2 col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT tab1.col0 - + 43 AS col1 FROM tab1
----
-40
21
37

query I rowsort
SELECT + col0 + ( ( col2 ) ) FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 + + 60 col0 FROM tab1
----
-36
3
6

query I rowsort
SELECT - col0 + 81 * tab2.col1 + + tab2.col0 FROM tab2
----
1377
2511
4779

onlyif mysql # use DIV operator for integer division
query I rowsort label-1498
SELECT + col1 DIV - 22 - cor0.col0 * - 97 FROM tab2 AS cor0
----
678
7564
7663

skipif mysql # not compatible
query I rowsort label-1498
SELECT + col1 / - 22 - cor0.col0 * - 97 FROM tab2 AS cor0
----
678
7564
7663

query I rowsort
SELECT DISTINCT + col2 * - col2 + col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT ALL + + col0 * col0 FROM tab2 cor0
----
49
6084
6241

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 cor0, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to 7864aada86bf5bf5e1621c7905de8dcd

query I rowsort
SELECT + col1 + - col1 * - col2 FROM tab0
----
194
2924
7553

query I rowsort
SELECT DISTINCT - col2 * 32 + col0 AS col0 FROM tab0
----
-1032
-2535
3

query I rowsort
SELECT ALL 42 * col2 + col1 + - tab0.col1 FROM tab0
----
1386
3444
42

query I rowsort
SELECT 89 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT + ( col1 ) + - col2 AS col0 FROM tab0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 62 + - col1 * col1 * - 14 col2 FROM tab2
----
13516
4108
48796

query I rowsort
SELECT - ( - col1 ) * - col2 + col0 * col1 * col2 AS col2 FROM tab0 AS cor0
----
3298
65274
656656

query I rowsort
SELECT col0 * col0 * col1 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT DISTINCT ( - 70 ) FROM tab1 AS cor0
----
-70

query I rowsort
SELECT ALL - - col0 * 96 FROM tab0 AS cor0
----
2304
3360
8544

query I rowsort
SELECT ALL + + 26 * 52 FROM tab2 AS cor0
----
1352
1352
1352

query I rowsort
SELECT DISTINCT + - col1 * - col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + 52 FROM tab1
----
52
52
52

query I rowsort
SELECT col0 - - col0 AS col0 FROM tab1
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1516
SELECT ALL 79 DIV - col2 + cor0.col2 AS col1 FROM tab0 AS cor0
----
-78
31
82

skipif mysql # not compatible
query I rowsort label-1516
SELECT ALL 79 / - col2 + cor0.col2 AS col1 FROM tab0 AS cor0
----
-78
31
82

query I rowsort
SELECT ALL - + col0 * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + + col0 * + col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + - ( col1 ) + - col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL - + col1 * col0 - + 96 FROM tab1 AS cor0
----
-1136
-174
-736

query I rowsort
SELECT + cor0.col2 FROM tab2, tab1, tab0 cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - col0 * 51 FROM tab2 cor0
----
-357
-3978
-4029

query I rowsort
SELECT DISTINCT col1 * + cor0.col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1524
SELECT + col0 * CAST( col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-1524
SELECT + col0 * CAST ( col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + 77 col0 FROM tab2 AS cor0
----
-1309
-2387
-4543

query I rowsort
SELECT ALL - + col2 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL col2 * - 6 * - col1 FROM tab1 AS cor0
----
3420
7488
8424

query I rowsort
SELECT + cor0.col1 * - cor0.col1 * + col2 AS col1 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT + col2 * col1 * - 34 AS col2 FROM tab2 AS cor0
----
-21964
-28458
-52156

query I rowsort
SELECT ALL - + col2 * col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT col1 - + col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT col2 + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + col2 + ( cor0.col0 ) FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL cor0.col1 * - ( ( col1 ) ) + col2 + col1 AS col1 FROM tab1 AS cor0
----
-33
-596
-60

query I rowsort
SELECT ALL - col1 + col2 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + col2 * ( col2 ) FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT + + col0 * col0 * 79 AS col2 FROM tab1 AS cor0
----
323584
505600
711

query I rowsort
SELECT DISTINCT - 2 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
-2

query I rowsort
SELECT ALL + + col2 + - 41 * + 75 * cor0.col1 AS col1 FROM tab2 AS cor0
----
-181399
-52237
-95298

query I rowsort
SELECT ALL + cor0.col1 * + col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1541
SELECT - col0 / + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1541
SELECT - col0 / + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - cor0.col0 AS col2 FROM tab2 cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 col0 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + cor0.col2 * + 69 AS col1 FROM tab2 AS cor0
----
1794
1863
2622

skipif mysql # not compatible
query I rowsort
SELECT ALL col0 * CAST ( + col0 AS REAL ) + + col2 * col2 AS col2 FROM tab0 cor0
----
1226
14645
1665

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col0 col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1547
SELECT ALL + ( + col1 + - col1 ) * 57 DIV col2 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1547
SELECT ALL + ( + col1 + - col1 ) * 57 / col2 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT + 24 FROM tab2, tab2 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

onlyif mysql # use DIV operator for integer division
query I rowsort label-1549
SELECT - col1 + 97 DIV - col1 FROM tab1
----
-19
-20
-29

skipif mysql # not compatible
query I rowsort label-1549
SELECT - col1 + 97 / - col1 FROM tab1
----
-19
-20
-29

query I rowsort
SELECT ALL - 12 FROM tab0
----
-12
-12
-12

onlyif mysql # use DIV operator for integer division
query I rowsort label-1551
SELECT col0 + + col0 DIV + col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-1551
SELECT col0 + + col0 / + col0 FROM tab1
----
4
65
81

query I rowsort
SELECT ALL - ( ( - col1 ) ) + col0 + - col2 * + col0 FROM tab1 AS cor0
----
-133
-3574
-7587

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col0 ) * + col2 + 67 col1 FROM tab2 cor0
----
-122
-1961
-2935

query I rowsort
SELECT DISTINCT 24 * + ( cor0.col2 ) - 64 * + 70 AS col1 FROM tab0 AS cor0
----
-2512
-3688
-4456

query I rowsort
SELECT DISTINCT + cor0.col2 * - col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - ( 80 ) + cor0.col2 * - col2 FROM tab0 AS cor0
----
-1169
-6804
-81

query I rowsort
SELECT - col2 + + 4 FROM tab2 AS cor0
----
-22
-23
-34

query I rowsort
SELECT DISTINCT + 78 + col0 + + col1 FROM tab1 AS cor0
----
107
152
171

query I rowsort
SELECT - 17 * + col0 FROM tab1
----
-1088
-1360
-51

query I rowsort
SELECT DISTINCT - + col0 * + col0 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1561
SELECT DISTINCT 94 + col0 DIV col2 FROM tab1 AS cor0
----
94
95

skipif mysql # not compatible
query I rowsort label-1561
SELECT DISTINCT 94 + col0 / col2 FROM tab1 AS cor0
----
94
95

query I rowsort
SELECT ( - col0 ) * + ( + 70 ) * col1 FROM tab1 AS cor0
----
-44800
-5460
-72800

query I rowsort
SELECT col1 * + col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT 12 AS col2 FROM tab1 AS cor0
----
12
12
12

query I rowsort
SELECT DISTINCT col1 * col1 + + cor0.col0 + + col0 FROM tab0 AS cor0
----
7444
8459
9479

query I rowsort
SELECT + 70 AS col2 FROM tab1 cor0
----
70
70
70

query I rowsort
SELECT + 67 * + col2 * + 13 FROM tab2 AS cor0
----
22646
23517
33098

query I rowsort
SELECT ALL - col2 * col0 + + col2 AS col2 FROM tab0 AS cor0
----
-34
-7216
-759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col2 + + col2 * + col1 col1 FROM tab0 cor0
----
132
14760
3630

query I rowsort
SELECT + cor0.col2 - col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col0 + 53 FROM tab1 AS cor0
----
-11
-27
50

query I rowsort
SELECT + - cor0.col0 + - ( - col1 ) AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL - - col2 + + 77 * 86 AS col1 FROM tab1 AS cor0
----
6676
6679
6718

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - ( + cor0.col0 ) + col1 col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT + col0 * - 28 + col0 FROM tab1 cor0
----
-1728
-2160
-81

query I rowsort
SELECT DISTINCT - + cor0.col2 AS col1 FROM tab0, tab0 AS cor0, tab2, tab0 AS cor1
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - + col1 + ( + col2 ) FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL - + col0 - ( + col0 ) FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT ALL col2 + 29 * cor0.col2 FROM tab0 AS cor0
----
2460
30
990

query I rowsort
SELECT col0 - + cor0.col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * + 75 + col2 AS col1 FROM tab2 AS cor0
----
1313
2352
4451

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1582
SELECT ALL - col2 - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1582
SELECT ALL - col2 - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + + 39 AS col2 FROM tab1 AS cor0
----
103
119
42

query I rowsort
SELECT DISTINCT + + col0 + 68 * cor0.col0 AS col2 FROM tab0 cor0
----
1656
2415
6141

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 + 96 * - col0 col0 FROM tab0 AS cor0
----
-2218
-3263
-8453

query I rowsort
SELECT DISTINCT - col1 + ( col0 ) AS col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL + col1 - 78 AS col2 FROM tab2 AS cor0
----
-19
-47
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - 6 + col0 col1 FROM tab1 AS cor0
----
-153
2
4

query I rowsort
SELECT - - col2 + - 0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - - ( col0 ) * + col2 + col2 * - col0 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + 12 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to c60b9398e29d6382e0d15363f9325811

query I rowsort
SELECT + 81 * col1 * col2 + + ( cor0.col1 ) * + col1 AS col1 FROM tab1 AS cor0
----
101257
114400
46270

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - col1 col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT - col1 + col0 + - col0 * + ( + col1 ) FROM tab0 AS cor0
----
-2126
-3457
-8101

query I rowsort
SELECT - 57 FROM tab0 AS cor0
----
-57
-57
-57

query I rowsort
SELECT - - cor0.col1 - + col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - - 6 AS col1 FROM tab2 cor0
----
6
6
6

query I rowsort
SELECT DISTINCT tab0.col0 + - col2 + + col0 * col1 AS col2 FROM tab0
----
2055
3429
8106

query I rowsort
SELECT - col1 * + ( - col0 ) AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + col2 * + 10 * col0 + + col2 * + ( - tab0.col2 ) FROM tab0
----
349
66256
6831

query I rowsort
SELECT col2 * col2 AS col1 FROM tab2
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-1602
SELECT DISTINCT - tab1.col2 + col0 DIV + 12 + + col1 FROM tab1
----
-28
-42
-77

skipif mysql # not compatible
query I rowsort label-1602
SELECT DISTINCT - tab1.col2 + col0 / + 12 + + col1 FROM tab1
----
-28
-42
-77

query I rowsort
SELECT ALL + col0 + ( - col2 + - col1 ) AS col0 FROM tab2
----
-51
-7
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - cor0.col1 + - cor0.col2 col0 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT 86 * col0 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
4214
523224
536726

query I rowsort
SELECT - + 90 + + col0 AS col2 FROM tab1 AS cor0
----
-10
-26
-87

query I rowsort
SELECT col1 * col2 + - col2 AS col1 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT 46 * - col1 FROM tab0 AS cor0
----
-3956
-4186
-4462

query I rowsort
SELECT + + cor0.col1 * - cor1.col0 - - cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 05dc70e37a933e795d0fd045a4ce23d2

query I rowsort
SELECT DISTINCT 84 * col0 FROM tab2
----
588
6552
6636

query I rowsort
SELECT + ( - col1 ) AS col2 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT col1 * + 10 * + tab2.col0 AS col1 FROM tab2
----
13430
2170
46020

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col2 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT ( + tab2.col1 ) * - tab2.col0 FROM tab2, tab0 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-1615
SELECT DISTINCT + col1 DIV col2 AS col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-1615
SELECT DISTINCT + col1 / col2 AS col2 FROM tab1
----
0

query I rowsort
SELECT ( 20 ) FROM tab0, tab1, tab1 AS cor0, tab2 AS cor1
----
81 values hashing to 8550664862df5be7a3d3f6037537d2d8

query I rowsort
SELECT col2 + ( + cor0.col2 * col1 ) + col2 FROM tab1 cor0
----
1440
1512
684

query I rowsort
SELECT - + col0 * 39 FROM tab2 AS cor0
----
-273
-3042
-3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + col0 * - 36 col2 FROM tab2 AS cor0
----
-225
-2782
-2806

query I rowsort
SELECT + col2 * col0 + + 29 + + col0 AS col2 FROM tab2 AS cor0
----
2135
225
3110

query I rowsort
SELECT ALL + 94 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT + 95 + + col0 AS col1 FROM tab1 AS cor0
----
159
175
98

query I rowsort
SELECT + - 80 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

query I rowsort
SELECT - - col2 - - col0 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + col0 * - col0 - - col2 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT 14 + + col1 AS col1 FROM tab0 AS cor0
----
100
105
111

query I rowsort
SELECT ALL col2 + + col2 AS col2 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-1628
SELECT + + col0 DIV col0 - 7 AS col1 FROM tab0 AS cor0
----
-6
-6
-6

skipif mysql # not compatible
query I rowsort label-1628
SELECT + + col0 / col0 - 7 AS col1 FROM tab0 AS cor0
----
-6
-6
-6

query I rowsort
SELECT col0 + cor0.col1 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-1630
SELECT - + col2 + col0 DIV col1 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-1630
SELECT - + col2 + col0 / col1 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT col1 + + 5 * + 3 FROM tab1 AS cor0
----
25
28
41

query I rowsort
SELECT + col2 + - col2 * col1 AS col2 FROM tab2 cor0
----
-1508
-608
-810

query I rowsort
SELECT + col2 * cor0.col1 + col2 AS col0 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT col1 * col0 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + - col1 + cor0.col0 * - cor0.col0 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT + col1 * col1 + - 91 AS col0 FROM tab1 cor0
----
585
78
9

query I rowsort
SELECT ALL + cor2.col0 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1638
SELECT col0 DIV - 96 + col0 AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-1638
SELECT col0 / - 96 + col0 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + 94 FROM tab0
----
94
94
94

query I rowsort
SELECT ALL + cor0.col2 + col1 * col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT col2 * + col0 * - col0 AS col1 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT 41 FROM tab0, tab1 AS cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT 59 * 52 FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 62cef3883b5ef766e0c7eb98ad94c8ab

query I rowsort
SELECT - cor2.col0 * + 25 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to ac346ac4eb281655d9658fadd2e3721d

query I rowsort
SELECT col2 * - ( - col1 ) AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - 23 FROM tab1 cor0
----
-23
-23
-23

query I rowsort
SELECT ALL 86 * 36 + col0 * + 57 + + col2 AS col0 FROM tab2 AS cor0
----
3522
7568
7637

onlyif mysql # use DIV operator for integer division
query I rowsort label-1648
SELECT - 52 DIV - 70 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1648
SELECT - 52 / - 70 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - 63 col0 FROM tab1
----
-1638
-630
-819

query I rowsort
SELECT - 5 FROM tab0, tab2 AS cor0
----
9 values hashing to 74665fbb47d5b17da011bca567195b21

query I rowsort
SELECT ALL - 24 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 797d0f7c145f8ac623924448c714bbcc

query I rowsort
SELECT DISTINCT + 52 FROM tab0 cor0
----
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col0 col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1654
SELECT ALL - + col2 + col2 - CAST( - col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-1654
SELECT ALL - + col2 + col2 - CAST ( - col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL col0 + col1 - cor0.col0 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - - 34 + col2 AS col1 FROM tab0 AS cor0
----
116
35
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-1657
SELECT ALL + 26 + + col1 DIV + col2 AS col1 FROM tab1 AS cor0
----
26
26
26

skipif mysql # not compatible
query I rowsort label-1657
SELECT ALL + 26 + + col1 / + col2 AS col1 FROM tab1 AS cor0
----
26
26
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-1658
SELECT DISTINCT - col2 * + col1 DIV col1 + + col1 FROM tab1 AS cor0
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-1658
SELECT DISTINCT - col2 * + col1 / col1 + + col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + + col1 * col2 + col1 AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT - + col2 * col1 + ( col0 ) - col1 FROM tab0 AS cor0
----
-159
-2900
-7464

query I rowsort
SELECT DISTINCT 12 AS col2 FROM tab0, tab1 AS cor0
----
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-1662
SELECT col2 * 9 DIV col1 AS col0 FROM tab1
----
18
51
66

skipif mysql # not compatible
query I rowsort label-1662
SELECT col2 * 9 / col1 AS col0 FROM tab1
----
18
51
66

query I rowsort
SELECT DISTINCT + col1 + - col1 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL col2 * col1 + + ( col1 ) * col2 FROM tab0 cor0
----
14924
194
5676

query I rowsort
SELECT ALL - col2 * - tab2.col0 * col2 + - 92 AS col1 FROM tab2
----
113984
5011
52636

query I rowsort
SELECT DISTINCT col0 + + col0 AS col2 FROM tab1
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1667
SELECT DISTINCT - 85 DIV col1 + col1 col2 FROM tab0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1667
SELECT DISTINCT - 85 / col1 + col1 col2 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT + 94 * - tab2.col0 + - col1 AS col0 FROM tab2
----
-689
-7391
-7443

query I rowsort
SELECT ALL col2 - - col0 FROM tab1
----
121
176
57

query I rowsort
SELECT + cor0.col2 * + col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - col2 * - col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + 18 FROM tab2
----
18
18
18

query I rowsort
SELECT tab0.col0 * col2 + col0 + + col0 FROM tab0
----
105
7476
840

query I rowsort
SELECT DISTINCT - col0 + 77 + col1 AS col2 FROM tab1
----
10
100
23

query I rowsort
SELECT + col0 * col0 + + col2 AS col1 FROM tab1
----
4153
63
6496

query I rowsort
SELECT - tab2.col0 + + 28 * 87 FROM tab2
----
2357
2358
2429

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1677
SELECT col0 + - CAST( - col2 AS SIGNED ) FROM tab1
----
121
176
57

skipif mysql # not compatible
query I rowsort label-1677
SELECT col0 + - CAST ( - col2 AS INTEGER ) FROM tab1
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1678
SELECT ALL CAST( NULL AS SIGNED ) + + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1678
SELECT ALL CAST ( NULL AS INTEGER ) + + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - col0 ) * col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-1680
SELECT DISTINCT col2 * + col2 + - col2 DIV col0 AS col0 FROM tab1
----
2898
3249
9215

skipif mysql # not compatible
query I rowsort label-1680
SELECT DISTINCT col2 * + col2 + - col2 / col0 AS col0 FROM tab1
----
2898
3249
9215

query I rowsort
SELECT DISTINCT + col0 + 53 FROM tab0
----
142
77
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col1 ) col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2, tab0 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

onlyif mysql # use DIV operator for integer division
query I rowsort label-1684
SELECT col2 * col0 DIV col0 + - 22 FROM tab1
----
32
35
74

skipif mysql # not compatible
query I rowsort label-1684
SELECT col2 * col0 / col0 + - 22 FROM tab1
----
32
35
74

query I rowsort
SELECT ALL - 79 AS col1 FROM tab2 cor0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT + + col1 * col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + col0 * 4 AS col2 FROM tab2 cor0
----
28
312
316

query I rowsort
SELECT DISTINCT - ( + col1 ) + - col2 * ( - col1 ) AS col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT ALL + + col0 + + col1 * - col0 * 33 FROM tab2 AS cor0
----
-151788
-44240
-7154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 col2 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1691
SELECT DISTINCT CAST( NULL AS SIGNED ) + - col2 col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1691
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - col2 col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + col1 + + col1 * col1 FROM tab0 cor0
----
7482
8372
9506

query I rowsort
SELECT - cor0.col2 + - col1 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-1694
SELECT ALL + col1 DIV cor0.col1 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1694
SELECT ALL + col1 / cor0.col1 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT cor0.col1 + col1 * col0 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
2174
3527
8279

query I rowsort
SELECT + - col0 + col0 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * + col0 + col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL - 68 + - tab2.col1 * col1 FROM tab2
----
-1029
-3549
-357

query I rowsort
SELECT - + col2 + col0 + - col2 AS col1 FROM tab0 AS cor0
----
-42
-75
33

query I rowsort
SELECT DISTINCT ( tab1.col0 ) + - col1 FROM tab1
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 14 col0 FROM tab1
----
-14
-14
-14

query I rowsort
SELECT col0 * col2 + - col0 AS col2 FROM tab0 AS cor0
----
0
7209
768

onlyif mysql # use DIV operator for integer division
query I rowsort label-1703
SELECT DISTINCT col1 DIV - col1 + col2 * col1 AS col1 FROM tab1 AS cor0
----
1247
1403
569

skipif mysql # not compatible
query I rowsort label-1703
SELECT DISTINCT col1 / - col1 + col2 * col1 AS col1 FROM tab1 AS cor0
----
1247
1403
569

query I rowsort
SELECT DISTINCT + col0 - col0 FROM tab2 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + col1 + col0 * - col0 col1 FROM tab0 AS cor0
----
-16020
-2640
-4620

query I rowsort
SELECT DISTINCT - ( - col1 * col0 ) FROM tab1
----
1040
640
78

query I rowsort
SELECT col0 + col0 AS col2 FROM tab2
----
14
156
158

query I rowsort
SELECT ALL + tab0.col2 + 19 - col0 AS col2 FROM tab0
----
-15
12
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-1709
SELECT ALL col2 + 52 DIV col0 AS col2 FROM tab0
----
2
35
82

skipif mysql # not compatible
query I rowsort label-1709
SELECT ALL col2 + 52 / col0 AS col2 FROM tab0
----
2
35
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-1710
SELECT + + 66 * 42 DIV - col1 FROM tab0 AS cor0
----
-28
-30
-32

skipif mysql # not compatible
query I rowsort label-1710
SELECT + + 66 * 42 / - col1 FROM tab0 AS cor0
----
-28
-30
-32

query I rowsort
SELECT ALL col1 * col2 + + col0 * col1 AS col1 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT DISTINCT - cor0.col1 * col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT - 81 * - col2 AS col2 FROM tab0 AS cor0
----
2673
6642
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1714
SELECT DISTINCT - - CAST( col2 AS SIGNED ) * cor0.col2 AS col0 FROM tab2 cor0
----
1444
676
729

skipif mysql # not compatible
query I rowsort label-1714
SELECT DISTINCT - - CAST ( col2 AS INTEGER ) * cor0.col2 AS col0 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT + col2 * - ( + col1 ) FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ( tab2.col2 ) FROM tab2
----
26
27
38

query I rowsort
SELECT ALL + ( col0 ) * - col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + + 30 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
-24
-27
-66

query I rowsort
SELECT - - col2 + + col0 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL - + ( cor0.col0 ) - + col2 AS col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - 80 - col2 FROM tab1 AS cor0
----
-134
-137
-176

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col0 col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + 78 * + col1 FROM tab0 AS cor0
----
6708
7098
7566

query I rowsort
SELECT - col1 + col2 + col2 * col1 AS col1 FROM tab0 AS cor0
----
1
2785
7453

query I rowsort
SELECT ALL + + cor0.col2 + cor0.col1 * col1 AS col1 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT - tab0.col0 * + col0 * col2 FROM tab0
----
-1225
-19008
-649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-1727
SELECT + - col1 + col2 DIV col0 + - col1 FROM tab0 AS cor0
----
-171
-182
-194

skipif mysql # not compatible
query I rowsort label-1727
SELECT + - col1 + col2 / col0 + - col1 FROM tab0 AS cor0
----
-171
-182
-194

onlyif mysql # use DIV operator for integer division
query I rowsort label-1728
SELECT col1 + + col1 + cor0.col1 DIV col2 FROM tab1 AS cor0
----
20
26
52

skipif mysql # not compatible
query I rowsort label-1728
SELECT col1 + + col1 + cor0.col1 / col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT - 89 AS col0 FROM tab0 AS cor0
----
-89
-89
-89

query I rowsort
SELECT col0 + + col0 + col1 AS col1 FROM tab2 AS cor0
----
175
215
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * + col2 * cor0.col2 - col2 col2 FROM tab1 AS cor0
----
207879
737184
8694

query I rowsort
SELECT ALL + col2 AS col2 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT + 67 * - col2 + col1 * - col1 + - col1 FROM tab0 AS cor0
----
-13866
-9573
-9693

onlyif mysql # use DIV operator for integer division
query I rowsort label-1734
SELECT tab0.col2 DIV + col1 + - col2 * col2 * - col2 AS col1 FROM tab0
----
1
35937
551368

skipif mysql # not compatible
query I rowsort label-1734
SELECT tab0.col2 / + col1 + - col2 * col2 * - col2 AS col1 FROM tab0
----
1
35937
551368

query I rowsort
SELECT ALL col2 * tab2.col0 AS col1 FROM tab2 WHERE NULL <= NULL
----

query I rowsort
SELECT + col1 * - col1 * - col0 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT + col1 FROM tab0 WHERE col2 IN ( + col2 )
----
86
91
97

query I rowsort
SELECT ALL + tab1.col2 + - col1 * + col0 + + tab1.col0 AS col2 FROM tab1 WHERE NULL <= col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col1 FROM tab0
----
86
91
97

query I rowsort
SELECT + col0 + - col0 + - col0 AS col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ALL - col2 + col1 + col2 AS col1 FROM tab1 WHERE NULL <> NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1742
SELECT col2 DIV + tab1.col2 + col0 AS col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-1742
SELECT col2 / + tab1.col2 + col0 AS col0 FROM tab1
----
4
65
81

query I rowsort
SELECT ALL + tab0.col1 + col2 FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + col0 col1 FROM tab1
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col1 * col0 col0 FROM tab0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-1746
SELECT - col0 DIV + col1 + + col0 * + col1 AS col0 FROM tab1
----
1034
634
78

skipif mysql # not compatible
query I rowsort label-1746
SELECT - col0 / + col1 + + col0 * + col1 AS col0 FROM tab1
----
1034
634
78

query I rowsort
SELECT - col0 * + cor0.col2 * col1 FROM tab2 AS cor0 WHERE col1 + - col1 < col2
----
-119652
-51034
-5859

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT NULL IN ( col1 )
----

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE cor0.col1 * col0 NOT IN ( col2 * + col1 + + col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT DISTINCT col1 FROM tab2 WHERE NULL NOT IN ( col2 )
----

query I rowsort
SELECT DISTINCT col2 + col0 * col2 + - col2 * col0 FROM tab1
----
54
57
96

query I rowsort
SELECT - col1 FROM tab0 WHERE ( NULL ) <= ( NULL )
----

query I rowsort
SELECT tab1.col0 * - col2 * - col2 AS col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT DISTINCT + col1 * - col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT col1 + - col0 * + col1 AS col1 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT - col0 * col1 + col2 AS col0 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT - col2 * tab0.col2 * + col0 AS col0 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT col1 FROM tab0 WHERE NOT NULL BETWEEN ( + col1 ) AND ( NULL )
----

query I rowsort
SELECT DISTINCT - col0 * col0 + col2 + col1 * col2 FROM tab1
----
-3469
-5056
1449

query I rowsort
SELECT ALL + tab1.col2 * - col0 AS col1 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT col2 * - col0 * col2 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT ALL tab2.col1 * col2 * - col1 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT + tab1.col2 * col0 - + col2 FROM tab1
----
108
3591
7584

query I rowsort
SELECT ALL tab2.col2 * col0 * + col0 + + col1 * - col2 AS col0 FROM tab2
----
156650
236512
486

query III rowsort
SELECT ALL * FROM tab1 WHERE col1 * col0 NOT IN ( col2 * col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT ALL - tab0.col2 + tab0.col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT - col1 + + col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT + col1 FROM tab1 WHERE ( - col2 + - col0 ) IN ( col1 / tab1.col0 )
----

query I rowsort
SELECT DISTINCT col1 * tab2.col0 * - col1 AS col0 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT col1 * + col2 * col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT DISTINCT - tab0.col0 + - tab0.col2 AS col2 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT - + col2 * - col1 + col0 AS col1 FROM tab1 AS cor0
----
1328
1407
634

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE col0 = ( + col0 * - cor0.col0 + col1 / col2 ) OR - col0 BETWEEN ( NULL ) AND col1
----

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 + + cor0.col2 * col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - col1 + col2 AS col2 FROM tab1 AS cor0
----
28
47
83

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NULL >= ( col0 + + col0 )
----

query I rowsort
SELECT col2 + col2 * col0 AS col2 FROM tab1
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-1779
SELECT DISTINCT + tab2.col0 DIV tab2.col0 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-1779
SELECT DISTINCT + tab2.col0 / tab2.col0 FROM tab2
----
1

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE NULL NOT IN ( col0 )
----

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query IIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab0
----
54 values hashing to 2a7467bc6f55dbb61fbd4aa2bd0646a9

query I rowsort
SELECT + cor0.col0 + cor0.col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL - + cor0.col0 * + 97 AS col1 FROM tab2 AS cor0
----
-679
-7566
-7663

query I rowsort
SELECT - - col1 * + 3 AS col2 FROM tab0 AS cor0
----
258
273
291

query I rowsort
SELECT DISTINCT col0 * + col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - cor0.col2 * + col1 * col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT ALL - col2 * col0 AS col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL - col1 * ( col2 ) AS col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + col1 * - ( ( + col1 ) ) FROM tab1
----
-100
-169
-676

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
972 values hashing to fe55095fff3a5ecc2f113d14a8c6f823

query I rowsort
SELECT + tab0.col2 FROM tab2, tab2 cor0 CROSS JOIN tab0, tab0 cor1
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT ALL - tab0.col1 + - col2 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT ( - col2 ) + col1 AS col2 FROM tab2
----
-21
33
4

query I rowsort
SELECT DISTINCT col1 * + col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-1797
SELECT - + col0 - - ( + cor0.col2 ) DIV 94 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-1797
SELECT - + col0 - - ( + cor0.col2 ) / 94 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - 74 AS col2 FROM tab0 AS cor0
----
-74
-74
-74

query I rowsort
SELECT col1 * 56 AS col2 FROM tab0 AS cor0
----
4816
5096
5432

query I rowsort
SELECT DISTINCT + - col2 * - col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT + 43 * + col0 - col0 FROM tab2 AS cor0
----
294
3276
3318

query I rowsort
SELECT DISTINCT ( cor0.col1 ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + - ( - col2 ) * col2 + 72 AS col2 FROM tab1 AS cor0
----
2988
3321
9288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1804
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1804
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL col0 - 96 * + col0 FROM tab1 AS cor0
----
-285
-6080
-7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1806
SELECT - + CAST( - col2 AS SIGNED ) + - col0 AS col2 FROM tab0 AS cor0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-1806
SELECT - + CAST ( - col2 AS INTEGER ) + - col0 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - ( - cor0.col0 ) * + col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + 88 FROM tab0 AS cor0
----
88
88
88

query I rowsort
SELECT col0 + col1 * ( - col0 ) * + cor0.col1 FROM tab2 AS cor0
----
-22752
-271440
-6720

query I rowsort
SELECT - 80 + + col2 FROM tab0 AS cor0
----
-47
-79
2

query I rowsort
SELECT + 99 * cor0.col1 FROM tab2 AS cor0
----
1683
3069
5841

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - cor0.col0 + - col1 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-1814
SELECT + - col2 + 14 * col2 DIV + col1 FROM tab0 AS cor0
----
-1
-28
-70

skipif mysql # not compatible
query I rowsort label-1814
SELECT + - col2 + 14 * col2 / + col1 FROM tab0 AS cor0
----
-1
-28
-70

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab2, tab1 cor1
----
243 values hashing to 877a8dbac0e29b86e845fb64ed9d2242

query I rowsort
SELECT DISTINCT + col2 * - cor0.col0 AS col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 + col0 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-1818
SELECT - + col2 DIV + 67 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1818
SELECT - + col2 / + 67 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col0 * + 53 FROM tab2 AS cor0
----
-371
-4134
-4187

query I rowsort
SELECT DISTINCT + - cor0.col2 + 94 * - col1 FROM tab1 AS cor0
----
-1318
-2498
-997

query I rowsort
SELECT DISTINCT + + col2 + + ( + cor0.col1 ) AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - col0 * + ( - col2 ) + - col0 * - col1 + + col2 AS col0 FROM tab1 AS cor0
----
294
4345
8816

onlyif mysql # use DIV operator for integer division
query I rowsort label-1823
SELECT ALL - col2 + col0 DIV - 78 FROM tab2 AS cor0
----
-27
-27
-39

skipif mysql # not compatible
query I rowsort label-1823
SELECT ALL - col2 + col0 / - 78 FROM tab2 AS cor0
----
-27
-27
-39

query I rowsort
SELECT - - col0 * - 50 + + 10 FROM tab0 AS cor0
----
-1190
-1740
-4440

query I rowsort
SELECT DISTINCT - col0 + col1 * - col2 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT DISTINCT + + col0 + col2 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - col1 + + col1 * + col1 AS col2 FROM tab1 AS cor0
----
156
650
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - 34 FROM tab0 AS cor0
----
-34
-34
-34

query I rowsort
SELECT - - ( col0 ) * + cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL ( - col0 ) * col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1832
SELECT col1 + + CAST( col2 AS SIGNED ) FROM tab2
----
55
58
85

skipif mysql # not compatible
query I rowsort label-1832
SELECT col1 + + CAST ( col2 AS INTEGER ) FROM tab2
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-1833
SELECT DISTINCT col2 DIV col0 AS col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-1833
SELECT DISTINCT col2 / col0 AS col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT ALL cor0.col1 - 14 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to e36a45752f8c153f7c91c8154f8a920f

query I rowsort
SELECT ALL - 94 AS col1 FROM tab1 AS cor0
----
-94
-94
-94

query I rowsort
SELECT ALL - col0 * + cor0.col0 + + 33 FROM tab0 AS cor0
----
-1192
-543
-7888

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1837
SELECT - col0 * col1 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1837
SELECT - col0 * col1 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1838
SELECT ALL - col1 + - col1 DIV - col1 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
-23
20
63

skipif mysql # not compatible
query I rowsort label-1838
SELECT ALL - col1 + - col1 / - col1 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
-23
20
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - col0 col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT 16 + 72 AS col1 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT DISTINCT + col0 * col0 - - col0 * - col1 AS col1 FROM tab1 AS cor0
----
-69
3456
5360

query I rowsort
SELECT 23 + col1 FROM tab1 AS cor0
----
33
36
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-1843
SELECT + - cor0.col2 + + col2 DIV cor0.col2 FROM tab1 cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-1843
SELECT + - cor0.col2 + + col2 / cor0.col2 FROM tab1 cor0
----
-53
-56
-95

query I rowsort
SELECT DISTINCT - - 21 * - col1 FROM tab2 AS cor0
----
-1239
-357
-651

query I rowsort
SELECT DISTINCT + - 18 * - cor0.col2 - + col2 AS col2 FROM tab1 AS cor0
----
1632
918
969

query I rowsort
SELECT ALL - 16 - col0 AS col2 FROM tab2 AS cor0
----
-23
-94
-95

query I rowsort
SELECT + 44 + + col1 * col2 FROM tab1 AS cor0
----
1292
1448
614

query I rowsort
SELECT 98 + + tab1.col1 FROM tab1
----
108
111
124

onlyif mysql # use DIV operator for integer division
query I rowsort label-1849
SELECT - col2 * col1 + + tab1.col0 DIV ( - tab1.col1 ) FROM tab1
----
-1254
-1404
-576

skipif mysql # not compatible
query I rowsort label-1849
SELECT - col2 * col1 + + tab1.col0 / ( - tab1.col1 ) FROM tab1
----
-1254
-1404
-576

query I rowsort
SELECT DISTINCT col2 + tab0.col2 AS col1 FROM tab0
----
164
2
66

query I rowsort
SELECT 7 * col2 - + 15 FROM tab2
----
167
174
251

query I rowsort
SELECT DISTINCT - col2 + + col0 * + tab2.col0 AS col0 FROM tab2
----
22
6058
6203

query I rowsort
SELECT DISTINCT - col1 + - col1 AS col0 FROM tab0
----
-172
-182
-194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1854
SELECT ALL + cor0.col2 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1854
SELECT ALL + cor0.col2 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 + 88 * ( col2 ) AS col1 FROM tab0 AS cor0
----
2937
7298
89

query I rowsort
SELECT ALL + 40 + col2 * 0 * 33 FROM tab1 AS cor0
----
40
40
40

query I rowsort
SELECT ( - col2 ) + + col0 AS col0 FROM tab2
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1858
SELECT - col0 + col1 * - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1858
SELECT - col0 + col1 * - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * col1 + col0 AS col1 FROM tab1
----
1120
704
81

query I rowsort
SELECT + - 48 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 2558735eaa258a08592aef9d33020c18

query I rowsort
SELECT DISTINCT - col1 + + col1 * 69 FROM tab0
----
5848
6188
6596

query I rowsort
SELECT ALL + 92 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c64cb7a81da51f4be0b6906a223e8817

query I rowsort
SELECT - cor0.col1 * tab1.col2 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to a8ce768203b74f299b6ebad5477b14c1

query I rowsort
SELECT - - col2 * col0 * col1 + cor0.col2 FROM tab0 AS cor0
----
3396
664200
68145

query I rowsort
SELECT DISTINCT - 12 FROM tab0 AS cor0
----
-12

query I rowsort
SELECT - col0 + cor0.col1 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT 16 + + col0 FROM tab2 AS cor0
----
23
94
95

query I rowsort
SELECT + - 19 * col1 + 9 FROM tab2 AS cor0
----
-1112
-314
-580

query I rowsort
SELECT 7 + col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1218
-569
-7914

onlyif mysql # use DIV operator for integer division
query I rowsort label-1870
SELECT DISTINCT col1 DIV col0 + - col1 FROM tab0
----
-83
-90
-95

skipif mysql # not compatible
query I rowsort label-1870
SELECT DISTINCT col1 / col0 + - col1 FROM tab0
----
-83
-90
-95

query I rowsort
SELECT DISTINCT - tab0.col0 AS col1 FROM tab0, tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + + col1 + col2 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - col0 + + col1 * col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT col2 * - 36 + col2 * + cor0.col1 * + col1 AS col1 FROM tab1 AS cor0
----
12768
34560
3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-1875
SELECT - 88 DIV col2 + + col1 FROM tab1
----
13
25
9

skipif mysql # not compatible
query I rowsort label-1875
SELECT - 88 / col2 + + col1 FROM tab1
----
13
25
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( 23 ) col0 FROM tab2 AS cor0
----
23
23
23

query I rowsort
SELECT - col1 - - 0 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT cor0.col0 + - col2 * + col2 AS col1 FROM tab0 cor0
----
-1065
-6635
34

query I rowsort
SELECT - ( col2 ) * - col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + - 83 * col2 FROM tab2 AS cor0
----
-2158
-2241
-3154

query I rowsort
SELECT ALL + col2 * 72 AS col2 FROM tab2
----
1872
1944
2736

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1882
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1882
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - ( + col2 ) AS col2 FROM tab0
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1884
SELECT ALL - CAST( + 49 AS SIGNED ) AS col2 FROM tab0
----
-49
-49
-49

skipif mysql # not compatible
query I rowsort label-1884
SELECT ALL - CAST ( + 49 AS INTEGER ) AS col2 FROM tab0
----
-49
-49
-49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1885
SELECT ALL cor0.col0 * + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1885
SELECT ALL cor0.col0 * + CAST ( NULL AS REAL ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
972 values hashing to 5e655b1287771868a8f868574a94d749

query I rowsort
SELECT DISTINCT - ( col0 ) AS col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT + 82 FROM tab1 AS cor0
----
82
82
82

query I rowsort
SELECT ALL col2 + cor0.col1 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + + 28 FROM tab1 AS cor0
----
28
28
28

query I rowsort
SELECT + 93 * - col2 AS col0 FROM tab0 cor0
----
-3069
-7626
-93

query I rowsort
SELECT ALL + - 32 + - col0 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-194
-3680
-7712

query I rowsort
SELECT DISTINCT + + 14 + col0 FROM tab2 cor0
----
21
92
93

query I rowsort
SELECT col1 + + col0 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT + ( - cor0.col1 ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - - col0 * col0 + col2 AS col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT ALL - col0 + + cor0.col1 * + col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT ALL cor0.col1 * col0 + + col0 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ( 93 + col0 ) FROM tab2
----
100
171
172

query I rowsort
SELECT ALL 90 * ( + col0 ) AS col2 FROM tab2
----
630
7020
7110

query I rowsort
SELECT - 38 AS col0 FROM tab2
----
-38
-38
-38

query I rowsort
SELECT 29 AS col1 FROM tab0
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 col0 FROM tab1, tab2 cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT + 83 FROM tab1 cor0
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( tab1.col0 ) col2 FROM tab1
----
3
64
80

query I rowsort
SELECT + 32 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT - ( + col0 ) + 13 FROM tab0 AS cor0
----
-11
-22
-76

query I rowsort
SELECT + + col2 * - col2 AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - 17 AS col0 FROM tab2 AS cor0
----
-17
-17
-17

query I rowsort
SELECT 99 + col0 FROM tab2
----
106
177
178

query I rowsort
SELECT ALL - 14 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

onlyif mysql # use DIV operator for integer division
query I rowsort label-1912
SELECT - - 1 + col2 DIV + 81 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1912
SELECT - - 1 + col2 / + 81 FROM tab2 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1913
SELECT DISTINCT - cor0.col1 + col1 DIV cor0.col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-1913
SELECT DISTINCT - cor0.col1 + col1 / cor0.col1 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT ALL 84 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT ALL - 7 AS col2 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 82db7c0390abae7ccf4512b1302a6466

query I rowsort
SELECT - + col1 + + col2 * 96 * + col1 FROM tab1 AS cor0
----
119795
134758
54710

query I rowsort
SELECT col0 + - 64 AS col2 FROM tab1 AS cor0
----
-61
0
16

query I rowsort
SELECT - - col0 + 80 * - 4 FROM tab1 AS cor0
----
-240
-256
-317

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 * + CAST ( + col0 AS REAL ) + - col1 + ( 42 ) FROM tab1 AS cor0
----
25
4128
6429

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + col1 * - cor0.col2 col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT + - col2 * ( col2 ) AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - - col1 + - col0 AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT - + col1 + 87 + + col1 * 66 FROM tab1 AS cor0
----
1777
737
932

query I rowsort
SELECT DISTINCT 24 - - cor0.col2 FROM tab0, tab1 AS cor0
----
120
78
81

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab2 cor1, tab0 AS cor2
----
972 values hashing to 58757c5bbbd4217c03cf2ac0b6126e55

query I rowsort
SELECT + cor1.col1 + + 48 AS col1 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to 45207e25716e4415a742d6cfb603f419

query I rowsort
SELECT DISTINCT + col0 * col1 + col1 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL + col0 * + ( cor0.col1 ) - col2 AS col1 FROM tab2 AS cor0
----
1305
190
4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-1929
SELECT DISTINCT + - col0 DIV col2 AS col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-1929
SELECT DISTINCT + - col0 / col2 AS col2 FROM tab0 AS cor0
----
-1
-35
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1930
SELECT col1 + CAST( col2 AS SIGNED ) FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-1930
SELECT col1 + CAST ( col2 AS INTEGER ) FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + - col1 + 55 * col0 AS col1 FROM tab2 cor0
----
354
4231
4328

query I rowsort
SELECT ALL - col0 * cor0.col1 * + col2 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL col2 * + 54 FROM tab2 AS cor0
----
1404
1458
2052

query I rowsort
SELECT - tab2.col1 + - tab2.col2 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT ALL - + col1 + - 59 FROM tab0 cor0
----
-145
-150
-156

query I rowsort
SELECT DISTINCT + col1 - cor0.col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL col0 + - 0 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT col0 + + 81 * 90 * col1 AS col2 FROM tab2
----
124009
225997
430188

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 cor1, tab0 AS cor2
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT + 52 FROM tab2, tab2 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT - - col2 + + cor0.col0 * + 94 FROM tab1 AS cor0
----
336
6073
7616

query I rowsort
SELECT - cor0.col0 * - 24 FROM tab2 AS cor0
----
168
1872
1896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col0 + tab2.col2 col1 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0 WHERE NOT ( NULL ) NOT BETWEEN col1 * + col0 AND NULL
----

query I rowsort
SELECT DISTINCT col1 + col2 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT 19 FROM tab1 AS cor0
----
19

query I rowsort
SELECT ALL + - 48 FROM tab2 AS cor0
----
-48
-48
-48

query I rowsort
SELECT 75 * - cor0.col0 + col2 + + ( col2 ) AS col0 FROM tab2 AS cor0
----
-471
-5798
-5849

query I rowsort
SELECT col2 - - col0 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-1951
SELECT DISTINCT col0 DIV tab0.col2 AS col2 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-1951
SELECT DISTINCT col0 / tab0.col2 AS col2 FROM tab0
----
0
1
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-1952
SELECT DISTINCT + tab2.col2 DIV col1 FROM tab2
----
0
2

skipif mysql # not compatible
query I rowsort label-1952
SELECT DISTINCT + tab2.col2 / col1 FROM tab2
----
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-1953
SELECT col1 DIV - col0 AS col1 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-1953
SELECT col1 / - col0 AS col1 FROM tab2
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col1 col1 FROM tab0 WHERE + col2 + - col2 IN ( - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1955
SELECT ALL - tab0.col2 DIV + col0 + - col2 + - col0 AS col0 FROM tab0
----
-171
-36
-58

skipif mysql # not compatible
query I rowsort label-1955
SELECT ALL - tab0.col2 / + col0 + - col2 + - col0 AS col0 FROM tab0
----
-171
-36
-58

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT col0 + col0 NOT IN ( - col1 )
----

query I rowsort
SELECT DISTINCT col0 * tab2.col2 * col1 AS col1 FROM tab2
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + tab1.col1 + col0 col0 FROM tab1
----
3
64
80

query I rowsort
SELECT + col1 * col2 + col0 FROM tab1
----
1328
1407
634

query I rowsort
SELECT col1 + - col2 * - col2 + col1 * - col1 FROM tab2
----
-201
-2746
1172

query I rowsort
SELECT - col0 * + tab1.col1 AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - col1 + col0 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT col1 * col1 + + col1 AS col0 FROM tab2
----
306
3540
992

query I rowsort
SELECT + 68 AS col1 FROM tab0
----
68
68
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-1965
SELECT DISTINCT 40 + col0 DIV + col2 + - col0 * col0 AS col0 FROM tab1
----
-4055
-6360
31

skipif mysql # not compatible
query I rowsort label-1965
SELECT DISTINCT 40 + col0 / + col2 + - col0 * col0 AS col0 FROM tab1
----
-4055
-6360
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-1966
SELECT + + col2 * + col1 * col2 + col1 DIV + col2 FROM tab1 AS cor0
----
119808
32490
75816

skipif mysql # not compatible
query I rowsort label-1966
SELECT + + col2 * + col1 * col2 + col1 / + col2 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT ALL - col0 + col1 * col2 FROM tab2 cor0
----
1456
567
830

query I rowsort
SELECT ( col0 ) + - 19 FROM tab0 AS cor0
----
16
5
70

query I rowsort
SELECT ALL + 38 AS col2 FROM tab0 AS cor0
----
38
38
38

query I rowsort
SELECT col2 * col0 + - ( - col2 * col1 ) FROM tab0 AS cor0
----
132
14760
3630

query I rowsort
SELECT cor0.col2 + + col2 AS col0 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL - 90 * col1 + 38 FROM tab0
----
-7702
-8152
-8692

query I rowsort
SELECT ALL + + col1 + - col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - - col0 * - col1 + cor0.col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - + cor0.col2 + col2 * col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT ( col2 ) + col2 AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL - 10 + col1 * 31 * col1 FROM tab1 AS cor0
----
20946
3090
5229

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1978
SELECT DISTINCT - col2 * col1 * + CAST( col1 * + col1 AS DECIMAL ) + CAST( NULL AS SIGNED ) * + cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1978
SELECT DISTINCT - col2 * col1 * + CAST ( col1 * + col1 AS REAL ) + CAST ( NULL AS INTEGER ) * + cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - - ( cor0.col2 ) + - 86 AS col2 FROM tab2 AS cor0
----
-48
-59
-60

query I rowsort
SELECT 39 * - col0 FROM tab1 AS cor0
----
-117
-2496
-3120

query I rowsort
SELECT + 86 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ed1a39c2752ca3723602e4a92c54bbc4

onlyif mysql # use DIV operator for integer division
query I rowsort label-1982
SELECT + cor0.col1 DIV + 69 FROM tab1, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-1982
SELECT + cor0.col1 / + 69 FROM tab1, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT ALL + + 40 + col1 AS col0 FROM tab0 AS cor0
----
126
131
137

query I rowsort
SELECT DISTINCT - - col0 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - + col0 * - cor0.col0 + ( col0 * col0 ) AS col2 FROM tab2 AS cor0
----
12168
12482
98

query I rowsort
SELECT ALL + cor0.col1 * 77 + + 2 FROM tab2 AS cor0
----
1311
2389
4545

query I rowsort
SELECT col0 + + 0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - col2 * + 87 AS col0 FROM tab0 cor0
----
-2871
-7134
-87

query I rowsort
SELECT ALL + + col2 + col2 AS col0 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-1990
SELECT + col0 DIV 69 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1990
SELECT + col0 / 69 FROM tab2 AS cor0
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * cor0.col1 col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + cor0.col2 - tab0.col0 * ( - tab0.col1 * tab0.col0 ) FROM tab0, tab0 cor0
----
9 values hashing to 72d3746891e70527bb8558c720933410

query I rowsort
SELECT col0 * + col2 * - col1 - 88 * col1 AS col2 FROM tab2
----
-124844
-52530
-8587

query I rowsort
SELECT ALL - - col2 + cor0.col1 AS col1 FROM tab2 cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1995
SELECT DISTINCT - cor0.col2 + CAST( col0 AS SIGNED ) FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-1995
SELECT DISTINCT - cor0.col2 + CAST ( col0 AS INTEGER ) FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - 5 + - 72 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT - cor0.col0 * col1 * col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - col2 * - 38 * 43 FROM tab0 AS cor0
----
133988
1634
53922

query I rowsort
SELECT DISTINCT + + col2 * + col2 AS col2 FROM tab2 cor0
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2001
SELECT col1 + CAST( NULL AS SIGNED ) / col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2001
SELECT col1 + CAST ( NULL AS INTEGER ) / col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( - col0 ) + col0 AS col2 FROM tab1 cor0
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to e4c748f267e8d2a0e6d563281e1fb975

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab0 cor1, tab2 AS cor2
----
972 values hashing to 9600bdf5bac0caec3229e87170cc40b3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col1 ) col0 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * + col0 col2 FROM tab1 cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2007
SELECT + + CAST( NULL AS SIGNED ) + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2007
SELECT + + CAST ( NULL AS INTEGER ) + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 + - 49 FROM tab0 AS cor0
----
-14
-25
40

query I rowsort
SELECT ALL - 29 * + ( col2 ) + ( col2 ) FROM tab1 AS cor0
----
-1512
-1596
-2688

query I rowsort
SELECT ALL - 92 + col0 AS col0 FROM tab1 AS cor0
----
-12
-28
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2011
SELECT DISTINCT col1 * col2 DIV - col0 FROM tab1 cor0
----
-15
-468
-8

skipif mysql # not compatible
query I rowsort label-2011
SELECT DISTINCT col1 * col2 / - col0 FROM tab1 cor0
----
-15
-468
-8

query I rowsort
SELECT DISTINCT + ( col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL 71 * cor0.col2 FROM tab1 AS cor0
----
3834
4047
6816

query I rowsort
SELECT - 46 + cor0.col2 FROM tab2 AS cor0
----
-19
-20
-8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2015
SELECT ALL - - col1 * cor0.col1 + ( - col0 * col1 ) + - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2015
SELECT ALL - - col1 * cor0.col1 + ( - col0 * col1 ) + - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor0.col0 + col0 FROM tab1 cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2017
SELECT col2 * col1 + col2 DIV col1 AS col1 FROM tab1 AS cor0
----
1255
1406
575

skipif mysql # not compatible
query I rowsort label-2017
SELECT col2 * col1 + col2 / col1 AS col1 FROM tab1 AS cor0
----
1255
1406
575

query I rowsort
SELECT ALL cor0.col1 + col2 AS col0 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2019
SELECT - col0 DIV - col0 + + col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-2019
SELECT - col0 / - col0 + + col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT DISTINCT - - col0 + + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT cor0.col2 * col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2022
SELECT ALL 9 DIV - col1 - - 25 FROM tab2 AS cor0
----
25
25
25

skipif mysql # not compatible
query I rowsort label-2022
SELECT ALL 9 / - col1 - - 25 FROM tab2 AS cor0
----
25
25
25

query I rowsort
SELECT DISTINCT + + col2 + - col1 * col0 AS col0 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL 23 * + col2 + + col1 FROM tab0
----
120
1977
845

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - col0 col1 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT - 59 FROM tab2
----
-59
-59
-59

query I rowsort
SELECT - cor1.col2 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT ALL - col2 * col1 - - col0 AS col0 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT + 51 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

onlyif mysql # use DIV operator for integer division
query I rowsort label-2030
SELECT DISTINCT col1 DIV - 2 FROM tab1
----
-13
-5
-6

skipif mysql # not compatible
query I rowsort label-2030
SELECT DISTINCT col1 / - 2 FROM tab1
----
-13
-5
-6

query I rowsort
SELECT col2 * + col2 + + 28 FROM tab2 AS cor0
----
1472
704
757

onlyif mysql # use DIV operator for integer division
query I rowsort label-2032
SELECT DISTINCT col1 DIV ( col1 + col2 ) FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-2032
SELECT DISTINCT col1 / ( col1 + col2 ) FROM tab0
----
0

query I rowsort
SELECT DISTINCT col1 + 26 AS col1 FROM tab0 AS cor0
----
112
117
123

query I rowsort
SELECT ALL + col0 * + col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + ( col1 ) * col1 col0 FROM tab2 AS cor0
----
251
3455
934

onlyif mysql # use DIV operator for integer division
query I rowsort label-2036
SELECT DISTINCT col1 DIV + 74 AS col2 FROM tab2 cor0
----
0

skipif mysql # not compatible
query I rowsort label-2036
SELECT DISTINCT col1 / + 74 AS col2 FROM tab2 cor0
----
0

query I rowsort
SELECT + 91 + - col2 + col1 AS col0 FROM tab2 AS cor0
----
124
70
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-2038
SELECT - - col1 DIV + 58 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2038
SELECT - - col1 / + 58 FROM tab0 cor0
----
1
1
1

query IIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab1, tab0 AS cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

query I rowsort
SELECT ALL - col2 * col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + 50 * col1 FROM tab0 AS cor0
----
4300
4550
4850

query I rowsort
SELECT + col0 * 87 FROM tab1 AS cor0
----
261
5568
6960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2043
SELECT CAST( 17 AS SIGNED ) + + col2 AS col2 FROM tab2 AS cor0
----
43
44
55

skipif mysql # not compatible
query I rowsort label-2043
SELECT CAST ( 17 AS INTEGER ) + + col2 AS col2 FROM tab2 AS cor0
----
43
44
55

query I rowsort
SELECT DISTINCT col0 + - col2 AS col2 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT - col1 * col0 * col1 + 50 AS col1 FROM tab2 AS cor0
----
-22781
-271468
-6677

query I rowsort
SELECT ALL + cor0.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-2047
SELECT + + col2 * cor0.col2 + col0 + cor0.col2 * col2 / CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2047
SELECT + + col2 * cor0.col2 + col0 + cor0.col2 * col2 / CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col0 + cor0.col0 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - 37 + col2 * 67 AS col2 FROM tab1 AS cor0
----
3581
3782
6395

query I rowsort
SELECT 44 AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 19a2b9512177749564ba22ea2213fe3f

query I rowsort
SELECT cor0.col1 + + cor0.col1 AS col2 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT col0 + cor0.col1 * + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT - + tab0.col2 FROM tab0, tab2, tab1 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # use DIV operator for integer division
query I rowsort label-2056
SELECT + tab1.col1 DIV + 76 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-2056
SELECT + tab1.col1 / + 76 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT cor0.col2 * cor0.col2 + - 19 AS col0 FROM tab1 AS cor0
----
2897
3230
9197

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 7 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

query I rowsort
SELECT + - col2 + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + col1 + + ( col1 ) * - cor0.col2 col0 FROM tab0 AS cor0
----
-1
-2785
-7453

query I rowsort
SELECT + col1 * col2 + + 27 * col2 AS col0 FROM tab2 cor0
----
1566
1672
2236

query I rowsort
SELECT DISTINCT + + 86 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
86

query I rowsort
SELECT + ( col0 ) AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2065
SELECT DISTINCT + col0 + CAST( + col1 AS SIGNED ) AS col1 FROM tab0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-2065
SELECT DISTINCT + col0 + CAST ( + col1 AS INTEGER ) AS col1 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2066
SELECT - col2 DIV 24 - col2 AS col0 FROM tab2
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-2066
SELECT - col2 / 24 - col2 AS col0 FROM tab2
----
-27
-28
-39

onlyif mysql # use DIV operator for integer division
query I rowsort label-2067
SELECT col1 - + col0 DIV + col1 FROM tab1
----
26
4
7

skipif mysql # not compatible
query I rowsort label-2067
SELECT col1 - + col0 / + col1 FROM tab1
----
26
4
7

query I rowsort
SELECT DISTINCT col0 + + ( tab2.col0 ) AS col2 FROM tab2
----
14
156
158

query I rowsort
SELECT DISTINCT - col2 * + 87 + - col1 AS col1 FROM tab1
----
-4724
-4969
-8365

query I rowsort
SELECT DISTINCT col0 + + col2 + col1 * + 1 AS col1 FROM tab2
----
134
163
65

query I rowsort
SELECT + + col0 + + col0 AS col2 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT - ( cor0.col2 ) - col2 FROM tab1 AS cor0
----
-108
-114
-192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 85 col0 FROM tab1 AS cor0
----
85
85
85

query I rowsort
SELECT col1 - col1 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2075
SELECT DISTINCT + col1 DIV cor0.col1 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-2075
SELECT DISTINCT + col1 / cor0.col1 FROM tab1 AS cor0
----
1

query I rowsort
SELECT ALL + ( col0 ) * col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL 28 * - 26 AS col1 FROM tab2
----
-728
-728
-728

query I rowsort
SELECT - 94 FROM tab0
----
-94
-94
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-2079
SELECT 28 DIV + 69 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2079
SELECT 28 / + 69 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2080
SELECT + ( - col2 + + col2 ) DIV col0 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2080
SELECT + ( - col2 + + col2 ) / col0 AS col2 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 89 col2 FROM tab1
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 41 + col1 col1 FROM tab1
----
51
54
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2083
SELECT cor0.col0 + col0 * - CAST( cor0.col0 AS SIGNED ) * col0 AS col2 FROM tab2 AS cor0
----
-336
-474474
-492960

skipif mysql # not compatible
query I rowsort label-2083
SELECT cor0.col0 + col0 * - CAST ( cor0.col0 AS INTEGER ) * col0 AS col2 FROM tab2 AS cor0
----
-336
-474474
-492960

query I rowsort
SELECT tab2.col0 FROM tab2, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT - - col1 * col0 + - 54 * 25 FROM tab1 AS cor0
----
-1272
-310
-710

query I rowsort
SELECT col1 + - cor0.col2 * - ( col0 + col1 ) FROM tab1 AS cor0
----
1592
4228
8941

query I rowsort
SELECT + 43 + col0 AS col0 FROM tab1 AS cor0
----
107
123
46

query I rowsort
SELECT - col1 + col0 * - col0 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT DISTINCT col1 + 20 FROM tab1
----
30
33
46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2090
SELECT ALL + CAST( NULL AS SIGNED ) + - 22 * + tab2.col0 * - col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2090
SELECT ALL + CAST ( NULL AS INTEGER ) + - 22 * + tab2.col0 * - col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 + col0 * + col0 FROM tab2
----
6143
6258
80

query I rowsort
SELECT ALL ( col0 ) AS col0 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT + col1 + tab2.col2 * col2 AS col0 FROM tab2
----
1461
735
760

query I rowsort
SELECT + 60 + + 21 FROM tab2
----
81
81
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2095
SELECT - CAST( + col2 AS SIGNED ) + - col0 * ( - 46 ) FROM tab0 AS cor0
----
1071
1609
4012

skipif mysql # not compatible
query I rowsort label-2095
SELECT - CAST ( + col2 AS INTEGER ) + - col0 * ( - 46 ) FROM tab0 AS cor0
----
1071
1609
4012

onlyif mysql # use DIV operator for integer division
query I rowsort label-2096
SELECT - ( cor0.col1 ) DIV + col0 + + 68 FROM tab1 AS cor0
----
60
68
68

skipif mysql # not compatible
query I rowsort label-2096
SELECT - ( cor0.col1 ) / + col0 + + 68 FROM tab1 AS cor0
----
60
68
68

query I rowsort
SELECT DISTINCT - 90 * cor0.col2 + + col1 FROM tab0 AS cor0
----
-2884
-7289
7

query I rowsort
SELECT DISTINCT 37 * col2 + col0 FROM tab0 AS cor0
----
1245
3123
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2099
SELECT CAST( NULL AS SIGNED ) + col1 * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2099
SELECT CAST ( NULL AS INTEGER ) + col1 * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + ( col0 ) AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ( + col2 ) * col1 + 24 * + col0 * col2 + - col0 AS col1 FROM tab2 AS cor0
----
50128
5366
72615

query I rowsort
SELECT + 78 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT ALL + 87 FROM tab2 cor0
----
87
87
87

query I rowsort
SELECT ALL 72 * col0 + - col1 FROM tab2 AS cor0
----
473
5557
5671

query I rowsort
SELECT ALL + ( + col2 ) + col2 * + col1 AS col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT + col0 + col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ALL + 73 + - col2 + col2 FROM tab0 AS cor0
----
73
73
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-2108
SELECT - 62 DIV col0 FROM tab1 AS cor0
----
-20
0
0

skipif mysql # not compatible
query I rowsort label-2108
SELECT - 62 / col0 FROM tab1 AS cor0
----
-20
0
0

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - 77 + + col0 AS col2 FROM tab1 AS cor0
----
-13
-74
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-2111
SELECT + col1 + col2 DIV + col2 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-2111
SELECT + col1 + col2 / + col2 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT DISTINCT - col1 * + col0 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT 36 * col2 FROM tab2 cor0
----
1368
936
972

onlyif mysql # use DIV operator for integer division
query I rowsort label-2114
SELECT - col0 DIV + col2 AS col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2114
SELECT - col0 / + col2 AS col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL + cor0.col1 + col2 + col1 AS col0 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT DISTINCT + + 45 * + col2 AS col2 FROM tab0 AS cor0
----
1485
3690
45

query I rowsort
SELECT + 96 * col0 + - col0 * col0 AS col2 FROM tab0
----
1728
2135
623

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col2 col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + col0 * col1 * + tab1.col0 + ( col1 ) FROM tab1
----
260
40970
83213

query I rowsort
SELECT ALL - + cor0.col1 * + col2 AS col0 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - 47 + - col1 FROM tab0 AS cor0
----
-133
-138
-144

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + - col1 * col1 * col2 col0 FROM tab2 AS cor0
----
-10965
-25916
-90447

onlyif mysql # use DIV operator for integer division
query I rowsort label-2123
SELECT DISTINCT col2 * col1 DIV - 80 FROM tab1 AS cor0
----
-15
-17
-7

skipif mysql # not compatible
query I rowsort label-2123
SELECT DISTINCT col2 * col1 / - 80 FROM tab1 AS cor0
----
-15
-17
-7

query I rowsort
SELECT ALL + - col0 * + cor0.col0 - col0 FROM tab2 AS cor0
----
-56
-6162
-6320

query I rowsort
SELECT + - cor0.col1 - col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT col1 * + ( 92 ) + col1 FROM tab1 AS cor0
----
1209
2418
930

query I rowsort
SELECT cor0.col2 * ( col0 ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL col1 * + 35 + - cor0.col2 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
-51
248
531

query I rowsort
SELECT ALL - 94 FROM tab2
----
-94
-94
-94

query I rowsort
SELECT - col0 + + 12 * - col2 AS col2 FROM tab2 AS cor0
----
-331
-390
-535

query I rowsort
SELECT ALL + col1 * - ( 17 ) FROM tab0 AS cor0
----
-1462
-1547
-1649

query I rowsort
SELECT ALL + col0 + - col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - col0 + cor0.col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col2 * col0 - col1 FROM tab2 cor0
----
158
1969
2985

query I rowsort
SELECT ALL - - col1 * - 25 AS col1 FROM tab2 AS cor0
----
-1475
-425
-775

query I rowsort
SELECT ALL col0 + cor0.col0 AS col2 FROM tab0 AS cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 45 + + 2 col2 FROM tab0, tab0 AS cor0, tab2 AS cor1, tab1 cor2
----
47

query I rowsort
SELECT + + ( 19 ) + - col0 * col2 FROM tab1 AS cor0
----
-143
-3629
-7661

onlyif mysql # use DIV operator for integer division
query I rowsort label-2139
SELECT + + col1 + 2 DIV + col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2139
SELECT + + col1 + 2 / + col1 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 84 + - col0 + - col1 col1 FROM tab2 AS cor0
----
-12
-53
46

query I rowsort
SELECT - col2 * 9 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-250
-312
-421

query I rowsort
SELECT DISTINCT + - col1 * + 75 FROM tab2 AS cor0
----
-1275
-2325
-4425

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col1 + + col0 col1 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2144
SELECT CAST( NULL AS DECIMAL ) + + col1 * cor0.col0 * + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2144
SELECT CAST ( NULL AS REAL ) + + col1 * cor0.col0 * + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2145
SELECT + col0 DIV ( 39 + + col2 ) AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2145
SELECT + col0 / ( 39 + + col2 ) AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT - 53 FROM tab2, tab1 AS cor0
----
9 values hashing to fee5c00ad71c23e23683a32c71fe6e7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-2147
SELECT ALL + CAST( + col0 AS SIGNED ) + col2 DIV - ( col1 ) FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2147
SELECT ALL + CAST ( + col0 AS INTEGER ) + col2 / - ( col1 ) FROM tab0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2148
SELECT DISTINCT CAST( + col1 AS SIGNED ) * + col1 FROM tab2 AS cor0
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-2148
SELECT DISTINCT CAST ( + col1 AS INTEGER ) * + col1 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2149
SELECT ALL - col0 * - cor0.col2 + + cor0.col0 * CAST( col2 AS SIGNED ) * col0 FROM tab0 AS cor0
----
1260
19800
656820

skipif mysql # not compatible
query I rowsort label-2149
SELECT ALL - col0 * - cor0.col2 + + cor0.col0 * CAST ( col2 AS INTEGER ) * col0 FROM tab0 AS cor0
----
1260
19800
656820

query I rowsort
SELECT DISTINCT - + 40 FROM tab2 AS cor0
----
-40

query I rowsort
SELECT ALL + - 52 * - 12 + - col2 AS col0 FROM tab0 AS cor0
----
542
591
623

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) + cor0.col1 col1 FROM tab1 cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2153
SELECT - CAST( - 27 AS SIGNED ) FROM tab0 AS cor0
----
27
27
27

skipif mysql # not compatible
query I rowsort label-2153
SELECT - CAST ( - 27 AS INTEGER ) FROM tab0 AS cor0
----
27
27
27

query I rowsort
SELECT col1 - + 68 AS col1 FROM tab1 AS cor0
----
-42
-55
-58

query I rowsort
SELECT ALL + - col2 + col2 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 * cor0.col0 - col0 FROM tab2 AS cor0
----
1264
210
4524

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2157
SELECT ALL CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2157
SELECT ALL CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT 18 * - 46 + + tab1.col2 * + col1 FROM tab1
----
-258
420
576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT + col2 * - tab0.col0 * col0 AS col0 FROM tab0
----
-1225
-19008
-649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-2161
SELECT DISTINCT 27 DIV + col0 AS col0 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-2161
SELECT DISTINCT 27 / + col0 AS col0 FROM tab0 AS cor0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2162
SELECT DISTINCT cor0.col0 DIV cor0.col1 col2 FROM tab2, tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2162
SELECT DISTINCT cor0.col0 / cor0.col1 col2 FROM tab2, tab0 AS cor0
----
0

query I rowsort
SELECT ALL - - 8 * col0 FROM tab1 AS cor0
----
24
512
640

query I rowsort
SELECT DISTINCT 77 + - col0 * - col2 AS col1 FROM tab1 cor0
----
239
3725
7757

query I rowsort
SELECT DISTINCT + col2 * col2 * 61 FROM tab2
----
41236
44469
88084

query I rowsort
SELECT - + cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2167
SELECT ALL - cor0.col0 DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2167
SELECT ALL - cor0.col0 / cor0.col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2168
SELECT + tab1.col2 * + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2168
SELECT + tab1.col2 * + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * col2 + - 6 FROM tab0
----
29
7292
786

query I rowsort
SELECT ALL 30 FROM tab2, tab0 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT - - col0 + 98 AS col1 FROM tab0 AS cor0
----
122
133
187

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + 35 col0 FROM tab1 AS cor0
----
45
48
61

query I rowsort
SELECT DISTINCT + + col0 + - 74 FROM tab2 AS cor0
----
-67
4
5

query I rowsort
SELECT ALL col0 + + cor0.col2 * + col2 AS col0 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT 76 * + col2 FROM tab0 AS cor0
----
2508
6232
76

query I rowsort
SELECT - + col2 * + col1 * col1 AS col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2177
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2177
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

query I rowsort
SELECT - col0 + col0 * + col0 AS col1 FROM tab2
----
42
6006
6162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * 27 * - col0 col0 FROM tab2
----
-5103
-54756
-81054

query I rowsort
SELECT DISTINCT + col0 + + 42 FROM tab1 cor0
----
106
122
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-2181
SELECT ( col2 ) DIV col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2181
SELECT ( col2 ) / col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 86 AS col0 FROM tab2, tab1 AS cor0
----
86

query I rowsort
SELECT ALL + 10 FROM tab0 AS cor0
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 75 * col1 col1 FROM tab2
----
1275
2325
4425

query I rowsort
SELECT DISTINCT col2 * + tab1.col2 * ( + 42 ) FROM tab1
----
122472
136458
387072

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0, tab2 cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2187
SELECT CAST( NULL AS SIGNED ) FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2187
SELECT CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort
SELECT + col1 + CAST ( col0 AS REAL ) * col2 AS col0 FROM tab0
----
132
7389
878

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2189
SELECT - col1 + - CAST( NULL AS SIGNED ) / cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2189
SELECT - col1 + - CAST ( NULL AS INTEGER ) / cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + - ( col0 ) FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL col2 * + ( col0 ) + col1 AS col2 FROM tab0 AS cor0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col1 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ( + cor0.col2 ) * col2 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-2194
SELECT - + col1 DIV col0 AS col2 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-2194
SELECT - + col1 / col0 AS col2 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT + col2 * - col0 * col2 FROM tab0 cor0
----
-26136
-35
-598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2196
SELECT DISTINCT CAST( NULL AS SIGNED ) * 94 + - col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2196
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 94 + - col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2197
SELECT ALL CAST( - col1 AS SIGNED ) + + col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2197
SELECT ALL CAST ( - col1 AS INTEGER ) + + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 0 + + col2 * col2 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2199
SELECT ALL - - CAST( NULL AS SIGNED ) * 76 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2199
SELECT ALL - - CAST ( NULL AS INTEGER ) * 76 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 + 80 FROM tab1 AS cor0
----
144
160
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2201
SELECT + 12 DIV col1 AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2201
SELECT + 12 / col1 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT col0 * 16 + 1 * col2 + 56 AS col0 FROM tab2
----
1330
1358
195

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2203
SELECT DISTINCT tab0.col2 + CAST( NULL AS SIGNED ) + + col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2203
SELECT DISTINCT tab0.col2 + CAST ( NULL AS INTEGER ) + + col0 FROM tab0
----
NULL

query I rowsort
SELECT + 69 * 58 AS col1 FROM tab2 AS cor0
----
4002
4002
4002

query I rowsort
SELECT - - col2 * - col0 * col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT - ( - col2 ) * + col0 + - ( col1 ) * + col2 AS col0 FROM tab1 cor0
----
-1242
3078
6432

onlyif mysql # use DIV operator for integer division
query I rowsort label-2207
SELECT - cor0.col1 * col0 + - cor0.col0 DIV - 20 AS col2 FROM tab2 cor0
----
-1340
-217
-4599

skipif mysql # not compatible
query I rowsort label-2207
SELECT - cor0.col1 * col0 + - cor0.col0 / - 20 AS col2 FROM tab2 cor0
----
-1340
-217
-4599

onlyif mysql # use DIV operator for integer division
query I rowsort label-2208
SELECT 73 DIV - col1 + + col0 AS col0 FROM tab2 AS cor0
----
5
75
77

skipif mysql # not compatible
query I rowsort label-2208
SELECT 73 / - col1 + + col0 AS col0 FROM tab2 AS cor0
----
5
75
77

query I rowsort
SELECT - col1 - - col2 AS col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT tab2.col0 + - ( - tab2.col1 ) * col2 - tab2.col1 FROM tab2
----
1553
708
813

query I rowsort
SELECT 8 + + col1 * cor0.col2 AS col0 FROM tab0 cor0
----
105
2846
7470

query I rowsort
SELECT DISTINCT 93 + cor0.col2 FROM tab2, tab0 AS cor0
----
126
175
94

query I rowsort
SELECT DISTINCT col0 * - ( - col0 ) - + 98 FROM tab1 cor0
----
-89
3998
6302

query I rowsort
SELECT - col0 - + col0 AS col2 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT + + 78 * 66 + col0 FROM tab2 AS cor0
----
5155
5226
5227

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col1 col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL - - 13 - col2 FROM tab2 AS cor0
----
-13
-14
-25

query I rowsort
SELECT DISTINCT - + col2 * - col0 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * cor0.col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + - cor0.col2 * - col0 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2221
SELECT - - col2 + col2 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2221
SELECT - - col2 + col2 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 59 FROM tab0 AS cor0
----
-59
-59
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-2223
SELECT col1 DIV + col1 + col2 FROM tab0 cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-2223
SELECT col1 / + col1 + col2 FROM tab0 cor0
----
2
34
83

query I rowsort
SELECT DISTINCT - - 3 + - col1 * col1 FROM tab2 AS cor0
----
-286
-3478
-958

query I rowsort
SELECT DISTINCT - - col2 + + col1 * ( - 38 ) FROM tab2 AS cor0
----
-1151
-2216
-608

query I rowsort
SELECT DISTINCT + 42 + - col2 + - col0 AS col2 FROM tab1 AS cor0
----
-134
-15
-79

query I rowsort
SELECT ALL + + 26 AS col1 FROM tab0 AS cor0
----
26
26
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2228
SELECT ALL tab1.col0 + - CAST( + 21 AS SIGNED ) FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 448abae17c350522252405a887cd05c0

skipif mysql # not compatible
query I rowsort label-2228
SELECT ALL tab1.col0 + - CAST ( + 21 AS INTEGER ) FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 448abae17c350522252405a887cd05c0

query I rowsort
SELECT - 22 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

query I rowsort
SELECT 15 AS col0 FROM tab1
----
15
15
15

query I rowsort
SELECT DISTINCT tab2.col1 * col1 * col1 FROM tab2
----
205379
29791
4913

query I rowsort
SELECT ALL 36 AS col2 FROM tab2
----
36
36
36

query I rowsort
SELECT DISTINCT - tab0.col0 * - tab0.col2 AS col1 FROM tab0, tab1, tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL ( col1 ) AS col1 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2235
SELECT + col1 DIV 20 - col1 * tab1.col1 AS col0 FROM tab1
----
-100
-169
-675

skipif mysql # not compatible
query I rowsort label-2235
SELECT + col1 / 20 - col1 * tab1.col1 AS col0 FROM tab1
----
-100
-169
-675

query I rowsort
SELECT - col2 - col0 AS col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT col2 * - 10 FROM tab2 AS cor0
----
-260
-270
-380

query I rowsort
SELECT col0 * - 85 FROM tab0
----
-2040
-2975
-7565

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2239
SELECT ALL CAST( NULL AS DECIMAL ) AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2239
SELECT ALL CAST ( NULL AS REAL ) AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - col2 - - col2 AS col2 FROM tab2
----
0

query I rowsort
SELECT DISTINCT 15 - - 63 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
78

query I rowsort
SELECT col1 + col1 + - col1 * col0 FROM tab0
----
-1892
-3201
-7917

query I rowsort
SELECT ALL + col0 - - tab1.col2 * + tab1.col1 * col0 FROM tab1
----
36544
4215
99920

onlyif mysql # use DIV operator for integer division
query I rowsort label-2244
SELECT - ( col0 ) DIV cor0.col0 + 58 + + col1 * col2 FROM tab2 AS cor0
----
1591
703
894

skipif mysql # not compatible
query I rowsort label-2244
SELECT - ( col0 ) / cor0.col0 + 58 + + col1 * col2 FROM tab2 AS cor0
----
1591
703
894

query I rowsort
SELECT + - ( + col0 ) * ( col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col1 * - col1 + + col1 * - col2 + - cor0.col0 FROM tab0 AS cor0
----
-10258
-15832
-9541

query I rowsort
SELECT 59 * col2 AS col2 FROM tab0
----
1947
4838
59

query I rowsort
SELECT ALL ( - col1 * - 50 ) + col1 * + col0 * col2 AS col2 FROM tab0
----
668668
72412
8245

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 50 * - col1 + col0 * ( tab0.col1 ) col1 FROM tab0
----
12649
6364
8245

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col0 col1 FROM tab1
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-2251
SELECT tab2.col0 DIV col0 AS col2 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2251
SELECT tab2.col0 / col0 AS col2 FROM tab2
----
1
1
1

query I rowsort
SELECT DISTINCT - - col0 + cor0.col1 * 58 AS col0 FROM tab0 cor0
----
5012
5367
5661

onlyif mysql # use DIV operator for integer division
query I rowsort label-2253
SELECT - cor0.col0 DIV 25 FROM tab1 AS cor0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-2253
SELECT - cor0.col0 / 25 FROM tab1 AS cor0
----
-2
-3
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2254
SELECT ALL col2 DIV + col2 col0 FROM tab1 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2254
SELECT ALL col2 / + col2 col0 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2255
SELECT col1 + + 97 DIV + col0 + + col2 AS col2 FROM tab0 cor0
----
100
123
174

skipif mysql # not compatible
query I rowsort label-2255
SELECT col1 + + 97 / + col0 + + col2 AS col2 FROM tab0 cor0
----
100
123
174

onlyif mysql # use DIV operator for integer division
query I rowsort label-2256
SELECT DISTINCT - col2 DIV 67 + + col1 * col0 AS col2 FROM tab1 AS cor0
----
1039
640
78

skipif mysql # not compatible
query I rowsort label-2256
SELECT DISTINCT - col2 / 67 + + col1 * col0 AS col2 FROM tab1 AS cor0
----
1039
640
78

query I rowsort
SELECT DISTINCT col1 + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT col2 * 87 + + col1 FROM tab0 cor0
----
184
2957
7225

onlyif mysql # use DIV operator for integer division
query I rowsort label-2259
SELECT ALL + - col1 DIV cor0.col1 + col0 - + col1 * + col1 * + cor0.col1 FROM tab1 AS cor0
----
-17574
-2118
-937

skipif mysql # not compatible
query I rowsort label-2259
SELECT ALL + - col1 / cor0.col1 + col0 - + col1 * + col1 * + cor0.col1 FROM tab1 AS cor0
----
-17574
-2118
-937

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col1 * + col2 col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT + + col2 * 41 + cor0.col1 AS col0 FROM tab0 AS cor0
----
138
1439
3453

query I rowsort
SELECT DISTINCT col0 + col1 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT cor0.col2 * col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - cor0.col1 * 40 FROM tab2 cor0
----
-1240
-2360
-680

query I rowsort
SELECT ALL - + col1 + + ( + col0 ) FROM tab0 AS cor0
----
-2
-62
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2266
SELECT - col1 + + CAST( NULL AS SIGNED ) * + col2 + + cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2266
SELECT - col1 + + CAST ( NULL AS INTEGER ) * + col2 + + cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + cor0.col0 + cor0.col0 * ( + col1 ) AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT - - col0 * cor0.col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT col2 * col2 + - col2 AS col1 FROM tab2
----
1406
650
702

query I rowsort
SELECT + 5 AS col0 FROM tab2 AS cor0
----
5
5
5

query I rowsort
SELECT + ( col2 ) * col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + ( col0 ) * col0 * - 35 AS col0 FROM tab2 AS cor0
----
-1715
-212940
-218435

onlyif mysql # use DIV operator for integer division
query I rowsort label-2273
SELECT - - 24 + 70 * cor0.col0 DIV + 73 AS col1 FROM tab2 AS cor0
----
30
98
99

skipif mysql # not compatible
query I rowsort label-2273
SELECT - - 24 + 70 * cor0.col0 / + 73 AS col1 FROM tab2 AS cor0
----
30
98
99

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0, tab0, tab2 cor1
----
972 values hashing to 591a9a93560839231c038a1e10bd240a

query I rowsort
SELECT - 12 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

query I rowsort
SELECT DISTINCT 74 FROM tab1
----
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 12 col1 FROM tab2
----
12

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-2279
SELECT DISTINCT CAST( NULL AS SIGNED ) * 35 * col2 + + col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2279
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 35 * col2 + + col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT - 28 * + col2 AS col0 FROM tab2 AS cor0
----
-1064
-728
-756

query I rowsort
SELECT ALL 13 + + cor0.col2 AS col1 FROM tab2 AS cor0
----
39
40
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * 51 col2 FROM tab2 AS cor0
----
-1326
-1377
-1938

query I rowsort
SELECT ALL + ( + col2 ) + + col1 AS col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL + + 27 + - col0 FROM tab0 AS cor0
----
-62
-8
3

query I rowsort
SELECT 77 + 76 * - col1 FROM tab1 AS cor0
----
-1899
-683
-911

query I rowsort
SELECT + ( cor0.col2 ) AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT col1 * col0 + + ( - cor0.col0 ) FROM tab2 AS cor0
----
1264
210
4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-2288
SELECT - col2 * col1 - 33 DIV - 17 FROM tab0 AS cor0
----
-2837
-7461
-96

skipif mysql # not compatible
query I rowsort label-2288
SELECT - col2 * col1 - 33 / - 17 FROM tab0 AS cor0
----
-2837
-7461
-96

query I rowsort
SELECT ALL + - 67 + - col2 AS col0 FROM tab0 cor0
----
-100
-149
-68

query I rowsort
SELECT DISTINCT - + cor0.col1 * - col0 + + col1 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL 59 FROM tab0 AS cor0
----
59
59
59

query I rowsort
SELECT ALL + 11 AS col0 FROM tab0 AS cor0
----
11
11
11

query I rowsort
SELECT DISTINCT 7 AS col1 FROM tab0 AS cor0
----
7

query I rowsort
SELECT + + col2 + - col1 + + col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + + cor0.col2 + - cor0.col0 * col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT + + 9 * - col2 - + col0 FROM tab0 AS cor0
----
-321
-44
-827

onlyif mysql # use DIV operator for integer division
query I rowsort label-2297
SELECT ALL - 17 DIV cor0.col1 + + 92 FROM tab1 cor0
----
91
91
92

skipif mysql # not compatible
query I rowsort label-2297
SELECT ALL - 17 / cor0.col1 + + 92 FROM tab1 cor0
----
91
91
92

query I rowsort
SELECT ALL + col1 + - col0 * col2 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + 13 AS col2 FROM tab2 cor0
----
13

query I rowsort
SELECT ALL + + col1 + col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT 53 + cor0.col1 AS col0 FROM tab1 AS cor0
----
63
66
79

query I rowsort
SELECT ALL - - col2 * col2 - col1 FROM tab1 cor0
----
2890
3239
9203

query I rowsort
SELECT ALL - col2 + col1 + col2 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 0 + - col2 col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + + col1 + col0 - cor0.col2 * - 62 FROM tab2 AS cor0
----
1712
1749
2452

query I rowsort
SELECT + 1 AS col2 FROM tab1
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2307
SELECT - col0 - col0 * col1 DIV - 88 AS col0 FROM tab1
----
-3
-57
-69

skipif mysql # not compatible
query I rowsort label-2307
SELECT - col0 - col0 * col1 / - 88 AS col0 FROM tab1
----
-3
-57
-69

query I rowsort
SELECT DISTINCT - - col0 * col1 + 40 * + col0 AS col0 FROM tab1 AS cor0
----
198
3200
4240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col1 col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + col2 - + col2 AS col2 FROM tab1
----
0

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
7
78
79

query I rowsort
SELECT + cor0.col2 + + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to bd4afbebf32cf7139d4a26f0c77f8156

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col0 * col2 * col0 col1 FROM tab2 AS cor0
----
1350
158210
237196

query I rowsort
SELECT cor0.col2 + + col2 * col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT 23 * + 10 + cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
256
257
268

query I rowsort
SELECT + col0 * 20 FROM tab1 AS cor0
----
1280
1600
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 * - 57 col0 FROM tab0 cor0
----
1881
4674
57

query I rowsort
SELECT - 88 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

query I rowsort
SELECT - cor0.col1 * + ( - 44 ) FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to abd914d90121adc55f87780ed6959f8c

query I rowsort
SELECT - col1 + - 14 FROM tab0
----
-100
-105
-111

query I rowsort
SELECT DISTINCT 95 FROM tab0, tab0 AS cor0
----
95

query I rowsort
SELECT ALL + 58 FROM tab1
----
58
58
58

query I rowsort
SELECT ALL ( col1 + - col0 ) AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT ( ( col2 ) ) * - col1 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + 58 * - col2 + col0 FROM tab1
----
-3129
-3242
-5488

query I rowsort
SELECT ALL + ( + 60 ) * - col0 FROM tab1
----
-180
-3840
-4800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( tab1.col2 ) col1 FROM tab1
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2329
SELECT - CAST( - col2 AS SIGNED ) + + cor0.col1 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-2329
SELECT - CAST ( - col2 AS INTEGER ) + + cor0.col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - col2 * col2 + + col0 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT ALL col2 * cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - - cor0.col1 - 87 AS col0 FROM tab1 cor0
----
-61
-74
-77

query I rowsort
SELECT ALL - ( col2 ) * - col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2334
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2334
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 68 FROM tab2, tab1 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

query I rowsort
SELECT - ( cor0.col1 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + cor0.col2 * col1 - - col0 FROM tab1 cor0
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-2339
SELECT - 20 - - cor0.col2 DIV + col0 AS col1 FROM tab1 AS cor0
----
-19
-2
-20

skipif mysql # not compatible
query I rowsort label-2339
SELECT - 20 - - cor0.col2 / + col0 AS col1 FROM tab1 AS cor0
----
-19
-2
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 73 * col2 + - col1 * - col2 * col2 col0 FROM tab0 AS cor0
----
170
617870
96063

query I rowsort
SELECT ( + col2 ) + col1 * ( + 3 ) FROM tab2 cor0
----
120
203
89

query I rowsort
SELECT DISTINCT - tab1.col2 * - col0 + 16 AS col2 FROM tab1
----
178
3664
7696

query I rowsort
SELECT DISTINCT + col1 + - col1 * col2 FROM tab2
----
-1475
-629
-806

onlyif mysql # use DIV operator for integer division
query I rowsort label-2344
SELECT + col2 DIV - 47 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2344
SELECT + col2 / - 47 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT 82 AS col1 FROM tab1 AS cor0
----
82
82
82

query I rowsort
SELECT 29 + - col0 FROM tab2 AS cor0
----
-49
-50
22

query I rowsort
SELECT DISTINCT + 66 FROM tab1, tab0 AS cor0
----
66

query I rowsort
SELECT ALL col1 * cor0.col1 + - cor0.col2 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT DISTINCT col0 * 41 AS col1 FROM tab1
----
123
2624
3280

query I rowsort
SELECT DISTINCT col2 * - tab0.col2 AS col0 FROM tab0
----
-1
-1089
-6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2351
SELECT - + col0 - + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2351
SELECT - + col0 - + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 14 FROM tab0, tab0 AS cor0, tab2 AS cor1, tab1, tab0 cor2
----
243 values hashing to 0e43d6abbc32df70da8bf349ba973cd6

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT tab0.col0 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

onlyif mysql # use DIV operator for integer division
query I rowsort label-2355
SELECT col1 DIV 68 AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2355
SELECT col1 / 68 AS col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2356
SELECT DISTINCT - tab2.col2 DIV tab2.col1 FROM tab2, tab0, tab2 AS cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-2356
SELECT DISTINCT - tab2.col2 / tab2.col1 FROM tab2, tab0, tab2 AS cor0
----
-2
0

query I rowsort
SELECT + col0 * 27 FROM tab0
----
2403
648
945

query I rowsort
SELECT + col2 + 12 AS col1 FROM tab1 AS cor0
----
108
66
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-2359
SELECT col2 DIV - col0 AS col2 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2359
SELECT col2 / - col0 AS col2 FROM tab0
----
-1
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2360
SELECT DISTINCT - col0 * CAST( NULL AS SIGNED ) + 52 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2360
SELECT DISTINCT - col0 * CAST ( NULL AS INTEGER ) + 52 AS col1 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2361
SELECT ALL + + col1 * 83 DIV 5 AS col1 FROM tab0 AS cor0
----
1427
1510
1610

skipif mysql # not compatible
query I rowsort label-2361
SELECT ALL + + col1 * 83 / 5 AS col1 FROM tab0 AS cor0
----
1427
1510
1610

query I rowsort
SELECT 85 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT + 1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 cor2
----
81 values hashing to 2a004dce2d308bae163576f54ee1a3fc

onlyif mysql # use DIV operator for integer division
query I rowsort label-2364
SELECT - + col1 DIV - 59 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2364
SELECT - + col1 / - 59 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2365
SELECT ALL CAST( 37 AS SIGNED ) * + tab0.col0 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 03926241d49439289a83c509cb84d356

skipif mysql # not compatible
query I rowsort label-2365
SELECT ALL CAST ( 37 AS INTEGER ) * + tab0.col0 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 03926241d49439289a83c509cb84d356

query I rowsort
SELECT - - col2 * + cor0.col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT cor0.col2 + col0 + + col2 FROM tab1 cor0
----
111
178
272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 39 + col0 col1 FROM tab0
----
-15
-4
50

query I rowsort
SELECT DISTINCT 11 * col1 * + col1 + + col0 FROM tab0
----
103534
81380
91180

query I rowsort
SELECT ALL 1 FROM tab1, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT + + col2 + + 97 AS col2 FROM tab2 AS cor0
----
123
124
135

query I rowsort
SELECT ALL + ( + 59 ) FROM tab2 AS cor0
----
59
59
59

query I rowsort
SELECT + col1 * - 37 + + cor0.col0 AS col2 FROM tab2 AS cor0
----
-1140
-2105
-550

query I rowsort
SELECT ALL 47 * + 51 AS col1 FROM tab1 cor0
----
2397
2397
2397

query I rowsort
SELECT + 33 + col0 AS col1 FROM tab1 AS cor0
----
113
36
97

query I rowsort
SELECT + col0 - col1 * col0 FROM tab1 AS cor0
----
-576
-75
-960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2377
SELECT DISTINCT - ( col0 ) * - col0 * CAST( NULL AS SIGNED ) - + col0 * - col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2377
SELECT DISTINCT - ( col0 ) * - col0 * CAST ( NULL AS INTEGER ) - + col0 * - col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - 30 - + col0 FROM tab1
----
-110
-33
-94

query I rowsort
SELECT 51 FROM tab0
----
51
51
51

query I rowsort
SELECT + col1 * + cor0.col1 AS col2 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT 72 + col1 FROM tab0 AS cor0
----
158
163
169

query I rowsort
SELECT - 28 * + col0 AS col1 FROM tab1 AS cor0
----
-1792
-2240
-84

query I rowsort
SELECT DISTINCT 26 * - cor1.col2 AS col1 FROM tab2, tab2 AS cor0, tab0 cor1
----
-2132
-26
-858

query I rowsort
SELECT ALL - - col0 * 2 FROM tab0 AS cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + - ( 79 ) col0 FROM tab1 AS cor0
----
-22
-25
17

query I rowsort
SELECT DISTINCT - col1 * + col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col0 * col0 + 34 AS col2 FROM tab0 AS cor0
----
-1191
-542
-7887

query I rowsort
SELECT + col2 + - col0 * 47 * col0 AS col0 FROM tab2 AS cor0
----
-2276
-285922
-293289

query I rowsort
SELECT + col1 + 17 AS col1 FROM tab0 AS cor0
----
103
108
114

query I rowsort
SELECT - + col0 * + 91 AS col0 FROM tab2 AS cor0
----
-637
-7098
-7189

onlyif mysql # use DIV operator for integer division
query I rowsort label-2391
SELECT ALL cor0.col2 + - col0 DIV col1 + - col2 col2 FROM tab0 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2391
SELECT ALL cor0.col2 + - col0 / col1 + - col2 col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - col0 * - col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT col0 * col2 * + ( + 81 * cor0.col1 ) FROM tab1 cor0
----
2954880
341172
8087040

query I rowsort
SELECT DISTINCT + ( col2 ) + + col2 AS col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT - 33 AS col1 FROM tab2 AS cor0
----
-33
-33
-33

query I rowsort
SELECT DISTINCT 73 + - col0 AS col1 FROM tab1 AS cor0
----
-7
70
9

query I rowsort
SELECT col1 * - col0 + col0 + + col1 AS col2 FROM tab0
----
-1954
-3263
-7919

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( NULL ) IN ( col0 + + col2 * + col2 * - col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2399
SELECT ALL col1 DIV + tab2.col0 + - col0 FROM tab2
----
-3
-78
-79

skipif mysql # not compatible
query I rowsort label-2399
SELECT ALL col1 / + tab2.col0 + - col0 FROM tab2
----
-3
-78
-79

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT - tab2.col0 BETWEEN NULL AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL <= + col2
----

query III rowsort
SELECT * FROM tab0 WHERE NOT - col0 NOT BETWEEN col1 * col2 AND ( NULL )
----

query I rowsort
SELECT - col1 + tab1.col1 + col0 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - col1 col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL + col0 * - tab1.col0 + tab1.col0 AS col0 FROM tab1
----
-4032
-6
-6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + col1 - 46 * ( col1 ) col1 FROM tab1
----
110
208
650

query I rowsort
SELECT DISTINCT + tab1.col1 * + col2 * 22 + + 43 FROM tab1
----
12583
27499
30931

query I rowsort
SELECT ALL - 99 * col1 AS col1 FROM tab0 cor0
----
-8514
-9009
-9603

onlyif mysql # use DIV operator for integer division
query I rowsort label-2409
SELECT ALL + - cor0.col1 + + col0 DIV col1 FROM tab2 AS cor0
----
-13
-31
-58

skipif mysql # not compatible
query I rowsort label-2409
SELECT ALL + - cor0.col1 + + col0 / col1 FROM tab2 AS cor0
----
-13
-31
-58

query I rowsort
SELECT ALL + 81 FROM tab2 AS cor0
----
81
81
81

query I rowsort
SELECT col0 + col2 + 8 FROM tab0
----
179
44
65

query I rowsort
SELECT - tab0.col2 * - col1 AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL col2 * tab0.col2 AS col1 FROM tab0 WHERE ( NULL ) IN ( + col1 * col0 * col2 )
----

query I rowsort
SELECT col1 + + col2 + + col2 FROM tab1
----
124
134
205

query I rowsort
SELECT ALL tab2.col0 * col2 FROM tab2
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col1 col0 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL col2 + + col2 * + col0 * col0 AS col0 FROM tab1
----
233529
540
614496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 + col2 col1 FROM tab0
----
164
2
66

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL NOT BETWEEN ( + col0 ) AND ( NULL )
----

query I rowsort
SELECT ALL col2 * col0 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL col0 + - col1 * col0 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT + cor0.col2 * cor0.col0 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 41d4c126bfd4bfab59ba5e83427c98e0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2423
SELECT DISTINCT + col0 + col0 DIV - tab1.col2 AS col0 FROM tab1
----
3
63
80

skipif mysql # not compatible
query I rowsort label-2423
SELECT DISTINCT + col0 + col0 / - tab1.col2 AS col0 FROM tab1
----
3
63
80

query III rowsort
SELECT * FROM tab0 WHERE ( NULL ) >= ( col2 )
----

query I rowsort
SELECT col1 + tab2.col0 + - col0 * + col0 FROM tab2
----
-11
-5947
-6145

query I rowsort
SELECT + col2 * + tab1.col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT tab1.col2 * col0 AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT tab1.col2 * col2 AS col0 FROM tab1
----
2916
3249
9216

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) NOT IN ( col1 + col1 + tab0.col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col1 col2 FROM tab1
----
-54
-67
23

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL <> - col2
----

query I rowsort
SELECT - col0 * + col1 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT col2 * - tab2.col0 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - col0 + + col0 * tab0.col1 AS col1 FROM tab0 WHERE NULL NOT IN ( + tab0.col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2435
SELECT ALL - col1 DIV - tab2.col1 + - col1 FROM tab2
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-2435
SELECT ALL - col1 / - tab2.col1 + - col1 FROM tab2
----
-16
-30
-58

query III rowsort
SELECT ALL * FROM tab2 WHERE + col1 * - col0 > col2
----

query I rowsort
SELECT col0 - tab1.col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT tab1.col1 * col2 * - col1 + col1 AS col0 FROM tab1 WHERE NOT - col0 NOT IN ( + col2 )
----

query I rowsort
SELECT DISTINCT tab2.col1 + col0 FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2440
SELECT DISTINCT + col0 DIV - 13 FROM tab2
----
-6
0

skipif mysql # not compatible
query I rowsort label-2440
SELECT DISTINCT + col0 / - 13 FROM tab2
----
-6
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2441
SELECT + CAST( - tab1.col0 + col2 AS SIGNED ) FROM tab1
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-2441
SELECT + CAST ( - tab1.col0 + col2 AS INTEGER ) FROM tab1
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 + + col2 * col2 col1 FROM tab1 AS cor0
----
10464
3819
4320

query I rowsort
SELECT DISTINCT - 85 FROM tab1 AS cor0
----
-85

query I rowsort
SELECT ALL col1 * - 91 FROM tab1 AS cor0
----
-1183
-2366
-910

onlyif mysql # use DIV operator for integer division
query I rowsort label-2445
SELECT DISTINCT col0 DIV col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-2445
SELECT DISTINCT col0 / col2 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2446
SELECT DISTINCT + - CAST( + col1 AS SIGNED ) FROM tab0 cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-2446
SELECT DISTINCT + - CAST ( + col1 AS INTEGER ) FROM tab0 cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + 91 col0 FROM tab1 cor0
----
155
171
94

query I rowsort
SELECT ALL - 58 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to a38440572743ed8a3d8af7b49a5388c9

query I rowsort
SELECT cor1.col2 * - tab1.col0 AS col1 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to fbfed5c6e3d5d050a7e16da7b07959a5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2450
SELECT ALL + 36 DIV - col1 FROM tab1 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2450
SELECT ALL + 36 / - col1 FROM tab1 AS cor0
----
-1
-2
-3

query I rowsort
SELECT ALL - + 14 * + col0 FROM tab2 AS cor0
----
-1092
-1106
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2452
SELECT - col2 * col2 DIV + col0 FROM tab2 AS cor0
----
-104
-18
-8

skipif mysql # not compatible
query I rowsort label-2452
SELECT - col2 * col2 / + col0 FROM tab2 AS cor0
----
-104
-18
-8

query I rowsort
SELECT DISTINCT cor0.col1 + col2 * 8 FROM tab1 AS cor0
----
458
466
781

query I rowsort
SELECT - 34 AS col2 FROM tab1 AS cor0
----
-34
-34
-34

query I rowsort
SELECT + + 5 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-49
-52
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 15 col1 FROM tab2 cor0
----
15
15
15

query I rowsort
SELECT - + cor0.col2 * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT 66 FROM tab2 cor0
----
66
66
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2459
SELECT DISTINCT - col2 - - CAST( col0 * - col1 AS SIGNED ) FROM tab2 AS cor0
----
-1381
-244
-4628

skipif mysql # not compatible
query I rowsort label-2459
SELECT DISTINCT - col2 - - CAST ( col0 * - col1 AS INTEGER ) FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT col2 + + 76 FROM tab1 cor0
----
130
133
172

query I rowsort
SELECT ALL - - col0 * col2 + 87 FROM tab0 AS cor0
----
122
7385
879

query I rowsort
SELECT DISTINCT + col2 + col1 * col1 AS col1 FROM tab0 AS cor0
----
7429
8363
9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-2463
SELECT ALL + col2 DIV - 22 FROM tab0 AS cor0
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-2463
SELECT ALL + col2 / - 22 FROM tab0 AS cor0
----
-1
-3
0

query I rowsort
SELECT + col0 + col0 * - 93 FROM tab0 AS cor0
----
-2208
-3220
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-2465
SELECT ALL + col2 DIV col2 + col1 AS col0 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-2465
SELECT ALL + col2 / col2 + col1 AS col0 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT + - cor0.col1 AS col1 FROM tab1 cor0
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2467
SELECT ALL col2 * CAST( NULL AS SIGNED ) + ( col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2467
SELECT ALL col2 * CAST ( NULL AS INTEGER ) + ( col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2468
SELECT DISTINCT col1 * ( - cor0.col1 ) + col0 * CAST( NULL AS SIGNED ) * 45 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2468
SELECT DISTINCT col1 * ( - cor0.col1 ) + col0 * CAST ( NULL AS INTEGER ) * 45 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col0 * + col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col0 - + ( - col2 ) FROM tab2 AS cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * cor0.col0 + 78 * - col2 col0 FROM tab0 AS cor0
----
-510
1703
3317

query I rowsort
SELECT DISTINCT - col1 - ( col1 ) AS col1 FROM tab2 AS cor0
----
-118
-34
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2473
SELECT + col1 DIV + 94 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2473
SELECT + col1 / + 94 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2474
SELECT ALL - col0 + - 70 + cor0.col1 * col1 DIV 39 FROM tab1 AS cor0
----
-132
-146
-56

skipif mysql # not compatible
query I rowsort label-2474
SELECT ALL - col0 + - 70 + cor0.col1 * col1 / 39 FROM tab1 AS cor0
----
-132
-146
-56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2475
SELECT ALL col0 + - CAST( NULL AS SIGNED ) * - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2475
SELECT ALL col0 + - CAST ( NULL AS INTEGER ) * - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2476
SELECT + - col2 + + ( 92 ) DIV - cor0.col0 AS col2 FROM tab2 AS cor0
----
-27
-39
-40

skipif mysql # not compatible
query I rowsort label-2476
SELECT + - col2 + + ( 92 ) / - cor0.col0 AS col2 FROM tab2 AS cor0
----
-27
-39
-40

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - col2 + 55 FROM tab1 AS cor0
----
-2
-41
1

query I rowsort
SELECT + ( + 91 ) FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1 cor2
----
81 values hashing to 8a48d0ac75792561e233f0311a8872fd

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab0 cor1, tab1 AS cor2
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

query I rowsort
SELECT ALL + 30 * col2 + col2 FROM tab0 cor0
----
1023
2542
31

query I rowsort
SELECT ALL - col0 * col2 + col1 AS col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - 31 - col2 FROM tab0 AS cor0
----
-113
-32
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col0 col1 FROM tab1 AS cor0
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( col2 ) col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + - col1 + - col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - col0 + - col2 - col2 * cor0.col0 FROM tab1 AS cor0
----
-219
-3769
-7856

query I rowsort
SELECT cor0.col1 - cor0.col0 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - col0 * + col0 + + cor0.col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT - - col2 * - col2 + col1 AS col1 FROM tab0 cor0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT ( 58 ) FROM tab1, tab0 AS cor0
----
58

query I rowsort
SELECT ALL + 22 + tab1.col0 + - col1 AS col2 FROM tab1
----
-1
76
89

query I rowsort
SELECT ALL cor0.col1 * col1 * - col0 AS col0 FROM tab1 cor0
----
-13520
-2028
-6400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2495
SELECT - CAST( NULL AS SIGNED ) * col2 + - col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2495
SELECT - CAST ( NULL AS INTEGER ) * col2 + - col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 1 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
-1

query I rowsort
SELECT col2 + - 95 FROM tab1
----
-38
-41
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2498
SELECT ALL + CAST( + 51 + col0 AS SIGNED ) FROM tab2
----
129
130
58

skipif mysql # not compatible
query I rowsort label-2498
SELECT ALL + CAST ( + 51 + col0 AS INTEGER ) FROM tab2
----
129
130
58

query I rowsort
SELECT 97 * + col0 AS col2 FROM tab1 AS cor0
----
291
6208
7760

query I rowsort
SELECT ALL 82 AS col2 FROM tab0
----
82
82
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2501
SELECT ALL + CAST( + col2 + col0 AS SIGNED ) AS col1 FROM tab0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-2501
SELECT ALL + CAST ( + col2 + col0 AS INTEGER ) AS col1 FROM tab0
----
171
36
57

query I rowsort
SELECT + col1 + 64 AS col2 FROM tab2 AS cor0
----
123
81
95

query I rowsort
SELECT DISTINCT + - col2 + - 42 FROM tab1 AS cor0
----
-138
-96
-99

query I rowsort
SELECT DISTINCT 49 FROM tab1
----
49

query I rowsort
SELECT ALL + 79 AS col2 FROM tab2 AS cor0
----
79
79
79

query I rowsort
SELECT ALL + 77 AS col0 FROM tab1 cor0
----
77
77
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-2507
SELECT ALL + col2 * col1 - col0 DIV + 85 AS col1 FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-2507
SELECT ALL + col2 * col1 - col0 / + 85 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - 65 FROM tab2, tab0 AS cor0
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - col2 * - col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + 77 + col2 FROM tab2 AS cor0
----
103
104
115

query I rowsort
SELECT ALL + col0 * cor0.col1 + - 17 * - col2 AS col0 FROM tab1 AS cor0
----
1609
2672
996

query I rowsort
SELECT DISTINCT + 65 FROM tab1 cor0
----
65

query I rowsort
SELECT + - col1 * cor0.col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT 35 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT ALL ( 31 ) * tab2.col1 AS col1 FROM tab2
----
1829
527
961

query I rowsort
SELECT DISTINCT + + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
26
27
38

query I rowsort
SELECT DISTINCT + ( - col1 ) AS col2 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT ALL + 93 FROM tab2, tab0 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col1 ) col0 FROM tab2
----
17
31
59

query I rowsort
SELECT ( tab2.col0 + - col2 ) FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT + tab0.col2 FROM tab0, tab2 AS cor0
----
1
33
82

query I rowsort
SELECT tab1.col2 AS col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 29 + - col2 col1 FROM tab2
----
-9
2
3

query I rowsort
SELECT - - col1 AS col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - tab2.col1 * + 88 AS col0 FROM tab2, tab0, tab0 cor0
----
-1496
-2728
-5192

query I rowsort
SELECT ALL + col0 * + col1 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + 7 FROM tab1, tab0 cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT + col2 + + col2 AS col2 FROM tab0 AS cor0
----
164
2
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2531
SELECT - + col0 * - CAST( NULL AS SIGNED ) + + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2531
SELECT - + col0 * - CAST ( NULL AS INTEGER ) + + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + ( + col2 ) AS col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT 89 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

query I rowsort
SELECT - tab1.col2 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * tab2.col1 + col0 * col0 col0 FROM tab2
----
1010
6530
9565

query I rowsort
SELECT + col0 * - col0 AS col2 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT + col1 + - 6 FROM tab0 AS cor0
----
80
85
91

query I rowsort
SELECT + col0 + 60 * - col1 FROM tab1 AS cor0
----
-1557
-536
-700

query I rowsort
SELECT - col1 * 11 + col0 * ( col1 ) AS col2 FROM tab0 AS cor0
----
1118
2328
7098

onlyif mysql # use DIV operator for integer division
query I rowsort label-2540
SELECT ALL - 66 DIV + 40 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2540
SELECT ALL - 66 / + 40 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 25 AS col2 FROM tab1 AS cor0
----
-25

query I rowsort
SELECT col1 * + col0 + - col1 AS col2 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT - + ( + col2 ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - ( - 6 ) FROM tab0 AS cor0
----
6
6
6

query I rowsort
SELECT - - ( col0 ) * + col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + ( + 51 ) AS col0 FROM tab1 AS cor0
----
51
51
51

query I rowsort
SELECT DISTINCT - 50 + + 48 * - col2 AS col1 FROM tab1 AS cor0
----
-2642
-2786
-4658

query I rowsort
SELECT DISTINCT + col2 * col0 - col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT ALL + col0 * + 68 AS col1 FROM tab0 AS cor0
----
1632
2380
6052

query I rowsort
SELECT cor1.col2 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT + cor0.col1 * ( + cor0.col2 ) + - col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT - col0 * ( - 24 ) AS col1 FROM tab1 AS cor0
----
1536
1920
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2553
SELECT DISTINCT - - col1 / CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2553
SELECT DISTINCT - - col1 / CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab2 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to 7e572cf6967c395d92dce41dcb35c4db

query I rowsort
SELECT ALL - col1 * - 80 FROM tab1 cor0
----
1040
2080
800

onlyif mysql # use DIV operator for integer division
query I rowsort label-2556
SELECT + col1 DIV + col0 AS col2 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-2556
SELECT + col1 / + col0 AS col2 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT - ( - cor1.col1 ) AS col1 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2558
SELECT DISTINCT col2 + + CAST( NULL AS SIGNED ) / - 72 + col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2558
SELECT DISTINCT col2 + + CAST ( NULL AS INTEGER ) / - 72 + col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2559
SELECT ALL + + col1 DIV col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2559
SELECT ALL + + col1 / col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - col1 * + ( col1 + - col2 ) AS col0 FROM tab0 cor0
----
-4558
-819
-9312

query I rowsort
SELECT + col2 - - col0 AS col0 FROM tab0
----
171
36
57

query I rowsort
SELECT 30 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

query I rowsort
SELECT + 73 FROM tab2, tab1 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT ALL - 17 FROM tab2 AS cor0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT - col0 * cor0.col1 * col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT - + col1 * col2 + - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT - - 88 AS col0 FROM tab2 cor0
----
88
88
88

query I rowsort
SELECT ALL col1 * - col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + col2 * 57 FROM tab2 AS cor0
----
1482
1539
2166

query I rowsort
SELECT DISTINCT ( + 42 ) * - cor0.col1 + - col1 * 29 FROM tab2 AS cor0
----
-1207
-2201
-4189

query I rowsort
SELECT DISTINCT + 54 + col0 FROM tab1 AS cor0
----
118
134
57

query I rowsort
SELECT ALL col1 * - col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ( - cor0.col2 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + 55 AS col0 FROM tab2 AS cor0
----
55

query I rowsort
SELECT DISTINCT + + col0 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL - 28 FROM tab1 AS cor0
----
-28
-28
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + col1 col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + 26 + col0 + 77 FROM tab0 AS cor0
----
127
138
192

query I rowsort
SELECT DISTINCT 33 AS col1 FROM tab2 AS cor0
----
33

query I rowsort
SELECT DISTINCT col1 * + 9 * + col0 AS col2 FROM tab1
----
5760
702
9360

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 cor0
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2582
SELECT ALL + col0 + col1 - - CAST( + 10 AS SIGNED ) FROM tab1 AS cor0
----
103
39
84

skipif mysql # not compatible
query I rowsort label-2582
SELECT ALL + col0 + col1 - - CAST ( + 10 AS INTEGER ) FROM tab1 AS cor0
----
103
39
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col2 - - col0 col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + + 32 FROM tab2 AS cor0
----
32

query I rowsort
SELECT ( + col0 ) * col2 + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL col0 + - col1 + - col2 FROM tab2 AS cor0
----
-51
-7
24

query I rowsort
SELECT - col2 * col0 + - col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT ALL col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - + cor0.col1 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - col2 - col1 AS col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL - - 62 FROM tab2 AS cor0
----
62
62
62

query I rowsort
SELECT ALL + ( - col2 ) - col0 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT + cor1.col2 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL 31 + - col2 FROM tab2 AS cor0
----
-7
4
5

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - col0 col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - col0 * col0 * 90 + col1 AS col2 FROM tab2
----
-4379
-547501
-561673

query I rowsort
SELECT DISTINCT col1 + + tab2.col0 AS col0 FROM tab2
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col2 col2 FROM tab0
----
164
2
66

query I rowsort
SELECT - col0 * - col1 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT col0 + + col2 * col0 AS col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT - 47 + + col1 FROM tab2
----
-16
-30
12

query I rowsort
SELECT DISTINCT + 15 * tab1.col2 + col2 + col0 AS col2 FROM tab1
----
1616
867
976

query I rowsort
SELECT ALL - tab1.col2 * col1 AS col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT 10 + - col2 * 99 FROM tab2
----
-2564
-2663
-3752

query I rowsort
SELECT DISTINCT + tab0.col0 + - 44 AS col1 FROM tab0, tab2 AS cor0
----
-20
-9
45

query I rowsort
SELECT 39 * col1 AS col0 FROM tab1
----
1014
390
507

query I rowsort
SELECT ALL + col2 * 19 AS col1 FROM tab2 AS cor0
----
494
513
722

onlyif mysql # use DIV operator for integer division
query I rowsort label-2609
SELECT + col2 + 26 DIV col0 AS col0 FROM tab1
----
57
62
96

skipif mysql # not compatible
query I rowsort label-2609
SELECT + col2 + 26 / col0 AS col0 FROM tab1
----
57
62
96

query I rowsort
SELECT DISTINCT + col1 * + 92 - + col2 FROM tab1 AS cor0
----
1100
2338
863

query I rowsort
SELECT cor0.col2 + - 23 AS col1 FROM tab1 AS cor0
----
31
34
73

query I rowsort
SELECT + + col0 + col2 AS col0 FROM tab2 cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2613
SELECT ALL + col1 * CAST( NULL AS SIGNED ) + + col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2613
SELECT ALL + col1 * CAST ( NULL AS INTEGER ) + + col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * - 5 col2 FROM tab2 AS cor0
----
35
390
395

query I rowsort
SELECT DISTINCT cor0.col0 - col0 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2616
SELECT ALL - col1 + 94 DIV - col0 FROM tab1 cor0
----
-11
-14
-57

skipif mysql # not compatible
query I rowsort label-2616
SELECT ALL - col1 + 94 / - col0 FROM tab1 cor0
----
-11
-14
-57

query I rowsort
SELECT DISTINCT + col0 + - col2 FROM tab2 AS cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - 36 * + col2 col0 FROM tab2 AS cor0
----
-1406
-962
-999

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 + 79 col0 FROM tab1 AS cor0
----
105
89
92

query I rowsort
SELECT DISTINCT + cor0.col0 - + col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT 95 + + tab0.col1 * - col0 AS col1 FROM tab0
----
-1969
-3300
-8004

onlyif mysql # use DIV operator for integer division
query I rowsort label-2622
SELECT DISTINCT col1 + - col0 DIV col0 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-2622
SELECT DISTINCT col1 + - col0 / col0 FROM tab2
----
16
30
58

query I rowsort
SELECT ALL - 39 * col2 AS col0 FROM tab0 AS cor0
----
-1287
-3198
-39

query I rowsort
SELECT ALL + + col1 + 16 * col1 * col0 AS col2 FROM tab0 AS cor0
----
129675
33110
54417

query I rowsort
SELECT DISTINCT 25 + col1 FROM tab0 AS cor0
----
111
116
122

query I rowsort
SELECT DISTINCT + + col1 * 1 AS col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + cor0.col0 * col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2628
SELECT ALL - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2628
SELECT ALL - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2629
SELECT - - col0 + + cor0.col0 * col2 DIV col2 col1 FROM tab0 AS cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2629
SELECT - - col0 + + cor0.col0 * col2 / col2 col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT 25 + + col1 * - col1 AS col1 FROM tab0 cor0
----
-7371
-8256
-9384

query I rowsort
SELECT ALL col2 + + 48 AS col1 FROM tab0
----
130
49
81

query I rowsort
SELECT ALL - + 22 + col1 FROM tab0 AS cor0
----
64
69
75

query I rowsort
SELECT DISTINCT 74 * 33 FROM tab2 AS cor0
----
2442

query I rowsort
SELECT col1 + col0 * - ( 84 ) + col0 FROM tab0 AS cor0
----
-1906
-2808
-7296

query I rowsort
SELECT DISTINCT ( + col0 ) * 86 FROM tab1 AS cor0
----
258
5504
6880

query I rowsort
SELECT - col2 * + col1 + ( - col0 + + col1 ) FROM tab0 AS cor0
----
-2776
-35
-7460

query I rowsort
SELECT ALL - 78 * + col1 FROM tab1 AS cor0
----
-1014
-2028
-780

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - col0 + tab1.col1 - + col1 FROM tab1
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2640
SELECT - col2 + col1 DIV col2 + 19 AS col2 FROM tab1
----
-35
-38
-77

skipif mysql # not compatible
query I rowsort label-2640
SELECT - col2 + col1 / col2 + 19 AS col2 FROM tab1
----
-35
-38
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-2641
SELECT + - col1 DIV - col2 + + col0 * - col2 - - col0 FROM tab1 AS cor0
----
-159
-3584
-7600

skipif mysql # not compatible
query I rowsort label-2641
SELECT + - col1 / - col2 + + col0 * - col2 - - col0 FROM tab1 AS cor0
----
-159
-3584
-7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2642
SELECT - col2 - - col1 * + CAST( + col1 AS SIGNED ) FROM tab0 AS cor0
----
7363
8199
9408

skipif mysql # not compatible
query I rowsort label-2642
SELECT - col2 - - col1 * + CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT - 81 + col2 AS col2 FROM tab0 cor0
----
-48
-80
1

query I rowsort
SELECT ALL - tab0.col0 * - col2 * + col0 AS col0 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT ( 4 ) * - col0 FROM tab0 AS cor0
----
-140
-356
-96

query I rowsort
SELECT ALL - + 4 + + col0 AS col0 FROM tab0 cor0
----
20
31
85

query I rowsort
SELECT - cor0.col1 * + col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL + col1 * + col0 * col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT + 98 * cor0.col1 AS col1 FROM tab2 AS cor0
----
1666
3038
5782

onlyif mysql # use DIV operator for integer division
query I rowsort label-2650
SELECT + 53 * tab0.col1 + - col2 DIV tab0.col2 FROM tab0
----
4557
4822
5140

skipif mysql # not compatible
query I rowsort label-2650
SELECT + 53 * tab0.col1 + - col2 / tab0.col2 FROM tab0
----
4557
4822
5140

query I rowsort
SELECT ALL - 77 FROM tab1, tab2 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT 20 * col0 AS col2 FROM tab2 cor0
----
140
1560
1580

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) + col0 * col0 AS col2 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT 69 * 29 AS col0 FROM tab0 AS cor0
----
2001
2001
2001

query I rowsort
SELECT - 26 FROM tab0 cor0
----
-26
-26
-26

query I rowsort
SELECT + col2 + + col0 * - col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT - ( + col1 ) AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + 27 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
27

query I rowsort
SELECT 4 * cor0.col0 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
338
354
55

query I rowsort
SELECT ALL + 94 AS col2 FROM tab1 AS cor0
----
94
94
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-2661
SELECT DISTINCT - + 41 + col0 DIV cor0.col1 FROM tab1 AS cor0
----
-35
-41

skipif mysql # not compatible
query I rowsort label-2661
SELECT DISTINCT - + 41 + col0 / cor0.col1 FROM tab1 AS cor0
----
-35
-41

query I rowsort
SELECT + col2 * + col0 + col0 * col0 * cor0.col2 FROM tab0 AS cor0
----
1260
19800
656820

query I rowsort
SELECT - - cor0.col2 + + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL + col0 + col2 * col1 FROM tab1 AS cor0
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 4 col2 FROM tab2 AS cor0
----
-104
-108
-152

query I rowsort
SELECT - col0 * + col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col2 * col1 + + col1 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT + + col0 * - ( + col2 ) AS col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col2 + 44 FROM tab0 AS cor0
----
126
45
77

query I rowsort
SELECT DISTINCT + - col1 + - 52 FROM tab2 AS cor0
----
-111
-69
-83

query I rowsort
SELECT - col0 * + 7 + - col2 FROM tab0 AS cor0
----
-201
-246
-705

query I rowsort
SELECT ALL - col2 + 3 FROM tab1 AS cor0
----
-51
-54
-93

query I rowsort
SELECT ALL + col0 + ( col2 * - col2 ) AS col1 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT ALL col0 * ( + col1 ) * cor0.col0 + ( col1 ) AS col1 FROM tab2 cor0
----
106114
1550
359015

query I rowsort
SELECT DISTINCT + col2 + + 96 FROM tab0 AS cor0
----
129
178
97

query I rowsort
SELECT col1 + col2 * col2 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT ALL + cor0.col0 + 9 FROM tab0 cor0
----
33
44
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2678
SELECT col1 * col0 DIV 10 FROM tab2 cor0
----
134
21
460

skipif mysql # not compatible
query I rowsort label-2678
SELECT col1 * col0 / 10 FROM tab2 cor0
----
134
21
460

query I rowsort
SELECT ALL col0 * col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - 87 col2 FROM tab0 AS cor0
----
-7482
-7917
-8439

query I rowsort
SELECT DISTINCT - col2 * + col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab1 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 489b7b2b5c4980d50e86e51be30361c3

query I rowsort
SELECT DISTINCT + 99 FROM tab2 AS cor0
----
99

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL - + ( 37 ) FROM tab0 AS cor0
----
-37
-37
-37

query I rowsort
SELECT ALL - 4 AS col1 FROM tab1 AS cor0
----
-4
-4
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-2688
SELECT DISTINCT + col2 * col1 + cor0.col1 DIV col0 FROM tab0 AS cor0
----
2841
7463
99

skipif mysql # not compatible
query I rowsort label-2688
SELECT DISTINCT + col2 * col1 + cor0.col1 / col0 FROM tab0 AS cor0
----
2841
7463
99

query I rowsort
SELECT ALL - col2 + col0 * - col2 AS col0 FROM tab2 cor0
----
-2054
-216
-3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-2690
SELECT ALL col1 - - col2 DIV + 37 AS col1 FROM tab2 AS cor0
----
18
31
59

skipif mysql # not compatible
query I rowsort label-2690
SELECT ALL col1 - - col2 / + 37 AS col1 FROM tab2 AS cor0
----
18
31
59

query I rowsort
SELECT DISTINCT - + col1 - + col1 * + cor0.col2 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT - + 47 + - cor0.col0 * - ( + col1 * cor0.col1 + ( + ( col1 ) ) ) AS col0 FROM tab1 AS cor0
----
14513
2059
6993

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab2, tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - col1 + col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 1 + - col2 FROM tab2 AS cor0
----
-27
-28
-39

query I rowsort
SELECT + 17 + col0 FROM tab0
----
106
41
52

query I rowsort
SELECT 73 AS col0 FROM tab0
----
73
73
73

query I rowsort
SELECT DISTINCT - col1 * - col2 + - col2 AS col1 FROM tab1
----
1152
1350
513

onlyif mysql # use DIV operator for integer division
query I rowsort label-2699
SELECT ALL + col1 DIV + col2 + + CAST( - ( col2 ) AS SIGNED ) AS col0 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-2699
SELECT ALL + col1 / + col2 + + CAST ( - ( col2 ) AS INTEGER ) AS col0 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + 94 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 9c01f0f469cbf6980faff73b78f742e1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) + 66 col0 FROM tab1 cor0
----
76
79
92

query I rowsort
SELECT DISTINCT + col2 + tab2.col0 FROM tab2
----
104
117
34

query I rowsort
SELECT + 58 - col0 AS col2 FROM tab2
----
-20
-21
51

query I rowsort
SELECT ALL - 70 + col1 FROM tab2
----
-11
-39
-53

query I rowsort
SELECT ALL 5 FROM tab0, tab1 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT DISTINCT + 29 FROM tab1 AS cor0
----
29

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2707
SELECT ALL + CAST( NULL AS DECIMAL ) * - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2707
SELECT ALL + CAST ( NULL AS REAL ) * - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 32 + col2 * col1 AS col0 FROM tab2 AS cor0
----
1502
614
805

query I rowsort
SELECT ALL 7 * col1 FROM tab0 AS cor0
----
602
637
679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2710
SELECT DISTINCT + CAST( + ( - col2 ) AS SIGNED ) FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-2710
SELECT DISTINCT + CAST ( + ( - col2 ) AS INTEGER ) FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL col1 + col0 * col1 FROM tab2 cor0
----
1360
248
4661

query I rowsort
SELECT cor0.col2 + 40 * - col1 FROM tab1 cor0
----
-343
-424
-986

query I rowsort
SELECT ALL + 1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT + + ( cor0.col1 ) * col0 + col1 AS col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT - ( - col1 ) + - col0 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + 92 * 12 + - col0 FROM tab2 AS cor0
----
1025
1026
1097

query I rowsort
SELECT ALL ( + ( col1 ) ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - + col2 * cor0.col0 * - ( + col2 ) AS col0 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT DISTINCT + + col1 * - cor0.col1 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
-110
-182
-702

query I rowsort
SELECT cor0.col0 + - col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - ( + 32 ) AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab2, tab0 AS cor2
----
243 values hashing to d9fd2e91495773df58bea6b9a2a13d6a

query I rowsort
SELECT - + ( col1 ) + 3 AS col1 FROM tab0 AS cor0
----
-83
-88
-94

query I rowsort
SELECT 59 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT ALL - cor0.col0 * col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - cor1.col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2726
SELECT CAST( col1 AS SIGNED ) FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2726
SELECT CAST ( col1 AS INTEGER ) FROM tab0
----
86
91
97

query I rowsort
SELECT ALL + 43 * col2 * - col0 FROM tab0 AS cor0
----
-1505
-313814
-34056

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col2 + cor0.col2 col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT + - col1 * + col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT col0 * + col1 - - col0 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + cor0.col0 + - col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL col2 * + col0 + - 71 + + tab2.col1 AS col2 FROM tab2
----
149
2016
2948

query I rowsort
SELECT col2 + + col0 + col0 * - col0 * 50 AS col2 FROM tab1
----
-204679
-319824
-393

query I rowsort
SELECT DISTINCT + 37 FROM tab0, tab1 cor0
----
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-2735
SELECT DISTINCT + col1 + + ( + col1 ) + - tab2.col0 DIV - col1 AS col2 FROM tab2
----
119
38
62

skipif mysql # not compatible
query I rowsort label-2735
SELECT DISTINCT + col1 + + ( + col1 ) + - tab2.col0 / - col1 AS col2 FROM tab2
----
119
38
62

query I rowsort
SELECT ALL - col1 + + col0 + tab2.col2 AS col2 FROM tab2
----
100
3
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-2737
SELECT col2 DIV - tab2.col1 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-2737
SELECT col2 / - tab2.col1 FROM tab2
----
-2
0
0

query I rowsort
SELECT - - cor0.col1 * 40 + cor0.col0 * col0 + + col1 FROM tab1 cor0
----
1075
4506
6933

query I rowsort
SELECT cor1.col0 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT col2 * - 15 AS col0 FROM tab2 AS cor0
----
-390
-405
-570

query I rowsort
SELECT - - col2 * 38 + col1 * col0 FROM tab1 AS cor0
----
2130
2806
4688

query I rowsort
SELECT DISTINCT + + col1 * col0 + + col0 + - col1 FROM tab1 cor0
----
1107
55
694

query I rowsort
SELECT + - col2 + + 51 AS col0 FROM tab0 cor0
----
-31
18
50

query I rowsort
SELECT ALL + cor0.col0 * ( 58 ) AS col0 FROM tab1 AS cor0
----
174
3712
4640

query I rowsort
SELECT DISTINCT - col1 * 65 * - col0 FROM tab1 AS cor0
----
41600
5070
67600

onlyif mysql # use DIV operator for integer division
query I rowsort label-2746
SELECT + + col1 + col2 - - col2 DIV col0 FROM tab0 AS cor0
----
120
173
98

skipif mysql # not compatible
query I rowsort label-2746
SELECT + + col1 + col2 - - col2 / col0 FROM tab0 AS cor0
----
120
173
98

query I rowsort
SELECT ALL + + ( - cor0.col2 ) FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2748
SELECT + col2 + + col2 * cor0.col0 DIV ( - col1 + col1 * ( + col1 ) ) FROM tab2 AS cor0
----
26
27
49

skipif mysql # not compatible
query I rowsort label-2748
SELECT + col2 + + col2 * cor0.col0 / ( - col1 + col1 * ( + col1 ) ) FROM tab2 AS cor0
----
26
27
49

query I rowsort
SELECT DISTINCT 30 + + col2 * cor0.col0 + 24 * + col0 AS col0 FROM tab2 AS cor0
----
387
3930
4928

query I rowsort
SELECT ( - 33 ) + + col0 FROM tab1 AS cor0
----
-30
31
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2751
SELECT ALL - CAST( + col2 AS SIGNED ) * col2 AS col1 FROM tab2 cor0
----
-1444
-676
-729

skipif mysql # not compatible
query I rowsort label-2751
SELECT ALL - CAST ( + col2 AS INTEGER ) * col2 AS col1 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT - col1 + col0 + cor0.col0 AS col0 FROM tab0 AS cor0
----
-27
-38
87

query I rowsort
SELECT DISTINCT ( - ( + col0 ) ) AS col0 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + + 48 FROM tab2 AS cor0
----
48
48
48

query I rowsort
SELECT + - col2 AS col1 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - 40 * - col2 FROM tab2 AS cor0
----
1040
1080
1520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( col1 ) * col2 col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT 26 FROM tab2 AS cor0
----
26
26
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2759
SELECT ALL CAST( NULL AS SIGNED ) * 90 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2759
SELECT ALL CAST ( NULL AS INTEGER ) * 90 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 96 + + 35 FROM tab1 cor0
----
131
131
131

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2761
SELECT CAST( col2 AS SIGNED ) * cor0.col0 + cor0.col0 * - col2 * cor0.col2 - col2 AS col1 FROM tab0 AS cor0
----
-1
-25377
-591220

skipif mysql # not compatible
query I rowsort label-2761
SELECT CAST ( col2 AS INTEGER ) * cor0.col0 + cor0.col0 * - col2 * cor0.col2 - col2 AS col1 FROM tab0 AS cor0
----
-1
-25377
-591220

query I rowsort
SELECT ALL - col2 + - tab0.col1 AS col2 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT col0 + ( tab0.col2 ) + col1 FROM tab0
----
133
143
262

query I rowsort
SELECT + col2 * + 75 FROM tab0
----
2475
6150
75

query I rowsort
SELECT ALL - col0 - - ( tab2.col1 ) * + tab2.col1 AS col2 FROM tab2
----
210
3403
954

query I rowsort
SELECT + + 77 FROM tab2 AS cor0
----
77
77
77

query I rowsort
SELECT DISTINCT + 11 + col2 AS col2 FROM tab1 AS cor0
----
107
65
68

query I rowsort
SELECT - ( + col0 ) + col2 AS col0 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT - col1 + col1 * - col1 * col2 - - cor0.col0 FROM tab1 cor0
----
-16157
-36527
-5646

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 col0 FROM tab2, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT 80 * col0 + - col1 AS col0 FROM tab0 AS cor0
----
1834
2703
7029

query I rowsort
SELECT DISTINCT - 11 FROM tab2, tab2 cor0
----
-11

query I rowsort
SELECT - 93 * + col0 * - col0 + - col0 AS col2 FROM tab1
----
380864
595120
834

query I rowsort
SELECT 20 + col2 AS col2 FROM tab2
----
46
47
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 29 col1 FROM tab0, tab1, tab2 AS cor0, tab2
----
81 values hashing to eb8b36589592eb8217153525a5c8d606

query I rowsort
SELECT - cor0.col2 + - col2 * col2 AS col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-2777
SELECT 76 DIV col1 + + ( col0 ) AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2777
SELECT 76 / col1 + + ( col0 ) AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT tab2.col1 + col1 FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT + ( + col2 ) * - col1 AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - ( 22 ) * + tab0.col1 FROM tab0
----
-1892
-2002
-2134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col1 col1 FROM tab1, tab0, tab2 cor0, tab2
----
17
31
59

query I rowsort
SELECT ALL + 29 FROM tab1
----
29
29
29

query I rowsort
SELECT 10 * tab1.col2 FROM tab1
----
540
570
960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2784
SELECT CAST( col2 AS SIGNED ) FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2784
SELECT CAST ( col2 AS INTEGER ) FROM tab2
----
26
27
38

query I rowsort
SELECT ALL + 94 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2786
SELECT + tab1.col2 * CAST( 17 AS SIGNED ) AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 5d381a915947bc2d21f0613aa81c9ac7

skipif mysql # not compatible
query I rowsort label-2786
SELECT + tab1.col2 * CAST ( 17 AS INTEGER ) AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 5d381a915947bc2d21f0613aa81c9ac7

query I rowsort
SELECT + col0 + + cor0.col1 * + 50 FROM tab0 cor0
----
4324
4639
4885

query I rowsort
SELECT - col2 + ( + col1 ) AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL - tab0.col1 * - 24 FROM tab0
----
2064
2184
2328

query I rowsort
SELECT DISTINCT col2 + 81 + col0 * + col2 FROM tab2 AS cor0
----
2135
297
3121

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - + col2 + 43 FROM tab0 AS cor0
----
-39
10
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * 59 col0 FROM tab0 AS cor0
----
1947
4838
59

query I rowsort
SELECT DISTINCT - col2 + + col0 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - col0 + ( col0 ) AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 + + col1 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + - col1 * cor0.col2 + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT 41 * - tab2.col2 AS col2 FROM tab2
----
-1066
-1107
-1558

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2799
SELECT ALL + CAST( - col2 AS SIGNED ) FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-2799
SELECT ALL + CAST ( - col2 AS INTEGER ) FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL tab0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT + col0 * - col1 AS col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - 74 AS col0 FROM tab0 AS cor0
----
-74
-74
-74

query I rowsort
SELECT - - col1 + col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT - tab1.col2 * cor0.col2 - + tab1.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 8c72752fb635501d8dc40b9939617ee6

query I rowsort
SELECT + + cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL - - col1 * col2 AS col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - col2 * + col0 * col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - 97 col1 FROM tab0 AS cor0
----
-3201
-7954
-97

query I rowsort
SELECT + col0 + + col1 + cor0.col1 AS col0 FROM tab2 cor0
----
113
196
69

query I rowsort
SELECT DISTINCT col2 * - 42 FROM tab1 AS cor0
----
-2268
-2394
-4032

query I rowsort
SELECT DISTINCT - col0 * 84 AS col2 FROM tab2 AS cor0
----
-588
-6552
-6636

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( - cor1.col1 ) col1 FROM tab0 cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT - - ( col2 ) + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ( + cor0.col0 ) + + col2 AS col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT 72 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT 44 * + 45 + col2 AS col2 FROM tab2 AS cor0
----
2006
2007
2018

query I rowsort
SELECT - 29 AS col2 FROM tab2
----
-29
-29
-29

query I rowsort
SELECT ALL - col1 * 6 FROM tab2
----
-102
-186
-354

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2819
SELECT ALL CAST( - col0 AS SIGNED ) FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-2819
SELECT ALL CAST ( - col0 AS INTEGER ) FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ( 61 ) FROM tab2
----
61
61
61

query I rowsort
SELECT + + col0 * - cor0.col2 + + col2 * - col1 FROM tab1 AS cor0
----
-1566
-4218
-8928

query I rowsort
SELECT ALL cor0.col1 FROM tab1, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ( + 66 ) + - col2 AS col0 FROM tab1 AS cor0
----
-30
12
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + + col1 col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT col1 - - tab0.col2 * - col0 AS col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT + col2 - col2 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL col2 + col0 AS col2 FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2828
SELECT + col0 DIV - col1 + - col0 * col1 - + cor0.col2 FROM tab1 AS cor0
----
-1142
-132
-703

skipif mysql # not compatible
query I rowsort label-2828
SELECT + col0 / - col1 + - col0 * col1 - + cor0.col2 FROM tab1 AS cor0
----
-1142
-132
-703

onlyif mysql # use DIV operator for integer division
query I rowsort label-2829
SELECT + col2 + - col2 * cor0.col2 * - col2 + + col1 DIV col1 FROM tab0 AS cor0
----
3
35971
551451

skipif mysql # not compatible
query I rowsort label-2829
SELECT + col2 + - col2 * cor0.col2 * - col2 + + col1 / col1 FROM tab0 AS cor0
----
3
35971
551451

query I rowsort
SELECT - + col2 * cor0.col2 + col2 AS col0 FROM tab1 AS cor0
----
-2862
-3192
-9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-2831
SELECT ALL + - col1 DIV col0 + - col0 * cor0.col0 * + cor0.col0 + col0 AS col0 FROM tab1 AS cor0
----
-262080
-32
-511920

skipif mysql # not compatible
query I rowsort label-2831
SELECT ALL + - col1 / col0 + - col0 * cor0.col0 * + cor0.col0 + col0 AS col0 FROM tab1 AS cor0
----
-262080
-32
-511920

query I rowsort
SELECT - - col0 * - col0 + col2 + - col1 AS col0 FROM tab0 AS cor0
----
-1321
-629
-7930

query I rowsort
SELECT + + col1 * cor0.col2 * - cor0.col0 + col1 AS col0 FROM tab1 AS cor0
----
-36470
-4186
-99827

query I rowsort
SELECT col0 + - col0 - - col0 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col2 AS col2 FROM tab2 cor0
----
1534
646
837

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT - col0 * col2 >= NULL
----

query IIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 WHERE NOT NULL NOT IN ( cor0.col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col0 + + col1 col0 FROM tab1 cor0
----
-118
-147
20

query I rowsort
SELECT cor0.col1 * col2 + - cor0.col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT col0 / + cor0.col2 AS col0 FROM tab2 AS cor0 WHERE NOT col2 * col0 + col2 NOT BETWEEN NULL AND + col2
----

query I rowsort
SELECT cor0.col2 * col0 + col1 * - col1 AS col1 FROM tab1 AS cor0
----
-514
3548
7511

query I rowsort
SELECT DISTINCT + + cor0.col1 * + col0 + col1 FROM tab0 cor0
----
2150
3492
8190

query I rowsort
SELECT - col1 * col1 AS col0 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT - col2 + col1 * col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT cor0.col0 * + col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - col0 * + col0 + - col2 + + col0 * col2 AS col0 FROM tab0 AS cor0
----
-1191
-705
183

onlyif mysql # use DIV operator for integer division
query I rowsort label-2847
SELECT col1 DIV + col0 AS col2 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2847
SELECT col1 / + col0 AS col2 FROM tab0
----
1
2
3

query I rowsort
SELECT ALL col2 + cor0.col2 AS col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + col2 * col0 + + col1 AS col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL + - col0 * - col2 + - col0 AS col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT + + col1 - + col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col1 * col2 + - col0 * + col1 FROM tab0 cor0
----
-3298
-637
774

query I rowsort
SELECT col2 + - col2 * - col2 AS col0 FROM tab1 AS cor0
----
2970
3306
9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-2854
SELECT ALL col1 DIV + tab0.col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2854
SELECT ALL col1 / + tab0.col2 FROM tab0
----
1
2
97

query I rowsort
SELECT ALL col1 * col1 - col0 * - col2 FROM tab0
----
15579
8188
9444

query I rowsort
SELECT tab0.col0 * col0 - col0 AS col0 FROM tab0
----
1190
552
7832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 col1 FROM tab1
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2858
SELECT + col1 DIV col0 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-2858
SELECT + col1 / col0 FROM tab1
----
0
0
8

query I rowsort
SELECT - col2 * cor0.col1 + col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL col1 + col1 + + 45 AS col2 FROM tab0 AS cor0
----
217
227
239

query I rowsort
SELECT - col0 * 25 + 83 AS col0 FROM tab1 AS cor0
----
-1517
-1917
8

query I rowsort
SELECT 14 FROM tab2
----
14
14
14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2863
SELECT - col2 + col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2863
SELECT - col2 + col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + + 9 AS col1 FROM tab2
----
-69
-70
2

query I rowsort
SELECT tab0.col1 * + col1 * 57 AS col2 FROM tab0
----
421572
472017
536313

query I rowsort
SELECT col2 + ( col0 ) + + tab0.col2 * col1 AS col2 FROM tab0
----
133
2895
7633

query I rowsort
SELECT DISTINCT + col2 * + tab1.col2 FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-2868
SELECT ALL - - col1 DIV - 8 col1 FROM tab0 AS cor0
----
-10
-11
-12

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2868
SELECT ALL - - col1 / - 8 col1 FROM tab0 AS cor0
----
-10
-11
-12

query I rowsort
SELECT - tab0.col2 AS col1 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

onlyif mysql # use DIV operator for integer division
query I rowsort label-2870
SELECT col0 DIV ( - col1 ) + - col2 AS col1 FROM tab2
----
-27
-27
-42

skipif mysql # not compatible
query I rowsort label-2870
SELECT col0 / ( - col1 ) + - col2 AS col1 FROM tab2
----
-27
-27
-42

query I rowsort
SELECT DISTINCT col2 * + 16 + col1 FROM tab1
----
1549
890
922

query I rowsort
SELECT DISTINCT col2 + 49 FROM tab2
----
75
76
87

query I rowsort
SELECT DISTINCT + col0 + + 64 AS col1 FROM tab2
----
142
143
71

query I rowsort
SELECT tab0.col1 + 51 FROM tab0
----
137
142
148

onlyif mysql # use DIV operator for integer division
query I rowsort label-2875
SELECT ALL + col1 * - 83 + col2 + col1 DIV + col1 AS col2 FROM tab2 AS cor0
----
-1372
-2545
-4870

skipif mysql # not compatible
query I rowsort label-2875
SELECT ALL + col1 * - 83 + col2 + col1 / + col1 AS col2 FROM tab2 AS cor0
----
-1372
-2545
-4870

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2876
SELECT DISTINCT - - col2 - CAST( NULL AS SIGNED ) * + col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2876
SELECT DISTINCT - - col2 - CAST ( NULL AS INTEGER ) * + col2 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - cor0.col2 col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - + col0 * + 37 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-125615
-299663
-76368

query I rowsort
SELECT DISTINCT + cor0.col2 * col0 + col0 AS col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT - col0 + col2 AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + col2 + col1 * + col2 * + col0 AS col2 FROM tab0 AS cor0
----
3396
664200
68145

query I rowsort
SELECT + + col0 + + col0 * + 34 AS col0 FROM tab2 cor0
----
245
2730
2765

query I rowsort
SELECT DISTINCT + + col1 + - ( cor0.col1 ) FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL 92 * 46 AS col0 FROM tab2
----
4232
4232
4232

query I rowsort
SELECT - 51 + + col1 * col1 FROM tab1
----
118
49
625

onlyif mysql # use DIV operator for integer division
query I rowsort label-2886
SELECT - tab0.col1 DIV tab0.col0 - col1 AS col1 FROM tab0
----
-89
-92
-99

skipif mysql # not compatible
query I rowsort label-2886
SELECT - tab0.col1 / tab0.col0 - col1 AS col1 FROM tab0
----
-89
-92
-99

query I rowsort
SELECT ALL + col1 + 13 * col1 AS col1 FROM tab2 AS cor0
----
238
434
826

query I rowsort
SELECT DISTINCT 10 AS col0 FROM tab2 AS cor0
----
10

query I rowsort
SELECT ( + col2 ) * col2 AS col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + ( - ( + col1 ) ) + ( col1 ) AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2891
SELECT + 4 + col2 DIV col2 FROM tab0 AS cor0
----
5
5
5

skipif mysql # not compatible
query I rowsort label-2891
SELECT + 4 + col2 / col2 FROM tab0 AS cor0
----
5
5
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2892
SELECT DISTINCT - col1 + - col2 DIV + col0 FROM tab1 AS cor0
----
-10
-14
-44

skipif mysql # not compatible
query I rowsort label-2892
SELECT DISTINCT - col1 + - col2 / + col0 FROM tab1 AS cor0
----
-10
-14
-44

query I rowsort
SELECT ALL + + col1 + - col0 * - 96 FROM tab2 AS cor0
----
703
7547
7601

query I rowsort
SELECT 40 - cor0.col2 AS col2 FROM tab1 cor0
----
-14
-17
-56

query I rowsort
SELECT DISTINCT + - 1 AS col2 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT + ( - col0 ) + + ( 31 + + col0 ) AS col0 FROM tab2 AS cor0
----
31
31
31

query I rowsort
SELECT DISTINCT - + col2 + + col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + 66 * + col2 AS col0 FROM tab1 AS cor0
----
3564
3762
6336

query I rowsort
SELECT - - col1 - + col0 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-2900
SELECT ALL + col0 DIV cor0.col1 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-2900
SELECT ALL + col0 / cor0.col1 FROM tab1 AS cor0
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col0 col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - 30 AS col1 FROM tab2 AS cor0
----
-30
-30
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 78 * col2 * col0 col0 FROM tab2 AS cor0
----
14742
158184
234156

query I rowsort
SELECT - 56 AS col2 FROM tab2
----
-56
-56
-56

query I rowsort
SELECT DISTINCT ( tab2.col2 ) * col1 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT + + col2 + - col1 * col2 AS col0 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT + col2 * col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - 85 + col2 * cor0.col1 AS col2 FROM tab1 AS cor0
----
1163
1319
485

onlyif mysql # use DIV operator for integer division
query I rowsort label-2909
SELECT 20 DIV col0 AS col0 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-2909
SELECT 20 / col0 AS col0 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT DISTINCT - 85 * col1 AS col1 FROM tab1 AS cor0
----
-1105
-2210
-850

query I rowsort
SELECT DISTINCT cor0.col2 * - col0 + col2 AS col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT ALL - 38 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-380
-494
-988

query I rowsort
SELECT ALL + + col0 * col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - cor0.col1 + - col1 FROM tab1 AS cor0
----
-20
-26
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 26 * + col2 col0 FROM tab2 AS cor0
----
-676
-702
-988

query I rowsort
SELECT ALL col0 + col0 * + col2 AS col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT - 53 * - col0 FROM tab1 AS cor0
----
159
3392
4240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 68 col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT ALL col1 * col0 - 39 AS col2 FROM tab2 AS cor0
----
1304
178
4563

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 73edaf471aef3f42e9a0b0be98b79374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2921
SELECT col0 * - CAST( + 86 AS SIGNED ) * - col0 - + col2 AS col0 FROM tab1 AS cor0
----
352199
550304
720

skipif mysql # not compatible
query I rowsort label-2921
SELECT col0 * - CAST ( + 86 AS INTEGER ) * - col0 - + col2 AS col0 FROM tab1 AS cor0
----
352199
550304
720

query I rowsort
SELECT + + col2 + col0 + ( col1 ) * - cor0.col1 FROM tab2 AS cor0
----
-172
-3377
-927

query I rowsort
SELECT + col1 + 74 AS col1 FROM tab1 AS cor0
----
100
84
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2924
SELECT - col0 - CAST( NULL AS DECIMAL ) * - col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2924
SELECT - col0 - CAST ( NULL AS REAL ) * - col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 - ( col2 ) FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT col1 + + col0 - col2 AS col2 FROM tab2 AS cor0
----
11
111
58

query I rowsort
SELECT DISTINCT - 86 FROM tab0
----
-86

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # use DIV operator for integer division
query I rowsort label-2929
SELECT + + col2 DIV - col0 + 86 FROM tab2 AS cor0
----
83
86
86

skipif mysql # not compatible
query I rowsort label-2929
SELECT + + col2 / - col0 + 86 FROM tab2 AS cor0
----
83
86
86

query I rowsort
SELECT ALL 82 * + col1 AS col0 FROM tab1
----
1066
2132
820

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2931
SELECT DISTINCT + - CAST( NULL AS SIGNED ) + col2 * - col0 - - col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2931
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) + col2 * - col0 - - col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - + 75 FROM tab0 AS cor0
----
-75
-75
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col1 col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL cor0.col2 * col1 + + col2 AS col0 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT + 58 AS col0 FROM tab0 AS cor0
----
58
58
58

query I rowsort
SELECT ALL + - ( col2 ) * + cor0.col2 + 87 FROM tab1 AS cor0
----
-2829
-3162
-9129

query I rowsort
SELECT DISTINCT col0 * - col0 + col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT + cor0.col1 + - 89 AS col1 FROM tab1 cor0
----
-63
-76
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2939
SELECT ALL - col1 DIV cor0.col0 + - col1 * + col2 FROM tab0 AS cor0
----
-2841
-7463
-99

skipif mysql # not compatible
query I rowsort label-2939
SELECT ALL - col1 / cor0.col0 + - col1 * + col2 FROM tab0 AS cor0
----
-2841
-7463
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - 47 col2 FROM tab0 AS cor0
----
-14
-46
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col1 + col0 col2 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT col1 * + tab0.col1 * + tab0.col0 AS col2 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT ALL - col2 + 19 * col1 FROM tab0
----
1601
1647
1842

query I rowsort
SELECT + 75 FROM tab1, tab2, tab2 AS cor0, tab0
----
81 values hashing to 3384246e49f3e69ba32c165b88111fee

query I rowsort
SELECT DISTINCT + col1 + + 73 AS col1 FROM tab1
----
83
86
99

query I rowsort
SELECT - tab2.col0 + col1 AS col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT - col2 * 36 AS col2 FROM tab2 AS cor0
----
-1368
-936
-972

query I rowsort
SELECT col0 * col1 + + col2 * + col0 AS col2 FROM tab2 AS cor0
----
406
4345
6630

query I rowsort
SELECT - col1 * - col2 AS col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT - 80 FROM tab2
----
-80
-80
-80

query I rowsort
SELECT DISTINCT - 4 + col0 FROM tab2 AS cor0
----
3
74
75

query I rowsort
SELECT ALL - - cor0.col0 * - col1 * col0 + col0 AS col2 FROM tab1 AS cor0
----
-231
-40896
-83120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + 84 col1 FROM tab1 cor0
----
58
71
74

query I rowsort
SELECT ALL + col1 * col0 + - col2 AS col1 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT + col2 + 2 + + col2 AS col2 FROM tab0 cor0
----
166
4
68

query I rowsort
SELECT DISTINCT ( col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - 92 FROM tab0
----
-92
-92
-92

query I rowsort
SELECT 13 FROM tab1
----
13
13
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-2959
SELECT col0 DIV col2 + col0 DIV cor0.col0 AS col1 FROM tab1 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-2959
SELECT col0 / col2 + col0 / cor0.col0 AS col1 FROM tab1 AS cor0
----
1
1
2

query I rowsort
SELECT ALL - col1 + - col1 + col0 AS col1 FROM tab2
----
-40
-55
45

query I rowsort
SELECT 25 + col0 * - col0 AS col1 FROM tab1
----
-4071
-6375
16

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2962
SELECT DISTINCT + + CAST( NULL AS SIGNED ) col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2962
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + ( + col2 ) + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + 44 * + 67 + col2 + cor0.col0 FROM tab1 AS cor0
----
3005
3069
3124

query I rowsort
SELECT DISTINCT - cor0.col2 * + 54 AS col2 FROM tab0 AS cor0
----
-1782
-4428
-54

query I rowsort
SELECT + + cor0.col1 + + col0 AS col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ( + col1 ) * + col1 + col2 FROM tab1 AS cor0
----
157
265
730

onlyif mysql # use DIV operator for integer division
query I rowsort label-2968
SELECT 38 + col1 - col0 DIV cor0.col1 FROM tab1 AS cor0
----
42
45
64

skipif mysql # not compatible
query I rowsort label-2968
SELECT 38 + col1 - col0 / cor0.col1 FROM tab1 AS cor0
----
42
45
64

query I rowsort
SELECT ALL - - col0 * + col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( cor0.col0 ) col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - 38 + col2 AS col1 FROM tab2 cor0
----
-11
-12
0

query I rowsort
SELECT + ( - cor0.col1 ) * col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + col0 * + col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - - col2 * + col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * - col2 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2976
SELECT 82 + col0 DIV - col0 AS col0 FROM tab2 AS cor0
----
81
81
81

skipif mysql # not compatible
query I rowsort label-2976
SELECT 82 + col0 / - col0 AS col0 FROM tab2 AS cor0
----
81
81
81

query I rowsort
SELECT ALL - + 79 FROM tab2 AS cor0
----
-79
-79
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2978
SELECT + - cor0.col2 DIV cor0.col1 AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2978
SELECT + - cor0.col2 / cor0.col1 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + cor0.col2 * - col2 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT + ( col0 ) * - col1 * col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-2981
SELECT DISTINCT - col2 DIV col1 AS col0 FROM tab2 AS cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-2981
SELECT DISTINCT - col2 / col1 AS col0 FROM tab2 AS cor0
----
-2
0

query I rowsort
SELECT ALL col2 * tab0.col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT + ( + ( - col2 ) * - col0 + + col2 ) AS col0 FROM tab2
----
2054
216
3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2984
SELECT ALL col2 * col1 * col1 + + CAST( - col2 AS SIGNED ) FROM tab1
----
16128
36450
5643

skipif mysql # not compatible
query I rowsort label-2984
SELECT ALL col2 * col1 * col1 + + CAST ( - col2 AS INTEGER ) FROM tab1
----
16128
36450
5643

query I rowsort
SELECT col2 + col1 * tab2.col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT ALL + 77 FROM tab2, tab2 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT ALL 12 AS col2 FROM tab1
----
12
12
12

query I rowsort
SELECT col1 + 67 FROM tab1 AS cor0
----
77
80
93

query I rowsort
SELECT - + col0 * 52 AS col1 FROM tab0 AS cor0
----
-1248
-1820
-4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-2990
SELECT + col0 DIV + 64 + + col2 FROM tab1 AS cor0
----
54
58
97

skipif mysql # not compatible
query I rowsort label-2990
SELECT + col0 / + 64 + + col2 FROM tab1 AS cor0
----
54
58
97

query I rowsort
SELECT + col1 * + col1 + + col0 AS col2 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT ALL + + tab0.col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT - 36 FROM tab2
----
-36

query I rowsort
SELECT - 47 AS col2 FROM tab2
----
-47
-47
-47

query I rowsort
SELECT ALL + tab2.col2 FROM tab2, tab1, tab1 AS cor0, tab0
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT DISTINCT + 35 AS col2 FROM tab2, tab0, tab0 AS cor0
----
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-2997
SELECT - col2 + - cor0.col2 DIV + col1 - - cor0.col2 AS col0 FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-2997
SELECT - col2 + - cor0.col2 / + col1 - - cor0.col2 AS col0 FROM tab1 cor0
----
-2
-5
-7

query I rowsort
SELECT + col2 + col1 * cor0.col1 * col2 AS col2 FROM tab0 AS cor0
----
244101
679124
9410

query I rowsort
SELECT DISTINCT + 36 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 AS cor2
----
36

query I rowsort
SELECT + ( col0 ) * col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL - 12 * ( col2 ) - ( 64 ) FROM tab1 cor0
----
-1216
-712
-748

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3002
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * 11 + col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3002
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * 11 + col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT cor0.col0 + ( - col1 * - col2 ) AS col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL + 20 FROM tab0 AS cor0
----
20
20
20

query I rowsort
SELECT DISTINCT + 72 * + 10 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
638
687
719

query I rowsort
SELECT DISTINCT + col2 * col1 - - col0 FROM tab0 AS cor0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 21 + + 50 - cor0.col0 col0 FROM tab1 cor0
----
-35
-51
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 3 + ( - col1 ) col2 FROM tab0 AS cor0
----
-83
-88
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3009
SELECT + CAST( NULL AS SIGNED ) + col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3009
SELECT + CAST ( NULL AS INTEGER ) + col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 + col1 AS col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL + 75 + - col2 * - col2 FROM tab0 AS cor0
----
1164
6799
76

query I rowsort
SELECT + 3 * col1 + col0 AS col0 FROM tab1 AS cor0
----
119
81
94

query I rowsort
SELECT ALL ( 17 ) * col0 FROM tab0 AS cor0
----
1513
408
595

query I rowsort
SELECT DISTINCT + col1 * 20 FROM tab2
----
1180
340
620

query I rowsort
SELECT ALL - 1 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

query I rowsort
SELECT ALL cor0.col0 FROM tab2, tab0 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 * + col1 + col0 * 37 col2 FROM tab2
----
2473
2804
42

query I rowsort
SELECT - col1 - - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 + cor0.col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT ALL ( - ( + col1 ) ) FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3022
SELECT DISTINCT col0 DIV col1 + + col2 * col1 FROM tab1 AS cor0
----
1254
1404
576

skipif mysql # not compatible
query I rowsort label-3022
SELECT DISTINCT col0 / col1 + + col2 * col1 FROM tab1 AS cor0
----
1254
1404
576

query I rowsort
SELECT + + col1 - - col1 AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT col1 + - 80 FROM tab1 AS cor0
----
-54
-67
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - ( col2 ) col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + 6 * + 49 FROM tab1 AS cor0
----
294
294
294

query I rowsort
SELECT ALL - 33 AS col2 FROM tab1 cor0
----
-33
-33
-33

query I rowsort
SELECT 57 * col0 + cor0.col0 FROM tab0 cor0
----
1392
2030
5162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
86
91
97

query I rowsort
SELECT ALL tab0.col0 * - col0 * col0 FROM tab0
----
-13824
-42875
-704969

query I rowsort
SELECT DISTINCT + tab0.col0 AS col0 FROM tab0, tab1 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3032
SELECT + cor0.col2 + + col2 DIV cor0.col1 AS col2 FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3032
SELECT + cor0.col2 + + col2 / cor0.col1 AS col2 FROM tab0 cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - cor0.col2 ) col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + 63 + col0 * - col1 AS col0 FROM tab2 AS cor0
----
-1280
-154
-4539

query I rowsort
SELECT + cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 37 col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
37

query I rowsort
SELECT ALL - 44 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 38f05fdaaf15e64b62f27cd96f73fb79

query I rowsort
SELECT ALL col1 * - 85 * col2 + col0 FROM tab0 AS cor0
----
-241206
-634181
-8210

query I rowsort
SELECT ALL 79 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

query I rowsort
SELECT ALL tab2.col1 * + 7 FROM tab2, tab0 AS cor0
----
9 values hashing to c04b2beae9324a163a4bd04f20c3bb97

query I rowsort
SELECT col0 * + col1 * + col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT + col2 * + col1 + - col2 * 87 FROM tab1 AS cor0
----
-3294
-4389
-7104

query I rowsort
SELECT ALL + - cor0.col1 * - cor0.col2 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + col2 * cor0.col2 col0 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT DISTINCT - - col1 + cor0.col1 + col0 FROM tab0 AS cor0
----
196
229
271

query I rowsort
SELECT DISTINCT - - col1 + - col2 AS col0 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT 3 FROM tab1 AS cor0
----
3
3
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 * 50 col1 FROM tab2 AS cor0
----
33800
36450
72200

query I rowsort
SELECT DISTINCT - - col2 * col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT 4 FROM tab1 AS cor0
----
4
4
4

query I rowsort
SELECT - col1 * - col1 AS col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - 4 * + col0 FROM tab1 AS cor0
----
-12
-256
-320

query I rowsort
SELECT + 17 AS col0 FROM tab2 AS cor0
----
17
17
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-3054
SELECT - col2 DIV col0 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-3054
SELECT - col2 / col0 FROM tab2 AS cor0
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 * col1 * col1 + + ( col2 ) col2 FROM tab2
----
-22793
-271492
-6700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3056
SELECT + CAST( NULL AS SIGNED ) - - col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3056
SELECT + CAST ( NULL AS INTEGER ) - - col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 + col2 * col1 * 24 FROM tab1 cor0
----
13670
29939
33670

query I rowsort
SELECT - - 76 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 59 col0 FROM tab2
----
59
59
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3060
SELECT - 40 DIV col0 FROM tab2
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-3060
SELECT - 40 / col0 FROM tab2
----
-5
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3061
SELECT ALL col0 + - col2 DIV + col0 col0 FROM tab1 AS cor0
----
-15
64
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3061
SELECT ALL col0 + - col2 / + col0 col0 FROM tab1 AS cor0
----
-15
64
79

query I rowsort
SELECT - - col1 * col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + cor0.col2 + col0 * col0 AS col2 FROM tab1 AS cor0
----
4153
63
6496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * 33 col0 FROM tab2 AS cor0
----
231
2574
2607

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 col0 FROM tab2, tab0 cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT - col1 + ( col1 * + 16 ) FROM tab1
----
150
195
390

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 49 col1 FROM tab1
----
49
49
49

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( - col0 AS REAL ) AS col2 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ALL + 9 * + 52 + col0 + 5 AS col0 FROM tab1 AS cor0
----
476
537
553

query I rowsort
SELECT ALL - ( - col2 ) * + col0 + - col0 * - col2 AS col0 FROM tab0 AS cor0
----
14596
1584
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3071
SELECT ALL + CAST( - ( + col0 ) AS SIGNED ) + col0 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3071
SELECT ALL + CAST ( - ( + col0 ) AS INTEGER ) + col0 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 2 + tab0.col0 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 889fcb754632aec98d282b40fddf9a9f

query I rowsort
SELECT DISTINCT 92 AS col2 FROM tab1, tab1 AS cor0
----
92

query I rowsort
SELECT ALL 73 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

query I rowsort
SELECT ALL + col2 - + 11 * + col0 FROM tab0 AS cor0
----
-231
-384
-897

query I rowsort
SELECT ALL + 27 FROM tab0 AS cor0
----
27
27
27

query I rowsort
SELECT - 3 FROM tab0, tab0 AS cor0
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

query I rowsort
SELECT col0 * - col0 AS col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT 80 AS col1 FROM tab0
----
80
80
80

query I rowsort
SELECT 10 AS col0 FROM tab1 AS cor0
----
10
10
10

query I rowsort
SELECT DISTINCT - cor0.col1 + col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT 97 AS col2 FROM tab1
----
97
97
97

query I rowsort
SELECT ALL - + cor0.col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT + + col1 + col0 FROM tab1 AS cor0
----
29
74
93

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to 0fcd8d0934383dd58863be894b07a6ed

query I rowsort
SELECT - tab0.col2 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT ALL - col2 * tab2.col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT + 34 AS col2 FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

query I rowsort
SELECT DISTINCT 50 FROM tab2, tab1 cor0
----
50

query I rowsort
SELECT + tab2.col1 * - col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT col2 * + 58 FROM tab2
----
1508
1566
2204

query I rowsort
SELECT 54 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT col2 * col1 + + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT - col0 + 20 AS col1 FROM tab2 AS cor0
----
-58
-59
13

query I rowsort
SELECT - col1 + + 46 AS col1 FROM tab0 AS cor0
----
-40
-45
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * + col0 + col0 col1 FROM tab2 cor0
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - 32 col2 FROM tab0 AS cor0
----
-8
3
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3099
SELECT + + col1 * - CAST( col0 AS SIGNED ) + col0 FROM tab1 AS cor0
----
-576
-75
-960

skipif mysql # not compatible
query I rowsort label-3099
SELECT + + col1 * - CAST ( col0 AS INTEGER ) + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT 10 + col1 AS col2 FROM tab1 AS cor0
----
20
23
36

query I rowsort
SELECT + col2 + ( col0 * 65 ) AS col0 FROM tab0 AS cor0
----
1593
2276
5867

query I rowsort
SELECT ALL - + 64 - + col2 AS col2 FROM tab2 AS cor0
----
-102
-90
-91

query I rowsort
SELECT + 46 * + ( - col0 ) FROM tab0 AS cor0
----
-1104
-1610
-4094

query I rowsort
SELECT DISTINCT + - col2 * + col1 + col1 * 66 AS col0 FROM tab1 AS cor0
----
-390
312
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 col2 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3106
SELECT DISTINCT 95 DIV 72 + - tab1.col1 col1 FROM tab1, tab1 AS cor0
----
-12
-25
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3106
SELECT DISTINCT 95 / 72 + - tab1.col1 col1 FROM tab1, tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT - col1 * + 49 FROM tab1
----
-1274
-490
-637

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + col0 col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - ( col2 ) + col2 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * - 9 + + col1 * 43 AS col2 FROM tab2 cor0
----
1270
1835
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * + col1 col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT 99 AS col1 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 05ea182fd6036c7f5e0ea08fc061cc67

query I rowsort
SELECT ALL 27 + col1 - 15 AS col0 FROM tab1
----
22
25
38

query I rowsort
SELECT col1 * - col1 AS col0 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT - 32 * col1 * - 94 AS col0 FROM tab1 AS cor0
----
30080
39104
78208

query I rowsort
SELECT col2 * cor0.col2 FROM tab2 AS cor0
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-3117
SELECT cor0.col0 + + col0 DIV - ( - col0 ) AS col1 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-3117
SELECT cor0.col0 + + col0 / - ( - col0 ) AS col1 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT DISTINCT 25 FROM tab2, tab1, tab0 AS cor0
----
25

query I rowsort
SELECT - col0 * + col0 FROM tab1 cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3120
SELECT + cor0.col0 + col0 + 95 DIV col0 FROM tab2 AS cor0
----
157
159
27

skipif mysql # not compatible
query I rowsort label-3120
SELECT + cor0.col0 + col0 + 95 / col0 FROM tab2 AS cor0
----
157
159
27

query I rowsort
SELECT - - col2 * 20 + + 91 * + col2 AS col0 FROM tab0 AS cor0
----
111
3663
9102

query I rowsort
SELECT - col1 + 84 + - col0 FROM tab2 AS cor0
----
-12
-53
46

query I rowsort
SELECT + 89 * col1 FROM tab2
----
1513
2759
5251

query I rowsort
SELECT DISTINCT ( col1 ) * + 48 FROM tab2
----
1488
2832
816

query I rowsort
SELECT DISTINCT - ( tab1.col1 ) FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col2 * - tab2.col0 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL col2 + - col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT col1 + - col2 * + 28 AS col1 FROM tab2 cor0
----
-1047
-669
-725

query I rowsort
SELECT + cor0.col1 + cor0.col2 AS col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3130
SELECT ALL - - col2 * 98 + + 23 DIV + col0 FROM tab2 AS cor0
----
2548
2649
3724

skipif mysql # not compatible
query I rowsort label-3130
SELECT ALL - - col2 * 98 + + 23 / + col0 FROM tab2 AS cor0
----
2548
2649
3724

onlyif mysql # use DIV operator for integer division
query I rowsort label-3131
SELECT ALL - cor0.col2 + ( col2 ) DIV + col0 AS col1 FROM tab2 AS cor0
----
-24
-26
-38

skipif mysql # not compatible
query I rowsort label-3131
SELECT ALL - cor0.col2 + ( col2 ) / + col0 AS col1 FROM tab2 AS cor0
----
-24
-26
-38

query I rowsort
SELECT DISTINCT - - col1 * - col1 + cor0.col0 * col1 - col2 AS col1 FROM tab2 AS cor0
----
-771
1016
1095

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3133
SELECT - col0 + CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3133
SELECT - col0 + CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 83 + col0 AS col2 FROM tab0 AS cor0
----
107
118
172

query I rowsort
SELECT + - 37 * col0 FROM tab1 cor0
----
-111
-2368
-2960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 col1 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT ALL 35 FROM tab2, tab1 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT - col2 + col2 * + col0 AS col0 FROM tab1
----
108
3591
7584

query I rowsort
SELECT + col2 * col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - cor0.col2 + col2 AS col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - 55 AS col2 FROM tab1 AS cor0
----
-55
-55
-55

query I rowsort
SELECT - - 81 AS col0 FROM tab0 AS cor0
----
81
81
81

query I rowsort
SELECT - 85 FROM tab2, tab1 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT 44 + tab2.col2 FROM tab2
----
70
71
82

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab0, tab1 AS cor1
----
3645 values hashing to f9101173abc9e524c6310e6c0eeefb0c

query I rowsort
SELECT - 12 * - col1 FROM tab1 AS cor0
----
120
156
312

query I rowsort
SELECT DISTINCT 71 FROM tab1, tab0 cor0, tab2 AS cor1
----
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3148
SELECT ALL + CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3148
SELECT ALL + CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * + col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + - col1 col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT cor0.col1 * + col1 + col1 * col1 AS col0 FROM tab1 AS cor0
----
1352
200
338

query I rowsort
SELECT DISTINCT - - col1 + - cor0.col2 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3153
SELECT DISTINCT - - col1 DIV + col2 + col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-3153
SELECT DISTINCT - - col1 / + col2 + col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT col1 * cor0.col2 - 82 AS col0 FROM tab1 AS cor0
----
1166
1322
488

query I rowsort
SELECT - 70 AS col2 FROM tab1 AS cor0
----
-70
-70
-70

query I rowsort
SELECT DISTINCT + cor0.col1 + col0 + col1 * col1 FROM tab0 AS cor0
----
7506
8461
9541

query I rowsort
SELECT DISTINCT 50 * + col2 * col1 + - col1 AS col2 FROM tab0 AS cor0
----
141814
373009
4753

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3158
SELECT DISTINCT + + col0 * - cor0.col0 + - CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
-1226
-609
-8003

skipif mysql # not compatible
query I rowsort label-3158
SELECT DISTINCT + + col0 * - cor0.col0 + - CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT ALL col1 * - cor0.col0 + cor0.col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL + 3 * + cor0.col2 FROM tab2 AS cor0
----
114
78
81

query I rowsort
SELECT DISTINCT col2 + - col0 AS col2 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL 22 AS col0 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

query I rowsort
SELECT DISTINCT col2 + - col2 * col2 AS col1 FROM tab2
----
-1406
-650
-702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - - cor0.col1 col0 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3165
SELECT ALL + - col2 DIV + col2 col2 FROM tab1 cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3165
SELECT ALL + - col2 / + col2 col2 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - - col0 * col0 + ( cor0.col1 + cor0.col2 ) FROM tab0 AS cor0
----
1323
695
8094

query I rowsort
SELECT ALL - 87 FROM tab1, tab1 AS cor0
----
9 values hashing to 84bcab58a965cc8ae97b39d2d01b3d23

query I rowsort
SELECT ALL - - col1 + + cor0.col1 + cor0.col2 FROM tab1 AS cor0
----
106
122
77

query I rowsort
SELECT ALL - 19 FROM tab0
----
-19
-19
-19

onlyif mysql # use DIV operator for integer division
query I rowsort label-3170
SELECT DISTINCT tab2.col0 DIV - col0 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-3170
SELECT DISTINCT tab2.col0 / - col0 FROM tab2
----
-1

query I rowsort
SELECT 96 + + col0 FROM tab1 AS cor0
----
160
176
99

query I rowsort
SELECT - tab0.col0 * - col0 + - col0 * + col1 FROM tab0
----
-1488
-178
-2170

query I rowsort
SELECT DISTINCT + ( + col2 ) + cor0.col0 - 93 FROM tab1 AS cor0
----
-36
28
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3174
SELECT DISTINCT + CAST( + col0 AS SIGNED ) AS col2 FROM tab2 cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-3174
SELECT DISTINCT + CAST ( + col0 AS INTEGER ) AS col2 FROM tab2 cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + 25 col2 FROM tab2
----
103
104
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-3176
SELECT ALL col1 + + 42 DIV 35 AS col0 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-3176
SELECT ALL col1 + + 42 / 35 AS col0 FROM tab0
----
87
92
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3177
SELECT col2 DIV 84 + - col0 * col1 * col0 AS col0 FROM tab1
----
-234
-40960
-83199

skipif mysql # not compatible
query I rowsort label-3177
SELECT col2 / 84 + - col0 * col1 * col0 AS col0 FROM tab1
----
-234
-40960
-83199

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 + col1 * - tab2.col1 col1 FROM tab2
----
-213
-3405
-885

query I rowsort
SELECT - col1 + col0 AS col2 FROM tab1
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + 3 col2 FROM tab0
----
27
38
92

query I rowsort
SELECT DISTINCT + col1 + col0 * col0 FROM tab0
----
1322
662
8012

query I rowsort
SELECT - ( - col0 * col0 ) + col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT ALL - col1 + - cor0.col1 AS col2 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT ALL + - 58 * col2 * - cor0.col0 + + col2 * - col2 - - col0 FROM tab0 AS cor0
----
2064
416649
44871

query I rowsort
SELECT ALL - - 9 + - col2 FROM tab2 cor0
----
-17
-18
-29

query I rowsort
SELECT ALL 40 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT + - 5 + + col2 AS col0 FROM tab1 cor0
----
49
52
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * ( col1 ) col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + cor0.col0 * - cor0.col0 + + ( + cor0.col0 ) FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT + + col1 * + cor0.col2 + col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL col0 * cor0.col0 * cor0.col1 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL - col0 + - ( cor0.col2 ) * - col2 AS col0 FROM tab2 AS cor0
----
1365
598
722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 + col1 col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL - - col0 + + 32 * + 36 FROM tab1 cor0
----
1155
1216
1232

query I rowsort
SELECT DISTINCT col1 + col2 * + 46 AS col2 FROM tab2 AS cor0
----
1255
1273
1765

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + 81 col2 FROM tab2 AS cor0
----
112
140
98

query I rowsort
SELECT col2 + + 29 FROM tab2 AS cor0
----
55
56
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 93 ) col2 FROM tab0 AS cor0
----
-93
-93
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3199
SELECT + - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3199
SELECT + - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 + col1 * + col0 AS col0 FROM tab2 cor0
----
1326
186
4543

query I rowsort
SELECT ALL - + ( col2 ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 WHERE NOT NULL BETWEEN ( NULL ) AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3203
SELECT ALL + cor0.col0 DIV - cor0.col1 + - cor0.col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-3203
SELECT ALL + cor0.col0 / - cor0.col1 + - cor0.col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + - 48 * - cor0.col0 + col0 * - col0 AS col0 FROM tab1 AS cor0
----
-1024
-2560
135

query I rowsort
SELECT ALL col0 + cor0.col1 * + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT col1 + col0 + 17 FROM tab0 AS cor0
----
127
149
197

query I rowsort
SELECT DISTINCT col0 + cor0.col2 * + ( ( col1 ) * + cor0.col1 ) AS col2 FROM tab2 AS cor0
----
11061
25954
90584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 * + col2 + + col0 col1 FROM tab2 AS cor0
----
1438
1456
2093

query I rowsort
SELECT DISTINCT ( - col2 ) * - col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - col0 - col1 * + 98 AS col1 FROM tab1 cor0
----
-1044
-1354
-2551

query I rowsort
SELECT DISTINCT - 96 AS col2 FROM tab2, tab0 AS cor0
----
-96

query I rowsort
SELECT + col1 - - cor0.col0 * - col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT DISTINCT 87 FROM tab1, tab0 cor0, tab1 cor1
----
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col1 col0 FROM tab1 cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort
SELECT ALL + col2 + + col0 * - CAST ( col2 AS REAL ) AS col1 FROM tab2 cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-3216
SELECT + tab2.col1 * col1 + - col2 DIV col0 FROM tab2
----
289
3481
958

skipif mysql # not compatible
query I rowsort label-3216
SELECT + tab2.col1 * col1 + - col2 / col0 FROM tab2
----
289
3481
958

query I rowsort
SELECT ALL 5 * + col2 + + 63 AS col0 FROM tab2
----
193
198
253

query I rowsort
SELECT + 20 + + col1 * 2 * 24 FROM tab2
----
1508
2852
836

query I rowsort
SELECT DISTINCT - 60 + col2 * - col2 AS col1 FROM tab0
----
-1149
-61
-6784

query I rowsort
SELECT - col1 * - 14 AS col0 FROM tab0 AS cor0
----
1204
1274
1358

query I rowsort
SELECT ALL - 58 AS col2 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to a38440572743ed8a3d8af7b49a5388c9

query I rowsort
SELECT DISTINCT col2 + + col1 * - 35 FROM tab2
----
-1058
-2039
-557

query I rowsort
SELECT cor1.col2 * tab1.col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 994244f565b077d9bfe0a9efd8b9bf4b

query I rowsort
SELECT 28 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

query I rowsort
SELECT col2 * - col0 * - col2 AS col2 FROM tab0
----
26136
35
598436

query I rowsort
SELECT DISTINCT + col0 + + tab1.col1 AS col0 FROM tab1
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col2 * - 39 col2 FROM tab2
----
-1022
-1465
-955

query I rowsort
SELECT DISTINCT tab0.col1 + col0 FROM tab0
----
110
132
180

query I rowsort
SELECT - cor0.col0 * + cor0.col0 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to f921d4cdc13dc0e8c0388ccf3f81ffc1

query I rowsort
SELECT - - col2 + col2 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0, tab1, tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT 46 FROM tab2, tab2 AS cor0
----
46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3233
SELECT ALL + col2 + + ( + 90 ) + col1 * CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
1226
222
787

skipif mysql # not compatible
query I rowsort label-3233
SELECT ALL + col2 + + ( + 90 ) + col1 * CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
1226
222
787

query I rowsort
SELECT ALL - 5 + - 70 FROM tab0, tab0 AS cor0
----
9 values hashing to 258bc565c64924d905a55eaaa6e57547

query I rowsort
SELECT tab0.col0 * - col2 * - 34 AS col2 FROM tab0
----
1190
248132
26928

query I rowsort
SELECT ALL - tab2.col0 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT col2 + + col0 + col0 * cor0.col1 FROM tab1 AS cor0
----
1216
135
761

query I rowsort
SELECT ALL 78 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3239
SELECT ALL col2 DIV 15 + tab2.col1 FROM tab2
----
19
32
60

skipif mysql # not compatible
query I rowsort label-3239
SELECT ALL col2 / 15 + tab2.col1 FROM tab2
----
19
32
60

query I rowsort
SELECT DISTINCT + col2 + col2 + tab0.col1 AS col2 FROM tab0
----
152
255
99

query I rowsort
SELECT - tab2.col2 * 72 AS col2 FROM tab2
----
-1872
-1944
-2736

query I rowsort
SELECT + col1 * col2 - - col2 * + col0 FROM tab2 AS cor0
----
1026
3562
3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-3243
SELECT ALL + col2 DIV col0 + col0 FROM tab0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-3243
SELECT ALL + col2 / col0 + col0 FROM tab0
----
25
35
89

query I rowsort
SELECT DISTINCT + - ( + col1 ) + + cor0.col2 - col1 * - col2 AS col2 FROM tab1 AS cor0
----
1331
1432
617

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 85 col2 FROM tab0 AS cor0
----
85
85
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3246
SELECT DISTINCT + + CAST( - col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-3246
SELECT DISTINCT + + CAST ( - col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - cor0.col2 * + 56 FROM tab2 AS cor0
----
-1456
-1512
-2128

query I rowsort
SELECT + 42 AS col1 FROM tab2
----
42
42
42

query I rowsort
SELECT + 29 + - col2 * + col0 * + col0 AS col0 FROM tab2
----
-1294
-158155
-237129

query I rowsort
SELECT ALL + cor0.col0 - - col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - 48 + - col2 FROM tab0 cor0
----
-130
-49
-81

query I rowsort
SELECT + + col0 + col2 * 40 FROM tab1 AS cor0
----
2163
2344
3920

query I rowsort
SELECT DISTINCT - + ( + col1 ) + + col0 AS col2 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT DISTINCT 77 + + col0 * + ( + col2 ) AS col1 FROM tab2 AS cor0
----
2105
266
3079

query I rowsort
SELECT ALL 19 AS col1 FROM tab1 AS cor0
----
19
19
19

query I rowsort
SELECT - col2 * col2 AS col0 FROM tab0 cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-3257
SELECT + ( + col2 ) * - 75 + + col0 DIV cor0.col0 FROM tab1 AS cor0
----
-4049
-4274
-7199

skipif mysql # not compatible
query I rowsort label-3257
SELECT + ( + col2 ) * - 75 + + col0 / cor0.col0 FROM tab1 AS cor0
----
-4049
-4274
-7199

query I rowsort
SELECT - 35 + - col0 FROM tab2 AS cor0
----
-113
-114
-42

onlyif mysql # use DIV operator for integer division
query I rowsort label-3259
SELECT ALL + - 60 DIV col1 col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3259
SELECT ALL + - 60 / col1 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 94 + col1 FROM tab0 AS cor0
----
180
185
191

query I rowsort
SELECT - - col0 * col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + col1 + - col0 + col0 * + col1 FROM tab2 AS cor0
----
1281
241
4583

query I rowsort
SELECT DISTINCT 26 AS col2 FROM tab1, tab2 AS cor0
----
26

query I rowsort
SELECT - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3265
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * 32 / col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3265
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * 32 / col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + ( col1 ) * - col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT + col0 + - 43 * + col2 AS col2 FROM tab1 AS cor0
----
-2319
-2387
-4048

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
243 values hashing to ea21cea53be47edd19229592e3d26141

onlyif mysql # use DIV operator for integer division
query I rowsort label-3269
SELECT col1 + col0 DIV tab0.col0 AS col0 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-3269
SELECT col1 + col0 / tab0.col0 AS col0 FROM tab0
----
87
92
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col0 col1 FROM tab2
----
137
38
96

query I rowsort
SELECT 72 + col0 FROM tab0
----
107
161
96

query I rowsort
SELECT ALL 15 AS col2 FROM tab2
----
15
15
15

query I rowsort
SELECT DISTINCT col1 * + col1 - + col2 FROM tab0
----
7363
8199
9408

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3274
SELECT + CAST( - col2 + + col1 AS SIGNED ) * - col0 FROM tab0
----
-1272
-3360
-801

skipif mysql # not compatible
query I rowsort label-3274
SELECT + CAST ( - col2 + + col1 AS INTEGER ) * - col0 FROM tab0
----
-1272
-3360
-801

query I rowsort
SELECT - 19 FROM tab0, tab2 AS cor0
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

query I rowsort
SELECT 31 FROM tab2 AS cor0
----
31
31
31

query I rowsort
SELECT ALL col1 * - tab1.col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ( - col1 ) * + col1 AS col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - 58 AS col0 FROM tab1
----
-58
-58
-58

query I rowsort
SELECT + 68 * - col0 + - 26 * + col0 FROM tab1 AS cor0
----
-282
-6016
-7520

query I rowsort
SELECT - ( cor0.col2 ) AS col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL col1 * + tab0.col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL - - col2 * - col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - col2 + 2 * + col2 AS col2 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col0 - + col1 AS col1 FROM tab0 AS cor0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-3286
SELECT DISTINCT - col2 DIV ( col1 ) FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3286
SELECT DISTINCT - col2 / ( col1 ) FROM tab0 AS cor0
----
0

query I rowsort
SELECT - col0 + + 80 FROM tab0 AS cor0
----
-9
45
56

query I rowsort
SELECT - col0 * + cor0.col0 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * 76 col2 FROM tab1 AS cor0
----
4104
4332
7296

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 * col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT - tab1.col1 * + col0 FROM tab1
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3292
SELECT DISTINCT col0 DIV - col1 AS col0 FROM tab1
----
-6
0

skipif mysql # not compatible
query I rowsort label-3292
SELECT DISTINCT col0 / - col1 AS col0 FROM tab1
----
-6
0

query I rowsort
SELECT DISTINCT + col1 * tab1.col1 AS col1 FROM tab1
----
100
169
676

query I rowsort
SELECT - col1 * - col1 + - col1 AS col1 FROM tab0 AS cor0
----
7310
8190
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col0 col1 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL - col2 * + col0 + - col0 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT + col2 + col0 * tab0.col2 FROM tab0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col0 * col0 col2 FROM tab0
----
-1190
-552
-7832

query I rowsort
SELECT + col0 + col1 * col2 FROM tab0
----
132
2862
7551

query I rowsort
SELECT ALL + + col1 + + col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT - - col2 + col1 AS col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT - col1 * + col1 + + col0 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT DISTINCT col0 + + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + col0 * col0 + col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT - + col2 * col1 + col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT + col2 * cor0.col1 + col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL col2 + + col1 * cor0.col1 * + col2 FROM tab2 AS cor0
----
11020
25974
90532

query I rowsort
SELECT ALL col1 + col1 AS col1 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT - + cor0.col2 + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 + col0 * col1 + + col0 * + col1 FROM tab0 AS cor0
----
16287
4152
6825

query I rowsort
SELECT DISTINCT + - col0 + col2 AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL + col2 - - col0 AS col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT + - cor0.col2 * - col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab0, tab2, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT tab0.col1 - col1 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT tab0.col2 + - col2 * col0 FROM tab0
----
-34
-7216
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-3317
SELECT ALL col2 DIV col2 AS col1 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3317
SELECT ALL col2 / col2 AS col1 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + col0 * - col0 + col0 AS col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT ALL - col2 * tab0.col1 + - tab0.col2 FROM tab0
----
-2871
-7544
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3320
SELECT DISTINCT col0 + tab1.col1 + + col0 * col0 DIV col2 FROM tab1
----
145
159
29

skipif mysql # not compatible
query I rowsort label-3320
SELECT DISTINCT col0 + tab1.col1 + + col0 * col0 / col2 FROM tab1
----
145
159
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 + + cor0.col1 col0 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT ALL col0 * col0 + - col2 AS col0 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT DISTINCT + col2 + cor0.col0 AS col1 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT + col0 * col1 AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + 12 FROM tab2 cor0
----
12
12
12

query I rowsort
SELECT cor1.col0 * + cor0.col0 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 3efd07118e9c7545ef9b9b1965b8e671

query I rowsort
SELECT DISTINCT ( + 30 ) FROM tab1
----
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-3328
SELECT 76 DIV col2 FROM tab1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3328
SELECT 76 / col2 FROM tab1
----
0
1
1

query I rowsort
SELECT col0 * col1 * - tab2.col1 AS col1 FROM tab2
----
-22831
-271518
-6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-3330
SELECT + tab0.col2 DIV col0 AS col1 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3330
SELECT + tab0.col2 / col0 AS col1 FROM tab0
----
0
0
1

query I rowsort
SELECT + col1 + col1 AS col2 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-3332
SELECT 56 DIV col0 - col1 FROM tab0 AS cor0
----
-84
-91
-96

skipif mysql # not compatible
query I rowsort label-3332
SELECT 56 / col0 - col1 FROM tab0 AS cor0
----
-84
-91
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 7 + col0 col0 FROM tab2 AS cor0
----
14
85
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * - col0 * - cor0.col2 + col0 col1 FROM tab1 cor0
----
-233408
-483
-614320

onlyif mysql # use DIV operator for integer division
query I rowsort label-3335
SELECT ALL + 12 DIV - cor0.col1 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3335
SELECT ALL + 12 / - cor0.col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - 41 * - col2 + col0 FROM tab2
----
1114
1144
1637

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * + col2 col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL + + cor0.col2 * col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3339
SELECT - col0 DIV col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-3339
SELECT - col0 / col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT ALL col2 * col1 * + col1 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT ALL - tab2.col2 + col1 * col0 AS col2 FROM tab2
----
1305
190
4576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3342
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3342
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - ( col2 ) + col2 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col1 + col0 * + col1 col2 FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3345
SELECT DISTINCT CAST( col1 + col2 AS SIGNED ) FROM tab0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-3345
SELECT DISTINCT CAST ( col1 + col2 AS INTEGER ) FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT 65 FROM tab1
----
65

query I rowsort
SELECT ALL + 11 FROM tab1
----
11
11
11

query I rowsort
SELECT + ( tab1.col0 ) * - col0 * 30 AS col2 FROM tab1
----
-122880
-192000
-270

query I rowsort
SELECT col0 + tab2.col1 * + tab2.col2 + 93 FROM tab2
----
1705
818
937

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3350
SELECT - CAST( + col0 AS SIGNED ) AS col2 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-3350
SELECT - CAST ( + col0 AS INTEGER ) AS col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT - 19 * + col0 FROM tab2
----
-133
-1482
-1501

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 DISTINCT + 75 * + col0 FROM tab2 AS cor0
----
525
5850
5925

query I rowsort
SELECT ALL + cor0.col2 + col2 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT - 32 * cor0.col2 FROM tab2 AS cor0
----
-1216
-832
-864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3356
SELECT ALL + cor0.col1 * col0 + - CAST( NULL AS SIGNED ) * - 89 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3356
SELECT ALL + cor0.col1 * col0 + - CAST ( NULL AS INTEGER ) * - 89 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3357
SELECT ALL + 43 * - col2 - + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3357
SELECT ALL + 43 * - col2 - + 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 DISTINCT - - cor0.col1 * - col1 col0 FROM tab1 AS cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - cor0.col2 * col1 * 81 col1 FROM tab1 AS cor0
----
-101008
-113721
-46106

query I rowsort
SELECT DISTINCT - 39 AS col1 FROM tab2 AS cor0
----
-39

query I rowsort
SELECT ALL + cor0.col2 + col1 * col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT + 41 FROM tab1, tab0 AS cor0
----
41

query I rowsort
SELECT DISTINCT - tab2.col2 + + 83 FROM tab2
----
45
56
57

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to e84152c0bf436177d3b3d80e42832d4f

query I rowsort
SELECT DISTINCT + col2 + - col0 * col1 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL + col0 + cor0.col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3367
SELECT DISTINCT - col0 DIV + col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-3367
SELECT DISTINCT - col0 / + col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT col1 * col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3369
SELECT + + col1 * CAST( - col0 * cor0.col0 AS SIGNED ) - col0 DIV col1 FROM tab0 AS cor0
----
-118825
-49536
-720811

skipif mysql # not compatible
query I rowsort label-3369
SELECT + + col1 * CAST ( - col0 * cor0.col0 AS INTEGER ) - col0 / col1 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT - + cor0.col2 + col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT + 30 + cor0.col2 + + col1 FROM tab1 cor0
----
110
139
97

query I rowsort
SELECT ALL - + ( col2 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - ( - col2 ) col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL col2 + col2 + col1 AS col2 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT - - col2 * - cor0.col0 + - col0 * col0 * + col0 AS col0 FROM tab0 cor0
----
-14616
-42910
-712267

query I rowsort
SELECT ALL - + col0 + + col1 * col1 * - col2 FROM tab1 cor0
----
-16304
-36507
-5764

query I rowsort
SELECT ALL + cor0.col2 * - col0 + col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT + - col1 * col0 + col0 - 41 FROM tab0 AS cor0
----
-2081
-3401
-8051

query I rowsort
SELECT col0 - cor0.col1 AS col1 FROM tab1 cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-3380
SELECT col2 + + col1 * col0 + col2 DIV 41 FROM tab0
----
2097
3396
8183

skipif mysql # not compatible
query I rowsort label-3380
SELECT col2 + + col1 * col0 + col2 / 41 FROM tab0
----
2097
3396
8183

query I rowsort
SELECT ( - col0 ) * - col2 + + col1 - - col1 AS col0 FROM tab2 cor0
----
2146
251
3036

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3382
SELECT - + CAST( + cor0.col0 AS SIGNED ) + - col0 + - col2 AS col0 FROM tab0 AS cor0
----
-260
-71
-81

skipif mysql # not compatible
query I rowsort label-3382
SELECT - + CAST ( + cor0.col0 AS INTEGER ) + - col0 + - col2 AS col0 FROM tab0 AS cor0
----
-260
-71
-81

query I rowsort
SELECT cor0.col1 - col1 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 + + ( col0 ) - 77 AS col0 FROM tab0 AS cor0
----
-43
-70
-86

query I rowsort
SELECT - ( col0 ) + cor0.col1 AS col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT + + col0 * + col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 63 + col0 + col1 * - ( 23 ) col0 FROM tab2 cor0
----
-1216
-249
-643

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3388
SELECT + CAST( col0 AS SIGNED ) + + col0 + col0 AS col0 FROM tab0 AS cor0
----
105
267
72

skipif mysql # not compatible
query I rowsort label-3388
SELECT + CAST ( col0 AS INTEGER ) + + col0 + col0 AS col0 FROM tab0 AS cor0
----
105
267
72

query I rowsort
SELECT + + ( + 42 ) AS col2 FROM tab1 cor0
----
42
42
42

query I rowsort
SELECT - 36 + + col1 * cor0.col2 - - col1 FROM tab0 AS cor0
----
158
2888
7517

query I rowsort
SELECT cor0.col1 * col2 + 72 * + col2 FROM tab2 AS cor0
----
2781
3382
3406

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab2 AS cor2
----
3645 values hashing to 0c9c9a26da1b45580001288543ac8dbe

query I rowsort
SELECT - col1 * - ( 49 ) FROM tab0 AS cor0
----
4214
4459
4753

query I rowsort
SELECT col1 * tab0.col2 + col0 FROM tab0
----
132
2862
7551

query I rowsort
SELECT ALL col2 * 41 * tab2.col0 FROM tab2
----
123082
7749
83148

query I rowsort
SELECT 42 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT - col0 + 56 * - col0 FROM tab2 AS cor0
----
-399
-4446
-4503

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 * + 30 * col1 AS col2 FROM tab1 cor0
----
20306
3010
5083

query I rowsort
SELECT DISTINCT - cor0.col0 * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - col0 + col2 * col1 + col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - - col0 + ( + ( + col2 ) ) AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL - col2 + - col0 AS col0 FROM tab1 AS cor0
----
-121
-176
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 35 col1 FROM tab1 AS cor0
----
35
35
35

query I rowsort
SELECT ( + 9 ) * + col2 FROM tab2 AS cor0
----
234
243
342

query I rowsort
SELECT DISTINCT 37 * col0 FROM tab2 AS cor0
----
259
2886
2923

query I rowsort
SELECT + - col0 * - 50 FROM tab1 AS cor0
----
150
3200
4000

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3407
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3407
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3408
SELECT DISTINCT + CAST( 31 AS SIGNED ) AS col1 FROM tab2, tab0 AS cor0
----
31

skipif mysql # not compatible
query I rowsort label-3408
SELECT DISTINCT + CAST ( 31 AS INTEGER ) AS col1 FROM tab2, tab0 AS cor0
----
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - col2 + - col2 AS col1 FROM tab2
----
-52
-54
-76

query I rowsort
SELECT + col2 + - ( - ( col2 ) + col1 * 75 ) FROM tab0
----
-6384
-6661
-7273

query I rowsort
SELECT - col2 * col2 - col0 FROM tab2
----
-1523
-736
-754

query I rowsort
SELECT - 2 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to ec11209ab257030053484fc13a1f6d17

onlyif mysql # use DIV operator for integer division
query I rowsort label-3414
SELECT - 69 DIV col0 FROM tab0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3414
SELECT - 69 / col0 FROM tab0
----
-1
-2
0

query I rowsort
SELECT 43 * 3 AS col0 FROM tab1
----
129
129
129

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3416
SELECT CAST( col0 AS SIGNED ) FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3416
SELECT CAST ( col0 AS INTEGER ) FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3417
SELECT 87 DIV col2 FROM tab0
----
1
2
87

skipif mysql # not compatible
query I rowsort label-3417
SELECT 87 / col2 FROM tab0
----
1
2
87

query I rowsort
SELECT DISTINCT - + 28 + - col2 AS col1 FROM tab0 AS cor0
----
-110
-29
-61

query I rowsort
SELECT ALL + + cor0.col0 + col1 * + ( + col1 ) FROM tab1 cor0
----
164
249
679

query I rowsort
SELECT - col1 * - col1 + col0 * + col0 AS col0 FROM tab0 AS cor0
----
10634
16202
7972

query I rowsort
SELECT ( ( + col1 ) ) * col1 FROM tab1
----
100
169
676

query I rowsort
SELECT ALL + col0 * + col2 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL + 32 + - col1 FROM tab1
----
19
22
6

query I rowsort
SELECT + col1 - cor0.col0 AS col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT - + 20 AS col2 FROM tab1 AS cor0
----
-20
-20
-20

query I rowsort
SELECT col1 * + col0 + + col1 AS col2 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT + col2 + col0 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + 0 * + col0 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT + col0 * col0 * 79 + col2 AS col1 FROM tab0
----
45537
625841
96776

query I rowsort
SELECT - col2 + + col0 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT ALL - col1 * - col0 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - - ( col0 ) FROM tab0 cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3433
SELECT ALL + tab1.col2 + col0 DIV - 62 AS col0 FROM tab1
----
54
56
95

skipif mysql # not compatible
query I rowsort label-3433
SELECT ALL + tab1.col2 + col0 / - 62 AS col0 FROM tab1
----
54
56
95

query I rowsort
SELECT DISTINCT + col0 + - col1 + 42 FROM tab1 AS cor0
----
109
19
96

query I rowsort
SELECT DISTINCT - - col2 - col2 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + col0 + + ( col0 + cor0.col2 ) FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT col0 + col0 * 17 FROM tab1 AS cor0
----
1152
1440
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + 25 * ( - col0 ) col0 FROM tab2 AS cor0
----
-148
-1924
-1937

query I rowsort
SELECT ALL - col1 AS col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT cor0.col0 * + 8 FROM tab0 AS cor0
----
192
280
712

query I rowsort
SELECT - - cor0.col1 * ( col1 ) * + col0 + 71 * col0 AS col2 FROM tab2 AS cor0
----
277056
28440
7224

onlyif mysql # use DIV operator for integer division
query I rowsort label-3442
SELECT DISTINCT + col0 + 95 DIV + col2 AS col0 FROM tab1 AS cor0
----
4
65
80

skipif mysql # not compatible
query I rowsort label-3442
SELECT DISTINCT + col0 + 95 / + col2 AS col0 FROM tab1 AS cor0
----
4
65
80

query I rowsort
SELECT DISTINCT - - col1 + cor0.col0 * col2 * - col2 AS col1 FROM tab0 AS cor0
----
-26050
-598345
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 - - col1 col2 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3445
SELECT ALL col1 DIV + col1 + + col0 * col2 AS col2 FROM tab1 cor0
----
163
3649
7681

skipif mysql # not compatible
query I rowsort label-3445
SELECT ALL col1 / + col1 + + col0 * col2 AS col2 FROM tab1 cor0
----
163
3649
7681

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 + col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT cor0.col2 + - col0 * col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT + col1 * + col1 + + col1 AS col2 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT - + col2 * + col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - + col2 + + cor0.col1 FROM tab2 cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3452
SELECT + CAST( - col0 AS SIGNED ) DIV + col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-3452
SELECT + CAST ( - col0 AS INTEGER ) / + col1 FROM tab2 AS cor0
----
-1
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3453
SELECT ALL 40 DIV col2 FROM tab0
----
0
1
40

skipif mysql # not compatible
query I rowsort label-3453
SELECT ALL 40 / col2 FROM tab0
----
0
1
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col2 ) * - cor0.col1 col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + 93 * + 63 AS col0 FROM tab1 AS cor0
----
5859

query I rowsort
SELECT + - 42 * + 36 AS col0 FROM tab2 AS cor0
----
-1512
-1512
-1512

query I rowsort
SELECT DISTINCT - - ( col0 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - cor0.col1 * ( + col1 ) FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT - - 97 * col0 * - col2 AS col0 FROM tab0 cor0
----
-3395
-707906
-76824

query I rowsort
SELECT ALL - + 16 + col1 AS col0 FROM tab0 AS cor0
----
70
75
81

query I rowsort
SELECT cor0.col1 + + ( col2 ) FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + + 43 AS col2 FROM tab1 AS cor0
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) + col0 * col2 col0 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT ALL + - col0 * col0 * - col1 FROM tab0 cor0
----
118825
49536
720811

query I rowsort
SELECT + - 89 * 69 AS col0 FROM tab2 AS cor0
----
-6141
-6141
-6141

query I rowsort
SELECT DISTINCT + 36 * col2 FROM tab0 AS cor0
----
1188
2952
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-3467
SELECT + + col0 DIV col1 + + CAST( col0 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
7
79
83

skipif mysql # not compatible
query I rowsort label-3467
SELECT + + col0 / col1 + + CAST ( col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
7
79
83

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab2 cor0
----
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3469
SELECT - col0 + - col1 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3469
SELECT - col0 + - col1 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 88 - + col0 AS col2 FROM tab0 AS cor0
----
-1
53
64

query I rowsort
SELECT DISTINCT + col2 * + col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - col1 * - col0 + col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ( + col0 ) - + col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT ALL col1 * col1 AS col0 FROM tab1
----
100
169
676

query I rowsort
SELECT + col1 * col0 * - col1 AS col1 FROM tab0
----
-177504
-329315
-737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-3477
SELECT DISTINCT tab0.col2 DIV col0 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort label-3477
SELECT DISTINCT tab0.col2 / col0 FROM tab0
----
0
1

query I rowsort
SELECT ALL - col1 + + col1 + col2 FROM tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3479
SELECT col0 * - col2 + col1 DIV + col0 + + col2 AS col0 FROM tab0
----
-32
-7215
-756

skipif mysql # not compatible
query I rowsort label-3479
SELECT col0 * - col2 + col1 / + col0 + + col2 AS col0 FROM tab0
----
-32
-7215
-756

query I rowsort
SELECT + col0 * col1 * - col0 FROM tab2
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-3481
SELECT ALL - tab0.col2 DIV col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3481
SELECT ALL - tab0.col2 / col1 AS col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3482
SELECT DISTINCT col1 * tab2.col0 DIV tab2.col0 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-3482
SELECT DISTINCT col1 * tab2.col0 / tab2.col0 FROM tab2
----
17
31
59

query I rowsort
SELECT + col2 + tab2.col2 * + col1 AS col0 FROM tab2
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-3484
SELECT DISTINCT col1 DIV col0 FROM tab1
----
0
8

skipif mysql # not compatible
query I rowsort label-3484
SELECT DISTINCT col1 / col0 FROM tab1
----
0
8

query I rowsort
SELECT tab2.col1 * + col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL - col1 * + col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT col0 * col1 + + col2 + col2 FROM tab0
----
2130
3397
8263

query I rowsort
SELECT + tab2.col0 + - col0 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 * - col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT + col0 * col2 * col2 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT ALL col1 * + col2 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT tab2.col0 - + col1 FROM tab2 WHERE NULL BETWEEN ( col1 + - col2 ) AND - col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3493
SELECT - col1 DIV + col0 + col0 * - tab1.col2 col0 FROM tab1
----
-170
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3493
SELECT - col1 / + col0 + col0 * - tab1.col2 col0 FROM tab1
----
-170
-3648
-7680

query I rowsort
SELECT DISTINCT + col0 * tab0.col2 + col2 * - col1 + col0 AS col2 FROM tab0
----
-2022
-27
-75

query I rowsort
SELECT ALL col0 * - tab2.col2 + + col2 + col0 FROM tab2
----
-155
-1924
-2885

onlyif mysql # use DIV operator for integer division
query I rowsort label-3496
SELECT - col1 + col2 - col0 DIV + col2 FROM tab0
----
-10
-131
-53

skipif mysql # not compatible
query I rowsort label-3496
SELECT - col1 + col2 - col0 / + col2 FROM tab0
----
-10
-131
-53

query I rowsort
SELECT + col1 - + col2 AS col0 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT col2 * col1 AS col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT + col0 - + col1 AS col1 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT ALL col2 * tab2.col0 + + col1 FROM tab2 WHERE NULL >= NULL
----

query I rowsort
SELECT - col0 + - col1 * - col1 FROM tab0
----
7372
8192
9374

query I rowsort
SELECT tab2.col0 * + col0 AS col2 FROM tab2
----
49
6084
6241

query III rowsort
SELECT * FROM tab1 WHERE NOT - col2 * col2 + - col1 IN ( col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT col0 * + col0 AS col1 FROM tab0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col0 col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + col1 FROM tab1 WHERE NULL > NULL
----

query I rowsort
SELECT col2 * - col1 + col1 AS col2 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT col1 * - col2 + - col0 AS col2 FROM tab1
----
-1328
-1407
-634

query I rowsort
SELECT + col0 * + col2 + col0 AS col0 FROM tab1
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-3510
SELECT DISTINCT + col2 + + col0 DIV + col2 AS col2 FROM tab0
----
33
36
83

skipif mysql # not compatible
query I rowsort label-3510
SELECT DISTINCT + col2 + + col0 / + col2 AS col2 FROM tab0
----
33
36
83

query I rowsort
SELECT col1 * + col0 + - col0 * - col0 * col0 AS col1 FROM tab0
----
15888
46270
713068

query I rowsort
SELECT DISTINCT + col1 + - col1 * + tab1.col2 AS col2 FROM tab1
----
-1235
-1378
-560

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 CROSS JOIN tab2
----
54 values hashing to fe43263cad63144a098cccb9cd58c32a

query I rowsort
SELECT DISTINCT col0 * + col1 AS col2 FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3515
SELECT col0 * - col2 + col2 DIV col0 AS col1 FROM tab0
----
-35
-7298
-791

skipif mysql # not compatible
query I rowsort label-3515
SELECT col0 * - col2 + col2 / col0 AS col1 FROM tab0
----
-35
-7298
-791

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL BETWEEN col0 AND NULL
----

query I rowsort
SELECT DISTINCT - - col0 * - col1 + col1 * cor0.col1 FROM tab0 AS cor0
----
182
5332
6014

query I rowsort
SELECT tab2.col0 * col1 + tab2.col1 FROM tab2 WHERE NOT ( NULL ) IN ( - col2 )
----

query I rowsort
SELECT - + col2 * - cor0.col1 + - col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT - col0 * col0 + col2 AS col1 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT + - cor0.col2 + + col1 * + col2 AS col1 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT DISTINCT col1 * col0 * - col2 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT col1 + - col2 AS col1 FROM tab2
----
-21
33
4

query I rowsort
SELECT DISTINCT + col0 * col0 FROM tab1
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3525
SELECT col1 DIV col0 + + col2 AS col1 FROM tab2
----
26
31
38

skipif mysql # not compatible
query I rowsort label-3525
SELECT col1 / col0 + + col2 AS col1 FROM tab2
----
26
31
38

query I rowsort
SELECT ALL col2 * col1 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT + tab0.col1 + - tab0.col2 + tab0.col1 AS col2 FROM tab0 WHERE NOT ( NULL ) IN ( - col0 )
----

query I rowsort
SELECT + tab0.col1 * + col2 * - tab0.col2 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT DISTINCT col1 + - tab0.col2 AS col2 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab2, tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 cor0 WHERE NULL <= ( col2 + col0 )
----

query I rowsort
SELECT ALL col2 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL col0 + col0 * col2 * - col1 AS col2 FROM tab1 AS cor0
----
-36416
-4209
-99760

query I rowsort
SELECT ALL - col1 + col1 / cor0.col0 FROM tab2 AS cor0 WHERE cor0.col2 BETWEEN NULL AND col0
----

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to 5e655b1287771868a8f868574a94d749

query I rowsort
SELECT DISTINCT - 30 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-30

query I rowsort
SELECT ALL + 30 * cor0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 014c83c26abd20da9de5ac8894c81835

skipif mysql # not compatible
query I rowsort
SELECT - - col0 * CAST ( 32 * - col0 + + cor0.col1 AS REAL ) FROM tab1 AS cor0
----
-130432
-203760
-210

query I rowsort
SELECT - + cor0.col0 * + 3 FROM tab0 AS cor0
----
-105
-267
-72

query I rowsort
SELECT 3 + col1 * col2 FROM tab2 AS cor0
----
1537
649
840

query I rowsort
SELECT + 28 + cor0.col2 AS col0 FROM tab1 AS cor0
----
124
82
85

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 cor0, tab0 cor1, tab2 AS cor2
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

query I rowsort
SELECT + col2 * - 34 * col2 FROM tab0 AS cor0
----
-228616
-34
-37026

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - col1 * - ( + 30 ) col2 FROM tab2 AS cor0
----
138060
40290
6510

query I rowsort
SELECT ALL + 9 + - col2 FROM tab2 AS cor0
----
-17
-18
-29

onlyif mysql # use DIV operator for integer division
query I rowsort label-3546
SELECT ALL ( - col1 ) DIV + 91 FROM tab0 cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3546
SELECT ALL ( - col1 ) / + 91 FROM tab0 cor0
----
-1
-1
0

query I rowsort
SELECT ALL + 45 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT - - 56 * col2 FROM tab2 AS cor0
----
1456
1512
2128

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col0 col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - - col0 + col1 * + ( + ( - col0 ) * + col1 ) FROM tab0 AS cor0
----
-177480
-329280
-736920

onlyif mysql # use DIV operator for integer division
query I rowsort label-3551
SELECT col0 + + col2 DIV col1 AS col0 FROM tab1
----
5
69
87

skipif mysql # not compatible
query I rowsort label-3551
SELECT col0 + + col2 / col1 AS col0 FROM tab1
----
5
69
87

query I rowsort
SELECT + cor0.col1 * + col0 * + cor0.col0 FROM tab2 AS cor0
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-3553
SELECT + - col0 DIV cor0.col1 + col1 * col1 AS col1 FROM tab2 cor0
----
285
3480
961

skipif mysql # not compatible
query I rowsort label-3553
SELECT + - col0 / cor0.col1 + col1 * col1 AS col1 FROM tab2 cor0
----
285
3480
961

query I rowsort
SELECT 31 + + col1 * 66 FROM tab0 AS cor0
----
5707
6037
6433

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 * col0 col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - 77 * col1 AS col2 FROM tab2
----
-1309
-2387
-4543

query I rowsort
SELECT + + col1 * + 11 * col0 FROM tab2 AS cor0
----
14773
2387
50622

query I rowsort
SELECT - cor0.col2 * + ( + col0 ) * + col2 AS col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT + - col1 + col2 * + col0 AS col2 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT - cor0.col2 * - ( col1 ) * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT col2 * - col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT col1 * tab1.col2 + + 0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL 79 FROM tab2
----
79
79
79

query I rowsort
SELECT DISTINCT - col1 + + col0 * + col2 AS col1 FROM tab0
----
-62
706
7207

query I rowsort
SELECT ALL + ( col2 ) + col2 * - 58 FROM tab1
----
-3078
-3249
-5472

query I rowsort
SELECT DISTINCT - col0 + - 65 * tab1.col2 AS col2 FROM tab1
----
-3513
-3769
-6320

query I rowsort
SELECT ALL ( col1 ) * col0 - + 30 FROM tab0 AS cor0
----
2034
3365
8069

query I rowsort
SELECT - ( col1 ) + + col0 AS col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT col1 + col2 * - 94 - ( + cor0.col2 + col2 ) * + ( col1 + cor0.col2 ) AS col2 FROM tab1 AS cor0
----
-12986
-13690
-29939

query I rowsort
SELECT DISTINCT + 30 - - col2 * ( + 36 ) FROM tab2 AS cor0
----
1002
1398
966

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 9a402ad2669465fb284445c499a48f2c

query I rowsort
SELECT DISTINCT - col2 * col0 - col0 AS col0 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT ALL 36 FROM tab1 cor0
----
36
36
36

query I rowsort
SELECT + col1 * - col1 + + col0 * 40 AS col1 FROM tab0 AS cor0
----
-4721
-6436
-8009

query I rowsort
SELECT DISTINCT - col2 * - col2 - cor0.col1 AS col1 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT - col1 * + col0 + ( + col0 ) FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT 81 AS col2 FROM tab2, tab2 AS cor0, tab2 cor1
----
81

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab0 cor1, tab1 AS cor2
----
972 values hashing to 0a9194f200a4220e419d35c461f9fcfe

query I rowsort
SELECT - col1 * 71 FROM tab1 cor0
----
-1846
-710
-923

onlyif mysql # use DIV operator for integer division
query I rowsort label-3580
SELECT ALL col1 DIV - col1 + + cor0.col1 * + col2 FROM tab0 AS cor0
----
2837
7461
96

skipif mysql # not compatible
query I rowsort label-3580
SELECT ALL col1 / - col1 + + cor0.col1 * + col2 FROM tab0 AS cor0
----
2837
7461
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3581
SELECT + col1 * 42 DIV cor0.col1 AS col2 FROM tab0 AS cor0
----
42
42
42

skipif mysql # not compatible
query I rowsort label-3581
SELECT + col1 * 42 / cor0.col1 AS col2 FROM tab0 AS cor0
----
42
42
42

query I rowsort
SELECT DISTINCT - + col0 + + col0 * + cor0.col0 AS col0 FROM tab0 cor0
----
1190
552
7832

query I rowsort
SELECT - 47 FROM tab0, tab1 AS cor0
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

onlyif mysql # use DIV operator for integer division
query I rowsort label-3584
SELECT DISTINCT - col0 DIV 62 AS col1 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-3584
SELECT DISTINCT - col0 / 62 AS col1 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT ALL + col1 + - 76 * 86 FROM tab2 AS cor0
----
-6477
-6505
-6519

query I rowsort
SELECT + + col0 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 * + cor0.col1 - + cor0.col0 col1 FROM tab1 cor0
----
1297
436
570

query I rowsort
SELECT - col2 * - ( 0 + + col2 ) * col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT DISTINCT - tab0.col0 * col1 AS col1 FROM tab0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 53 col1 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

query I rowsort
SELECT DISTINCT col2 * 46 FROM tab2
----
1196
1242
1748

query I rowsort
SELECT ALL - cor0.col0 + 25 FROM tab1 AS cor0
----
-39
-55
22

query I rowsort
SELECT + + col1 + - col0 * + col0 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT + ( + cor0.col2 ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + ( + 88 ) * - col0 AS col1 FROM tab0 AS cor0
----
-2112
-3080
-7832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( 3 ) * col2 col2 FROM tab0 AS cor0
----
246
3
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 8 col0 FROM tab2 AS cor0
----
8

query I rowsort
SELECT - + col0 * - col2 - col0 * col0 AS col1 FROM tab0 AS cor0
----
-1190
-623
216

query I rowsort
SELECT + col2 + 21 FROM tab1
----
117
75
78

query I rowsort
SELECT col0 * - col1 * col1 FROM tab0
----
-177504
-329315
-737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-3601
SELECT DISTINCT - col0 DIV - ( col0 ) AS col0 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-3601
SELECT DISTINCT - col0 / - ( col0 ) AS col0 FROM tab2
----
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3602
SELECT ALL - CAST( + col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-3602
SELECT ALL - CAST ( + col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3603
SELECT DISTINCT - 85 DIV + col2 + - col0 AS col2 FROM tab0 AS cor0
----
-120
-26
-90

skipif mysql # not compatible
query I rowsort label-3603
SELECT DISTINCT - 85 / + col2 + - col0 AS col2 FROM tab0 AS cor0
----
-120
-26
-90

query I rowsort
SELECT DISTINCT - + 66 + + col0 * + cor0.col0 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-44
5992
6137

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3605
SELECT ALL ( - 17 ) + - col1 * CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
-306
-3498
-978

skipif mysql # not compatible
query I rowsort label-3605
SELECT ALL ( - 17 ) + - col1 * CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
-306
-3498
-978

query I rowsort
SELECT + - ( + col1 ) + - col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT - 57 AS col2 FROM tab0 AS cor0
----
-57

query I rowsort
SELECT DISTINCT + 22 FROM tab0 AS cor0
----
22

query I rowsort
SELECT - 62 + col2 FROM tab0 AS cor0
----
-29
-61
20

query I rowsort
SELECT DISTINCT - + 14 * col1 FROM tab2 AS cor0
----
-238
-434
-826

query I rowsort
SELECT ALL 47 * + 19 AS col2 FROM tab0 cor0
----
893
893
893

query I rowsort
SELECT col2 + + col0 * col0 AS col0 FROM tab2
----
6110
6279
76

query I rowsort
SELECT ALL + tab1.col2 + col2 + col2 AS col1 FROM tab1
----
162
171
288

query I rowsort
SELECT DISTINCT tab1.col2 - col1 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL + col1 - - col1 FROM tab2
----
118
34
62

query I rowsort
SELECT + 16 + + col2 AS col2 FROM tab0 AS cor0
----
17
49
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + ( + col2 ) col0 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3618
SELECT DISTINCT - CAST( NULL AS SIGNED ) + - col1 AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-3618
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + - col1 AS col0 FROM tab1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3619
SELECT DISTINCT + CAST( + col2 AS SIGNED ) + - col0 FROM tab1
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-3619
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) + - col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT - 30 + + col1 AS col0 FROM tab0
----
56
61
67

query I rowsort
SELECT ALL cor0.col1 * - col1 + - 22 AS col2 FROM tab2 AS cor0
----
-311
-3503
-983

query I rowsort
SELECT DISTINCT col1 * - ( + 67 ) AS col2 FROM tab2 AS cor0
----
-1139
-2077
-3953

query I rowsort
SELECT ALL cor0.col0 * - ( - cor0.col2 ) * - col1 + + col2 AS col1 FROM tab0 AS cor0
----
-3394
-664036
-68079

query I rowsort
SELECT DISTINCT - tab0.col0 AS col2 FROM tab0, tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + 28 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

query I rowsort
SELECT ALL tab0.col1 + + col1 FROM tab0
----
172
182
194

query I rowsort
SELECT + 96 - - col1 FROM tab2
----
113
127
155

query I rowsort
SELECT DISTINCT ( - col1 ) * - col0 FROM tab0
----
2064
3395
8099

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to a8d2ba8b8eb568b0a9a1771ccb0a8f23

query I rowsort
SELECT 59 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT DISTINCT + + col0 + - 51 + 39 * - col0 AS col0 FROM tab2 AS cor0
----
-3015
-3053
-317

query I rowsort
SELECT ALL - col0 * 47 * - 78 AS col1 FROM tab2 AS cor0
----
25662
285948
289614

query I rowsort
SELECT 43 FROM tab0, tab2 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT DISTINCT 85 FROM tab0, tab1 cor0, tab2, tab2 AS cor1
----
85

query I rowsort
SELECT ALL - cor0.col2 + 15 AS col2 FROM tab2 cor0
----
-11
-12
-23

query I rowsort
SELECT col0 * col0 AS col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - + col2 * 28 - + cor0.col2 FROM tab2 AS cor0
----
-1102
-754
-783

query I rowsort
SELECT ALL - cor0.col2 + 78 AS col1 FROM tab0 AS cor0
----
-4
45
77

query I rowsort
SELECT DISTINCT - col2 * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col2 * 94 AS col2 FROM tab2 cor0
----
2444
2538
3572

query I rowsort
SELECT ALL - col0 + ( - col2 ) * + col1 * + col2 AS col1 FROM tab0 AS cor0
----
-132
-611973
-93678

query I rowsort
SELECT - + cor0.col0 * - ( col2 ) + col1 AS col1 FROM tab2 cor0
----
2087
220
3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3643
SELECT ALL - col1 * CAST( - cor0.col0 AS SIGNED ) col0 FROM tab1 cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3643
SELECT ALL - col1 * CAST ( - cor0.col0 AS INTEGER ) col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + + col2 + - col2 AS col0 FROM tab0 cor0
----
0

query I rowsort
SELECT DISTINCT col2 * + 74 + col2 * + col2 FROM tab2 AS cor0
----
2600
2727
4256

query I rowsort
SELECT ALL - col2 * - 77 + cor0.col0 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
2268
4030
5928

query I rowsort
SELECT DISTINCT - col0 * ( + col2 ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - col0 * - 19 + col1 + + col0 AS col1 FROM tab0 AS cor0
----
1871
566
797

query I rowsort
SELECT ALL + + cor0.col2 - + 97 * col2 AS col2 FROM tab1 AS cor0
----
-5184
-5472
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + cor0.col2 * + 40 col2 FROM tab2 AS cor0
----
1073
1441
962

query I rowsort
SELECT DISTINCT + 98 AS col0 FROM tab2
----
98

query I rowsort
SELECT - cor0.col2 * - col1 * - col1 AS col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT DISTINCT + col1 * col1 AS col2 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + cor0.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT 92 * col0 FROM tab1 AS cor0
----
276
5888
7360

query I rowsort
SELECT + ( col2 ) * + 56 AS col2 FROM tab0 AS cor0
----
1848
4592
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-3657
SELECT + + cor0.col0 + col1 DIV + col0 AS col0 FROM tab2 AS cor0
----
11
78
79

skipif mysql # not compatible
query I rowsort label-3657
SELECT + + cor0.col0 + col1 / + col0 AS col0 FROM tab2 AS cor0
----
11
78
79

query I rowsort
SELECT - col2 * cor0.col1 + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT - + col0 + - 88 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-623
-6942
-7031

query I rowsort
SELECT - + col0 * col1 + - cor0.col0 + - col0 * col0 * - col2 AS col0 FROM tab1 cor0
----
232768
405
613280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 68 col1 FROM tab2 AS cor0
----
-476
-5304
-5372

query I rowsort
SELECT col1 - ( + ( col0 ) ) * cor0.col1 FROM tab0 cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + - col1 * + col1 + 10 AS col0 FROM tab1 AS cor0
----
-159
-666
-90

query I rowsort
SELECT + + col0 * + ( col2 ) - col0 * + 96 AS col0 FROM tab0 AS cor0
----
-1246
-1512
-3325

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 82 * - col0 * + col2 col2 FROM tab0 AS cor0
----
2870
598436
64944

query I rowsort
SELECT DISTINCT + 47 AS col0 FROM tab1 AS cor0
----
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 14 col1 FROM tab2 AS cor0
----
-14

query I rowsort
SELECT ALL + 95 * 53 + col2 AS col1 FROM tab1 AS cor0
----
5089
5092
5131

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3669
SELECT ALL - + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3669
SELECT ALL - + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col1 + cor0.col1 * + col0 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL + - 47 AS col1 FROM tab0 AS cor0
----
-47
-47
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 37 col0 FROM tab1 cor0
----
-37
-37
-37

query I rowsort
SELECT + + col0 + col2 * + col2 AS col0 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT ALL - ( + cor0.col2 ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + 70 * - 13 AS col0 FROM tab0 AS cor0
----
-910
-910
-910

query I rowsort
SELECT ( cor0.col2 ) * + col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - + cor0.col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT + - col2 + + col2 * col2 + + col1 FROM tab1 AS cor0
----
2888
3202
9133

query I rowsort
SELECT DISTINCT - col0 + 94 AS col0 FROM tab0
----
5
59
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - - 11 col1 FROM tab2
----
28
42
70

query I rowsort
SELECT ALL + tab0.col0 * 87 + ( tab0.col2 * col2 ) FROM tab0
----
14467
3046
3177

onlyif mysql # use DIV operator for integer division
query I rowsort label-3682
SELECT col0 + 65 DIV + col0 AS col2 FROM tab2 AS cor0
----
16
78
79

skipif mysql # not compatible
query I rowsort label-3682
SELECT col0 + 65 / + col0 AS col2 FROM tab2 AS cor0
----
16
78
79

query I rowsort
SELECT + 42 FROM tab0 AS cor0
----
42
42
42

query I rowsort
SELECT ALL col1 * + 50 + + tab2.col2 * col2 AS col2 FROM tab2
----
2279
2294
3626

query I rowsort
SELECT ALL col0 * tab0.col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT ALL - col2 * cor0.col0 + + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT - 29 FROM tab2 AS cor0
----
-29

query I rowsort
SELECT - ( - 42 ) * col0 + + col0 AS col2 FROM tab0
----
1032
1505
3827

query I rowsort
SELECT DISTINCT + 59 + + col2 AS col1 FROM tab0 AS cor0
----
141
60
92

query I rowsort
SELECT - 42 * col0 FROM tab1 AS cor0
----
-126
-2688
-3360

query I rowsort
SELECT ALL col2 + + col0 AS col0 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3692
SELECT + col2 * col2 DIV col1 FROM tab0 AS cor0
----
0
12
73

skipif mysql # not compatible
query I rowsort label-3692
SELECT + col2 * col2 / col1 FROM tab0 AS cor0
----
0
12
73

query I rowsort
SELECT ALL 16 AS col1 FROM tab2
----
16
16
16

query I rowsort
SELECT + ( col1 + - col1 ) * tab2.col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3695
SELECT 11 DIV + col1 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3695
SELECT 11 / + col1 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 57 FROM tab0 cor0
----
57
57
57

query I rowsort
SELECT + 68 AS col2 FROM tab0 AS cor0
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 69 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT + cor0.col1 * + tab2.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 2dce99ccc9ab3f12533423eaad01995c

query I rowsort
SELECT + 61 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT - cor0.col2 - + col2 AS col1 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT ALL + col2 * col0 + col0 * col2 FROM tab1 AS cor0
----
15360
324
7296

onlyif mysql # use DIV operator for integer division
query I rowsort label-3703
SELECT col1 + - 40 DIV - 33 + col0 AS col0 FROM tab0 AS cor0
----
111
133
181

skipif mysql # not compatible
query I rowsort label-3703
SELECT col1 + - 40 / - 33 + col0 AS col0 FROM tab0 AS cor0
----
111
133
181

query I rowsort
SELECT cor0.col2 * 42 + - col1 * - col1 FROM tab2 AS cor0
----
1885
2095
4573

query I rowsort
SELECT - col0 + - 77 AS col0 FROM tab2 AS cor0
----
-155
-156
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3706
SELECT - - CAST( col1 AS SIGNED ) + col2 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-3706
SELECT - - CAST ( col1 AS INTEGER ) + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab0, tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + tab2.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + ( col0 ) * cor0.col0 + ( 97 ) FROM tab1 AS cor0
----
106
4193
6497

query I rowsort
SELECT DISTINCT - 43 + + col1 AS col1 FROM tab0
----
43
48
54

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab1 AS cor1, tab1 cor2
----
972 values hashing to ed80235f6457dada5cbb50ce9e2a8923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3712
SELECT - 19 * - col1 + - col2 * + CAST( NULL AS SIGNED ) + - 25 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3712
SELECT - 19 * - col1 + - col2 * + CAST ( NULL AS INTEGER ) + - 25 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 15 + col2 FROM tab0 AS cor0
----
16
48
97

query I rowsort
SELECT + col2 + - col0 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT - cor0.col0 * + cor0.col2 * 12 FROM tab0, tab2 AS cor0
----
9 values hashing to 290e54ae4d6d63eb075fb3a175fd60e0

query I rowsort
SELECT ALL ( tab1.col0 ) * - tab1.col1 AS col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3718
SELECT DISTINCT + tab1.col0 + + CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3718
SELECT DISTINCT + tab1.col0 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3719
SELECT + col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3719
SELECT + col2 + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT tab1.col0 + + 11 AS col0 FROM tab1
----
14
75
91

query I rowsort
SELECT col0 - ( + col1 ) * col0 AS col2 FROM tab1
----
-576
-75
-960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3722
SELECT col2 + + CAST( 40 AS SIGNED ) FROM tab1
----
136
94
97

skipif mysql # not compatible
query I rowsort label-3722
SELECT col2 + + CAST ( 40 AS INTEGER ) FROM tab1
----
136
94
97

query I rowsort
SELECT ALL col0 + ( col1 ) FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3724
SELECT DISTINCT + col0 + col2 DIV col1 col0 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3724
SELECT DISTINCT + col0 + col2 / col1 col0 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + - 16 col2 FROM tab1 cor0
----
38
41
80

query I rowsort
SELECT 0 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT - col2 * ( 52 ) FROM tab0 cor0
----
-1716
-4264
-52

query I rowsort
SELECT ALL - col1 + - ( col1 ) AS col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT + + col0 + - cor0.col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT col0 * - col0 - + 19 * col0 AS col0 FROM tab2 AS cor0
----
-182
-7566
-7742

query I rowsort
SELECT ALL - + col0 * 85 + ( + col0 ) FROM tab1 AS cor0
----
-252
-5376
-6720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * - col1 * + col2 col2 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT ALL - col2 + - col1 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-3734
SELECT DISTINCT col0 DIV - cor0.col2 - col2 FROM tab0 cor0
----
-33
-36
-83

skipif mysql # not compatible
query I rowsort label-3734
SELECT DISTINCT col0 / - cor0.col2 - col2 FROM tab0 cor0
----
-33
-36
-83

query I rowsort
SELECT ALL cor0.col1 * col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + col1 - cor0.col2 FROM tab2 AS cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 32 col0 FROM tab1
----
-32

query I rowsort
SELECT col0 * 86 - + col0 FROM tab1
----
255
5440
6800

query I rowsort
SELECT + cor1.col2 * 99 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1, tab1, tab0 cor2
----
243 values hashing to d971614ab80d6d461341c9d40bd0f501

query I rowsort
SELECT + 86 + - ( col2 ) FROM tab1
----
-10
29
32

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab1 AS cor0, tab1 AS cor1
----
972 values hashing to cee640567b2a4ba7d97109d5025bf4d9

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3743
SELECT + CAST( NULL AS SIGNED ) - - col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3743
SELECT + CAST ( NULL AS INTEGER ) - - col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3745
SELECT + cor0.col0 DIV - col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3745
SELECT + cor0.col0 / - col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + - col2 AS col1 FROM tab1 cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 41 col0 FROM tab0 AS cor0
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + col1 col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - + cor0.col1 * cor0.col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col0 * + col0 + - 80 AS col2 FROM tab0 AS cor0
----
-1305
-656
-8001

query I rowsort
SELECT ALL - + 33 FROM tab1 AS cor0
----
-33
-33
-33

query I rowsort
SELECT 69 FROM tab1 AS cor0
----
69
69
69

query I rowsort
SELECT + 60 FROM tab0 AS cor0
----
60
60
60

query I rowsort
SELECT DISTINCT 29 AS col0 FROM tab2
----
29

query I rowsort
SELECT DISTINCT col2 + - col0 AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT col1 * + col0 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL - col2 + - col1 * ( + col2 ) AS col2 FROM tab0 cor0
----
-2871
-7544
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 + + col2 col2 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3759
SELECT 60 DIV col1 AS col1 FROM tab1 AS cor0
----
2
4
6

skipif mysql # not compatible
query I rowsort label-3759
SELECT 60 / col1 AS col1 FROM tab1 AS cor0
----
2
4
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col0 col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT tab1.col2 * + 64 AS col0 FROM tab1, tab1 AS cor0
----
3456
3648
6144

query I rowsort
SELECT DISTINCT + col2 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL + col1 * cor0.col0 + + ( + col1 ) * - col2 FROM tab0 AS cor0
----
-774
3298
637

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 90 col0 FROM tab0 AS cor0
----
90
90
90

query I rowsort
SELECT ALL 58 AS col2 FROM tab1 cor0
----
58
58
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-3766
SELECT DISTINCT - col0 DIV - col0 + 62 + + col0 * col2 FROM tab0 AS cor0
----
7361
855
98

skipif mysql # not compatible
query I rowsort label-3766
SELECT DISTINCT - col0 / - col0 + 62 + + col0 * col2 FROM tab0 AS cor0
----
7361
855
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3767
SELECT + col2 * CAST( - col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-3767
SELECT + col2 * CAST ( - col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col2 * col0 + col1 * + col1 AS col0 FROM tab1 AS cor0
----
-3548
-7511
514

query I rowsort
SELECT DISTINCT - 40 * + col1 AS col0 FROM tab2
----
-1240
-2360
-680

query I rowsort
SELECT + col2 - + col2 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL + col0 + - col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT col2 * 35 FROM tab0 AS cor0
----
1155
2870
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-3773
SELECT ALL - col1 DIV + col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-3773
SELECT ALL - col1 / + col2 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT - col2 * + col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL 45 AS col0 FROM tab0
----
45
45
45

query I rowsort
SELECT col0 + + col2 AS col2 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3777
SELECT DISTINCT col1 DIV + col1 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-3777
SELECT DISTINCT col1 / + col1 FROM tab2
----
1

query I rowsort
SELECT - - 25 AS col0 FROM tab0 AS cor0
----
25
25
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * 57 col0 FROM tab2 AS cor0
----
-1767
-3363
-969

query I rowsort
SELECT DISTINCT ( 0 ) * cor0.col1 + 83 * - col1 * - col2 FROM tab2 AS cor0
----
127322
53618
69471

query I rowsort
SELECT ALL + col1 + + col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3782
SELECT ALL + CAST( 50 AS SIGNED ) + + col0 AS col2 FROM tab0 AS cor0
----
139
74
85

skipif mysql # not compatible
query I rowsort label-3782
SELECT ALL + CAST ( 50 AS INTEGER ) + + col0 AS col2 FROM tab0 AS cor0
----
139
74
85

query I rowsort
SELECT DISTINCT - 1 AS col1 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT + 80 + col2 FROM tab2 cor0
----
106
107
118

query I rowsort
SELECT ALL + + 99 + - col1 * - col2 FROM tab1 cor0
----
1347
1503
669

query I rowsort
SELECT DISTINCT 66 + - 80 AS col1 FROM tab2 AS cor0
----
-14

query I rowsort
SELECT - + 13 + + col2 * col0 AS col0 FROM tab0 AS cor0
----
22
7285
779

query I rowsort
SELECT ALL + 16 AS col0 FROM tab2 AS cor0
----
16
16
16

query I rowsort
SELECT DISTINCT + 64 + - col1 FROM tab2 AS cor0
----
33
47
5

query I rowsort
SELECT - 11 + + col0 FROM tab2 AS cor0
----
-4
67
68

query I rowsort
SELECT DISTINCT cor0.col1 * + 16 FROM tab1 cor0
----
160
208
416

query I rowsort
SELECT DISTINCT + col2 + col0 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT 84 FROM tab2 cor0
----
84
84
84

query I rowsort
SELECT ALL col0 + 36 AS col1 FROM tab2
----
114
115
43

query I rowsort
SELECT ALL col2 + + tab1.col2 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL - tab1.col0 * - col0 + col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT - col2 - 85 FROM tab0
----
-118
-167
-86

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + tab1.col1 col1 FROM tab1
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 71 * + col1 + col2 col2 FROM tab2
----
1245
2228
4215

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab1, tab0 AS cor1
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT - 76 FROM tab2 AS cor0
----
-76
-76
-76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3803
SELECT - + CAST( 86 AS SIGNED ) + + col2 * - col2 * col2 AS col2 FROM tab2 AS cor0
----
-17662
-19769
-54958

skipif mysql # not compatible
query I rowsort label-3803
SELECT - + CAST ( 86 AS INTEGER ) + + col2 * - col2 * col2 AS col2 FROM tab2 AS cor0
----
-17662
-19769
-54958

query I rowsort
SELECT DISTINCT - col1 + col1 * - col2 + + col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - + col1 + 6 FROM tab2 AS cor0
----
-11
-25
-53

query I rowsort
SELECT ALL - col1 + col1 * col2 AS col1 FROM tab1 AS cor0
----
1235
1378
560

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + cor0.col1 * cor0.col2 + col0 + + CAST ( - col1 AS REAL ) FROM tab2 AS cor0
----
1553
708
813

query I rowsort
SELECT - col1 + col2 + + col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL ( + col0 ) * - col0 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col2 col2 FROM tab2
----
-26
-27
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3811
SELECT CAST( NULL AS SIGNED ) / - 45 + - col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3811
SELECT CAST ( NULL AS INTEGER ) / - 45 + - col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * 56 AS col0 FROM tab0
----
1848
4592
56

query I rowsort
SELECT DISTINCT + + cor0.col2 FROM tab0, tab2, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT col0 + + tab2.col0 AS col1 FROM tab2
----
14
156
158

query I rowsort
SELECT ALL + - cor0.col0 AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col1 - ( col1 ) AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + - col0 * - ( + 1 ) + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT 87 FROM tab2, tab1 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT DISTINCT 17 * cor0.col1 + cor0.col1 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
1548
1638
1746

onlyif mysql # use DIV operator for integer division
query I rowsort label-3820
SELECT ALL + - 46 DIV col0 + + col0 DIV col2 + - col1 FROM tab0 AS cor0
----
-63
-87
-90

skipif mysql # not compatible
query I rowsort label-3820
SELECT ALL + - 46 / col0 + + col0 / col2 + - col1 FROM tab0 AS cor0
----
-63
-87
-90

query I rowsort
SELECT ALL 53 FROM tab1
----
53
53
53

query I rowsort
SELECT - 53 FROM tab0 cor0
----
-53
-53
-53

query I rowsort
SELECT ALL - 36 - + 45 FROM tab0 AS cor0
----
-81
-81
-81

query I rowsort
SELECT + 75 AS col1 FROM tab2 cor0
----
75
75
75

query I rowsort
SELECT DISTINCT + 36 + 34 AS col2 FROM tab1 AS cor0
----
70

query I rowsort
SELECT 95 * col2 FROM tab1 cor0
----
5130
5415
9120

query I rowsort
SELECT + cor0.col0 + + col2 * cor0.col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT 5 FROM tab1, tab0 AS cor0, tab1 cor1
----
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3829
SELECT CAST( - col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-3829
SELECT CAST ( - col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - - ( 8 ) FROM tab1 AS cor0
----
8
8
8

query I rowsort
SELECT 5 + cor0.col0 * - col2 FROM tab2 AS cor0
----
-184
-2023
-2997

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * cor0.col2 col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col0 FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * col1 col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT col2 + cor0.col0 AS col2 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * cor0.col2 + col0 col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL ( - col2 ) FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT - col2 * - col0 + col1 * - col2 FROM tab1 AS cor0
----
-1242
3078
6432

query I rowsort
SELECT 58 + - col2 FROM tab2 AS cor0
----
20
31
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 + - cor0.col1 col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT + 33 + col0 FROM tab0 AS cor0
----
122
57
68

query I rowsort
SELECT + col0 + - col0 + ( - col2 ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT ( - col0 ) * col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - col0 + col2 + cor0.col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - ( - col0 ) + 5 * + col2 * + col0 FROM tab1 AS cor0
----
18304
38480
813

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3847
SELECT ALL col1 * col1 DIV 56 + col2 * + col0 AS col1 FROM tab2 AS cor0
----
206
2090
3007

skipif mysql # not compatible
query I rowsort label-3847
SELECT ALL col1 * col1 / 56 + col2 * + col0 AS col1 FROM tab2 AS cor0
----
206
2090
3007

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * + col1 col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3849
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3849
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3850
SELECT - col2 * - CAST( NULL AS SIGNED ) + + 11 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-3850
SELECT - col2 * - CAST ( NULL AS INTEGER ) + + 11 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to 591a9a93560839231c038a1e10bd240a

query I rowsort
SELECT col2 * - ( col1 ) * + cor0.col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT - + 66 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a408108d423d7784b7d610cb779e515a

query I rowsort
SELECT cor0.col2 * col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT col1 * 82 + - col2 AS col2 FROM tab0 AS cor0
----
7019
7380
7953

query I rowsort
SELECT + + col2 * col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col2 + tab2.col1 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT - col2 + ( - col0 ) * + col1 AS col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col2 col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + + col0 + + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT cor0.col1 + + 74 FROM tab0 AS cor0
----
160
165
171

query I rowsort
SELECT 74 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * 48 col0 FROM tab0 cor0
----
1584
3936
48

query I rowsort
SELECT ALL + col2 * col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT 70 + + cor0.col2 AS col2 FROM tab0, tab0 AS cor0
----
103
152
71

query I rowsort
SELECT DISTINCT - col0 * + col1 AS col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT col1 * + col2 + + col0 * + col2 * col0 AS col2 FROM tab2 AS cor0
----
159718
2160
237804

query I rowsort
SELECT + col0 + + col1 * + col1 AS col0 FROM tab0 AS cor0
----
7420
8370
9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3869
SELECT ALL CAST( col1 + - col1 AS SIGNED ) * + ( 44 ) FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3869
SELECT ALL CAST ( col1 + - col1 AS INTEGER ) * + ( 44 ) FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3870
SELECT ALL CAST( NULL AS SIGNED ) * col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3870
SELECT ALL CAST ( NULL AS INTEGER ) * col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + tab0.col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT + tab0.col1 * tab0.col2 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3873
SELECT + ( - col1 ) DIV + col0 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3873
SELECT + ( - col1 ) / + col0 FROM tab0
----
-1
-2
-3

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2, tab0 AS cor0, tab0 AS cor1
----
972 values hashing to d522b52b67b20888d3544d25cb98f232

onlyif mysql # use DIV operator for integer division
query I rowsort label-3875
SELECT DISTINCT 70 DIV col1 AS col0 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-3875
SELECT DISTINCT 70 / col1 AS col0 FROM tab1
----
2
5
7

query I rowsort
SELECT DISTINCT + ( col2 * col1 ) FROM tab2
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3877
SELECT + - col0 * - col2 + - CAST( NULL AS DECIMAL ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3877
SELECT + - col0 * - col2 + - CAST ( NULL AS REAL ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + ( col2 ) + col2 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 51 * col1 + + 65 AS col1 FROM tab0 cor0
----
-4321
-4576
-4882

query I rowsort
SELECT ALL - 80 * - col0 FROM tab1 AS cor0
----
240
5120
6400

query I rowsort
SELECT + 33 + col2 FROM tab2 AS cor0
----
59
60
71

query I rowsort
SELECT ( col1 ) * - cor0.col2 * col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT + cor0.col0 * col0 * + ( - col2 * - cor0.col2 ) AS col1 FROM tab1 cor0
----
13307904
26244
58982400

query I rowsort
SELECT DISTINCT - col1 * + col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT + 23 FROM tab1 AS cor0
----
23

query I rowsort
SELECT - 0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 67 + - col2 AS col0 FROM tab0 AS cor0
----
-15
34
66

query I rowsort
SELECT - col2 * - col2 * col0 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT ALL + + ( col1 ) * cor0.col2 * + col0 AS col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT - col0 * cor0.col0 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT - col2 + col1 * - cor0.col2 AS col0 FROM tab1 cor0
----
-1344
-1458
-627

query I rowsort
SELECT DISTINCT + ( col1 ) + ( - col1 ) FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT ( tab1.col2 ) FROM tab1, tab2 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - - col0 + col0 AS col2 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT - + col0 + + col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL 9 * - col1 + + 73 * - 2 FROM tab1 AS cor0
----
-236
-263
-380

query I rowsort
SELECT DISTINCT + col0 + - cor0.col2 * + col1 * - col0 FROM tab2 AS cor0
----
119730
51113
5866

query I rowsort
SELECT 4 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT ALL 9 AS col1 FROM tab2
----
9
9
9

query I rowsort
SELECT ALL 1 * - col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT - cor0.col1 - col2 FROM tab2 cor0
----
-55
-58
-85

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to db9b93cf4fdd5de4106f0487a66ce0a5

query I rowsort
SELECT ALL ( + 79 ) AS col0 FROM tab0 AS cor0
----
79
79
79

query I rowsort
SELECT col2 + + 75 + - col0 FROM tab2 AS cor0
----
23
34
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-3905
SELECT DISTINCT 35 DIV col1 + - cor0.col2 + - col0 FROM tab0 cor0
----
-171
-36
-57

skipif mysql # not compatible
query I rowsort label-3905
SELECT DISTINCT 35 / col1 + - cor0.col2 + - col0 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + - col1 * + ( col1 ) FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - + 86 FROM tab2 AS cor0
----
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * col1 + - col0 col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT + 13 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT col0 + ( - col2 ) AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT col0 - + col2 AS col1 FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT + col2 * 34 + col2 AS col0 FROM tab1
----
1890
1995
3360

query I rowsort
SELECT - 95 + 74 FROM tab1
----
-21
-21
-21

query I rowsort
SELECT col1 * - col2 + + col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT ALL - 3 AS col0 FROM tab1
----
-3
-3
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - 35 * col0 col2 FROM tab0
----
-1322
-3206
-926

query I rowsort
SELECT col1 + + 90 FROM tab1
----
100
103
116

query I rowsort
SELECT + 94 + - col1 FROM tab1 AS cor0
----
68
81
84

query I rowsort
SELECT ALL 50 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 6932c991110d256d3f92f3e9538f8040

query I rowsort
SELECT ALL cor0.col0 * 63 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 6fd2a3a13acfe73cd5112ba775ef74bd

query I rowsort
SELECT cor0.col1 * col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + + 93 FROM tab0 cor0
----
93
93
93

query I rowsort
SELECT - col1 + - cor0.col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT ALL ( - 57 ) + col0 FROM tab1
----
-54
23
7

query I rowsort
SELECT ALL 99 FROM tab1 AS cor0
----
99
99
99

query I rowsort
SELECT - + 62 AS col1 FROM tab2 AS cor0
----
-62
-62
-62

query I rowsort
SELECT + - col0 * - 47 + col0 + - ( + col0 ) FROM tab1 AS cor0
----
141
3008
3760

query I rowsort
SELECT ALL col2 + 32 FROM tab2 AS cor0
----
58
59
70

query I rowsort
SELECT DISTINCT + 66 FROM tab2 cor0
----
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3932
SELECT DISTINCT + col0 DIV + col0 col2 FROM tab0 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3932
SELECT DISTINCT + col0 / + col0 col2 FROM tab0 AS cor0
----
1

query I rowsort
SELECT - - col2 + - col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 41 FROM tab2 AS cor0
----
41

query I rowsort
SELECT - cor0.col0 * col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col2 * - 36 FROM tab2
----
1368
936
972

query I rowsort
SELECT DISTINCT + col2 * col0 + 53 FROM tab1 AS cor0
----
215
3701
7733

query I rowsort
SELECT - + 83 + + col1 FROM tab0 AS cor0
----
14
3
8

query I rowsort
SELECT DISTINCT - 32 + cor0.col1 AS col2 FROM tab1 AS cor0
----
-19
-22
-6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3940
SELECT ALL + - 42 * col0 - CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3940
SELECT ALL + - 42 * col0 - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab2.col2 * 64 + cor0.col2 FROM tab2, tab1, tab0 AS cor0, tab0
----
9 values hashing to 8f59298462fcf8bcaf4da58d63f774a1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 76 col1 FROM tab2 AS cor0
----
-76
-76
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * col0 col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3944
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3944
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 71 * col2 AS col0 FROM tab0 AS cor0
----
2343
5822
71

query I rowsort
SELECT ALL - col0 * 97 AS col2 FROM tab1 AS cor0
----
-291
-6208
-7760

query I rowsort
SELECT tab1.col2 * col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + 75 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to e61b59795204c348103a58c0a8e4ce16

query I rowsort
SELECT col0 * col0 * - 59 + col2 AS col1 FROM tab1 cor0
----
-241607
-377504
-477

query I rowsort
SELECT - 97 * + cor0.col1 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 23b5686a3c43d836adc700132098e223

query I rowsort
SELECT ALL col1 + + col0 FROM tab1
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3952
SELECT col2 + CAST( col0 AS SIGNED ) * col1 AS col1 FROM tab1
----
1136
132
697

skipif mysql # not compatible
query I rowsort label-3952
SELECT col2 + CAST ( col0 AS INTEGER ) * col1 AS col1 FROM tab1
----
1136
132
697

query I rowsort
SELECT col1 * + col2 * + 49 + col0 * 27 + - col1 FROM tab2
----
33770
41171
77213

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1, tab1 AS cor0, tab0 AS cor1
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

query I rowsort
SELECT ALL - col2 * col0 * + 66 AS col0 FROM tab2 AS cor0
----
-12474
-133848
-198132

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab0 cor1, tab1 AS cor2
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

query I rowsort
SELECT + col1 * + cor0.col1 + - col2 + col0 FROM tab1 cor0
----
107
153
625

query I rowsort
SELECT DISTINCT - + col2 * 33 FROM tab0 AS cor0
----
-1089
-2706
-33

query I rowsort
SELECT ALL + cor0.col1 FROM tab0, tab0 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ( 34 ) + - cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 4bc27bb05e493fa7146dcced94ce1ab1

query I rowsort
SELECT col2 + - col2 * + col1 + col0 FROM tab0 AS cor0
----
-2781
-61
-7291

onlyif mysql # use DIV operator for integer division
query I rowsort label-3962
SELECT - col2 DIV + col0 + + col2 * + col1 + + 85 AS col2 FROM tab1 AS cor0
----
1332
1471
655

skipif mysql # not compatible
query I rowsort label-3962
SELECT - col2 / + col0 + + col2 * + col1 + + 85 AS col2 FROM tab1 AS cor0
----
1332
1471
655

query I rowsort
SELECT DISTINCT - cor0.col0 * col1 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3964
SELECT DISTINCT - col2 * col2 DIV + col1 FROM tab2 AS cor0
----
-11
-23
-84

skipif mysql # not compatible
query I rowsort label-3964
SELECT DISTINCT - col2 * col2 / + col1 FROM tab2 AS cor0
----
-11
-23
-84

query I rowsort
SELECT ALL - - col1 * cor0.col2 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 - col0 col2 FROM tab2 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3967
SELECT - ( 45 ) + col2 * col2 DIV - col2 AS col0 FROM tab0 AS cor0
----
-127
-46
-78

skipif mysql # not compatible
query I rowsort label-3967
SELECT - ( 45 ) + col2 * col2 / - col2 AS col0 FROM tab0 AS cor0
----
-127
-46
-78

query I rowsort
SELECT ALL - - col0 + + ( col2 * + col2 ) AS col1 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ALL - + 63 FROM tab0 AS cor0
----
-63
-63
-63

query I rowsort
SELECT - + 55 + ( col2 * + col1 ) AS col2 FROM tab2 AS cor0
----
1479
591
782

query I rowsort
SELECT DISTINCT col0 * col2 + - col1 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT 57 * 20 + col0 FROM tab0 cor0
----
1164
1175
1229

query I rowsort
SELECT DISTINCT + + ( col1 ) * cor0.col0 + - ( col1 ) FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT ALL - - 11 + col2 AS col1 FROM tab1 AS cor0
----
107
65
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3975
SELECT ALL - CAST( col2 AS SIGNED ) + + col2 col0 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3975
SELECT ALL - CAST ( col2 AS INTEGER ) + + col2 col0 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col1 ) * - col0 * - 63 + col2 - - cor0.col0 col0 FROM tab2 cor0
----
-13637
-289822
-84492

query I rowsort
SELECT ALL + 81 * + col0 + col0 FROM tab0 AS cor0
----
1968
2870
7298

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col1 ) * col2 + 67 * + cor0.col2 col0 FROM tab2 AS cor0
----
2646
3192
3276

query I rowsort
SELECT DISTINCT - ( - col2 ) - + col1 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3980
SELECT ALL col2 + tab1.col0 * col0 DIV + tab1.col1 FROM tab1
----
466
54
588

skipif mysql # not compatible
query I rowsort label-3980
SELECT ALL col2 + tab1.col0 * col0 / + tab1.col1 FROM tab1
----
466
54
588

query I rowsort
SELECT tab1.col2 * 29 + 57 + col0 FROM tab1
----
1626
1774
2921

query I rowsort
SELECT ALL - col1 + + ( + col2 ) AS col2 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT + col0 + 78 FROM tab1
----
142
158
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 36 col2 FROM tab2
----
-252
-2808
-2844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + cor0.col0 col1 FROM tab0 AS cor0
----
35
7298
792

query III rowsort
SELECT * FROM tab1 WHERE NULL NOT BETWEEN NULL AND col2
----

query I rowsort
SELECT - col2 * - col1 + - tab2.col1 FROM tab2
----
1475
629
806

query I rowsort
SELECT ALL col2 + - col1 * col0 AS col0 FROM tab0
----
-2031
-3394
-8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + - col2 col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT col2 + + col1 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT - col1 + - col2 * - col2 * - col0 FROM tab1
----
-207946
-737293
-8774

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col0 col0 FROM tab1
----
128
160
6

query I rowsort
SELECT DISTINCT col2 * col0 + col1 + col0 AS col2 FROM tab1 cor0
----
191
3722
7773

query I rowsort
SELECT DISTINCT col2 + + col1 * tab0.col2 AS col2 FROM tab0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 * - tab1.col2 + + col0 * tab1.col2 col1 FROM tab1
----
15360
324
7296

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT col1 * + col0 NOT IN ( col0 - col0 * + col1 * - col1 )
----

query I rowsort
SELECT ALL col0 + + col1 * + col2 FROM tab2
----
1612
725
844

query I rowsort
SELECT + col2 * + col2 FROM tab0 WHERE + col1 / col1 NOT IN ( col1 )
----
1
1089
6724

query I rowsort
SELECT ALL - col1 + tab0.col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col1 * + col2 + + col1 FROM tab1
----
1261
1430
580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT ALL col2 * - col0 + - col2 * + col1 FROM tab2
----
-1026
-3562
-3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-4003
SELECT ALL - col1 DIV col0 AS col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-4003
SELECT ALL - col1 / col0 AS col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT DISTINCT + - col2 + + col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL - col0 + + tab1.col2 AS col1 FROM tab1
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-4006
SELECT col1 * + col2 DIV - col2 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-4006
SELECT col1 * + col2 / - col2 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT col0 + col2 * col0 AS col1 FROM tab0
----
70
7387
816

query I rowsort
SELECT ALL col2 * - col2 + col0 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT + col1 * + col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col2 + col1 * col1 FROM tab1 AS cor0
----
-1079
-470
-728

query I rowsort
SELECT ALL - col0 + + cor0.col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 * + col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query III rowsort
SELECT * FROM tab0 WHERE NOT col0 * - col2 * - col1 < + col0
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT DISTINCT + col2 / + col2 FROM tab0 WHERE + col2 + - col2 BETWEEN col2 * + col2 AND ( - col1 )
----

query I rowsort
SELECT col1 * + col1 + - col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT + + col0 * col2 + - cor0.col0 * col1 AS col0 FROM tab1 AS cor0
----
3008
6640
84

query I rowsort
SELECT ALL col1 * col1 + cor0.col1 FROM tab2 cor0
----
306
3540
992

query I rowsort
SELECT + cor0.col1 - col2 * + col2 AS col0 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT col2 - + cor0.col0 * - col0 AS col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT + col2 * col2 + col0 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT + 58 FROM tab0
----
58
58
58

query I rowsort
SELECT ALL col0 - col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2, tab1, tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT ALL 57 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 220a93709e207779b34ef74b544764a5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4025
SELECT - col1 DIV - col0 AS col1 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4025
SELECT - col1 / - col0 AS col1 FROM tab0
----
1
2
3

query I rowsort
SELECT - + ( col2 ) * col0 + + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4027
SELECT - - col2 + CAST( NULL AS SIGNED ) * + ( - col2 * + ( - col0 ) ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4027
SELECT - - col2 + CAST ( NULL AS INTEGER ) * + ( - col2 * + ( - col0 ) ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col1 * - 7 AS col2 FROM tab0 AS cor0
----
602
637
679

query I rowsort
SELECT + col2 + col2 * col0 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4030
SELECT cor0.col2 * + CAST( NULL AS SIGNED ) + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4030
SELECT cor0.col2 * + CAST ( NULL AS INTEGER ) + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 - + ( - col0 ) FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4032
SELECT ALL + col2 DIV 60 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4032
SELECT ALL + col2 / 60 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT col1 * col1 * tab1.col2 AS col0 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT DISTINCT - 48 AS col2 FROM tab0
----
-48

query I rowsort
SELECT col1 * col0 - col0 FROM tab2 AS cor0
----
1264
210
4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - ( - 91 ) + + cor0.col1 col1 FROM tab2 AS cor0
----
-1530
-2790
-5310

onlyif mysql # use DIV operator for integer division
query I rowsort label-4037
SELECT ALL col2 - ( + 85 ) DIV + col0 AS col0 FROM tab2 cor0
----
15
25
37

skipif mysql # not compatible
query I rowsort label-4037
SELECT ALL col2 - ( + 85 ) / + col0 AS col0 FROM tab2 cor0
----
15
25
37

query III rowsort
SELECT * FROM tab2 WHERE NOT col2 < NULL
----

query III rowsort
SELECT ALL * FROM tab0 WHERE col0 * - col0 <= NULL
----

query I rowsort
SELECT ALL col1 + col0 * col0 AS col1 FROM tab2
----
6143
6258
80

query I rowsort
SELECT - col0 * - tab0.col0 AS col2 FROM tab0
----
1225
576
7921

query I rowsort
SELECT col0 * - tab1.col0 AS col1 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT - col2 + tab0.col0 * col1 FROM tab0
----
2031
3394
8017

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL NOT IN ( col1 + - col2 - + col0 )
----

query I rowsort
SELECT ALL + col0 + col0 FROM tab0
----
178
48
70

query I rowsort
SELECT col1 AS col2 FROM tab2 WHERE NULL NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) NOT BETWEEN + col2 AND NULL
----

query I rowsort
SELECT ALL - col0 * + col2 * col0 + + col2 FROM tab1
----
-233415
-432
-614304

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 + col0 col0 FROM tab2
----
17
31
59

query III rowsort
SELECT * FROM tab0 WHERE col2 <= + col1
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT DISTINCT col0 * tab0.col2 + col0 AS col0 FROM tab0
----
70
7387
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + tab1.col2 col1 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT + - 93 + + col0 * 74 * col2 FROM tab2 AS cor0
----
13893
149979
222055

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT + tab0.col2 * - tab0.col1 FROM tab0 WHERE NOT ( + col2 * + col2 * col1 ) BETWEEN col1 * tab0.col0 AND NULL
----
-97

query I rowsort
SELECT DISTINCT col0 + tab1.col0 AS col0 FROM tab1
----
128
160
6

query I rowsort
SELECT col2 / col0 AS col0 FROM tab2 WHERE col0 * + col2 = col1
----

query I rowsort
SELECT cor0.col2 * 42 AS col2 FROM tab1 AS cor0
----
2268
2394
4032

query I rowsort
SELECT ALL + + col1 + 42 * - col1 FROM tab0 cor0
----
-3526
-3731
-3977

query I rowsort
SELECT + col2 * - 51 AS col0 FROM tab2 AS cor0
----
-1326
-1377
-1938

query I rowsort
SELECT - 80 * tab0.col0 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to acfa33daa371f695a0045a73d68e09ff

query I rowsort
SELECT + + cor1.col1 FROM tab0, tab2 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 95de14c88adc44eda4adb5267fe9ebd1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col2 * + col2 col0 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT cor0.col1 + + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4066
SELECT DISTINCT - col2 * + ( - 13 ) + col0 DIV col0 AS col2 FROM tab0 AS cor0
----
1067
14
430

skipif mysql # not compatible
query I rowsort label-4066
SELECT DISTINCT - col2 * + ( - 13 ) + col0 / col0 AS col2 FROM tab0 AS cor0
----
1067
14
430

onlyif mysql # use DIV operator for integer division
query I rowsort label-4067
SELECT - + cor0.col1 DIV + 56 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4067
SELECT - + cor0.col1 / + 56 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 * - 81 AS col1 FROM tab0 AS cor0
----
6966
7371
7857

query I rowsort
SELECT ALL + + col1 + 97 * + col0 AS col1 FROM tab1 AS cor0
----
317
6218
7773

query I rowsort
SELECT col1 * - col1 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT DISTINCT + + col2 * + 3 FROM tab1 cor0
----
162
171
288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4072
SELECT DISTINCT - - col0 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4072
SELECT DISTINCT - - col0 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL col1 + ( col2 ) * col0 AS col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT - - cor0.col1 AS col1 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4075
SELECT ALL col1 DIV CAST( col2 * col2 AS SIGNED ) + + col0 col2 FROM tab0 AS cor0
----
132
24
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4075
SELECT ALL col1 / CAST ( col2 * col2 AS INTEGER ) + + col0 col2 FROM tab0 AS cor0
----
132
24
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4076
SELECT - col0 + - CAST( col1 + col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-196
-229
-271

skipif mysql # not compatible
query I rowsort label-4076
SELECT - col0 + - CAST ( col1 + col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-196
-229
-271

query I rowsort
SELECT ALL col1 * + ( col1 ) FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - col2 * - col2 + + col0 AS col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT + cor0.col1 + + col0 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL + col0 + col2 AS col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4081
SELECT col2 * - CAST( col1 AS SIGNED ) + col1 * ( col0 * - col0 ) FROM tab0 AS cor0
----
-118922
-52374
-728273

skipif mysql # not compatible
query I rowsort label-4081
SELECT col2 * - CAST ( col1 AS INTEGER ) + col1 * ( col0 * - col0 ) FROM tab0 AS cor0
----
-118922
-52374
-728273

query I rowsort
SELECT DISTINCT - 1 * + col1 FROM tab0 AS cor0
----
-86
-91
-97

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab1 cor2
----
972 values hashing to 0be13143d898cc667fe1a2dd93b34703

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( cor0.col1 AS REAL ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT ( col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab0, tab1 AS cor1
----
972 values hashing to 465d072d2d9eababbfc8e88b82707474

query I rowsort
SELECT ALL - - 23 + col2 AS col2 FROM tab1 AS cor0
----
119
77
80

query I rowsort
SELECT ALL + cor0.col2 + - 78 FROM tab1 cor0
----
-21
-24
18

query I rowsort
SELECT 28 FROM tab1 AS cor0
----
28
28
28

query I rowsort
SELECT ALL + + 81 AS col0 FROM tab2 AS cor0
----
81
81
81

query I rowsort
SELECT DISTINCT - cor0.col0 + + col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT 49 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-4093
SELECT ALL + col2 DIV - 75 AS col0 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4093
SELECT ALL + col2 / - 75 AS col0 FROM tab1
----
-1
0
0

query I rowsort
SELECT ALL - col2 * + ( ( - col2 ) ) * 82 FROM tab0
----
551368
82
89298

query IIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2, tab2 cor1
----
243 values hashing to 5d85c5683e3ffd6d68920690d7302f7d

query I rowsort
SELECT + cor0.col2 + + cor0.col2 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 73e5d3d4212c7c9c8f2e4a4f74108ae2

query I rowsort
SELECT ALL - - cor0.col0 + + col0 AS col0 FROM tab2 AS cor0
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-4098
SELECT ALL - 71 DIV + col0 + col1 AS col0 FROM tab0 AS cor0
----
84
91
95

skipif mysql # not compatible
query I rowsort label-4098
SELECT ALL - 71 / + col0 + col1 AS col0 FROM tab0 AS cor0
----
84
91
95

query I rowsort
SELECT DISTINCT + + cor0.col1 * col2 + col1 AS col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT + 74 + - 98 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
-24

query I rowsort
SELECT col0 - col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - col0 * col0 + + col1 * + col0 FROM tab2 AS cor0
----
-1482
-4898
168

query I rowsort
SELECT + col0 + col0 * + col0 AS col1 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL - 33 FROM tab0 AS cor0
----
-33
-33
-33

onlyif mysql # use DIV operator for integer division
query I rowsort label-4105
SELECT DISTINCT + 66 DIV + cor0.col1 AS col0 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4105
SELECT DISTINCT + 66 / + cor0.col1 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + + col0 + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + col2 + col2 * - col0 AS col0 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT 26 AS col1 FROM tab0
----
26
26
26

query I rowsort
SELECT ALL cor0.col2 FROM tab0, tab1, tab0 AS cor0, tab2
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT cor0.col0 * + 52 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to e4fcc5f8add036287a64ac85006d07ae

query I rowsort
SELECT + - 42 + + col0 AS col2 FROM tab0 AS cor0
----
-18
-7
47

query I rowsort
SELECT + + col0 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT 96 * - col1 * col2 + col2 * col0 * col2 FROM tab1 cor0
----
-126036
153216
617472

onlyif mysql # use DIV operator for integer division
query I rowsort label-4114
SELECT - 16 DIV col0 AS col2 FROM tab1
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-4114
SELECT - 16 / col0 AS col2 FROM tab1
----
-5
0
0

query I rowsort
SELECT DISTINCT 56 * col2 + - ( + 81 + col2 ) FROM tab1
----
2889
3054
5199

query I rowsort
SELECT DISTINCT + col1 * - col0 + - col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab0 cor1, tab2 AS cor2
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 24 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 797d0f7c145f8ac623924448c714bbcc

query I rowsort
SELECT - col1 * col2 + - col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL col0 + col1 AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT DISTINCT tab0.col0 * + col0 + - col2 * col2 * + col1 FROM tab0
----
-603963
-93078
1128

query I rowsort
SELECT + tab2.col2 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT - col0 * 98 + col1 FROM tab2
----
-655
-7585
-7725

query I rowsort
SELECT - col2 * + col1 * - col0 AS col1 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT DISTINCT - col1 * + cor0.col1 + col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT + col0 + 52 * - cor0.col1 FROM tab0 AS cor0
----
-4448
-4643
-5009

query I rowsort
SELECT + col2 + 1 AS col2 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT ALL cor0.col2 - - ( - col2 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + cor0.col2 * + 7 - + cor0.col2 FROM tab1 AS cor0
----
324
342
576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + ( + cor0.col2 ) * + col2 col1 FROM tab0 AS cor0
----
1113
36
6813

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4132
SELECT ALL + col0 + CAST( + 16 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
105
40
51

skipif mysql # not compatible
query I rowsort label-4132
SELECT ALL + col0 + CAST ( + 16 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
105
40
51

query I rowsort
SELECT ALL - col2 + col2 + + cor0.col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT 62 FROM tab1, tab2 AS cor0
----
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4135
SELECT ALL CAST( NULL AS DECIMAL ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4135
SELECT ALL CAST ( NULL AS REAL ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + tab2.col2 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + 36 * col0 + + col2 FROM tab1
----
162
2361
2976

query I rowsort
SELECT ( + 47 ) AS col2 FROM tab2
----
47
47
47

query I rowsort
SELECT 32 - - col1 AS col1 FROM tab0
----
118
123
129

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + 29 col2 FROM tab1 AS cor0
----
109
32
93

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col0 AS REAL ) AS col0 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4142
SELECT ALL col2 DIV - col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4142
SELECT ALL col2 / - col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT col2 * + 19 AS col2 FROM tab1 AS cor0
----
1026
1083
1824

onlyif mysql # use DIV operator for integer division
query I rowsort label-4144
SELECT ALL col2 DIV col2 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4144
SELECT ALL col2 / col2 AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - cor0.col2 + + col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - col2 * - col2 + + col1 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT ALL + - cor0.col1 - col2 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT 82 * col1 + ( + col0 ) AS col0 FROM tab1 cor0
----
1146
2135
884

query I rowsort
SELECT DISTINCT col1 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + 77 FROM tab2 cor0
----
77

query I rowsort
SELECT ALL - col2 + + col2 * ( col2 + col2 ) FROM tab0 AS cor0
----
1
13366
2145

query I rowsort
SELECT DISTINCT - - 63 - cor0.col0 FROM tab1 AS cor0
----
-1
-17
60

query I rowsort
SELECT DISTINCT - col1 + col0 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + 91 * col1 + 8 AS col0 FROM tab2 cor0
----
1555
2829
5377

query I rowsort
SELECT ALL 36 FROM tab1 AS cor0
----
36
36
36

query I rowsort
SELECT DISTINCT + - col0 * col1 + ( + 86 ) FROM tab0 cor0
----
-1978
-3309
-8013

query I rowsort
SELECT DISTINCT - - col1 + col2 * 49 FROM tab2 AS cor0
----
1333
1354
1879

query I rowsort
SELECT DISTINCT + - col1 + + cor0.col0 * + 61 AS col0 FROM tab1 AS cor0
----
157
3894
4867

onlyif mysql # use DIV operator for integer division
query I rowsort label-4159
SELECT ALL - 48 DIV + col2 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4159
SELECT ALL - 48 / + col2 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4160
SELECT DISTINCT col2 + col2 DIV col0 AS col2 FROM tab2 cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-4160
SELECT DISTINCT col2 + col2 / col0 AS col2 FROM tab2 cor0
----
26
30
38

query I rowsort
SELECT - - 96 * col2 - - ( col0 ) FROM tab2 AS cor0
----
2574
2599
3727

query I rowsort
SELECT ALL + + 73 + - col1 AS col1 FROM tab0 AS cor0
----
-13
-18
-24

query I rowsort
SELECT DISTINCT - col0 * col1 * - col2 FROM tab2 cor0
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 56 col0 FROM tab1 AS cor0
----
56
56
56

query I rowsort
SELECT ALL - col2 * col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - + col1 * - col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT 23 AS col1 FROM tab2 AS cor0
----
23

query I rowsort
SELECT col0 * + cor0.col1 + + col1 - 94 FROM tab1 AS cor0
----
10
556
959

query I rowsort
SELECT - ( + 56 ) + col2 * + 4 FROM tab0 AS cor0
----
-52
272
76

query I rowsort
SELECT ALL + + ( + col0 ) * cor0.col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT tab0.col2 + col0 AS col2 FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4172
SELECT - col1 DIV ( + 40 ) FROM tab0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-4172
SELECT - col1 / ( + 40 ) FROM tab0
----
-2
-2
-2

query I rowsort
SELECT ALL - cor0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4174
SELECT - 28 + col2 DIV + col2 + 99 FROM tab1 AS cor0
----
72
72
72

skipif mysql # not compatible
query I rowsort label-4174
SELECT - 28 + col2 / + col2 + 99 FROM tab1 AS cor0
----
72
72
72

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + 99 * 62 + cor0.col0 AS col0 FROM tab1 AS cor0
----
6141
6202
6218

query I rowsort
SELECT ALL + col1 + ( + col2 + - col0 ) * tab2.col1 FROM tab2
----
-3009
-680
651

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + 43 ) col0 FROM tab2
----
-43

query I rowsort
SELECT + - col2 * col1 * - col2 AS col1 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT + col1 * cor0.col0 + - ( col0 * col2 ) FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT - 1 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - 91 AS col2 FROM tab0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT - tab2.col1 * 43 AS col1 FROM tab2, tab0 cor0, tab2 AS cor1
----
-1333
-2537
-731

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 4 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

query I rowsort
SELECT DISTINCT - ( tab2.col0 ) FROM tab2
----
-7
-78
-79

query I rowsort
SELECT DISTINCT tab2.col1 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
17
31
59

query I rowsort
SELECT ALL + 42 + - tab1.col0 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 68294d7e6c08081e35e372843dd13489

query I rowsort
SELECT - ( ( tab1.col1 ) ) AS col0 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col1 * - col1 AS col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - + col0 + + ( + cor0.col1 ) * col2 AS col2 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT - + cor0.col1 * - 5 AS col0 FROM tab2 AS cor0
----
155
295
85

query I rowsort
SELECT DISTINCT col1 + + 20 * - col1 + col0 AS col2 FROM tab2
----
-1043
-244
-582

query I rowsort
SELECT col1 + + col0 AS col2 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - cor0.col1 * + col1 + + 53 + - col2 * col0 * - col1 FROM tab1 AS cor0
----
3589
36433
99724

query I rowsort
SELECT ALL col2 + 8 AS col0 FROM tab0 AS cor0
----
41
9
90

query I rowsort
SELECT DISTINCT cor0.col0 * ( 67 ) AS col0 FROM tab0 AS cor0
----
1608
2345
5963

query I rowsort
SELECT ALL - cor0.col0 + col1 FROM tab1 AS cor0
----
-54
-67
23

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0 cor2
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

query I rowsort
SELECT col0 + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * col2 col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - + col2 + col1 * cor0.col0 AS col1 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT ALL col0 + col0 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT DISTINCT + col0 + 78 AS col2 FROM tab2 AS cor0
----
156
157
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4205
SELECT CAST( + ( - col0 ) AS SIGNED ) FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4205
SELECT CAST ( + ( - col0 ) AS INTEGER ) FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL col2 + 14 FROM tab0 cor0
----
15
47
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col2 * - col0 col1 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT + col0 - - col1 FROM tab2
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4209
SELECT ALL CAST( NULL AS SIGNED ) FROM tab1, tab2, tab0 AS cor0, tab1 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-4209
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab1, tab2, tab0 AS cor0, tab1 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2, tab2 cor0, tab1
----
972 values hashing to 4c46de5c1773124597e14f3b372fc4ea

query I rowsort
SELECT - col0 * + ( + col1 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col1 * + ( - col1 ) FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * 51 col0 FROM tab0
----
1224
1785
4539

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4215
SELECT DISTINCT CAST( ( + col1 ) AS SIGNED ) - - col1 col0 FROM tab1
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4215
SELECT DISTINCT CAST ( ( + col1 ) AS INTEGER ) - - col1 col0 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT - col0 - - col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ( 83 ) FROM tab1 cor0
----
83
83
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4218
SELECT CAST( col0 AS SIGNED ) AS col0 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4218
SELECT CAST ( col0 AS INTEGER ) AS col0 FROM tab0 cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4219
SELECT + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4219
SELECT + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - ( col1 ) * ( - col2 ) FROM tab1
----
1248
1404
570

query I rowsort
SELECT - col1 * col1 AS col0 FROM tab2
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-4222
SELECT + 99 DIV + col0 FROM tab1 AS cor0
----
1
1
33

skipif mysql # not compatible
query I rowsort label-4222
SELECT + 99 / + col0 FROM tab1 AS cor0
----
1
1
33

query I rowsort
SELECT - - col0 * cor0.col2 * - col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT - - col0 * + col2 + + col0 AS col1 FROM tab1 cor0
----
165
3712
7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * 36 col0 FROM tab0 AS cor0
----
1188
2952
36

query I rowsort
SELECT 84 FROM tab0, tab2 cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - 76 * + 54 FROM tab1, tab1 AS cor0
----
-4104

query I rowsort
SELECT DISTINCT 55 FROM tab1, tab0 AS cor0
----
55

query I rowsort
SELECT DISTINCT - col0 * + 6 * col0 + - tab0.col1 FROM tab0
----
-3542
-47617
-7447

onlyif mysql # use DIV operator for integer division
query I rowsort label-4231
SELECT + 64 + col2 DIV col2 FROM tab1
----
65
65
65

skipif mysql # not compatible
query I rowsort label-4231
SELECT + 64 + col2 / col2 FROM tab1
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 col1 FROM tab0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4233
SELECT CAST( - 54 AS SIGNED ) * col2 + - 57 AS col1 FROM tab1 AS cor0
----
-2973
-3135
-5241

skipif mysql # not compatible
query I rowsort label-4233
SELECT CAST ( - 54 AS INTEGER ) * col2 + - 57 AS col1 FROM tab1 AS cor0
----
-2973
-3135
-5241

query I rowsort
SELECT DISTINCT + 80 AS col1 FROM tab2, tab0 AS cor0
----
80

query I rowsort
SELECT cor0.col2 + col1 AS col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ( + col1 * col0 + + col0 * col2 ) FROM tab2
----
406
4345
6630

query I rowsort
SELECT + 83 * - tab1.col0 FROM tab1, tab0, tab1 AS cor0, tab0 AS cor1
----
81 values hashing to 745c596f970f21f878c4c5f818c8f5ef

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + tab0.col0 col2 FROM tab0
----
110
132
180

query I rowsort
SELECT - col1 + 22 * col1 + - 33 FROM tab0
----
1773
1878
2004

query I rowsort
SELECT + + 75 * col0 * 25 + 57 + + col0 FROM tab0 AS cor0
----
167021
45081
65717

query I rowsort
SELECT ALL col2 + - col1 + ( col1 ) AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT col2 + + col2 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT DISTINCT - - cor0.col0 * col0 FROM tab0 AS cor0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 * col2 col0 FROM tab2 AS cor0
----
1820
1890
2660

query I rowsort
SELECT DISTINCT - col2 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL 38 + col2 AS col0 FROM tab2 cor0
----
64
65
76

query I rowsort
SELECT col2 + + col2 FROM tab0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-4248
SELECT DISTINCT - cor0.col0 DIV + cor0.col2 + - 34 DIV - ( + col1 ) FROM tab1 AS cor0
----
1
2

skipif mysql # not compatible
query I rowsort label-4248
SELECT DISTINCT - cor0.col0 / + cor0.col2 + - 34 / - ( + col1 ) FROM tab1 AS cor0
----
1
2

query I rowsort
SELECT ALL col2 + + col0 AS col2 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 + col2 col2 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort
SELECT + - 84 * col0 + CAST ( col2 AS REAL ) AS col1 FROM tab0 AS cor0
----
-1983
-2939
-7394

query I rowsort
SELECT DISTINCT - col1 + col0 + + col1 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + col2 - + cor0.col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT + + col1 + - col0 AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL + + col0 + + col0 FROM tab2 cor0
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col1 * - col0 + col0 * col2 col2 FROM tab1 cor0
----
110
3018
6653

query I rowsort
SELECT DISTINCT + - col2 * + col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - 36 - col1 * cor0.col0 AS col1 FROM tab0 AS cor0
----
-2100
-3431
-8135

query I rowsort
SELECT - 84 + col2 * + col0 FROM tab2 AS cor0
----
105
1944
2918

query I rowsort
SELECT + + cor0.col2 + - col1 * - col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT + col0 + + 47 * col1 AS col2 FROM tab1 cor0
----
1225
534
691

onlyif mysql # use DIV operator for integer division
query I rowsort label-4262
SELECT ALL - + col2 DIV - ( + col0 * - cor0.col1 ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4262
SELECT ALL - + col2 / - ( + col0 * - cor0.col1 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + cor0.col1 AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - + cor0.col2 * col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - cor0.col1 + + col0 * - col0 AS col1 FROM tab0 AS cor0
----
-1322
-662
-8012

query I rowsort
SELECT - col0 * 9 AS col1 FROM tab2 cor0
----
-63
-702
-711

query I rowsort
SELECT - + col2 * + col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col2 + cor0.col2 * ( cor0.col1 ) FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL + cor0.col2 * col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT col1 * 70 FROM tab0 AS cor0
----
6020
6370
6790

query I rowsort
SELECT 38 + cor0.col2 AS col1 FROM tab1 AS cor0
----
134
92
95

query I rowsort
SELECT DISTINCT cor0.col2 + - 78 * col1 AS col0 FROM tab0 AS cor0
----
-6675
-7016
-7565

query I rowsort
SELECT ALL 62 * 91 - - col1 FROM tab2 AS cor0
----
5659
5673
5701

query I rowsort
SELECT DISTINCT - ( col1 ) * col1 * + cor0.col0 + 39 AS col1 FROM tab2 cor0
----
-22792
-271479
-6688

query I rowsort
SELECT DISTINCT - col0 * + cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + 56 * + col0 + + col1 AS col0 FROM tab2 AS cor0
----
423
4427
4441

query I rowsort
SELECT DISTINCT - + col2 * - 74 + col1 FROM tab2 cor0
----
1983
2029
2829

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 * col0 + - col1 col0 FROM tab0 AS cor0
----
1233
3291
826

query I rowsort
SELECT DISTINCT + col0 - + col2 AS col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL - col0 * 51 AS col1 FROM tab2
----
-357
-3978
-4029

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-4282
SELECT ALL - col1 DIV ( + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-4282
SELECT ALL - col1 / ( + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT ALL - + ( - col2 ) * - col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col2 * + col0 + - col0 AS col1 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT + col2 * col2 * - cor0.col0 AS col1 FROM tab1 cor0
----
-207936
-737280
-8748

query I rowsort
SELECT ALL - cor0.col0 + + col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT - ( - ( - col0 ) ) * col0 - - col0 AS col0 FROM tab2 cor0
----
-42
-6006
-6162

query I rowsort
SELECT DISTINCT - - ( cor0.col1 ) * + col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL 51 * - col1 FROM tab1 AS cor0
----
-1326
-510
-663

query I rowsort
SELECT + 86 * col1 * col2 FROM tab2 cor0
----
131924
55556
71982

query I rowsort
SELECT col0 * + col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT col2 + tab1.col2 FROM tab1
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-4293
SELECT DISTINCT + col0 DIV - col0 AS col0 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-4293
SELECT DISTINCT + col0 / - col0 AS col0 FROM tab1
----
-1

query I rowsort
SELECT DISTINCT + tab0.col0 * + 37 FROM tab0, tab1, tab0 AS cor0
----
1295
3293
888

query I rowsort
SELECT + 97 + cor0.col0 AS col2 FROM tab1 AS cor0
----
100
161
177

query I rowsort
SELECT DISTINCT col1 * col2 FROM tab2 cor0
----
1534
646
837

query IIIIIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2, tab2 AS cor2
----
13122 values hashing to 0e833334c6143b15c18bb7a7be854d60

query I rowsort
SELECT - col1 + - col1 AS col2 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT - 60 + col1 + - ( - 26 ) FROM tab0 AS cor0
----
52
57
63

query I rowsort
SELECT - col2 * + col2 + + col1 AS col2 FROM tab1 AS cor0
----
-2890
-3239
-9203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT 12 + + col2 FROM tab1
----
108
66
69

query I rowsort
SELECT DISTINCT + + cor0.col1 FROM tab1 cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4304
SELECT ALL - col2 + - ( 46 ) DIV col0 AS col2 FROM tab1 AS cor0
----
-57
-69
-96

skipif mysql # not compatible
query I rowsort label-4304
SELECT ALL - col2 + - ( 46 ) / col0 AS col2 FROM tab1 AS cor0
----
-57
-69
-96

query I rowsort
SELECT DISTINCT - + col1 * + col1 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-4306
SELECT ALL + col1 DIV 25 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4306
SELECT ALL + col1 / 25 FROM tab1
----
0
0
1

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab0, tab0 AS cor0, tab1 cor1
----
54
57
96

query I rowsort
SELECT DISTINCT - col0 * 94 AS col2 FROM tab2
----
-658
-7332
-7426

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1, tab2 AS cor0, tab1 cor1
----
972 values hashing to 4c0813b2179303fdf58f082d81d6d03c

query I rowsort
SELECT ALL + col1 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - ( - 31 ) FROM tab0, tab0 cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4312
SELECT DISTINCT + col1 + CAST( + col0 AS SIGNED ) FROM tab1 cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-4312
SELECT DISTINCT + col1 + CAST ( + col0 AS INTEGER ) FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT tab0.col1 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT ( + col2 ) * + col1 * - col2 AS col1 FROM tab0
----
-611884
-93654
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * - cor0.col1 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + + col1 * - col1 + 35 * col1 - col1 AS col1 FROM tab0 AS cor0
----
-4472
-5187
-6111

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + + cor0.col2 * + 7 * 61 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 65d3170156694e33997c727b03ae1e87

query I rowsort
SELECT + tab1.col0 + - ( - col2 * tab1.col0 ) + + col1 FROM tab1
----
191
3722
7773

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + 57 col2 FROM tab1 AS cor0
----
-23
-7
54

query I rowsort
SELECT - col2 + - 21 FROM tab1 AS cor0
----
-117
-75
-78

query I rowsort
SELECT - - col2 * cor0.col2 * ( - cor0.col2 ) + + 46 FROM tab0 AS cor0
----
-35891
-551322
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + cor0.col2 col0 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + col0 * col2 + col1 AS col0 FROM tab0 cor0
----
132
7389
878

skipif mysql # not compatible
query I rowsort
SELECT - cor0.col2 - - CAST ( 33 AS REAL ) * + cor0.col2 AS col0 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT ( 23 ) * + cor0.col1 FROM tab0 AS cor0
----
1978
2093
2231

query I rowsort
SELECT ALL + 95 * 1 - - col0 AS col1 FROM tab2 AS cor0
----
102
173
174

query I rowsort
SELECT cor1.col0 * 23 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c2c3417081c7f0f20bb517f6c814db29

query I rowsort
SELECT cor0.col2 + 76 AS col2 FROM tab0 AS cor0
----
109
158
77

query IIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 WHERE NOT NULL >= ( NULL )
----

query I rowsort
SELECT ALL + col2 - - col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + - 11 * 94 AS col1 FROM tab2 AS cor0
----
-1034
-1034
-1034

query I rowsort
SELECT - 39 * 40 FROM tab2 AS cor0
----
-1560
-1560
-1560

query I rowsort
SELECT - - col0 * 2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL 22 FROM tab1, tab0 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 col0 FROM tab2 AS cor0
----
99
99
99

query I rowsort
SELECT col2 * cor0.col1 + + col1 FROM tab0 cor0
----
194
2924
7553

query I rowsort
SELECT + col1 * col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - + col0 * col2 + + col1 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL - col1 * 10 FROM tab2
----
-170
-310
-590

query I rowsort
SELECT ALL + ( + 87 ) * - col0 AS col0 FROM tab0
----
-2088
-3045
-7743

query I rowsort
SELECT + 53 FROM tab2
----
53
53
53

query I rowsort
SELECT ALL - 25 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 40ac8fd000b2e49317aed2411077839e

query I rowsort
SELECT + tab2.col0 * tab2.col2 FROM tab2, tab2 cor0
----
9 values hashing to 41d4c126bfd4bfab59ba5e83427c98e0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + + col2 col2 FROM tab1 AS cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col0 col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL 65 * + tab0.col0 FROM tab0
----
1560
2275
5785

query I rowsort
SELECT col1 * + 57 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
4926
5276
5564

onlyif mysql # use DIV operator for integer division
query I rowsort label-4348
SELECT ALL - + col2 DIV 11 FROM tab2 AS cor0
----
-2
-2
-3

skipif mysql # not compatible
query I rowsort label-4348
SELECT ALL - + col2 / 11 FROM tab2 AS cor0
----
-2
-2
-3

query I rowsort
SELECT DISTINCT - col2 * col2 + col1 - - col1 FROM tab2 AS cor0
----
-1410
-558
-667

query I rowsort
SELECT tab1.col0 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL + tab2.col0 * col2 AS col2 FROM tab2
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - col0 col2 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT 62 AS col0 FROM tab1
----
62

query I rowsort
SELECT ALL col1 * - col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT + col2 * cor0.col1 + + col1 AS col2 FROM tab0 cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT - + 60 * 99 FROM tab2 AS cor0
----
-5940

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - ( + col1 ) * - col2 - + CAST ( - col0 AS REAL ) AS col0 FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-4358
SELECT - - 67 DIV 39 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4358
SELECT - - 67 / 39 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT ALL + 17 + - col1 AS col0 FROM tab2 AS cor0
----
-14
-42
0

query I rowsort
SELECT col2 + + 25 FROM tab1 AS cor0
----
121
79
82

query I rowsort
SELECT DISTINCT - col0 + - 40 * col0 AS col2 FROM tab0 AS cor0
----
-1435
-3649
-984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col0 col1 FROM tab2
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-4363
SELECT + col1 DIV col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4363
SELECT + col1 / col1 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - 61 col1 FROM tab1
----
-3294
-3477
-5856

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 * col2 col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + + cor0.col2 + - ( cor0.col0 ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-34
-7
9

query I rowsort
SELECT 65 * + 27 AS col1 FROM tab2
----
1755
1755
1755

query I rowsort
SELECT ALL - tab1.col0 + + ( - col2 ) + + col1 * tab1.col0 AS col2 FROM tab1
----
21
519
864

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0, tab2, tab1 AS cor1
----
972 values hashing to dd771e0c15d524f62127686e9bd43f9a

query I rowsort
SELECT 3 AS col0 FROM tab1
----
3
3
3

query I rowsort
SELECT + ( col2 ) AS col1 FROM tab2
----
26
27
38

query I rowsort
SELECT - 98 * + 84 * col1 + - 15 AS col0 FROM tab0 AS cor0
----
-707967
-749127
-798519

query I rowsort
SELECT col2 + - 42 FROM tab1 AS cor0
----
12
15
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-4374
SELECT + - col1 DIV - col0 + col0 * - col2 AS col0 FROM tab1 cor0
----
-154
-3648
-7680

skipif mysql # not compatible
query I rowsort label-4374
SELECT + - col1 / - col0 + col0 * - col2 AS col0 FROM tab1 cor0
----
-154
-3648
-7680

query I rowsort
SELECT + - cor0.col0 * cor0.col0 + col0 FROM tab0 AS cor0
----
-1190
-552
-7832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + - cor0.col1 + - col1 + col0 FROM tab0 AS cor0
----
-148
-159
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4378
SELECT - + col2 * col1 + col1 DIV col1 - + col0 FROM tab0 AS cor0
----
-131
-2861
-7550

skipif mysql # not compatible
query I rowsort label-4378
SELECT - + col2 * col1 + col1 / col1 - + col0 FROM tab0 AS cor0
----
-131
-2861
-7550

query I rowsort
SELECT DISTINCT + 25 FROM tab1
----
25

query I rowsort
SELECT ALL + + col1 + + ( col0 ) FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-4381
SELECT - - col0 DIV - ( col1 ) + col2 * + col0 * - col2 FROM tab2 AS cor0
----
-114080
-5103
-52729

skipif mysql # not compatible
query I rowsort label-4381
SELECT - - col0 / - ( col1 ) + col2 * + col0 * - col2 FROM tab2 AS cor0
----
-114080
-5103
-52729

query I rowsort
SELECT ALL col1 + 11 * cor0.col0 AS col1 FROM tab0 AS cor0
----
1070
350
482

query I rowsort
SELECT cor0.col2 + cor0.col0 * col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL col1 * 87 FROM tab0 AS cor0
----
7482
7917
8439

query I rowsort
SELECT ALL + tab2.col2 * + col2 FROM tab2
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-4386
SELECT 15 DIV - col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4386
SELECT 15 / - col0 FROM tab0
----
0
0
0

query I rowsort
SELECT - col2 * + col2 AS col0 FROM tab1
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-4388
SELECT + ( tab2.col2 ) + col2 * - col1 DIV + col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4388
SELECT + ( tab2.col2 ) + col2 * - col1 / + col1 FROM tab2
----
0
0
0

query I rowsort
SELECT col1 - col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + 4 FROM tab2
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 + cor0.col1 * - 40 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 519bf49c60fef7373211989236c1e9dc

query I rowsort
SELECT col0 * 97 AS col2 FROM tab1
----
291
6208
7760

query I rowsort
SELECT col1 * + col2 + - tab1.col1 AS col2 FROM tab1
----
1235
1378
560

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT ALL + col2 + col2 + cor0.col0 * col2 FROM tab2 AS cor0
----
2080
243
3078

query I rowsort
SELECT ALL col1 + cor0.col1 FROM tab0 AS cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col2 col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4398
SELECT DISTINCT + cor0.col1 DIV ( col0 ) FROM tab1 cor0
----
0
8

skipif mysql # not compatible
query I rowsort label-4398
SELECT DISTINCT + cor0.col1 / ( col0 ) FROM tab1 cor0
----
0
8

query I rowsort
SELECT ALL - + col2 * - col2 + 19 FROM tab2 AS cor0
----
1463
695
748

query I rowsort
SELECT - col0 + + 95 FROM tab1 AS cor0
----
15
31
92

query I rowsort
SELECT DISTINCT cor0.col2 + - ( cor0.col1 ) FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4402
SELECT ALL col0 * - col1 DIV col1 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-4402
SELECT ALL col0 * - col1 / col1 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + col2 * - ( - col1 ) * col2 - - col0 FROM tab1 AS cor0
----
119888
32554
75819

query I rowsort
SELECT ALL + - col0 AS col1 FROM tab1 cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4405
SELECT col0 DIV ( + ( + col0 ) ) + - col2 * - cor0.col0 FROM tab2 AS cor0
----
190
2029
3003

skipif mysql # not compatible
query I rowsort label-4405
SELECT col0 / ( + ( + col0 ) ) + - col2 * - cor0.col0 FROM tab2 AS cor0
----
190
2029
3003

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 CROSS JOIN tab2, tab0, tab1 AS cor1
----
3645 values hashing to def82b52aa9c83b91991d7d043276abe

query I rowsort
SELECT col2 + + col0 * + col0 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT - + ( 9 ) * - col0 AS col0 FROM tab2 AS cor0
----
63
702
711

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4409
SELECT + CAST( col0 AS SIGNED ) * col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-4409
SELECT + CAST ( col0 AS INTEGER ) * col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + tab0.col2 * + col0 AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT + + col1 * 30 AS col0 FROM tab2 AS cor0
----
1770
510
930

query I rowsort
SELECT - cor0.col2 + - col2 * col0 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT DISTINCT 60 + + 86 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
146

query I rowsort
SELECT ALL 7 * col0 * 10 + + col2 FROM tab2 AS cor0
----
517
5486
5568

query I rowsort
SELECT ALL - 37 FROM tab2
----
-37
-37
-37

query I rowsort
SELECT 32 AS col2 FROM tab0 AS cor0
----
32
32
32

query I rowsort
SELECT DISTINCT + - cor0.col2 + col0 * - col1 + col0 FROM tab0 AS cor0
----
-2073
-3361
-8092

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col1 col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + ( - cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - + 24 * + col0 FROM tab1 AS cor0
----
-1536
-1920
-72

query I rowsort
SELECT DISTINCT - - col2 * col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT - col2 * + cor0.col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + + col1 * col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL + - col2 * + cor0.col0 * - col0 AS col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT cor0.col0 + + col1 * col1 * - col0 FROM tab1 cor0
----
-13440
-2025
-6336

query I rowsort
SELECT ALL - ( - col0 ) + - col2 * col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT 82 AS col1 FROM tab2 AS cor0
----
82
82
82

query I rowsort
SELECT ALL + 97 * - cor0.col0 FROM tab1 AS cor0
----
-291
-6208
-7760

query I rowsort
SELECT DISTINCT - + 4 FROM tab2 cor0
----
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 50 * + col1 col2 FROM tab1 AS cor0
----
1300
500
650

query I rowsort
SELECT + 49 * - col1 FROM tab2 AS cor0
----
-1519
-2891
-833

query I rowsort
SELECT DISTINCT + 3 * col0 FROM tab0 AS cor0
----
105
267
72

query I rowsort
SELECT - - col1 AS col0 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + + cor0.col1 + col2 * col0 FROM tab2 AS cor0
----
2087
220
3019

query IIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 WHERE ( NULL ) >= NULL
----

query I rowsort
SELECT ALL - 27 * - tab0.col0 * - tab0.col1 FROM tab0
----
-218673
-55728
-91665

query I rowsort
SELECT ALL + - 40 AS col2 FROM tab2 cor0
----
-40
-40
-40

query I rowsort
SELECT + - col2 + + 0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL - + col0 + - col0 FROM tab0 cor0
----
-178
-48
-70

query I rowsort
SELECT - 15 * col2 FROM tab0 AS cor0
----
-1230
-15
-495

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4441
SELECT ALL CAST( NULL AS SIGNED ) - 54 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4441
SELECT ALL CAST ( NULL AS INTEGER ) - 54 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + 46 + col0 FROM tab0 AS cor0
----
135
70
81

query I rowsort
SELECT ALL 31 * - ( col2 + cor0.col2 ) AS col2 FROM tab2 AS cor0
----
-1612
-1674
-2356

query I rowsort
SELECT 24 * 54 AS col1 FROM tab1
----
1296
1296
1296

onlyif mysql # use DIV operator for integer division
query I rowsort label-4445
SELECT ALL - 7 + col1 DIV + col0 AS col2 FROM tab1
----
-7
-7
1

skipif mysql # not compatible
query I rowsort label-4445
SELECT ALL - 7 + col1 / + col0 AS col2 FROM tab1
----
-7
-7
1

query I rowsort
SELECT DISTINCT 44 + col0 FROM tab0
----
133
68
79

query I rowsort
SELECT ALL col2 * - col2 + col0 * col0 AS col1 FROM tab2
----
-680
4797
5408

query I rowsort
SELECT - 76 * col0 FROM tab1 AS cor0
----
-228
-4864
-6080

query I rowsort
SELECT DISTINCT ( 24 ) + col0 FROM tab2
----
102
103
31

query I rowsort
SELECT ( 78 * - col0 ) + + col1 * - col1 * - col0 AS col2 FROM tab1
----
1408
1794
7280

query I rowsort
SELECT ALL ( col1 + col0 ) FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col2 * - col1 col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT ( col1 ) + col1 AS col0 FROM tab0
----
172
182
194

query I rowsort
SELECT col1 * - 26 FROM tab2
----
-1534
-442
-806

query I rowsort
SELECT DISTINCT - 43 FROM tab1
----
-43

query I rowsort
SELECT col2 * - 40 + - tab1.col1 AS col1 FROM tab1
----
-2186
-2290
-3853

query I rowsort
SELECT - ( - cor1.col2 ) * + 16 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 541fe66bdccd5b0e268906a8a4a1d9b3

onlyif mysql # use DIV operator for integer division
query I rowsort label-4458
SELECT + cor0.col0 DIV - col2 AS col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-4458
SELECT + cor0.col0 / - col2 AS col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT ALL - col0 * col2 FROM tab1
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4460
SELECT + CAST( NULL AS SIGNED ) col1 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4460
SELECT + CAST ( NULL AS INTEGER ) col1 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + - cor0.col1 - 26 AS col2 FROM tab1 AS cor0
----
-36
-39
-52

query I rowsort
SELECT + ( + tab1.col0 ) AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT ( 63 ) FROM tab1
----
63
63
63

query I rowsort
SELECT ALL cor1.col1 AS col0 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( 21 ) * tab2.col2 col0 FROM tab2
----
-546
-567
-798

query I rowsort
SELECT DISTINCT + ( tab1.col0 ) FROM tab1
----
3
64
80

query I rowsort
SELECT ALL ( - cor0.col1 ) FROM tab0, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT 74 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 12 col1 FROM tab2 AS cor0
----
12
12
12

query I rowsort
SELECT + ( - col0 ) * col1 + 18 FROM tab2 cor0
----
-1325
-199
-4584

query I rowsort
SELECT - + cor0.col2 + - cor0.col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT 43 AS col1 FROM tab2
----
43

query I rowsort
SELECT 85 * + col2 * col1 AS col0 FROM tab2
----
130390
54910
71145

query I rowsort
SELECT - col2 * col0 * 26 FROM tab0
----
-189748
-20592
-910

query I rowsort
SELECT - ( - col1 ) FROM tab0
----
86
91
97

query I rowsort
SELECT col1 * tab0.col0 + ( col0 ) + - col2 * + col0 AS col1 FROM tab0
----
1296
3395
890

query I rowsort
SELECT + 20 * col1 FROM tab2
----
1180
340
620

query I rowsort
SELECT ALL col2 + + col2 * - 31 AS col2 FROM tab2 cor0
----
-1140
-780
-810

query I rowsort
SELECT ALL + col2 + col0 * 38 FROM tab0 AS cor0
----
1331
3464
945

query I rowsort
SELECT + + col2 + + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - col1 + + cor0.col1 AS col2 FROM tab2 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * + col2 col0 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col0 * 28 AS col0 FROM tab0 AS cor0
----
2492
672
980

query I rowsort
SELECT cor0.col2 + + col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + col2 * - tab2.col2 FROM tab2
----
-1444
-676
-729

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1, tab1 cor0, tab0
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

query I rowsort
SELECT DISTINCT - col1 + col2 AS col0 FROM tab2
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4488
SELECT + col1 + - CAST( col0 * col2 AS SIGNED ) FROM tab2 AS cor0
----
-158
-1969
-2985

skipif mysql # not compatible
query I rowsort label-4488
SELECT + col1 + - CAST ( col0 * col2 AS INTEGER ) FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT col0 + + ( col1 + col2 * col1 ) AS col1 FROM tab2 AS cor0
----
1671
742
875

query I rowsort
SELECT + cor0.col0 * col1 + + col0 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4491
SELECT ALL col1 DIV col0 + - col2 FROM tab2
----
-23
-26
-38

skipif mysql # not compatible
query I rowsort label-4491
SELECT ALL col1 / col0 + - col2 FROM tab2
----
-23
-26
-38

query I rowsort
SELECT ALL + col0 + 22 FROM tab2
----
100
101
29

query I rowsort
SELECT DISTINCT + col2 + 5 FROM tab0
----
38
6
87

query I rowsort
SELECT ALL - tab0.col0 + + col0 * - col1 + col2 AS col0 FROM tab0
----
-2055
-3429
-8106

query I rowsort
SELECT DISTINCT col1 * - col1 + 46 * + col2 AS col0 FROM tab0
----
-4509
-5878
-9363

query I rowsort
SELECT + col2 + + ( col1 * - col2 ) AS col0 FROM tab2
----
-1508
-608
-810

onlyif mysql # use DIV operator for integer division
query I rowsort label-4497
SELECT + col2 DIV + 8 AS col0 FROM tab2 AS cor0
----
3
3
4

skipif mysql # not compatible
query I rowsort label-4497
SELECT + col2 / + 8 AS col0 FROM tab2 AS cor0
----
3
3
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4498
SELECT DISTINCT - - col2 DIV col0 FROM tab1 cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-4498
SELECT DISTINCT - - col2 / col0 FROM tab1 cor0
----
0
1
18

query I rowsort
SELECT DISTINCT col1 + - col1 * - 55 AS col0 FROM tab1 AS cor0
----
1456
560
728

onlyif mysql # use DIV operator for integer division
query I rowsort label-4500
SELECT + + col1 * - col2 + + col0 - - cor0.col2 DIV + col0 FROM tab2 AS cor0
----
-1456
-567
-827

skipif mysql # not compatible
query I rowsort label-4500
SELECT + + col1 * - col2 + + col0 - - cor0.col2 / + col0 FROM tab2 AS cor0
----
-1456
-567
-827

query I rowsort
SELECT - col1 + - 44 AS col0 FROM tab1 AS cor0
----
-54
-57
-70

query I rowsort
SELECT - col1 * col2 * col2 + col1 AS col2 FROM tab2 AS cor0
----
-22568
-24531
-39825

query I rowsort
SELECT - - col2 + - col2 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4504
SELECT ALL CAST( ( col0 ) AS SIGNED ) + - CAST( col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-4504
SELECT ALL CAST ( ( col0 ) AS INTEGER ) + - CAST ( col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT 23 * - 97 AS col2 FROM tab0 AS cor0
----
-2231

onlyif mysql # use DIV operator for integer division
query I rowsort label-4506
SELECT ALL - col0 DIV - col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4506
SELECT ALL - col0 / - col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - + col1 + - col0 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT 65 * col2 AS col1 FROM tab0 AS cor0
----
2145
5330
65

query I rowsort
SELECT DISTINCT - + col0 * col2 - col0 FROM tab2 cor0
----
-196
-2106
-3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4510
SELECT + CAST( 27 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
27
27
27

skipif mysql # not compatible
query I rowsort label-4510
SELECT + CAST ( 27 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
27
27
27

query I rowsort
SELECT - col0 * - col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - 48 AS col0 FROM tab0 AS cor0
----
-48

query I rowsort
SELECT ALL ( 10 ) + col1 * - col0 AS col2 FROM tab1 AS cor0
----
-1030
-630
-68

query I rowsort
SELECT ALL - + col2 * + 54 + + col0 AS col2 FROM tab0 AS cor0
----
-1758
-19
-4339

query I rowsort
SELECT - - 35 * col1 FROM tab2 AS cor0
----
1085
2065
595

query I rowsort
SELECT DISTINCT 77 FROM tab0 AS cor0
----
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4517
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - col2 - - col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4517
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - col2 - - col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT - 52 + - col1 * col1 * - ( + 61 ) FROM tab2 AS cor0
----
17577
212289
58569

onlyif mysql # use DIV operator for integer division
query I rowsort label-4519
SELECT + - 26 DIV - col1 + col2 AS col0 FROM tab1 AS cor0
----
55
59
98

skipif mysql # not compatible
query I rowsort label-4519
SELECT + - 26 / - col1 + col2 AS col0 FROM tab1 AS cor0
----
55
59
98

query I rowsort
SELECT - 78 FROM tab0 AS cor0
----
-78
-78
-78

query I rowsort
SELECT ALL + col2 * + 54 AS col0 FROM tab2
----
1404
1458
2052

query I rowsort
SELECT + 5 + + tab1.col1 FROM tab1, tab2 cor0
----
9 values hashing to 9e975552aecb841ab1b71f9e0b60eed3

query I rowsort
SELECT + 36 + col2 - 49 FROM tab1 AS cor0
----
41
44
83

query I rowsort
SELECT + 64 * + col1 AS col0 FROM tab1 AS cor0
----
1664
640
832

query I rowsort
SELECT - col0 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4526
SELECT - col0 + col1 DIV - ( 50 ) FROM tab1 cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4526
SELECT - col0 + col1 / - ( 50 ) FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT + col2 - col0 * - 51 AS col0 FROM tab1 AS cor0
----
207
3321
4176

query I rowsort
SELECT col1 * - col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + ( - col2 ) * - 84 - col0 AS col2 FROM tab0 AS cor0
----
2748
49
6799

onlyif mysql # use DIV operator for integer division
query I rowsort label-4530
SELECT - col1 * col0 DIV col2 FROM tab0 AS cor0
----
-3395
-62
-98

skipif mysql # not compatible
query I rowsort label-4530
SELECT - col1 * col0 / col2 FROM tab0 AS cor0
----
-3395
-62
-98

query I rowsort
SELECT DISTINCT + - 10 AS col1 FROM tab1 AS cor0
----
-10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4532
SELECT ALL CAST( + col1 AS SIGNED ) * col1 AS col0 FROM tab1
----
100
169
676

skipif mysql # not compatible
query I rowsort label-4532
SELECT ALL CAST ( + col1 AS INTEGER ) * col1 AS col0 FROM tab1
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4533
SELECT 21 * col1 / - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4533
SELECT 21 * col1 / - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) * - col1 - + cor0.col0 * + col0 col2 FROM tab1 AS cor0
----
-3456
-5360
69

query I rowsort
SELECT + cor0.col2 * cor0.col2 * col0 - col2 * + col1 FROM tab2 AS cor0
----
113430
4266
51194

query I rowsort
SELECT ALL + + 75 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT ALL 87 FROM tab2
----
87
87
87

query I rowsort
SELECT ALL + col0 - - col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - + col1 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - col2 * - tab1.col1 + - 94 FROM tab1
----
1154
1310
476

query I rowsort
SELECT ALL - 45 AS col1 FROM tab2
----
-45
-45
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 87 col0 FROM tab1 AS cor0
----
-87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4543
SELECT CAST( - 90 AS SIGNED ) FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

skipif mysql # not compatible
query I rowsort label-4543
SELECT CAST ( - 90 AS INTEGER ) FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4544
SELECT col2 + col1 * + CAST( NULL AS SIGNED ) 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-4544
SELECT col2 + col1 * + CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 84 AS col2 FROM tab2 AS cor0
----
-84
-84
-84

query I rowsort
SELECT DISTINCT 24 * - col2 FROM tab2 AS cor0
----
-624
-648
-912

query I rowsort
SELECT - col1 * col1 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT 59 - + 56 * col2 * col1 FROM tab1
----
-31861
-69829
-78565

query I rowsort
SELECT DISTINCT - + col2 FROM tab0 cor0
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4550
SELECT CAST( NULL AS SIGNED ) * - ( + cor1.col0 ) + - 63 FROM tab0, tab0 cor0, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4550
SELECT CAST ( NULL AS INTEGER ) * - ( + cor1.col0 ) + - 63 FROM tab0, tab0 cor0, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 49 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT + 89 AS col2 FROM tab2 cor0
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col0 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT + col2 * - col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT - col2 + + col2 * ( - col2 ) FROM tab0
----
-1122
-2
-6806

query I rowsort
SELECT col1 * - col2 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + col2 * + 75 FROM tab0 AS cor0
----
2475
6150
75

query I rowsort
SELECT + col0 * - col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT + cor1.col1 + + 28 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 3f1ace32ef9e1c1abf5800b38c8d1cf2

query I rowsort
SELECT + tab0.col1 * tab0.col2 + 16 FROM tab0
----
113
2854
7478

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - tab0.col0 * + col2 ) col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT col1 * col2 + 86 FROM tab1
----
1334
1490
656

query I rowsort
SELECT DISTINCT + col0 * col2 AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT + 20 AS col1 FROM tab0
----
20
20
20

query I rowsort
SELECT - ( col2 ) AS col2 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 76 col1 FROM tab1
----
76

query I rowsort
SELECT DISTINCT ( - col2 ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + - 69 * + cor0.col2 * col2 FROM tab2 AS cor0
----
-46644
-50301
-99636

query I rowsort
SELECT - cor0.col2 * - col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL + + col2 + 74 * col1 AS col1 FROM tab2 AS cor0
----
1296
2321
4392

query I rowsort
SELECT DISTINCT - - 25 * - cor0.col2 FROM tab2 AS cor0
----
-650
-675
-950

query I rowsort
SELECT DISTINCT - 29 * col2 FROM tab1 AS cor0
----
-1566
-1653
-2784

onlyif mysql # use DIV operator for integer division
query I rowsort label-4573
SELECT ALL col2 DIV col1 AS col2 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-4573
SELECT ALL col2 / col1 AS col2 FROM tab1 AS cor0
----
2
5
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4574
SELECT DISTINCT + CAST( col0 AS SIGNED ) * col2 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-4574
SELECT DISTINCT + CAST ( col0 AS INTEGER ) * col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 77 * - col0 AS col0 FROM tab2 cor0
----
-539
-6006
-6083

query I rowsort
SELECT ALL ( - col1 ) * cor0.col2 + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT ALL - col0 + + 13 * col1 FROM tab2 AS cor0
----
142
396
689

query I rowsort
SELECT + + cor0.col0 * 75 + + col1 AS col2 FROM tab1 AS cor0
----
251
4810
6013

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + ( cor0.col1 * - col1 ) col1 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT + col2 * - cor0.col2 + + col0 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT ALL 57 AS col1 FROM tab0 AS cor0
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - ( + col2 ) + - col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT ALL col1 + + ( col1 ) FROM tab1
----
20
26
52

query I rowsort
SELECT - 29 AS col0 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 56a8aa9e4c5d3c934d1853afeb22653e

query I rowsort
SELECT ALL - col2 * col0 AS col1 FROM tab2
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4587
SELECT col0 DIV col2 col2 FROM tab1 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4587
SELECT col0 / col2 col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT ALL - - ( - col0 ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - col0 + cor0.col2 + col1 FROM tab2 AS cor0
----
-24
51
7

query I rowsort
SELECT 7 * - col0 * col1 FROM tab2 cor0
----
-1519
-32214
-9401

query I rowsort
SELECT ALL col1 * - col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT - col0 + - 3 * - col1 AS col0 FROM tab0 AS cor0
----
184
234
256

query I rowsort
SELECT 30 * - ( col1 ) AS col2 FROM tab1
----
-300
-390
-780

query I rowsort
SELECT DISTINCT + ( - 31 * + col2 ) + 70 AS col2 FROM tab2
----
-1108
-736
-767

query I rowsort
SELECT 69 * - 66 * col0 FROM tab1
----
-13662
-291456
-364320

query I rowsort
SELECT DISTINCT 27 FROM tab0
----
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4597
SELECT DISTINCT + CAST( 69 + + col1 * col0 AS SIGNED ) FROM tab2
----
1412
286
4671

skipif mysql # not compatible
query I rowsort label-4597
SELECT DISTINCT + CAST ( 69 + + col1 * col0 AS INTEGER ) FROM tab2
----
1412
286
4671

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4598
SELECT CAST( 66 AS SIGNED ) * col2 AS col0 FROM tab1
----
3564
3762
6336

skipif mysql # not compatible
query I rowsort label-4598
SELECT CAST ( 66 AS INTEGER ) * col2 AS col0 FROM tab1
----
3564
3762
6336

query I rowsort
SELECT 84 - - cor0.col1 * + 27 FROM tab1, tab0 AS cor0
----
9 values hashing to aedc6207dfb28c244ea68dc7ee65ac34

query I rowsort
SELECT + 53 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4601
SELECT - tab0.col0 * col1 + - col1 DIV - 83 AS col1 FROM tab0
----
-2063
-3394
-8098

skipif mysql # not compatible
query I rowsort label-4601
SELECT - tab0.col0 * col1 + - col1 / - 83 AS col1 FROM tab0
----
-2063
-3394
-8098

query I rowsort
SELECT DISTINCT 62 FROM tab1, tab1 AS cor0
----
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4603
SELECT DISTINCT tab0.col2 DIV + col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-4603
SELECT DISTINCT tab0.col2 / + col1 FROM tab0
----
0

query I rowsort
SELECT DISTINCT col1 * col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT + cor0.col0 + col1 AS col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT + - ( + col2 ) * + col1 + col0 * col0 FROM tab1 AS cor0
----
-1395
3526
5152

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col0 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - 0 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - + col0 + - col1 AS col0 FROM tab2 AS cor0
----
-137
-38
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + - col0 col2 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT - col0 * + col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4612
SELECT DISTINCT - cor0.col2 + col1 DIV col0 + col2 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4612
SELECT DISTINCT - cor0.col2 + col1 / col0 + col2 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT DISTINCT col0 + + col0 AS col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL 39 FROM tab0, tab0 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT DISTINCT + col1 * - col0 - + 74 * col0 * 59 FROM tab0 AS cor0
----
-106848
-156205
-396673

onlyif mysql # use DIV operator for integer division
query I rowsort label-4616
SELECT - col2 - cor0.col0 DIV - 67 AS col2 FROM tab1 AS cor0
----
-54
-57
-95

skipif mysql # not compatible
query I rowsort label-4616
SELECT - col2 - cor0.col0 / - 67 AS col2 FROM tab1 AS cor0
----
-54
-57
-95

query I rowsort
SELECT DISTINCT + + col0 * + col0 + col1 * col0 FROM tab0 AS cor0
----
16020
2640
4620

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4618
SELECT - col2 * CAST( col0 AS SIGNED ) + + col1 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

skipif mysql # not compatible
query I rowsort label-4618
SELECT - col2 * CAST ( col0 AS INTEGER ) + + col1 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL - col2 * + col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + col0 * - 76 FROM tab0 AS cor0
----
-1824
-2660
-6764

query I rowsort
SELECT + col1 + 47 AS col0 FROM tab2 AS cor0
----
106
64
78

query I rowsort
SELECT col1 - + 31 FROM tab1 AS cor0
----
-18
-21
-5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4623
SELECT ALL col0 * - CAST( NULL AS SIGNED ) * ( + col0 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4623
SELECT ALL col0 * - CAST ( NULL AS INTEGER ) * ( + col0 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * 8 * - ( col0 ) + + col2 * - col2 AS col2 FROM tab0
----
-281
-65108
-7425

query I rowsort
SELECT col0 * + col1 - - 31 FROM tab1 AS cor0
----
1071
109
671

query I rowsort
SELECT ALL - + col2 + - ( + col2 ) FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col1 - + 91 AS col2 FROM tab0 AS cor0
----
-5
0
6

query I rowsort
SELECT ALL col2 * + col0 + + col1 FROM tab1 AS cor0
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 56 col1 FROM tab2 AS cor0
----
56

query I rowsort
SELECT ALL - + col2 * + col0 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - 26 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 47d0574274146de273829785364ada39

query I rowsort
SELECT 44 * col0 + - col1 FROM tab1 AS cor0
----
106
2806
3507

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4634
SELECT DISTINCT CAST( NULL AS SIGNED ) * 91 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4634
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 91 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 14 * + ( col2 ) + col0 + - col1 * + col1 FROM tab0 cor0
----
-6910
-7044
-9360

query I rowsort
SELECT col2 + col0 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL + 70 * col0 + col1 AS col1 FROM tab2 AS cor0
----
521
5519
5547

query I rowsort
SELECT + 4 FROM tab2, tab1 cor0, tab0, tab0 AS cor1
----
81 values hashing to 3347a3237b37ed63205e9440d8818a46

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 cor0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 380241bbc503a31e70494611a87ffd99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4640
SELECT CAST( - col0 AS SIGNED ) - col0 * + col0 AS col0 FROM tab0 AS cor0
----
-1260
-600
-8010

skipif mysql # not compatible
query I rowsort label-4640
SELECT CAST ( - col0 AS INTEGER ) - col0 * + col0 AS col0 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT - col2 * + col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT cor0.col1 * 93 + 39 AS col0 FROM tab0 AS cor0
----
8037
8502
9060

query I rowsort
SELECT + - col1 + col1 * col1 AS col0 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT - col1 * col1 + 99 AS col1 FROM tab2 cor0
----
-190
-3382
-862

query I rowsort
SELECT + - col0 + + col1 FROM tab2 cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-4646
SELECT + col1 DIV col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-4646
SELECT + col1 / col2 FROM tab0 AS cor0
----
1
2
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4647
SELECT + col0 DIV ( - 87 ) + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4647
SELECT + col0 / ( - 87 ) + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL + 54 * - col0 AS col0 FROM tab1
----
-162
-3456
-4320

onlyif mysql # use DIV operator for integer division
query I rowsort label-4649
SELECT + col2 DIV col0 + cor0.col1 AS col2 FROM tab2 AS cor0
----
17
34
59

skipif mysql # not compatible
query I rowsort label-4649
SELECT + col2 / col0 + cor0.col1 AS col2 FROM tab2 AS cor0
----
17
34
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * ( - ( col2 ) ) * ( + col0 ) + + col0 col0 FROM tab2 AS cor0
----
1330
158262
237237

query I rowsort
SELECT + + col0 + - 26 AS col1 FROM tab1 AS cor0
----
-23
38
54

query I rowsort
SELECT DISTINCT 66 AS col0 FROM tab0, tab0 AS cor0
----
66

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab0 cor1, tab1 cor2
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

query I rowsort
SELECT ALL - col2 * col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT DISTINCT + col1 * - col1 AS col0 FROM tab2
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort
SELECT - - col2 * col2 + + CAST ( 88 * - col2 AS REAL ) - - ( col0 ) * + col2 FROM tab1 AS cor0
----
-1674
1881
8448

query I rowsort
SELECT DISTINCT col0 + 43 + col0 FROM tab2
----
199
201
57

query I rowsort
SELECT + - col1 + cor0.col0 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0 CROSS JOIN tab0, tab0 AS cor1
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
972 values hashing to ea0f747588ddf5869ee18a5e22d9f237

query I rowsort
SELECT 64 AS col1 FROM tab2
----
64
64
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-4663
SELECT + 36 * + tab0.col2 DIV - col2 col0 FROM tab0
----
-36
-36
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4663
SELECT + 36 * + tab0.col2 / - col2 col0 FROM tab0
----
-36
-36
-36

query I rowsort
SELECT 66 + tab0.col0 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to fa5abea9703325e238e45516f04d8fa5

query I rowsort
SELECT tab0.col2 * + col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0, tab1, tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - ( 5 ) FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 4f346dd2f65047c836c6957f80f0ef9e

query I rowsort
SELECT + ( col0 ) * 37 + 43 AS col2 FROM tab2 AS cor0
----
2929
2966
302

query I rowsort
SELECT ALL - ( + tab2.col0 ) * + 35 + - 94 - - col0 AS col0 FROM tab2
----
-2746
-2780
-332

onlyif mysql # use DIV operator for integer division
query I rowsort label-4670
SELECT ALL - col1 DIV col2 - + 13 * 95 FROM tab1
----
-1235
-1235
-1235

skipif mysql # not compatible
query I rowsort label-4670
SELECT ALL - col1 / col2 - + 13 * 95 FROM tab1
----
-1235
-1235
-1235

query I rowsort
SELECT col2 + + tab1.col1 * tab1.col2 AS col1 FROM tab1
----
1344
1458
627

query I rowsort
SELECT + + cor0.col1 + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - - 20 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT + col2 * 23 * ( col1 ) + + col2 AS col1 FROM tab1
----
13167
28800
32346

query I rowsort
SELECT DISTINCT col1 + 6 AS col0 FROM tab0
----
103
92
97

query I rowsort
SELECT ALL - - col0 + + 17 AS col0 FROM tab1 AS cor0
----
20
81
97

query I rowsort
SELECT + cor0.col1 + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL col2 + + cor0.col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - - col2 + cor0.col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - col0 + cor0.col0 AS col0 FROM tab2 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col1 col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 + col1 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - col2 + + col1 AS col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT - - col0 * - col2 * - 49 + + col0 * 57 * - 20 AS col0 FROM tab2 AS cor0
----
10452
1281
57038

query I rowsort
SELECT + col1 * col1 + col1 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT DISTINCT + ( - col2 + - col0 ) FROM tab2
----
-104
-117
-34

query I rowsort
SELECT + 94 - + col2 FROM tab0
----
12
61
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 38 * - 84 + - col1 col1 FROM tab0
----
3095
3101
3106

query I rowsort
SELECT + 71 AS col1 FROM tab2 cor0
----
71
71
71

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab0 cor1, tab0 AS cor2
----
972 values hashing to ea0f747588ddf5869ee18a5e22d9f237

query I rowsort
SELECT 5 + col1 FROM tab2 cor0
----
22
36
64

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 cor0, tab2 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 624c4b72c6f348b0f702418bfe39bd29

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4693
SELECT - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4693
SELECT - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor2.col2 FROM tab2, tab0 cor0, tab1 AS cor1, tab0 AS cor2
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col1 ) * + col2 col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT 3 AS col0 FROM tab1 AS cor0
----
3
3
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4697
SELECT ALL - col1 + - col1 + - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4697
SELECT ALL - col1 + - col1 + - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 72 AS col0 FROM tab1 AS cor0
----
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col2 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col1 col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - 40 AS col2 FROM tab1 AS cor0
----
-40
-40
-40

query I rowsort
SELECT DISTINCT - + 10 + + col1 AS col1 FROM tab0 AS cor0
----
76
81
87

query I rowsort
SELECT + + col1 * - col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + + cor0.col2 * - col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0, tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL col2 * + 92 * - col2 AS col0 FROM tab1
----
-268272
-298908
-847872

query I rowsort
SELECT ALL + + cor0.col0 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT 88 AS col1 FROM tab0 cor0
----
88
88
88

query I rowsort
SELECT ALL - + col2 + col1 + ( - 85 + col1 ) * col0 FROM tab1 AS cor0
----
-205
-4847
-5843

query I rowsort
SELECT DISTINCT - - col2 - cor0.col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + 89 * col2 + - col2 * - ( cor0.col2 ) AS col2 FROM tab1 AS cor0
----
17760
7722
8322

query I rowsort
SELECT + col1 + ( + col2 ) FROM tab1
----
109
67
80

query I rowsort
SELECT col2 + 39 FROM tab0
----
121
40
72

query I rowsort
SELECT DISTINCT + - tab1.col0 + 46 AS col1 FROM tab1, tab2, tab1 cor0, tab0
----
-18
-34
43

query I rowsort
SELECT - col0 * col1 + - 5 FROM tab1 AS cor0
----
-1045
-645
-83

query I rowsort
SELECT - cor0.col2 * ( col2 ) + col2 AS col1 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT cor0.col2 + col0 * col1 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4718
SELECT DISTINCT + col1 * + CAST( NULL AS SIGNED ) - col1 AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4718
SELECT DISTINCT + col1 * + CAST ( NULL AS INTEGER ) - col1 AS col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL + cor0.col2 - col0 AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - col0 + + col2 * col1 AS col1 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT - col2 + col0 * col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL - - cor0.col1 AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + col1 * + ( - 99 + - col2 ) FROM tab2 AS cor0
----
-2329
-3906
-7375

query I rowsort
SELECT ALL - 98 * col0 + - col2 AS col1 FROM tab0 AS cor0
----
-2385
-3431
-8804

query I rowsort
SELECT DISTINCT + - ( - col1 ) * - col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - cor0.col1 + - col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL - 54 FROM tab1 cor0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT + col2 * col0 - col2 * - ( + col2 * - col0 ) FROM tab0 AS cor0
----
-25344
-591138
0

query I rowsort
SELECT DISTINCT - - ( + col0 ) + col0 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-4730
SELECT DISTINCT cor0.col0 DIV - col0 - col1 FROM tab0 AS cor0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-4730
SELECT DISTINCT cor0.col0 / - col0 - col1 FROM tab0 AS cor0
----
-87
-92
-98

query I rowsort
SELECT ALL - col2 * + 29 FROM tab0 AS cor0
----
-2378
-29
-957

query I rowsort
SELECT ALL - ( + col0 ) + col1 * + 3 FROM tab0 AS cor0
----
184
234
256

query I rowsort
SELECT ALL + - col0 * col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4734
SELECT DISTINCT + - CAST( NULL AS SIGNED ) * + col0 / cor0.col1 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4734
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * + col0 / cor0.col1 AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + ( + 70 ) AS col2 FROM tab2 AS cor0
----
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4736
SELECT - CAST( col2 AS SIGNED ) * col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-4736
SELECT - CAST ( col2 AS INTEGER ) * col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 AS col2 FROM tab2 cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4738
SELECT ALL + + ( - 27 ) + + col0 * col2 DIV - col1 AS col0 FROM tab1 AS cor0
----
-33
-391
-617

skipif mysql # not compatible
query I rowsort label-4738
SELECT ALL + + ( - 27 ) + + col0 * col2 / - col1 AS col0 FROM tab1 AS cor0
----
-33
-391
-617

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) col0 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4740
SELECT DISTINCT - + col2 DIV + 10 + + col1 FROM tab1 AS cor0
----
21
4
5

skipif mysql # not compatible
query I rowsort label-4740
SELECT DISTINCT - + col2 / + 10 + + col1 FROM tab1 AS cor0
----
21
4
5

query I rowsort
SELECT col1 + 58 FROM tab2
----
117
75
89

query I rowsort
SELECT DISTINCT + col0 * cor0.col1 + - col1 AS col2 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT 35 AS col1 FROM tab0 AS cor0
----
35
35
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4744
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + + col2 * + col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4744
SELECT DISTINCT + CAST ( NULL AS REAL ) + + col2 * + col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + + ( - cor0.col2 ) * - col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - tab0.col0 + 44 AS col0 FROM tab0
----
-45
20
9

query I rowsort
SELECT DISTINCT col2 + col2 * 91 FROM tab0
----
3036
7544
92

query I rowsort
SELECT DISTINCT + - col0 + + col0 * ( col2 ) AS col1 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT + col2 - - col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL - - col1 * col1 FROM tab2 cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-4751
SELECT DISTINCT - 52 DIV col0 AS col1 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-4751
SELECT DISTINCT - 52 / col0 AS col1 FROM tab0 AS cor0
----
-1
-2
0

query I rowsort
SELECT ALL + ( - col1 ) + - ( col1 ) AS col2 FROM tab0
----
-172
-182
-194

query I rowsort
SELECT + - 36 FROM tab2 AS cor0
----
-36
-36
-36

query I rowsort
SELECT ALL + + col0 * cor0.col0 * cor0.col0 AS col0 FROM tab2 AS cor0
----
343
474552
493039

query I rowsort
SELECT + col0 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - - cor0.col0 + - 32 + + cor0.col2 AS col2 FROM tab2, tab1, tab2 cor0
----
27 values hashing to 44cc3a1b510f6792112872d48dcd0e1d

query I rowsort
SELECT + col2 * col1 * + col0 FROM tab1
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-4758
SELECT - CAST( ( - col0 ) + ( + col2 ) AS SIGNED ) DIV col2 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4758
SELECT - CAST ( ( - col0 ) + ( + col2 ) AS INTEGER ) / col2 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + + col1 * col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL + + col1 * - col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - 28 + col1 AS col0 FROM tab0 AS cor0
----
58
63
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col2 ) col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - col1 + col0 AS col1 FROM tab2 cor0
----
-24
19
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4764
SELECT DISTINCT + ( + col2 ) * + CAST( + col2 AS SIGNED ) FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-4764
SELECT DISTINCT + ( + col2 ) * + CAST ( + col2 AS INTEGER ) FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4765
SELECT col1 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4765
SELECT col1 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 + col0 * 49 FROM tab2 AS cor0
----
370
3848
3909

query I rowsort
SELECT + cor0.col0 * - 93 + + ( col1 ) AS col2 FROM tab0 AS cor0
----
-2146
-3158
-8186

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4768
SELECT + col0 * + CAST( NULL AS SIGNED ) + 39 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4768
SELECT + col0 * + CAST ( NULL AS INTEGER ) + 39 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col2 col1 FROM tab2
----
-104
-117
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-4770
SELECT cor0.col0 DIV ( - 2 + col1 ) AS col0 FROM tab1 AS cor0
----
0
7
8

skipif mysql # not compatible
query I rowsort label-4770
SELECT cor0.col0 / ( - 2 + col1 ) AS col0 FROM tab1 AS cor0
----
0
7
8

query I rowsort
SELECT cor0.col1 + col2 * col0 AS col2 FROM tab0 cor0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col1 - cor0.col1 col0 FROM tab2 AS cor0
----
-40
-55
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-4773
SELECT DISTINCT col2 DIV col2 AS col2 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4773
SELECT DISTINCT col2 / col2 AS col2 FROM tab0 AS cor0
----
1

query I rowsort
SELECT DISTINCT col2 * + cor0.col1 + col2 AS col1 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-4775
SELECT col1 * col2 DIV + ( col1 ) + + cor0.col1 AS col0 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-4775
SELECT col1 * col2 / + ( col1 ) + + cor0.col1 AS col0 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4776
SELECT ALL col1 * tab2.col0 DIV - col0 + col1 * col0 AS col1 FROM tab2
----
1326
186
4543

skipif mysql # not compatible
query I rowsort label-4776
SELECT ALL col1 * tab2.col0 / - col0 + col1 * col0 AS col1 FROM tab2
----
1326
186
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-4777
SELECT - col0 + - col1 DIV - col2 AS col0 FROM tab0 cor0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-4777
SELECT - col0 + - col1 / - col2 AS col0 FROM tab0 cor0
----
-22
-88
62

query I rowsort
SELECT ALL + col0 + + tab1.col2 FROM tab1
----
121
176
57

query I rowsort
SELECT - - 49 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT 91 + + 69 FROM tab0, tab0 AS cor0
----
9 values hashing to ac5ffad908886e53c315f058c5fe2210

query I rowsort
SELECT ALL - col1 + 33 AS col2 FROM tab1
----
20
23
7

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab0, tab0 cor1
----
243 values hashing to 3e8bd9634a3f5947d8becd5f5799bb7f

onlyif mysql # use DIV operator for integer division
query I rowsort label-4784
SELECT - col2 DIV col0 + tab2.col1 AS col0 FROM tab2
----
17
28
59

skipif mysql # not compatible
query I rowsort label-4784
SELECT - col2 / col0 + tab2.col1 AS col0 FROM tab2
----
17
28
59

query I rowsort
SELECT + tab0.col2 + tab0.col2 FROM tab0
----
164
2
66

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 cor0, tab2, tab1 cor1
----
972 values hashing to 9364ef7545b07c67767dceb70f02c643

query I rowsort
SELECT + col2 + col0 AS col2 FROM tab2 cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL col2 * - col2 + + col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL - - cor0.col0 * col0 AS col2 FROM tab1 cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4791
SELECT - + col2 * + ( col1 ) DIV col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-4791
SELECT - + col2 * + ( col1 ) / col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT col2 + + 27 FROM tab2 AS cor0
----
53
54
65

query I rowsort
SELECT + col1 * col0 - - col2 * - cor0.col0 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT ALL - - col2 + col2 AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT + col1 * - col0 + ( col1 ) FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL col2 * 91 AS col1 FROM tab2
----
2366
2457
3458

query I rowsort
SELECT ALL tab2.col0 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

query I rowsort
SELECT + 54 FROM tab0, tab0 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT ALL - 63 AS col2 FROM tab1 AS cor0
----
-63
-63
-63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4801
SELECT - + CAST( + 90 AS SIGNED ) * col1 + - 86 FROM tab0 AS cor0
----
-7826
-8276
-8816

skipif mysql # not compatible
query I rowsort label-4801
SELECT - + CAST ( + 90 AS INTEGER ) * col1 + - 86 FROM tab0 AS cor0
----
-7826
-8276
-8816

query I rowsort
SELECT ALL + - col1 + + ( col2 * col0 ) FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT DISTINCT - + col1 + 5 FROM tab2 AS cor0
----
-12
-26
-54

onlyif mysql # use DIV operator for integer division
query I rowsort label-4804
SELECT col2 * - col1 DIV col1 AS col0 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4804
SELECT col2 * - col1 / col1 AS col0 FROM tab0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4805
SELECT ALL + col0 DIV col2 + col2 DIV tab1.col1 FROM tab1
----
2
6
7

skipif mysql # not compatible
query I rowsort label-4805
SELECT ALL + col0 / col2 + col2 / tab1.col1 FROM tab1
----
2
6
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col1 * col0 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT col0 * col0 + + col2 * cor0.col1 * cor0.col0 AS col2 FROM tab2 AS cor0
----
125736
57275
5908

query I rowsort
SELECT DISTINCT + 64 AS col0 FROM tab2 AS cor0
----
64

query I rowsort
SELECT 33 + - col2 FROM tab2 AS cor0
----
-5
6
7

query I rowsort
SELECT + col2 * - ( + col0 ) AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - 29 + - col1 AS col1 FROM tab0 AS cor0
----
-115
-120
-126

query I rowsort
SELECT ALL - 7 FROM tab1
----
-7
-7
-7

query I rowsort
SELECT col1 * col1 + - col2 FROM tab0 AS cor0
----
7363
8199
9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + - ( - col1 ) col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT + + 13 FROM tab0 AS cor0
----
13
13
13

query I rowsort
SELECT + - col2 * col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + - col1 col2 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT - 84 + - col2 FROM tab0 AS cor0
----
-117
-166
-85

query I rowsort
SELECT ALL - cor0.col2 + - col1 * - col0 AS col0 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4821
SELECT CAST( NULL AS SIGNED ) col1 FROM tab0, tab2 cor0, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4821
SELECT CAST ( NULL AS INTEGER ) col1 FROM tab0, tab2 cor0, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL + 68 + col1 - - col1 * col0 AS col2 FROM tab1 AS cor0
----
1121
172
718

query I rowsort
SELECT ALL 22 AS col2 FROM tab1
----
22
22
22

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 cor2
----
3645 values hashing to dd5ce24448edb4b3ab62c251475d6548

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + 40 col1 FROM tab0 cor0
----
122
41
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4826
SELECT - col2 / - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4826
SELECT - col2 / - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - tab2.col0 * ( + col0 * col2 ) FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT ALL col2 * + col1 + col2 * col1 FROM tab2
----
1292
1674
3068

query I rowsort
SELECT ALL col1 * 59 + + col0 * - col2 * - 98 + 87 AS col2 FROM tab2
----
202312
20438
295286

query I rowsort
SELECT - 75 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 258bc565c64924d905a55eaaa6e57547

query I rowsort
SELECT - + col1 * + col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-4832
SELECT ALL + col0 * 44 + - col1 DIV + col0 + + ( cor0.col2 ) DIV col1 FROM tab2 AS cor0
----
304
3432
3478

skipif mysql # not compatible
query I rowsort label-4832
SELECT ALL + col0 * 44 + - col1 / + col0 + + ( cor0.col2 ) / col1 FROM tab2 AS cor0
----
304
3432
3478

onlyif mysql # use DIV operator for integer division
query I rowsort label-4833
SELECT ALL + - col2 DIV - col0 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-4833
SELECT ALL + - col2 / - col0 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT + 95 FROM tab1, tab1 cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT ALL + 22 + - 73 FROM tab1 AS cor0
----
-51
-51
-51

query I rowsort
SELECT DISTINCT - 25 + - col1 * col0 AS col0 FROM tab2 AS cor0
----
-1368
-242
-4627

query I rowsort
SELECT DISTINCT col1 * - ( - col1 ) AS col0 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT ( + 13 ) + col1 * + col0 AS col1 FROM tab1 AS cor0
----
1053
653
91

query I rowsort
SELECT ALL - col2 * - cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4840
SELECT ALL + ( col1 ) + col0 * + cor0.col0 DIV + col0 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-4840
SELECT ALL + ( col1 ) + col0 * + cor0.col0 / + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + col1 + 83 AS col1 FROM tab0 AS cor0
----
169
174
180

query I rowsort
SELECT DISTINCT + 69 * col0 + col0 FROM tab0 AS cor0
----
1680
2450
6230

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to 5e655b1287771868a8f868574a94d749

query I rowsort
SELECT + 65 FROM tab0, tab0 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT + ( col2 ) + col2 FROM tab0
----
164
2
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4846
SELECT DISTINCT + CAST( NULL AS SIGNED ) - - 55 / col2 AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4846
SELECT DISTINCT + CAST ( NULL AS INTEGER ) - - 55 / col2 AS col0 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * 17 * col0 col2 FROM tab1
----
10880
1326
17680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4848
SELECT ALL col1 DIV - tab2.col0 AS col1 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-4848
SELECT ALL col1 / - tab2.col0 AS col1 FROM tab2
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * 70 col1 FROM tab1
----
1820
700
910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 41 - 92 col1 FROM tab1
----
-51
-51
-51

query I rowsort
SELECT + + cor0.col2 AS col0 FROM tab0, tab2, tab1 cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4852
SELECT + CAST( 67 AS SIGNED ) + col2 * col2 AS col1 FROM tab2 AS cor0
----
1511
743
796

skipif mysql # not compatible
query I rowsort label-4852
SELECT + CAST ( 67 AS INTEGER ) + col2 * col2 AS col1 FROM tab2 AS cor0
----
1511
743
796

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4853
SELECT - CAST( NULL AS DECIMAL ) * - 20 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4853
SELECT - CAST ( NULL AS REAL ) * - 20 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT col1 + - cor0.col2 AS col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT - - cor0.col1 + col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL ( - tab1.col1 ) + - ( col2 + - col0 ) AS col2 FROM tab1
----
-29
-3
-77

query I rowsort
SELECT - col0 * 29 FROM tab1 AS cor0
----
-1856
-2320
-87

query I rowsort
SELECT cor0.col0 * + col0 * + col1 FROM tab1 AS cor0
----
234
40960
83200

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 cor2
----
972 values hashing to 9345325155d9f4d7dc4986690c631cb9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * ( col0 ) * cor0.col0 col2 FROM tab2 AS cor0
----
343
474552
493039

query I rowsort
SELECT DISTINCT + + cor0.col2 + ( + cor0.col1 ) AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - + col1 + + ( 21 ) * col0 AS col2 FROM tab1 AS cor0
----
1334
1667
37

query I rowsort
SELECT + col1 * + col1 + 26 AS col1 FROM tab1 AS cor0
----
126
195
702

query I rowsort
SELECT ALL col0 + col0 * - col2 AS col1 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT + + col0 * - ( col2 ) FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4866
SELECT DISTINCT - col1 DIV + col1 - col2 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-4866
SELECT DISTINCT - col1 / + col1 - col2 FROM tab0 AS cor0
----
-2
-34
-83

query I rowsort
SELECT - cor0.col1 * 92 AS col1 FROM tab0 AS cor0
----
-7912
-8372
-8924

query I rowsort
SELECT DISTINCT + - col1 + - cor0.col0 FROM tab1 AS cor0
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT + - cor0.col1 + - CAST ( col1 AS REAL ) col2 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT DISTINCT - col2 * - cor0.col1 + col2 * + col1 AS col1 FROM tab2 AS cor0
----
1292
1674
3068

query I rowsort
SELECT ALL col0 + cor0.col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + + 98 - + col0 FROM tab2 AS cor0
----
19
20
91

query I rowsort
SELECT + col1 * col0 + col2 * - col1 FROM tab0 AS cor0
----
-774
3298
637

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + - col0 * col0 col1 FROM tab1 AS cor0
----
-4153
-63
-6496

onlyif mysql # use DIV operator for integer division
query I rowsort label-4875
SELECT ALL col0 * col0 + col1 DIV 4 AS col1 FROM tab1
----
15
4098
6403

skipif mysql # not compatible
query I rowsort label-4875
SELECT ALL col0 * col0 + col1 / 4 AS col1 FROM tab1
----
15
4098
6403

query I rowsort
SELECT col2 + - 19 FROM tab0
----
-18
14
63

query I rowsort
SELECT - 56 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 3d3dab400eef93c098acbbba3fc9bdc6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 14 * - 5 + col2 col0 FROM tab1
----
-13
-16
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - col0 col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + ( + col2 * + 39 ) + - 50 AS col1 FROM tab2
----
1003
1432
964

query I rowsort
SELECT DISTINCT - 57 * col2 * + col0 AS col2 FROM tab2
----
-10773
-115596
-171114

query I rowsort
SELECT ALL col0 + - col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL 99 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 05ea182fd6036c7f5e0ea08fc061cc67

query I rowsort
SELECT + 67 + cor0.col0 FROM tab2 cor0
----
145
146
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-4885
SELECT ALL + - col1 DIV - col1 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4885
SELECT ALL + - col1 / - col1 AS col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT + 85 * + col2 + col0 FROM tab0 AS cor0
----
120
2829
7059

query I rowsort
SELECT ALL + - col2 * col2 * + 72 + cor0.col1 AS col1 FROM tab0 AS cor0
----
-484037
-78322
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-4888
SELECT col2 + col0 DIV ( - col1 ) AS col0 FROM tab2 cor0
----
25
27
34

skipif mysql # not compatible
query I rowsort label-4888
SELECT col2 + col0 / ( - col1 ) AS col0 FROM tab2 cor0
----
25
27
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4889
SELECT + col1 / CAST( NULL AS SIGNED ) - + 38 * - tab0.col1 / col0 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4889
SELECT + col1 / CAST ( NULL AS INTEGER ) - + 38 * - tab0.col1 / col0 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 * + col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 23 * 7 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 6a47bf60cc1a163b24ad0861e470fe6a

query I rowsort
SELECT DISTINCT - + col1 + - ( col1 ) FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT 23 + - 24 FROM tab2, tab2 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT DISTINCT + 31 + col1 + col2 * + 82 * col0 AS col1 FROM tab2 cor0
----
15560
166386
246212

onlyif mysql # use DIV operator for integer division
query I rowsort label-4895
SELECT ALL - col1 DIV + 59 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4895
SELECT ALL - col1 / + 59 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT 47 + col0 FROM tab1 AS cor0
----
111
127
50

query I rowsort
SELECT DISTINCT - col0 + + 1 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT + col0 * - col0 * col2 + - col2 - 6 AS col1 FROM tab0 AS cor0
----
-1232
-19047
-649610

query I rowsort
SELECT ALL 99 * + 26 AS col1 FROM tab0 AS cor0
----
2574
2574
2574

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4900
SELECT DISTINCT CAST( NULL AS SIGNED ) + 74 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4900
SELECT DISTINCT CAST ( NULL AS INTEGER ) + 74 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4901
SELECT - ( col2 ) DIV - col0 - ( 85 ) AS col2 FROM tab1 cor0
----
-67
-84
-85

skipif mysql # not compatible
query I rowsort label-4901
SELECT - ( col2 ) / - col0 - ( 85 ) AS col2 FROM tab1 cor0
----
-67
-84
-85

query I rowsort
SELECT + - cor0.col1 + - col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT - - col2 * + col2 + + col1 AS col0 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT ALL col2 * + 33 AS col0 FROM tab2 AS cor0
----
1254
858
891

query I rowsort
SELECT DISTINCT col2 * ( col1 * + ( col2 ) ) FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT DISTINCT - col2 + 63 * + col0 AS col2 FROM tab0 AS cor0
----
1479
2204
5525

query I rowsort
SELECT DISTINCT - col1 * col0 + col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT col1 + - col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT - col0 * - 64 + col1 FROM tab2 AS cor0
----
479
5051
5073

query I rowsort
SELECT + 94 - col2 * - col2 * + col1 FROM tab2 AS cor0
----
22693
24642
39978

query I rowsort
SELECT DISTINCT - 98 + cor0.col0 FROM tab1 AS cor0
----
-18
-34
-95

query I rowsort
SELECT + col0 + - col1 * col0 * col0 AS col1 FROM tab2 AS cor0
----
-106018
-1512
-358878

query I rowsort
SELECT 65 + - 95 AS col2 FROM tab0 AS cor0
----
-30
-30
-30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4914
SELECT ALL + + CAST( NULL AS SIGNED ) + col1 + - col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4914
SELECT ALL + + CAST ( NULL AS INTEGER ) + col1 + - col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 89 col0 FROM tab0
----
89
89
89

query I rowsort
SELECT 32 FROM tab2 AS cor0
----
32
32
32

query I rowsort
SELECT ALL ( col0 ) * tab1.col0 FROM tab1
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - 49 ) col1 FROM tab1
----
-49
-49
-49

query I rowsort
SELECT + - col0 * + 23 AS col1 FROM tab0 AS cor0
----
-2047
-552
-805

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4920
SELECT + - CAST( col1 AS SIGNED ) FROM tab1 cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-4920
SELECT + - CAST ( col1 AS INTEGER ) FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + - col2 + col0 * - col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT - ( col1 ) * col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-4923
SELECT - + 67 * col1 - col1 DIV - col0 FROM tab1 AS cor0
----
-1734
-670
-871

skipif mysql # not compatible
query I rowsort label-4923
SELECT - + 67 * col1 - col1 / - col0 FROM tab1 AS cor0
----
-1734
-670
-871

query I rowsort
SELECT - + col1 * col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col1 col1 FROM tab2 AS cor0
----
-55
-58
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 62 col0 FROM tab2 AS cor0
----
-62
-62
-62

query I rowsort
SELECT + - col2 - col1 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT + ( col2 ) * col0 AS col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT 93 + cor0.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 05914312b297696d8f1d59f325ce1fc0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4930
SELECT ALL + 47 + col1 DIV col2 FROM tab0
----
144
48
49

skipif mysql # not compatible
query I rowsort label-4930
SELECT ALL + 47 + col1 / col2 FROM tab0
----
144
48
49

query I rowsort
SELECT ALL tab1.col1 + + col2 AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT col0 + + col0 FROM tab2 AS cor0
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-4933
SELECT + + col0 * 2 DIV + col0 col0 FROM tab0 cor0
----
2
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4933
SELECT + + col0 * 2 / + col0 col0 FROM tab0 cor0
----
2
2
2

query I rowsort
SELECT + cor0.col2 + - 67 FROM tab0 AS cor0
----
-34
-66
15

query I rowsort
SELECT col2 * - ( - cor0.col0 ) FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + + col2 + col2 AS col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL cor0.col1 * - ( + 90 ) FROM tab0 cor0
----
-7740
-8190
-8730

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col2 col1 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4939
SELECT ALL - col1 DIV + col0 + 95 * + col2 FROM tab2
----
2470
2561
3610

skipif mysql # not compatible
query I rowsort label-4939
SELECT ALL - col1 / + col0 + 95 * + col2 FROM tab2
----
2470
2561
3610

query I rowsort
SELECT DISTINCT - col2 * tab1.col1 AS col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + + cor0.col0 * - 28 AS col2 FROM tab2 AS cor0
----
-196
-2184
-2212

query I rowsort
SELECT DISTINCT 95 FROM tab1, tab2 AS cor0
----
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col2 col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - + col1 * + 9 FROM tab1 AS cor0
----
-117
-234
-90

query I rowsort
SELECT DISTINCT col2 * col0 AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL cor0.col1 * - 80 FROM tab1, tab1 AS cor0
----
9 values hashing to 079de997d46ea33a34b419c94415338e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL - col2 * + col1 * + col0 AS col2 FROM tab0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-4949
SELECT cor0.col1 DIV tab0.col1 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-4949
SELECT cor0.col1 / tab0.col1 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col1 col2 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-4951
SELECT DISTINCT - col0 DIV - col1 + + col0 * - col1 + ( 56 ) AS col1 FROM tab2 cor0
----
-1283
-161
-4545

skipif mysql # not compatible
query I rowsort label-4951
SELECT DISTINCT - col0 / - col1 + + col0 * - col1 + ( 56 ) AS col1 FROM tab2 cor0
----
-1283
-161
-4545

query I rowsort
SELECT col2 * + col2 - + ( 6 + + col1 ) FROM tab2
----
1421
611
692

query I rowsort
SELECT col1 + col0 * col0 FROM tab1
----
35
4106
6413

query I rowsort
SELECT ALL + 36 AS col1 FROM tab0
----
36
36
36

query I rowsort
SELECT ALL cor0.col1 * 4 FROM tab0, tab1 AS cor0
----
9 values hashing to 0283f71b417ec35b356843b02acae958

query I rowsort
SELECT + col0 + - tab2.col1 AS col1 FROM tab2
----
-24
19
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4957
SELECT col1 * CAST( col0 AS SIGNED ) + + col2 - col2 * - col0 col2 FROM tab0 AS cor0
----
15479
2889
3431

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4957
SELECT col1 * CAST ( col0 AS INTEGER ) + + col2 - col2 * - col0 col2 FROM tab0 AS cor0
----
15479
2889
3431

query I rowsort
SELECT ALL col0 - col1 * col0 FROM tab0
----
-2040
-3360
-8010

query IIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 cor1
----
243 values hashing to 6506b295d3a7bcc5ed65956f5b4e38b0

query I rowsort
SELECT col1 * 52 FROM tab0 AS cor0
----
4472
4732
5044

onlyif mysql # use DIV operator for integer division
query I rowsort label-4961
SELECT ALL + col0 DIV + ( col2 * cor0.col0 ) FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4961
SELECT ALL + col0 / + ( col2 * cor0.col0 ) FROM tab0 cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col0 * - cor0.col1 + - ( col2 ) col0 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT - + col2 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - col1 + ( col0 ) * - col2 FROM tab1 cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL - + col2 + - col0 * + 20 * - col1 FROM tab2 AS cor0
----
26822
4313
92014

query I rowsort
SELECT + col1 + 63 * col2 + col0 AS col1 FROM tab2 AS cor0
----
1739
1775
2490

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 65 col0 FROM tab0 AS cor0
----
-2145
-5330
-65

query I rowsort
SELECT cor0.col1 * ( col0 ) + col1 + col2 FROM tab0 AS cor0
----
2183
3493
8272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col1 * cor0.col2 col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4970
SELECT CAST( NULL AS SIGNED ) * 65 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4970
SELECT CAST ( NULL AS INTEGER ) * 65 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 63 + col0 col2 FROM tab0
----
-28
-39
26

query I rowsort
SELECT DISTINCT + 26 AS col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab2
----
26

query I rowsort
SELECT - col2 + col2 * cor0.col2 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT col0 * - col0 AS col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT - + cor0.col1 * col0 + - col2 * + 27 AS col2 FROM tab1 AS cor0
----
-1536
-2179
-3632

query I rowsort
SELECT - 24 AS col0 FROM tab0 AS cor0
----
-24
-24
-24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4977
SELECT CAST( - col1 AS SIGNED ) * col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort label-4977
SELECT CAST ( - col1 AS INTEGER ) * col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 27 + + col0 * - 59 col0 FROM tab1 AS cor0
----
-150
-3749
-4693

query I rowsort
SELECT - 10 FROM tab0 AS cor0
----
-10
-10
-10

query I rowsort
SELECT - 44 + + col2 FROM tab0 AS cor0
----
-11
-43
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4981
SELECT + ( + col0 ) DIV + col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-4981
SELECT + ( + col0 ) / + col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT + 29 + + col1 AS col1 FROM tab2 cor0
----
46
60
88

query I rowsort
SELECT ALL 54 * col1 AS col0 FROM tab1 AS cor0
----
1404
540
702

query I rowsort
SELECT + + col1 + cor0.col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - - 10 + col2 * 14 FROM tab0 AS cor0
----
1158
24
472

query I rowsort
SELECT 28 * cor0.col0 FROM tab1 AS cor0
----
1792
2240
84

query I rowsort
SELECT - col2 * - col0 * + col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT ALL + cor0.col0 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT 58 FROM tab1 AS cor0
----
58

query I rowsort
SELECT ALL - - 16 AS col2 FROM tab1 AS cor0
----
16
16
16

query I rowsort
SELECT DISTINCT 66 * - cor0.col2 FROM tab2 cor0
----
-1716
-1782
-2508

query I rowsort
SELECT ALL - cor0.col0 + col0 * cor0.col2 + 51 FROM tab1 AS cor0
----
210
3635
7651

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * - col1 col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + 0 + col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL - 55 * cor0.col0 AS col1 FROM tab0 AS cor0
----
-1320
-1925
-4895

query I rowsort
SELECT DISTINCT - 32 * - col0 + - col0 * col1 FROM tab0 AS cor0
----
-1296
-2275
-5251

query I rowsort
SELECT ALL + col1 - col2 * - 26 FROM tab0 cor0
----
123
2223
944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 7 * - col0 col2 FROM tab0 AS cor0
----
168
245
623

query I rowsort
SELECT ALL - col0 + + col1 * col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT DISTINCT + 56 * + col1 AS col0 FROM tab1 AS cor0
----
1456
560
728

query I rowsort
SELECT DISTINCT col1 * col1 + - col2 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT ALL cor0.col1 + cor0.col2 * - col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab0 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to 57708840c4ff70ecdca82ffd05259432

query I rowsort
SELECT 2 AS col1 FROM tab0
----
2
2
2

query I rowsort
SELECT - 71 + cor0.col0 FROM tab1, tab2 cor0
----
9 values hashing to 4c72f2571ed7f8921b107b153b784b64

query I rowsort
SELECT ALL - cor0.col1 + col2 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL col1 * ( cor0.col1 ) AS col1 FROM tab1 AS cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 18 col1 FROM tab0
----
18

query I rowsort
SELECT DISTINCT cor1.col1 * + 35 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
1085
2065
595

query I rowsort
SELECT ALL - col0 + col1 * col1 FROM tab0 AS cor0
----
7372
8192
9374

query I rowsort
SELECT col1 * + 84 - col2 FROM tab2 AS cor0
----
1390
2577
4930

query I rowsort
SELECT DISTINCT - col2 * 20 FROM tab0 AS cor0
----
-1640
-20
-660

query I rowsort
SELECT ALL col2 + 71 AS col2 FROM tab2 AS cor0
----
109
97
98

query I rowsort
SELECT - ( col2 ) + + col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * col2 + - col0 + 11 AS col1 FROM tab0 AS cor0
----
-1102
-25
-6802

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + 83 - col2 col0 FROM tab1 AS cor0
----
32
67
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-5017
SELECT + col1 DIV 98 + - col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-5017
SELECT + col1 / 98 + - col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + - ( 84 ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
-84

query I rowsort
SELECT DISTINCT ( + col0 ) * col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5020
SELECT ALL - col1 DIV + ( col1 ) FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5020
SELECT ALL - col1 / + ( col1 ) FROM tab0
----
-1
-1
-1

query I rowsort
SELECT ALL + col2 + + col1 * col1 FROM tab1
----
157
265
730

query I rowsort
SELECT ALL col1 * ( col0 ) AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL + tab1.col2 * + col0 + col0 FROM tab1
----
165
3712
7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5024
SELECT ALL + CAST( + col2 AS SIGNED ) * + col2 * - col2 + tab1.col0 AS col1 FROM tab1
----
-157461
-185129
-884656

skipif mysql # not compatible
query I rowsort label-5024
SELECT ALL + CAST ( + col2 AS INTEGER ) * + col2 * - col2 + tab1.col0 AS col1 FROM tab1
----
-157461
-185129
-884656

query I rowsort
SELECT + cor1.col0 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + col0 + + col2 + col0 * col0 FROM tab0
----
1261
633
8092

query I rowsort
SELECT 17 FROM tab0, tab0 cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT - col2 * - 53 + col0 FROM tab0 AS cor0
----
1773
4435
88

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 4829ede06f586935ff95a5b0dfdb9199

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * col0 col1 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5031
SELECT + CAST( 38 AS SIGNED ) * col2 - CAST( 27 AS SIGNED ) * col2 AS col1 FROM tab1 AS cor0
----
1056
594
627

skipif mysql # not compatible
query I rowsort label-5031
SELECT + CAST ( 38 AS INTEGER ) * col2 - CAST ( 27 AS INTEGER ) * col2 AS col1 FROM tab1 AS cor0
----
1056
594
627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5032
SELECT DISTINCT - - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5032
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 31 * + col2 col2 FROM tab0 cor0
----
1023
2542
31

query I rowsort
SELECT - - 81 * col0 FROM tab2 cor0
----
567
6318
6399

query I rowsort
SELECT ALL col1 * 45 AS col1 FROM tab0 AS cor0
----
3870
4095
4365

query I rowsort
SELECT ALL 71 FROM tab2 AS cor0
----
71
71
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5037
SELECT - CAST( NULL AS SIGNED ) * col1 * - cor0.col2 + ( col2 ) * + col0 + - ( - col1 ) * + col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5037
SELECT - CAST ( NULL AS INTEGER ) * col1 * - cor0.col2 + ( col2 ) * + col0 + - ( - col1 ) * + col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + - col1 + col0 FROM tab1 AS cor0
----
-29
-3
-77

query I rowsort
SELECT DISTINCT - cor0.col0 * col2 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + 5 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 cor2
----
81 values hashing to 0da436460d6fcea5a1eb4b1d2219d7c9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col0 * + 63 col2 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 04b8e9c5719f7be9975451878625afd8

onlyif mysql # use DIV operator for integer division
query I rowsort label-5042
SELECT + 7 DIV + 68 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5042
SELECT + 7 / + 68 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 36 * ( + col1 ) + - col1 AS col1 FROM tab1
----
350
455
910

query I rowsort
SELECT ALL - tab0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( col2 ) col0 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + col2 * + col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + + col2 * col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + col2 + - col1 + + col0 * - col1 FROM tab1 AS cor0
----
-50
-593
-957

query I rowsort
SELECT DISTINCT + 76 * - col1 + col0 AS col2 FROM tab0
----
-6512
-6827
-7337

query I rowsort
SELECT - col0 * - col0 FROM tab0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5051
SELECT - ( - col0 ) DIV + col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5051
SELECT - ( - col0 ) / + col0 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL + 85 + 67 * col0 * col0 FROM tab0
----
38677
530792
82160

onlyif mysql # use DIV operator for integer division
query I rowsort label-5053
SELECT ( col1 ) DIV + col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-5053
SELECT ( col1 ) / + col0 FROM tab0
----
1
2
3

query I rowsort
SELECT ALL + col0 + + 67 FROM tab2 AS cor0
----
145
146
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5055
SELECT ALL - col0 * CAST( 69 AS SIGNED ) FROM tab2 AS cor0
----
-483
-5382
-5451

skipif mysql # not compatible
query I rowsort label-5055
SELECT ALL - col0 * CAST ( 69 AS INTEGER ) FROM tab2 AS cor0
----
-483
-5382
-5451

query I rowsort
SELECT - 0 FROM tab2
----
0
0
0

query I rowsort
SELECT 45 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT 69 - - tab2.col1 AS col1 FROM tab2
----
100
128
86

query I rowsort
SELECT col0 * ( col2 ) + - col0 AS col0 FROM tab0
----
0
7209
768

onlyif mysql # use DIV operator for integer division
query I rowsort label-5060
SELECT col0 * ( - ( - cor0.col1 ) ) DIV ( 81 + col2 ) FROM tab1 AS cor0
----
0
4
5

skipif mysql # not compatible
query I rowsort label-5060
SELECT col0 * ( - ( - cor0.col1 ) ) / ( 81 + col2 ) FROM tab1 AS cor0
----
0
4
5

query I rowsort
SELECT DISTINCT - col2 + + 54 FROM tab1 AS cor0
----
-3
-42
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5062
SELECT ALL - col2 DIV + 17 + + col1 AS col2 FROM tab2 AS cor0
----
15
30
58

skipif mysql # not compatible
query I rowsort label-5062
SELECT ALL - col2 / + 17 + + col1 AS col2 FROM tab2 AS cor0
----
15
30
58

query I rowsort
SELECT ALL - - cor0.col1 + - col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL col1 * col0 * 53 AS col1 FROM tab1 cor0
----
33920
4134
55120

onlyif mysql # use DIV operator for integer division
query I rowsort label-5065
SELECT DISTINCT col1 DIV - 49 FROM tab0 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-5065
SELECT DISTINCT col1 / - 49 FROM tab0 cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5066
SELECT + col0 DIV - ( - 5 + + col2 * col1 ) AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5066
SELECT + col0 / - ( - 5 + + col2 * col1 ) AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5067
SELECT - col1 * col2 DIV + col1 col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5067
SELECT - col1 * col2 / + col1 col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - - col1 * col2 + + 24 AS col1 FROM tab2 AS cor0
----
1558
670
861

query I rowsort
SELECT + cor0.col0 * col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - 2 FROM tab2, tab1 AS cor0
----
-2

onlyif mysql # use DIV operator for integer division
query I rowsort label-5071
SELECT tab2.col1 DIV 26 + - 73 AS col2 FROM tab2
----
-71
-72
-73

skipif mysql # not compatible
query I rowsort label-5071
SELECT tab2.col1 / 26 + - 73 AS col2 FROM tab2
----
-71
-72
-73

query I rowsort
SELECT 22 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT 92 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c64cb7a81da51f4be0b6906a223e8817

onlyif mysql # use DIV operator for integer division
query I rowsort label-5074
SELECT ALL col2 DIV - 64 - - col1 AS col2 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-5074
SELECT ALL col2 / - 64 - - col1 AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT cor0.col0 * - col2 * col2 - - col1 FROM tab1 AS cor0
----
-207926
-737267
-8722

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab0 cor1, tab1 cor2
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

onlyif mysql # use DIV operator for integer division
query I rowsort label-5077
SELECT ALL col1 - 71 DIV + col1 FROM tab2 AS cor0
----
13
29
58

skipif mysql # not compatible
query I rowsort label-5077
SELECT ALL col1 - 71 / + col1 FROM tab2 AS cor0
----
13
29
58

query I rowsort
SELECT + col1 * - 56 AS col2 FROM tab0 AS cor0
----
-4816
-5096
-5432

query I rowsort
SELECT DISTINCT - col0 * col2 AS col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + cor0.col2 + col2 AS col1 FROM tab0 AS cor0
----
164
2
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5081
SELECT + CAST( NULL AS SIGNED ) + - col2 * + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5081
SELECT + CAST ( NULL AS INTEGER ) + - col2 * + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5082
SELECT + CAST( - 59 AS SIGNED ) + + col1 AS col0 FROM tab0 AS cor0
----
27
32
38

skipif mysql # not compatible
query I rowsort label-5082
SELECT + CAST ( - 59 AS INTEGER ) + + col1 AS col0 FROM tab0 AS cor0
----
27
32
38

query I rowsort
SELECT 36 * + 61 AS col2 FROM tab2 AS cor0
----
2196
2196
2196

query I rowsort
SELECT + - ( + 15 ) AS col1 FROM tab0 AS cor0
----
-15
-15
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT CAST ( - 5 AS REAL ) * col0 col0 FROM tab2 cor0
----
-35
-390
-395

query I rowsort
SELECT DISTINCT - col0 + col0 AS col1 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5087
SELECT DISTINCT - 10 * col1 + cor0.col0 DIV + 8 - col0 FROM tab2 AS cor0
----
-240
-317
-659

skipif mysql # not compatible
query I rowsort label-5087
SELECT DISTINCT - 10 * col1 + cor0.col0 / + 8 - col0 FROM tab2 AS cor0
----
-240
-317
-659

query I rowsort
SELECT - 88 AS col2 FROM tab1 AS cor0
----
-88
-88
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col1 + 97 col1 FROM tab0 AS cor0
----
7493
8378
9506

query I rowsort
SELECT ALL - + 50 * col0 FROM tab1 AS cor0
----
-150
-3200
-4000

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + col1 - - cor0.col2 AS col0 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT ALL - 43 + + col1 * + col1 AS col1 FROM tab1 AS cor0
----
126
57
633

onlyif mysql # use DIV operator for integer division
query I rowsort label-5094
SELECT - 61 DIV col2 + - col0 + - col1 DIV col1 FROM tab0 AS cor0
----
-26
-90
-97

skipif mysql # not compatible
query I rowsort label-5094
SELECT - 61 / col2 + - col0 + - col1 / col1 FROM tab0 AS cor0
----
-26
-90
-97

query I rowsort
SELECT - 79 + - col1 FROM tab1 AS cor0
----
-105
-89
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-5096
SELECT DISTINCT 77 DIV + col1 + 82 * - col1 FROM tab0 AS cor0
----
-7052
-7462
-7954

skipif mysql # not compatible
query I rowsort label-5096
SELECT DISTINCT 77 / + col1 + 82 * - col1 FROM tab0 AS cor0
----
-7052
-7462
-7954

query I rowsort
SELECT col0 + col0 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT ALL 43 * col0 - - cor0.col1 FROM tab2 AS cor0
----
332
3413
3414

query I rowsort
SELECT - + col1 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + col2 + + cor0.col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL 35 * - col0 AS col2 FROM tab0 cor0
----
-1225
-3115
-840

query I rowsort
SELECT DISTINCT + 22 FROM tab2, tab2 AS cor0
----
22

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to e610acd60f342127e6cdba18673d9f0e

query I rowsort
SELECT + tab0.col1 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - cor0.col0 + + col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 24 AS col0 FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + + col2 + cor0.col1 col2 FROM tab0 cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5108
SELECT ALL - col1 DIV - col2 AS col1 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5108
SELECT ALL - col1 / - col2 AS col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + col1 * tab0.col0 + col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT col0 * cor0.col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - col2 * - col1 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT col0 * - col1 * tab2.col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT - col1 * col2 * col1 AS col2 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT col1 * - col1 * col0 AS col2 FROM tab0
----
-177504
-329315
-737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col0 col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT col2 * cor0.col1 * col1 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT + col1 + - col2 AS col2 FROM tab0 cor0 WHERE NULL < NULL OR NULL < + col0 * col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5118
SELECT ALL - col2 * tab2.col1 DIV + col0 FROM tab2
----
-119
-19
-8

skipif mysql # not compatible
query I rowsort label-5118
SELECT ALL - col2 * tab2.col1 / + col0 FROM tab2
----
-119
-19
-8

query I rowsort
SELECT DISTINCT - ( + col2 ) + col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + col2 * col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + cor0.col1 + + col1 * col1 FROM tab2 cor0
----
306
3540
992

query I rowsort
SELECT + - cor0.col0 + + col2 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT ALL - 34 AS col1 FROM tab2
----
-34
-34
-34

query I rowsort
SELECT - 16 * + col0 FROM tab0
----
-1424
-384
-560

query I rowsort
SELECT + col2 * + cor0.col2 + col2 AS col1 FROM tab2 AS cor0
----
1482
702
756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col2 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT col1 * col0 * col1 AS col2 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT ALL col2 + col2 * + col2 FROM tab0
----
1122
2
6806

query I rowsort
SELECT - + col2 + - cor0.col2 * + col0 FROM tab0 AS cor0
----
-36
-7380
-825

onlyif mysql # use DIV operator for integer division
query I rowsort label-5130
SELECT + col1 * + col2 + - col1 DIV col1 AS col1 FROM tab0 AS cor0
----
2837
7461
96

skipif mysql # not compatible
query I rowsort label-5130
SELECT + col1 * + col2 + - col1 / col1 AS col1 FROM tab0 AS cor0
----
2837
7461
96

query I rowsort
SELECT col1 + - col0 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT + - cor0.col1 AS col2 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL col1 * - col2 + - col0 + col1 FROM tab2
----
-1553
-708
-813

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL IN ( col0 + - col1 * tab2.col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5135
SELECT - tab0.col2 DIV col2 + + tab0.col1 * col0 AS col2 FROM tab0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-5135
SELECT - tab0.col2 / col2 + + tab0.col1 * col0 AS col2 FROM tab0
----
2063
3394
8098

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col1 * + tab0.col2 + col0 col1 FROM tab0
----
167
2886
7640

query I rowsort
SELECT DISTINCT + col0 * + col0 AS col1 FROM tab0
----
1225
576
7921

query III rowsort
SELECT * FROM tab0 WHERE NOT col1 + col1 < ( - col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT + col0 * col0 * - col0 FROM tab1
----
-262144
-27
-512000

query I rowsort
SELECT DISTINCT col1 * - col1 + + col2 + col1 FROM tab0
----
-7277
-8108
-9311

query I rowsort
SELECT ALL col2 * tab2.col1 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT col1 * - col1 AS col0 FROM tab1
----
-100
-169
-676

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) NOT IN ( tab2.col1 + + col0 * - col2 + col2 )
----

query I rowsort
SELECT DISTINCT - col1 * + col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - col2 * + col1 * col1 + - tab0.col0 FROM tab0
----
-244092
-679131
-9444

query I rowsort
SELECT ALL + col1 * - col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - col0 * - col0 * - col2 + - col1 AS col1 FROM tab2
----
-1354
-158243
-237175

query I rowsort
SELECT ALL + tab1.col0 * col0 AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT - col1 * col2 AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - col2 + col2 AS col1 FROM tab2
----
0

query I rowsort
SELECT col1 * col0 * col0 AS col1 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT ALL + col2 * + tab1.col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT col2 * - col2 - col0 FROM tab0 WHERE NULL NOT IN ( - tab0.col1 + - col1 )
----

query I rowsort
SELECT - col0 - - tab2.col2 / col1 AS col2 FROM tab2 WHERE col0 + col1 BETWEEN col0 * + col0 + col1 AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5155
SELECT ALL + col1 DIV + cor0.col1 - - col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-5155
SELECT ALL + col1 / + cor0.col1 - - col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT DISTINCT + 12 * - col2 + + col0 AS col0 FROM tab1 AS cor0
----
-1072
-620
-645

onlyif mysql # use DIV operator for integer division
query I rowsort label-5157
SELECT ALL - - col2 + + col0 * 87 DIV - col0 col0 FROM tab2 AS cor0
----
-49
-60
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5157
SELECT ALL - - col2 + + col0 * 87 / - col0 col0 FROM tab2 AS cor0
----
-49
-60
-61

query I rowsort
SELECT - - col2 + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + col2 * + col1 + - tab0.col2 - col0 AS col1 FROM tab0
----
2781
61
7291

query I rowsort
SELECT col2 * - col0 + + col1 / col2 AS col0 FROM tab2 WHERE ( NULL ) NOT IN ( col2 )
----

query I rowsort
SELECT col2 * - col1 + col1 FROM tab1
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5162
SELECT ALL ( col1 ) + + CAST( 43 * - col1 AS SIGNED ) + + col0 AS col2 FROM tab1 AS cor0
----
-1089
-356
-466

skipif mysql # not compatible
query I rowsort label-5162
SELECT ALL ( col1 ) + + CAST ( 43 * - col1 AS INTEGER ) + + col0 AS col2 FROM tab1 AS cor0
----
-1089
-356
-466

query I rowsort
SELECT DISTINCT - 93 + cor0.col0 AS col0 FROM tab2 AS cor0
----
-14
-15
-86

query I rowsort
SELECT 77 FROM tab2 AS cor0
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 35 + col2 col2 FROM tab1 AS cor0
----
131
89
92

query III rowsort
SELECT * FROM tab2 cor0 WHERE NOT NULL BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT + cor0.col2 * - col0 * + col2 FROM tab0 AS cor0
----
-26136
-35
-598436

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col1 FROM tab1 AS cor0 WHERE NOT NULL < NULL
----

query I rowsort
SELECT col1 * + col1 * + col0 FROM tab1 AS cor0
----
13520
2028
6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + + col1 * col2 + col2 col2 FROM tab0
----
133
2895
7633

onlyif mysql # use DIV operator for integer division
query I rowsort label-5171
SELECT DISTINCT tab1.col0 DIV - col2 AS col1 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-5171
SELECT DISTINCT tab1.col0 / - col2 AS col1 FROM tab1
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col0 + + col1 col1 FROM tab1 cor0
----
3
64
80

query IIIIII rowsort
SELECT * FROM tab0, tab0 cor0 WHERE NULL <= NULL
----

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NULL = NULL
----

query I rowsort
SELECT ALL + col2 * + col1 * col0 + + tab1.col2 FROM tab1
----
36537
4266
99936

query I rowsort
SELECT ALL + col1 + - col2 AS col1 FROM tab0
----
53
9
96

query I rowsort
SELECT + col0 AS col0 FROM tab0 WHERE NOT ( NULL ) <> + col0 * - col2
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( col0 ) IN ( col0 + + col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT col0 * - col1 + - col1 FROM tab1
----
-104
-1053
-650

query I rowsort
SELECT col0 * col2 - tab2.col0 * + col0 AS col1 FROM tab2
----
-3239
-4056
140

query I rowsort
SELECT DISTINCT col0 + + tab0.col2 AS col1 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT + col1 FROM tab1 WHERE NULL <= - col0 * col2
----

query I rowsort
SELECT + col2 * - col1 + + col2 AS col2 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT ALL + col2 + + col0 AS col1 FROM tab2
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5185
SELECT DISTINCT + col2 DIV + tab0.col0 AS col2 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort label-5185
SELECT DISTINCT + col2 / + tab0.col0 AS col2 FROM tab0
----
0
1

query I rowsort
SELECT DISTINCT - col2 + col1 + - col0 FROM tab1
----
-111
-163
-31

query I rowsort
SELECT + col2 + + col1 + + col2 AS col2 FROM tab2
----
111
85
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5188
SELECT ALL tab2.col2 DIV + tab2.col0 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-5188
SELECT ALL tab2.col2 / + tab2.col0 FROM tab2
----
0
0
3

query I rowsort
SELECT ALL + col0 + + col2 + col0 FROM tab1
----
185
256
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-5190
SELECT + col2 DIV col1 + + col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5190
SELECT + col2 / col1 + + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL col0 * col0 * + col1 + + col1 AS col2 FROM tab1
----
260
40970
83213

onlyif mysql # use DIV operator for integer division
query I rowsort label-5192
SELECT + col0 DIV col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-5192
SELECT + col0 / col1 FROM tab2
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col0 col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT - 38 AS col0 FROM tab0 AS cor0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT + + col2 + col2 * - col0 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-5196
SELECT - col1 DIV - col2 + - col2 * - col0 * col0 AS col0 FROM tab1
----
233472
486
614400

skipif mysql # not compatible
query I rowsort label-5196
SELECT - col1 / - col2 + - col2 * - col0 * col0 AS col0 FROM tab1
----
233472
486
614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 80 * - col0 + - col0 col2 FROM tab2 AS cor0
----
-567
-6318
-6399

query I rowsort
SELECT - 87 FROM tab1 cor0
----
-87
-87
-87

query I rowsort
SELECT - 77 AS col2 FROM tab1 AS cor0
----
-77
-77
-77

query I rowsort
SELECT ALL - 85 * + cor0.col0 + col0 FROM tab1 AS cor0
----
-252
-5376
-6720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col0 col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - + 16 - - col0 AS col1 FROM tab1 AS cor0
----
-13
48
64

query I rowsort
SELECT DISTINCT 13 * col2 + - col1 FROM tab1 AS cor0
----
1235
676
731

query I rowsort
SELECT DISTINCT + + col0 * col2 + - ( col2 ) * col0 * + ( - ( col0 ) * + col1 ) FROM tab0 AS cor0
----
118860
1635480
59113800

query I rowsort
SELECT DISTINCT + - col2 + - col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT 17 AS col0 FROM tab1 AS cor0
----
17
17
17

query I rowsort
SELECT DISTINCT + col1 * + col0 * col1 AS col1 FROM tab2 cor0
----
22831
271518
6727

query I rowsort
SELECT cor0.col0 * + col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + col1 * cor0.col1 AS col2 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-5210
SELECT DISTINCT - ( col0 ) DIV + col2 AS col1 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-5210
SELECT DISTINCT - ( col0 ) / + col2 AS col1 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT ALL - - col2 + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT col0 * col0 + cor0.col2 FROM tab2 cor0
----
6110
6279
76

query I rowsort
SELECT 76 FROM tab1, tab0 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0, tab1 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 91c4f11552b395e0eb390f09eebaec3d

query I rowsort
SELECT col1 * ( 25 ) FROM tab0 cor0
----
2150
2275
2425

query I rowsort
SELECT ALL ( - tab2.col2 * - ( col0 ) ) AS col1 FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-5217
SELECT + col2 DIV col0 FROM tab1 cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-5217
SELECT + col2 / col0 FROM tab1 cor0
----
0
1
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5218
SELECT + col2 * + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5218
SELECT + col2 * + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5219
SELECT ALL + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5219
SELECT ALL + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5220
SELECT ALL + - CAST( NULL AS DECIMAL ) * col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5220
SELECT ALL + - CAST ( NULL AS REAL ) * col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 46 * cor0.col2 + - col1 AS col1 FROM tab0 AS cor0
----
-51
1432
3681

query I rowsort
SELECT DISTINCT + 21 + 51 AS col2 FROM tab1 AS cor0
----
72

query I rowsort
SELECT ALL col0 * - 8 AS col1 FROM tab1 AS cor0
----
-24
-512
-640

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ALL - 81 AS col0 FROM tab1 AS cor0
----
-81
-81
-81

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + - CAST ( 62 AS REAL ) FROM tab2 AS cor0
----
-62

query I rowsort
SELECT - - col2 * col1 + col1 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT col1 + ( col0 ) AS col2 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 * cor0.col2 FROM tab2, tab1 AS cor0
----
233472
486
614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-5230
SELECT ALL - 20 * col2 - - col0 DIV cor0.col1 FROM tab1 AS cor0
----
-1080
-1134
-1914

skipif mysql # not compatible
query I rowsort label-5230
SELECT ALL - 20 * col2 - - col0 / cor0.col1 FROM tab1 AS cor0
----
-1080
-1134
-1914

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 + col1 + + col1 * ( col2 ) * - col1 FROM tab1 AS cor0
----
-16211
-36478
-5690

query I rowsort
SELECT ( + col2 ) + - col0 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT 97 * ( + col2 ) FROM tab1
----
5238
5529
9312

query I rowsort
SELECT + col1 + - 42 * - col0 FROM tab0
----
1094
1567
3829

query I rowsort
SELECT col0 * tab1.col1 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 0 * + col0 col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 41 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

query I rowsort
SELECT - 11 FROM tab1, tab1 AS cor0
----
9 values hashing to 05cc989122d7724c7abefaba9625ef3d

query I rowsort
SELECT col1 * - col0 + col0 * - col1 AS col2 FROM tab0 AS cor0
----
-16198
-4128
-6790

query I rowsort
SELECT - col0 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT + cor0.col1 * - col2 AS col0 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT 21 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab1, tab1 AS cor2
----
243 values hashing to 1d381b4ba3c90535da913c6b9acadb5a

query I rowsort
SELECT 70 + - col2 FROM tab0 cor0
----
-12
37
69

query I rowsort
SELECT + cor1.col1 * cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 23253cfee4cea5e1d4f993bec937f9fe

query I rowsort
SELECT ALL col2 * + col1 AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL col1 + ( - tab2.col0 ) AS col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL - col1 + - col1 AS col0 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT DISTINCT - 50 AS col2 FROM tab1, tab1 AS cor0
----
-50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5251
SELECT + tab0.col0 * CAST( NULL AS SIGNED ) col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5251
SELECT + tab0.col0 * CAST ( NULL AS INTEGER ) col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - ( col2 ) * + col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT col1 + 18 AS col0 FROM tab1
----
28
31
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 - + 29 col2 FROM tab2, tab0 AS cor0
----
-2
-3
9

query I rowsort
SELECT 12 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-5257
SELECT + + col0 * 27 + + col1 DIV col1 FROM tab0 cor0
----
2404
649
946

skipif mysql # not compatible
query I rowsort label-5257
SELECT + + col0 * 27 + + col1 / col1 FROM tab0 cor0
----
2404
649
946

query I rowsort
SELECT DISTINCT - col0 * 45 FROM tab0
----
-1080
-1575
-4005

query I rowsort
SELECT ALL 20 AS col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT ALL - + 65 FROM tab1 AS cor0
----
-65
-65
-65

query I rowsort
SELECT + - col2 * col1 + - col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT + col1 * + 30 + col2 * + col1 * ( + col1 + col2 ) FROM tab2 AS cor0
----
132160
36040
49476

query I rowsort
SELECT ALL + 14 * + col2 + col2 AS col2 FROM tab0 AS cor0
----
1230
15
495

query I rowsort
SELECT col2 + - 69 FROM tab1 AS cor0
----
-12
-15
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5265
SELECT CAST( NULL AS SIGNED ) * - col1 * col0 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5265
SELECT CAST ( NULL AS INTEGER ) * - col1 * col0 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5266
SELECT DISTINCT + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5266
SELECT DISTINCT + CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - 50 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to c7432a968c8352c12996dfa54dd4b9e8

query I rowsort
SELECT 74 FROM tab2, tab1 cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

onlyif mysql # use DIV operator for integer division
query I rowsort label-5269
SELECT + col1 + col2 DIV col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5269
SELECT + col1 + col2 / col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT 45 + - col0 FROM tab0 AS cor0
----
-44
10
21

query I rowsort
SELECT + - ( - 81 ) + + col1 AS col0 FROM tab1 AS cor0
----
107
91
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-5272
SELECT + ( col2 ) DIV col0 + + col1 AS col0 FROM tab0 AS cor0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-5272
SELECT + ( col2 ) / col0 + + col1 AS col0 FROM tab0 AS cor0
----
87
91
97

query I rowsort
SELECT col0 + - col1 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - col2 * + tab1.col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL + col1 + - tab2.col2 FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL col1 + + tab2.col0 FROM tab2
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5277
SELECT - col1 - CAST( NULL AS SIGNED ) col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5277
SELECT - col1 - CAST ( NULL AS INTEGER ) col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5278
SELECT ALL + - col0 + col1 DIV col1 + - col1 AS col2 FROM tab2 AS cor0
----
-136
-37
-95

skipif mysql # not compatible
query I rowsort label-5278
SELECT ALL + - col0 + col1 / col1 + - col1 AS col2 FROM tab2 AS cor0
----
-136
-37
-95

query I rowsort
SELECT DISTINCT - col1 - cor0.col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT - col1 + 66 FROM tab1 AS cor0
----
40
53
56

query I rowsort
SELECT col0 + col2 * col0 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-5282
SELECT DISTINCT + col1 * - col0 + - col1 DIV col1 - col0 * col0 * col1 FROM tab2 AS cor0
----
-107441
-1737
-363559

skipif mysql # not compatible
query I rowsort label-5282
SELECT DISTINCT + col1 * - col0 + - col1 / col1 - col0 * col0 * col1 FROM tab2 AS cor0
----
-107441
-1737
-363559

query I rowsort
SELECT - + col2 * - col2 + col2 * - col1 AS col1 FROM tab2 AS cor0
----
-108
-858
798

query I rowsort
SELECT ALL + ( cor0.col1 ) * col1 + - col2 * - col1 AS col2 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT DISTINCT - 94 * 33 FROM tab0 AS cor0
----
-3102

query I rowsort
SELECT DISTINCT 92 * - ( + col1 ) AS col0 FROM tab2 cor0
----
-1564
-2852
-5428

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5287
SELECT DISTINCT CAST( NULL AS DECIMAL ) + 65 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5287
SELECT DISTINCT CAST ( NULL AS REAL ) + 65 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + 0 * col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - - 48 * + cor0.col1 FROM tab1 AS cor0
----
1248
480
624

query I rowsort
SELECT ALL + 98 - col1 FROM tab2 AS cor0
----
39
67
81

query I rowsort
SELECT ALL - 51 * - col2 AS col0 FROM tab2 AS cor0
----
1326
1377
1938

query I rowsort
SELECT - col0 + + cor0.col2 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5293
SELECT + + CAST( NULL AS SIGNED ) + col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5293
SELECT + + CAST ( NULL AS INTEGER ) + col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 89 * + 20 + col2 AS col2 FROM tab2 AS cor0
----
1806
1807
1818

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 11 + col0 col1 FROM tab0 AS cor0
----
100
35
46

query I rowsort
SELECT DISTINCT - cor0.col2 + + col2 * - col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5297
SELECT ALL + CAST( - 75 AS SIGNED ) * col1 FROM tab0 AS cor0
----
-6450
-6825
-7275

skipif mysql # not compatible
query I rowsort label-5297
SELECT ALL + CAST ( - 75 AS INTEGER ) * col1 FROM tab0 AS cor0
----
-6450
-6825
-7275

query I rowsort
SELECT + 88 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT + + col2 + - col2 + col1 * 78 AS col0 FROM tab1 AS cor0
----
1014
2028
780

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col2 * 71 col1 FROM tab0 AS cor0
----
-477404
-71
-77319

query I rowsort
SELECT + + cor0.col0 * col2 - + col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT - + col1 + - col0 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5303
SELECT + + 55 * col0 + + col2 DIV col2 + col0 DIV - 60 AS col1 FROM tab1 AS cor0
----
166
3520
4400

skipif mysql # not compatible
query I rowsort label-5303
SELECT + + 55 * col0 + + col2 / col2 + col0 / - 60 AS col1 FROM tab1 AS cor0
----
166
3520
4400

query I rowsort
SELECT - - ( col2 ) + + col0 * col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT col0 + col0 + ( 91 ) FROM tab0 cor0
----
139
161
269

query I rowsort
SELECT ALL - 17 AS col2 FROM tab1
----
-17
-17
-17

query I rowsort
SELECT ALL 27 * 60 AS col2 FROM tab1
----
1620
1620
1620

onlyif mysql # use DIV operator for integer division
query I rowsort label-5308
SELECT + 96 DIV + col0 + col2 AS col2 FROM tab1 cor0
----
58
86
97

skipif mysql # not compatible
query I rowsort label-5308
SELECT + 96 / + col0 + col2 AS col2 FROM tab1 cor0
----
58
86
97

query I rowsort
SELECT ALL - 65 AS col0 FROM tab2 cor0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT + - col2 + col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT 37 * + col0 FROM tab2 AS cor0
----
259
2886
2923

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5313
SELECT DISTINCT cor0.col1 + + col2 DIV col1 FROM tab1 AS cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-5313
SELECT DISTINCT cor0.col1 + + col2 / col1 FROM tab1 AS cor0
----
15
20
28

query I rowsort
SELECT 46 AS col1 FROM tab2 AS cor0
----
46
46
46

query I rowsort
SELECT ALL 34 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT col1 * - col1 * - ( + 48 ) + col0 FROM tab0
----
355032
397577
451667

query I rowsort
SELECT + col2 + - cor0.col0 + - ( - col2 ) * - col0 AS col1 FROM tab1 AS cor0
----
-111
-3655
-7664

query I rowsort
SELECT - cor0.col1 - col0 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + col1 * - ( col2 ) AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5320
SELECT - 26 * tab1.col1 DIV CAST( + 58 * col0 AS SIGNED ) AS col2 FROM tab1
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-5320
SELECT - 26 * tab1.col1 / CAST ( + 58 * col0 AS INTEGER ) AS col2 FROM tab1
----
-3
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5321
SELECT DISTINCT + col1 + 46 DIV 40 + col0 AS col1 FROM tab0 AS cor0
----
111
133
181

skipif mysql # not compatible
query I rowsort label-5321
SELECT DISTINCT + col1 + 46 / 40 + col0 AS col1 FROM tab0 AS cor0
----
111
133
181

query I rowsort
SELECT + + col1 - col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT col1 + - 68 * - ( col0 ) AS col2 FROM tab1 AS cor0
----
230
4362
5453

query I rowsort
SELECT + col0 + col1 + + col2 AS col1 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT - col0 + + col2 * + col1 - - col0 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - + col0 * 68 AS col0 FROM tab0 AS cor0
----
-1632
-2380
-6052

onlyif mysql # use DIV operator for integer division
query I rowsort label-5327
SELECT DISTINCT - col0 + + 62 DIV + col2 FROM tab0 AS cor0
----
-23
-89
27

skipif mysql # not compatible
query I rowsort label-5327
SELECT DISTINCT - col0 + + 62 / + col2 FROM tab0 AS cor0
----
-23
-89
27

query I rowsort
SELECT - + cor0.col2 + + col2 + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5329
SELECT col1 * col2 - ( 88 ) DIV - col2 FROM tab1
----
1248
1405
571

skipif mysql # not compatible
query I rowsort label-5329
SELECT col1 * col2 - ( 88 ) / - col2 FROM tab1
----
1248
1405
571

query I rowsort
SELECT + 50 + col0 AS col1 FROM tab1
----
114
130
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5331
SELECT - ( + col2 ) * + CAST( NULL AS SIGNED ) + + col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5331
SELECT - ( + col2 ) * + CAST ( NULL AS INTEGER ) + + col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + - col0 * tab0.col1 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT col1 + col0 * - 29 FROM tab2
----
-172
-2203
-2274

query I rowsort
SELECT ALL tab1.col1 + tab1.col0 + + col2 * col0 FROM tab1
----
191
3722
7773

query I rowsort
SELECT DISTINCT + col1 + - col0 * - col0 AS col1 FROM tab2
----
6143
6258
80

query I rowsort
SELECT + col1 + 57 FROM tab2 AS cor0
----
116
74
88

query I rowsort
SELECT ALL + - col0 + - col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT - + cor0.col0 + - 13 * + col0 - - col1 FROM tab0 AS cor0
----
-1155
-250
-393

query I rowsort
SELECT col1 + - 85 AS col2 FROM tab0 AS cor0
----
1
12
6

query I rowsort
SELECT ALL - - col1 * - ( cor0.col0 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + col2 + - col0 * col1 FROM tab1 cor0
----
-24
-583
-944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5342
SELECT DISTINCT + + col2 * - CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5342
SELECT DISTINCT + + col2 * - CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0
----
NULL

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 cor2
----
3645 values hashing to f1666fadc663c90ea9374fcb108b4477

query I rowsort
SELECT - - 25 + - ( col1 ) FROM tab2 AS cor0
----
-34
-6
8

query I rowsort
SELECT - col0 + 99 AS col1 FROM tab2 AS cor0
----
20
21
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-5346
SELECT ALL col2 DIV - col0 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-5346
SELECT ALL col2 / - col0 FROM tab2
----
-3
0
0

query I rowsort
SELECT - 99 + - col1 AS col1 FROM tab0 AS cor0
----
-185
-190
-196

query I rowsort
SELECT + cor0.col0 * col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + 59 AS col2 FROM tab0 AS cor0
----
59

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( + tab1.col2 AS REAL ) AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
54
57
96

query I rowsort
SELECT DISTINCT 3 AS col1 FROM tab2 cor0
----
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-5352
SELECT ALL + col1 DIV + col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5352
SELECT ALL + col1 / + col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL col1 * col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5354
SELECT - + col2 DIV - col1 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5354
SELECT - + col2 / - col1 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT ALL + + col1 * - col0 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - col1 + col2 AS col2 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL + col2 + + col0 AS col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5358
SELECT ( + col0 ) DIV cor0.col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5358
SELECT ( + col0 ) / cor0.col0 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 col2 FROM tab2 AS cor0
----
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 col0 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT - 77 * - tab1.col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 84c67bfcf6ffc1aa6329b92a89560023

query I rowsort
SELECT DISTINCT - col2 + + 89 * col0 * - tab0.col0 FROM tab0
----
-109026
-51297
-705051

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5363
SELECT + col2 + CAST( col1 AS SIGNED ) FROM tab2
----
55
58
85

skipif mysql # not compatible
query I rowsort label-5363
SELECT + col2 + CAST ( col1 AS INTEGER ) FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT - cor0.col2 * col1 + + col2 + - col0 * - 38 * - col1 FROM tab0 AS cor0
----
-129106
-315142
-81237

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col0 col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + col1 + 33 + 27 * + col2 AS col2 FROM tab2 AS cor0
----
1076
793
794

query I rowsort
SELECT + col0 + - col1 AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - + col1 * col1 + ( col1 ) AS col1 FROM tab1 AS cor0
----
-156
-650
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-5369
SELECT DISTINCT col1 DIV + col0 + - 89 FROM tab1 AS cor0
----
-81
-89

skipif mysql # not compatible
query I rowsort label-5369
SELECT DISTINCT col1 / + col0 + - 89 FROM tab1 AS cor0
----
-81
-89

query I rowsort
SELECT ALL - 34 FROM tab1, tab0 AS cor0
----
9 values hashing to 40442a74794ded4c78101eefe525a5bb

query I rowsort
SELECT DISTINCT + ( 6 ) AS col0 FROM tab1, tab2 AS cor0
----
6

query I rowsort
SELECT + 88 FROM tab2, tab2 cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to 663c36cf4bc51cf4ea19f7275ac6d30e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5373
SELECT ALL + + CAST( + col1 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-5373
SELECT ALL + + CAST ( + col1 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT cor0.col2 * 4 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 3df2f21a29ce80bbda41b9924a025cab

query I rowsort
SELECT ALL 34 * + ( col2 ) + ( col2 ) FROM tab0 AS cor0
----
1155
2870
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-5376
SELECT DISTINCT - + col0 DIV col0 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-5376
SELECT DISTINCT - + col0 / col0 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0, tab2 cor0, tab2 AS cor1
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5378
SELECT col0 + + col0 DIV col0 col0 FROM tab0 AS cor0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5378
SELECT col0 + + col0 / col0 col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT DISTINCT + col2 * ( - cor0.col1 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ( cor0.col1 ) + + col1 + col0 AS col0 FROM tab2 AS cor0
----
113
196
69

query I rowsort
SELECT 9 FROM tab0, tab1 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT 48 AS col1 FROM tab1
----
48
48
48

query I rowsort
SELECT - 10 AS col2 FROM tab0 AS cor0
----
-10
-10
-10

onlyif mysql # use DIV operator for integer division
query I rowsort label-5384
SELECT DISTINCT + col1 DIV + col0 AS col0 FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-5384
SELECT DISTINCT + col1 / + col0 AS col0 FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT ALL 14 + col1 * + col1 FROM tab1
----
114
183
690

query I rowsort
SELECT ALL - col0 + + col2 AS col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT 81 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
81

query I rowsort
SELECT tab0.col1 * - tab0.col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT col0 * col0 * - col0 + + 24 + tab1.col0 AS col0 FROM tab1
----
-262056
-511896
0

query I rowsort
SELECT DISTINCT + col1 - + col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - col0 - + col2 * - 12 * col2 AS col1 FROM tab1 AS cor0
----
110512
34989
38924

query I rowsort
SELECT ALL cor0.col0 + cor0.col2 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - col2 * col1 + col0 * + col2 AS col1 FROM tab2 AS cor0
----
-648
2356
494

query I rowsort
SELECT + 63 - col2 AS col1 FROM tab1 AS cor0
----
-33
6
9

query I rowsort
SELECT ALL 86 + + col0 AS col0 FROM tab1 AS cor0
----
150
166
89

query I rowsort
SELECT DISTINCT col2 * col1 * - ( 50 ) AS col1 FROM tab2 AS cor0
----
-32300
-41850
-76700

query I rowsort
SELECT ALL + 37 * col1 + + col2 FROM tab0 cor0
----
3215
3449
3590

query I rowsort
SELECT 1 + + col1 FROM tab2 AS cor0
----
18
32
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-5399
SELECT ALL - 60 + col0 DIV col1 + col1 AS col2 FROM tab1 AS cor0
----
-34
-41
-44

skipif mysql # not compatible
query I rowsort label-5399
SELECT ALL - 60 + col0 / col1 + col1 AS col2 FROM tab1 AS cor0
----
-34
-41
-44

query I rowsort
SELECT DISTINCT + col2 - col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL - col1 + - 81 AS col2 FROM tab0 AS cor0
----
-167
-172
-178

query I rowsort
SELECT ALL col2 * 93 + - col2 * + cor0.col2 * + col2 - col1 * + col1 FROM tab1 AS cor0
----
-153118
-179992
-875977

query I rowsort
SELECT DISTINCT - col0 + cor0.col2 AS col1 FROM tab2 cor0
----
-41
-52
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5404
SELECT ALL - - col0 * + col1 + col1 * + col1 - - CAST( + cor0.col1 AS SIGNED ) * col2 FROM tab2 AS cor0
----
2015
2278
9617

skipif mysql # not compatible
query I rowsort label-5404
SELECT ALL - - col0 * + col1 + col1 * + col1 - - CAST ( + cor0.col1 AS INTEGER ) * col2 FROM tab2 AS cor0
----
2015
2278
9617

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5405
SELECT ALL - + 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-5405
SELECT ALL - + col1 + - CAST ( NULL AS INTEGER ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col0 * + col2 + 97 FROM tab2 AS cor0
----
-1931
-2905
-92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5407
SELECT ALL - col2 - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5407
SELECT ALL - col2 - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col1 + - col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT + - col1 + 31 FROM tab2 cor0
----
-28
0
14

query I rowsort
SELECT ALL 17 + - col0 FROM tab2
----
-61
-62
10

query I rowsort
SELECT ALL - 6 + col1 * - tab2.col0 * col0 FROM tab2
----
-106103
-1525
-358962

query I rowsort
SELECT ALL col1 * col2 + + 7 FROM tab1
----
1255
1411
577

query I rowsort
SELECT ALL - col2 + col2 * - 95 FROM tab2
----
-2496
-2592
-3648

query I rowsort
SELECT DISTINCT - col2 * col2 + - 42 FROM tab0
----
-1131
-43
-6766

query I rowsort
SELECT col1 - col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT col1 * col1 + + ( + col2 ) * col2 FROM tab1
----
3349
3592
9385

query I rowsort
SELECT - + col0 - col2 AS col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT col0 * + col1 * - col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-5419
SELECT + col0 + col1 DIV col1 AS col0 FROM tab1 cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-5419
SELECT + col0 + col1 / col1 AS col0 FROM tab1 cor0
----
4
65
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 * col2 + + cor0.col2 * - 37 col1 FROM tab0 AS cor0
----
1641
4517
95

query I rowsort
SELECT - 38 AS col1 FROM tab0
----
-38
-38
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-5422
SELECT col2 + col0 * col1 DIV col1 FROM tab2
----
104
117
34

skipif mysql # not compatible
query I rowsort label-5422
SELECT col2 + col0 * col1 / col1 FROM tab2
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5423
SELECT + col0 + + col0 * tab1.col0 DIV - 7 AS col0 FROM tab1
----
-521
-834
2

skipif mysql # not compatible
query I rowsort label-5423
SELECT + col0 + + col0 * tab1.col0 / - 7 AS col0 FROM tab1
----
-521
-834
2

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 cor0, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 8420206d6932c454f05a38de634b3cb5

query I rowsort
SELECT - col2 * + col1 + + col0 * col0 AS col0 FROM tab2 AS cor0
----
-788
4550
5595

query I rowsort
SELECT DISTINCT + tab0.col0 * col1 * - col1 AS col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT col1 * tab2.col0 AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - tab1.col2 * - 17 FROM tab1
----
1632
918
969

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5429
SELECT col1 * + CAST( + tab1.col1 AS SIGNED ) * tab1.col2 FROM tab1
----
16224
36504
5700

skipif mysql # not compatible
query I rowsort label-5429
SELECT col1 * + CAST ( + tab1.col1 AS INTEGER ) * tab1.col2 FROM tab1
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-5430
SELECT col0 * - col0 DIV - col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5430
SELECT col0 * - col0 / - col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + 79 AS col0 FROM tab0 AS cor0
----
79
79
79

query I rowsort
SELECT 77 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 19 col0 FROM tab0
----
19
19
19

query I rowsort
SELECT DISTINCT - 9 * + col1 AS col2 FROM tab1
----
-117
-234
-90

query I rowsort
SELECT DISTINCT 75 * cor0.col2 FROM tab0, tab1, tab2 AS cor0, tab0 AS cor1
----
1950
2025
2850

query I rowsort
SELECT DISTINCT + 81 AS col1 FROM tab2
----
81

query I rowsort
SELECT ALL - col0 * - tab0.col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT + 5 FROM tab1
----
5
5
5

skipif mysql # not compatible
query I rowsort
SELECT tab0.col1 * - CAST ( tab0.col2 AS REAL ) AS col2 FROM tab0, tab1 cor0
----
9 values hashing to 86c8e75d83d283b29460c020ab5988af

query I rowsort
SELECT 5 AS col2 FROM tab0 AS cor0
----
5
5
5

query I rowsort
SELECT ALL + col1 * col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + col2 + + col2 * - cor0.col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT + 48 * + cor0.col1 FROM tab0 AS cor0
----
4128
4368
4656

query I rowsort
SELECT 79 * - col2 + ( + col1 ) AS col2 FROM tab1 AS cor0
----
-4240
-4493
-7571

query I rowsort
SELECT ALL - - 63 FROM tab0 AS cor0
----
63
63
63

query I rowsort
SELECT DISTINCT - 48 * col1 - col1 * + 53 AS col2 FROM tab0
----
-8686
-9191
-9797

query I rowsort
SELECT ( + col1 + col0 ) * + 82 FROM tab2
----
11234
3116
7872

query I rowsort
SELECT DISTINCT + ( + 48 ) FROM tab0
----
48

query I rowsort
SELECT col0 * 43 FROM tab2
----
301
3354
3397

query I rowsort
SELECT ALL + cor0.col2 * 66 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 52d860a6dedb10286dcb5c687340484f

query I rowsort
SELECT - - col2 * col1 + col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL + - cor0.col2 FROM tab1, tab2 cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT 27 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT 71 * col1 + col2 * - cor0.col2 FROM tab0 cor0
----
-263
5017
6886

query I rowsort
SELECT + 48 + col2 FROM tab2 AS cor0
----
74
75
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 47 col1 FROM tab2 AS cor0
----
-47
-47
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 51 * - col0 col2 FROM tab2 AS cor0
----
-357
-3978
-4029

query I rowsort
SELECT DISTINCT + 97 * col2 * cor0.col0 AS col0 FROM tab0 AS cor0
----
3395
707906
76824

query I rowsort
SELECT + - col1 + - col0 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT 90 * - col0 FROM tab0 AS cor0
----
-2160
-3150
-8010

query I rowsort
SELECT DISTINCT + ( col0 ) * + col0 + 54 * - col1 AS col1 FROM tab0 AS cor0
----
-4013
-4068
3007

query I rowsort
SELECT - + col0 * + col2 + 37 AS col1 FROM tab2 AS cor0
----
-152
-1991
-2965

query I rowsort
SELECT 58 * tab1.col2 AS col1 FROM tab1
----
3132
3306
5568

query I rowsort
SELECT + 44 * col0 FROM tab0 AS cor0
----
1056
1540
3916

query I rowsort
SELECT DISTINCT - + ( col1 ) * - col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + + cor0.col1 * - col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - cor0.col1 * col0 AS col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col1 * - col2 + 14 AS col2 FROM tab1 AS cor0
----
1262
1418
584

onlyif mysql # use DIV operator for integer division
query I rowsort label-5469
SELECT ALL - cor0.col0 DIV col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5469
SELECT ALL - cor0.col0 / col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5470
SELECT DISTINCT 22 DIV - col1 + col0 AS col0 FROM tab2 AS cor0
----
7
78

skipif mysql # not compatible
query I rowsort label-5470
SELECT DISTINCT 22 / - col1 + col0 AS col0 FROM tab2 AS cor0
----
7
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5471
SELECT - col1 DIV + 8 FROM tab2 AS cor0
----
-2
-3
-7

skipif mysql # not compatible
query I rowsort label-5471
SELECT - col1 / + 8 FROM tab2 AS cor0
----
-2
-3
-7

query I rowsort
SELECT - col2 * - ( - col0 ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT col2 * + cor0.col1 AS col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT + col0 * - col1 * + col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL 2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

query I rowsort
SELECT - col2 + + col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT + col0 + 99 AS col2 FROM tab1 cor0
----
102
163
179

query I rowsort
SELECT + cor0.col1 * col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * - col2 col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - cor0.col1 + - col2 FROM tab2 cor0
----
-55
-58
-85

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab0 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 25b043ae64f25e8f205735b09d2d3d6a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col0 ) * col2 + cor0.col1 - col0 * + col2 * - 32 col2 FROM tab2 AS cor0
----
5890
62927
93079

query I rowsort
SELECT ALL + col0 * - col0 * 2 AS col2 FROM tab0
----
-1152
-15842
-2450

query I rowsort
SELECT DISTINCT 95 AS col1 FROM tab2 AS cor0
----
95

query I rowsort
SELECT - col0 + col0 * + col2 * + 68 FROM tab1 AS cor0
----
11013
248000
522160

query I rowsort
SELECT ALL + + cor0.col2 + - 38 FROM tab0 AS cor0
----
-37
-5
44

query I rowsort
SELECT DISTINCT col0 + + col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - cor0.col1 * 37 AS col2 FROM tab1 cor0
----
-370
-481
-962

query I rowsort
SELECT ALL - col2 * col0 - + col0 FROM tab0 AS cor0
----
-70
-7387
-816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5490
SELECT DISTINCT CAST( NULL AS SIGNED ) * 29 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5490
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 29 AS col1 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col1 ) + - col0 col2 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-5492
SELECT cor0.col2 DIV col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5492
SELECT cor0.col2 / col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT ALL - - 28 + col1 AS col0 FROM tab1 AS cor0
----
38
41
54

query I rowsort
SELECT ALL - cor0.col0 * col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - ( ( + col0 ) ) * col1 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - - ( col0 ) * col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - 80 FROM tab1 cor0
----
-80
-80
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5498
SELECT - col1 DIV 83 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5498
SELECT - col1 / 83 FROM tab0 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 61 * + col0 col0 FROM tab1 AS cor0
----
183
3904
4880

onlyif mysql # use DIV operator for integer division
query I rowsort label-5500
SELECT DISTINCT col1 DIV col1 AS col1 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-5500
SELECT DISTINCT col1 / col1 AS col1 FROM tab1 AS cor0
----
1

query I rowsort
SELECT ALL tab0.col2 * tab0.col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + + cor0.col1 * - 78 AS col0 FROM tab2 cor0
----
-1326
-2418
-4602

query I rowsort
SELECT 65 + col2 * + col0 FROM tab1 cor0
----
227
3713
7745

query I rowsort
SELECT ALL + - 57 + + col0 * col2 FROM tab0 AS cor0
----
-22
7241
735

query I rowsort
SELECT - col2 * 36 AS col1 FROM tab0 AS cor0
----
-1188
-2952
-36

query I rowsort
SELECT ALL cor0.col1 * - col1 * col0 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT ALL - 60 - - col1 FROM tab0
----
26
31
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 48 col2 FROM tab1 AS cor0
----
-48
-48
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col0 ) * + col2 * ( 62 ) + + col0 col2 FROM tab1
----
10047
226240
476240

query I rowsort
SELECT 99 * - 24 AS col1 FROM tab1 cor0
----
-2376
-2376
-2376

onlyif mysql # use DIV operator for integer division
query I rowsort label-5511
SELECT ALL col0 DIV 16 + + 85 FROM tab0 AS cor0
----
86
87
90

skipif mysql # not compatible
query I rowsort label-5511
SELECT ALL col0 / 16 + + 85 FROM tab0 AS cor0
----
86
87
90

query I rowsort
SELECT + cor0.col2 + + col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT DISTINCT 82 * col2 AS col1 FROM tab2
----
2132
2214
3116

query I rowsort
SELECT ALL 56 FROM tab2, tab0 cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT ALL col0 * ( col1 ) AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + col2 + col0 * - 80 AS col0 FROM tab1
----
-186
-5063
-6304

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5517
SELECT DISTINCT CAST( NULL AS SIGNED ) - 68 AS col2 FROM tab1, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5517
SELECT DISTINCT CAST ( NULL AS INTEGER ) - 68 AS col2 FROM tab1, tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5518
SELECT - + col1 * 53 + - col0 * col2 + col1 DIV + col0 FROM tab0 AS cor0
----
-12120
-5174
-5347

skipif mysql # not compatible
query I rowsort label-5518
SELECT - + col1 * 53 + - col0 * col2 + col1 / + col0 FROM tab0 AS cor0
----
-12120
-5174
-5347

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab1 AS cor1, tab0, tab1 cor2
----
3645 values hashing to f464d40c605db608927f2c4d66190a23

query I rowsort
SELECT + + col2 * + col0 + cor0.col2 + col1 AS col2 FROM tab1 cor0
----
242
3715
7789

query I rowsort
SELECT - - cor0.col1 + + 53 * + ( - col1 ) * + col0 AS col1 FROM tab1 cor0
----
-33910
-4108
-55107

query I rowsort
SELECT DISTINCT + col1 * + col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5523
SELECT - + col2 * + 10 + col2 * - col2 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5523
SELECT - + col2 * + 10 + col2 * - col2 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT - col2 * - cor0.col0 + cor0.col1 FROM tab1 AS cor0
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - ( + ( col1 ) * + col2 ) + 17 * - col2 col0 FROM tab2 cor0
----
-120094
-51680
-6318

query I rowsort
SELECT col2 + - col1 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ( col0 ) + + 7 * + col2 * col1 - + 96 AS col1 FROM tab1
----
3958
8720
9735

query I rowsort
SELECT col1 * + ( col0 * tab2.col2 ) AS col2 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT tab1.col1 * 22 * - tab1.col0 FROM tab1
----
-14080
-1716
-22880

query I rowsort
SELECT DISTINCT cor0.col0 + + col0 * + 99 * - col2 AS col2 FROM tab2 AS cor0
----
-18704
-200694
-297119

query I rowsort
SELECT DISTINCT - col1 * - ( + col0 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 * - col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT + col0 * 88 + 70 FROM tab2 cor0
----
686
6934
7022

query I rowsort
SELECT ALL col1 * - col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col2 - col0 AS col1 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT ALL col0 * col0 + - tab1.col0 FROM tab1 WHERE NULL IN ( col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5538
SELECT + col0 * - col1 * col2 + - col1 + col2 DIV + col2 FROM tab0
----
-3491
-664208
-68197

skipif mysql # not compatible
query I rowsort label-5538
SELECT + col0 * - col1 * col2 + - col1 + col2 / + col2 FROM tab0
----
-3491
-664208
-68197

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL <> + col0
----

query I rowsort
SELECT + tab0.col2 FROM tab0 WHERE NOT NULL IN ( - col1 * col2 )
----

query III rowsort
SELECT * FROM tab1 WHERE NULL NOT IN ( - tab1.col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5542
SELECT + - 52 DIV col0 AS col1 FROM tab2 AS cor0
----
-7
0
0

skipif mysql # not compatible
query I rowsort label-5542
SELECT + - 52 / col0 AS col1 FROM tab2 AS cor0
----
-7
0
0

query I rowsort
SELECT col0 + + col2 * tab1.col0 FROM tab1
----
165
3712
7760

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( NULL ) < NULL
----

query I rowsort
SELECT col1 AS col2 FROM tab0 WHERE NOT ( + col1 / + col1 ) BETWEEN ( - col1 ) AND NULL
----

query III rowsort
SELECT * FROM tab1 WHERE + col2 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL - col0 + + col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL col0 * tab2.col2 AS col1 FROM tab2 WHERE ( col2 * col1 ) = col0 * col0 * col1
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL IN ( tab2.col2 )
----

query I rowsort
SELECT + col2 - tab0.col1 FROM tab0
----
-53
-9
-96

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT + col0 / + col0 BETWEEN col2 + col1 * col2 * + col1 AND col0
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT - tab1.col1 * - col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT + col2 * col0 AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT cor0.col0 * - col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + 31 * cor0.col2 AS col1 FROM tab1 AS cor0
----
1674
1767
2976

query I rowsort
SELECT 42 * 38 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ce2e27d9802c843d29eb1d9737a9312b

query I rowsort
SELECT ALL + col2 + - col2 + col0 FROM tab1
----
3
64
80

query I rowsort
SELECT col1 + + tab1.col1 AS col2 FROM tab1
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 13 * col2 col1 FROM tab2 AS cor0
----
-338
-351
-494

onlyif mysql # use DIV operator for integer division
query I rowsort label-5560
SELECT DISTINCT + + col1 DIV col1 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-5560
SELECT DISTINCT + + col1 / col1 FROM tab2 AS cor0
----
1

query I rowsort
SELECT + col2 * cor0.col2 * ( 64 * - col1 ) + - col0 * col1 FROM tab1 AS cor0
----
-2080000
-4852302
-7668752

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col1 + col1 col1 FROM tab2 AS cor0
----
113
196
69

query I rowsort
SELECT ALL 5 AS col0 FROM tab1 AS cor0
----
5
5
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5564
SELECT - col0 + col0 * + CAST( 44 AS SIGNED ) * col0 FROM tab0 AS cor0
----
25320
348435
53865

skipif mysql # not compatible
query I rowsort label-5564
SELECT - col0 + col0 * + CAST ( 44 AS INTEGER ) * col0 FROM tab0 AS cor0
----
25320
348435
53865

onlyif mysql # use DIV operator for integer division
query I rowsort label-5565
SELECT tab1.col0 DIV col2 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5565
SELECT tab1.col0 / col2 FROM tab1
----
0
0
1

query I rowsort
SELECT + ( 90 ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 21 col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col2 + 94 col0 FROM tab1 AS cor0
----
1342
1498
664

query I rowsort
SELECT + + cor0.col2 + + ( 61 ) * - col0 AS col0 FROM tab0 AS cor0
----
-1431
-2134
-5347

query I rowsort
SELECT - col1 * col1 + + col2 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT ALL col1 - col0 AS col0 FROM tab0
----
2
62
62

query I rowsort
SELECT - col2 * ( + col1 ) + - col0 FROM tab0 cor0
----
-132
-2862
-7551

query I rowsort
SELECT ALL - + col2 + - col2 * - col1 FROM tab1 cor0
----
1152
1350
513

query I rowsort
SELECT + col2 + col1 + 65 FROM tab0 AS cor0
----
163
184
238

onlyif mysql # use DIV operator for integer division
query I rowsort label-5575
SELECT cor0.col0 + + col1 DIV + 10 AS col2 FROM tab1 AS cor0
----
5
65
81

skipif mysql # not compatible
query I rowsort label-5575
SELECT cor0.col0 + + col1 / + 10 AS col2 FROM tab1 AS cor0
----
5
65
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5576
SELECT col1 + ( - col1 ) DIV + cor0.col0 + - col0 AS col2 FROM tab0 AS cor0
----
1
59
60

skipif mysql # not compatible
query I rowsort label-5576
SELECT col1 + ( - col1 ) / + cor0.col0 + - col0 AS col2 FROM tab0 AS cor0
----
1
59
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5577
SELECT ALL CAST( cor0.col0 AS SIGNED ) * col2 col2 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5577
SELECT ALL CAST ( cor0.col0 AS INTEGER ) * col2 col2 FROM tab2 AS cor0
----
189
2028
3002

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to 591a9a93560839231c038a1e10bd240a

query I rowsort
SELECT + 40 AS col1 FROM tab1 AS cor0
----
40
40
40

query I rowsort
SELECT - ( col2 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + - 92 * col1 FROM tab2 AS cor0
----
-1564
-2852
-5428

query I rowsort
SELECT cor1.col0 + + 82 + - cor1.col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to febd474791dbb54252b3a91118189cbb

query I rowsort
SELECT - ( + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5584
SELECT - CAST( - col1 * col0 + + col0 AS SIGNED ) col0 FROM tab0
----
2040
3360
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5584
SELECT - CAST ( - col1 * col0 + + col0 AS INTEGER ) col0 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT - 45 FROM tab1
----
-45
-45
-45

query I rowsort
SELECT + 21 FROM tab0
----
21
21
21

query I rowsort
SELECT - tab0.col1 + + ( col1 ) FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 + col2 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT - - col1 * + col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT 86 AS col2 FROM tab1
----
86
86
86

query I rowsort
SELECT DISTINCT col1 * - col1 AS col0 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT + col2 - + col0 AS col1 FROM tab1
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col0 col0 FROM tab2
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-5594
SELECT col2 DIV - col1 AS col0 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-5594
SELECT col2 / - col1 AS col0 FROM tab2
----
-2
0
0

query I rowsort
SELECT DISTINCT col1 * col1 - + col0 AS col2 FROM tab1
----
36
673
89

query I rowsort
SELECT DISTINCT - col2 + - col1 - - col2 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT col2 * tab1.col2 AS col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT + col2 - col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT col1 + + col0 + - col1 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT + col0 - + col0 FROM tab2
----
0

query I rowsort
SELECT DISTINCT - col0 * col1 - - tab0.col1 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT + col1 + + col0 * - col1 * col1 - + tab1.col0 FROM tab1
----
-13587
-2005
-6454

query I rowsort
SELECT ALL - col1 - tab1.col0 AS col2 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT ALL 56 AS col1 FROM tab1
----
56
56
56

query I rowsort
SELECT 16 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5606
SELECT ALL - CAST( + 33 AS SIGNED ) FROM tab1
----
-33
-33
-33

skipif mysql # not compatible
query I rowsort label-5606
SELECT ALL - CAST ( + 33 AS INTEGER ) FROM tab1
----
-33
-33
-33

query I rowsort
SELECT DISTINCT col0 * - col1 AS col1 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5608
SELECT CAST( NULL AS SIGNED ) * - ( - col1 ) * + col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5608
SELECT CAST ( NULL AS INTEGER ) * - ( - col1 ) * + col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 37 + col0 AS col1 FROM tab2
----
115
116
44

query I rowsort
SELECT - ( col1 ) * - col1 + col1 * cor0.col1 * + cor0.col2 + - col1 FROM tab0 cor0
----
18721
251378
687232

query I rowsort
SELECT col1 * + 99 + - col2 + + col2 AS col0 FROM tab1 AS cor0
----
1287
2574
990

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT ALL + col0 + col0 AS col1 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL - tab1.col0 * - 77 + + col0 AS col0 FROM tab1
----
234
4992
6240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - tab0.col0 + - col0 col0 FROM tab0
----
-2088
-3430
-8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT + ( - col1 ) AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT col2 + + cor0.col0 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5619
SELECT - 79 * - col0 + + col1 * col1 + col2 * - col2 DIV cor0.col2 AS col2 FROM tab0 cor0
----
12173
15230
9259

skipif mysql # not compatible
query I rowsort label-5619
SELECT - 79 * - col0 + + col1 * col1 + col2 * - col2 / cor0.col2 AS col2 FROM tab0 cor0
----
12173
15230
9259

query I rowsort
SELECT DISTINCT + 82 * - col1 FROM tab1 cor0
----
-1066
-2132
-820

query I rowsort
SELECT DISTINCT - - 43 AS col2 FROM tab0 AS cor0
----
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-5622
SELECT ALL 83 DIV - col1 AS col2 FROM tab2 AS cor0
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-5622
SELECT ALL 83 / - col1 AS col2 FROM tab2 AS cor0
----
-1
-2
-4

query I rowsort
SELECT ( + col2 ) * col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT 50 + + col1 FROM tab1 AS cor0
----
60
63
76

query I rowsort
SELECT 25 * col2 FROM tab1 AS cor0
----
1350
1425
2400

query I rowsort
SELECT ALL + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + 48 * col0 FROM tab1 AS cor0
----
144
3072
3840

query I rowsort
SELECT col0 * - col1 * - col0 + + col2 FROM tab1
----
288
41017
83296

query I rowsort
SELECT col0 * col2 + tab0.col2 AS col1 FROM tab0 WHERE NOT NULL NOT IN ( col1 * col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 * + col0 + + col2 col0 FROM tab2
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + tab2.col1 * tab2.col2 * - col0 col1 FROM tab2 WHERE NULL BETWEEN NULL AND col1 - col0
----

query I rowsort
SELECT col0 + - col1 * + col1 AS col0 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT DISTINCT col1 + + col1 AS col1 FROM tab0
----
172
182
194

query I rowsort
SELECT - col0 / col2 AS col2 FROM tab1 WHERE + col1 IN ( - col1 )
----

query I rowsort
SELECT DISTINCT col2 * col2 + col0 FROM tab0
----
1113
36
6813

query I rowsort
SELECT - col0 - col2 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT - col1 + + col2 * + col2 + - col1 FROM tab2
----
1410
558
667

query I rowsort
SELECT DISTINCT col1 * + col2 + - col1 AS col1 FROM tab2
----
1475
629
806

query I rowsort
SELECT ALL col0 * col2 + col2 * col1 AS col0 FROM tab0
----
132
14760
3630

query I rowsort
SELECT + col2 * col0 + - col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT + cor0.col2 + + col1 AS col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT col2 + col2 * - col2 AS col2 FROM tab0 AS cor0
----
-1056
-6642
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + - col2 * + cor0.col1 - + col1 col1 FROM tab2 AS cor0
----
-1567
-625
-841

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT col1 + - cor0.col2 - - col2 * col0 FROM tab2 AS cor0
----
193
2061
2981

query I rowsort
SELECT ALL cor0.col1 + - col1 * cor0.col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL + col2 + - col2 * col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL col0 + - col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT tab2.col0 * + col0 + - col1 AS col0 FROM tab2
----
18
6025
6224

query I rowsort
SELECT DISTINCT col0 * col2 + - col2 AS col0 FROM tab2
----
162
2002
2964

query I rowsort
SELECT ALL col0 + - col0 * - col1 * + col1 AS col2 FROM tab1 WHERE NOT NULL <> NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5652
SELECT - col2 DIV - col1 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5652
SELECT - col2 / - col1 FROM tab2
----
0
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-5653
SELECT col2 DIV tab1.col2 AS col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5653
SELECT col2 / tab1.col2 AS col0 FROM tab1
----
1
1
1

query I rowsort
SELECT - col1 + tab1.col2 AS col1 FROM tab1
----
28
47
83

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT col2 NOT IN ( col0 * tab0.col2 )
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL >= NULL
----

query I rowsort
SELECT col1 FROM tab2 WHERE NOT - col0 / - col0 NOT IN ( + col1 )
----

query I rowsort
SELECT DISTINCT + tab2.col0 + col0 AS col1 FROM tab2
----
14
156
158

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL >= col2 + - col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5660
SELECT - col1 DIV col0 AS col2 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5660
SELECT - col1 / col0 AS col2 FROM tab0
----
-1
-2
-3

query I rowsort
SELECT ALL - col0 + - col0 * cor0.col2 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - + col0 - col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT - + col1 + col0 + - col1 FROM tab2 cor0
----
-40
-55
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 col0 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5665
SELECT col1 DIV col0 + col1 FROM tab2
----
17
35
59

skipif mysql # not compatible
query I rowsort label-5665
SELECT col1 / col0 + col1 FROM tab2
----
17
35
59

query I rowsort
SELECT + cor0.col0 + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + cor0.col0 * - col2 + col0 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT ALL col1 + - cor0.col0 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT col0 + + cor0.col2 * cor0.col1 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-5670
SELECT ALL col1 DIV col2 + - cor0.col1 + col2 FROM tab1 AS cor0
----
28
47
83

skipif mysql # not compatible
query I rowsort label-5670
SELECT ALL col1 / col2 + - cor0.col1 + col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT + - cor0.col2 * - col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + col0 - + col0 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col2 * + tab2.col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + cor0.col2 + + col2 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT ALL - col1 + cor0.col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL col2 + + col1 * cor0.col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT - col2 * col1 + + col1 * - col1 AS col2 FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT ALL - - cor0.col2 * col0 + + col1 * col1 FROM tab2 cor0
----
1150
3291
5509

onlyif mysql # use DIV operator for integer division
query I rowsort label-5679
SELECT col0 DIV cor0.col1 - + col0 AS col2 FROM tab1 AS cor0
----
-3
-58
-74

skipif mysql # not compatible
query I rowsort label-5679
SELECT col0 / cor0.col1 - + col0 AS col2 FROM tab1 AS cor0
----
-3
-58
-74

query I rowsort
SELECT ALL + col0 * col1 + + col2 - + col1 AS col2 FROM tab0 AS cor0
----
2011
3299
8090

query I rowsort
SELECT col0 * + col0 * col0 FROM tab0
----
13824
42875
704969

query I rowsort
SELECT col1 - col0 AS col2 FROM tab2
----
-19
-62
24

query I rowsort
SELECT DISTINCT - tab1.col0 * col1 + col2 FROM tab1
----
-24
-583
-944

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT - col2 * - col1 + + col0 FROM tab0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-5686
SELECT + col1 + + col2 DIV col2 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-5686
SELECT + col1 + + col2 / col2 FROM tab0
----
87
92
98

query I rowsort
SELECT DISTINCT - col0 * col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ( + col1 ) - + col2 * - ( col0 ) FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT + 66 + 97 AS col1 FROM tab2 cor0
----
163

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( 18 ) * col2 col0 FROM tab0 cor0
----
1476
18
594

query I rowsort
SELECT DISTINCT - 71 * + col1 AS col1 FROM tab1 cor0
----
-1846
-710
-923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5692
SELECT ALL + CAST( NULL AS DECIMAL ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5692
SELECT ALL + CAST ( NULL AS REAL ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * + col0 col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT col2 * + tab0.col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL + ( 71 ) * - cor0.col0 FROM tab1 AS cor0
----
-213
-4544
-5680

query I rowsort
SELECT - - col1 * - 15 AS col1 FROM tab2 cor0
----
-255
-465
-885

query I rowsort
SELECT ( 34 ) + + col2 FROM tab2 AS cor0
----
60
61
72

query I rowsort
SELECT + cor0.col0 * col0 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5699
SELECT DISTINCT - + col0 DIV 79 FROM tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-5699
SELECT DISTINCT - + col0 / 79 FROM tab2 AS cor0
----
-1
0

query I rowsort
SELECT + cor0.col2 * - col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - - cor0.col1 * + col2 + + col1 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL + 76 * cor0.col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cbbba195e4f5791094f7914ae7af8677

query I rowsort
SELECT ALL + 54 FROM tab1
----
54
54
54

query I rowsort
SELECT + 79 + - col0 FROM tab2
----
0
1
72

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 79b6ae096785aaecea9c1428e4a43e5f

query I rowsort
SELECT col2 + - 5 * col0 AS col1 FROM tab1 AS cor0
----
-263
-304
39

query I rowsort
SELECT ALL col1 * col2 * col0 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT ALL - 61 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT 30 * cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 74d9c93df6dc3529163b61ddfc820d7f

query I rowsort
SELECT col1 + col1 * 84 * col0 FROM tab2
----
112829
18259
386627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - ( - 20 + col1 ) * ( col0 ) col1 FROM tab2
----
-2983
-46
254

query I rowsort
SELECT - col0 + col2 AS col2 FROM tab2
----
-41
-52
20

query I rowsort
SELECT + 54 FROM tab1, tab2 cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT ALL + col2 * 54 + col2 AS col1 FROM tab1 AS cor0
----
2970
3135
5280

query I rowsort
SELECT ALL + col1 + - ( + ( + col0 ) ) FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT 18 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 * 81 col1 FROM tab1 AS cor0
----
-243
-5184
-6480

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab1 cor1, tab2 AS cor2
----
972 values hashing to bcf430f79386b43bc4077271fcd15cf0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5719
SELECT + CAST( col2 AS SIGNED ) * col1 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-5719
SELECT + CAST ( col2 AS INTEGER ) * col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - - cor0.col0 * 87 AS col0 FROM tab1 AS cor0
----
261
5568
6960

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

onlyif mysql # use DIV operator for integer division
query I rowsort label-5722
SELECT DISTINCT + col2 DIV + col2 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-5722
SELECT DISTINCT + col2 / + col2 FROM tab1
----
1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT DISTINCT cor0.col2 * - 69 FROM tab2, tab1 cor0
----
-3726
-3933
-6624

query I rowsort
SELECT 24 AS col1 FROM tab1
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - tab2.col1 col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT - cor1.col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to 980274175fafec015a83080672486a9a

query I rowsort
SELECT ( - col0 ) AS col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ALL - ( + 18 + col2 ) FROM tab2
----
-44
-45
-56

query I rowsort
SELECT - 38 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to e571541ae40cb0ddaca16e11f4359507

query I rowsort
SELECT + + ( - 58 ) + + col2 * + ( col0 ) FROM tab1 AS cor0
----
104
3590
7622

query I rowsort
SELECT - + col1 * + col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + + 35 * col0 * col1 AS col2 FROM tab2 AS cor0
----
161070
47005
7595

query I rowsort
SELECT - col2 + - col1 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT - 84 * + col1 AS col2 FROM tab0
----
-7224
-7644
-8148

query I rowsort
SELECT DISTINCT 18 FROM tab1
----
18

query I rowsort
SELECT DISTINCT tab1.col2 AS col1 FROM tab1, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + ( + col2 ) * + ( col2 ) FROM tab2
----
1444
676
729

query I rowsort
SELECT cor0.col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT + col2 + + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT col0 + col1 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT ALL col2 * + col2 FROM tab2 cor0
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5744
SELECT ALL - ( + col0 ) + CAST( - ( - col1 ) AS SIGNED ) col2 FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5744
SELECT ALL - ( + col0 ) + CAST ( - ( - col1 ) AS INTEGER ) col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT + 21 * col1 + + col2 FROM tab1 AS cor0
----
267
369
600

query I rowsort
SELECT ALL col0 * col2 + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + col0 * 11 AS col1 FROM tab1 AS cor0
----
33
704
880

onlyif mysql # use DIV operator for integer division
query I rowsort label-5748
SELECT + col1 + - ( - col1 ) DIV col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-5748
SELECT + col1 + - ( - col1 ) / col1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT - col0 + 74 FROM tab0 AS cor0
----
-15
39
50

query I rowsort
SELECT ALL + col1 + cor0.col2 + col0 AS col0 FROM tab1 cor0
----
131
189
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - col2 col2 FROM tab2 AS cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 79 + col0 col1 FROM tab0
----
-44
-55
10

skipif mysql # not compatible
query I rowsort
SELECT tab0.col1 * col1 + - CAST ( - 79 AS REAL ) * col1 FROM tab0
----
14190
15470
17072

query I rowsort
SELECT - + col1 * + col1 + - ( col1 ) FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT col0 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT col0 + col1 * 10 FROM tab2 AS cor0
----
249
317
668

query I rowsort
SELECT ALL + - cor0.col2 AS col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + - col1 * + col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL + 58 * col1 AS col0 FROM tab2 AS cor0
----
1798
3422
986

query I rowsort
SELECT + + 11 * col1 AS col2 FROM tab2 AS cor0
----
187
341
649

query I rowsort
SELECT ALL - - col2 * + col1 AS col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL + col0 * - col0 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab2, tab0 cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0, tab0 cor0, tab0 AS cor1
----
972 values hashing to 3406497351e4789c89a295ee9b64b201

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2, tab2 cor0, tab0 AS cor1
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT ALL col1 * col1 + col1 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-1054
-1121
744

query I rowsort
SELECT ALL - col2 - - col1 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT ( - col0 * 83 ) AS col1 FROM tab1
----
-249
-5312
-6640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 + tab2.col2 col0 FROM tab2
----
55
58
85

query I rowsort
SELECT 30 * col1 * + 2 + + 80 FROM tab2
----
1100
1940
3620

query I rowsort
SELECT ALL - tab1.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT col2 + - col1 AS col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT 89 AS col2 FROM tab1
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( col1 ) col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT 26 + cor0.col1 AS col1 FROM tab1 cor0
----
36
39
52

query I rowsort
SELECT ALL col2 * + ( + col2 ) FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5777
SELECT + col0 DIV col2 AS col2 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-5777
SELECT + col0 / col2 AS col2 FROM tab0
----
0
1
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-5778
SELECT DISTINCT + 17 DIV cor0.col1 AS col1 FROM tab1 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-5778
SELECT DISTINCT + 17 / cor0.col1 AS col1 FROM tab1 cor0
----
0
1

query I rowsort
SELECT + col0 * cor0.col0 + col2 * - col0 AS col1 FROM tab2 AS cor0
----
-140
3239
4056

query I rowsort
SELECT DISTINCT + col1 + - cor0.col0 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT ALL col0 * - col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT - - col0 + - ( - col0 ) AS col1 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT - col1 * - 38 FROM tab2
----
1178
2242
646

onlyif mysql # use DIV operator for integer division
query I rowsort label-5784
SELECT DISTINCT - col0 DIV col2 AS col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-5784
SELECT DISTINCT - col0 / col2 AS col2 FROM tab0
----
-1
-35
0

query I rowsort
SELECT DISTINCT col0 * + ( col0 ) FROM tab1
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 + + col2 col0 FROM tab2
----
56
57
68

query I rowsort
SELECT DISTINCT - ( + col1 ) + col1 + col0 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5788
SELECT 15 * 23 - - col2 DIV col2 FROM tab0
----
346
346
346

skipif mysql # not compatible
query I rowsort label-5788
SELECT 15 * 23 - - col2 / col2 FROM tab0
----
346
346
346

query I rowsort
SELECT 88 + cor0.col1 AS col0 FROM tab1, tab2 cor0
----
9 values hashing to c89d8709de7f584411d1060fe6fe13ce

query I rowsort
SELECT - ( + tab1.col2 ) AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT ALL + - 62 AS col0 FROM tab2, tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
27 values hashing to d2579f9395350eda865ff3a2d38a74f6

query I rowsort
SELECT col1 * + cor0.col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5793
SELECT - col1 * col2 DIV + col1 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-5793
SELECT - col1 * col2 / + col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT - - 65 * - col1 FROM tab1 AS cor0
----
-1690
-650
-845

query I rowsort
SELECT - 78 + 31 AS col2 FROM tab2 AS cor0
----
-47
-47
-47

query I rowsort
SELECT col2 * - col1 * - col0 + 79 AS col1 FROM tab1 cor0
----
36559
4291
99919

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5797
SELECT + CAST( col2 AS SIGNED ) + - col0 * + 98 FROM tab0 cor0
----
-2319
-3429
-8640

skipif mysql # not compatible
query I rowsort label-5797
SELECT + CAST ( col2 AS INTEGER ) + - col0 * + 98 FROM tab0 cor0
----
-2319
-3429
-8640

onlyif mysql # use DIV operator for integer division
query I rowsort label-5798
SELECT - col2 + - col2 DIV + col0 AS col0 FROM tab2 AS cor0
----
-26
-30
-38

skipif mysql # not compatible
query I rowsort label-5798
SELECT - col2 + - col2 / + col0 AS col0 FROM tab2 AS cor0
----
-26
-30
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-5799
SELECT ALL + CAST( - col2 AS SIGNED ) DIV col1 + 0 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-5799
SELECT ALL + CAST ( - col2 AS INTEGER ) / col1 + 0 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT - 28 * - col0 FROM tab0
----
2492
672
980

query I rowsort
SELECT ALL col1 + - 97 AS col0 FROM tab1
----
-71
-84
-87

query I rowsort
SELECT DISTINCT + col0 + 24 FROM tab0
----
113
48
59

query I rowsort
SELECT - 11 * 95 + - cor0.col2 FROM tab0 cor0
----
-1046
-1078
-1127

query I rowsort
SELECT - - 54 * - col2 + cor0.col0 FROM tab2 AS cor0
----
-1326
-1451
-1973

query I rowsort
SELECT DISTINCT - col0 * + col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5806
SELECT ALL - CAST( 51 AS SIGNED ) col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 27bcc31433ce90833ed76619cbd8d6a4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5806
SELECT ALL - CAST ( 51 AS INTEGER ) col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 27bcc31433ce90833ed76619cbd8d6a4

query I rowsort
SELECT ALL 95 + col0 AS col2 FROM tab1 AS cor0
----
159
175
98

query I rowsort
SELECT DISTINCT - 32 FROM tab2 AS cor0
----
-32

query I rowsort
SELECT + 56 * - col1 + ( col0 ) AS col2 FROM tab1 AS cor0
----
-1453
-496
-648

query I rowsort
SELECT ALL - + 96 FROM tab1 cor0
----
-96
-96
-96

query I rowsort
SELECT - - 79 + col0 AS col0 FROM tab0 AS cor0
----
103
114
168

query I rowsort
SELECT DISTINCT + + col1 + col0 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + - 25 + col2 FROM tab0 AS cor0
----
-24
57
8

query I rowsort
SELECT col2 * col1 + col1 + + 79 * - cor0.col1 FROM tab1 AS cor0
----
-210
-624
234

query I rowsort
SELECT DISTINCT - + col0 * - col1 AS col1 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5816
SELECT + + 45 DIV + cor0.col2 FROM tab0 AS cor0
----
0
1
45

skipif mysql # not compatible
query I rowsort label-5816
SELECT + + 45 / + cor0.col2 FROM tab0 AS cor0
----
0
1
45

query I rowsort
SELECT ALL - ( + col2 ) + + col0 * - col2 AS col1 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT + 21 * + col2 + 26 FROM tab0 cor0
----
1748
47
719

query I rowsort
SELECT DISTINCT - cor0.col1 * - col0 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + 0 AS col0 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5821
SELECT ALL 83 + col0 DIV 55 AS col1 FROM tab0 AS cor0
----
83
83
84

skipif mysql # not compatible
query I rowsort label-5821
SELECT ALL 83 + col0 / 55 AS col1 FROM tab0 AS cor0
----
83
83
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-5822
SELECT - - col0 DIV + col0 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5822
SELECT - - col0 / + col0 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + 3 + + col0 * + col2 FROM tab0 AS cor0
----
38
7301
795

query I rowsort
SELECT + col2 + - col0 * + col1 AS col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT - 27 + col2 FROM tab1 cor0
----
27
30
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-5826
SELECT ALL - + 15 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5826
SELECT ALL - + 15 / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * col0 + 28 AS col1 FROM tab0 cor0
----
-2036
-3367
-8071

query I rowsort
SELECT - + col1 * cor0.col2 AS col1 FROM tab2 cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col0 * col0 + + col2 * + 78 col0 FROM tab1 AS cor0
----
-36514
-75712
3978

query I rowsort
SELECT ALL + col2 + ( 94 ) FROM tab0 AS cor0
----
127
176
95

query I rowsort
SELECT ALL - col2 + + cor0.col1 * col0 - col1 AS col0 FROM tab2 cor0
----
1288
159
4517

onlyif mysql # use DIV operator for integer division
query I rowsort label-5832
SELECT DISTINCT col0 + col1 + + col2 DIV - col2 AS col1 FROM tab0 AS cor0
----
109
131
179

skipif mysql # not compatible
query I rowsort label-5832
SELECT DISTINCT col0 + col1 + + col2 / - col2 AS col1 FROM tab0 AS cor0
----
109
131
179

onlyif mysql # use DIV operator for integer division
query I rowsort label-5833
SELECT DISTINCT ( + col2 ) DIV col0 + - 48 FROM tab0 AS cor0
----
-47
-48

skipif mysql # not compatible
query I rowsort label-5833
SELECT DISTINCT ( + col2 ) / col0 + - 48 FROM tab0 AS cor0
----
-47
-48

query I rowsort
SELECT DISTINCT - ( col0 ) * col1 + - col0 FROM tab2 cor0
----
-1422
-224
-4680

query I rowsort
SELECT + - col1 - 90 * + cor0.col0 FROM tab1 AS cor0
----
-296
-5770
-7213

query I rowsort
SELECT DISTINCT cor0.col0 * + 90 + + col1 FROM tab0 AS cor0
----
2246
3247
8101

query I rowsort
SELECT - col1 - + col1 AS col2 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT ALL + - col2 - 3 FROM tab0 cor0
----
-36
-4
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col0 * + col0 col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab0 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to 81a27955147133c47c9e8e63dacc5c37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5841
SELECT ALL - col2 * - 14 + + col0 * CAST( NULL AS DECIMAL ) * - ( col0 ) 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-5841
SELECT ALL - col2 * - 14 + + col0 * CAST ( NULL AS REAL ) * - ( col0 ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( col2 ) + col1 * + col1 col0 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT ALL tab0.col0 * + col0 - + col1 FROM tab0
----
1128
490
7830

query I rowsort
SELECT - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT col2 + + col2 - - cor0.col0 * + col1 AS col2 FROM tab2 AS cor0
----
1419
271
4654

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5846
SELECT DISTINCT - + CAST( + col0 AS SIGNED ) + col0 + 28 col1 FROM tab0 AS cor0
----
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5846
SELECT DISTINCT - + CAST ( + col0 AS INTEGER ) + col0 + 28 col1 FROM tab0 AS cor0
----
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-5847
SELECT + col1 DIV ( - 45 ) FROM tab0
----
-1
-2
-2

skipif mysql # not compatible
query I rowsort label-5847
SELECT + col1 / ( - 45 ) FROM tab0
----
-1
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 4 col2 FROM tab2
----
4

query I rowsort
SELECT ALL - 93 FROM tab1
----
-93
-93
-93

query I rowsort
SELECT tab1.col1 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT + 47 * col1 AS col0 FROM tab1 AS cor0
----
1222
470
611

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5852
SELECT DISTINCT col0 + col2 * CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
-2814
-62
-7373

skipif mysql # not compatible
query I rowsort label-5852
SELECT DISTINCT col0 + col2 * CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT ALL - ( col0 ) * - 12 AS col1 FROM tab1
----
36
768
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-5854
SELECT col1 + col0 DIV cor0.col1 AS col1 FROM tab1 cor0
----
16
19
26

skipif mysql # not compatible
query I rowsort label-5854
SELECT col1 + col0 / cor0.col1 AS col1 FROM tab1 cor0
----
16
19
26

query I rowsort
SELECT - col0 * + 83 * cor0.col1 FROM tab2 AS cor0
----
-111469
-18011
-381966

onlyif mysql # use DIV operator for integer division
query I rowsort label-5856
SELECT - + col0 + 63 DIV + col0 AS col0 FROM tab2 AS cor0
----
-78
-79
2

skipif mysql # not compatible
query I rowsort label-5856
SELECT - + col0 + 63 / + col0 AS col0 FROM tab2 AS cor0
----
-78
-79
2

query I rowsort
SELECT - col2 + ( + col0 ) AS col1 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col0 col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - + col2 * col2 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + col0 * + cor0.col2 AS col2 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5861
SELECT tab2.col2 DIV col1 + col1 FROM tab2
----
19
31
59

skipif mysql # not compatible
query I rowsort label-5861
SELECT tab2.col2 / col1 + col1 FROM tab2
----
19
31
59

query I rowsort
SELECT - col2 + col2 * 14 * col1 FROM tab1 AS cor0
----
17376
19602
7923

query I rowsort
SELECT ALL - ( col0 ) + col2 + - col0 FROM tab0 cor0
----
-15
-69
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5864
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-5864
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL

query I rowsort
SELECT ALL + + 73 * + 66 + col0 FROM tab0 cor0
----
4842
4853
4907

query I rowsort
SELECT col0 + - col1 AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - ( - 81 ) * + cor0.col1 + col1 * + col2 - + col0 FROM tab0 AS cor0
----
14744
7919
9780

query I rowsort
SELECT 74 + 17 FROM tab1 AS cor0
----
91
91
91

query I rowsort
SELECT ALL - ( col0 ) FROM tab0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * ( cor0.col0 ) + + col1 col2 FROM tab2 AS cor0
----
6143
6258
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5871
SELECT + col0 * 59 * col2 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5871
SELECT + col0 * 59 * col2 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( col0 ) + col2 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5873
SELECT - CAST( col2 AS SIGNED ) + col0 FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-5873
SELECT - CAST ( col2 AS INTEGER ) + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL + cor0.col0 * col2 AS col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - 86 * + col1 * col1 AS col2 FROM tab1 AS cor0
----
-14534
-58136
-8600

query I rowsort
SELECT ( + col2 ) AS col2 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + 84 AS col2 FROM tab1 cor0
----
84

query I rowsort
SELECT 81 FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

query I rowsort
SELECT DISTINCT - + 12 FROM tab0, tab2 cor0, tab1, tab2 AS cor1
----
-12

query I rowsort
SELECT - - 77 AS col2 FROM tab1 AS cor0
----
77
77
77

query I rowsort
SELECT + col2 * col2 * col0 + col2 FROM tab2 AS cor0
----
114114
5130
52754

query I rowsort
SELECT - 24 * col2 AS col2 FROM tab0
----
-1968
-24
-792

query I rowsort
SELECT - cor0.col1 + col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + col0 * 40 FROM tab2
----
280
3120
3160

query I rowsort
SELECT DISTINCT 26 AS col1 FROM tab1
----
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5886
SELECT DISTINCT CAST( tab0.col1 + - col0 * 63 AS SIGNED ) col0 FROM tab0
----
-1426
-2108
-5516

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5886
SELECT DISTINCT CAST ( tab0.col1 + - col0 * 63 AS INTEGER ) col0 FROM tab0
----
-1426
-2108
-5516

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 40 + col1 * - 61 * 63 col1 FROM tab1 AS cor0
----
-38390
-49919
-99878

onlyif mysql # use DIV operator for integer division
query I rowsort label-5888
SELECT + - col1 + - col2 DIV - ( col2 ) FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-5888
SELECT + - col1 + - col2 / - ( col2 ) FROM tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT ALL col1 * - col1 - + ( col1 ) * col2 FROM tab1 AS cor0
----
-1417
-2080
-670

query I rowsort
SELECT + col2 * col0 + col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL 78 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT ALL - col0 * + col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL col2 * 84 * + col1 AS col2 FROM tab0 AS cor0
----
238392
626808
8148

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2, tab0 cor0
----
86
91
97

query I rowsort
SELECT col0 * + col0 + + col0 - ( col1 + - col0 ) FROM tab0 AS cor0
----
1198
538
8008

query I rowsort
SELECT - + col2 + + cor0.col2 + - col1 FROM tab2 cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5897
SELECT CAST( NULL AS SIGNED ) / - 53 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5897
SELECT CAST ( NULL AS INTEGER ) / - 53 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + 34 * - col0 AS col0 FROM tab0
----
-1190
-3026
-816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5899
SELECT DISTINCT ( 86 ) * + col0 * CAST( 56 AS SIGNED ) AS col1 FROM tab1
----
14448
308224
385280

skipif mysql # not compatible
query I rowsort label-5899
SELECT DISTINCT ( 86 ) * + col0 * CAST ( 56 AS INTEGER ) AS col1 FROM tab1
----
14448
308224
385280

query I rowsort
SELECT DISTINCT ( + 34 ) AS col0 FROM tab1
----
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5901
SELECT DISTINCT - + cor0.col0 DIV 37 AS col1 FROM tab1, tab2 AS cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-5901
SELECT DISTINCT - + cor0.col0 / 37 AS col1 FROM tab1, tab2 AS cor0
----
-2
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5902
SELECT - col1 + CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5902
SELECT - col1 + CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 0 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-5904
SELECT DISTINCT - tab0.col0 + + ( 1 + - col2 ) DIV ( - 8 * + col0 ) AS col2 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-5904
SELECT DISTINCT - tab0.col0 + + ( 1 + - col2 ) / ( - 8 * + col0 ) AS col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT - col2 * ( - col1 ) * - tab2.col1 + + tab2.col1 * - col1 AS col2 FROM tab2
----
-11271
-26908
-93987

query I rowsort
SELECT - col2 + 19 AS col1 FROM tab1 AS cor0
----
-35
-38
-77

query I rowsort
SELECT DISTINCT + - col2 + col2 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT cor0.col2 + 2 * + col1 FROM tab0 AS cor0
----
195
205
264

onlyif mysql # use DIV operator for integer division
query I rowsort label-5909
SELECT - col1 DIV + col0 + + cor0.col1 * + col1 FROM tab2 AS cor0
----
289
3481
957

skipif mysql # not compatible
query I rowsort label-5909
SELECT - col1 / + col0 + + cor0.col1 * + col1 FROM tab2 AS cor0
----
289
3481
957

query I rowsort
SELECT - col1 * - ( + 6 ) + col2 * - cor0.col2 AS col1 FROM tab2 cor0
----
-1342
-322
-543

query I rowsort
SELECT DISTINCT 6 AS col0 FROM tab1 AS cor0
----
6

query I rowsort
SELECT 2 + cor0.col2 FROM tab1 AS cor0
----
56
59
98

query I rowsort
SELECT ALL 76 AS col1 FROM tab1 AS cor0
----
76
76
76

query I rowsort
SELECT ALL 27 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5915
SELECT ALL + CAST( - 58 AS SIGNED ) * + col2 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
-3129
-3242
-5488

skipif mysql # not compatible
query I rowsort label-5915
SELECT ALL + CAST ( - 58 AS INTEGER ) * + col2 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
-3129
-3242
-5488

query I rowsort
SELECT DISTINCT col2 + 11 FROM tab0
----
12
44
93

query I rowsort
SELECT ALL - cor0.col0 - col0 AS col2 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL col0 + cor0.col0 AS col0 FROM tab1 AS cor0
----
128
160
6

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab2 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to bd2b318ad064d89aa12ab468220362b6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5920
SELECT DISTINCT ( - col1 ) - - CAST( NULL AS SIGNED ) * col0 AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-5920
SELECT DISTINCT ( - col1 ) - - CAST ( NULL AS INTEGER ) * col0 AS col2 FROM tab0
----
NULL

query I rowsort
SELECT ALL - col0 - + col0 AS col0 FROM tab2
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-5922
SELECT DISTINCT + col1 * + col2 + + cor0.col0 DIV + cor0.col1 AS col2 FROM tab1 AS cor0
----
1254
1404
576

skipif mysql # not compatible
query I rowsort label-5922
SELECT DISTINCT + col1 * + col2 + + cor0.col0 / + cor0.col1 AS col2 FROM tab1 AS cor0
----
1254
1404
576

query I rowsort
SELECT ALL - - col2 + col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - - col0 * - ( + col0 ) AS col1 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + col0 * col1 * - cor0.col0 AS col0 FROM tab1 cor0
----
-234
-40960
-83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-5926
SELECT DISTINCT col2 + - 61 DIV col1 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5926
SELECT DISTINCT col2 + - 61 / col1 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT col1 - + ( 37 ) * cor0.col1 FROM tab1 AS cor0
----
-360
-468
-936

query I rowsort
SELECT + - col2 * cor0.col2 - col2 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT tab2.col0 * - tab2.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 9b23e5e74ef3405a4dbf05cceb18c8a8

query I rowsort
SELECT DISTINCT col0 - + col1 AS col2 FROM tab2
----
-24
19
62

query I rowsort
SELECT DISTINCT - col1 - col0 FROM tab0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-5932
SELECT - col1 + - col1 DIV + CAST( + col1 AS SIGNED ) + + col0 FROM tab1
----
-24
53
66

skipif mysql # not compatible
query I rowsort label-5932
SELECT - col1 + - col1 / + CAST ( + col1 AS INTEGER ) + + col0 FROM tab1
----
-24
53
66

query I rowsort
SELECT - ( - col2 ) - col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT - col2 - col1 * col0 AS col1 FROM tab0
----
-2097
-3396
-8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5935
SELECT ALL - col2 / - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5935
SELECT ALL - col2 / - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5936
SELECT - col1 + + CAST( NULL AS SIGNED ) AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5936
SELECT - col1 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 * col1 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5938
SELECT DISTINCT - col2 DIV - cor0.col1 AS col0 FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-5938
SELECT DISTINCT - col2 / - cor0.col1 AS col0 FROM tab2 AS cor0
----
0
2

query I rowsort
SELECT DISTINCT + 14 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
14

query I rowsort
SELECT tab1.col1 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL + 50 AS col1 FROM tab1
----
50
50
50

query I rowsort
SELECT col2 * - 13 - col0 FROM tab1 AS cor0
----
-1328
-705
-805

onlyif mysql # use DIV operator for integer division
query I rowsort label-5943
SELECT + + cor0.col2 DIV 58 + - col2 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-5943
SELECT + + cor0.col2 / 58 + - col2 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - col1 * col0 * + 56 AS col1 FROM tab0
----
-115584
-190120
-453544

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5945
SELECT ALL - tab2.col2 + + CAST( NULL AS DECIMAL ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5945
SELECT ALL - tab2.col2 + + CAST ( NULL AS REAL ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * - 54 AS col1 FROM tab1
----
-162
-3456
-4320

query I rowsort
SELECT ALL col1 + col1 * + ( - col0 ) FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT col2 * 58 + cor0.col2 * col2 * col2 FROM tab0 AS cor0
----
37851
556124
59

query I rowsort
SELECT DISTINCT - col1 * 31 + col2 FROM tab2
----
-1803
-489
-934

query I rowsort
SELECT ALL + - col0 + 78 + + col0 FROM tab0 AS cor0
----
78
78
78

query I rowsort
SELECT ALL col0 + - 90 AS col0 FROM tab2 AS cor0
----
-11
-12
-83

query I rowsort
SELECT DISTINCT - col0 + + 46 * + ( + col1 ) AS col0 FROM tab2 AS cor0
----
1419
2636
703

query I rowsort
SELECT cor0.col0 * ( - col2 ) + col2 * + col1 * 55 FROM tab0 AS cor0
----
155298
403112
5300

onlyif mysql # use DIV operator for integer division
query I rowsort label-5954
SELECT DISTINCT + col0 DIV CAST( col2 * col1 AS SIGNED ) + - 9 * + col1 + + tab1.col1 * col2 AS col2 FROM tab1
----
1131
1170
480

skipif mysql # not compatible
query I rowsort label-5954
SELECT DISTINCT + col0 / CAST ( col2 * col1 AS INTEGER ) + - 9 * + col1 + + tab1.col1 * col2 AS col2 FROM tab1
----
1131
1170
480

query I rowsort
SELECT ALL col2 + col1 * - 57 * + col1 AS col2 FROM tab2
----
-16435
-198391
-54750

query I rowsort
SELECT ALL + col0 * - 55 FROM tab0
----
-1320
-1925
-4895

query I rowsort
SELECT ALL - 32 + col1 * col0 AS col2 FROM tab2 AS cor0
----
1311
185
4570

query I rowsort
SELECT 17 AS col1 FROM tab0 AS cor0
----
17
17
17

query I rowsort
SELECT DISTINCT + - ( + col2 ) * 88 AS col1 FROM tab2 AS cor0
----
-2288
-2376
-3344

query I rowsort
SELECT DISTINCT + + col0 * - cor0.col2 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col1 + + tab1.col0 FROM tab1
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col2 col2 FROM tab0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5964
SELECT DISTINCT col2 DIV - col0 col0 FROM tab1
----
-1
-18
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5964
SELECT DISTINCT col2 / - col0 col0 FROM tab1
----
-1
-18
0

query I rowsort
SELECT DISTINCT + col1 * col1 AS col1 FROM tab0
----
7396
8281
9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5966
SELECT CAST( col0 + col1 AS SIGNED ) FROM tab1
----
29
74
93

skipif mysql # not compatible
query I rowsort label-5966
SELECT CAST ( col0 + col1 AS INTEGER ) FROM tab1
----
29
74
93

query I rowsort
SELECT - 93 FROM tab1, tab2 AS cor0
----
9 values hashing to 38f445d95788c7dc754ff688a62df03b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5968
SELECT DISTINCT + CAST( 64 AS SIGNED ) AS col1 FROM tab2
----
64

skipif mysql # not compatible
query I rowsort label-5968
SELECT DISTINCT + CAST ( 64 AS INTEGER ) AS col1 FROM tab2
----
64

query I rowsort
SELECT + col0 + 96 * col2 AS col0 FROM tab2
----
2574
2599
3727

query I rowsort
SELECT ALL - 33 AS col2 FROM tab2 AS cor0
----
-33
-33
-33

query I rowsort
SELECT DISTINCT - - col1 * col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT 51 + col0 AS col2 FROM tab2 AS cor0
----
129
130
58

query I rowsort
SELECT ALL + + 61 + + col0 AS col2 FROM tab0 cor0
----
150
85
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5974
SELECT DISTINCT - + ( - col0 ) * CAST( + col0 * cor0.col1 + CAST( NULL AS SIGNED ) AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5974
SELECT DISTINCT - + ( - col0 ) * CAST ( + col0 * cor0.col1 + CAST ( NULL AS INTEGER ) AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + 73 AS col2 FROM tab0 AS cor0
----
73
73
73

query I rowsort
SELECT ALL ( col2 ) * + col2 * - 79 AS col2 FROM tab0 cor0
----
-531196
-79
-86031

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5977
SELECT ALL - cor0.col2 * col0 * CAST( 84 AS SIGNED ) FROM tab0 AS cor0
----
-2940
-613032
-66528

skipif mysql # not compatible
query I rowsort label-5977
SELECT ALL - cor0.col2 * col0 * CAST ( 84 AS INTEGER ) FROM tab0 AS cor0
----
-2940
-613032
-66528

query I rowsort
SELECT + 85 * + col2 * 66 AS col2 FROM tab2 AS cor0
----
145860
151470
213180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col2 col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + - col2 * + col0 + ( + 29 ) * + col0 FROM tab2 AS cor0
----
-711
14
234

onlyif mysql # use DIV operator for integer division
query I rowsort label-5981
SELECT ALL - ( + col2 ) DIV + CAST( col0 + col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5981
SELECT ALL - ( + col2 ) / + CAST ( col0 + col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col2 * + col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + 47 FROM tab2 AS cor0
----
47
47
47

query I rowsort
SELECT DISTINCT - + ( + col1 ) * - 68 * col2 FROM tab2 AS cor0
----
104312
43928
56916

query I rowsort
SELECT + 93 FROM tab0 AS cor0
----
93
93
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5986
SELECT DISTINCT col2 DIV - 62 AS col1 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-5986
SELECT DISTINCT col2 / - 62 AS col1 FROM tab2
----
0

query I rowsort
SELECT col2 * ( 10 ) FROM tab2
----
260
270
380

query I rowsort
SELECT - col1 + - col2 * + col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT col2 * ( + col0 ) AS col0 FROM tab1
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5990
SELECT CAST( NULL AS SIGNED ) col1 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5990
SELECT CAST ( NULL AS INTEGER ) col1 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-5991
SELECT DISTINCT col2 DIV - 3 col2 FROM tab1
----
-18
-19
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5991
SELECT DISTINCT col2 / - 3 col2 FROM tab1
----
-18
-19
-32

onlyif mysql # use DIV operator for integer division
query I rowsort label-5992
SELECT - - ( - col2 ) DIV - col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5992
SELECT - - ( - col2 ) / - col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT ALL - 35 * 11 FROM tab2
----
-385
-385
-385

query I rowsort
SELECT ALL + tab1.col0 AS col1 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 12 col1 FROM tab1
----
12
12
12

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab2, tab2 cor1
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT 47 * - 58 FROM tab1 AS cor0
----
-2726
-2726
-2726

query I rowsort
SELECT col2 * 26 * + col0 FROM tab2 cor0
----
4914
52728
78052

query I rowsort
SELECT - + 39 * - 1 * col2 FROM tab1 AS cor0
----
2106
2223
3744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 71 ) + - col0 col0 FROM tab2 AS cor0
----
-7
-8
64

query I rowsort
SELECT - col1 * - col1 * cor0.col0 FROM tab1 AS cor0
----
13520
2028
6400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6002
SELECT ALL CAST( col0 AS SIGNED ) + - col2 FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-6002
SELECT ALL CAST ( col0 AS INTEGER ) + - col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - 41 AS col1 FROM tab0 AS cor0
----
-41
-41
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 41 * col2 * + col2 col1 FROM tab2 AS cor0
----
27716
29889
59204

query I rowsort
SELECT + - col1 + + col2 * - col0 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT + - 32 - + 0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

query I rowsort
SELECT + + 26 * 53 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 26eaa3c1123807efd1a1b19a51ce3d90

query I rowsort
SELECT DISTINCT + col1 * col1 + col0 AS col2 FROM tab2
----
3559
368
968

query I rowsort
SELECT ALL + + col0 * - col2 + + 42 AS col1 FROM tab2 AS cor0
----
-147
-1986
-2960

query I rowsort
SELECT DISTINCT col1 + + col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + col0 + cor0.col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT 25 AS col1 FROM tab0 AS cor0
----
25

query I rowsort
SELECT DISTINCT - - 52 * - cor0.col2 FROM tab1 cor0
----
-2808
-2964
-4992

query I rowsort
SELECT ALL 91 + col1 + 92 FROM tab1 AS cor0
----
193
196
209

query I rowsort
SELECT - + col1 + - col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT - cor0.col2 FROM tab0 cor0 CROSS JOIN tab0 cor1
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT DISTINCT + 99 AS col1 FROM tab2 AS cor0
----
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col0 ) * + cor0.col2 * + col2 + col0 col0 FROM tab1 AS cor0
----
208000
737360
8751

query I rowsort
SELECT ALL - + 15 * - col1 AS col0 FROM tab0 AS cor0
----
1290
1365
1455

query I rowsort
SELECT - 65 + col0 FROM tab2 AS cor0
----
-58
13
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-6021
SELECT - col1 * - col0 + col2 DIV - 84 - col2 col0 FROM tab0 cor0
----
2031
3394
8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6021
SELECT - col1 * - col0 + col2 / - 84 - col2 col0 FROM tab0 cor0
----
2031
3394
8017

query I rowsort
SELECT - col1 * 43 * + col2 + + col1 FROM tab1 AS cor0
----
-24500
-53651
-60346

query I rowsort
SELECT col2 * + col0 + col2 AS col0 FROM tab0 AS cor0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col0 col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + col1 + + ( - cor0.col0 ) * col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL - - cor0.col0 AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + col2 + + col2 * 38 AS col2 FROM tab2 AS cor0
----
1014
1053
1482

query I rowsort
SELECT DISTINCT + 72 + col1 AS col1 FROM tab1
----
82
85
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6029
SELECT - + col0 + - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6029
SELECT - + col0 + - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6030
SELECT DISTINCT - CAST( 92 AS SIGNED ) DIV + cor0.col0 + 74 FROM tab1, tab2 cor0
----
61
73

skipif mysql # not compatible
query I rowsort label-6030
SELECT DISTINCT - CAST ( 92 AS INTEGER ) / + cor0.col0 + 74 FROM tab1, tab2 cor0
----
61
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6031
SELECT + col2 * CAST( 74 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
1924
1998
2812

skipif mysql # not compatible
query I rowsort label-6031
SELECT + col2 * CAST ( 74 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
1924
1998
2812

query I rowsort
SELECT - col1 * col1 + - 60 FROM tab0 AS cor0
----
-7456
-8341
-9469

onlyif mysql # use DIV operator for integer division
query I rowsort label-6033
SELECT + col1 DIV col2 - - ( + cor0.col1 ) AS col0 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-6033
SELECT + col1 / col2 - - ( + cor0.col1 ) AS col0 FROM tab0 AS cor0
----
194
88
92

query I rowsort
SELECT DISTINCT - col2 - + col2 FROM tab0
----
-164
-2
-66

query I rowsort
SELECT + col0 - 88 AS col1 FROM tab1 AS cor0
----
-24
-8
-85

query I rowsort
SELECT col2 * ( - col2 ) + col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT + + col0 * 29 + col0 FROM tab0 AS cor0
----
1050
2670
720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6038
SELECT - col0 + CAST( NULL AS SIGNED ) * - cor0.col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6038
SELECT - col0 + CAST ( NULL AS INTEGER ) * - cor0.col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col2 + col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT col2 - col0 * - 71 FROM tab0 AS cor0
----
1737
2486
6401

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0, tab2 cor0
----
17
31
59

query I rowsort
SELECT col1 + - col0 * + col2 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - + ( 66 ) AS col2 FROM tab2 AS cor0
----
-66
-66
-66

query I rowsort
SELECT - col1 + 6 AS col0 FROM tab0 AS cor0
----
-80
-85
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 - col2 col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - - 34 AS col2 FROM tab0 AS cor0
----
34
34
34

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab2, tab2 AS cor1
----
243 values hashing to 042fa16c43ab365359ee93c064e44127

query I rowsort
SELECT DISTINCT - 65 FROM tab2, tab0 AS cor0
----
-65

query I rowsort
SELECT ALL + cor0.col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col2 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + 59 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
59

query I rowsort
SELECT ALL + 68 * + tab2.col1 FROM tab2
----
1156
2108
4012

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6053
SELECT ALL col2 + - col2 * CAST( NULL AS SIGNED ) col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6053
SELECT ALL col2 + - col2 * CAST ( NULL AS INTEGER ) col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - col2 col0 FROM tab2
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col2 col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL col0 - - cor0.col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - cor0.col1 * + col1 + + col0 - cor0.col2 * - col0 AS col1 FROM tab1 AS cor0
----
-511
3612
7591

onlyif mysql # use DIV operator for integer division
query I rowsort label-6058
SELECT DISTINCT ( - col0 ) DIV - col0 AS col2 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-6058
SELECT DISTINCT ( - col0 ) / - col0 AS col2 FROM tab1
----
1

query I rowsort
SELECT ALL + cor0.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6060
SELECT ALL CAST( + col0 AS SIGNED ) FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-6060
SELECT ALL CAST ( + col0 AS INTEGER ) FROM tab1
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6061
SELECT cor0.col2 - ( col2 ) * CAST( + col2 + + col2 AS SIGNED ) AS col1 FROM tab0 cor0
----
-1
-13366
-2145

skipif mysql # not compatible
query I rowsort label-6061
SELECT cor0.col2 - ( col2 ) * CAST ( + col2 + + col2 AS INTEGER ) AS col1 FROM tab0 cor0
----
-1
-13366
-2145

query I rowsort
SELECT + + col0 * + col0 + + ( col2 ) * + cor0.col1 FROM tab0 AS cor0
----
1322
15383
3414

query I rowsort
SELECT ALL tab1.col0 AS col0 FROM tab1, tab2, tab0 cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6064
SELECT ALL CAST( NULL AS SIGNED ) FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6064
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL + 83 * + col2 AS col2 FROM tab1 AS cor0
----
4482
4731
7968

query I rowsort
SELECT ALL + - col2 * col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - + cor0.col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col0 + - col1 col2 FROM tab1 cor0
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT + 64 FROM tab1 AS cor0
----
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-6070
SELECT + + cor0.col2 * + col1 + + col1 DIV col0 AS col0 FROM tab2 cor0
----
1534
646
841

skipif mysql # not compatible
query I rowsort label-6070
SELECT + + cor0.col2 * + col1 + + col1 / col0 AS col0 FROM tab2 cor0
----
1534
646
841

onlyif mysql # use DIV operator for integer division
query I rowsort label-6071
SELECT - col2 DIV - col0 + - 70 col1 FROM tab1 AS cor0
----
-52
-69
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6071
SELECT - col2 / - col0 + - 70 col1 FROM tab1 AS cor0
----
-52
-69
-70

query I rowsort
SELECT DISTINCT - ( + col0 ) AS col2 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - col2 + ( 74 ) FROM tab1
----
-22
17
20

query I rowsort
SELECT DISTINCT 27 AS col1 FROM tab0, tab1 cor0
----
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + ( - cor0.col0 ) col2 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6076
SELECT + cor0.col2 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6076
SELECT + cor0.col2 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 43 + col2 + - col1 FROM tab1 cor0
----
126
71
90

query I rowsort
SELECT ALL - cor0.col0 * ( + cor0.col2 ) AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6079
SELECT DISTINCT + + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6079
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - 49 + 36 AS col0 FROM tab0 AS cor0
----
-13
-13
-13

query I rowsort
SELECT ALL - col1 * 67 + col1 * col2 * + 66 AS col1 FROM tab0 cor0
----
-97
181546
486395

query I rowsort
SELECT - col1 + 18 AS col2 FROM tab1 cor0
----
-8
5
8

query I rowsort
SELECT ALL + cor0.col0 + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT cor0.col0 + col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + col2 * cor0.col2 + col0 - col2 FROM tab1 AS cor0
----
2865
3256
9200

query I rowsort
SELECT + 69 * + col1 + col1 AS col0 FROM tab1 AS cor0
----
1820
700
910

query I rowsort
SELECT ALL + + 93 + + col1 FROM tab0 AS cor0
----
179
184
190

query I rowsort
SELECT DISTINCT - - col0 + - 67 * - col2 FROM tab0 AS cor0
----
102
2235
5583

query I rowsort
SELECT ALL + cor0.col0 + + tab0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to c345857bb273aa2639457b7deb30fe90

query I rowsort
SELECT DISTINCT - - 13 * col1 AS col1 FROM tab2 AS cor0
----
221
403
767

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( + ( col0 ) ) + + 17 + - cor0.col0 * + col2 col1 FROM tab0 cor0
----
-53
-7370
-799

query I rowsort
SELECT 87 AS col1 FROM tab1 cor0
----
87
87
87

query I rowsort
SELECT DISTINCT - + 42 * col0 - col1 FROM tab0 AS cor0
----
-1094
-1567
-3829

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col2 * col2 col2 FROM tab0 AS cor0
----
611884
93654
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6095
SELECT CAST( NULL AS SIGNED ) * + cor0.col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6095
SELECT CAST ( NULL AS INTEGER ) * + cor0.col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 81 * col0 AS col2 FROM tab0 AS cor0
----
1944
2835
7209

onlyif mysql # use DIV operator for integer division
query I rowsort label-6097
SELECT DISTINCT - 90 * + 40 - col1 * ( - col2 ) DIV - cor0.col1 AS col2 FROM tab0 cor0
----
-3601
-3633
-3682

skipif mysql # not compatible
query I rowsort label-6097
SELECT DISTINCT - 90 * + 40 - col1 * ( - col2 ) / - cor0.col1 AS col2 FROM tab0 cor0
----
-3601
-3633
-3682

query I rowsort
SELECT DISTINCT + + ( - ( col0 ) ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - - ( + col1 ) AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + + 76 * - col0 FROM tab0 AS cor0
----
-1824
-2660
-6764

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6101
SELECT DISTINCT - - ( col0 ) / - col0 + + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6101
SELECT DISTINCT - - ( col0 ) / - col0 + + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + 61 AS col2 FROM tab2 AS cor0
----
61
61
61

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to b8435223668db186a5012e4112253f28

query I rowsort
SELECT + 72 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to e1618abfe12be6a950cc575d695639b7

query I rowsort
SELECT + 10 FROM tab2 cor0
----
10
10
10

query I rowsort
SELECT DISTINCT tab2.col0 * col2 AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - 8 FROM tab0, tab2 AS cor0
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6108
SELECT + CAST( 65 + col2 AS SIGNED ) col1 FROM tab1
----
119
122
161

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6108
SELECT + CAST ( 65 + col2 AS INTEGER ) col1 FROM tab1
----
119
122
161

query I rowsort
SELECT + col1 * col0 - + col2 AS col1 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT ALL + cor0.col1 + + col0 AS col2 FROM tab2 AS cor0
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 - cor0.col0 * 17 col2 FROM tab2 AS cor0
----
-112
-1248
-1264

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 + - 78 * - tab2.col1 * + 53 col2 FROM tab2
----
128181
243932
70316

query I rowsort
SELECT DISTINCT - 9 AS col1 FROM tab2
----
-9

query I rowsort
SELECT - col0 - + tab2.col1 AS col2 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT DISTINCT col2 * ( col1 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col0 * 13 AS col1 FROM tab2 AS cor0
----
1014
1027
91

query I rowsort
SELECT ALL - + col0 + ( - col0 ) FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT DISTINCT + - cor0.col2 * 7 AS col2 FROM tab0 AS cor0
----
-231
-574
-7

query I rowsort
SELECT DISTINCT + col0 + 99 AS col0 FROM tab1 AS cor0
----
102
163
179

query I rowsort
SELECT - cor0.col0 + + col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * cor0.col1 col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + col2 + + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - + col0 * + col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT cor0.col0 + + 88 * + 27 FROM tab0 AS cor0
----
2400
2411
2465

query I rowsort
SELECT - col2 + 4 FROM tab2 AS cor0
----
-22
-23
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6126
SELECT ALL - col2 + + col1 DIV col2 FROM tab0 cor0
----
-31
-81
96

skipif mysql # not compatible
query I rowsort label-6126
SELECT ALL - col2 + + col1 / col2 FROM tab0 cor0
----
-31
-81
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6127
SELECT DISTINCT + col1 + col2 + + col1 DIV 79 AS col1 FROM tab0
----
120
174
99

skipif mysql # not compatible
query I rowsort label-6127
SELECT DISTINCT + col1 + col2 + + col1 / 79 AS col1 FROM tab0
----
120
174
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-6128
SELECT DISTINCT col0 DIV - tab1.col1 AS col0 FROM tab1
----
-6
0

skipif mysql # not compatible
query I rowsort label-6128
SELECT DISTINCT col0 / - tab1.col1 AS col0 FROM tab1
----
-6
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col1 * + 72 col2 FROM tab2 AS cor0
----
110448
46512
60264

query I rowsort
SELECT - 16 * + col0 + + ( + col1 + tab2.col2 ) AS col2 FROM tab2
----
-1163
-1209
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 - col1 col0 FROM tab2
----
40
68
82

query I rowsort
SELECT DISTINCT - col0 * ( + cor0.col1 + - col1 ) FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT + col1 * + col1 * + 81 + col0 FROM tab0 AS cor0
----
599100
670850
762164

skipif mysql # not compatible
query I rowsort
SELECT ALL - col2 - CAST ( - 83 AS REAL ) FROM tab1 cor0
----
-13
26
29

query I rowsort
SELECT - col1 + - ( col0 ) * col2 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT ALL + col0 * col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - col2 * 26 FROM tab2 AS cor0
----
-676
-702
-988

skipif mysql # not compatible
query I rowsort
SELECT cor0.col0 + + CAST ( col0 AS REAL ) * cor0.col2 AS col1 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT + col0 + - col2 AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - col2 * ( - 62 ) + - cor0.col0 AS col1 FROM tab1 AS cor0
----
3345
3470
5872

query I rowsort
SELECT - - col0 * col0 * + 7 + col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1341
28102
43552

query I rowsort
SELECT - cor0.col2 + col2 * col2 FROM tab0 AS cor0
----
0
1056
6642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT - tab2.col1 * - col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT + - cor0.col2 + - col2 * col1 * 40 FROM tab2 AS cor0
----
-25878
-33507
-61386

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6146
SELECT CAST( col2 + - col0 AS SIGNED ) FROM tab0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-6146
SELECT CAST ( col2 + - col0 AS INTEGER ) FROM tab0
----
-34
-7
9

query I rowsort
SELECT + 82 AS col0 FROM tab2
----
82
82
82

query I rowsort
SELECT + col0 * col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - - cor0.col0 * col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - 59 AS col0 FROM tab1
----
-59

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT 19 AS col2 FROM tab1
----
19
19
19

query I rowsort
SELECT ALL 1 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT DISTINCT + tab1.col2 * + 61 FROM tab1
----
3294
3477
5856

query I rowsort
SELECT DISTINCT 87 FROM tab1, tab1 cor0
----
87

query I rowsort
SELECT DISTINCT col1 * + col1 AS col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT DISTINCT - 89 + 87 AS col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
-2

query I rowsort
SELECT DISTINCT 88 + col0 * 68 AS col1 FROM tab2
----
5392
5460
564

query I rowsort
SELECT ALL cor0.col2 + - tab2.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 24ac20ff0e18df7340f3280e5b1c09f1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col1 ) + + 36 col2 FROM tab0 AS cor0
----
122
127
133

query I rowsort
SELECT - 17 * - col0 FROM tab1 AS cor0
----
1088
1360
51

query I rowsort
SELECT + col2 + - col1 * + ( - cor0.col2 ) AS col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT + col1 + cor0.col2 * col0 * + col0 AS col1 FROM tab0 AS cor0
----
1322
19094
649613

onlyif mysql # use DIV operator for integer division
query I rowsort label-6164
SELECT ALL + 57 DIV + col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6164
SELECT ALL + 57 / + col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col1 * ( - 2 ) * col2 FROM tab2 AS cor0
----
-1292
-1674
-3068

onlyif mysql # use DIV operator for integer division
query I rowsort label-6166
SELECT - col1 + + col0 * col1 DIV - col1 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

skipif mysql # not compatible
query I rowsort label-6166
SELECT - col1 + + col0 * col1 / - col1 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT col2 - - col1 FROM tab2
----
55
58
85

query I rowsort
SELECT + col1 + col2 * col0 AS col0 FROM tab1
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-6169
SELECT col0 - tab0.col2 DIV col2 AS col2 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-6169
SELECT col0 - tab0.col2 / col2 AS col2 FROM tab0
----
23
34
88

query I rowsort
SELECT DISTINCT - 73 FROM tab1
----
-73

query I rowsort
SELECT ALL - tab1.col2 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT + + col0 * + col2 - cor0.col1 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT - 87 FROM tab1, tab0 cor0
----
9 values hashing to 84bcab58a965cc8ae97b39d2d01b3d23

query I rowsort
SELECT col1 * col2 - - 14 * - col2 FROM tab2 AS cor0
----
114
1170
459

query I rowsort
SELECT DISTINCT cor0.col2 * ( 0 ) AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - cor0.col1 * col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + col2 * - ( - col2 ) - + col0 * col0 FROM tab0 AS cor0
----
-1197
-1224
513

query I rowsort
SELECT + + col1 * ( 26 ) AS col2 FROM tab2 AS cor0
----
1534
442
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-6179
SELECT col1 - 76 DIV col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6179
SELECT col1 - 76 / col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + col2 * col2 - - 27 * + cor0.col0 FROM tab2 AS cor0
----
2782
3577
918

query I rowsort
SELECT ( + col2 * col1 ) FROM tab1
----
1248
1404
570

query I rowsort
SELECT + 35 * - col1 AS col2 FROM tab1
----
-350
-455
-910

onlyif mysql # use DIV operator for integer division
query I rowsort label-6183
SELECT - col0 + - cor0.col2 DIV col0 AS col2 FROM tab0 AS cor0
----
-25
-35
-89

skipif mysql # not compatible
query I rowsort label-6183
SELECT - col0 + - cor0.col2 / col0 AS col2 FROM tab0 AS cor0
----
-25
-35
-89

query I rowsort
SELECT 83 + cor0.col0 * + cor0.col0 + 9 * - col0 FROM tab1 AS cor0
----
3603
5763
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-6185
SELECT - col0 DIV ( col0 ) + ( - col0 + col2 * - 26 ) FROM tab0 AS cor0
----
-2222
-62
-883

skipif mysql # not compatible
query I rowsort label-6185
SELECT - col0 / ( col0 ) + ( - col0 + col2 * - 26 ) FROM tab0 AS cor0
----
-2222
-62
-883

query I rowsort
SELECT 77 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 cor0, tab1 cor1, tab2, tab2 AS cor2
----
3645 values hashing to e3826bc27970dd1a441a9cd4c13b096d

query I rowsort
SELECT ( cor0.col2 ) FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-6189
SELECT col0 DIV col1 AS col2 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-6189
SELECT col0 / col1 AS col2 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT ALL + col1 * ( col0 * - col0 + 34 ) FROM tab2
----
-105519
-356950
-465

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6191
SELECT DISTINCT CAST( NULL AS DECIMAL ) / - col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-6191
SELECT DISTINCT CAST ( NULL AS REAL ) / - col0 FROM tab2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - 76 * col1 * col1 + - col1 FROM tab1 AS cor0
----
-12857
-51402
-7610

query I rowsort
SELECT ALL ( - 4 ) + - col2 FROM tab2 AS cor0
----
-30
-31
-42

query I rowsort
SELECT DISTINCT col1 - col0 * col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT - + 18 FROM tab0 AS cor0
----
-18
-18
-18

onlyif mysql # use DIV operator for integer division
query I rowsort label-6197
SELECT DISTINCT col2 + + 66 DIV col0 - - ( + col1 ) FROM tab0 AS cor0
----
121
173
99

skipif mysql # not compatible
query I rowsort label-6197
SELECT DISTINCT col2 + + 66 / col0 - - ( + col1 ) FROM tab0 AS cor0
----
121
173
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col2 ) col2 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6199
SELECT + col0 * ( col0 * - CAST( NULL AS SIGNED ) ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6199
SELECT + col0 * ( col0 * - CAST ( NULL AS INTEGER ) ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col1 + + col2 * + col2 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT DISTINCT + 43 + col1 * + col2 * - col0 FROM tab1 AS cor0
----
-36437
-4169
-99797

query I rowsort
SELECT ALL + - 1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + cor0.col1 * - col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - - 60 FROM tab0 cor0
----
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6205
SELECT ALL + col0 + ( col1 ) * + ( col1 + col2 ) / CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6205
SELECT ALL + col0 + ( col1 ) * + ( col1 + col2 ) / CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 + - col0 - + col2 FROM tab1 AS cor0
----
-185
-256
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 52 + - col0 + + col2 col0 FROM tab2 AS cor0
----
-104
-32
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6208
SELECT - + CAST( - col0 AS SIGNED ) + - col2 * - col2 FROM tab2 AS cor0
----
1523
736
754

skipif mysql # not compatible
query I rowsort label-6208
SELECT - + CAST ( - col0 AS INTEGER ) + - col2 * - col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ALL - - col2 + col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + + col2 + + col1 * - col1 FROM tab1 cor0
----
-43
-622
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - 42 * + col0 col2 FROM tab1 AS cor0
----
-26880
-3276
-43680

query I rowsort
SELECT ALL + + col2 * - col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + cor0.col0 * + col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + 36 AS col2 FROM tab2 AS cor0
----
36

query I rowsort
SELECT ALL + - ( - ( + cor0.col0 ) ) * col2 * + col1 AS col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT 34 AS col1 FROM tab0, tab0 AS cor0
----
34

query I rowsort
SELECT ALL 39 - col2 FROM tab1
----
-15
-18
-57

query I rowsort
SELECT ALL + col2 - - 43 FROM tab2
----
69
70
81

query I rowsort
SELECT ALL col0 * + col2 + col1 AS col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT - + 58 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
1508
580
754

query I rowsort
SELECT 78 AS col1 FROM tab0
----
78
78
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6222
SELECT + col0 DIV cor0.col1 + col2 FROM tab2 AS cor0
----
27
27
42

skipif mysql # not compatible
query I rowsort label-6222
SELECT + col0 / cor0.col1 + col2 FROM tab2 AS cor0
----
27
27
42

query I rowsort
SELECT ALL - + col0 * cor0.col2 * col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT - col1 * - ( + col2 ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + tab1.col2 + col0 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT 71 + + col0 FROM tab1
----
135
151
74

query I rowsort
SELECT + 61 AS col1 FROM tab2
----
61
61
61

query I rowsort
SELECT tab2.col1 - 74 * col1 AS col1 FROM tab2
----
-1241
-2263
-4307

query I rowsort
SELECT DISTINCT + - col1 AS col1 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL + col0 * - col0 - + cor0.col1 AS col2 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT + cor0.col0 * 47 FROM tab0 cor0
----
1128
1645
4183

query I rowsort
SELECT ALL col2 * - 26 AS col0 FROM tab1 AS cor0
----
-1404
-1482
-2496

onlyif mysql # use DIV operator for integer division
query I rowsort label-6233
SELECT col0 DIV col1 + ( col0 ) FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6233
SELECT col0 / col1 + ( col0 ) FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col2 col0 FROM tab1
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-6235
SELECT - cor0.col2 + col0 * - col0 DIV col0 AS col1 FROM tab1 AS cor0
----
-121
-176
-57

skipif mysql # not compatible
query I rowsort label-6235
SELECT - cor0.col2 + col0 * - col0 / col0 AS col1 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT + col2 * cor0.col0 * 32 AS col2 FROM tab2 AS cor0
----
6048
64896
96064

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + ( + col0 ) * - cor0.col0 col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT + cor0.col1 + + 93 * + col2 AS col1 FROM tab2 AS cor0
----
2477
2542
3551

query I rowsort
SELECT - + col0 * col0 + ( col1 ) + 65 * cor0.col2 FROM tab1 AS cor0
----
-147
-381
3527

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 37 col1 FROM tab0 cor0
----
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6241
SELECT DISTINCT + CAST( - col1 AS SIGNED ) FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6241
SELECT DISTINCT + CAST ( - col1 AS INTEGER ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - col0 * - col0 + col2 * - col1 * - col1 + col1 FROM tab0 AS cor0
----
10731
244730
687054

query I rowsort
SELECT DISTINCT + 93 * - col1 FROM tab2 cor0
----
-1581
-2883
-5487

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 60 col1 FROM tab0
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 98 col1 FROM tab2 AS cor0
----
-98
-98
-98

query I rowsort
SELECT tab1.col2 * + tab1.col0 FROM tab1
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6247
SELECT ALL - + col0 + - col1 * - CAST( + col0 AS SIGNED ) AS col2 FROM tab2 cor0
----
1264
210
4524

skipif mysql # not compatible
query I rowsort label-6247
SELECT ALL - + col0 + - col1 * - CAST ( + col0 AS INTEGER ) AS col2 FROM tab2 cor0
----
1264
210
4524

query I rowsort
SELECT ALL 46 * - tab1.col0 + - 47 AS col1 FROM tab1
----
-185
-2991
-3727

query I rowsort
SELECT ALL col1 * tab2.col0 * col1 + - ( col1 + col1 ) FROM tab2
----
22797
271400
6665

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT + - col2 - col1 * 42 * 64 FROM tab0 AS cor0
----
-231201
-244690
-260737

query I rowsort
SELECT DISTINCT - - cor0.col0 + cor0.col2 * - col2 AS col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col1 + col2 col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + + 6 + cor0.col0 FROM tab0 AS cor0
----
30
41
95

query I rowsort
SELECT DISTINCT + 58 + cor0.col2 AS col2 FROM tab2 AS cor0
----
84
85
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6256
SELECT - + col1 DIV - col2 + - 84 * - 50 AS col1 FROM tab1 AS cor0
----
4200
4200
4200

skipif mysql # not compatible
query I rowsort label-6256
SELECT - + col1 / - col2 + - 84 * - 50 AS col1 FROM tab1 AS cor0
----
4200
4200
4200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 22 + + col2 * + col0 col0 FROM tab1 AS cor0
----
184
3670
7702

query I rowsort
SELECT ALL - col1 + - col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT col0 + col1 * 75 FROM tab0 AS cor0
----
6474
6914
7310

query I rowsort
SELECT + col2 * cor0.col2 + col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT + cor0.col2 + - col2 * col0 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT - col1 * col1 FROM tab2 AS cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col1 * - 77 col2 FROM tab2 AS cor0
----
1326
2418
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-6264
SELECT - col2 DIV cor0.col2 + + col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-6264
SELECT - col2 / cor0.col2 + + col0 FROM tab1 AS cor0
----
2
63
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * - ( + ( col0 ) ) col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT col2 + - cor0.col2 * col0 FROM tab1 AS cor0
----
-108
-3591
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col0 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT - cor0.col2 * + col2 * + ( - col2 ) FROM tab1 AS cor0
----
157464
185193
884736

query I rowsort
SELECT DISTINCT + col2 * - 94 + col0 AS col1 FROM tab2 AS cor0
----
-2366
-2531
-3493

query I rowsort
SELECT - + col2 * - ( col0 ) * col2 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT col1 * + col1 * + col1 + - col0 AS col0 FROM tab2
----
205301
29784
4834

query I rowsort
SELECT DISTINCT col0 + col2 * - tab0.col0 AS col1 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT tab1.col2 * - col2 * - 55 + + col1 FROM tab1
----
160406
178705
506893

query I rowsort
SELECT + - col1 + col1 * col0 AS col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT + 18 + - col1 FROM tab1
----
-8
5
8

query I rowsort
SELECT ALL 15 * - col0 + + 21 AS col1 FROM tab2
----
-1149
-1164
-84

query I rowsort
SELECT ( col2 + col2 ) AS col0 FROM tab1
----
108
114
192

query I rowsort
SELECT DISTINCT + + ( - col1 ) AS col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT - col0 + + col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - + ( - 50 ) * col1 AS col2 FROM tab1 AS cor0
----
1300
500
650

query I rowsort
SELECT cor1.col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6282
SELECT - - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6282
SELECT - - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * col1 * - col0 - col1 FROM tab1 AS cor0
----
-36490
-4238
-99853

query I rowsort
SELECT ( - col1 ) + + cor0.col2 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6285
SELECT - col2 DIV col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6285
SELECT - col2 / col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + - col2 + - col0 * 96 - - col0 FROM tab2 AS cor0
----
-692
-7436
-7543

query I rowsort
SELECT + + 83 AS col2 FROM tab1 AS cor0
----
83
83
83

query I rowsort
SELECT ALL - cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 62 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT - col1 * + col2 + + col2 AS col2 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT + + col1 + - cor0.col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + col0 + ( cor0.col2 ) * + cor0.col0 AS col0 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6293
SELECT ALL + col2 * CAST( - 31 + col1 AS SIGNED ) col2 FROM tab1 AS cor0
----
-1197
-1728
-270

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6293
SELECT ALL + col2 * CAST ( - 31 + col1 AS INTEGER ) col2 FROM tab1 AS cor0
----
-1197
-1728
-270

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL col0 * - 13 AS col0 FROM tab0 cor0
----
-1157
-312
-455

query I rowsort
SELECT ALL + col2 + ( cor0.col0 + + col0 ) FROM tab0 AS cor0
----
260
71
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 * - col0 + + ( col0 ) + col1 col0 FROM tab1 AS cor0
----
38
4170
6493

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6298
SELECT DISTINCT col1 + CAST( - col2 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-6298
SELECT DISTINCT col1 + CAST ( - col2 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT col1 * + ( - col0 ) - + col2 * - ( + ( + col1 ) ) FROM tab0 cor0
----
-3298
-637
774

query I rowsort
SELECT + col2 * + 86 FROM tab2 AS cor0
----
2236
2322
3268

query I rowsort
SELECT + + cor0.col1 * + ( + col0 + + col0 ) FROM tab0 AS cor0
----
16198
4128
6790

query I rowsort
SELECT ALL tab0.col0 * 77 AS col0 FROM tab0
----
1848
2695
6853

query I rowsort
SELECT 55 * cor0.col2 FROM tab2 AS cor0
----
1430
1485
2090

query I rowsort
SELECT DISTINCT + - col0 * - col2 - col2 * - cor0.col0 AS col0 FROM tab2 AS cor0
----
378
4056
6004

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2, tab0 AS cor3
----
3645 values hashing to ab1725cc571093d8268326e5b556cfaf

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col0 col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT + 16 * + ( + col0 ) AS col0 FROM tab2 AS cor0
----
112
1248
1264

query I rowsort
SELECT col1 * + col1 * col1 AS col0 FROM tab1 AS cor0
----
1000
17576
2197

query I rowsort
SELECT DISTINCT - 28 FROM tab2 AS cor0
----
-28

query I rowsort
SELECT DISTINCT + 18 * + col2 FROM tab0 AS cor0
----
1476
18
594

query I rowsort
SELECT col2 * 8 FROM tab2 AS cor0
----
208
216
304

query I rowsort
SELECT ALL - col2 * - col2 AS col1 FROM tab2 cor0
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col0 ) * + col0 col0 FROM tab2 AS cor0
----
-49
-6084
-6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6314
SELECT + CAST( NULL AS DECIMAL ) * ( col2 * col0 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6314
SELECT + CAST ( NULL AS REAL ) * ( col2 * col0 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor0.col2 * - cor0.col1 * - col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT 87 * 44 * tab0.col1 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 3140e9ee342b125dfd1c71df49e1eb38

query I rowsort
SELECT ALL + col1 * 91 FROM tab2
----
1547
2821
5369

query I rowsort
SELECT 49 FROM tab0, tab1 AS cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT + 57 AS col1 FROM tab1
----
57
57
57

query I rowsort
SELECT + ( - 57 ) FROM tab0 AS cor0
----
-57
-57
-57

query I rowsort
SELECT DISTINCT + cor1.col0 AS col1 FROM tab0, tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT ALL - col1 * - col0 FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6323
SELECT - - 7 DIV col1 col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6323
SELECT - - 7 / col1 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 16 FROM tab1
----
-16
-16
-16

query I rowsort
SELECT + tab1.col1 * - col2 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + - col1 + col1 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 * col1 + col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT 41 AS col1 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6329
SELECT + col1 + + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6329
SELECT + col1 + + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * - 90 AS col0 FROM tab1 AS cor0
----
-270
-5760
-7200

query I rowsort
SELECT DISTINCT + col2 * col0 AS col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + tab0.col0 FROM tab0, tab2 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - - col1 * col2 * col0 AS col2 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-6334
SELECT + + col0 * + cor0.col1 DIV + col1 + col0 FROM tab1 AS cor0
----
128
160
6

skipif mysql # not compatible
query I rowsort label-6334
SELECT + + col0 * + cor0.col1 / + col1 + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL + col2 + + col2 AS col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + 10 AS col0 FROM tab1 AS cor0
----
10
10
10

query I rowsort
SELECT DISTINCT col1 + col1 FROM tab0 cor0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6338
SELECT DISTINCT col1 * + col2 + CAST( + col0 AS SIGNED ) * + col1 * + 21 - col2 AS col2 FROM tab2 AS cor0
----
28811
5367
98150

skipif mysql # not compatible
query I rowsort label-6338
SELECT DISTINCT col1 * + col2 + CAST ( + col0 AS INTEGER ) * + col1 * + 21 - col2 AS col2 FROM tab2 AS cor0
----
28811
5367
98150

query I rowsort
SELECT ALL + 20 + col0 FROM tab1 AS cor0
----
100
23
84

query I rowsort
SELECT ALL - - col1 + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT 48 * - col1 AS col2 FROM tab0 AS cor0
----
-4128
-4368
-4656

query I rowsort
SELECT ALL - 73 * + cor0.col2 - col0 * 48 FROM tab1 AS cor0
----
-10848
-4086
-7233

query I rowsort
SELECT DISTINCT + + col1 * + col1 * 9 FROM tab1 AS cor0
----
1521
6084
900

query I rowsort
SELECT DISTINCT - col1 + col0 - cor0.col2 AS col2 FROM tab2 AS cor0
----
-51
-7
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 51 col1 FROM tab0 AS cor0
----
51
51
51

query I rowsort
SELECT + 19 + cor0.col0 FROM tab1 AS cor0
----
22
83
99

query I rowsort
SELECT - + col1 * col0 FROM tab1 cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + col0 col2 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT + ( col0 ) * - 78 AS col1 FROM tab0 AS cor0
----
-1872
-2730
-6942

query I rowsort
SELECT DISTINCT + col2 + + col2 * col2 * col0 AS col2 FROM tab0 AS cor0
----
26169
36
598518

query I rowsort
SELECT DISTINCT - - col0 + ( - col1 ) * - col2 AS col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + 41 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + - 64 col1 FROM tab0 AS cor0
----
-146
-65
-97

query I rowsort
SELECT DISTINCT ( col0 ) FROM tab2
----
7
78
79

query I rowsort
SELECT + - 45 + - 6 AS col0 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 08d3853e39924d3c636260a6dd856837

query I rowsort
SELECT + col1 * - col2 + - 71 * 72 FROM tab1
----
-5682
-6360
-6516

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL + + col2 * + cor0.col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT + ( col0 ) + - col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL col2 + col1 * - col0 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT + + cor0.col1 + cor0.col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL ( col0 ) * col0 + 60 - + col0 * col1 FROM tab2 AS cor0
----
-108
1542
4958

onlyif mysql # use DIV operator for integer division
query I rowsort label-6363
SELECT + - ( + col1 ) * - cor0.col0 + - col1 DIV + col2 col1 FROM tab0 AS cor0
----
2062
3298
8098

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6363
SELECT + - ( + col1 ) * - cor0.col0 + - col1 / + col2 col1 FROM tab0 AS cor0
----
2062
3298
8098

query I rowsort
SELECT + 59 * 82 + cor0.col2 FROM tab0 AS cor0
----
4839
4871
4920

query I rowsort
SELECT DISTINCT col1 * + cor0.col0 + col2 - + 60 AS col2 FROM tab0 AS cor0
----
2037
3336
8121

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2, tab2 AS cor2, tab0
----
13122 values hashing to 82c39dacd43aaf38a88ea54d69b13597

query I rowsort
SELECT DISTINCT + 21 AS col2 FROM tab0 AS cor0
----
21

query I rowsort
SELECT DISTINCT - col0 * col1 + - col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT ALL 94 + 31 FROM tab0
----
125
125
125

query I rowsort
SELECT ( + 41 ) AS col0 FROM tab1
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col2 FROM tab2, tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 col1 FROM tab0
----
164
2
66

query I rowsort
SELECT tab0.col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab0, tab1 AS cor1
----
3645 values hashing to f464d40c605db608927f2c4d66190a23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6375
SELECT + col2 * + cor0.col1 + CAST( 53 AS SIGNED ) * col2 AS col1 FROM tab0 AS cor0
----
11808
150
4587

skipif mysql # not compatible
query I rowsort label-6375
SELECT + col2 * + cor0.col1 + CAST ( 53 AS INTEGER ) * col2 AS col1 FROM tab0 AS cor0
----
11808
150
4587

query I rowsort
SELECT + col0 * cor0.col2 + + ( ( col2 ) ) AS col1 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-6377
SELECT col1 DIV col0 + - 1 DIV col1 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-6377
SELECT col1 / col0 + - 1 / col1 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT + col0 + - col1 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + col0 + + col2 * col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT DISTINCT col2 * - tab0.col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT - 75 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to c0722b1d77ac0ed13c0f2691a5751c59

query I rowsort
SELECT + 90 * - col1 + 33 AS col2 FROM tab0
----
-7707
-8157
-8697

onlyif mysql # use DIV operator for integer division
query I rowsort label-6384
SELECT ALL + + 49 + + col1 DIV + col2 AS col1 FROM tab0 AS cor0
----
146
50
51

skipif mysql # not compatible
query I rowsort label-6384
SELECT ALL + + 49 + + col1 / + col2 AS col1 FROM tab0 AS cor0
----
146
50
51

query I rowsort
SELECT DISTINCT + 81 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
81

query I rowsort
SELECT ALL - col2 * - col2 - col2 * - col2 FROM tab2 AS cor0
----
1352
1458
2888

query I rowsort
SELECT DISTINCT - ( - col0 ) + 93 * col2 FROM tab0 cor0
----
128
3093
7715

query I rowsort
SELECT ALL col2 * col1 + 15 FROM tab0 AS cor0
----
112
2853
7477

query I rowsort
SELECT ALL col1 - col1 * - col2 AS col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT - 81 + cor0.col1 FROM tab0 AS cor0
----
10
16
5

query I rowsort
SELECT tab1.col0 * - col1 + col2 * - col0 * col1 FROM tab1
----
-100880
-37120
-4290

query I rowsort
SELECT + 92 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

query I rowsort
SELECT + col1 + ( col2 ) * col0 FROM tab0 AS cor0
----
132
7389
878

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6394
SELECT + col0 * CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6394
SELECT + col0 * CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 * - 31 AS col0 FROM tab0 cor0
----
2666
2821
3007

query I rowsort
SELECT - + col0 * 33 + + col2 * 56 AS col2 FROM tab2 AS cor0
----
-1118
-479
1281

query I rowsort
SELECT DISTINCT 86 * + col2 FROM tab0 AS cor0
----
2838
7052
86

query I rowsort
SELECT ALL + 91 + col2 FROM tab2 AS cor0
----
117
118
129

onlyif mysql # use DIV operator for integer division
query I rowsort label-6399
SELECT 41 DIV + col0 + + col2 * col2 AS col2 FROM tab1 AS cor0
----
2929
3249
9216

skipif mysql # not compatible
query I rowsort label-6399
SELECT 41 / + col0 + + col2 * col2 AS col2 FROM tab1 AS cor0
----
2929
3249
9216

query I rowsort
SELECT DISTINCT - - cor0.col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL + col1 * col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - col2 + col2 + col0 AS col1 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( - col2 AS REAL ) FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col2 ) * col2 col1 FROM tab1
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 44 col0 FROM tab2 AS cor0
----
-1364
-2596
-748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col0 ) + col2 * + ( cor0.col1 * col0 ) - 48 col2 FROM tab2 AS cor0
----
119682
51065
5818

query I rowsort
SELECT + col1 + - col2 + col1 FROM tab1 AS cor0
----
-2
-37
-70

query I rowsort
SELECT ALL + 82 * cor0.col0 + col0 * + 10 AS col0 FROM tab2 AS cor0
----
644
7176
7268

query I rowsort
SELECT + 7 AS col2 FROM tab0 AS cor0
----
7
7
7

query I rowsort
SELECT - col2 + + 44 FROM tab1
----
-10
-13
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 + + tab2.col2 col2 FROM tab2
----
134
163
65

query I rowsort
SELECT ALL 77 FROM tab2, tab2 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT ALL col0 - - col0 FROM tab0
----
178
48
70

query I rowsort
SELECT + + col2 + col0 AS col2 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6415
SELECT DISTINCT - CAST( NULL AS SIGNED ) + col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6415
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT 5 AS col1 FROM tab1 AS cor0
----
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6417
SELECT DISTINCT - CAST( - col2 AS SIGNED ) * - col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort label-6417
SELECT DISTINCT - CAST ( - col2 AS INTEGER ) * - col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6418
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6418
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT + col1 - - col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT - cor0.col1 * + col1 + + col1 * + col1 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 74 FROM tab1
----
74
74
74

query I rowsort
SELECT ALL 24 * - col1 FROM tab1
----
-240
-312
-624

onlyif mysql # use DIV operator for integer division
query I rowsort label-6423
SELECT col1 - ( col1 ) DIV tab0.col2 FROM tab0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-6423
SELECT col1 - ( col1 ) / tab0.col2 FROM tab0
----
0
84
90

query I rowsort
SELECT + col0 + + ( + 51 * + col1 ) AS col0 FROM tab2
----
1588
3087
946

onlyif mysql # use DIV operator for integer division
query I rowsort label-6425
SELECT - col1 DIV + 99 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6425
SELECT - col1 / + 99 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * 28 AS col2 FROM tab1 AS cor0
----
-280
-364
-728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + ( 4 ) col1 FROM tab0 AS cor0
----
28
39
93

query I rowsort
SELECT ALL 48 FROM tab1
----
48
48
48

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6429
SELECT DISTINCT + CAST( col1 AS SIGNED ) * col0 AS col2 FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-6429
SELECT DISTINCT + CAST ( col1 AS INTEGER ) * col0 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col0 * tab0.col0 AS col2 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT 35 * col1 AS col0 FROM tab2
----
1085
2065
595

query I rowsort
SELECT ALL + + col0 + + col2 AS col1 FROM tab2 AS cor0
----
104
117
34

query IIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 WHERE NOT NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT + col0 * + 2 FROM tab2
----
14
156
158

query I rowsort
SELECT DISTINCT + ( col1 ) + col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT + - 83 AS col0 FROM tab0 AS cor0
----
-83
-83
-83

query I rowsort
SELECT DISTINCT - 63 * col0 FROM tab0 AS cor0
----
-1512
-2205
-5607

onlyif mysql # use DIV operator for integer division
query I rowsort label-6438
SELECT ALL + 77 * 51 DIV col0 + col1 * col1 FROM tab0 AS cor0
----
7559
8325
9521

skipif mysql # not compatible
query I rowsort label-6438
SELECT ALL + 77 * 51 / col0 + col1 * col1 FROM tab0 AS cor0
----
7559
8325
9521

query I rowsort
SELECT + 76 AS col0 FROM tab2 AS cor0
----
76
76
76

query I rowsort
SELECT col1 * cor0.col0 + + col0 * col0 + - col1 AS col1 FROM tab0 AS cor0
----
15929
2554
4523

query I rowsort
SELECT + - 13 + + col1 * col2 FROM tab0 cor0
----
2825
7449
84

query I rowsort
SELECT - col2 * col1 + col0 * + col1 AS col0 FROM tab1 AS cor0
----
-1326
-208
70

query I rowsort
SELECT + - 17 * cor0.col2 FROM tab2 AS cor0
----
-442
-459
-646

query I rowsort
SELECT - + col2 * - col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT 29 FROM tab0 AS cor0
----
29

query I rowsort
SELECT cor0.col0 + + col0 AS col0 FROM tab1 AS cor0
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 81 col0 FROM tab0
----
81
81
81

query I rowsort
SELECT 45 + - tab0.col0 * - col0 AS col0 FROM tab0
----
1270
621
7966

query I rowsort
SELECT - 2 AS col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 20c9213316527d507e26425041e08387

query I rowsort
SELECT cor0.col1 * - col0 + col1 * + col2 + cor0.col2 * ( 12 ) * - col0 FROM tab1 AS cor0
----
-43846
-618
-91952

query I rowsort
SELECT + + 0 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL col0 * tab2.col1 + - ( + tab2.col1 + + col2 ) FROM tab2
----
1288
159
4517

onlyif mysql # use DIV operator for integer division
query I rowsort label-6453
SELECT ALL tab2.col1 DIV col1 + col0 * + col1 col1 FROM tab2
----
1344
218
4603

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6453
SELECT ALL tab2.col1 / col1 + col0 * + col1 col1 FROM tab2
----
1344
218
4603

onlyif mysql # use DIV operator for integer division
query I rowsort label-6454
SELECT 53 DIV cor0.col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 901db839f72aa7a87bd4d1b6a05d33cc

skipif mysql # not compatible
query I rowsort label-6454
SELECT 53 / cor0.col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 901db839f72aa7a87bd4d1b6a05d33cc

onlyif mysql # use DIV operator for integer division
query I rowsort label-6455
SELECT ALL - - 73 DIV + col2 + col1 * 47 - col2 AS col1 FROM tab0 AS cor0
----
4011
4195
4631

skipif mysql # not compatible
query I rowsort label-6455
SELECT ALL - - 73 / + col2 + col1 * 47 - col2 AS col1 FROM tab0 AS cor0
----
4011
4195
4631

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * cor0.col0 * - col1 + + col2 col0 FROM tab1 AS cor0
----
-180
-40903
-83104

query I rowsort
SELECT + + 57 + - col2 AS col1 FROM tab2 AS cor0
----
19
30
31

query I rowsort
SELECT - - col2 + - col2 * + col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL col1 - - col0 * 31 FROM tab2 AS cor0
----
2466
2477
248

query I rowsort
SELECT cor0.col2 + + col2 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT ALL - - col2 + + cor0.col0 * col1 AS col2 FROM tab2 cor0
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-6462
SELECT DISTINCT + + col1 * col0 DIV + ( col1 ) FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6462
SELECT DISTINCT + + col1 * col0 / + ( col1 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - col2 + ( col2 ) AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - + col0 + col0 * 73 AS col0 FROM tab0 AS cor0
----
1728
2520
6408

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col1 + - col2 FROM tab2 AS cor0
----
-1381
-244
-4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-6466
SELECT DISTINCT - - col0 + - 87 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
21
33
89

skipif mysql # not compatible
query I rowsort label-6466
SELECT DISTINCT - - col0 + - 87 / cor0.col0 AS col0 FROM tab0 AS cor0
----
21
33
89

query I rowsort
SELECT + ( col0 ) * tab0.col1 * + col2 FROM tab0
----
3395
664118
68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col0 ) col1 FROM tab2
----
7
78
79

query I rowsort
SELECT + col1 - - 70 AS col2 FROM tab2 AS cor0
----
101
129
87

query I rowsort
SELECT ALL - - col2 * - col2 + - col2 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT DISTINCT 12 * col1 FROM tab0 AS cor0
----
1032
1092
1164

query I rowsort
SELECT DISTINCT - - col2 - col1 * col0 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT 53 * - col1 * col2 + - col1 AS col0 FROM tab1 cor0
----
-30220
-66157
-74438

query I rowsort
SELECT + + col0 + ( + col1 ) AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - 66 + - 22 AS col2 FROM tab0 AS cor0
----
-88
-88
-88

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0, tab2 AS cor0, tab2 AS cor1
----
972 values hashing to a698694a7dac245e42212ff0316bdf45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6477
SELECT CAST( col0 AS SIGNED ) * - col2 - col0 * col1 AS col1 FROM tab2 cor0
----
-406
-4345
-6630

skipif mysql # not compatible
query I rowsort label-6477
SELECT CAST ( col0 AS INTEGER ) * - col2 - col0 * col1 AS col1 FROM tab2 cor0
----
-406
-4345
-6630

query I rowsort
SELECT ALL - - col0 * ( col2 ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6479
SELECT DISTINCT - CAST( + 69 AS SIGNED ) AS col1 FROM tab1 cor0
----
-69

skipif mysql # not compatible
query I rowsort label-6479
SELECT DISTINCT - CAST ( + 69 AS INTEGER ) AS col1 FROM tab1 cor0
----
-69

query I rowsort
SELECT ALL col2 + - col1 AS col2 FROM tab1
----
28
47
83

query I rowsort
SELECT ( col1 ) + - col0 * + ( - cor0.col2 * cor0.col1 ) FROM tab1 AS cor0
----
36490
4238
99853

query I rowsort
SELECT ALL col2 + 61 * - 77 * col0 + 98 FROM tab1
----
-13939
-300453
-375566

onlyif mysql # use DIV operator for integer division
query I rowsort label-6483
SELECT col0 DIV 82 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6483
SELECT col0 / 82 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + tab0.col2 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL ( + col0 ) + ( - col2 ) FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + ( - 2 ) AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 20c9213316527d507e26425041e08387

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2
----
3645 values hashing to f1666fadc663c90ea9374fcb108b4477

query I rowsort
SELECT - ( col0 ) + - col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT - col2 + - col2 FROM tab1 cor0
----
-108
-114
-192

query I rowsort
SELECT ALL + 22 FROM tab1
----
22
22
22

query I rowsort
SELECT ALL col2 - tab1.col2 AS col0 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6492
SELECT DISTINCT 36 DIV 58 AS col1 FROM tab1, tab2 cor0 CROSS JOIN tab2
----
0

skipif mysql # not compatible
query I rowsort label-6492
SELECT DISTINCT 36 / 58 AS col1 FROM tab1, tab2 cor0 CROSS JOIN tab2
----
0

query I rowsort
SELECT ALL tab0.col1 + col0 AS col1 FROM tab0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6494
SELECT DISTINCT col1 + - 96 * + col2 + col0 * + CAST( NULL AS SIGNED ) col0 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6494
SELECT DISTINCT col1 + - 96 * + col2 + col0 * + CAST ( NULL AS INTEGER ) col0 FROM tab1
----
NULL

query I rowsort
SELECT ALL + col1 * tab1.col1 + - col1 + col1 * ( - ( + col0 ) ) FROM tab1
----
-550
-884
572

query I rowsort
SELECT ALL - col0 * + col0 + - ( + col1 * + 23 ) FROM tab2
----
-6632
-7441
-762

query I rowsort
SELECT ALL 70 * 52 FROM tab1, tab1 AS cor0
----
9 values hashing to 7332ecfeffc63276eec1c10824bb9475

query I rowsort
SELECT ALL + col1 + + col0 AS col0 FROM tab0 cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col0 * - col2 + col2 + + col0 * - ( - col0 ) col1 FROM tab1
----
14176
225
7801

query I rowsort
SELECT ALL - ( ( col0 ) ) FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL ( col1 ) * cor0.col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - - 98 + cor0.col2 AS col2 FROM tab0 AS cor0
----
131
180
99

query I rowsort
SELECT + col1 + cor0.col2 * - col0 AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL + cor0.col1 * + col0 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6505
SELECT DISTINCT - + col2 DIV 85 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6505
SELECT DISTINCT - + col2 / 85 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - 94 AS col0 FROM tab0 cor0
----
-94
-94
-94

query I rowsort
SELECT DISTINCT + - 90 AS col2 FROM tab1 cor0
----
-90

query I rowsort
SELECT ALL + - 81 * col0 AS col1 FROM tab1 AS cor0
----
-243
-5184
-6480

query I rowsort
SELECT + 86 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT + col2 * col2 + col1 * col1 FROM tab1 AS cor0
----
3349
3592
9385

query I rowsort
SELECT ALL + 25 FROM tab0 AS cor0
----
25
25
25

query I rowsort
SELECT + 16 * 98 AS col2 FROM tab0 cor0
----
1568
1568
1568

query I rowsort
SELECT DISTINCT col2 * + 6 FROM tab1 cor0
----
324
342
576

query I rowsort
SELECT - col0 + + 2 * + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - + col1 * - 44 * col2 AS col1 FROM tab1 AS cor0
----
25080
54912
61776

query I rowsort
SELECT DISTINCT + 51 + + col0 FROM tab1 AS cor0
----
115
131
54

query I rowsort
SELECT - ( 70 ) FROM tab0 AS cor0
----
-70
-70
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-6518
SELECT ALL 80 DIV + col1 - - col2 FROM tab1 AS cor0
----
102
57
65

skipif mysql # not compatible
query I rowsort label-6518
SELECT ALL 80 / + col1 - - col2 FROM tab1 AS cor0
----
102
57
65

query I rowsort
SELECT + col0 * + 5 AS col1 FROM tab0 AS cor0
----
120
175
445

query I rowsort
SELECT DISTINCT + 1 AS col0 FROM tab2 cor0
----
1

query I rowsort
SELECT - 33 * 17 * + col0 FROM tab0 AS cor0
----
-13464
-19635
-49929

query I rowsort
SELECT DISTINCT 8 + col1 * col0 AS col1 FROM tab0 AS cor0
----
2072
3403
8107

query I rowsort
SELECT + col1 * + 73 FROM tab1 AS cor0
----
1898
730
949

query I rowsort
SELECT ALL + ( + 84 ) FROM tab0 AS cor0
----
84
84
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6525
SELECT ALL + CAST( NULL AS DECIMAL ) + col0 / - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6525
SELECT ALL + CAST ( NULL AS REAL ) + col0 / - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 86 * cor0.col0 AS col2 FROM tab0 cor0
----
2064
3010
7654

query I rowsort
SELECT DISTINCT - ( col1 ) * + col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + 95 + - col2 AS col1 FROM tab0 AS cor0
----
13
62
94

query I rowsort
SELECT tab0.col1 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT + + 22 + + cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 182093d423858622fcb905719e49a7be

query I rowsort
SELECT tab0.col0 * ( - 67 ) - cor0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 2374f2943a881b03406695f1c8e3fd09

query I rowsort
SELECT ALL col0 - + col1 * - col2 * + col1 AS col0 FROM tab0
----
244092
679131
9444

query I rowsort
SELECT + ( 96 ) * - cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 07b12527a7cd95af1191fcbe24d0beb5

query I rowsort
SELECT ALL + 55 + + col1 AS col1 FROM tab0 AS cor0
----
141
146
152

query I rowsort
SELECT DISTINCT col2 * - col1 + + 73 AS col1 FROM tab1 cor0
----
-1175
-1331
-497

query I rowsort
SELECT ALL col1 + - col0 AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT DISTINCT + + cor0.col0 * col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 28 * + cor0.col0 col0 FROM tab0 cor0
----
-2492
-672
-980

onlyif mysql # use DIV operator for integer division
query I rowsort label-6539
SELECT DISTINCT - - col1 * col0 + + 36 DIV + 52 AS col1 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-6539
SELECT DISTINCT - - col1 * col0 + + 36 / + 52 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT 42 FROM tab2 AS cor0
----
42

query I rowsort
SELECT ALL + - col1 + - col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT + col1 + + col2 * 82 AS col2 FROM tab2 AS cor0
----
2191
2245
3133

query I rowsort
SELECT DISTINCT - + 93 - - col0 FROM tab1 cor0
----
-13
-29
-90

query I rowsort
SELECT ALL cor0.col0 + + cor0.col1 + + ( 11 ) FROM tab2 AS cor0
----
107
148
49

query I rowsort
SELECT DISTINCT col1 * + cor0.col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + - col2 * - col0 + col0 AS col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT + col1 * - col0 + - cor0.col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT col1 * 23 AS col1 FROM tab0 AS cor0
----
1978
2093
2231

query I rowsort
SELECT ALL + col1 * col2 + col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT col0 + + col2 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + + col2 AS col0 FROM tab2 cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6552
SELECT ALL + col1 DIV - col2 + 60 + col0 FROM tab0 AS cor0
----
-2
148
82

skipif mysql # not compatible
query I rowsort label-6552
SELECT ALL + col1 / - col2 + 60 + col0 FROM tab0 AS cor0
----
-2
148
82

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0, tab0 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 028fd38910121a0fa7c5b9a24c207cf0

query I rowsort
SELECT ALL + col1 + - 67 AS col1 FROM tab2 AS cor0
----
-36
-50
-8

query I rowsort
SELECT + ( 4 ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col1 col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT col2 - + col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col0 * col2 + 16 FROM tab1 AS cor0
----
178
3664
7696

onlyif mysql # use DIV operator for integer division
query I rowsort label-6559
SELECT DISTINCT - col0 DIV + col0 + - 24 * col2 * CAST( col0 AS SIGNED ) FROM tab2 cor0
----
-4537
-48673
-72049

skipif mysql # not compatible
query I rowsort label-6559
SELECT DISTINCT - col0 / + col0 + - 24 * col2 * CAST ( col0 AS INTEGER ) FROM tab2 cor0
----
-4537
-48673
-72049

query I rowsort
SELECT + col2 * cor0.col1 - 48 * col0 AS col2 FROM tab1 AS cor0
----
-2502
-2592
1260

query I rowsort
SELECT DISTINCT + cor0.col2 * 7 + col0 FROM tab0 AS cor0
----
255
42
663

query I rowsort
SELECT cor0.col2 + - cor0.col0 * 73 AS col2 FROM tab2 AS cor0
----
-484
-5668
-5729

onlyif mysql # use DIV operator for integer division
query I rowsort label-6563
SELECT DISTINCT + col1 DIV - 32 + col1 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6563
SELECT DISTINCT + col1 / - 32 + col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL + - col1 * 94 + - col1 FROM tab2 cor0
----
-1615
-2945
-5605

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col0 + - CAST ( + col2 AS REAL ) * + col1 AS col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT col2 * - col0 AS col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT - col2 + col1 * col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT col2 * - cor0.col0 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6569
SELECT - + 61 * - col0 + - col1 DIV + col1 AS col2 FROM tab2 AS cor0
----
426
4757
4818

skipif mysql # not compatible
query I rowsort label-6569
SELECT - + 61 * - col0 + - col1 / + col1 AS col2 FROM tab2 AS cor0
----
426
4757
4818

query I rowsort
SELECT 44 FROM tab1, tab2 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT col0 * + tab0.col1 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + col2 * - cor0.col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - - 20 AS col0 FROM tab2 cor0
----
20

query I rowsort
SELECT DISTINCT + cor0.col0 + + col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - 54 + - col1 + - col1 AS col1 FROM tab1 AS cor0
----
-106
-74
-80

query I rowsort
SELECT ALL ( tab2.col2 ) FROM tab2, tab0 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + ( col1 ) * - col0 * 76 - col0 AS col0 FROM tab1
----
-48704
-5931
-79120

query I rowsort
SELECT 87 AS col1 FROM tab1
----
87
87
87

query I rowsort
SELECT col1 + col0 * + ( + col1 ) AS col2 FROM tab2
----
1360
248
4661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 58 col2 FROM tab1 AS cor0
----
-58
-58
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 88 * - cor0.col2 col2 FROM tab0 AS cor0
----
2904
7216
88

query I rowsort
SELECT DISTINCT + - 74 FROM tab2 AS cor0
----
-74

query I rowsort
SELECT ALL 59 * + col0 FROM tab2 AS cor0
----
413
4602
4661

query I rowsort
SELECT DISTINCT + 50 AS col0 FROM tab1 cor0
----
50

query I rowsort
SELECT col2 + col0 * 72 AS col1 FROM tab1 AS cor0
----
270
4665
5856

query I rowsort
SELECT col1 * cor0.col2 * - 57 + col1 AS col2 FROM tab0 AS cor0
----
-161680
-425243
-5432

query I rowsort
SELECT ALL cor1.col0 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + 80 * - cor0.col1 + + col2 FROM tab2 AS cor0
----
-1322
-2453
-4694

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT + col2 * col1 * + col1 + + col1 * + col1 * col1 AS col0 FROM tab0
----
1432613
880124
922082

query I rowsort
SELECT tab1.col1 FROM tab1 WHERE col0 IN ( col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6593
SELECT ALL - col1 - + col2 DIV - col0 FROM tab1
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-6593
SELECT ALL - col1 - + col2 / - col0 FROM tab1
----
-10
-12
-8

query I rowsort
SELECT DISTINCT col0 - - col1 FROM tab0
----
110
132
180

query I rowsort
SELECT ALL + 17 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT DISTINCT + tab2.col2 AS col1 FROM tab2, tab0, tab1 AS cor0
----
26
27
38

query I rowsort
SELECT - + 44 * col1 AS col1 FROM tab2 AS cor0
----
-1364
-2596
-748

query I rowsort
SELECT ( col2 + - col0 * + ( col2 ) ) FROM tab2
----
-162
-2002
-2964

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6599
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6599
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL 64 * - col2 AS col2 FROM tab2
----
-1664
-1728
-2432

query I rowsort
SELECT ALL col1 * col0 * - col2 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - col2 * col1 * - col2 FROM tab1
----
119808
32490
75816

query III rowsort
SELECT * FROM tab2 WHERE + col2 * - col0 + - col1 >= col2 + + col1
----

query I rowsort
SELECT tab1.col1 + + tab1.col1 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT col2 + - col1 + - col2 AS col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT col0 * tab1.col0 * tab1.col1 AS col2 FROM tab1
----
234
40960
83200

query I rowsort
SELECT DISTINCT col0 * col0 * col0 AS col2 FROM tab2
----
343
474552
493039

query I rowsort
SELECT ALL col1 + col1 * - col2 + + col2 AS col0 FROM tab1
----
-1139
-1324
-503

query I rowsort
SELECT ALL - col2 * - col2 * col2 AS col0 FROM tab1
----
157464
185193
884736

query I rowsort
SELECT - col0 * col2 - col2 AS col2 FROM tab1
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT col1 + col1 AS col2 FROM tab1
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col0 * - col0 col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT - col2 * col2 <= + col1 * cor0.col1
----

query I rowsort
SELECT DISTINCT + col2 * col0 * col0 AS col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT ALL + col2 * col2 AS col2 FROM tab2
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT col0 + - col0 * - col2 AS col2 FROM tab1
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-6618
SELECT + col2 * col1 + - col0 DIV col1 AS col0 FROM tab1
----
1242
1404
564

skipif mysql # not compatible
query I rowsort label-6618
SELECT + col2 * col1 + - col0 / col1 AS col0 FROM tab1
----
1242
1404
564

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 + col0 col2 FROM tab1
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-6620
SELECT ALL - col1 DIV col1 AS col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6620
SELECT ALL - col1 / col1 AS col2 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab2 WHERE NOT NULL BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + col0 col2 FROM tab1
----
128
160
6

query I rowsort
SELECT col2 * col0 + col0 AS col1 FROM tab2
----
196
2106
3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-6624
SELECT DISTINCT col0 DIV + col1 + + col1 + col1 FROM tab1
----
26
32
52

skipif mysql # not compatible
query I rowsort label-6624
SELECT DISTINCT col0 / + col1 + + col1 + col1 FROM tab1
----
26
32
52

query I rowsort
SELECT DISTINCT col2 * - col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT col0 FROM tab0 WHERE NULL NOT BETWEEN ( - col0 ) AND ( NULL )
----

query I rowsort
SELECT DISTINCT - col2 * + col1 * - col0 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT col0 * - col1 + tab1.col1 + col2 AS col1 FROM tab1
----
-573
-931
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6629
SELECT col1 DIV col0 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-6629
SELECT col1 / col0 FROM tab2
----
0
0
4

query I rowsort
SELECT col2 * col0 * - col0 AS col2 FROM tab1
----
-233472
-486
-614400

query I rowsort
SELECT - tab1.col1 + - tab1.col2 + + col0 AS col1 FROM tab1
----
-29
-3
-77

query I rowsort
SELECT - col0 FROM tab2 WHERE ( NULL ) NOT BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT ALL col0 * col1 * col0 AS col1 FROM tab2
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-6634
SELECT col1 + col0 - + tab2.col2 DIV col1 AS col1 FROM tab2
----
137
38
94

skipif mysql # not compatible
query I rowsort label-6634
SELECT col1 + col0 - + tab2.col2 / col1 AS col1 FROM tab2
----
137
38
94

query I rowsort
SELECT DISTINCT - col1 * col1 FROM tab1
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6636
SELECT CAST( NULL AS SIGNED ) * col0 + + col2 * col1 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6636
SELECT CAST ( NULL AS INTEGER ) * col0 + + col2 * col1 AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( col0 ) + tab1.col0 - col0 AS col1 FROM tab1
----
3
64
80

query I rowsort
SELECT - tab1.col1 + col2 AS col0 FROM tab1
----
28
47
83

query I rowsort
SELECT tab0.col2 * tab0.col1 AS col1 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6640
SELECT + tab2.col2 DIV tab2.col1 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-6640
SELECT + tab2.col2 / tab2.col1 FROM tab2
----
0
0
2

query I rowsort
SELECT - cor1.col2 * 55 + 93 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 37fc9d27c24b84b50033df8f21f7d973

query I rowsort
SELECT + col1 + + 60 AS col0 FROM tab2 AS cor0
----
119
77
91

query I rowsort
SELECT + 64 + - col2 - col2 AS col2 FROM tab2
----
-12
10
12

query I rowsort
SELECT + ( + col2 ) * col0 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT col0 + 23 FROM tab1 AS cor0
----
103
26
87

query I rowsort
SELECT col0 * col0 * - col2 + + col1 FROM tab0 AS cor0
----
-1128
-18922
-649431

query I rowsort
SELECT DISTINCT + 81 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-10
-16
-5

query I rowsort
SELECT ALL + + col2 + col1 * + col1 * - col2 FROM tab1 AS cor0
----
-16128
-36450
-5643

onlyif mysql # use DIV operator for integer division
query I rowsort label-6649
SELECT ALL + 82 * col1 + col1 DIV + 8 FROM tab1 AS cor0
----
1067
2135
821

skipif mysql # not compatible
query I rowsort label-6649
SELECT ALL + 82 * col1 + col1 / + 8 FROM tab1 AS cor0
----
1067
2135
821

query I rowsort
SELECT 88 + - col1 FROM tab0 AS cor0
----
-3
-9
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6651
SELECT DISTINCT col1 + col0 DIV + col1 FROM tab2 cor0
----
21
31
60

skipif mysql # not compatible
query I rowsort label-6651
SELECT DISTINCT col1 + col0 / + col1 FROM tab2 cor0
----
21
31
60

query I rowsort
SELECT + col1 * col1 * - cor0.col1 FROM tab2 AS cor0
----
-205379
-29791
-4913

query I rowsort
SELECT + col2 + col0 * - col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT col0 + + col0 AS col0 FROM tab0 AS cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - cor0.col1 col0 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6656
SELECT DISTINCT col1 DIV col1 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-6656
SELECT DISTINCT col1 / col1 FROM tab0 AS cor0
----
1

query I rowsort
SELECT ALL - col1 + col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT + col2 * col1 * ( 61 * col1 ) AS col2 FROM tab0 AS cor0
----
14888148
41421562
573949

query I rowsort
SELECT 59 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT ALL - 87 + + cor0.col1 FROM tab1 AS cor0
----
-61
-74
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( + col1 ) + ( - cor0.col2 ) col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + 12 + col2 * col2 * col2 FROM tab2 AS cor0
----
17588
19695
54884

query I rowsort
SELECT ALL - col2 * + col2 + cor0.col2 AS col2 FROM tab1 cor0
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT - ( col1 ) * cor0.col2 + cor0.col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT - cor0.col1 + 4 FROM tab2 AS cor0
----
-13
-27
-55

query I rowsort
SELECT + cor0.col2 * - ( - cor0.col0 ) FROM tab0 AS cor0
----
35
7298
792

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab0, tab2 AS cor1, tab2, tab1 cor2
----
3645 values hashing to 15ae1b54cae2dcf5c6eef7f1d15689eb

query I rowsort
SELECT - - col1 + + col1 AS col1 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6669
SELECT ALL - - col1 * col0 + 10 DIV - col0 FROM tab1 AS cor0
----
1040
640
75

skipif mysql # not compatible
query I rowsort label-6669
SELECT ALL - - col1 * col0 + 10 / - col0 FROM tab1 AS cor0
----
1040
640
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab1 cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + - col1 col1 FROM tab0 AS cor0
----
-172
-182
-194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * + col2 col1 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6673
SELECT DISTINCT CAST( NULL AS SIGNED ) * col2 * - col1 + + ( + col1 ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6673
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col2 * - col1 + + ( + col1 ) FROM tab2 cor0
----
NULL

query I rowsort
SELECT + 89 + col2 FROM tab1 AS cor0
----
143
146
185

query I rowsort
SELECT DISTINCT + + col1 + + cor0.col1 + - col2 * - ( + 56 ) FROM tab1 AS cor0
----
3076
3212
5402

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2, tab0 AS cor0, tab0 cor1
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6677
SELECT DISTINCT col0 DIV - col0 + + col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-6677
SELECT DISTINCT col0 / - col0 + + col0 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT col2 - - 29 AS col1 FROM tab2 AS cor0
----
55
56
67

query I rowsort
SELECT + 5 * - 10 - col0 FROM tab0 cor0
----
-139
-74
-85

query I rowsort
SELECT DISTINCT + 7 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
7

query I rowsort
SELECT ( cor0.col0 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # use DIV operator for integer division
query I rowsort label-6682
SELECT DISTINCT + col2 DIV cor0.col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6682
SELECT DISTINCT + col2 / cor0.col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + col2 + col2 * col0 AS col1 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT - 23 - + 78 * + tab1.col1 AS col2 FROM tab1
----
-1037
-2051
-803

onlyif mysql # use DIV operator for integer division
query I rowsort label-6685
SELECT DISTINCT - col1 DIV + col2 - cor0.col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-6685
SELECT DISTINCT - col1 / + col2 - cor0.col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + - col0 * col1 + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT + col2 + - col0 * + col2 FROM tab0 cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT - ( + col0 ) + + col2 AS col1 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT - col1 + cor0.col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + + col1 + cor0.col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + col2 + col0 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT 65 - + ( col0 ) FROM tab1
----
-15
1
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6693
SELECT CAST( + col0 AS SIGNED ) - col1 FROM tab1
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-6693
SELECT CAST ( + col0 AS INTEGER ) - col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT - col1 - + col1 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT ALL ( - col2 ) + + col1 FROM tab0
----
53
9
96

query I rowsort
SELECT ( col1 ) + col1 - - col1 * - col0 AS col2 FROM tab1
----
-1014
-26
-620

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT ALL col1 + + col0 - tab0.col1 * col1 FROM tab0
----
-7286
-8101
-9277

query I rowsort
SELECT DISTINCT - 10 * 55 * tab1.col2 - col1 AS col2 FROM tab1
----
-29726
-31360
-52813

query I rowsort
SELECT DISTINCT + col2 * - col0 - + col1 FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT 14 - 22 AS col2 FROM tab2
----
-8

query I rowsort
SELECT + tab0.col0 * col1 + col1 AS col0 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT + 72 * - col1 + col0 * + col2 FROM tab2
----
-2043
-2220
1778

query I rowsort
SELECT ALL - - cor0.col1 + + col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT - + col2 * col0 + col0 + - col1 AS col0 FROM tab1 AS cor0
----
-185
-3594
-7613

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * col2 + col2 + - col1 col0 FROM tab0 cor0
----
-1142
-6733
-97

query I rowsort
SELECT ALL - col2 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - + col1 - - col2 * col1 * + col0 AS col0 FROM tab2 AS cor0
----
119593
51017
5828

query I rowsort
SELECT ( col0 ) * + col1 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + col2 * col0 * col1 + - col2 + col2 FROM tab1 AS cor0
----
36480
4212
99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * tab2.col1 col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT tab0.col2 FROM tab0, tab2 cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col1 + + col1 col2 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT ALL + 68 AS col2 FROM tab2 AS cor0
----
68
68
68

query I rowsort
SELECT col1 + col2 + + col0 AS col1 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT ALL col1 * col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6717
SELECT + - 42 * col0 + col1 DIV + col1 + - col2 FROM tab2 AS cor0
----
-320
-3301
-3355

skipif mysql # not compatible
query I rowsort label-6717
SELECT + - 42 * col0 + col1 / + col1 + - col2 FROM tab2 AS cor0
----
-320
-3301
-3355

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - - col0 * col1 FROM tab1 AS cor0
----
1040
640
78

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to bcf430f79386b43bc4077271fcd15cf0

query I rowsort
SELECT ALL + 67 * - tab1.col2 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 3a03b12994a9e568e6b320667aa28abd

query I rowsort
SELECT + col1 * - col1 * col2 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT 24 * - col0 AS col2 FROM tab0 AS cor0
----
-2136
-576
-840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6724
SELECT DISTINCT + CAST( + col2 AS SIGNED ) FROM tab2 cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-6724
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL - col0 * ( - col2 ) AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + + col2 * - col1 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-6727
SELECT + col0 + col2 DIV - col0 FROM tab1
----
-15
64
79

skipif mysql # not compatible
query I rowsort label-6727
SELECT + col0 + col2 / - col0 FROM tab1
----
-15
64
79

query I rowsort
SELECT ( 87 ) + col2 * - col1 FROM tab0
----
-10
-2751
-7375

onlyif mysql # use DIV operator for integer division
query I rowsort label-6729
SELECT ALL + - ( - cor0.col1 ) DIV cor0.col1 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6729
SELECT ALL + - ( - cor0.col1 ) / cor0.col1 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + col0 * + 46 FROM tab1 cor0
----
138
2944
3680

query I rowsort
SELECT - 64 AS col1 FROM tab0 AS cor0
----
-64
-64
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( cor0.col1 ) + col0 col1 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6733
SELECT ALL - + CAST( NULL AS SIGNED ) * cor0.col2 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6733
SELECT ALL - + CAST ( NULL AS INTEGER ) * cor0.col2 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 52 AS col1 FROM tab0 cor0
----
52
52
52

query I rowsort
SELECT ALL + ( - col0 ) + col1 * cor0.col0 AS col0 FROM tab1 cor0
----
576
75
960

query I rowsort
SELECT DISTINCT 94 AS col0 FROM tab0 AS cor0
----
94

query I rowsort
SELECT - cor0.col2 * tab0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0
----
9 values hashing to 3e351fdfa2fd88779f2d7b6136dc00d1

query I rowsort
SELECT ALL - + col1 * col2 + - col2 * - col0 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT DISTINCT col1 FROM tab1 WHERE NOT ( NULL ) = ( NULL )
----

query I rowsort
SELECT ALL + col0 AS col1 FROM tab1 WHERE NOT ( NULL ) <> ( - col2 )
----

query I rowsort
SELECT DISTINCT - + col2 * col2 - cor0.col0 AS col0 FROM tab2 AS cor0
----
-1523
-736
-754

onlyif mysql # use DIV operator for integer division
query I rowsort label-6742
SELECT ALL + col1 DIV col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6742
SELECT ALL + col1 / col1 FROM tab2 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6743
SELECT - - col2 DIV col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6743
SELECT - - col2 / col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + col1 + cor0.col1 * col1 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT - col1 + col0 * - col0 FROM tab2 AS cor0
----
-6143
-6258
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6746
SELECT DISTINCT - - col0 DIV - col0 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-6746
SELECT DISTINCT - - col0 / - col0 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT ALL + - col1 + - col2 AS col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL col1 * - col2 + col1 FROM tab2 cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT - col1 - col0 AS col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT + - cor0.col1 + - col0 * cor0.col2 AS col0 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT - + col0 * + cor0.col0 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-6752
SELECT ALL + - col2 DIV + col0 + cor0.col2 * + col0 + col0 * cor0.col1 FROM tab1 AS cor0
----
222
4288
8719

skipif mysql # not compatible
query I rowsort label-6752
SELECT ALL + - col2 / + col0 + cor0.col2 * + col0 + col0 * cor0.col1 FROM tab1 AS cor0
----
222
4288
8719

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-6754
SELECT + col0 * col1 DIV col0 AS col1 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6754
SELECT + col0 * col1 / col0 AS col1 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6755
SELECT ALL col1 DIV + col2 col2 FROM tab0 AS cor0
----
1
2
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6755
SELECT ALL col1 / + col2 col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT col0 * col2 + - col1 * + col0 + cor0.col1 * col1 * col2 FROM tab0 AS cor0
----
242796
6049
678241

query I rowsort
SELECT ALL - tab0.col2 * + col2 AS col0 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - col0 FROM tab0 AS cor0 WHERE NULL NOT IN ( col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col1 col1 FROM tab0, tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + col2 * col0 - tab0.col2 AS col1 FROM tab0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-6761
SELECT ALL col1 - col2 DIV - col1 FROM tab1 AS cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-6761
SELECT ALL col1 - col2 / - col1 FROM tab1 AS cor0
----
15
20
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-6762
SELECT ALL - + col0 DIV col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6762
SELECT ALL - + col0 / col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - + cor0.col2 * - cor0.col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - col1 - cor0.col1 * cor0.col2 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT DISTINCT + + col2 + - col2 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col1 + - col1 * col1 FROM tab0 cor0
----
-7482
-8372
-9506

query I rowsort
SELECT + - col2 * + col2 + - col0 AS col1 FROM tab1 cor0
----
-2919
-3313
-9296

query I rowsort
SELECT ALL tab1.col2 + col2 FROM tab1
----
108
114
192

query I rowsort
SELECT col0 * - col1 + col0 FROM tab1 AS cor0
----
-576
-75
-960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col2 col0 FROM tab0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col1 col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT col1 * col1 + + col0 FROM tab1
----
164
249
679

query I rowsort
SELECT - tab0.col2 * - col0 + col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT tab0.col1 * - col2 + tab0.col0 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT cor0.col2 * - ( 63 ) + + col1 AS col1 FROM tab0 AS cor0
----
-1993
-5075
34

query I rowsort
SELECT + col2 - ( col2 + col1 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT col0 * + col0 + 6 FROM tab1 AS cor0
----
15
4102
6406

query I rowsort
SELECT - col0 * 18 - col1 AS col2 FROM tab2 AS cor0
----
-1439
-1463
-157

query I rowsort
SELECT - - cor0.col2 + 99 FROM tab0 cor0
----
100
132
181

query I rowsort
SELECT - cor0.col2 * col1 + cor0.col1 * - 74 AS col0 FROM tab2 AS cor0
----
-1904
-3131
-5900

query I rowsort
SELECT DISTINCT 29 FROM tab1 AS cor0
----
29

query I rowsort
SELECT ALL + 44 + - col0 FROM tab0 AS cor0
----
-45
20
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6783
SELECT - 21 + col0 DIV col0 FROM tab0 AS cor0
----
-20
-20
-20

skipif mysql # not compatible
query I rowsort label-6783
SELECT - 21 + col0 / col0 FROM tab0 AS cor0
----
-20
-20
-20

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to 3a186ad492d315801f56fb30a5e89dbb

query I rowsort
SELECT ALL + 51 * - col2 * col1 FROM tab2 AS cor0
----
-32946
-42687
-78234

query I rowsort
SELECT ALL - col0 + - col1 * - col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT DISTINCT + 5 FROM tab2, tab1 AS cor0
----
5

query I rowsort
SELECT DISTINCT + cor1.col1 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
17
31
59

query I rowsort
SELECT ALL + 9 * col1 * + col1 FROM tab1
----
1521
6084
900

query I rowsort
SELECT col1 * col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + 10 AS col1 FROM tab0
----
10

query I rowsort
SELECT + 15 * - col0 AS col2 FROM tab0
----
-1335
-360
-525

onlyif mysql # use DIV operator for integer division
query I rowsort label-6793
SELECT + col2 DIV - CAST( col0 AS SIGNED ) FROM tab0 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6793
SELECT + col2 / - CAST ( col0 AS INTEGER ) FROM tab0 cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 * - col1 FROM tab1 cor0
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-6795
SELECT + col1 DIV - col0 AS col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-6795
SELECT + col1 / - col0 AS col0 FROM tab2
----
-4
0
0

query I rowsort
SELECT ALL 9 AS col0 FROM tab0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 + 98 col2 FROM tab1, tab0, tab2 AS cor0, tab2
----
81 values hashing to a9228341b77355522f2629a89b80e739

query I rowsort
SELECT DISTINCT + 1 AS col1 FROM tab2, tab0 AS cor0, tab1 cor1
----
1

query I rowsort
SELECT 92 AS col1 FROM tab2
----
92
92
92

query I rowsort
SELECT ALL - col0 * + col1 * col1 + + col1 FROM tab2 AS cor0
----
-22814
-271459
-6696

query I rowsort
SELECT DISTINCT + col2 + - ( - ( + col0 ) ) * 57 AS col1 FROM tab2 cor0
----
426
4472
4541

onlyif mysql # use DIV operator for integer division
query I rowsort label-6802
SELECT DISTINCT col1 DIV ( + 98 ) + col1 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6802
SELECT DISTINCT col1 / ( + 98 ) + col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - col0 * - 41 + + 5 * col2 AS col0 FROM tab1 AS cor0
----
2909
3760
393

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 col1 FROM tab1 cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6805
SELECT + ( + col1 ) * + CAST( NULL AS DECIMAL ) + 19 / col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6805
SELECT + ( + col1 ) * + CAST ( NULL AS REAL ) + 19 / col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * + col0 * col0 FROM tab1
----
262144
27
512000

query I rowsort
SELECT col1 + + 22 + + tab1.col0 FROM tab1
----
115
51
96

query I rowsort
SELECT DISTINCT col2 - 17 * 20 FROM tab0
----
-258
-307
-339

query I rowsort
SELECT DISTINCT + col1 - col2 AS col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT col0 * tab2.col2 - col0 FROM tab2
----
182
1950
2923

query I rowsort
SELECT DISTINCT + tab1.col0 - col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT + col0 + 89 * tab0.col2 AS col1 FROM tab0
----
124
2961
7387

query I rowsort
SELECT DISTINCT + col2 - 44 FROM tab0
----
-11
-43
38

query I rowsort
SELECT - col2 + col1 AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT col1 + 54 FROM tab0
----
140
145
151

query I rowsort
SELECT ALL + col1 * + 13 + tab2.col0 FROM tab2
----
300
410
845

onlyif mysql # use DIV operator for integer division
query I rowsort label-6817
SELECT ALL col1 DIV + 30 + col2 * col0 FROM tab1
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-6817
SELECT ALL col1 / + 30 + col2 * col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT - 25 AS col0 FROM tab0
----
-25

query I rowsort
SELECT - ( + cor0.col1 ) * 45 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 8afb0d11cd4e3a5b1847edfc2ecd5550

query I rowsort
SELECT ALL + tab1.col2 * col1 + col1 AS col1 FROM tab1
----
1261
1430
580

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6821
SELECT - CAST( NULL AS SIGNED ) - ( + col2 ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6821
SELECT - CAST ( NULL AS INTEGER ) - ( + col2 ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ( + 45 * col1 ) AS col0 FROM tab1
----
1170
450
585

query I rowsort
SELECT + col1 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL + 37 AS col0 FROM tab1
----
37
37
37

query I rowsort
SELECT + cor0.col2 + col2 * - col1 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL + + col0 + col0 * - col2 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT + - 38 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
2052
2166
3648

query I rowsort
SELECT DISTINCT - 1 AS col1 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT DISTINCT - - col2 - col1 FROM tab2 AS cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 7 col1 FROM tab1 AS cor0
----
7
7
7

query I rowsort
SELECT - - col1 * col2 * col2 AS col1 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT + col0 * col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - cor0.col0 + + col0 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * col0 col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - cor0.col2 + + col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL ( col1 + tab0.col1 ) FROM tab0
----
172
182
194

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 cor0, tab2 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to e3f81e329d34d83e4528a9ef7b933946

query I rowsort
SELECT DISTINCT + 59 AS col1 FROM tab2, tab0 AS cor0
----
59

query I rowsort
SELECT ALL 8 * col0 + - col0 + - ( cor0.col1 ) AS col1 FROM tab1 AS cor0
----
-5
438
547

query I rowsort
SELECT ALL 99 FROM tab1, tab2 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to c841a8d826151b422ecdb71db0250739

query I rowsort
SELECT ALL + - cor0.col2 * + col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - + ( - col1 ) * - col2 AS col2 FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6843
SELECT + + CAST( - col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-6843
SELECT + + CAST ( - col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 04d825fa29899c3ee2704c26a542267d

onlyif mysql # use DIV operator for integer division
query I rowsort label-6845
SELECT ALL + - ( + 19 ) + col1 * + ( + col0 * col0 ) + col1 DIV - col1 FROM tab1 AS cor0
----
214
40940
83180

skipif mysql # not compatible
query I rowsort label-6845
SELECT ALL + - ( + 19 ) + col1 * + ( + col0 * col0 ) + col1 / - col1 FROM tab1 AS cor0
----
214
40940
83180

query I rowsort
SELECT 97 * + col0 + + ( - cor0.col1 ) * col2 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-185
6006
6979

query I rowsort
SELECT DISTINCT 32 + 70 * + col1 - col2 AS col1 FROM tab2
----
1184
2175
4136

query I rowsort
SELECT col0 * + col0 + col2 AS col1 FROM tab1 AS cor0
----
4153
63
6496

onlyif mysql # use DIV operator for integer division
query I rowsort label-6849
SELECT DISTINCT + 16 DIV col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6849
SELECT DISTINCT + 16 / col1 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6850
SELECT - + cor0.col2 + col1 DIV 81 - + cor0.col2 FROM tab2 AS cor0
----
-52
-54
-76

skipif mysql # not compatible
query I rowsort label-6850
SELECT - + cor0.col2 + col1 / 81 - + cor0.col2 FROM tab2 AS cor0
----
-52
-54
-76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6851
SELECT ALL - col0 * col2 * + CAST( + col1 AS SIGNED ) FROM tab0 AS cor0
----
-3395
-664118
-68112

skipif mysql # not compatible
query I rowsort label-6851
SELECT ALL - col0 * col2 * + CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-6852
SELECT + col2 DIV col0 + - col0 * col1 - + cor0.col0 col1 FROM tab0 AS cor0
----
-2087
-3430
-8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6852
SELECT + col2 / col0 + - col0 * col1 - + cor0.col0 col1 FROM tab0 AS cor0
----
-2087
-3430
-8188

query I rowsort
SELECT + 20 + + col2 FROM tab0 cor0
----
102
21
53

query I rowsort
SELECT ALL - tab2.col0 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6855
SELECT - CAST( - col1 AS SIGNED ) AS col0 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6855
SELECT - CAST ( - col1 AS INTEGER ) AS col0 FROM tab2
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6856
SELECT + ( col0 ) * + col1 + CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6856
SELECT + ( col0 ) * + col1 + CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 2 + + col0 * - col0 * - 92 FROM tab2
----
4510
559730
574174

query I rowsort
SELECT col2 * - 39 + col1 * col1 AS col0 FROM tab1
----
-1430
-2123
-3575

query I rowsort
SELECT ALL cor0.col2 * - col0 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6860
SELECT DISTINCT col2 DIV ( col0 ) + col2 * 71 FROM tab1 AS cor0
----
3852
4047
6817

skipif mysql # not compatible
query I rowsort label-6860
SELECT DISTINCT col2 / ( col0 ) + col2 * 71 FROM tab1 AS cor0
----
3852
4047
6817

query I rowsort
SELECT ALL - col2 * ( - col1 ) - cor0.col0 AS col0 FROM tab0 AS cor0
----
2814
62
7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col0 + - col2 col1 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT DISTINCT + col2 + + 57 * 75 AS col2 FROM tab1 AS cor0
----
4329
4332
4371

query I rowsort
SELECT + + col1 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT - - col2 * + ( - 56 ) FROM tab2 AS cor0
----
-1456
-1512
-2128

query I rowsort
SELECT ALL col1 * + col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - cor0.col1 * + 56 AS col0 FROM tab0 AS cor0
----
-4816
-5096
-5432

query I rowsort
SELECT DISTINCT + + col1 * 96 + + 45 * - col1 FROM tab1 AS cor0
----
1326
510
663

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6869
SELECT DISTINCT + cor0.col1 * - CAST( + 63 AS SIGNED ) + col2 * - 66 AS col1 FROM tab2 AS cor0
----
-3579
-3735
-5433

skipif mysql # not compatible
query I rowsort label-6869
SELECT DISTINCT + cor0.col1 * - CAST ( + 63 AS INTEGER ) + col2 * - 66 AS col1 FROM tab2 AS cor0
----
-3579
-3735
-5433

query I rowsort
SELECT ALL + col1 * + col1 + - col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT + col2 + col1 AS col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col1 * - 6 AS col2 FROM tab2 AS cor0
----
-140
-213
-380

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col2 col2 FROM tab0
----
53
9
96

query I rowsort
SELECT - col2 + - tab0.col2 FROM tab0
----
-164
-2
-66

query I rowsort
SELECT ALL - col2 * - col2 - + col2 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-1352
-1558
540

query I rowsort
SELECT + 65 + col2 FROM tab1
----
119
122
161

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6877
SELECT - + col0 * - CAST( - col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-6877
SELECT - + col0 * - CAST ( - col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6878
SELECT ALL - cor0.col1 * - CAST( NULL AS SIGNED ) * + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6878
SELECT ALL - cor0.col1 * - CAST ( NULL AS INTEGER ) * + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col2 * 51 FROM tab2 AS cor0
----
-1326
-1377
-1938

query I rowsort
SELECT - cor1.col1 AS col2 FROM tab0, tab1, tab1 cor0, tab1 AS cor1
----
81 values hashing to 96e9ef2950805bca93a295eeea43ef5b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6881
SELECT - CAST( NULL AS SIGNED ) + cor0.col1 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6881
SELECT - CAST ( NULL AS INTEGER ) + cor0.col1 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * col2 * 13 FROM tab2
----
10881
19942
8398

query I rowsort
SELECT + col0 * + col1 AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL 92 FROM tab2
----
92
92
92

query I rowsort
SELECT + - 54 + + ( - cor0.col2 ) AS col2 FROM tab1 AS cor0
----
-108
-111
-150

query I rowsort
SELECT 6 * + 81 + col2 FROM tab1 AS cor0
----
540
543
582

query I rowsort
SELECT DISTINCT - cor0.col1 * col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT cor0.col0 * + 90 FROM tab2 AS cor0
----
630
7020
7110

query I rowsort
SELECT ALL + ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - col0 * cor0.col0 + col2 AS col1 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT ALL 39 FROM tab1 AS cor0
----
39
39
39

query I rowsort
SELECT + tab2.col0 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6893
SELECT DISTINCT 1 * col1 + CAST( - col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6893
SELECT DISTINCT 1 * col1 + CAST ( - col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6894
SELECT - col1 DIV - col2 - - cor0.col1 AS col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6894
SELECT - col1 / - col2 - - cor0.col1 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - + 79 AS col1 FROM tab1 AS cor0
----
-79
-79
-79

query I rowsort
SELECT col0 - - col2 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL cor0.col0 + - col1 + + cor0.col0 * + col0 FROM tab2 AS cor0
----
25
6103
6303

query I rowsort
SELECT 13 * - col2 + col1 * + col0 * - col0 FROM tab1 AS cor0
----
-41701
-84448
-936

query I rowsort
SELECT 23 AS col1 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 546d49aa433406dd83ea19885588e658

onlyif mysql # use DIV operator for integer division
query I rowsort label-6900
SELECT DISTINCT col0 DIV + col1 col2 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6900
SELECT DISTINCT col0 / + col1 col2 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6901
SELECT DISTINCT + - 35 + + col1 DIV col0 AS col0 FROM tab1 AS cor0
----
-27
-35

skipif mysql # not compatible
query I rowsort label-6901
SELECT DISTINCT + - 35 + + col1 / col0 AS col0 FROM tab1 AS cor0
----
-27
-35

query I rowsort
SELECT + cor0.col0 * + 7 + col0 AS col0 FROM tab1 cor0
----
24
512
640

onlyif mysql # use DIV operator for integer division
query I rowsort label-6903
SELECT + + col1 * col1 + cor0.col1 DIV + col0 AS col1 FROM tab0 AS cor0
----
7399
8282
9411

skipif mysql # not compatible
query I rowsort label-6903
SELECT + + col1 * col1 + cor0.col1 / + col0 AS col1 FROM tab0 AS cor0
----
7399
8282
9411

query I rowsort
SELECT DISTINCT + col1 * + ( - col1 ) + col0 FROM tab1 AS cor0
----
-36
-673
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6905
SELECT - col1 * ( + col2 ) DIV + col1 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-6905
SELECT - col1 * ( + col2 ) / + col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + col1 * - col0 * - col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ( + col1 ) FROM tab1
----
10
13
26

query I rowsort
SELECT ALL + 92 FROM tab2
----
92
92
92

query I rowsort
SELECT 3 AS col2 FROM tab1
----
3
3
3

query I rowsort
SELECT + ( 64 ) + col0 FROM tab0
----
153
88
99

query I rowsort
SELECT + + 18 * col1 AS col1 FROM tab0 AS cor0
----
1548
1638
1746

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * - col2 + col0 col2 FROM tab0 AS cor0
----
70
7387
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col1 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 * - col2 * tab0.col2 FROM tab0
----
26136
35
598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-6915
SELECT cor0.col0 + col0 DIV ( col0 ) FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-6915
SELECT cor0.col0 + col0 / ( col0 ) FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT - - col1 * + col2 * + ( cor0.col1 ) + col1 - + 44 * + col2 FROM tab0 AS cor0
----
242702
675525
9462

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6917
SELECT DISTINCT - ( col0 ) + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6917
SELECT DISTINCT - ( col0 ) + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - cor0.col0 + col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + 65 + col2 FROM tab1 AS cor0
----
119
122
161

query I rowsort
SELECT - ( - col2 ) * + col2 + col1 - - cor0.col1 FROM tab1 AS cor0
----
2968
3269
9242

query I rowsort
SELECT ALL + col1 + + col0 * - ( + col1 * - col1 ) FROM tab2 AS cor0
----
22848
271577
6758

query I rowsort
SELECT - col1 + - 7 AS col0 FROM tab2 AS cor0
----
-24
-38
-66

query I rowsort
SELECT + 40 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6924
SELECT DISTINCT - col0 DIV 69 AS col0 FROM tab2
----
-1
0

skipif mysql # not compatible
query I rowsort label-6924
SELECT DISTINCT - col0 / 69 AS col0 FROM tab2
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6925
SELECT col1 / CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6925
SELECT col1 / CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 * 63 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 9ff438b4f4c3a7e57469937cc083b088

query I rowsort
SELECT 35 * - 57 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 73f3b452f887d5e90ab0e4dda9c122e4

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0, tab1 cor1, tab2 cor2
----
972 values hashing to bcf430f79386b43bc4077271fcd15cf0

query I rowsort
SELECT 65 * + col1 AS col1 FROM tab2 AS cor0
----
1105
2015
3835

onlyif mysql # use DIV operator for integer division
query I rowsort label-6930
SELECT - col2 DIV + 98 AS col0 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6930
SELECT - col2 / + 98 AS col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - col2 + - col0 * + col1 FROM tab2 AS cor0
----
-1381
-244
-4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 42 col1 FROM tab0 AS cor0
----
-42
-42
-42

query I rowsort
SELECT 73 AS col2 FROM tab0 AS cor0
----
73
73
73

query I rowsort
SELECT + + cor0.col2 FROM tab0 cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6935
SELECT + col0 DIV + cor0.col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6935
SELECT + col0 / + cor0.col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT ALL + 65 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT cor0.col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT - ( 37 ) AS col0 FROM tab0, tab2 AS cor0
----
-37

query I rowsort
SELECT ALL - 8 * - col0 AS col2 FROM tab2 AS cor0
----
56
624
632

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab2 cor1, tab2, tab0 AS cor2
----
3645 values hashing to e6082e644debd74dcf1042b918d79199

query I rowsort
SELECT - ( + 57 ) AS col2 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 1b1b58f936aab250d5d6d3f1065ea6dd

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0, tab0 AS cor1, tab0 cor2
----
972 values hashing to 8420206d6932c454f05a38de634b3cb5

query I rowsort
SELECT ALL ( - 31 ) - col1 AS col1 FROM tab1 AS cor0
----
-41
-44
-57

query I rowsort
SELECT DISTINCT 63 * col0 FROM tab1 AS cor0
----
189
4032
5040

query I rowsort
SELECT DISTINCT - col0 + ( + col1 ) * - col1 FROM tab0 AS cor0
----
-7420
-8370
-9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6946
SELECT + CAST( col1 AS SIGNED ) + + col0 AS col1 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-6946
SELECT + CAST ( col1 AS INTEGER ) + + col0 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL 77 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT DISTINCT - cor0.col2 * col0 + col1 * + 72 AS col0 FROM tab0 AS cor0
----
-746
5400
6949

query I rowsort
SELECT DISTINCT + + col0 * col1 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6950
SELECT DISTINCT + + CAST( + col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6950
SELECT DISTINCT + + CAST ( + col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - ( col0 ) * + col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab2 AS cor1, tab0 cor2
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT ALL - 55 AS col1 FROM tab2
----
-55
-55
-55

query I rowsort
SELECT DISTINCT - col2 * - col2 + 31 * col2 AS col1 FROM tab0 AS cor0
----
2112
32
9266

query I rowsort
SELECT ALL col2 + col0 * + ( + col2 + + cor0.col0 ) AS col0 FROM tab1 AS cor0
----
14176
225
7801

query I rowsort
SELECT ALL - - col2 * + col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + col1 * - col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - col1 * - col2 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT + 13 * - 6 + + tab2.col0 * col1 FROM tab2
----
1265
139
4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 35 col0 FROM tab0
----
35

query I rowsort
SELECT ALL 67 FROM tab0
----
67
67
67

query I rowsort
SELECT ( col0 ) * - tab2.col0 + tab2.col2 AS col1 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT + col1 * cor0.col2 + col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL - cor0.col2 + - col1 * + 55 AS col2 FROM tab0 cor0
----
-4763
-5087
-5336

query I rowsort
SELECT DISTINCT + + col1 - + 71 FROM tab1 AS cor0
----
-45
-58
-61

onlyif mysql # use DIV operator for integer division
query I rowsort label-6966
SELECT col2 * col0 DIV 25 + - col2 col2 FROM tab2 AS cor0
----
-20
55
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6966
SELECT col2 * col0 / 25 + - col2 col2 FROM tab2 AS cor0
----
-20
55
82

query I rowsort
SELECT ALL - + cor0.col2 AS col1 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6968
SELECT ALL col2 * CAST( NULL AS DECIMAL ) + 68 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6968
SELECT ALL col2 * CAST ( NULL AS REAL ) + 68 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col2 - 99 FROM tab0 AS cor0
----
-17
-66
-98

query I rowsort
SELECT ALL + tab2.col2 AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT + 29 - col0 * col1 AS col0 FROM tab0
----
-2035
-3366
-8070

query I rowsort
SELECT + 51 * tab1.col1 AS col0 FROM tab1
----
1326
510
663

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT + 5 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT + col2 * ( col1 ) + + col2 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-6976
SELECT - + col0 DIV CAST( + col1 AS SIGNED ) + col2 * ( cor0.col0 ) + + col0 FROM tab2 cor0
----
196
2105
3077

skipif mysql # not compatible
query I rowsort label-6976
SELECT - + col0 / CAST ( + col1 AS INTEGER ) + col2 * ( cor0.col0 ) + + col0 FROM tab2 cor0
----
196
2105
3077

query I rowsort
SELECT + - col2 + 32 * col1 FROM tab2 cor0
----
1862
506
965

query I rowsort
SELECT + col2 * 73 * - col0 + col2 * - col1 AS col1 FROM tab0 AS cor0
----
-2652
-540216
-60654

onlyif mysql # use DIV operator for integer division
query I rowsort label-6979
SELECT DISTINCT - col0 * + col0 DIV + ( col0 ) AS col2 FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-6979
SELECT DISTINCT - col0 * + col0 / + ( col0 ) AS col2 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT DISTINCT 43 - ( cor0.col0 ) FROM tab0, tab2 AS cor0, tab0 AS cor1
----
-35
-36
36

query I rowsort
SELECT 64 AS col1 FROM tab0
----
64
64
64

query I rowsort
SELECT + 73 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

query I rowsort
SELECT + 80 - tab1.col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 054bd188da6302a8983411107071de76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 + tab2.col0 col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 29f801f1b7e7d6303a7589fe93f3b80e

query I rowsort
SELECT ALL + 55 + - col0 * - 72 AS col1 FROM tab0 AS cor0
----
1783
2575
6463

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 86 + col2 * + 88 - - col2 col2 FROM tab1 AS cor0
----
4892
5159
8630

query I rowsort
SELECT ALL + 13 * col0 FROM tab2 cor0
----
1014
1027
91

query I rowsort
SELECT - ( + col0 ) * 95 + + col1 AS col1 FROM tab0 AS cor0
----
-2194
-3228
-8364

query I rowsort
SELECT ALL - 5 * col2 + - col1 + - ( - col0 ) FROM tab0 AS cor0
----
-227
-412
-67

query I rowsort
SELECT DISTINCT - 50 * cor0.col1 + col0 + + col0 FROM tab1 AS cor0
----
-1294
-372
-490

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6991
SELECT - col0 + + col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6991
SELECT - col0 + + col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col0 * - col0 * 98 FROM tab2 AS cor0
----
-4802
-596232
-611618

query I rowsort
SELECT col0 * 71 AS col0 FROM tab0 cor0
----
1704
2485
6319

onlyif mysql # use DIV operator for integer division
query I rowsort label-6994
SELECT col1 * col1 DIV col1 AS col1 FROM tab2 cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6994
SELECT col1 * col1 / col1 AS col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + col2 * col1 + - col1 + + col0 * col0 AS col1 FROM tab0 AS cor0
----
1225
15292
3328

query I rowsort
SELECT DISTINCT - col2 + + cor0.col2 AS col2 FROM tab1 cor0
----
0

query I rowsort
SELECT - cor0.col2 * col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + col0 + 5 AS col1 FROM tab1 AS cor0
----
69
8
85

query I rowsort
SELECT - - col0 * 64 AS col1 FROM tab0 AS cor0
----
1536
2240
5696

query I rowsort
SELECT ALL - + col0 * - col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL col1 * - col0 AS col1 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7002
SELECT CAST( 83 AS SIGNED ) FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

skipif mysql # not compatible
query I rowsort label-7002
SELECT CAST ( 83 AS INTEGER ) FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT + - col1 * - 2 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT + + col2 * col2 * - col1 AS col1 FROM tab0 cor0
----
-611884
-93654
-97

query I rowsort
SELECT ALL col0 + + col1 + + col2 FROM tab2 cor0
----
134
163
65

query I rowsort
SELECT col1 + 53 FROM tab0 AS cor0
----
139
144
150

query I rowsort
SELECT DISTINCT + - col0 + col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT + ( col1 ) * - cor0.col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7009
SELECT - CAST( + 57 AS SIGNED ) * + col1 - - ( cor0.col1 + + col0 ) * - col1 col2 FROM tab2 AS cor0
----
-11446
-2601
-2945

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7009
SELECT - CAST ( + 57 AS INTEGER ) * + col1 - - ( cor0.col1 + + col0 ) * - col1 col2 FROM tab2 AS cor0
----
-11446
-2601
-2945

onlyif mysql # use DIV operator for integer division
query I rowsort label-7010
SELECT ALL col0 DIV - col0 + - cor0.col1 * + ( cor0.col2 + cor0.col1 ) AS col1 FROM tab0 AS cor0
----
-10235
-15744
-9507

skipif mysql # not compatible
query I rowsort label-7010
SELECT ALL col0 / - col0 + - cor0.col1 * + ( cor0.col2 + cor0.col1 ) AS col1 FROM tab0 AS cor0
----
-10235
-15744
-9507

query I rowsort
SELECT DISTINCT - - col2 + + 6 * - col1 FROM tab2 AS cor0
----
-159
-328
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-7012
SELECT + - 65 + col2 DIV - col1 AS col0 FROM tab0 AS cor0
----
-65
-65
-65

skipif mysql # not compatible
query I rowsort label-7012
SELECT + - 65 + col2 / - col1 AS col0 FROM tab0 AS cor0
----
-65
-65
-65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7013
SELECT ALL col2 * + col0 + col2 * + CAST( col0 * + col2 AS SIGNED ) + + 6 * col1 AS col0 FROM tab2
----
117180
5478
55110

skipif mysql # not compatible
query I rowsort label-7013
SELECT ALL col2 * + col0 + col2 * + CAST ( col0 * + col2 AS INTEGER ) + + 6 * col1 AS col0 FROM tab2
----
117180
5478
55110

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0 CROSS JOIN tab1
----
243 values hashing to 7e12d99d8ab63d9fd10e95cef9d78998

query I rowsort
SELECT DISTINCT 3 * col0 FROM tab0 AS cor0
----
105
267
72

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) * + col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7017
SELECT DISTINCT + col2 + col0 + + cor0.col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7017
SELECT DISTINCT + col2 + col0 + + cor0.col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + ( + ( - col2 ) ) + + col0 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - + col2 col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - 68 + - 97 AS col1 FROM tab2, tab0, tab2 AS cor0, tab1
----
81 values hashing to e9896575f724a69e524d7c33d5135097

query I rowsort
SELECT + ( col2 ) + + col2 * + col1 AS col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - col2 * - ( col2 ) * col0 + ( col1 ) + + col0 AS col2 FROM tab0 AS cor0
----
167
26246
598616

query I rowsort
SELECT - 80 + - 63 * col0 AS col2 FROM tab0 AS cor0
----
-1592
-2285
-5687

query I rowsort
SELECT DISTINCT - col0 - - col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - 28 FROM tab2 AS cor0
----
-28
-28
-28

query I rowsort
SELECT ALL col1 * + col1 - + col2 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT ALL ( col2 ) FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT - - col2 * col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2, tab2 AS cor0 CROSS JOIN tab0
----
7
78
79

query I rowsort
SELECT ALL col2 + + cor0.col1 * + 99 FROM tab0 AS cor0
----
8547
9091
9604

query I rowsort
SELECT ALL cor0.col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT + 59 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT DISTINCT + + 24 FROM tab1 AS cor0
----
24

query I rowsort
SELECT + 12 AS col2 FROM tab0
----
12
12
12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7035
SELECT DISTINCT - CAST( NULL AS SIGNED ) col0 FROM tab1, tab2 cor0 CROSS JOIN tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7035
SELECT DISTINCT - CAST ( NULL AS INTEGER ) col0 FROM tab1, tab2 cor0 CROSS JOIN tab0
----
NULL

query I rowsort
SELECT - 48 * - col0 + cor0.col0 AS col1 FROM tab2 AS cor0
----
343
3822
3871

query I rowsort
SELECT - 16 + - col1 AS col0 FROM tab1 AS cor0
----
-26
-29
-42

query I rowsort
SELECT - ( cor0.col1 ) + 98 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to 162bc224ecdf92652ee668b36406a011

query I rowsort
SELECT DISTINCT + col0 + tab0.col1 FROM tab0
----
110
132
180

query I rowsort
SELECT + 87 * 34 FROM tab1
----
2958
2958
2958

query I rowsort
SELECT DISTINCT 28 + - 68 AS col2 FROM tab1
----
-40

query I rowsort
SELECT + 52 + col2 * col0 * + col1 + + 8 FROM tab1
----
36540
4272
99900

query I rowsort
SELECT - 53 FROM tab0
----
-53
-53
-53

query I rowsort
SELECT 39 + + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 85a51898bc8557555dd3143c16fc6d5a

query I rowsort
SELECT - col1 + + col2 AS col2 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - + col2 + - cor0.col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT + - ( col1 ) FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-7048
SELECT DISTINCT - col2 DIV + col0 + + col1 DIV col2 col1 FROM tab0 AS cor0
----
1
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7048
SELECT DISTINCT - col2 / + col0 + + col1 / col2 col1 FROM tab0 AS cor0
----
1
97

query I rowsort
SELECT DISTINCT + - col1 * - col0 * + 49 + - 20 AS col2 FROM tab1 AS cor0
----
31340
3802
50940

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 + 81 AS col0 FROM tab1, tab0 AS cor0
----
81

query I rowsort
SELECT DISTINCT + col0 + - col0 * ( + col2 ) FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL 84 FROM tab2, tab1 cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT 96 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query I rowsort
SELECT DISTINCT + + 86 + + col0 AS col2 FROM tab0 AS cor0
----
110
121
175

onlyif mysql # use DIV operator for integer division
query I rowsort label-7056
SELECT - + 2 * + cor0.col0 + - col2 DIV + cor0.col2 AS col1 FROM tab1 AS cor0
----
-129
-161
-7

skipif mysql # not compatible
query I rowsort label-7056
SELECT - + 2 * + cor0.col0 + - col2 / + cor0.col2 AS col1 FROM tab1 AS cor0
----
-129
-161
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 24 * - col2 + + col2 + 87 col1 FROM tab0 AS cor0
----
-1799
-672
64

query I rowsort
SELECT + - col1 * - cor0.col1 - - col1 * col1 FROM tab0 AS cor0
----
14792
16562
18818

query I rowsort
SELECT 15 + cor0.col1 AS col0 FROM tab1 cor0
----
25
28
41

query I rowsort
SELECT ALL + + col1 * - cor0.col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT ( - col0 ) + + col0 + cor0.col0 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col1 col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + col1 * - col1 + - col1 FROM tab2
----
-306
-3540
-992

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL IN ( + tab0.col2 * col0 )
----

query I rowsort
SELECT + col0 + - col1 AS col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT col0 * col1 AS col2 FROM tab1 WHERE NULL NOT IN ( - col1 / - col0 + - tab1.col0 * col0 )
----

query I rowsort
SELECT - col1 + + col0 AS col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT col2 - - col2 AS col2 FROM tab0
----
164
2
66

query I rowsort
SELECT ALL + col1 * col0 + - col2 AS col2 FROM tab2
----
1305
190
4576

query I rowsort
SELECT - col0 + col2 AS col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + col1 + - col1 AS col0 FROM tab1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7073
SELECT ALL col0 DIV tab0.col0 + col0 DIV - col1 FROM tab0 WHERE NOT ( col1 ) IN ( + tab0.col2 - - col2 )
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7073
SELECT ALL col0 / tab0.col0 + col0 / - col1 FROM tab0 WHERE NOT ( col1 ) IN ( + tab0.col2 - - col2 )
----
1
1
1

query I rowsort
SELECT ALL + col0 + - col1 / + col2 + - col1 / col0 AS col1 FROM tab0 WHERE NOT col0 <> ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7075
SELECT + tab0.col1 DIV col0 AS col2 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-7075
SELECT + tab0.col1 / col0 AS col2 FROM tab0
----
1
2
3

query I rowsort
SELECT ALL tab1.col1 * - col0 AS col1 FROM tab1 WHERE NOT ( col2 ) > NULL
----

query I rowsort
SELECT ALL col0 + tab0.col1 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-7078
SELECT + col1 DIV - col1 + tab0.col1 + col1 * col2 AS col0 FROM tab0
----
193
2923
7552

skipif mysql # not compatible
query I rowsort label-7078
SELECT + col1 / - col1 + tab0.col1 + col1 * col2 AS col0 FROM tab0
----
193
2923
7552

query I rowsort
SELECT - tab2.col0 - col1 AS col0 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT + col0 + - tab1.col0 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + col1 FROM tab2 WHERE NULL NOT IN ( + col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col2 + + col1 * col2 col2 FROM tab2
----
1566
2090
2210

query I rowsort
SELECT col2 * tab2.col0 AS col1 FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-7084
SELECT col2 + col0 DIV - col0 - - col0 AS col0 FROM tab2
----
103
116
33

skipif mysql # not compatible
query I rowsort label-7084
SELECT col2 + col0 / - col0 - - col0 AS col0 FROM tab2
----
103
116
33

query I rowsort
SELECT + col1 + col0 * + col1 - col0 AS col1 FROM tab1
----
101
586
973

query I rowsort
SELECT ALL + col2 * + col1 AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT - col1 + col0 - - col0 AS col2 FROM tab2
----
-17
141
97

query I rowsort
SELECT - col0 * + col2 + - cor0.col2 + + col0 FROM tab0 AS cor0
----
-1
-7291
-801

query I rowsort
SELECT - + col2 * + col1 + + col1 * cor0.col0 AS col2 FROM tab1 cor0
----
-1326
-208
70

query III rowsort
SELECT * FROM tab0 WHERE col0 NOT IN ( col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col0 col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT col0 - col0 AS col1 FROM tab1 AS cor0 WHERE ( + col0 ) > NULL
----

query I rowsort
SELECT ALL tab1.col2 + + tab1.col2 AS col0 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL col2 * + col1 AS col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL col2 + - tab1.col2 * col0 * - col1 AS col0 FROM tab1
----
36537
4266
99936

query I rowsort
SELECT ALL + col1 * col1 + + col0 * col2 FROM tab0
----
15579
8188
9444

query I rowsort
SELECT + col1 FROM tab1 WHERE NULL IN ( col0 + - col2 * - col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7098
SELECT DISTINCT - col0 DIV + col0 + col1 DIV col2 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-7098
SELECT DISTINCT - col0 / + col0 + col1 / col2 FROM tab1
----
-1

query I rowsort
SELECT DISTINCT col0 * + col2 FROM tab2 WHERE NOT col1 / col0 + col0 <> - col2
----

query I rowsort
SELECT + col2 * tab1.col0 AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - col1 + - col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT col2 AS col2 FROM tab1 cor0 WHERE NOT + col1 + col2 NOT BETWEEN NULL AND ( - col2 - col1 )
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7103
SELECT DISTINCT - col0 + - CAST( col0 AS SIGNED ) FROM tab0
----
-178
-48
-70

skipif mysql # not compatible
query I rowsort label-7103
SELECT DISTINCT - col0 + - CAST ( col0 AS INTEGER ) FROM tab0
----
-178
-48
-70

query I rowsort
SELECT ALL col0 * - ( - col1 ) + col1 AS col0 FROM tab1
----
104
1053
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 + - col0 col1 FROM tab1 AS cor0
----
-121
-176
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col2 * col1 col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + col0 + cor0.col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - col2 + 23 AS col1 FROM tab2 cor0
----
-15
-3
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-7109
SELECT ALL + col0 DIV cor0.col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7109
SELECT ALL + col0 / cor0.col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT - col2 * - cor0.col0 * - col0 + col0 AS col1 FROM tab1 cor0
----
-233408
-483
-614320

query I rowsort
SELECT DISTINCT - col1 * - col2 + ( - col1 ) FROM tab1 AS cor0
----
1235
1378
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7112
SELECT CAST( NULL AS SIGNED ) FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7112
SELECT CAST ( NULL AS INTEGER ) FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col1 * col1 AS col1 FROM tab1 cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-7114
SELECT - col1 DIV 56 col1 FROM tab2 cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7114
SELECT - col1 / 56 col1 FROM tab2 cor0
----
-1
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7115
SELECT col2 / CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7115
SELECT col2 / CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( 16 ) AS col1 FROM tab1 AS cor0
----
16
16
16

query I rowsort
SELECT ALL - + 19 FROM tab1 AS cor0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) + col2 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL col2 * col2 * + col1 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT + - ( + ( - cor0.col1 ) ) + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT col2 * + col2 + col1 FROM tab2 cor0
----
1461
735
760

query I rowsort
SELECT DISTINCT + - 43 - + ( + cor0.col0 ) FROM tab0 AS cor0
----
-132
-67
-78

query I rowsort
SELECT ALL + - 50 FROM tab1 AS cor0
----
-50
-50
-50

query I rowsort
SELECT + col1 * - 2 * col0 FROM tab1 AS cor0
----
-1280
-156
-2080

query I rowsort
SELECT ALL - + col2 * col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT 60 * + col2 FROM tab0 AS cor0
----
1980
4920
60

query I rowsort
SELECT 18 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7128
SELECT CAST( col2 AS SIGNED ) * - col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-7128
SELECT CAST ( col2 AS INTEGER ) * - col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + col1 * + 84 AS col2 FROM tab1 AS cor0
----
1092
2184
840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 80 + + col1 * + 88 col2 FROM tab0 AS cor0
----
7648
8088
8616

query I rowsort
SELECT + col1 - + col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7132
SELECT DISTINCT tab1.col1 * col0 - CAST( NULL AS SIGNED ) * col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7132
SELECT DISTINCT tab1.col1 * col0 - CAST ( NULL AS INTEGER ) * col1 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT + ( col1 ) + - col1 * col2 + - tab0.col0 FROM tab0
----
-2776
-35
-7460

query I rowsort
SELECT DISTINCT cor2.col2 AS col1 FROM tab2, tab2 AS cor0, tab1 cor1, tab1 AS cor2
----
54
57
96

query I rowsort
SELECT ALL - - col1 * col1 + 4 AS col0 FROM tab2 AS cor0
----
293
3485
965

query I rowsort
SELECT ALL + col0 + - col2 * cor0.col1 AS col2 FROM tab0 cor0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-7137
SELECT DISTINCT - col0 DIV + col0 - col0 col0 FROM tab0 AS cor0
----
-25
-36
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7137
SELECT DISTINCT - col0 / + col0 - col0 col0 FROM tab0 AS cor0
----
-25
-36
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 86 + + cor0.col2 col1 FROM tab0 AS cor0
----
119
168
87

query I rowsort
SELECT ALL - col2 + 42 * + col0 AS col1 FROM tab1 AS cor0
----
2631
3264
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-7140
SELECT ALL tab0.col2 DIV col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7140
SELECT ALL tab0.col2 / col2 FROM tab0
----
1
1
1

query I rowsort
SELECT 11 * cor0.col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to c2ad2b026ad2ac98c4a2b4bc163043a8

query I rowsort
SELECT + + col2 * 19 AS col1 FROM tab0 AS cor0
----
1558
19
627

query I rowsort
SELECT DISTINCT - - col2 * 7 FROM tab1 AS cor0
----
378
399
672

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7144
SELECT col0 * CAST( NULL AS SIGNED ) + col2 / - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7144
SELECT col0 * CAST ( NULL AS INTEGER ) + col2 / - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * ( col2 ) * - col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT DISTINCT + col2 - col2 FROM tab0
----
0

query I rowsort
SELECT - ( col1 ) FROM tab0
----
-86
-91
-97

query I rowsort
SELECT 51 FROM tab2
----
51
51
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-7149
SELECT - 34 + - col0 DIV 21 AS col0 FROM tab0
----
-35
-35
-38

skipif mysql # not compatible
query I rowsort label-7149
SELECT - 34 + - col0 / 21 AS col0 FROM tab0
----
-35
-35
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 43 * cor0.col1 col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c283dbb66131cd08f887cd434d3a102e

query I rowsort
SELECT - col0 - 61 FROM tab1
----
-125
-141
-64

query I rowsort
SELECT - - col2 + + 31 FROM tab1 AS cor0
----
127
85
88

query I rowsort
SELECT ALL col1 * ( col2 ) + + col2 * col1 FROM tab0
----
14924
194
5676

onlyif mysql # use DIV operator for integer division
query I rowsort label-7154
SELECT DISTINCT - col2 * + tab1.col1 + col1 DIV col1 AS col2 FROM tab1
----
-1247
-1403
-569

skipif mysql # not compatible
query I rowsort label-7154
SELECT DISTINCT - col2 * + tab1.col1 + col1 / col1 AS col2 FROM tab1
----
-1247
-1403
-569

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7155
SELECT DISTINCT - col0 + CAST( NULL AS DECIMAL ) * - tab1.col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7155
SELECT DISTINCT - col0 + CAST ( NULL AS REAL ) * - tab1.col1 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col0 AS REAL ) col2 FROM tab1
----
3
64
80

query I rowsort
SELECT + 40 FROM tab0
----
40
40
40

query I rowsort
SELECT 7 * col1 FROM tab0
----
602
637
679

query I rowsort
SELECT 54 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT + + 38 + cor0.col2 FROM tab2 cor0
----
64
65
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-7161
SELECT col1 + - col0 DIV col0 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-7161
SELECT col1 + - col0 / col0 FROM tab0 AS cor0
----
85
90
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 25 col1 FROM tab2 AS cor0
----
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 65 + col1 * + col1 col1 FROM tab2 AS cor0
----
1026
354
3546

query I rowsort
SELECT - - tab0.col1 AS col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT + col1 - 22 * + col1 FROM tab0 cor0
----
-1806
-1911
-2037

query I rowsort
SELECT DISTINCT - 31 FROM tab2, tab1 AS cor0
----
-31

query I rowsort
SELECT - col1 + col1 AS col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT 23 + col1 * col0 FROM tab0 AS cor0
----
2087
3418
8122

query I rowsort
SELECT ALL - + ( - col1 ) * col2 + - col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT + 87 * col2 FROM tab0 AS cor0
----
2871
7134
87

query I rowsort
SELECT DISTINCT col0 - col2 * col0 * - col1 FROM tab2
----
119730
51113
5866

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7172
SELECT ALL tab2.col2 + + col0 * CAST( NULL AS SIGNED ) * col0 - col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7172
SELECT ALL tab2.col2 + + col0 * CAST ( NULL AS INTEGER ) * col0 - col0 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7173
SELECT DISTINCT + col0 * + col0 * + tab0.col1 + - tab0.col2 DIV + col2 AS col0 FROM tab0
----
118824
49535
720810

skipif mysql # not compatible
query I rowsort label-7173
SELECT DISTINCT + col0 * + col0 * + tab0.col1 + - tab0.col2 / + col2 AS col0 FROM tab0
----
118824
49535
720810

onlyif mysql # use DIV operator for integer division
query I rowsort label-7174
SELECT DISTINCT 23 + col1 DIV col2 AS col0 FROM tab0
----
120
24
25

skipif mysql # not compatible
query I rowsort label-7174
SELECT DISTINCT 23 + col1 / col2 AS col0 FROM tab0
----
120
24
25

query I rowsort
SELECT ( col1 ) + col0 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL - col0 * col2 + tab2.col0 - - 17 * col2 FROM tab2
----
-1508
-2277
277

onlyif mysql # use DIV operator for integer division
query I rowsort label-7177
SELECT - tab1.col0 DIV - col1 - col1 * col2 col0 FROM tab1
----
-1242
-1404
-564

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7177
SELECT - tab1.col0 / - col1 - col1 * col2 col0 FROM tab1
----
-1242
-1404
-564

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ALL + - col1 FROM tab0 cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7180
SELECT DISTINCT + col1 DIV + col0 AS col2 FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-7180
SELECT DISTINCT + col1 / + col0 AS col2 FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT DISTINCT - col0 * cor0.col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7182
SELECT - + col0 * cor0.col2 DIV col1 FROM tab1 AS cor0
----
-364
-590
-6

skipif mysql # not compatible
query I rowsort label-7182
SELECT - + col0 * cor0.col2 / col1 FROM tab1 AS cor0
----
-364
-590
-6

query I rowsort
SELECT DISTINCT - col2 * + col1 + col2 AS col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL + col0 + col0 * - col0 AS col0 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT ALL - col2 * ( + col0 ) - col0 FROM tab1 cor0
----
-165
-3712
-7760

query I rowsort
SELECT col2 + 14 * - col0 * - col2 AS col0 FROM tab2 AS cor0
----
2673
28418
42066

query I rowsort
SELECT DISTINCT cor0.col2 + + col1 + col2 FROM tab0 AS cor0
----
152
255
99

query I rowsort
SELECT DISTINCT - - col1 + ( - col0 ) FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT + - col1 + - 89 FROM tab2 AS cor0
----
-106
-120
-148

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7190
SELECT - col1 + - CAST( NULL AS SIGNED ) + + 40 * col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7190
SELECT - col1 + - CAST ( NULL AS INTEGER ) + + 40 * col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + cor0.col2 + 98 FROM tab2 AS cor0
----
118
46
57

query I rowsort
SELECT - 34 + - col0 FROM tab2
----
-112
-113
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 * col2 + col2 col0 FROM tab1
----
216
3705
7776

query I rowsort
SELECT - + col0 + 85 - col1 AS col2 FROM tab0 AS cor0
----
-25
-47
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * 63 * - col1 col2 FROM tab2 AS cor0
----
40698
52731
96642

query I rowsort
SELECT col0 - + col0 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7197
SELECT ALL + + col2 DIV + 15 FROM tab1 AS cor0
----
3
3
6

skipif mysql # not compatible
query I rowsort label-7197
SELECT ALL + + col2 / + 15 FROM tab1 AS cor0
----
3
3
6

query I rowsort
SELECT col0 + - col0 + col1 * cor0.col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + col1 * col0 AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL + col2 * + col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT - col2 * - col0 + col0 * col0 AS col0 FROM tab2 AS cor0
----
238
8112
9243

query I rowsort
SELECT - col1 + cor0.col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab1 AS cor0
----
20
26
52

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 + col0 + + col1 * + col0 AS col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT ALL - col0 + - col2 + col2 AS col0 FROM tab0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7207
SELECT - tab1.col1 DIV col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7207
SELECT - tab1.col1 / col2 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 + + col1 * col1 FROM tab0
----
7310
8190
9312

query I rowsort
SELECT ALL + 3 * - cor0.col2 + col1 * + col1 FROM tab0 AS cor0
----
7297
8035
9406

query I rowsort
SELECT DISTINCT ( + cor0.col2 ) * col2 * - col1 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT - - col2 + col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col2 * + col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - ( col1 ) + col0 FROM tab0 AS cor0
----
-2
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 col2 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-7215
SELECT + col1 + col2 DIV - col2 AS col0 FROM tab0 cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-7215
SELECT + col1 + col2 / - col2 AS col0 FROM tab0 cor0
----
85
90
96

query I rowsort
SELECT ALL - 43 FROM tab1 AS cor0
----
-43
-43
-43

query I rowsort
SELECT + - 31 + + col0 FROM tab0 AS cor0
----
-7
4
58

query I rowsort
SELECT DISTINCT - - 34 * col1 FROM tab1 AS cor0
----
340
442
884

query I rowsort
SELECT ALL - 82 + + col1 FROM tab2 AS cor0
----
-23
-51
-65

query I rowsort
SELECT + 1 + + col1 AS col0 FROM tab0 AS cor0
----
87
92
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7221
SELECT - + col1 DIV col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7221
SELECT - + col1 / col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 51 FROM tab2
----
51

query I rowsort
SELECT + 23 FROM tab2 AS cor0
----
23
23
23

query I rowsort
SELECT + col0 * - cor0.col0 + + col1 FROM tab1 AS cor0
----
-4086
-6387
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-7225
SELECT + - 88 + + col2 + 89 DIV + col0 AS col1 FROM tab0 AS cor0
----
-5
-52
-85

skipif mysql # not compatible
query I rowsort label-7225
SELECT + - 88 + + col2 + 89 / + col0 AS col1 FROM tab0 AS cor0
----
-5
-52
-85

query I rowsort
SELECT col1 + col0 * 53 FROM tab0 AS cor0
----
1358
1952
4808

query I rowsort
SELECT - - 59 + + col2 FROM tab1 AS cor0
----
113
116
155

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col0 col2 FROM tab0 AS cor0
----
-2
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7229
SELECT DISTINCT 58 * + col2 * - CAST( col1 * - col2 AS SIGNED ) - + cor0.col1 FROM tab0 cor0
----
35489181
5431846
5529

skipif mysql # not compatible
query I rowsort label-7229
SELECT DISTINCT 58 * + col2 * - CAST ( col1 * - col2 AS INTEGER ) - + cor0.col1 FROM tab0 cor0
----
35489181
5431846
5529

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7230
SELECT ALL col0 * - CAST( - ( + col1 ) AS SIGNED ) col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7230
SELECT ALL col0 * - CAST ( - ( + col1 ) AS INTEGER ) col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - col2 * cor0.col2 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT col0 * + col2 + col1 FROM tab2
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + 49 col1 FROM tab0
----
138
73
84

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( + 47 AS REAL ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 cor1, tab0 AS cor2
----
81 values hashing to 905cbd63e2561d7f32ce36091d5b526a

query I rowsort
SELECT col0 - - 23 FROM tab2 AS cor0
----
101
102
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 + 2 col1 FROM tab0 AS cor0
----
48
48
48

query I rowsort
SELECT 7 FROM tab2, tab0 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT DISTINCT 55 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
55

query I rowsort
SELECT - 31 * 68 AS col1 FROM tab2
----
-2108
-2108
-2108

query I rowsort
SELECT DISTINCT ( - col1 ) AS col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT - 49 * - 40 FROM tab0
----
1960
1960
1960

query I rowsort
SELECT col2 * 23 AS col2 FROM tab2
----
598
621
874

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( + col0 * + col2 + - ( 34 ) AS REAL ) FROM tab0
----
-1
-7264
-758

query I rowsort
SELECT - - ( + cor0.col0 ) + + col0 AS col2 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT DISTINCT 98 - - tab0.col0 * - col1 FROM tab0
----
-1966
-3297
-8001

query I rowsort
SELECT ALL 72 - col1 FROM tab1
----
46
59
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-7247
SELECT DISTINCT + tab1.col1 - + col0 DIV + col2 AS col2 FROM tab1
----
13
26
9

skipif mysql # not compatible
query I rowsort label-7247
SELECT DISTINCT + tab1.col1 - + col0 / + col2 AS col2 FROM tab1
----
13
26
9

query I rowsort
SELECT - 19 + + col1 FROM tab2 cor0
----
-2
12
40

query I rowsort
SELECT DISTINCT + - 36 * + col1 - + 13 AS col1 FROM tab1 cor0
----
-373
-481
-949

query I rowsort
SELECT - cor0.col1 - - col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - 41 FROM tab2, tab1 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to 007857b49fbf51962923f3da53f42f2b

query I rowsort
SELECT - col2 * - col2 * - col0 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT ALL - tab2.col0 + col0 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT 39 + col0 * col1 * - tab0.col1 FROM tab0
----
-177465
-329276
-736970

onlyif mysql # use DIV operator for integer division
query I rowsort label-7255
SELECT col2 DIV + col0 + + 81 * ( col1 ) - cor0.col0 AS col1 FROM tab2 cor0
----
1298
2507
4701

skipif mysql # not compatible
query I rowsort label-7255
SELECT col2 / + col0 + + 81 * ( col1 ) - cor0.col0 AS col1 FROM tab2 cor0
----
1298
2507
4701

query I rowsort
SELECT DISTINCT + 74 FROM tab1 AS cor0
----
74

query I rowsort
SELECT DISTINCT - - 66 * col0 AS col1 FROM tab0 cor0
----
1584
2310
5874

query I rowsort
SELECT + 17 * col2 + 59 + + col1 AS col1 FROM tab1 AS cor0
----
1003
1038
1704

query I rowsort
SELECT ALL - 82 AS col0 FROM tab0 cor0
----
-82
-82
-82

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT ALL + - col0 * - cor0.col2 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 17 * col0 col0 FROM tab1 AS cor0
----
1088
1360
51

query I rowsort
SELECT - ( col0 ) * ( - col2 ) + + col0 * + cor0.col0 + col0 * cor0.col1 FROM tab1 AS cor0
----
15120
249
8384

query I rowsort
SELECT DISTINCT col1 * 11 AS col0 FROM tab1
----
110
143
286

query I rowsort
SELECT - cor0.col2 * + col2 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-7266
SELECT ALL col0 DIV 31 col1 FROM tab2
----
0
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7266
SELECT ALL col0 / 31 col1 FROM tab2
----
0
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - ( col1 ) * - col2 col0 FROM tab2
----
1508
608
810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + - 92 col2 FROM tab0 AS cor0
----
-10
-59
-91

query I rowsort
SELECT 92 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to c64cb7a81da51f4be0b6906a223e8817

query I rowsort
SELECT DISTINCT col2 + - 44 * + col1 FROM tab0 cor0
----
-3751
-3922
-4267

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7271
SELECT - - CAST( + 54 AS SIGNED ) * col0 + 51 * + 8 * + col1 + + 77 * col2 AS col2 FROM tab1 AS cor0
----
11925
14928
17016

skipif mysql # not compatible
query I rowsort label-7271
SELECT - - CAST ( + 54 AS INTEGER ) * col0 + 51 * + 8 * + col1 + + 77 * col2 AS col2 FROM tab1 AS cor0
----
11925
14928
17016

query I rowsort
SELECT DISTINCT col0 + col1 * + col1 AS col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT + - ( col2 ) + + col0 * + ( + cor0.col0 ) AS col2 FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT ALL - - 68 FROM tab0 AS cor0
----
68
68
68

query I rowsort
SELECT ALL + ( + 42 ) AS col0 FROM tab1 AS cor0
----
42
42
42

query I rowsort
SELECT ( 66 ) * + col2 * 87 AS col1 FROM tab0 AS cor0
----
189486
470844
5742

query I rowsort
SELECT ALL + - ( col1 ) + + col0 * ( col0 ) AS col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT + + 95 * col0 FROM tab1 AS cor0
----
285
6080
7600

skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( col2 AS REAL ) * - cor0.col1 + col2 * 25 FROM tab0 cor0
----
122
3663
9512

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7280
SELECT ALL - CAST( NULL AS SIGNED ) + - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7280
SELECT ALL - CAST ( NULL AS INTEGER ) + - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * cor0.col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - ( col0 ) + col2 + - col2 AS col0 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7283
SELECT ALL + tab1.col1 / CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7283
SELECT ALL + tab1.col1 / CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - - cor0.col2 * 86 AS col1 FROM tab0 AS cor0
----
2838
7052
86

query I rowsort
SELECT DISTINCT - ( - col1 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - - ( - col1 ) FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + + cor0.col2 col0 FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * col0 * - col0 col2 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT ALL + 41 FROM tab1 AS cor0
----
41
41
41

query I rowsort
SELECT DISTINCT 44 FROM tab2, tab2 cor0
----
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-7291
SELECT ALL - cor0.col1 + 35 DIV - col0 AS col1 FROM tab0 AS cor0
----
-87
-91
-98

skipif mysql # not compatible
query I rowsort label-7291
SELECT ALL - cor0.col1 + 35 / - col0 AS col1 FROM tab0 AS cor0
----
-87
-91
-98

query I rowsort
SELECT DISTINCT - + cor0.col1 + + col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT - - col2 + 89 * ( cor0.col2 ) FROM tab0 AS cor0
----
2970
7380
90

query I rowsort
SELECT DISTINCT - cor0.col0 + col0 * + col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT + col1 + + ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + col2 + col2 * + cor0.col1 AS col0 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7297
SELECT - col1 + CAST( - 49 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-108
-66
-80

skipif mysql # not compatible
query I rowsort label-7297
SELECT - col1 + CAST ( - 49 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-108
-66
-80

query I rowsort
SELECT ALL + cor0.col2 + ( + 93 ) AS col2 FROM tab2 AS cor0
----
119
120
131

onlyif mysql # use DIV operator for integer division
query I rowsort label-7299
SELECT + 66 + col0 + + ( - 81 ) DIV + col1 AS col0 FROM tab2
----
141
143
71

skipif mysql # not compatible
query I rowsort label-7299
SELECT + 66 + col0 + + ( - 81 ) / + col1 AS col0 FROM tab2
----
141
143
71

query I rowsort
SELECT + col0 + 84 * col0 AS col2 FROM tab0 AS cor0
----
2040
2975
7565

query I rowsort
SELECT - - col0 - - col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL col2 + + 40 FROM tab1
----
136
94
97

query I rowsort
SELECT + 93 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT + col0 * 89 * + col1 FROM tab0 cor0
----
183696
302155
720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-7305
SELECT 66 * col1 + - col0 + + 12 DIV + col0 FROM tab0 AS cor0
----
5652
5917
6367

skipif mysql # not compatible
query I rowsort label-7305
SELECT 66 * col1 + - col0 + + 12 / + col0 FROM tab0 AS cor0
----
5652
5917
6367

query I rowsort
SELECT ALL + col1 * 64 + + 58 FROM tab0
----
5562
5882
6266

query I rowsort
SELECT 67 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to eea8a0738728ea55e4e7ba1506c9905a

query I rowsort
SELECT ALL - col2 * - col0 * + tab1.col2 AS col1 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT DISTINCT tab0.col2 AS col2 FROM tab0, tab1, tab1 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - col0 col0 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * cor0.col0 col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + - col2 * cor0.col2 + - col1 * - col1 AS col2 FROM tab1 cor0
----
-2240
-3149
-9047

query I rowsort
SELECT ALL + + 90 + + col2 AS col0 FROM tab2 AS cor0
----
116
117
128

query I rowsort
SELECT DISTINCT + 96 + col0 AS col2 FROM tab2 AS cor0
----
103
174
175

query I rowsort
SELECT DISTINCT col2 * col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT 38 FROM tab2
----
38

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1, tab1 cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col1 ) col1 FROM tab2, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7319
SELECT DISTINCT - CAST( - ( - col2 ) AS SIGNED ) * ( 87 + col0 * col0 ) FROM tab2
----
-160446
-240464
-3672

skipif mysql # not compatible
query I rowsort label-7319
SELECT DISTINCT - CAST ( - ( - col2 ) AS INTEGER ) * ( 87 + col0 * col0 ) FROM tab2
----
-160446
-240464
-3672

query I rowsort
SELECT ALL - 73 AS col2 FROM tab0
----
-73
-73
-73

query I rowsort
SELECT DISTINCT + + 61 + + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
71
74
87

query I rowsort
SELECT ALL + - ( col0 ) + + col0 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col0 * col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + - ( + col1 ) * - ( col1 * - col2 + + col1 ) AS col2 FROM tab0 AS cor0
----
-236672
-670761
0

query I rowsort
SELECT ALL - + 19 + col2 * - col1 AS col1 FROM tab2 AS cor0
----
-1553
-665
-856

query I rowsort
SELECT DISTINCT + ( col0 ) * col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - col0 * - cor0.col2 * ( cor0.col0 ) FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT + ( cor0.col2 ) AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL col0 + - col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT + - col2 + cor0.col1 * + ( col0 ) AS col0 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT - cor0.col2 * col2 + - col2 * + cor0.col2 * - col2 - + col1 * + col1 FROM tab0 AS cor0
----
-9409
27452
536363

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - + 13 AS col2 FROM tab1 AS cor0
----
-13
-13
-13

query I rowsort
SELECT DISTINCT 1 FROM tab2 AS cor0
----
1

query I rowsort
SELECT DISTINCT 66 FROM tab0
----
66

query I rowsort
SELECT ALL + col2 + - col1 * - 73 AS col0 FROM tab2 AS cor0
----
1279
2290
4333

query I rowsort
SELECT 58 + - col0 AS col2 FROM tab0 AS cor0
----
-31
23
34

query I rowsort
SELECT - 18 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 2dbe09d9295cfd52d854fefabf2cec4e

query I rowsort
SELECT DISTINCT - 61 AS col2 FROM tab2 AS cor0
----
-61

onlyif mysql # use DIV operator for integer division
query I rowsort label-7340
SELECT ALL tab0.col0 DIV + col0 col1 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7340
SELECT ALL tab0.col0 / + col0 col1 FROM tab0
----
1
1
1

query I rowsort
SELECT + + col0 * + col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col0 col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + col2 * cor0.col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col0 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT col1 + col2 * + 75 FROM tab1 AS cor0
----
4076
4285
7213

query I rowsort
SELECT - 10 AS col0 FROM tab1
----
-10
-10
-10

query I rowsort
SELECT 68 + + col2 FROM tab2
----
106
94
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-7348
SELECT - col0 * col0 DIV - 34 AS col2 FROM tab2 AS cor0
----
1
178
183

skipif mysql # not compatible
query I rowsort label-7348
SELECT - col0 * col0 / - 34 AS col2 FROM tab2 AS cor0
----
1
178
183

query I rowsort
SELECT ALL + + ( col0 ) AS col1 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 18 + col1 col2 FROM tab2 AS cor0
----
-1
13
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-7351
SELECT + 65 * - 22 + - cor0.col2 DIV - col2 FROM tab0 AS cor0
----
-1429
-1429
-1429

skipif mysql # not compatible
query I rowsort label-7351
SELECT + 65 * - 22 + - cor0.col2 / - col2 FROM tab0 AS cor0
----
-1429
-1429
-1429

query I rowsort
SELECT - 58 AS col2 FROM tab1 AS cor0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT - - ( + col2 ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + 22 + col2 * - col0 AS col1 FROM tab0 cor0
----
-13
-7276
-770

query I rowsort
SELECT ALL - - col2 * col0 + cor0.col1 FROM tab0 AS cor0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * - col2 * + col2 + - ( ( col0 ) ) col1 FROM tab1 AS cor0
----
207872
737200
8745

onlyif mysql # use DIV operator for integer division
query I rowsort label-7357
SELECT + - CAST( - 18 AS SIGNED ) DIV + col2 + - 41 FROM tab0 AS cor0
----
-23
-41
-41

skipif mysql # not compatible
query I rowsort label-7357
SELECT + - CAST ( - 18 AS INTEGER ) / + col2 + - 41 FROM tab0 AS cor0
----
-23
-41
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col0 + + col1 col2 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7359
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7359
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 31 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab2 AS cor2
----
31

query I rowsort
SELECT 15 AS col2 FROM tab1 AS cor0
----
15
15
15

query I rowsort
SELECT 57 AS col2 FROM tab1 AS cor0
----
57
57
57

query I rowsort
SELECT tab1.col0 * tab1.col0 AS col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
81 values hashing to d5bb2936215e00b8ed99fa757fc90166

onlyif mysql # use DIV operator for integer division
query I rowsort label-7364
SELECT col0 + col0 DIV - col1 AS col0 FROM tab1
----
3
58
74

skipif mysql # not compatible
query I rowsort label-7364
SELECT col0 + col0 / - col1 AS col0 FROM tab1
----
3
58
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 - 82 col2 FROM tab0
----
-49
-81
0

query I rowsort
SELECT DISTINCT tab2.col2 FROM tab2, tab1 cor0
----
26
27
38

query I rowsort
SELECT + col1 + col1 + - col0 FROM tab1
----
-44
-54
49

query I rowsort
SELECT col0 * ( + tab2.col0 ) * col0 FROM tab2
----
343
474552
493039

query I rowsort
SELECT DISTINCT ( cor1.col2 ) FROM tab0, tab2 AS cor0, tab2 AS cor1
----
26
27
38

query I rowsort
SELECT col2 * tab2.col1 FROM tab2
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-7371
SELECT - - col2 DIV + 91 + col0 + + col1 DIV - ( cor0.col0 * - col1 ) FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-7371
SELECT - - col2 / + 91 + col0 + + col1 / - ( cor0.col0 * - col1 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - cor0.col1 + + col1 + col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + col2 * col2 + + col2 FROM tab2 cor0
----
1482
702
756

query I rowsort
SELECT ( + cor0.col2 ) + + col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + + col2 * 40 AS col2 FROM tab2 AS cor0
----
1040
1080
1520

query I rowsort
SELECT DISTINCT - + 84 + col1 FROM tab2 AS cor0
----
-25
-53
-67

query I rowsort
SELECT DISTINCT - 37 + col1 FROM tab1 AS cor0
----
-11
-24
-27

query I rowsort
SELECT ALL col0 - + col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - + 54 FROM tab2 cor0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT 27 AS col2 FROM tab0 AS cor0
----
27

query I rowsort
SELECT + + ( - col2 ) + - col1 AS col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL + - 70 + + ( col2 ) * col2 AS col1 FROM tab0 AS cor0
----
-69
1019
6654

query I rowsort
SELECT - col2 * - col2 + - col1 + + col1 * + col1 AS col0 FROM tab2 AS cor0
----
1659
1716
4098

query I rowsort
SELECT ALL - ( - col2 ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + ( + 23 ) * col0 + - col2 AS col2 FROM tab0 AS cor0
----
1965
519
804

query I rowsort
SELECT ALL + + 21 + col2 FROM tab1 AS cor0
----
117
75
78

query I rowsort
SELECT - + ( - 32 ) * - col1 + - 13 AS col2 FROM tab1 AS cor0
----
-333
-429
-845

query I rowsort
SELECT - col0 * cor0.col1 * - col2 AS col2 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT + col0 + + cor0.col1 * + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT 14 + + col2 * + col0 FROM tab2
----
203
2042
3016

query I rowsort
SELECT ALL + col1 * - cor0.col2 + - 10 FROM tab1 AS cor0
----
-1258
-1414
-580

query I rowsort
SELECT DISTINCT + col1 + cor0.col2 AS col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7393
SELECT DISTINCT ( col2 ) * + CAST( NULL AS SIGNED ) * 55 + col1 * + ( col2 * + col0 + 54 ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7393
SELECT DISTINCT ( col2 ) * + CAST ( NULL AS INTEGER ) * 55 + col1 * + ( col2 * + col0 + 54 ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + 81 AS col0 FROM tab1 AS cor0
----
81
81
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-7395
SELECT ALL + col1 + - col0 DIV + col0 AS col2 FROM tab2 AS cor0
----
16
30
58

skipif mysql # not compatible
query I rowsort label-7395
SELECT ALL + col1 + - col0 / + col0 AS col2 FROM tab2 AS cor0
----
16
30
58

query I rowsort
SELECT ALL - 12 * col2 AS col2 FROM tab2 cor0
----
-312
-324
-456

query I rowsort
SELECT - + col1 * + col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - 42 AS col1 FROM tab1 cor0
----
-42
-42
-42

query I rowsort
SELECT - + col0 * + cor0.col0 + 39 FROM tab0 AS cor0
----
-1186
-537
-7882

onlyif mysql # use DIV operator for integer division
query I rowsort label-7400
SELECT + 66 * col1 DIV 71 FROM tab1
----
12
24
9

skipif mysql # not compatible
query I rowsort label-7400
SELECT + 66 * col1 / 71 FROM tab1
----
12
24
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 58 col2 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT + col1 * 20 + + cor0.col2 FROM tab1 AS cor0
----
257
356
574

query I rowsort
SELECT + ( 98 ) FROM tab1, tab1 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT - cor0.col1 + + ( + col0 ) * col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT + - col0 + + col2 * + col1 FROM tab1 AS cor0
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-7406
SELECT DISTINCT col2 + col0 DIV col2 AS col1 FROM tab1 AS cor0
----
54
58
96

skipif mysql # not compatible
query I rowsort label-7406
SELECT DISTINCT col2 + col0 / col2 AS col1 FROM tab1 AS cor0
----
54
58
96

query I rowsort
SELECT + + col0 + - 13 AS col2 FROM tab2 cor0
----
-6
65
66

query I rowsort
SELECT DISTINCT - col2 * - col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 50 AS col2 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-7410
SELECT DISTINCT ( + col0 ) DIV ( - tab0.col2 ) AS col1 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-7410
SELECT DISTINCT ( + col0 ) / ( - tab0.col2 ) AS col1 FROM tab0
----
-1
-35
0

query I rowsort
SELECT + tab2.col2 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT DISTINCT + + cor0.col0 + - 53 * col0 FROM tab1 AS cor0
----
-156
-3328
-4160

query I rowsort
SELECT DISTINCT + + col2 * + col1 + col2 + - col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - cor0.col0 * + col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7415
SELECT - cor0.col1 * CAST( NULL AS SIGNED ) + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7415
SELECT - cor0.col1 * CAST ( NULL AS INTEGER ) + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 + - col1 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT - + col2 + col1 AS col0 FROM tab1 cor0
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7418
SELECT ALL col2 + CAST( + col0 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-7418
SELECT ALL col2 + CAST ( + col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7419
SELECT DISTINCT col2 + - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7419
SELECT DISTINCT col2 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col0 col0 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + 54 + col0 * col1 col1 FROM tab0 AS cor0
----
12905
3360
5285

onlyif mysql # use DIV operator for integer division
query I rowsort label-7422
SELECT + - col2 DIV 11 FROM tab0 AS cor0
----
-3
-7
0

skipif mysql # not compatible
query I rowsort label-7422
SELECT + - col2 / 11 FROM tab0 AS cor0
----
-3
-7
0

query I rowsort
SELECT DISTINCT - col0 * col0 + - col0 FROM tab0 AS cor0
----
-1260
-600
-8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7424
SELECT DISTINCT col1 * CAST( NULL AS SIGNED ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7424
SELECT DISTINCT col1 * CAST ( NULL AS INTEGER ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + + col0 * ( 4 ) + + col0 * 18 + 88 AS col2 FROM tab0 AS cor0
----
2046
616
858

query I rowsort
SELECT - col0 * col2 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7427
SELECT ALL + - col0 + col1 DIV + col1 AS col1 FROM tab0 cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-7427
SELECT ALL + - col0 + col1 / + col1 AS col1 FROM tab0 cor0
----
-23
-34
-88

query I rowsort
SELECT ALL + col1 * cor0.col0 + 31 FROM tab1 AS cor0
----
1071
109
671

query I rowsort
SELECT - + col2 + + cor0.col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 + + col0 AS col0 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT ALL - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT DISTINCT - - col0 - + col0 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT + + col0 + - 54 * - col0 AS col0 FROM tab0 AS cor0
----
1320
1925
4895

query I rowsort
SELECT - 66 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to cd4a3594ee8b45223ebf9f25840cd112

query I rowsort
SELECT ALL - 86 * col0 FROM tab0 AS cor0
----
-2064
-3010
-7654

query I rowsort
SELECT + col2 + col1 * + col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT ALL + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT cor0.col0 + + 55 FROM tab2, tab1 AS cor0
----
9 values hashing to 155b397adecdafdd0a7d3f4fc2adf6a5

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0, tab2, tab1 AS cor1
----
972 values hashing to 980274175fafec015a83080672486a9a

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 566180e0144350a78b0ef3318e8f4c00

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1, tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2
----
243 values hashing to 3dcd863493ac16ce594c62d4ac8b0412

query I rowsort
SELECT 15 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

query I rowsort
SELECT DISTINCT + 79 AS col1 FROM tab2, tab1 cor0, tab0 AS cor1
----
79

query I rowsort
SELECT DISTINCT - tab2.col1 AS col2 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT 59 FROM tab0 AS cor0
----
59
59
59

query I rowsort
SELECT DISTINCT - - col1 - - cor0.col1 FROM tab2 AS cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 68 * - col2 + + col1 col0 FROM tab0 cor0
----
-2158
-5485
29

query I rowsort
SELECT DISTINCT cor0.col1 * + col1 AS col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - col0 - - col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - 28 FROM tab2, tab2 AS cor0
----
9 values hashing to c3e7fa3d059fc708f03c60e9cef0c115

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0 CROSS JOIN tab2, tab0 cor1, tab1 AS cor2
----
3645 values hashing to 77ce60d8d42550cc1b5a38c7d1dc5d13

query I rowsort
SELECT DISTINCT 95 FROM tab0, tab2 AS cor0
----
95

query I rowsort
SELECT DISTINCT - 18 FROM tab2 AS cor0
----
-18

query I rowsort
SELECT DISTINCT col1 + - col2 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + 21 * - col1 + + col0 FROM tab2 cor0
----
-1161
-278
-644

query I rowsort
SELECT DISTINCT - + col2 * 65 FROM tab2 AS cor0
----
-1690
-1755
-2470

query I rowsort
SELECT + 61 AS col0 FROM tab2 AS cor0
----
61
61
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7458
SELECT + - CAST( + col2 AS SIGNED ) FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-7458
SELECT + - CAST ( + col2 AS INTEGER ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - 38 FROM tab0 AS cor0
----
-38

query I rowsort
SELECT ALL + - col0 + col2 * + col0 AS col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT + 34 * - ( col0 ) AS col0 FROM tab2 AS cor0
----
-238
-2652
-2686

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7462
SELECT DISTINCT CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7462
SELECT DISTINCT CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL col2 * - cor0.col1 * + col2 FROM tab2 cor0
----
-22599
-24548
-39884

query I rowsort
SELECT + + ( + col2 ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + ( col2 ) * col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT + col1 * - col0 AS col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col0 * - col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7468
SELECT ALL - + 17 + - col0 DIV - 32 AS col1 FROM tab2 AS cor0
----
-15
-15
-17

skipif mysql # not compatible
query I rowsort label-7468
SELECT ALL - + 17 + - col0 / - 32 AS col1 FROM tab2 AS cor0
----
-15
-15
-17

query I rowsort
SELECT + - col2 * + cor0.col0 + - col1 AS col0 FROM tab2 AS cor0
----
-2087
-220
-3019

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab0, tab1 cor1
----
972 values hashing to 2d99dda76af061a3fac120e0e49e6c53

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0 CROSS JOIN tab2 AS cor1
----
243 values hashing to 5d85c5683e3ffd6d68920690d7302f7d

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
243 values hashing to 4fe4780e49e612b93957f575d9b3e89f

query I rowsort
SELECT col2 * 37 + col2 AS col2 FROM tab2
----
1026
1444
988

query I rowsort
SELECT + - cor0.col1 + - col0 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7475
SELECT ALL - col2 DIV cor0.col0 + col1 + col0 AS col2 FROM tab1 AS cor0
----
11
74
92

skipif mysql # not compatible
query I rowsort label-7475
SELECT ALL - col2 / cor0.col0 + col1 + col0 AS col2 FROM tab1 AS cor0
----
11
74
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 34 + col2 + + col1 col0 FROM tab2 AS cor0
----
1347
969
976

query I rowsort
SELECT - - col1 + - col1 + + col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - col1 + 39 FROM tab1 AS cor0
----
13
26
29

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7479
SELECT DISTINCT cor0.col1 * - CAST( NULL AS DECIMAL ) + col1 + col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7479
SELECT DISTINCT cor0.col1 * - CAST ( NULL AS REAL ) + col1 + col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + col2 + - ( + 90 ) FROM tab1 AS cor0
----
-33
-36
6

query I rowsort
SELECT ALL col1 * col2 * col2 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT DISTINCT + col0 + - 72 + + col1 FROM tab2 cor0
----
-34
24
65

query I rowsort
SELECT - 46 * - 79 FROM tab0 AS cor0
----
3634
3634
3634

query I rowsort
SELECT ALL ( + cor0.col1 ) AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT - tab2.col0 + col1 * col0 FROM tab2
----
1264
210
4524

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab2 AS cor1, tab1, tab2 cor2
----
3645 values hashing to 4805bcb9c04e49d1f6f82defa880d751

query I rowsort
SELECT + - col2 * + ( - col1 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT 44 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 AS cor2, tab0 AS cor3
----
3645 values hashing to 5649a4f7960c0172ed0f04ca00985b50

query I rowsort
SELECT - 23 FROM tab1
----
-23
-23
-23

query I rowsort
SELECT col1 + - 65 AS col1 FROM tab2
----
-34
-48
-6

query I rowsort
SELECT DISTINCT - 35 AS col1 FROM tab2, tab1 AS cor0
----
-35

query I rowsort
SELECT + 62 * col1 AS col1 FROM tab0 AS cor0
----
5332
5642
6014

query I rowsort
SELECT ALL + 98 AS col2 FROM tab1
----
98
98
98

query I rowsort
SELECT ALL + 71 FROM tab2, tab0 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT ALL cor0.col1 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-7497
SELECT ALL 83 DIV col2 + 31 FROM tab0
----
114
32
33

skipif mysql # not compatible
query I rowsort label-7497
SELECT ALL 83 / col2 + 31 FROM tab0
----
114
32
33

query I rowsort
SELECT col0 + ( col1 ) FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT col0 * - col2 + col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT - 94 * - col0 FROM tab0
----
2256
3290
8366

query I rowsort
SELECT DISTINCT col2 * col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + col2 * + col1 + cor0.col1 * - col2 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col2 + + 58 AS col1 FROM tab0 AS cor0
----
140
59
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + 12 col1 FROM tab1 AS cor0
----
22
25
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7505
SELECT ALL + 54 DIV + tab0.col0 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 833b749ae5e53c39fb5c10fe39c8013c

skipif mysql # not compatible
query I rowsort label-7505
SELECT ALL + 54 / + tab0.col0 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 833b749ae5e53c39fb5c10fe39c8013c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7506
SELECT ALL tab0.col0 * CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7506
SELECT ALL tab0.col0 * CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * + ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col2 - ( col0 ) * - col0 AS col1 FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT + - col2 * col1 + + col0 AS col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT + - col0 * - col2 + ( - cor0.col1 * 63 ) AS col0 FROM tab2 AS cor0
----
-1689
-1764
1931

query I rowsort
SELECT DISTINCT 79 FROM tab2
----
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * 83 col2 FROM tab2
----
1411
2573
4897

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * col0 col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + - col1 * col0 * + 20 FROM tab1 AS cor0
----
-12800
-1560
-20800

query I rowsort
SELECT DISTINCT + col2 + + col0 * + cor0.col2 * ( col2 ) AS col0 FROM tab0 AS cor0
----
26169
36
598518

query I rowsort
SELECT col1 - + col2 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-7517
SELECT ALL + cor0.col2 DIV col2 + col0 col2 FROM tab0 AS cor0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7517
SELECT ALL + cor0.col2 / col2 + col0 col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT - - 99 * col2 + ( + col2 + + col1 ) AS col0 FROM tab1 AS cor0
----
5426
5710
9613

query I rowsort
SELECT DISTINCT + - 47 + + col2 * - 2 FROM tab0 cor0
----
-113
-211
-49

query I rowsort
SELECT ALL 16 * col0 AS col1 FROM tab0
----
1424
384
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7521
SELECT CAST( - col2 AS SIGNED ) + + col2 AS col2 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7521
SELECT CAST ( - col2 AS INTEGER ) + + col2 AS col2 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7522
SELECT + col2 DIV - 15 AS col1 FROM tab1 cor0
----
-3
-3
-6

skipif mysql # not compatible
query I rowsort label-7522
SELECT + col2 / - 15 AS col1 FROM tab1 cor0
----
-3
-3
-6

query I rowsort
SELECT ALL 75 * col2 FROM tab2
----
1950
2025
2850

query I rowsort
SELECT DISTINCT - 28 AS col0 FROM tab0
----
-28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7525
SELECT DISTINCT col2 * + col0 + + CAST( - ( col2 ) AS SIGNED ) AS col0 FROM tab1
----
108
3591
7584

skipif mysql # not compatible
query I rowsort label-7525
SELECT DISTINCT col2 * + col0 + + CAST ( - ( col2 ) AS INTEGER ) AS col0 FROM tab1
----
108
3591
7584

query I rowsort
SELECT + col1 + - col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT DISTINCT + 76 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
1292
2356
4484

query I rowsort
SELECT + - 94 FROM tab2 AS cor0
----
-94
-94
-94

query I rowsort
SELECT ALL 65 AS col2 FROM tab0 AS cor0
----
65
65
65

query I rowsort
SELECT DISTINCT - - 74 AS col1 FROM tab0 AS cor0
----
74

query I rowsort
SELECT DISTINCT col1 + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + cor0.col1 * col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + - col1 - + cor0.col2 * - col1 FROM tab2 cor0
----
1475
629
806

query I rowsort
SELECT - + ( col0 ) + - col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT col2 * col2 + - col2 AS col0 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT ALL col0 + ( 6 ) + + col2 AS col0 FROM tab2
----
110
123
40

query I rowsort
SELECT col2 + col0 * 10 * + col0 AS col1 FROM tab0 AS cor0
----
12251
5793
79292

query I rowsort
SELECT + cor0.col2 + + ( + 77 ) FROM tab1 cor0
----
131
134
173

query I rowsort
SELECT col2 + ( + 87 ) AS col2 FROM tab2 AS cor0
----
113
114
125

query I rowsort
SELECT + + col2 * - ( ( - col2 ) * + col1 ) AS col2 FROM tab0 AS cor0
----
611884
93654
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7541
SELECT - + col1 DIV col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-7541
SELECT - + col1 / col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT ALL cor0.col2 * 64 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 508671d5b6e60b4d0041b14769f75da2

query I rowsort
SELECT - ( col1 ) * - cor0.col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - ( col0 ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + tab0.col2 * 1 FROM tab0
----
1
33
82

query I rowsort
SELECT - ( cor0.col1 ) * - col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + col2 * + 87 AS col2 FROM tab2 AS cor0
----
2262
2349
3306

query I rowsort
SELECT DISTINCT + 58 AS col2 FROM tab2 cor0
----
58

query I rowsort
SELECT + cor2.col0 * - 1 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1, tab0 AS cor2
----
243 values hashing to 68438270ef4dcbfd48dcdbe0b98336f5

onlyif mysql # use DIV operator for integer division
query I rowsort label-7550
SELECT - + 1 + col2 * col2 DIV - col2 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-7550
SELECT - + 1 + col2 * col2 / - col2 FROM tab1 AS cor0
----
-55
-58
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7551
SELECT ( - col0 ) DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7551
SELECT ( - col0 ) / cor0.col0 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7552
SELECT DISTINCT + - col0 + + cor0.col1 DIV + col0 AS col0 FROM tab0 cor0
----
-21
-33
-88

skipif mysql # not compatible
query I rowsort label-7552
SELECT DISTINCT + - col0 + + cor0.col1 / + col0 AS col0 FROM tab0 cor0
----
-21
-33
-88

query I rowsort
SELECT + col1 * 59 FROM tab1 cor0
----
1534
590
767

onlyif mysql # use DIV operator for integer division
query I rowsort label-7554
SELECT + col0 DIV - col2 col2 FROM tab1 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7554
SELECT + col0 / - col2 col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT + 77 * tab1.col0 AS col1 FROM tab1, tab1 AS cor0
----
231
4928
6160

onlyif mysql # use DIV operator for integer division
query I rowsort label-7556
SELECT ALL - + col2 DIV col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-7556
SELECT ALL - + col2 / col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT col2 * - 5 AS col0 FROM tab0 AS cor0
----
-165
-410
-5

query I rowsort
SELECT DISTINCT - + col2 AS col0 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT ALL 18 + + 95 FROM tab0 AS cor0
----
113
113
113

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 31 col1 FROM tab1 cor0
----
31
31
31

query I rowsort
SELECT DISTINCT - - cor0.col2 * - col1 + cor0.col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT ALL + - 22 - 92 FROM tab1 AS cor0
----
-114
-114
-114

onlyif mysql # use DIV operator for integer division
query I rowsort label-7563
SELECT - - col1 DIV + col2 + col0 FROM tab0 AS cor0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-7563
SELECT - - col1 / + col2 + col0 FROM tab0 AS cor0
----
132
26
90

query I rowsort
SELECT + ( + ( col0 ) ) FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - - 44 * col0 + + cor0.col2 * cor0.col1 AS col2 FROM tab2 cor0
----
1145
4122
4966

query I rowsort
SELECT DISTINCT + 16 + + col1 * + col0 AS col0 FROM tab1 AS cor0
----
1056
656
94

query I rowsort
SELECT - - ( col0 ) * - ( col0 ) FROM tab2 cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-7568
SELECT DISTINCT 77 DIV col0 col0 FROM tab1 AS cor0
----
0
1
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7568
SELECT DISTINCT 77 / col0 col0 FROM tab1 AS cor0
----
0
1
25

query I rowsort
SELECT + 63 * + col2 AS col0 FROM tab1 AS cor0
----
3402
3591
6048

query I rowsort
SELECT DISTINCT + col1 + - col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - + col2 * + col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - - col0 * col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT 43 + + col2 FROM tab1 AS cor0
----
100
139
97

query I rowsort
SELECT DISTINCT + ( col1 ) * + col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7575
SELECT ALL col0 + - CAST( cor0.col2 AS SIGNED ) col2 FROM tab0 cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7575
SELECT ALL col0 + - CAST ( cor0.col2 AS INTEGER ) col2 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + col0 + col1 * - col0 * col0 AS col1 FROM tab0 AS cor0
----
-118790
-49512
-720722

query I rowsort
SELECT DISTINCT - + col0 * col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT col1 * 13 + 60 FROM tab0 AS cor0
----
1178
1243
1321

query I rowsort
SELECT ALL col0 * col0 + ( + col2 ) * 53 FROM tab2 AS cor0
----
1480
7462
8255

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + col1 * 33 col1 FROM tab1 AS cor0
----
266
349
855

query I rowsort
SELECT col0 + - col1 * - col0 AS col1 FROM tab0 cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-7582
SELECT DISTINCT + col2 + + col0 DIV + 47 AS col1 FROM tab0 AS cor0
----
1
33
83

skipif mysql # not compatible
query I rowsort label-7582
SELECT DISTINCT + col2 + + col0 / + 47 AS col1 FROM tab0 AS cor0
----
1
33
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-7583
SELECT - col0 * ( + 15 ) - col2 DIV col1 AS col2 FROM tab1
----
-1207
-47
-965

skipif mysql # not compatible
query I rowsort label-7583
SELECT - col0 * ( + 15 ) - col2 / col1 AS col2 FROM tab1
----
-1207
-47
-965

query I rowsort
SELECT - col0 - ( - 51 + - tab1.col0 ) AS col1 FROM tab1
----
51
51
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 * - ( + col0 ) col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL + col0 * - ( + col1 * - col1 ) + col1 * col0 * tab1.col2 AS col2 FROM tab1
----
113360
42880
6240

query I rowsort
SELECT ALL - col2 * col2 + cor0.col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT DISTINCT - col1 + col0 FROM tab0
----
-2
-62

query I rowsort
SELECT ALL col1 * - tab0.col1 * col2 + col2 AS col2 FROM tab0
----
-244035
-678960
-9408

query I rowsort
SELECT - ( - 29 * + cor0.col0 ) AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 54bc59094b2661807c1d12f560e4953b

query I rowsort
SELECT ALL + tab2.col0 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT cor0.col0 * - cor0.col1 + ( 4 ) * col0 FROM tab2 AS cor0
----
-1027
-189
-4290

onlyif mysql # use DIV operator for integer division
query I rowsort label-7593
SELECT ALL + col1 DIV col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7593
SELECT ALL + col1 / col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * col1 + cor0.col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT + ( + col0 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - col1 + + col1 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 + - col1 * - ( + col2 ) - col2 FROM tab0 AS cor0
----
-1
2719
7289

query I rowsort
SELECT + cor0.col2 * - col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7599
SELECT DISTINCT + col2 * - 22 * - col2 - - col0 DIV - col1 FROM tab1 AS cor0
----
202746
64152
71472

skipif mysql # not compatible
query I rowsort label-7599
SELECT DISTINCT + col2 * - 22 * - col2 - - col0 / - col1 FROM tab1 AS cor0
----
202746
64152
71472

query I rowsort
SELECT ALL + cor0.col1 FROM tab1, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - col2 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT + col0 * col0 + col0 FROM tab0 AS cor0
----
1260
600
8010

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab1 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 5acb69cde71208fe580e10b8b669428e

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to 4406ccc71f02ae9c1e947ffcd89b0db7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7605
SELECT - CAST( NULL AS SIGNED ) + col0 * col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7605
SELECT - CAST ( NULL AS INTEGER ) + col0 * col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 9 * - ( col2 ) FROM tab1
----
-486
-513
-864

query I rowsort
SELECT - 93 * + cor0.col1 + - col0 * cor0.col1 FROM tab1 cor0
----
-1570
-2249
-2496

query I rowsort
SELECT ALL ( tab1.col1 ) + + tab1.col2 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - ( - col2 ) col2 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL + - col2 + - col0 * col1 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT DISTINCT cor0.col2 * - col2 + cor0.col2 AS col1 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT 41 - + col0 * col0 AS col0 FROM tab1 AS cor0
----
-4055
-6359
32

query I rowsort
SELECT - ( - cor0.col0 ) - - col1 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + col0 * + 82 + + col2 FROM tab1 AS cor0
----
300
5305
6656

query I rowsort
SELECT + - 73 + - col1 FROM tab2 AS cor0
----
-104
-132
-90

query I rowsort
SELECT + 15 + + 58 * col0 FROM tab1 AS cor0
----
189
3727
4655

query I rowsort
SELECT ALL - col2 * - col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab1 AS cor0
----
43

query I rowsort
SELECT + col0 * - col2 * col2 + 83 FROM tab0 AS cor0
----
-26053
-598353
48

query I rowsort
SELECT 33 + - col1 AS col0 FROM tab2 AS cor0
----
-26
16
2

query I rowsort
SELECT ALL - 8 + col0 * - col0 FROM tab1 AS cor0
----
-17
-4104
-6408

onlyif mysql # use DIV operator for integer division
query I rowsort label-7622
SELECT DISTINCT col1 DIV - col1 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-7622
SELECT DISTINCT col1 / - col1 FROM tab2 AS cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7623
SELECT + 18 DIV col0 AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7623
SELECT + 18 / col0 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL 73 * col2 * col2 FROM tab2 cor0
----
105412
49348
53217

query I rowsort
SELECT - col1 * + col1 + + col0 AS col2 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT DISTINCT col0 * - col2 * - col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT DISTINCT - 39 * cor0.col1 - - 10 FROM tab1, tab1 AS cor0
----
-1004
-380
-497

query I rowsort
SELECT 1 * ( col2 ) + - tab0.col0 * - 18 + + col0 AS col2 FROM tab0
----
1773
489
666

query I rowsort
SELECT - cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 52 - + col0 AS col2 FROM tab0
----
-37
17
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 col2 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - - 40 + col2 FROM tab0 AS cor0
----
122
41
73

query I rowsort
SELECT ( - col2 ) + + cor0.col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT + 51 - - col1 AS col0 FROM tab2 cor0
----
110
68
82

query I rowsort
SELECT 64 FROM tab1
----
64
64
64

query I rowsort
SELECT DISTINCT col1 - col0 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-7637
SELECT ALL cor0.col1 DIV + 43 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

skipif mysql # not compatible
query I rowsort label-7637
SELECT ALL cor0.col1 / + 43 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT col1 * - col2 + + col1 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT - cor1.col0 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
-7
-78
-79

query I rowsort
SELECT - cor0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT ALL col2 * 47 FROM tab2 AS cor0
----
1222
1269
1786

query I rowsort
SELECT + - col1 * + col2 * - col2 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT 8 * - col0 * col2 FROM tab1
----
-1296
-29184
-61440

query I rowsort
SELECT col2 * - col0 AS col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT - col0 * col2 AS col1 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + col2 * + col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT 81 FROM tab2
----
81
81
81

query I rowsort
SELECT 73 * - col1 AS col1 FROM tab1
----
-1898
-730
-949

query I rowsort
SELECT - col2 * 72 FROM tab0 AS cor0
----
-2376
-5904
-72

query I rowsort
SELECT + + ( 3 ) FROM tab2 cor0
----
3
3
3

query I rowsort
SELECT col1 + tab2.col1 AS col1 FROM tab2
----
118
34
62

query I rowsort
SELECT - col2 + ( - tab0.col2 ) FROM tab0
----
-164
-2
-66

query I rowsort
SELECT col0 * - tab0.col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT 39 * - col1 + col2 FROM tab1 cor0
----
-333
-411
-960

query I rowsort
SELECT ALL + 92 + col0 * - col0 FROM tab1 AS cor0
----
-4004
-6308
83

query I rowsort
SELECT + + 42 * + col2 FROM tab0 AS cor0
----
1386
3444
42

query I rowsort
SELECT ALL - + col0 * - col1 - col2 * + 76 FROM tab1 AS cor0
----
-3692
-4026
-6256

query I rowsort
SELECT + cor1.col2 + 33 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 357bd6a471f34f03eb3de2be9cd34b3d

query I rowsort
SELECT ALL + ( col1 ) * cor0.col0 - - col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT - 87 * col0 FROM tab2 AS cor0
----
-609
-6786
-6873

query I rowsort
SELECT - 51 * col1 AS col0 FROM tab1 AS cor0
----
-1326
-510
-663

query I rowsort
SELECT ALL col1 + + 74 FROM tab0 AS cor0
----
160
165
171

query I rowsort
SELECT ALL ( cor0.col1 ) * col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - - 8 + col1 FROM tab2 AS cor0
----
25
39
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-7665
SELECT - col0 DIV cor0.col1 FROM tab1 cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-7665
SELECT - col0 / cor0.col1 FROM tab1 cor0
----
-6
-6
0

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT DISTINCT + - cor0.col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + 55 * - col2 FROM tab2 AS cor0
----
-1430
-1485
-2090

query I rowsort
SELECT ( - cor0.col0 ) + - col1 FROM tab1 AS cor0
----
-29
-74
-93

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab0 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 90e25bbdedfdeba1119139dab203aeea

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + 71 * + col0 FROM tab2 AS cor0
----
497
5538
5609

query I rowsort
SELECT ALL 91 FROM tab2 AS cor0
----
91
91
91

query I rowsort
SELECT - + 24 * + col0 FROM tab2 AS cor0
----
-168
-1872
-1896

query I rowsort
SELECT ALL + 76 * col1 FROM tab2 AS cor0
----
1292
2356
4484

query I rowsort
SELECT DISTINCT - col0 * + col1 AS col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL + col1 * col1 * col2 AS col2 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT ALL + 43 AS col2 FROM tab2
----
43
43
43

query I rowsort
SELECT ALL col2 + + col1 FROM tab1 cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 col1 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7681
SELECT DISTINCT - col0 * col2 + + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7681
SELECT DISTINCT - col0 * col2 + + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + - col1 * col2 + - cor0.col2 * + col0 FROM tab0 AS cor0
----
-132
-14760
-3630

query I rowsort
SELECT DISTINCT - - col0 * - col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + 79 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7685
SELECT CAST( NULL AS SIGNED ) + col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7685
SELECT CAST ( NULL AS INTEGER ) + col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7686
SELECT + col2 + - 52 DIV + 66 AS col0 FROM tab2 cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-7686
SELECT + col2 + - 52 / + 66 AS col0 FROM tab2 cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7687
SELECT ALL col0 DIV col1 + + col1 + col2 * + col0 * + 93 FROM tab1 AS cor0
----
15092
339280
714259

skipif mysql # not compatible
query I rowsort label-7687
SELECT ALL col0 / col1 + + col1 + col2 * + col0 * + 93 FROM tab1 AS cor0
----
15092
339280
714259

query I rowsort
SELECT tab2.col2 AS col1 FROM tab2, tab0, tab2 cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT 36 * + tab1.col2 * + 18 AS col2 FROM tab1, tab0, tab0 cor0
----
27 values hashing to 8bde2e29cbb8a6eee528325dbc9ab280

query I rowsort
SELECT ALL col0 + + ( + col2 ) - col0 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col0 col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - col2 - - col0 FROM tab1 cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7693
SELECT ALL col1 + + cor0.col0 DIV + 33 FROM tab1 AS cor0
----
11
15
26

skipif mysql # not compatible
query I rowsort label-7693
SELECT ALL col1 + + cor0.col0 / + 33 FROM tab1 AS cor0
----
11
15
26

query I rowsort
SELECT ALL + + cor0.col2 AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT col1 * + cor0.col1 + - 86 AS col0 FROM tab1 AS cor0
----
14
590
83

query I rowsort
SELECT DISTINCT - col2 + + cor0.col0 * col0 AS col2 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT DISTINCT col0 - - tab0.col0 FROM tab0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-7698
SELECT 15 + + col2 * ( col2 * + col0 ) + - 98 DIV col1 col0 FROM tab1
----
207942
737288
8760

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7698
SELECT 15 + + col2 * ( col2 * + col0 ) + - 98 / col1 col0 FROM tab1
----
207942
737288
8760

query I rowsort
SELECT tab1.col2 * col1 - + ( - tab1.col2 ) FROM tab1
----
1344
1458
627

query I rowsort
SELECT DISTINCT 56 - col2 * + 72 AS col2 FROM tab2
----
-1816
-1888
-2680

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to caf6adb9936510208f5945a7e5c76f14

query I rowsort
SELECT DISTINCT ( 84 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
84

query I rowsort
SELECT DISTINCT - col0 * - 56 + - 15 AS col1 FROM tab2 AS cor0
----
377
4353
4409

query I rowsort
SELECT - tab2.col1 * + col2 AS col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - col0 + + 48 AS col0 FROM tab1 AS cor0
----
-16
-32
45

query I rowsort
SELECT + + col1 * 23 + col2 AS col1 FROM tab2 AS cor0
----
1383
429
740

query I rowsort
SELECT + col0 - 18 * - tab1.col1 * + col1 AS col1 FROM tab1
----
12171
1864
3122

query I rowsort
SELECT + + 11 * + col2 AS col2 FROM tab0 cor0
----
11
363
902

query I rowsort
SELECT DISTINCT - tab0.col0 + + tab0.col1 * col1 FROM tab0
----
7372
8192
9374

query I rowsort
SELECT - col1 * col2 + + col2 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT + col0 * 46 AS col2 FROM tab0
----
1104
1610
4094

query I rowsort
SELECT col0 - + col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT col2 * + col2 AS col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT - cor0.col0 + ( + cor0.col0 ) AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - tab0.col2 + 78 AS col2 FROM tab0
----
-4
45
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + 0 col1 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL - ( + col0 ) + col1 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT 21 * - col0 + + col2 FROM tab1 AS cor0
----
-1287
-1584
-9

query I rowsort
SELECT ALL - col0 + col2 * - col0 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT - - 88 * col0 FROM tab1 cor0
----
264
5632
7040

query I rowsort
SELECT ALL + 68 * - ( col1 ) - col0 FROM tab2 AS cor0
----
-1235
-2115
-4090

query I rowsort
SELECT - cor0.col0 + cor0.col2 FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 * col2 col1 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7724
SELECT ALL - - col1 * - col0 + - 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-7724
SELECT ALL - - col1 * - col0 + - col0 * CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * + col1 FROM tab1
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * 89 col0 FROM tab0 AS cor0
----
-2136
-3115
-7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7727
SELECT - CAST( + 81 AS SIGNED ) + + col2 FROM tab1 AS cor0
----
-24
-27
15

skipif mysql # not compatible
query I rowsort label-7727
SELECT - CAST ( + 81 AS INTEGER ) + + col2 FROM tab1 AS cor0
----
-24
-27
15

query I rowsort
SELECT ALL - col0 + + col1 + col2 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT DISTINCT 74 + 55 FROM tab2 cor0
----
129

query I rowsort
SELECT 47 AS col0 FROM tab2 AS cor0
----
47
47
47

query I rowsort
SELECT ALL + 66 AS col2 FROM tab1 AS cor0
----
66
66
66

query I rowsort
SELECT + col1 + col1 AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - 33 FROM tab2 cor0
----
-33

query I rowsort
SELECT + 44 FROM tab1 AS cor0
----
44
44
44

query I rowsort
SELECT + 59 AS col0 FROM tab2 AS cor0
----
59
59
59

query I rowsort
SELECT DISTINCT + col1 + 80 FROM tab0 AS cor0
----
166
171
177

query I rowsort
SELECT ALL - 86 * ( cor0.col1 ) + - 70 * + cor0.col0 * col1 AS col0 FROM tab0 AS cor0
----
-151876
-245992
-574756

query I rowsort
SELECT cor0.col0 * 98 + col1 FROM tab0 cor0
----
2438
3527
8813

query I rowsort
SELECT ALL + + ( + col1 ) + + col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT DISTINCT ( col0 ) - + col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL - - 63 * col1 FROM tab1 AS cor0
----
1638
630
819

query I rowsort
SELECT ALL 33 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT DISTINCT 87 AS col1 FROM tab2 AS cor0
----
87

query I rowsort
SELECT ALL 9 AS col0 FROM tab2 cor0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 88 col0 FROM tab2 AS cor0
----
88
88
88

query I rowsort
SELECT ALL + + cor0.col1 + col2 * - col0 * col1 AS col2 FROM tab2 cor0
----
-119593
-51017
-5828

query I rowsort
SELECT ALL + col1 * cor0.col0 + - col2 * + col0 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT DISTINCT + col2 * - col1 * - 63 AS col2 FROM tab2 AS cor0
----
40698
52731
96642

onlyif mysql # use DIV operator for integer division
query I rowsort label-7749
SELECT DISTINCT - - col0 DIV cor0.col0 AS col1 FROM tab2 cor0
----
1

skipif mysql # not compatible
query I rowsort label-7749
SELECT DISTINCT - - col0 / cor0.col0 AS col1 FROM tab2 cor0
----
1

query I rowsort
SELECT - + col0 * col1 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + cor0.col0 * + col1 * 71 FROM tab0 AS cor0
----
146544
241045
575029

onlyif mysql # use DIV operator for integer division
query I rowsort label-7752
SELECT DISTINCT + + col0 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-7752
SELECT DISTINCT + + col0 / cor0.col0 AS col0 FROM tab0 AS cor0
----
1

query I rowsort
SELECT DISTINCT - - cor0.col1 * - 96 - col2 * col0 AS col1 FROM tab2 AS cor0
----
-3165
-4634
-7692

query I rowsort
SELECT col2 * ( + ( + col1 ) ) + - col0 AS col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ALL col2 + col1 - + cor0.col0 FROM tab0 AS cor0
----
63
84
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-7756
SELECT ALL col1 DIV + col0 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-7756
SELECT ALL col1 / + col0 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT ALL + col2 * 55 AS col2 FROM tab1 AS cor0
----
2970
3135
5280

query I rowsort
SELECT DISTINCT col0 * + col2 AS col0 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7759
SELECT col1 + + col1 - + col0 DIV col0 AS col1 FROM tab0 AS cor0
----
171
181
193

skipif mysql # not compatible
query I rowsort label-7759
SELECT col1 + + col1 - + col0 / col0 AS col1 FROM tab0 AS cor0
----
171
181
193

query I rowsort
SELECT col0 + col1 + - ( + col0 ) FROM tab1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7761
SELECT ALL - + cor0.col1 + CAST( col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-7761
SELECT ALL - + cor0.col1 + CAST ( col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - cor0.col1 + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - col2 * - col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col1 + cor0.col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - + 7 * - col1 + cor0.col2 AS col1 FROM tab1 AS cor0
----
127
187
236

query I rowsort
SELECT + - col2 + + col0 * cor0.col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT 41 AS col2 FROM tab1, tab0, tab2 AS cor0
----
41

query I rowsort
SELECT ALL tab0.col2 * col0 + - col1 * - 76 FROM tab0
----
14214
7328
7407

query I rowsort
SELECT col1 + tab2.col0 + col1 * col1 AS col1 FROM tab2
----
3618
385
999

query I rowsort
SELECT DISTINCT 20 + - col2 AS col2 FROM tab1
----
-34
-37
-76

query I rowsort
SELECT + col2 + - col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT 9 + col2 * tab2.col1 + - col1 FROM tab2
----
1484
638
815

query I rowsort
SELECT ( - col2 * - tab2.col1 ) AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL - tab1.col2 + 84 FROM tab1, tab0 AS cor0
----
9 values hashing to 94f0694196ba0536fe9eb368beb41ef3

query I rowsort
SELECT 35 + col0 * - ( tab2.col0 ) AS col2 FROM tab2
----
-14
-6049
-6206

query I rowsort
SELECT DISTINCT - col0 * - col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + col2 * col0 * 55 + - col2 AS col1 FROM tab2 AS cor0
----
10368
111514
165072

query I rowsort
SELECT + - 75 AS col0 FROM tab2 AS cor0
----
-75
-75
-75

onlyif mysql # use DIV operator for integer division
query I rowsort label-7779
SELECT - col1 + - col2 DIV CAST( cor0.col0 * - col0 AS SIGNED ) FROM tab2 cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-7779
SELECT - col1 + - col2 / CAST ( cor0.col0 * - col0 AS INTEGER ) FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL col2 + - col1 * - cor0.col2 * - cor0.col0 FROM tab1 cor0
----
-36423
-4158
-99744

query I rowsort
SELECT DISTINCT + + 84 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
84

query I rowsort
SELECT DISTINCT - col0 * col2 AS col1 FROM tab0
----
-35
-7298
-792

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

query I rowsort
SELECT col1 * - 87 * col0 - col1 FROM tab1 AS cor0
----
-55690
-6812
-90493

query I rowsort
SELECT ALL 38 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT + ( 20 ) + col2 AS col2 FROM tab1 AS cor0
----
116
74
77

query I rowsort
SELECT ALL 91 AS col0 FROM tab1
----
91
91
91

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 cor0, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to d222ba302bd1ddd1c8b2ddf1a4d0b07a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col0 col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT col0 * cor0.col1 - col1 FROM tab1 AS cor0
----
1027
52
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-7791
SELECT ALL + 43 DIV ( + col2 * - 31 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7791
SELECT ALL + 43 / ( + col2 * - 31 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - - 97 + col1 AS col2 FROM tab1 AS cor0
----
107
110
123

query I rowsort
SELECT + col1 * - cor0.col0 + - cor0.col1 AS col0 FROM tab0 cor0
----
-2150
-3492
-8190

query I rowsort
SELECT DISTINCT + col1 + ( col0 ) AS col2 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT - 56 - + tab0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to cca8da2bf4686a850a8c16783d4990b8

query I rowsort
SELECT DISTINCT - 36 AS col2 FROM tab2, tab1 AS cor0
----
-36

query I rowsort
SELECT DISTINCT - 24 AS col1 FROM tab0
----
-24

query I rowsort
SELECT 90 FROM tab2, tab0 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

onlyif mysql # use DIV operator for integer division
query I rowsort label-7799
SELECT + 51 DIV + col2 FROM tab0
----
0
1
51

skipif mysql # not compatible
query I rowsort label-7799
SELECT + 51 / + col2 FROM tab0
----
0
1
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-7800
SELECT ALL tab0.col1 DIV - 2 AS col2 FROM tab0
----
-43
-45
-48

skipif mysql # not compatible
query I rowsort label-7800
SELECT ALL tab0.col1 / - 2 AS col2 FROM tab0
----
-43
-45
-48

query I rowsort
SELECT - 17 * + 95 FROM tab0 AS cor0
----
-1615
-1615
-1615

query I rowsort
SELECT 86 FROM tab0 cor0
----
86
86
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-7803
SELECT - ( - 86 ) DIV - col1 AS col1 FROM tab1 AS cor0
----
-3
-6
-8

skipif mysql # not compatible
query I rowsort label-7803
SELECT - ( - 86 ) / - col1 AS col1 FROM tab1 AS cor0
----
-3
-6
-8

query I rowsort
SELECT ( - col0 ) * col0 * - col2 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT col0 + - col2 AS col1 FROM tab1
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT 0 - col0 FROM tab2
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col0 col2 FROM tab2
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7809
SELECT + ( col2 ) * CAST( NULL AS SIGNED ) - col0 * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7809
SELECT + ( col2 ) * CAST ( NULL AS INTEGER ) - col0 * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 27 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

query I rowsort
SELECT 78 * - col2 - col2 FROM tab0 AS cor0
----
-2607
-6478
-79

query I rowsort
SELECT + - 81 - - col1 FROM tab2 AS cor0
----
-22
-50
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-7813
SELECT + col0 DIV - ( - col2 ) FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7813
SELECT + col0 / - ( - col2 ) FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT - col0 * 14 FROM tab2 AS cor0
----
-1092
-1106
-98

query I rowsort
SELECT col1 * - 80 AS col0 FROM tab1 AS cor0
----
-1040
-2080
-800

query I rowsort
SELECT - - 29 * 17 * + col2 AS col0 FROM tab2 AS cor0
----
12818
13311
18734

query I rowsort
SELECT - col0 * - 48 * col0 FROM tab2 AS cor0
----
2352
292032
299568

query I rowsort
SELECT + ( 0 ) * col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT + - col1 * - 98 AS col0 FROM tab0 cor0
----
8428
8918
9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7820
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7820
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL 19 FROM tab0, tab0 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT DISTINCT col2 * ( + 56 ) AS col2 FROM tab2
----
1456
1512
2128

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7823
SELECT DISTINCT - 68 + col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7823
SELECT DISTINCT - 68 + col0 * CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL

query I rowsort
SELECT - 3 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-29
-30
-41

query I rowsort
SELECT - + col2 * - col2 * 39 + col2 + - col2 * col2 FROM tab1 cor0
----
110862
123519
350304

query I rowsort
SELECT DISTINCT col2 * tab1.col1 * - col1 + tab1.col2 + + col1 * ( 86 ) AS col0 FROM tab1
----
-15010
-34214
-4783

query I rowsort
SELECT ALL ( - tab0.col1 ) + col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - col1 * + col1 + 31 * + col1 FROM tab1 AS cor0
----
130
210
234

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7829
SELECT - 15 + col1 * + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7829
SELECT - 15 + col1 * + CAST ( NULL AS REAL ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 + cor0.col1 * - 82 AS col2 FROM tab0 AS cor0
----
-7138
-7553
-8051

query I rowsort
SELECT DISTINCT + col1 + - col0 AS col0 FROM tab2 cor0
----
-19
-62
24

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0, tab0 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to ba0381921410f59519cc658d8e65eee3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7833
SELECT + col0 * - col0 + CAST( col1 AS SIGNED ) * + cor0.col2 FROM tab2 AS cor0
----
-4550
-5595
788

skipif mysql # not compatible
query I rowsort label-7833
SELECT + col0 * - col0 + CAST ( col1 AS INTEGER ) * + cor0.col2 FROM tab2 AS cor0
----
-4550
-5595
788

query I rowsort
SELECT ALL 65 AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT ALL - - col0 * + cor0.col1 + + col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - ( col0 * col1 ) col0 FROM tab0 AS cor0
----
-177504
-329315
-737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col2 + 86 * - col1 * + col0 col1 FROM tab2 AS cor0
----
-115536
-18689
-395798

onlyif mysql # use DIV operator for integer division
query I rowsort label-7838
SELECT DISTINCT + - col1 DIV + cor0.col1 FROM tab2 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-7838
SELECT DISTINCT + - col1 / + cor0.col1 FROM tab2 cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7839
SELECT - cor0.col0 DIV 24 FROM tab2 AS cor0
----
-3
-3
0

skipif mysql # not compatible
query I rowsort label-7839
SELECT - cor0.col0 / 24 FROM tab2 AS cor0
----
-3
-3
0

query I rowsort
SELECT ALL col2 * + 2 AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + - col2 * col1 * - col2 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT DISTINCT col0 * + col0 + - col1 * + col1 + 91 FROM tab1 AS cor0
----
-576
4087
6322

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7843
SELECT - col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7843
SELECT - col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col2 AS col1 FROM tab2 cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7845
SELECT DISTINCT + col2 DIV - tab2.col0 AS col0 FROM tab2
----
-3
0

skipif mysql # not compatible
query I rowsort label-7845
SELECT DISTINCT + col2 / - tab2.col0 AS col0 FROM tab2
----
-3
0

query I rowsort
SELECT - 77 FROM tab2
----
-77
-77
-77

query I rowsort
SELECT - 4 FROM tab1, tab0, tab0 cor0
----
27 values hashing to 39ed23475412c3cbba02ecdd2d7018e6

query I rowsort
SELECT DISTINCT col1 * tab1.col0 AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT + ( + col2 ) + col2 * - 1 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7850
SELECT - 0 DIV col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7850
SELECT - 0 / col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 51 * + cor0.col0 + col1 - - 74 FROM tab1 AS cor0
----
-3180
-3993
-53

query I rowsort
SELECT DISTINCT - col1 * + col1 + col0 * - col0 AS col2 FROM tab1 AS cor0
----
-4196
-6569
-685

query I rowsort
SELECT ALL - ( + col1 ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT 95 + + col0 AS col1 FROM tab1 AS cor0
----
159
175
98

query I rowsort
SELECT - 54 + 55 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT + ( cor0.col0 ) + - col1 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT col0 + 67 AS col1 FROM tab0 AS cor0
----
102
156
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col0 ) + - col0 col1 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL - col2 * col2 FROM tab2 cor0
----
-1444
-676
-729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7860
SELECT CAST( NULL AS SIGNED ) + col0 * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7860
SELECT CAST ( NULL AS INTEGER ) + col0 * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 72 + col1 col1 FROM tab1 AS cor0
----
82
85
98

query I rowsort
SELECT - col0 + 54 FROM tab2 AS cor0
----
-24
-25
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-7863
SELECT ALL cor0.col1 DIV + 8 FROM tab1 AS cor0
----
1
1
3

skipif mysql # not compatible
query I rowsort label-7863
SELECT ALL cor0.col1 / + 8 FROM tab1 AS cor0
----
1
1
3

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
3645 values hashing to 7e665e04e6102323f69d70091871d1d2

query I rowsort
SELECT DISTINCT - 31 FROM tab0
----
-31

query I rowsort
SELECT DISTINCT + - col1 AS col2 FROM tab1 cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 9 col1 FROM tab2 AS cor0
----
-9
-9
-9

query I rowsort
SELECT + col2 * - cor0.col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-7869
SELECT + - col1 DIV - col0 - - col1 * col0 AS col1 FROM tab1 cor0
----
1040
640
86

skipif mysql # not compatible
query I rowsort label-7869
SELECT + - col1 / - col0 - - col1 * col0 AS col1 FROM tab1 cor0
----
1040
640
86

query I rowsort
SELECT 97 AS col2 FROM tab1 AS cor0
----
97
97
97

query I rowsort
SELECT DISTINCT + col0 + cor0.col1 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT col1 * + ( col2 ) + 38 AS col0 FROM tab2
----
1572
684
875

query I rowsort
SELECT DISTINCT + ( col1 ) * + ( col1 ) - + col2 * - col2 AS col0 FROM tab0 AS cor0
----
15005
8485
9410

query I rowsort
SELECT + col2 - col1 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT - + cor0.col1 AS col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL - + col2 + col2 * col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT - col1 + - col2 AS col2 FROM tab0
----
-119
-173
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7878
SELECT col0 DIV + col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-7878
SELECT col0 / + col1 FROM tab2
----
0
1
4

query I rowsort
SELECT ALL tab2.col2 + 45 AS col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 318ffd27a1e72361ab672863018de2a2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7880
SELECT + CAST( NULL AS SIGNED ) / col2 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7880
SELECT + CAST ( NULL AS INTEGER ) / col2 AS col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7881
SELECT ALL - col2 * col1 DIV col1 - col2 * + 43 * col2 AS col1 FROM tab2
----
-29094
-31374
-62130

skipif mysql # not compatible
query I rowsort label-7881
SELECT ALL - col2 * col1 / col1 - col2 * + 43 * col2 AS col1 FROM tab2
----
-29094
-31374
-62130

query I rowsort
SELECT + 75 + col2 - - col0 * col1 FROM tab0
----
2172
3471
8256

query I rowsort
SELECT - 40 + - col0 FROM tab2
----
-118
-119
-47

query I rowsort
SELECT 90 + + 7 * + col1 - col1 AS col0 FROM tab1
----
150
168
246

query I rowsort
SELECT col1 + - col1 * col2 AS col2 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT - cor0.col0 * col2 + 24 AS col2 FROM tab0 AS cor0
----
-11
-7274
-768

query I rowsort
SELECT DISTINCT + - col1 * + col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + cor0.col2 + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL + + 40 * + col0 - ( ( cor0.col2 ) ) FROM tab1 AS cor0
----
2503
3104
66

query I rowsort
SELECT DISTINCT - 81 AS col1 FROM tab0 cor0
----
-81

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col0 * - col2 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-7892
SELECT ALL col1 - col2 * col1 DIV col1 FROM tab0 AS cor0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-7892
SELECT ALL col1 - col2 * col1 / col1 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7893
SELECT ALL + 16 + - col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7893
SELECT ALL + 16 + - col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 77 AS col1 FROM tab0 cor0
----
77
77
77

query I rowsort
SELECT ALL + col2 - col1 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT - 1 AS col1 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT + col0 + col1 AS col2 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT ALL - 7 + col1 * + col0 * + 56 FROM tab0 AS cor0
----
115577
190113
453537

query I rowsort
SELECT DISTINCT 7 + col1 + + 22 * col1 * - col0 FROM tab0 AS cor0
----
-178080
-45315
-74586

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1 cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 AS cor2, tab2 AS cor3
----
243 values hashing to dba0629212dd6bf03c2834a27d0b07fb

onlyif mysql # use DIV operator for integer division
query I rowsort label-7901
SELECT + col2 * - col0 + - col1 DIV col0 FROM tab1
----
-170
-3648
-7680

skipif mysql # not compatible
query I rowsort label-7901
SELECT + col2 * - col0 + - col1 / col0 FROM tab1
----
-170
-3648
-7680

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 AS cor2, tab0 AS cor3
----
3645 values hashing to 3b4587ab6c08d2179c6df094d2f76ad7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 12 col2 FROM tab0 AS cor0
----
13
45
94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7904
SELECT + col1 * CAST( NULL AS SIGNED ) / col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7904
SELECT + col1 * CAST ( NULL AS INTEGER ) / col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( - col0 ) * col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + + col2 + + 76 * col2 FROM tab1 AS cor0
----
4158
4389
7392

query I rowsort
SELECT ALL + 37 * ( col1 ) AS col2 FROM tab0 cor0
----
3182
3367
3589

query I rowsort
SELECT ALL + 12 * + ( col0 ) + - col2 AS col1 FROM tab0 AS cor0
----
255
419
986

query I rowsort
SELECT col2 + col2 + - col1 FROM tab1
----
104
179
82

query I rowsort
SELECT 40 FROM tab1
----
40
40
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 3 col0 FROM tab0 AS cor0
----
3
3
3

query I rowsort
SELECT DISTINCT 94 AS col2 FROM tab1 AS cor0
----
94

query I rowsort
SELECT ALL - + ( 20 ) * + col0 AS col0 FROM tab2 cor0
----
-140
-1560
-1580

query I rowsort
SELECT DISTINCT col1 + cor0.col2 FROM tab2 AS cor0
----
55
58
85

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0, tab2 cor1, tab2 AS cor2
----
972 values hashing to 82def1c3361e635dd4cf447edc22edb9

query I rowsort
SELECT col2 * col2 + + ( col1 ) FROM tab2 AS cor0
----
1461
735
760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7917
SELECT DISTINCT cor0.col1 * CAST( col2 AS SIGNED ) col0 FROM tab2 cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7917
SELECT DISTINCT cor0.col1 * CAST ( col2 AS INTEGER ) col0 FROM tab2 cor0
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7918
SELECT + col2 + - CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
28
47
83

skipif mysql # not compatible
query I rowsort label-7918
SELECT + col2 + - CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT col1 * - 75 AS col2 FROM tab0 AS cor0
----
-6450
-6825
-7275

query I rowsort
SELECT - 98 FROM tab0, tab0 AS cor0
----
9 values hashing to f17b7008a7deae1eb5a2e707ec237638

query I rowsort
SELECT col1 * tab2.col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT + cor0.col0 * col1 FROM tab2 cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col0 + col0 - cor0.col0 * - 21 col2 FROM tab1 cor0
----
-12
720
768

query I rowsort
SELECT + col2 * - col2 + - ( + col1 + cor0.col2 ) * col1 FROM tab2 AS cor0
----
-2379
-2527
-5691

query I rowsort
SELECT DISTINCT + col1 + - col0 AS col0 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-7926
SELECT col0 DIV 37 + - col1 AS col1 FROM tab2 AS cor0
----
-15
-31
-57

skipif mysql # not compatible
query I rowsort label-7926
SELECT col0 / 37 + - col1 AS col1 FROM tab2 AS cor0
----
-15
-31
-57

query I rowsort
SELECT - 10 * col1 + col1 AS col1 FROM tab1 AS cor0
----
-117
-234
-90

query I rowsort
SELECT - cor0.col0 * - cor0.col0 + col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT DISTINCT 90 * + 17 * tab0.col0 FROM tab0, tab1 AS cor0
----
136170
36720
53550

query I rowsort
SELECT + cor0.col2 + col1 * col2 * + col1 AS col0 FROM tab0 AS cor0
----
244101
679124
9410

query I rowsort
SELECT tab0.col0 * + 30 FROM tab0
----
1050
2670
720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col0 col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL tab0.col2 * ( col0 ) + + col0 AS col2 FROM tab0
----
70
7387
816

query I rowsort
SELECT cor0.col2 + + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - + cor0.col2 * col1 + + 54 FROM tab1 AS cor0
----
-1194
-1350
-516

query I rowsort
SELECT - col2 * col2 + col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-7937
SELECT DISTINCT - + col1 * - col2 + + col2 DIV 12 AS col1 FROM tab1 AS cor0
----
1256
1408
574

skipif mysql # not compatible
query I rowsort label-7937
SELECT DISTINCT - + col1 * - col2 + + col2 / 12 AS col1 FROM tab1 AS cor0
----
1256
1408
574

query I rowsort
SELECT DISTINCT - + 49 AS col2 FROM tab1 AS cor0
----
-49

query I rowsort
SELECT - ( - 22 ) + - col0 FROM tab1
----
-42
-58
19

query I rowsort
SELECT - ( - tab2.col0 * + col1 ) FROM tab2
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7941
SELECT DISTINCT CAST( col1 AS SIGNED ) AS col0 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-7941
SELECT DISTINCT CAST ( col1 AS INTEGER ) AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT col0 + + col2 AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL 8 AS col2 FROM tab2, tab0, tab0 cor0
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

query I rowsort
SELECT DISTINCT 96 FROM tab2
----
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7945
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-7945
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT + + 47 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT ALL 21 * - col2 AS col0 FROM tab0
----
-1722
-21
-693

query I rowsort
SELECT + col1 - col2 AS col2 FROM tab0
----
53
9
96

query I rowsort
SELECT ALL - tab0.col0 * 42 FROM tab0
----
-1008
-1470
-3738

query I rowsort
SELECT ALL 39 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT DISTINCT 68 FROM tab2, tab2 cor0
----
68

query I rowsort
SELECT - - cor0.col2 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL tab1.col0 * + 79 * col1 FROM tab1
----
50560
6162
82160

query I rowsort
SELECT col0 * - 31 FROM tab0
----
-1085
-2759
-744

onlyif mysql # use DIV operator for integer division
query I rowsort label-7955
SELECT - col2 * col2 + - col0 DIV - col1 AS col0 FROM tab0 cor0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-7955
SELECT - col2 * col2 + - col0 / - col1 AS col0 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT - + col2 * col0 + col0 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7957
SELECT CAST( NULL AS SIGNED ) * - 10 * col0 + ( - cor0.col1 ) * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7957
SELECT CAST ( NULL AS INTEGER ) * - 10 * col0 + ( - cor0.col1 ) * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query IIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 WHERE NOT ( NULL ) < NULL
----

query I rowsort
SELECT ALL + - col2 * - col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - + col2 + + col0 AS col0 FROM tab0 AS cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 + col0 col2 FROM tab2 cor0
----
134
135
63

query I rowsort
SELECT - 91 + - col0 * - col0 AS col2 FROM tab1 AS cor0
----
-82
4005
6309

query I rowsort
SELECT 10 + col2 * - 32 AS col0 FROM tab0 AS cor0
----
-1046
-22
-2614

query I rowsort
SELECT - col0 + col0 * cor0.col2 FROM tab1 AS cor0
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-7965
SELECT 75 DIV col1 FROM tab2 AS cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-7965
SELECT 75 / col1 FROM tab2 AS cor0
----
1
2
4

query I rowsort
SELECT + 59 FROM tab2 AS cor0
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 84 * col2 * + col0 col1 FROM tab0
----
2940
613032
66528

onlyif mysql # use DIV operator for integer division
query I rowsort label-7968
SELECT ALL + 25 DIV 40 col0 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7968
SELECT ALL + 25 / 40 col0 FROM tab2
----
0
0
0

query I rowsort
SELECT 77 * + col1 * 92 AS col1 FROM tab0 cor0
----
609224
644644
687148

query I rowsort
SELECT 78 * - col1 * 76 FROM tab1 AS cor0
----
-154128
-59280
-77064

query I rowsort
SELECT - - col1 * - col2 FROM tab0 cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7972
SELECT col0 + + col0 DIV - 29 col0 FROM tab2
----
7
76
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7972
SELECT col0 + + col0 / - 29 col0 FROM tab2
----
7
76
77

query I rowsort
SELECT DISTINCT + col2 - - col2 FROM tab0
----
164
2
66

query I rowsort
SELECT DISTINCT - + col1 - col2 * cor0.col2 AS col1 FROM tab2 AS cor0
----
-1461
-735
-760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * 36 + col2 col2 FROM tab2
----
-1330
-910
-945

onlyif mysql # use DIV operator for integer division
query I rowsort label-7976
SELECT ALL col2 DIV col2 + ( col0 ) AS col2 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-7976
SELECT ALL col2 / col2 + ( col0 ) AS col2 FROM tab1
----
4
65
81

query I rowsort
SELECT - - col1 - 52 FROM tab0 cor0
----
34
39
45

query I rowsort
SELECT ALL - tab1.col2 - + col0 AS col2 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT ALL 25 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT col2 * - col1 + col2 * - 52 FROM tab2 cor0
----
-2241
-2622
-2886

query I rowsort
SELECT ALL + col2 + - cor0.col2 + - col2 * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - 82 FROM tab1, tab0 AS cor0
----
9 values hashing to f800b0aad28b82b2deb67f7045c9a45c

onlyif mysql # use DIV operator for integer division
query I rowsort label-7983
SELECT ALL - col1 + col1 DIV col1 AS col0 FROM tab2
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-7983
SELECT ALL - col1 + col1 / col1 AS col0 FROM tab2
----
-16
-30
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-7984
SELECT DISTINCT + ( ( + tab1.col1 ) ) * + col0 + + 32 DIV - col1 AS col2 FROM tab1
----
1038
637
77

skipif mysql # not compatible
query I rowsort label-7984
SELECT DISTINCT + ( ( + tab1.col1 ) ) * + col0 + + 32 / - col1 AS col2 FROM tab1
----
1038
637
77

query I rowsort
SELECT ALL - col1 * col1 + - col0 * + col1 FROM tab2
----
-1178
-1632
-8083

query I rowsort
SELECT ALL + 71 + 44 FROM tab2
----
115
115
115

onlyif mysql # use DIV operator for integer division
query I rowsort label-7987
SELECT DISTINCT 55 + - cor0.col1 + - col0 DIV - ( - col0 ) col1 FROM tab0 cor0
----
-32
-37
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7987
SELECT DISTINCT 55 + - cor0.col1 + - col0 / - ( - col0 ) col1 FROM tab0 cor0
----
-32
-37
-43

query I rowsort
SELECT ALL + - col1 - - cor0.col2 AS col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT - ( col0 ) + + cor0.col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL + ( + col2 ) AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL 21 * - col0 + col0 FROM tab2 AS cor0
----
-140
-1560
-1580

query I rowsort
SELECT + cor0.col1 * col1 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT ALL + ( col1 ) * cor0.col2 - + col1 AS col2 FROM tab1 AS cor0
----
1235
1378
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7994
SELECT + CAST( 84 AS SIGNED ) + - col2 AS col2 FROM tab1 AS cor0
----
-12
27
30

skipif mysql # not compatible
query I rowsort label-7994
SELECT + CAST ( 84 AS INTEGER ) + - col2 AS col2 FROM tab1 AS cor0
----
-12
27
30

query I rowsort
SELECT + - cor0.col1 + 77 FROM tab2 cor0
----
18
46
60

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

onlyif mysql # use DIV operator for integer division
query I rowsort label-7997
SELECT DISTINCT + - ( 26 ) DIV - col2 + CAST( + col1 * + col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
7396
8281
9435

skipif mysql # not compatible
query I rowsort label-7997
SELECT DISTINCT + - ( 26 ) / - col2 + CAST ( + col1 * + col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
7396
8281
9435

query I rowsort
SELECT DISTINCT + col0 + + col0 + - cor0.col1 AS col2 FROM tab2 AS cor0
----
-17
141
97

query I rowsort
SELECT col2 - - col0 FROM tab2
----
104
117
34

query I rowsort
SELECT - 32 AS col0 FROM tab0 AS cor0
----
-32
-32
-32

onlyif mysql # use DIV operator for integer division
query I rowsort label-8001
SELECT DISTINCT - - col0 DIV cor0.col0 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-8001
SELECT DISTINCT - - col0 / cor0.col0 FROM tab1 AS cor0
----
1

query I rowsort
SELECT DISTINCT 72 * col0 FROM tab1 cor0
----
216
4608
5760

onlyif mysql # use DIV operator for integer division
query I rowsort label-8003
SELECT + col0 DIV + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8003
SELECT + col0 / + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 col2 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * + col2 - + cor0.col2 col2 FROM tab0 AS cor0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + cor0.col1 col0 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 - + col0 col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT - + col2 * - ( + col1 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL col0 + 76 + 83 FROM tab1 cor0
----
162
223
239

query I rowsort
SELECT ALL + + col2 + col0 AS col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT - + col0 * + ( + cor0.col2 ) - - cor0.col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT ALL col0 * - col0 + col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT - cor0.col2 + ( 56 ) * + col0 AS col0 FROM tab2 AS cor0
----
365
4342
4386

query I rowsort
SELECT ALL + col2 * col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - col0 * col2 - cor0.col1 AS col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT + + col1 + - col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + - col0 + col0 * col2 AS col2 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT + col1 - 78 FROM tab1 cor0
----
-52
-65
-68

query I rowsort
SELECT ALL - tab0.col2 * - col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL col1 * + col0 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT - ( - col1 ) FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT - col1 - - 2 AS col0 FROM tab1 AS cor0
----
-11
-24
-8

query I rowsort
SELECT ALL col1 * - col1 FROM tab1 cor0
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8025
SELECT col1 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8025
SELECT col1 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col0 + col1 col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT ALL + - col2 * + ( - col1 ) AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - + cor0.col1 + col1 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT ALL - + col1 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT cor0.col0 * 79 AS col2 FROM tab2 AS cor0
----
553
6162
6241

query I rowsort
SELECT DISTINCT + col2 * - col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL - + col2 AS col1 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT + + col1 * - cor0.col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8034
SELECT DISTINCT + col0 DIV - 56 AS col1 FROM tab2
----
-1
0

skipif mysql # not compatible
query I rowsort label-8034
SELECT DISTINCT + col0 / - 56 AS col1 FROM tab2
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8035
SELECT DISTINCT col2 DIV - tab1.col2 AS col1 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-8035
SELECT DISTINCT col2 / - tab1.col2 AS col1 FROM tab1
----
-1

query I rowsort
SELECT - 65 * cor0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to ae25c919704741460cde5aa94bd634f2

query I rowsort
SELECT DISTINCT + col0 * + col1 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT - col2 * - col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col2 + - col0 AS col0 FROM tab0 AS cor0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8040
SELECT - col2 DIV + 94 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8040
SELECT - col2 / + 94 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 59 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT ALL + cor0.col2 * - col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - - 32 * col1 FROM tab0 cor0
----
2752
2912
3104

query I rowsort
SELECT - col1 * - col0 + col1 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-8045
SELECT ALL col0 + tab1.col2 * 22 - col1 DIV col2 FROM tab1
----
1191
1318
2192

skipif mysql # not compatible
query I rowsort label-8045
SELECT ALL col0 + tab1.col2 * 22 - col1 / col2 FROM tab1
----
1191
1318
2192

query I rowsort
SELECT ALL - col0 - 68 AS col1 FROM tab1
----
-132
-148
-71

query I rowsort
SELECT ALL ( + col0 ) * col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT 24 * 19 FROM tab0 AS cor0
----
456

query I rowsort
SELECT - 69 * + 48 FROM tab0 AS cor0
----
-3312
-3312
-3312

query I rowsort
SELECT + + 31 FROM tab1 cor0
----
31
31
31

query I rowsort
SELECT DISTINCT tab2.col0 * + ( + col0 ) AS col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT + col1 * 52 * col2 + + col2 * col2 AS col1 FROM tab0
----
148665
394748
5045

query I rowsort
SELECT col0 + + ( - col0 + col1 ) AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT - col2 + 4 AS col0 FROM tab0
----
-29
-78
3

query I rowsort
SELECT DISTINCT - col2 - 51 FROM tab2
----
-77
-78
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8056
SELECT DISTINCT tab0.col2 + 6 DIV - tab0.col2 AS col2 FROM tab0
----
-5
33
82

skipif mysql # not compatible
query I rowsort label-8056
SELECT DISTINCT tab0.col2 + 6 / - tab0.col2 AS col2 FROM tab0
----
-5
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8057
SELECT col0 * - CAST( NULL AS SIGNED ) + tab1.col2 * + col1 * - col2 + + col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8057
SELECT col0 * - CAST ( NULL AS INTEGER ) + tab1.col2 * + col1 * - col2 + + col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8058
SELECT DISTINCT - col2 DIV col0 - - 29 FROM tab1 AS cor0
----
11
28
29

skipif mysql # not compatible
query I rowsort label-8058
SELECT DISTINCT - col2 / col0 - - 29 FROM tab1 AS cor0
----
11
28
29

query I rowsort
SELECT DISTINCT - + col1 * + col0 + - cor0.col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT + 69 AS col0 FROM tab2 cor0
----
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-8061
SELECT - + 94 DIV col1 FROM tab2 AS cor0
----
-1
-3
-5

skipif mysql # not compatible
query I rowsort label-8061
SELECT - + 94 / col1 FROM tab2 AS cor0
----
-1
-3
-5

query I rowsort
SELECT ALL + - col0 + + col0 * - col2 AS col2 FROM tab2 AS cor0
----
-196
-2106
-3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-8063
SELECT - cor0.col2 DIV col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-8063
SELECT - cor0.col2 / col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT DISTINCT 80 AS col0 FROM tab0 AS cor0
----
80

query I rowsort
SELECT - - col1 + + col1 * ( + col1 ) FROM tab2 AS cor0
----
306
3540
992

onlyif mysql # use DIV operator for integer division
query I rowsort label-8066
SELECT ALL 50 + col0 DIV 45 AS col1 FROM tab0 cor0
----
50
50
51

skipif mysql # not compatible
query I rowsort label-8066
SELECT ALL 50 + col0 / 45 AS col1 FROM tab0 cor0
----
50
50
51

query I rowsort
SELECT ALL - col1 + col0 AS col2 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8068
SELECT DISTINCT 11 + cor0.col0 DIV col1 AS col0 FROM tab2 AS cor0
----
11
12
15

skipif mysql # not compatible
query I rowsort label-8068
SELECT DISTINCT 11 + cor0.col0 / col1 AS col0 FROM tab2 AS cor0
----
11
12
15

query I rowsort
SELECT col1 + + col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL + + 1 * - col1 + - ( col0 ) FROM tab0 cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-8071
SELECT col1 - tab0.col0 DIV col0 AS col0 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-8071
SELECT col1 - tab0.col0 / col0 AS col0 FROM tab0
----
85
90
96

query I rowsort
SELECT + 88 FROM tab1, tab1 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT ALL + col1 * + col2 + + col1 AS col0 FROM tab1
----
1261
1430
580

query I rowsort
SELECT ALL 98 FROM tab1 AS cor0
----
98
98
98

query I rowsort
SELECT - col0 + col2 * - 86 + col1 * - col2 AS col0 FROM tab2 AS cor0
----
-3166
-3848
-3993

onlyif mysql # use DIV operator for integer division
query I rowsort label-8076
SELECT ALL 90 DIV + tab0.col0 - + 30 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 098255759f1bd79eb4d81443f356ed9d

skipif mysql # not compatible
query I rowsort label-8076
SELECT ALL 90 / + tab0.col0 - + 30 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 098255759f1bd79eb4d81443f356ed9d

query I rowsort
SELECT DISTINCT - ( col2 ) + col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT + 71 * - col2 + col2 FROM tab1
----
-3780
-3990
-6720

query I rowsort
SELECT + 29 * - col1 FROM tab2
----
-1711
-493
-899

onlyif mysql # use DIV operator for integer division
query I rowsort label-8080
SELECT DISTINCT + col0 DIV col1 + col2 FROM tab2
----
27
42

skipif mysql # not compatible
query I rowsort label-8080
SELECT DISTINCT + col0 / col1 + col2 FROM tab2
----
27
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col1 * tab1.col2 ) col2 FROM tab1
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + + col0 * cor0.col1 col0 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-8083
SELECT ALL + 74 DIV + col0 FROM tab1 AS cor0
----
0
1
24

skipif mysql # not compatible
query I rowsort label-8083
SELECT ALL + 74 / + col0 FROM tab1 AS cor0
----
0
1
24

query I rowsort
SELECT DISTINCT 89 + col0 AS col2 FROM tab0 AS cor0
----
113
124
178

query I rowsort
SELECT DISTINCT - col1 + - col2 * - ( + 66 ) FROM tab2 AS cor0
----
1657
1751
2491

onlyif mysql # use DIV operator for integer division
query I rowsort label-8086
SELECT ALL ( col2 ) DIV + 52 + - ( col1 ) DIV cor0.col1 col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8086
SELECT ALL ( col2 ) / + 52 + - ( col1 ) / cor0.col1 col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + 69 FROM tab1
----
69
69
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-8088
SELECT ALL + col0 DIV - col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8088
SELECT ALL + col0 / - col0 FROM tab1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT - col1 * - col0 AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - 34 FROM tab0, tab1 AS cor0
----
9 values hashing to 40442a74794ded4c78101eefe525a5bb

query I rowsort
SELECT ALL - ( + 97 * col1 ) AS col0 FROM tab1
----
-1261
-2522
-970

query I rowsort
SELECT ALL tab2.col2 FROM tab2, tab1 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT DISTINCT - 32 * + col2 FROM tab0
----
-1056
-2624
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col0 * + 78 * - col2 col0 FROM tab1
----
12636
284544
599040

query I rowsort
SELECT DISTINCT + 22 AS col2 FROM tab2 AS cor0
----
22

query I rowsort
SELECT DISTINCT + 27 AS col0 FROM tab1 cor0
----
27

query I rowsort
SELECT - - 67 + - col2 AS col1 FROM tab2 AS cor0
----
29
40
41

query I rowsort
SELECT DISTINCT ( + 98 * - tab1.col0 ) FROM tab1
----
-294
-6272
-7840

query I rowsort
SELECT - 51 * - col1 * col0 - + col0 * + col2 FROM tab0 AS cor0
----
104472
173110
405751

query I rowsort
SELECT + col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - + 67 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * - 82 col0 FROM tab0 AS cor0
----
7052
7462
7954

query I rowsort
SELECT - col1 * ( cor0.col1 ) + - col1 AS col1 FROM tab1 AS cor0
----
-110
-182
-702

query I rowsort
SELECT ALL + - cor0.col1 AS col0 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT col1 * - cor0.col0 * + col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT col1 + col1 * - col0 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8108
SELECT + col2 + CAST( - col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8108
SELECT + col2 + CAST ( - col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL + col2 * ( - cor0.col0 ) AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col2 + cor0.col0 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - col0 * - 37 AS col0 FROM tab0 AS cor0
----
1295
3293
888

query I rowsort
SELECT - - col2 + col0 * + ( + cor0.col0 + 82 ) FROM tab0 AS cor0
----
15301
2577
4096

query I rowsort
SELECT ALL - cor1.col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT - 1 * - col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + - cor0.col2 FROM tab2, tab1 cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
-54
-57
-96

query I rowsort
SELECT - col0 * - col0 * col1 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT - + ( cor0.col2 ) AS col1 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT 1 AS col1 FROM tab1, tab2 AS cor0
----
1

query I rowsort
SELECT - tab0.col0 * 93 + + 37 FROM tab0
----
-2195
-3218
-8240

query I rowsort
SELECT + - cor0.col2 * - 22 + col2 AS col2 FROM tab2 cor0
----
598
621
874

query I rowsort
SELECT 49 FROM tab0 AS cor0
----
49
49
49

query I rowsort
SELECT 89 + + 84 FROM tab0 AS cor0
----
173
173
173

query I rowsort
SELECT - cor0.col2 * + col1 + - col1 * 59 FROM tab2 AS cor0
----
-1649
-2666
-5015

query I rowsort
SELECT + + ( + ( col2 ) ) * - 19 AS col1 FROM tab0 AS cor0
----
-1558
-19
-627

query I rowsort
SELECT ALL - ( - col2 ) + - cor0.col1 AS col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT cor0.col0 + + col0 AS col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT col1 + + col0 * + cor0.col2 + ( + 48 ) FROM tab0 AS cor0
----
180
7437
926

query I rowsort
SELECT DISTINCT - ( + col2 ) AS col0 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT ALL 32 + - col1 * - col0 FROM tab2 AS cor0
----
1375
249
4634

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8131
SELECT - CAST( NULL AS SIGNED ) * - 84 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8131
SELECT - CAST ( NULL AS INTEGER ) * - 84 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8132
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * 56 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8132
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * 56 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col1 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - col1 + + col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 12 + col1 * + 84 AS col1 FROM tab0 AS cor0
----
7212
7632
8136

query I rowsort
SELECT col2 * cor0.col2 + ( - col2 ) AS col0 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT - 76 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8138
SELECT CAST( NULL AS SIGNED ) FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8138
SELECT CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + cor0.col0 - - 27 * col1 FROM tab1 AS cor0
----
334
431
705

query I rowsort
SELECT DISTINCT col2 + + col2 * col0 AS col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT + col2 + col2 AS col2 FROM tab2 cor0
----
52
54
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - 88 col0 FROM tab0 AS cor0
----
-2
3
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8143
SELECT - col2 + - CAST( + col2 AS SIGNED ) * col2 col1 FROM tab1 AS cor0
----
-2970
-3306
-9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8143
SELECT - col2 + - CAST ( + col2 AS INTEGER ) * col2 col1 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT - + col1 + - col1 AS col2 FROM tab2 cor0
----
-118
-34
-62

query I rowsort
SELECT ALL 18 FROM tab0, tab0 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT + 56 AS col1 FROM tab2
----
56
56
56

query I rowsort
SELECT 52 * + cor1.col1 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to a5fb311c3d919be5833bec8139579aac

query I rowsort
SELECT + tab0.col2 AS col0 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT col0 + - 59 * col1 * col1 - - 0 FROM tab1
----
-39881
-5836
-9891

query I rowsort
SELECT col2 * ( col0 ) FROM tab0
----
35
7298
792

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT + col1 * + cor0.col0 + + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT - col1 + ( + 2 ) + + tab2.col0 FROM tab2
----
-22
21
64

query I rowsort
SELECT col2 * + col1 * col1 AS col1 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT col0 * col0 AS col1 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT ALL - col1 AS col2 FROM tab0 AS cor0 WHERE NOT NULL < + col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col2 + - col2 * cor0.col0 col0 FROM tab1 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col0 col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - cor0.col1 + + col2 FROM tab2 AS cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col2 col2 FROM tab1 cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8161
SELECT DISTINCT col1 DIV col1 + cor0.col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-8161
SELECT DISTINCT col1 / col1 + cor0.col1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT DISTINCT + col1 + - col0 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL col0 + + col2 * col0 - col1 * - col0 AS col1 FROM tab0 AS cor0
----
15486
2880
3465

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 WHERE NOT NULL BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8165
SELECT col0 DIV col0 + - col1 FROM tab2
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-8165
SELECT col0 / col0 + - col1 FROM tab2
----
-16
-30
-58

query I rowsort
SELECT + col1 + + col0 AS col2 FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8167
SELECT DISTINCT + col0 DIV col2 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-8167
SELECT DISTINCT + col0 / col2 FROM tab1
----
0
1

query III rowsort
SELECT * FROM tab1 WHERE ( NULL ) >= ( NULL )
----

query I rowsort
SELECT ALL + col2 * - col2 * + col0 AS col0 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT col2 + col0 + - col2 * - col1 * + col1 AS col0 FROM tab2
----
11099
25981
90610

query I rowsort
SELECT + col0 * col1 AS col2 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 * col2 * + col0 col2 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT ALL - tab1.col2 * - tab1.col1 + col1 + col1 FROM tab1
----
1274
1456
590

query I rowsort
SELECT tab0.col2 + - col0 - col2 FROM tab0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8175
SELECT DISTINCT + col1 DIV col1 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-8175
SELECT DISTINCT + col1 / col1 FROM tab0
----
1

query I rowsort
SELECT ALL + col1 + + col1 + - tab2.col1 AS col1 FROM tab2
----
17
31
59

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE ( NULL ) NOT BETWEEN + cor0.col1 AND cor0.col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8178
SELECT ALL col1 DIV + col0 + cor0.col0 FROM tab2 AS cor0
----
11
78
79

skipif mysql # not compatible
query I rowsort label-8178
SELECT ALL col1 / + col0 + cor0.col0 FROM tab2 AS cor0
----
11
78
79

query IIIIII rowsort
SELECT * FROM tab2, tab1 cor0 WHERE NOT ( NULL ) BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT DISTINCT col2 + + col1 AS col1 FROM tab2 AS cor0 WHERE ( NULL ) <= col2
----

query I rowsort
SELECT DISTINCT col2 * - col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT tab1.col0 + col2 + + col2 FROM tab1
----
111
178
272

query I rowsort
SELECT col1 * + col2 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT + tab1.col2 + tab1.col2 FROM tab1
----
108
114
192

query I rowsort
SELECT col1 * - col0 * - col2 FROM tab1
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-8186
SELECT ALL col0 + tab2.col0 DIV col1 + + tab2.col1 AS col0 FROM tab2
----
100
138
38

skipif mysql # not compatible
query I rowsort label-8186
SELECT ALL col0 + tab2.col0 / col1 + + tab2.col1 AS col0 FROM tab2
----
100
138
38

query I rowsort
SELECT DISTINCT - col0 * - col1 AS col0 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-8188
SELECT col0 DIV col2 + + col1 * + col1 * - tab1.col2 FROM tab1
----
-16224
-36504
-5699

skipif mysql # not compatible
query I rowsort label-8188
SELECT col0 / col2 + + col1 * + col1 * - tab1.col2 FROM tab1
----
-16224
-36504
-5699

query I rowsort
SELECT col1 + + col1 AS col0 FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT - col1 * + tab0.col0 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + col1 * - cor0.col1 AS col2 FROM tab1 cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-8192
SELECT cor0.col1 + col2 DIV + cor0.col1 FROM tab1 AS cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-8192
SELECT cor0.col1 + col2 / + cor0.col1 FROM tab1 AS cor0
----
15
20
28

query I rowsort
SELECT + + col0 * col1 + cor0.col2 * + col2 FROM tab0 AS cor0
----
14823
3153
3396

query I rowsort
SELECT col1 * col1 * col0 - + col0 * - col1 AS col2 FROM tab2
----
24174
276120
6944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 + col1 col2 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT - col1 + tab0.col0 FROM tab0
----
-2
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + col0 col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT DISTINCT - col1 - col1 * cor0.col2 * + col0 FROM tab0 AS cor0
----
-3492
-664209
-68198

query I rowsort
SELECT DISTINCT - + col2 - col2 AS col1 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT ALL col0 * + col0 + cor0.col0 + col0 FROM tab1 cor0
----
15
4224
6560

query I rowsort
SELECT - col1 * + col0 * + col0 AS col2 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT ALL - - col1 * - cor0.col2 + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL - + col1 + + col2 AS col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL col1 + - col1 * - col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL + col0 + + col1 * col2 FROM tab1 cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT - - col2 * col0 + col2 * col0 AS col1 FROM tab1 AS cor0
----
15360
324
7296

query I rowsort
SELECT DISTINCT + ( col2 ) AS col2 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT ( col0 ) * + col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL + - ( col1 ) * col1 * col1 AS col2 FROM tab1 cor0
----
-1000
-17576
-2197

query I rowsort
SELECT + col0 + + cor0.col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT col2 * + col0 + - col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT 39 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

query I rowsort
SELECT DISTINCT - + col2 * - 76 FROM tab0 AS cor0
----
2508
6232
76

query I rowsort
SELECT ALL cor0.col0 * col1 * col0 + - col1 * + 91 AS col2 FROM tab2 AS cor0
----
-1302
104550
353587

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * col0 col2 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8217
SELECT DISTINCT - col2 + - CAST( NULL AS SIGNED ) - col0 * - cor0.col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8217
SELECT DISTINCT - col2 + - CAST ( NULL AS INTEGER ) - col0 * - cor0.col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - + col2 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + ( col0 ) col0 FROM tab2 AS cor0
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 16 col0 FROM tab0 AS cor0
----
-1312
-16
-528

onlyif mysql # use DIV operator for integer division
query I rowsort label-8221
SELECT DISTINCT - cor0.col1 DIV - ( col0 * - col0 ) - - cor0.col0 FROM tab1 AS cor0
----
1
64
80

skipif mysql # not compatible
query I rowsort label-8221
SELECT DISTINCT - cor0.col1 / - ( col0 * - col0 ) - - cor0.col0 FROM tab1 AS cor0
----
1
64
80

query I rowsort
SELECT + cor0.col0 * - ( - ( + cor0.col1 ) ) FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT col2 * - 83 AS col1 FROM tab1 AS cor0
----
-4482
-4731
-7968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col0 col1 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort
SELECT ALL ( tab0.col2 ) * CAST ( + col1 + - tab0.col2 AS REAL ) AS col2 FROM tab0
----
1749
738
96

query I rowsort
SELECT + - cor0.col2 * + col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + - cor0.col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT col1 * tab2.col2 AS col2 FROM tab2 WHERE ( NULL ) NOT IN ( tab2.col2 )
----

query I rowsort
SELECT - col2 * col0 - - col0 AS col1 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT col2 * + col0 + col2 FROM tab0
----
36
7380
825

query I rowsort
SELECT col2 * + col2 - + col0 * col0 AS col1 FROM tab1
----
-847
2816
2907

query I rowsort
SELECT DISTINCT - col1 + + tab0.col0 FROM tab0
----
-2
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8233
SELECT ALL - col2 DIV - col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8233
SELECT ALL - col2 / - col1 AS col0 FROM tab0
----
0
0
0

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL >= NULL
----

query I rowsort
SELECT - 88 AS col0 FROM tab2 AS cor0
----
-88
-88
-88

query I rowsort
SELECT + tab0.col2 * - col0 AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT col1 * - col0 AS col1 FROM tab1
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * tab2.col2 col0 FROM tab2
----
-189
-2028
-3002

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL NOT IN ( - col1 * - col0 * + tab0.col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8240
SELECT col1 DIV col0 AS col0 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-8240
SELECT col1 / col0 AS col0 FROM tab1
----
0
0
8

query I rowsort
SELECT - col2 * - tab2.col0 + col1 * col1 FROM tab2
----
1150
3291
5509

query I rowsort
SELECT tab0.col1 * tab0.col2 AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT tab0.col0 + - col1 FROM tab0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col1 * - col2 col1 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT col0 * + col1 AS col2 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-8246
SELECT col2 + col0 + col0 DIV + col1 FROM tab1
----
127
182
57

skipif mysql # not compatible
query I rowsort label-8246
SELECT col2 + col0 + col0 / + col1 FROM tab1
----
127
182
57

query I rowsort
SELECT DISTINCT + col2 * - col2 * col1 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT ALL + col1 * + col0 * + col2 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT col0 + 37 FROM tab0 AS cor0
----
126
61
72

query I rowsort
SELECT ALL + 33 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

query I rowsort
SELECT - + col2 + + 29 * - cor0.col1 FROM tab2 AS cor0
----
-1737
-531
-926

query I rowsort
SELECT col0 + - 92 AS col2 FROM tab0 AS cor0
----
-3
-57
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col2 col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 * col1 col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT + 19 AS col1 FROM tab1
----
19
19
19

query I rowsort
SELECT DISTINCT - 84 AS col2 FROM tab2
----
-84

query I rowsort
SELECT DISTINCT - 95 FROM tab0
----
-95

query I rowsort
SELECT 1 FROM tab2, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT ALL cor0.col1 * col0 * col0 + + col0 * + col2 AS col0 FROM tab2 AS cor0
----
109099
1708
360984

query I rowsort
SELECT ALL + tab2.col0 + ( + col0 ) AS col0 FROM tab2
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 40 + 89 * col0 col0 FROM tab1
----
227
5656
7080

query I rowsort
SELECT ALL + col2 * col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ( cor0.col1 ) + col2 FROM tab0 cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * cor0.col0 col2 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8265
SELECT - CAST( 61 AS SIGNED ) * + col1 + + ( 41 ) FROM tab1 AS cor0
----
-1545
-569
-752

skipif mysql # not compatible
query I rowsort label-8265
SELECT - CAST ( 61 AS INTEGER ) * + col1 + + ( 41 ) FROM tab1 AS cor0
----
-1545
-569
-752

query I rowsort
SELECT - ( + 62 ) + - col1 + + col1 FROM tab0 AS cor0
----
-62
-62
-62

query I rowsort
SELECT DISTINCT - col1 * + col0 + - cor0.col2 AS col2 FROM tab1 cor0
----
-1136
-132
-697

query I rowsort
SELECT DISTINCT - - col0 + cor0.col0 AS col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT + col0 * 77 AS col1 FROM tab0
----
1848
2695
6853

query I rowsort
SELECT 12 * 49 * + col2 AS col1 FROM tab1
----
31752
33516
56448

query I rowsort
SELECT ALL + col0 + 22 AS col0 FROM tab0 AS cor0
----
111
46
57

query I rowsort
SELECT - - 57 * + col0 FROM tab1 AS cor0
----
171
3648
4560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + 14 ) + col1 * + 55 col2 FROM tab0 AS cor0
----
4744
5019
5349

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 * + 19 + - col0 col1 FROM tab1 AS cor0
----
433
449
510

query I rowsort
SELECT ( + col0 ) * - col0 + col2 - + 25 * - col1 FROM tab0 cor0
----
-5564
1201
1607

query I rowsort
SELECT ALL + 25 + + col0 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-1318
-192
-4577

query I rowsort
SELECT col0 * + tab2.col2 AS col0 FROM tab2
----
189
2028
3002

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
3645 values hashing to 1751d8ec783486b9121baa2709745253

query I rowsort
SELECT cor0.col2 * - col2 + + 12 FROM tab2 AS cor0
----
-1432
-664
-717

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8280
SELECT - + col2 * col2 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8280
SELECT - + col2 * col2 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * tab0.col1 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8282
SELECT + + col0 * + col0 DIV col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-8282
SELECT + + col0 * + col0 / col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - - 48 + + cor0.col1 * col0 AS col2 FROM tab2 AS cor0
----
1391
265
4650

query I rowsort
SELECT + - 32 * - col1 + col2 - + col2 * + cor0.col1 * col0 AS col0 FROM tab1 AS cor0
----
-3326
-36103
-99328

query I rowsort
SELECT 34 + + col0 * col1 AS col2 FROM tab2 AS cor0
----
1377
251
4636

query I rowsort
SELECT + - col0 + col1 - col2 FROM tab1 AS cor0
----
-111
-163
-31

query I rowsort
SELECT + 80 FROM tab0 AS cor0
----
80
80
80

query I rowsort
SELECT ALL col2 * + col1 + col2 * col0 FROM tab1 AS cor0
----
1566
4218
8928

onlyif mysql # use DIV operator for integer division
query I rowsort label-8289
SELECT ALL col2 DIV + col2 - col1 col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8289
SELECT ALL col2 / + col2 - col1 col1 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT ALL cor0.col1 * col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - - col2 + col2 * col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT col2 + - col1 * + col1 AS col1 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT + col0 * col2 * + col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT - 32 * col2 FROM tab2 AS cor0
----
-1216
-832
-864

onlyif mysql # use DIV operator for integer division
query I rowsort label-8295
SELECT + + col0 DIV - 9 col0 FROM tab0 AS cor0
----
-2
-3
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8295
SELECT + + col0 / - 9 col0 FROM tab0 AS cor0
----
-2
-3
-9

query I rowsort
SELECT + - col2 + col2 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 47 FROM tab2 cor0
----
47
47
47

query I rowsort
SELECT + - ( + 24 ) FROM tab0 AS cor0
----
-24
-24
-24

query I rowsort
SELECT - tab2.col2 * tab2.col2 + col0 FROM tab2
----
-1365
-598
-722

query I rowsort
SELECT + col2 * 9 FROM tab2 AS cor0
----
234
243
342

query I rowsort
SELECT - 15 AS col2 FROM tab0
----
-15
-15
-15

query I rowsort
SELECT ALL + col2 + col1 * - col2 FROM tab2 AS cor0
----
-1508
-608
-810

onlyif mysql # use DIV operator for integer division
query I rowsort label-8303
SELECT col2 DIV + col2 + + col2 AS col0 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-8303
SELECT col2 / + col2 + + col2 AS col0 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT ALL + - col2 * col2 + col2 AS col1 FROM tab0 cor0
----
-1056
-6642
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8305
SELECT DISTINCT + CAST( NULL AS SIGNED ) + col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-8305
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col2 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT ( col1 ) + col2 * col2 FROM tab2
----
1461
735
760

onlyif mysql # use DIV operator for integer division
query I rowsort label-8307
SELECT DISTINCT - col0 DIV col0 AS col1 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-8307
SELECT DISTINCT - col0 / col0 AS col1 FROM tab0
----
-1

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab0 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to 42d854e4c33cb5afd5528228bff9250d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8309
SELECT ALL CAST( NULL AS SIGNED ) * - col0 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8309
SELECT ALL CAST ( NULL AS INTEGER ) * - col0 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + 23 col2 FROM tab0
----
1886
23
759

query I rowsort
SELECT cor0.col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - 72 FROM tab2, tab2 AS cor0
----
9 values hashing to ad521144c976ff25e77cdf10a84d1dc6

query I rowsort
SELECT ALL + - 67 * col0 + - col0 AS col0 FROM tab1 AS cor0
----
-204
-4352
-5440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * 77 col2 FROM tab2 AS cor0
----
-2002
-2079
-2926

query I rowsort
SELECT + 27 AS col2 FROM tab1
----
27
27
27

query I rowsort
SELECT ALL + + col0 + - ( col2 ) AS col1 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8317
SELECT + CAST( NULL AS SIGNED ) + + 47 * - col0 * col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8317
SELECT + CAST ( NULL AS INTEGER ) + + 47 * - col0 * col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 * + 61 AS col2 FROM tab0 AS cor0
----
-5246
-5551
-5917

onlyif mysql # use DIV operator for integer division
query I rowsort label-8319
SELECT ALL CAST( - col0 AS SIGNED ) DIV - col0 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8319
SELECT ALL CAST ( - col0 AS INTEGER ) / - col0 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - ( + col2 ) * - col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT cor0.col0 + - ( - col1 ) * col1 AS col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT + - ( col0 ) AS col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL + + 21 AS col0 FROM tab0 AS cor0
----
21
21
21

query I rowsort
SELECT DISTINCT + 66 * 4 FROM tab1 AS cor0
----
264

query I rowsort
SELECT - col2 * col2 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + 88 FROM tab1 AS cor0
----
88
88
88

query I rowsort
SELECT DISTINCT - + col2 * + col1 + - cor0.col0 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT col1 + cor0.col2 * + col0 FROM tab1 cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT col0 * col1 AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col1 + - col1 * - col2 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT + - ( + col1 ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL cor0.col0 + - col0 * col0 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT DISTINCT + 14 AS col2 FROM tab1 AS cor0
----
14

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
972 values hashing to fe55095fff3a5ecc2f113d14a8c6f823

onlyif mysql # use DIV operator for integer division
query I rowsort label-8335
SELECT ALL col1 * + 18 + col2 DIV col0 FROM tab2 AS cor0
----
1062
306
561

skipif mysql # not compatible
query I rowsort label-8335
SELECT ALL col1 * + 18 + col2 / col0 FROM tab2 AS cor0
----
1062
306
561

query I rowsort
SELECT ALL + col1 - - cor0.col0 AS col2 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-8337
SELECT - - col2 DIV 68 + + col0 col2 FROM tab1 AS cor0
----
3
64
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8337
SELECT - - col2 / 68 + + col0 col2 FROM tab1 AS cor0
----
3
64
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + - col1 col1 FROM tab0 AS cor0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8339
SELECT DISTINCT - col2 DIV - 79 + col0 + - col2 * + col1 AS col1 FROM tab1 AS cor0
----
-1167
-1401
-506

skipif mysql # not compatible
query I rowsort label-8339
SELECT DISTINCT - col2 / - 79 + col0 + - col2 * + col1 AS col1 FROM tab1 AS cor0
----
-1167
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-8340
SELECT - col0 * ( + 60 ) + - col1 DIV 66 col2 FROM tab1 AS cor0
----
-180
-3840
-4800

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8340
SELECT - col0 * ( + 60 ) + - col1 / 66 col2 FROM tab1 AS cor0
----
-180
-3840
-4800

query I rowsort
SELECT col0 + - 18 FROM tab0 AS cor0
----
17
6
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-8342
SELECT DISTINCT + cor0.col1 + - ( + col2 ) DIV + col2 AS col2 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-8342
SELECT DISTINCT + cor0.col1 + - ( + col2 ) / + col2 AS col2 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - col2 * - ( col0 + col0 * ( col1 ) ) FROM tab2 AS cor0
----
121680
54036
6048

query I rowsort
SELECT + col2 * - 81 + - col0 FROM tab0 AS cor0
----
-116
-2697
-6731

query I rowsort
SELECT ALL + + cor0.col1 + - ( - ( col0 ) ) FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - col0 * 57 FROM tab0
----
-1368
-1995
-5073

query I rowsort
SELECT DISTINCT 55 FROM tab2, tab1 AS cor0
----
55

query I rowsort
SELECT col1 - + ( - col0 ) * - col2 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT + col1 + + 97 AS col2 FROM tab2
----
114
128
156

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 82 * col2 col1 FROM tab0 cor0
----
2706
6724
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 32 * cor0.col0 col0 FROM tab1 AS cor0
----
-2048
-2560
-96

query I rowsort
SELECT DISTINCT + col0 * ( - col1 * + col2 ) AS col1 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT col0 + - 56 + 97 AS col2 FROM tab0
----
130
65
76

query I rowsort
SELECT + col0 + 92 * col2 FROM tab1
----
4971
5308
8912

query I rowsort
SELECT - ( 98 ) + + col1 AS col0 FROM tab2 AS cor0
----
-39
-67
-81

query I rowsort
SELECT col0 * col2 + col2 AS col0 FROM tab2
----
2054
216
3040

query I rowsort
SELECT + ( + 52 ) * + col1 * col0 AS col1 FROM tab0
----
107328
176540
421148

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 44 col2 FROM tab1
----
44
44
44

query I rowsort
SELECT 66 * tab2.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to a51772a0f3f89a84175b3afd1cea6249

query I rowsort
SELECT DISTINCT + - cor0.col0 + 53 AS col1 FROM tab0 AS cor0
----
-36
18
29

query I rowsort
SELECT - col1 * - cor0.col0 + col0 FROM tab2 AS cor0
----
1422
224
4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - col1 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 + 24 AS col1 FROM tab2 AS cor0
----
-54
-55
17

query I rowsort
SELECT DISTINCT ( tab2.col2 ) * col1 FROM tab2
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8366
SELECT DISTINCT - CAST( NULL AS SIGNED ) + - col2 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8366
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + - col2 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + - ( col2 ) * - col0 + + col0 + - cor0.col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + 33 * - 24 FROM tab0 AS cor0
----
-792
-792
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * 12 + col2 col0 FROM tab2 AS cor0
----
338
351
494

query I rowsort
SELECT ALL + - 46 + 43 * col2 * + col1 + 34 AS col0 FROM tab1 AS cor0
----
24498
53652
60360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col0 + - col2 col1 FROM tab0
----
-24
-35
-89

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1, tab0 AS cor0, tab2 AS cor1
----
972 values hashing to 9600bdf5bac0caec3229e87170cc40b3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 6 + - col2 col0 FROM tab1
----
-48
-51
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col2 + - col1 + col0 col1 FROM tab2
----
165
2047
3064

query I rowsort
SELECT DISTINCT ( col0 ) + col2 * - tab1.col1 AS col1 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT + col0 - - col1 FROM tab1
----
29
74
93

query I rowsort
SELECT - 79 AS col2 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to c9cc9510604e093bd158ca33928acaed

query I rowsort
SELECT col2 * + col0 AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT + + ( - tab2.col2 ) FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT 89 * tab2.col1 FROM tab2
----
1513
2759
5251

query I rowsort
SELECT DISTINCT - col0 * - col1 + ( 98 ) FROM tab2 AS cor0
----
1441
315
4700

query I rowsort
SELECT ALL 94 * col0 AS col1 FROM tab2 AS cor0
----
658
7332
7426

query I rowsort
SELECT - 9 + col1 AS col2 FROM tab2 AS cor0
----
22
50
8

query I rowsort
SELECT DISTINCT - ( col1 ) + + cor0.col0 * col1 FROM tab1 cor0
----
1027
52
630

query I rowsort
SELECT + + col1 * - col0 AS col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - tab0.col1 * - tab0.col0 + + col2 * + col2 FROM tab0
----
14823
3153
3396

query I rowsort
SELECT - 82 * + col2 FROM tab0
----
-2706
-6724
-82

query I rowsort
SELECT + + col0 * - cor0.col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + col0 * ( cor0.col2 ) - + col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL + col1 + col0 AS col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8391
SELECT + col0 + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8391
SELECT + col0 + CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + ( cor0.col1 ) AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL col1 * col0 AS col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT cor0.col1 - + 12 FROM tab0 AS cor0
----
74
79
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - cor0.col2 * 18 col0 FROM tab2 AS cor0
----
-390
-479
-605

query I rowsort
SELECT ALL - col1 + - col1 FROM tab2 cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT col0 * col2 + cor0.col1 * col1 + col0 * - col1 FROM tab2 AS cor0
----
1948
907
933

query I rowsort
SELECT + cor0.col2 + + 10 AS col1 FROM tab0 AS cor0
----
11
43
92

query I rowsort
SELECT DISTINCT 65 FROM tab1, tab2, tab1 AS cor0
----
65

query I rowsort
SELECT - col2 * 11 + - 73 * + col1 AS col0 FROM tab2 cor0
----
-1659
-2560
-4593

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * 5 col2 FROM tab0 AS cor0
----
120
175
445

query I rowsort
SELECT DISTINCT col1 * - col2 + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT - + col0 * - 72 * col0 + col2 * + col0 FROM tab0 AS cor0
----
42264
577610
88235

query I rowsort
SELECT col0 * - col0 + + col2 AS col1 FROM tab2 cor0
----
-22
-6058
-6203

query I rowsort
SELECT ALL + tab1.col2 * col1 AS col1 FROM tab1
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 45 * + col2 + 5 * ( - col1 ) col2 FROM tab2 AS cor0
----
-1370
-1465
-1795

query I rowsort
SELECT + col0 * col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL - 2 + + ( tab0.col1 + 14 ) FROM tab0
----
103
109
98

query I rowsort
SELECT + - col1 * col0 * + 35 + - 50 FROM tab1 cor0
----
-22450
-2780
-36450

query I rowsort
SELECT - ( - cor0.col1 ) - col0 AS col0 FROM tab0 AS cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8411
SELECT ALL tab1.col0 DIV + tab1.col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8411
SELECT ALL tab1.col0 / + tab1.col0 FROM tab1
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8412
SELECT - + cor0.col2 * - CAST( NULL AS SIGNED ) + - col2 * + col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8412
SELECT - + cor0.col2 * - CAST ( NULL AS INTEGER ) + - col2 * + col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8413
SELECT + col2 + + col2 DIV + col0 AS col0 FROM tab1 AS cor0
----
57
72
97

skipif mysql # not compatible
query I rowsort label-8413
SELECT + col2 + + col2 / + col0 AS col0 FROM tab1 AS cor0
----
57
72
97

query I rowsort
SELECT + col2 * - col0 + col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL + 81 * + col0 FROM tab2
----
567
6318
6399

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col1 FROM tab0
----
86
91
97

query I rowsort
SELECT - 76 * + col1 AS col0 FROM tab1
----
-1976
-760
-988

query I rowsort
SELECT 79 * - tab2.col2 FROM tab2
----
-2054
-2133
-3002

query I rowsort
SELECT - - col0 + col1 AS col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT - 63 FROM tab0 cor0
----
-63
-63
-63

onlyif mysql # use DIV operator for integer division
query I rowsort label-8421
SELECT 4 DIV 25 - - col2 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8421
SELECT 4 / 25 - - col2 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + - 9 + + 50 FROM tab2 AS cor0
----
41
41
41

query I rowsort
SELECT + - col1 * col2 + col1 * 73 AS col0 FROM tab0 AS cor0
----
-819
3440
6984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 col2 FROM tab2, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - col0 + - 77 FROM tab2
----
-155
-156
-84

query I rowsort
SELECT DISTINCT tab2.col0 * 72 AS col1 FROM tab2
----
504
5616
5688

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8427
SELECT DISTINCT - CAST( NULL AS SIGNED ) + + col1 AS col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8427
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + + col1 AS col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ( + ( cor0.col0 ) ) + col1 - + ( - col2 ) AS col2 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT - - col2 * - col1 - col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT DISTINCT 64 FROM tab2
----
64

query I rowsort
SELECT - ( cor0.col2 ) * col1 + 17 AS col2 FROM tab0 AS cor0
----
-2821
-7445
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8432
SELECT col2 + 13 * - cor0.col1 DIV + col1 AS col1 FROM tab0 AS cor0
----
-12
20
69

skipif mysql # not compatible
query I rowsort label-8432
SELECT col2 + 13 * - cor0.col1 / + col1 AS col1 FROM tab0 AS cor0
----
-12
20
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8433
SELECT ALL CAST( NULL AS SIGNED ) * - tab2.col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8433
SELECT ALL CAST ( NULL AS INTEGER ) * - tab2.col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 * ( cor0.col2 ) AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-8435
SELECT ALL + + 96 DIV - col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-13

skipif mysql # not compatible
query I rowsort label-8435
SELECT ALL + + 96 / - col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-13

query I rowsort
SELECT + 26 * col0 - + 68 FROM tab1 AS cor0
----
10
1596
2012

query I rowsort
SELECT DISTINCT - - col2 + + col2 AS col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT col1 + - col2 * col2 AS col0 FROM tab0 AS cor0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8439
SELECT DISTINCT col0 DIV - col1 - col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-8439
SELECT DISTINCT col0 / - col1 - col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + col0 * col1 + - 57 AS col1 FROM tab2 AS cor0
----
1286
160
4545

query I rowsort
SELECT ALL ( + 81 ) AS col2 FROM tab2
----
81
81
81

query I rowsort
SELECT - + 69 AS col2 FROM tab0 AS cor0
----
-69
-69
-69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8443
SELECT + col2 * + col2 + CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
-34
1065
6635

skipif mysql # not compatible
query I rowsort label-8443
SELECT + col2 * + col2 + CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT ALL 91 - col0 * col1 * col0 FROM tab0
----
-118734
-49445
-720720

query I rowsort
SELECT ALL - col1 + - col2 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8446
SELECT ALL - col0 + col1 DIV ( + col1 ) AS col2 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-8446
SELECT ALL - col0 + col1 / ( + col1 ) AS col2 FROM tab0 AS cor0
----
-23
-34
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-8447
SELECT DISTINCT + col1 DIV - col2 FROM tab0 cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-8447
SELECT DISTINCT + col1 / - col2 FROM tab0 cor0
----
-1
-2
-97

query I rowsort
SELECT DISTINCT + 27 AS col2 FROM tab2 AS cor0
----
27

query I rowsort
SELECT ALL - ( col1 ) + ( + col2 ) * - col1 * col1 AS col2 FROM tab0 AS cor0
----
-244154
-679133
-9506

query I rowsort
SELECT DISTINCT - col0 * - col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT cor0.col1 - col0 AS col2 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-8452
SELECT 73 DIV - cor0.col1 + CAST( col0 AS SIGNED ) AS col1 FROM tab2 cor0
----
5
75
77

skipif mysql # not compatible
query I rowsort label-8452
SELECT 73 / - cor0.col1 + CAST ( col0 AS INTEGER ) AS col1 FROM tab2 cor0
----
5
75
77

query I rowsort
SELECT - 32 + - col2 * + ( col2 * col0 ) AS col1 FROM tab0 AS cor0
----
-26168
-598468
-67

query I rowsort
SELECT DISTINCT 91 FROM tab0, tab1 cor0
----
91

query I rowsort
SELECT col1 + ( + tab2.col2 ) FROM tab2
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-8456
SELECT DISTINCT col1 DIV tab0.col0 AS col1 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-8456
SELECT DISTINCT col1 / tab0.col0 AS col1 FROM tab0
----
1
2
3

query I rowsort
SELECT - col0 * col1 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + col2 * + 25 + + col0 FROM tab1 AS cor0
----
1353
1489
2480

query I rowsort
SELECT col0 * ( 23 ) FROM tab1 AS cor0
----
1472
1840
69

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT - + cor0.col1 AS col2 FROM tab0 cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8462
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab2 AS cor0, tab1 cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-8462
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab2 AS cor0, tab1 cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT ( col2 ) * cor0.col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - ( ( - col1 ) ) + - ( ( + cor0.col2 ) ) FROM tab1 AS cor0
----
-28
-47
-83

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab0 AS cor1, tab1 cor2
----
972 values hashing to 0a9194f200a4220e419d35c461f9fcfe

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab1 cor1, tab1 cor2
----
972 values hashing to ed80235f6457dada5cbb50ce9e2a8923

query I rowsort
SELECT DISTINCT - 66 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-66

query I rowsort
SELECT + - ( 28 ) AS col1 FROM tab2 AS cor0
----
-28
-28
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col1 ) col2 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT col2 + 0 * + col1 * 54 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - col1 * cor0.col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT cor0.col2 + 4 FROM tab2 AS cor0
----
30
31
42

query I rowsort
SELECT DISTINCT - ( 77 ) + col2 + + col2 FROM tab2 AS cor0
----
-1
-23
-25

query I rowsort
SELECT DISTINCT - + 50 * - 56 + col2 FROM tab1 AS cor0
----
2854
2857
2896

query I rowsort
SELECT ALL - 64 * - col1 + col1 AS col1 FROM tab1 cor0
----
1690
650
845

query I rowsort
SELECT - col1 + - col1 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT ALL - 33 + - tab1.col0 AS col2 FROM tab1
----
-113
-36
-97

query I rowsort
SELECT DISTINCT col1 + col0 * 28 AS col2 FROM tab0 AS cor0
----
1077
2583
758

query I rowsort
SELECT ALL col0 + - col1 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT + col1 * + col2 + - col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT + + 36 * + col0 + - col0 FROM tab0 AS cor0
----
1225
3115
840

query I rowsort
SELECT ALL + ( + cor0.col0 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT col1 * - col2 + 19 * col2 FROM tab1 AS cor0
----
-378
513
576

query I rowsort
SELECT - 21 + col2 * + col0 AS col0 FROM tab1 AS cor0
----
141
3627
7659

query I rowsort
SELECT + col1 * - col0 + cor0.col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT - - col2 * col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ALL - - col0 - + ( 58 ) AS col2 FROM tab2 AS cor0
----
-51
20
21

query I rowsort
SELECT - cor1.col1 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8489
SELECT DISTINCT + col2 - + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8489
SELECT DISTINCT + col2 - + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL cor1.col2 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL - ( + col1 ) * col0 + + col2 * + col2 FROM tab2
----
-3926
101
512

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8492
SELECT DISTINCT - col1 + CAST( NULL AS SIGNED ) * - 83 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8492
SELECT DISTINCT - col1 + CAST ( NULL AS INTEGER ) * - 83 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col1 * col2 + cor0.col1 + col2 * - col2 AS col0 FROM tab2 AS cor0
----
-1535
-2073
-2151

query I rowsort
SELECT DISTINCT + 30 * + cor0.col1 AS col2 FROM tab2, tab1 AS cor0
----
300
390
780

query I rowsort
SELECT DISTINCT col2 + + cor0.col1 * - col2 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT - col0 + tab0.col2 FROM tab0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - col2 + + col1 * 64 col2 FROM tab1
----
1664
640
832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8498
SELECT DISTINCT + ( col0 ) * col1 / CAST( NULL AS DECIMAL ) + col1 + + col0 AS col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-8498
SELECT DISTINCT + ( col0 ) * col1 / CAST ( NULL AS REAL ) + col1 + + col0 AS col0 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT - col2 + - col1 FROM tab2
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-8500
SELECT ( - col0 ) * col1 + - 29 DIV 44 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-8500
SELECT ( - col0 ) * col1 + - 29 / 44 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + col1 + col1 * + col0 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT + ( - 11 ) * - cor0.col0 + col2 - col2 * - cor0.col2 FROM tab2 cor0
----
1560
2351
833

query I rowsort
SELECT cor1.col1 FROM tab2, tab0 AS cor0, tab2 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8504
SELECT col2 * - ( - col0 ) + CAST( + col2 AS SIGNED ) * - col2 FROM tab1 AS cor0
----
-1536
-2754
399

skipif mysql # not compatible
query I rowsort label-8504
SELECT col2 * - ( - col0 ) + CAST ( + col2 AS INTEGER ) * - col2 FROM tab1 AS cor0
----
-1536
-2754
399

query I rowsort
SELECT ALL - 60 * - col2 * + col2 FROM tab1 AS cor0
----
174960
194940
552960

query I rowsort
SELECT ALL - cor0.col0 * - 14 FROM tab2 AS cor0
----
1092
1106
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8507
SELECT ALL - col2 + + col2 * col2 DIV col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8507
SELECT ALL - col2 + + col2 * col2 / col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8508
SELECT + 50 DIV + col1 FROM tab1 cor0
----
1
3
5

skipif mysql # not compatible
query I rowsort label-8508
SELECT + 50 / + col1 FROM tab1 cor0
----
1
3
5

query I rowsort
SELECT - - 93 + + cor0.col0 * col2 + 75 * - col1 FROM tab2 AS cor0
----
-2043
-2304
1820

query I rowsort
SELECT DISTINCT + 81 AS col1 FROM tab1, tab2 AS cor0
----
81

query I rowsort
SELECT col1 + col2 * - ( - col0 ) FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT 14 * col1 FROM tab0 cor0
----
1204
1274
1358

query I rowsort
SELECT ALL - 31 AS col1 FROM tab0 AS cor0
----
-31
-31
-31

query I rowsort
SELECT + col1 * - col2 + + ( col2 ) AS col0 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL 97 AS col0 FROM tab1 AS cor0
----
97
97
97

query I rowsort
SELECT ALL col1 * + col1 + 9 FROM tab1 AS cor0
----
109
178
685

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8517
SELECT CAST( NULL AS SIGNED ) + + col0 * - col0 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8517
SELECT CAST ( NULL AS INTEGER ) + + col0 * - col0 AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8518
SELECT DISTINCT + CAST( - col1 AS SIGNED ) - + col0 FROM tab0
----
-110
-132
-180

skipif mysql # not compatible
query I rowsort label-8518
SELECT DISTINCT + CAST ( - col1 AS INTEGER ) - + col0 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + ( col1 ) + + tab2.col2 + + 89 FROM tab2
----
144
147
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 24 - col2 col0 FROM tab0
----
-106
-25
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8521
SELECT + ( - ( + col0 ) ) * + ( 24 ) + - col0 DIV + tab1.col2 AS col1 FROM tab1
----
-1537
-1920
-72

skipif mysql # not compatible
query I rowsort label-8521
SELECT + ( - ( + col0 ) ) * + ( 24 ) + - col0 / + tab1.col2 AS col1 FROM tab1
----
-1537
-1920
-72

query I rowsort
SELECT tab0.col0 + tab0.col1 + tab0.col0 AS col0 FROM tab0
----
134
167
269

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8523
SELECT ALL CAST( - col2 AS SIGNED ) - - col1 FROM tab1
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-8523
SELECT ALL CAST ( - col2 AS INTEGER ) - - col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + 83 * col0 + col2 * col2 FROM tab0 AS cor0
----
14111
2906
3081

query I rowsort
SELECT ALL col0 + col2 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + col2 * col0 + - col0 AS col1 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT - + col0 + col0 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 + col0 AS col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT + col0 + + col2 * - 22 FROM tab0 AS cor0
----
-1715
-702
13

query I rowsort
SELECT - ( col1 ) * - col1 * + ( - col1 ) + cor0.col0 * + 12 * + col0 FROM tab2 AS cor0
----
-132371
-29203
69979

query I rowsort
SELECT + cor0.col2 + col2 AS col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT - 75 + + col1 + col2 * col0 FROM tab2
----
145
2012
2944

query I rowsort
SELECT + col1 + - col1 * col0 * col1 AS col1 FROM tab0 AS cor0
----
-177418
-329218
-736918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col1 * col2 col1 FROM tab1 cor0
----
1235
1378
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8535
SELECT DISTINCT + col1 + col1 * CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-8535
SELECT DISTINCT + col1 + col1 * CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT - 91 FROM tab2 AS cor0
----
-91

query I rowsort
SELECT ALL - 47 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to a4d3a02c376c52ddb0a38a801f7b50d5

query I rowsort
SELECT 9 * col0 FROM tab0
----
216
315
801

query I rowsort
SELECT - 51 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 27bcc31433ce90833ed76619cbd8d6a4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - tab1.col2 ) col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT - ( - col2 ) * + col0 - + ( col2 * + col1 ) FROM tab1 cor0
----
-1242
3078
6432

query I rowsort
SELECT ALL - 68 FROM tab2 AS cor0
----
-68
-68
-68

query I rowsort
SELECT DISTINCT + 53 + + 32 AS col2 FROM tab2 AS cor0
----
85

query I rowsort
SELECT DISTINCT cor0.col0 * 67 FROM tab0, tab1, tab2 AS cor0
----
469
5226
5293

query I rowsort
SELECT - 60 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 88 ) col2 FROM tab2 AS cor0
----
-88
-88
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-8547
SELECT ALL - - 60 + - 64 + cor0.col0 DIV 14 FROM tab1 AS cor0
----
-4
0
1

skipif mysql # not compatible
query I rowsort label-8547
SELECT ALL - - 60 + - 64 + cor0.col0 / 14 FROM tab1 AS cor0
----
-4
0
1

query I rowsort
SELECT + + col1 * + 65 AS col0 FROM tab2 cor0
----
1105
2015
3835

query I rowsort
SELECT ALL col0 + col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL - ( col0 ) + col1 AS col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) * col1 FROM tab1 cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-8552
SELECT DISTINCT - cor0.col0 DIV - col1 + cor0.col1 FROM tab2 AS cor0
----
21
31
60

skipif mysql # not compatible
query I rowsort label-8552
SELECT DISTINCT - cor0.col0 / - col1 + cor0.col1 FROM tab2 AS cor0
----
21
31
60

query I rowsort
SELECT DISTINCT + + 9 * col0 AS col0 FROM tab2 AS cor0
----
63
702
711

query I rowsort
SELECT ALL ( col1 ) * - cor0.col2 + - 74 FROM tab2 AS cor0
----
-1608
-720
-911

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8555
SELECT CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8555
SELECT CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8556
SELECT DISTINCT - - 64 + + col0 + + cor0.col2 DIV 73 AS col0 FROM tab1 AS cor0
----
128
145
67

skipif mysql # not compatible
query I rowsort label-8556
SELECT DISTINCT - - 64 + + col0 + + cor0.col2 / 73 AS col0 FROM tab1 AS cor0
----
128
145
67

query I rowsort
SELECT ALL col1 * + col2 + col0 AS col1 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8558
SELECT - + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8558
SELECT - + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8559
SELECT DISTINCT - - col2 + ( col2 ) + - CAST( + 13 + - col1 AS SIGNED ) FROM tab2 AS cor0
----
72
80
98

skipif mysql # not compatible
query I rowsort label-8559
SELECT DISTINCT - - col2 + ( col2 ) + - CAST ( + 13 + - col1 AS INTEGER ) FROM tab2 AS cor0
----
72
80
98

query I rowsort
SELECT DISTINCT - + col1 AS col0 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL + 25 FROM tab2, tab0 cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT ALL + col2 * col0 + + col2 FROM tab1 AS cor0
----
216
3705
7776

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0, tab0 cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

query I rowsort
SELECT col0 + col2 * + 98 + - col1 FROM tab1 AS cor0
----
5269
5640
9475

skipif mysql # not compatible
query I rowsort
SELECT col1 * CAST ( - col1 AS REAL ) FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + - col1 * - ( col2 ) AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col0 * + ( col2 * col1 ) FROM tab1 AS cor0
----
-36480
-4212
-99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-8568
SELECT col2 + - col2 + + col2 DIV cor0.col0 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-8568
SELECT col2 + - col2 + + col2 / cor0.col0 FROM tab2 AS cor0
----
0
0
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8569
SELECT ALL col0 * CAST( + col2 AS SIGNED ) + col1 FROM tab1
----
188
3658
7693

skipif mysql # not compatible
query I rowsort label-8569
SELECT ALL col0 * CAST ( + col2 AS INTEGER ) + col1 FROM tab1
----
188
3658
7693

query I rowsort
SELECT DISTINCT col1 * col2 * + col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT + 16 AS col0 FROM tab2 cor0
----
16
16
16

query I rowsort
SELECT + + col1 - - 0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + col2 + 64 AS col1 FROM tab0
----
146
65
97

query I rowsort
SELECT + + col1 * col2 + + col2 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT - - 96 * - cor0.col1 FROM tab1 AS cor0
----
-1248
-2496
-960

query I rowsort
SELECT DISTINCT + - cor0.col0 * + cor0.col0 AS col2 FROM tab0 cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-8577
SELECT - col1 DIV col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-8577
SELECT - col1 / col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col1 * + 67 * - col1 FROM tab1 AS cor0
----
-11403
-45295
-6764

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 col1 FROM tab1 cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8580
SELECT ALL - ( col1 ) * col0 + 56 * col1 * + CAST( - col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-117648
-193515
-461643

skipif mysql # not compatible
query I rowsort label-8580
SELECT ALL - ( col1 ) * col0 + 56 * col1 * + CAST ( - col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-117648
-193515
-461643

query I rowsort
SELECT ALL col2 * + 15 FROM tab2
----
390
405
570

query I rowsort
SELECT ALL 84 * + col1 FROM tab0
----
7224
7644
8148

query I rowsort
SELECT cor0.col2 * - cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - col1 + - col2 * 74 * col0 FROM tab0 AS cor0
----
-2687
-540143
-58694

query I rowsort
SELECT + col1 + col0 * col1 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT 53 FROM tab2, tab1 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 11 col1 FROM tab1
----
11
11
11

query I rowsort
SELECT ALL - col0 * + col0 + col0 AS col2 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT ALL - col0 + ( - col2 ) AS col1 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT ALL - + col0 + col0 * + col1 FROM tab0 AS cor0
----
2040
3360
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col2 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT cor0.col1 * - 56 FROM tab0 AS cor0
----
-4816
-5096
-5432

query I rowsort
SELECT ALL + cor0.col0 + cor0.col0 AS col0 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-8594
SELECT DISTINCT - + col1 DIV 52 FROM tab0 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-8594
SELECT DISTINCT - + col1 / 52 FROM tab0 cor0
----
-1

query I rowsort
SELECT + 20 AS col2 FROM tab0
----
20
20
20

query I rowsort
SELECT DISTINCT 15 * col1 FROM tab0
----
1290
1365
1455

query I rowsort
SELECT cor0.col0 * - tab1.col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to c25bf2f069c912fb3438dc73db666079

query I rowsort
SELECT ( tab1.col2 ) AS col0 FROM tab1
----
54
57
96

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 cor1, tab0 AS cor2, tab1 AS cor3
----
3645 values hashing to 71d467ba3372dfdd21847af1687c92e7

query I rowsort
SELECT col0 - ( tab0.col0 ) FROM tab0
----
0
0
0

query I rowsort
SELECT + 74 FROM tab1, tab2 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT ALL - 29 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

query I rowsort
SELECT DISTINCT + - col0 * - col2 + + ( ( - col0 ) ) FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT - col2 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + col0 + col0 * - ( + 75 ) AS col2 FROM tab2 AS cor0
----
-518
-5772
-5846

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 70 + - 47 col2 FROM tab0 AS cor0
----
-117
-117
-117

query I rowsort
SELECT - col0 * col1 + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT ALL 59 * + col2 + - col1 * col1 * - col2 FROM tab1
----
21888
39690
9063

query I rowsort
SELECT + 31 AS col2 FROM tab2
----
31
31
31

query I rowsort
SELECT 75 - col2 FROM tab0
----
-7
42
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col1 col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT - + 72 + + col2 FROM tab2 cor0
----
-34
-45
-46

query I rowsort
SELECT DISTINCT - col1 + + col0 AS col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL - col2 + - col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT - col0 - - col1 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT tab2.col2 * col1 + - col1 + - col0 AS col2 FROM tab2
----
1397
550
799

query I rowsort
SELECT + - cor0.col0 - - col1 AS col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT DISTINCT - - col0 * col2 + col0 * + col0 FROM tab1 AS cor0
----
14080
171
7744

query I rowsort
SELECT + col0 * + col1 + + col1 AS col2 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 + cor0.col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT - col1 * cor0.col2 + cor0.col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT col0 * + col1 + col0 AS col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT DISTINCT - col2 * col0 + - col2 * col1 AS col0 FROM tab1
----
-1566
-4218
-8928

query I rowsort
SELECT + col1 * col0 + + col0 + col0 AS col1 FROM tab0
----
2112
3465
8277

onlyif mysql # use DIV operator for integer division
query I rowsort label-8627
SELECT col0 + col1 * + col2 DIV + col2 + + col0 * tab1.col0 AS col1 FROM tab1
----
38
4170
6493

skipif mysql # not compatible
query I rowsort label-8627
SELECT col0 + col1 * + col2 / + col2 + + col0 * tab1.col0 AS col1 FROM tab1
----
38
4170
6493

query I rowsort
SELECT DISTINCT - col2 * - col1 * + col2 + - col0 FROM tab2
----
22592
24469
39806

query I rowsort
SELECT - col1 - - col1 * - col2 FROM tab0
----
-194
-2924
-7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-8630
SELECT + tab2.col0 DIV - col1 + + col0 FROM tab2
----
7
75
77

skipif mysql # not compatible
query I rowsort label-8630
SELECT + tab2.col0 / - col1 + + col0 FROM tab2
----
7
75
77

query I rowsort
SELECT DISTINCT + col0 * + col0 * - col2 - col0 AS col2 FROM tab2
----
-1330
-158262
-237237

query I rowsort
SELECT ALL col1 + + col0 - col2 FROM tab0
----
131
77
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8633
SELECT DISTINCT col1 DIV col1 + col2 FROM tab2
----
27
28
39

skipif mysql # not compatible
query I rowsort label-8633
SELECT DISTINCT col1 / col1 + col2 FROM tab2
----
27
28
39

query I rowsort
SELECT ALL - col1 * + tab0.col0 + col1 * - col1 AS col1 FROM tab0
----
-12804
-16380
-9460

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + col2 col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL + col0 * cor0.col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + - cor0.col0 * col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col2 col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT - col2 * cor0.col0 + + col1 AS col1 FROM tab2 cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT - col0 + col0 * col1 FROM tab0 AS cor0
----
2040
3360
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-8641
SELECT ALL col0 DIV - col2 FROM tab0 cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-8641
SELECT ALL col0 / - col2 FROM tab0 cor0
----
-1
-35
0

query I rowsort
SELECT - + cor0.col2 + col2 + col2 * col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT col0 * col0 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8644
SELECT DISTINCT - col1 DIV col0 col0 FROM tab1 AS cor0
----
-8
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8644
SELECT DISTINCT - col1 / col0 col0 FROM tab1 AS cor0
----
-8
0

query I rowsort
SELECT DISTINCT col1 * col2 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT + col2 * - col1 * - cor0.col1 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT ALL - - col2 + - cor0.col2 AS col1 FROM tab2 cor0
----
0
0
0

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT NULL <= NULL OR cor0.col2 + + col2 <= ( col0 * cor0.col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT - col1 * + col2 + col2 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT - col2 * - col1 + - col1 AS col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT - + 30 - - col1 AS col2 FROM tab0 AS cor0
----
56
61
67

query I rowsort
SELECT ALL 91 + col1 * col2 AS col0 FROM tab0 AS cor0
----
188
2929
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col1 col0 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT - col0 + col1 * col2 * cor0.col2 FROM tab2 AS cor0
----
22592
24469
39806

query I rowsort
SELECT - + cor0.col1 + - col2 * - col0 FROM tab0 AS cor0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-8656
SELECT DISTINCT - + col1 DIV col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-8656
SELECT DISTINCT - + col1 / col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT col1 + - col1 * - col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT - tab2.col0 + tab2.col1 AS col1 FROM tab2
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-8659
SELECT col1 DIV col1 AS col1 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8659
SELECT col1 / col1 AS col1 FROM tab2
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8660
SELECT - col0 DIV col0 AS col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8660
SELECT - col0 / col0 AS col2 FROM tab1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col2 col0 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL col1 + col2 AS col0 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-8663
SELECT ALL - col2 + + col2 DIV col1 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-8663
SELECT ALL - col2 + + col2 / col1 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + cor0.col1 * col1 + col1 AS col0 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT ALL + col0 * + col0 + + col0 * col2 AS col0 FROM tab2 AS cor0
----
238
8112
9243

query I rowsort
SELECT - col0 + + cor0.col0 AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - tab0.col0 + col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT col2 - - col2 * col0 FROM tab1
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-8669
SELECT DISTINCT + col1 DIV - col2 + + col1 AS col0 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-8669
SELECT DISTINCT + col1 / - col2 + + col1 AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT + col2 - + col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT col0 + col0 FROM tab0 WHERE NOT col0 * + col2 IN ( col1 * + col1 )
----
178
48
70

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE col0 NOT IN ( col0 / col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) >= col0 * - col1 * col1 + - col0 * + col0
----

query I rowsort
SELECT ALL + col2 * col0 + col1 * + col0 * col0 FROM tab0
----
118860
50328
728109

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col1 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-8676
SELECT col0 DIV + col1 AS col1 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-8676
SELECT col0 / + col1 AS col1 FROM tab1
----
0
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-8677
SELECT + col2 + - col0 DIV col1 col2 FROM tab1 WHERE col1 * - col0 * col0 NOT IN ( + tab1.col1 )
----
51
54
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8677
SELECT + col2 + - col0 / col1 col2 FROM tab1 WHERE col1 * - col0 * col0 NOT IN ( + tab1.col1 )
----
51
54
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8678
SELECT + 45 * - col0 + CAST( NULL AS DECIMAL ) + - col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8678
SELECT + 45 * - col0 + CAST ( NULL AS REAL ) + - col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 57 * col1 + col2 AS col0 FROM tab2 AS cor0
----
-1740
-3337
-931

query I rowsort
SELECT - 52 FROM tab2 AS cor0
----
-52
-52
-52

query I rowsort
SELECT - col1 * col2 - + 80 * 22 AS col0 FROM tab2 AS cor0
----
-2406
-2597
-3294

onlyif mysql # use DIV operator for integer division
query I rowsort label-8682
SELECT + col1 + col2 DIV col0 AS col2 FROM tab0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-8682
SELECT + col1 + col2 / col0 AS col2 FROM tab0
----
87
91
97

query I rowsort
SELECT col0 + - col0 FROM tab1 WHERE NOT NULL >= col2 + col0 * col1 + - col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8684
SELECT ( col1 ) * col0 + col2 DIV - col2 AS col2 FROM tab0 AS cor0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-8684
SELECT ( col1 ) * col0 + col2 / - col2 AS col2 FROM tab0 AS cor0
----
2063
3394
8098

query I rowsort
SELECT + col2 * col1 + col1 * + col2 FROM tab2 AS cor0
----
1292
1674
3068

query I rowsort
SELECT ALL + col1 * - col0 + - col2 AS col1 FROM tab1 AS cor0
----
-1136
-132
-697

onlyif mysql # use DIV operator for integer division
query I rowsort label-8687
SELECT - cor0.col1 DIV + col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-8687
SELECT - cor0.col1 / + col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT DISTINCT - cor0.col2 * + col1 AS col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + col1 * - col2 + + cor0.col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT - col2 + + tab0.col2 FROM tab0
----
0

query I rowsort
SELECT - col2 + + col0 * col1 * + col1 - col2 * col1 FROM tab1
----
12176
570
5773

query I rowsort
SELECT ALL + col2 AS col0 FROM tab0 WHERE NOT NULL IN ( - col0 + col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8693
SELECT col1 + col1 DIV col2 AS col0 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-8693
SELECT col1 + col1 / col2 AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT - col1 + tab0.col2 AS col0 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT + col2 * col2 AS col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT col2 + + col1 * + tab0.col1 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT col1 + tab1.col2 + - col0 AS col1 FROM tab1
----
29
3
77

query I rowsort
SELECT - col0 * col1 FROM tab1 WHERE + col1 > NULL
----

query I rowsort
SELECT ALL col0 + + col1 * + col2 FROM tab1
----
1328
1407
634

query I rowsort
SELECT DISTINCT col2 + + tab0.col1 * + col0 AS col2 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT ALL tab1.col1 + - col0 AS col1 FROM tab1
----
-54
-67
23

query III rowsort
SELECT ALL * FROM tab0 WHERE ( col0 ) IN ( col1 + col0 )
----

query I rowsort
SELECT + col2 + + col0 + col2 AS col0 FROM tab2
----
130
155
61

query I rowsort
SELECT - col1 + - tab2.col0 AS col0 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT DISTINCT + col2 * + col2 + col2 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT + col1 * + tab1.col0 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT cor2.col1 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
243 values hashing to 42b04a30acb32fcd35bf97afdee87fe6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8708
SELECT ALL + - col0 * + col2 + CAST( NULL AS SIGNED ) * - ( + col1 * col2 ) + + col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8708
SELECT ALL + - col0 * + col2 + CAST ( NULL AS INTEGER ) * - ( + col1 * col2 ) + + col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 30 col1 FROM tab1, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

query I rowsort
SELECT ALL ( + 22 + col0 ) AS col2 FROM tab1
----
102
25
86

query I rowsort
SELECT col1 - - col0 FROM tab1
----
29
74
93

query I rowsort
SELECT - tab0.col1 + tab0.col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - 60 * + tab1.col1 AS col2 FROM tab1
----
-1560
-600
-780

query I rowsort
SELECT - - 43 AS col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

query I rowsort
SELECT ALL 55 FROM tab0
----
55
55
55

query I rowsort
SELECT + + 70 AS col1 FROM tab2 AS cor0
----
70
70
70

query I rowsort
SELECT ALL col0 * + col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col1 * 79 AS col1 FROM tab1
----
1027
2054
790

onlyif mysql # use DIV operator for integer division
query I rowsort label-8719
SELECT col0 + + 98 DIV col0 AS col1 FROM tab2 AS cor0
----
21
79
80

skipif mysql # not compatible
query I rowsort label-8719
SELECT col0 + + 98 / col0 AS col1 FROM tab2 AS cor0
----
21
79
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8720
SELECT - col0 + - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8720
SELECT - col0 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + col2 * col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL - + col0 + col1 AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT + col1 * 85 FROM tab2
----
1445
2635
5015

query I rowsort
SELECT + - col1 * + 23 + col2 AS col2 FROM tab0 AS cor0
----
-1945
-2011
-2230

query I rowsort
SELECT - 49 FROM tab0 cor0
----
-49
-49
-49

query I rowsort
SELECT + + 67 * 12 + - col0 AS col0 FROM tab1 AS cor0
----
724
740
801

query I rowsort
SELECT - 30 AS col0 FROM tab0 cor0
----
-30
-30
-30

query I rowsort
SELECT + col2 * + 71 + col2 AS col2 FROM tab2 AS cor0
----
1872
1944
2736

query I rowsort
SELECT DISTINCT 17 FROM tab1, tab0 AS cor0
----
17

query I rowsort
SELECT + ( + 52 ) FROM tab2 AS cor0
----
52
52
52

query I rowsort
SELECT col2 * + cor0.col2 + - col1 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT - col1 * 42 AS col1 FROM tab0 AS cor0
----
-3612
-3822
-4074

onlyif mysql # use DIV operator for integer division
query I rowsort label-8733
SELECT DISTINCT - col1 DIV + col0 + col0 AS col0 FROM tab0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-8733
SELECT DISTINCT - col1 / + col0 + col0 AS col0 FROM tab0
----
21
33
88

query I rowsort
SELECT - 80 * - col2 + col1 AS col0 FROM tab1 AS cor0
----
4346
4570
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 22 col2 FROM tab2
----
22
22
22

query I rowsort
SELECT col0 - col0 * - col1 AS col1 FROM tab0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 75 col0 FROM tab1 AS cor0
----
-75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8738
SELECT DISTINCT CAST( NULL AS SIGNED ) * + col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8738
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col2 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT - col0 * col2 + col0 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8741
SELECT ALL - - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8741
SELECT ALL - - CAST ( NULL AS REAL ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * col1 + + col0 AS col1 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT ALL + col0 * col1 - col0 * - col1 FROM tab2 cor0
----
2686
434
9204

onlyif mysql # use DIV operator for integer division
query I rowsort label-8744
SELECT ALL col1 + + col1 * col0 DIV cor0.col0 AS col0 FROM tab2 cor0
----
118
34
62

skipif mysql # not compatible
query I rowsort label-8744
SELECT ALL col1 + + col1 * col0 / cor0.col0 AS col0 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT 9 FROM tab1 cor0
----
9
9
9

query I rowsort
SELECT DISTINCT + - col0 - col2 AS col0 FROM tab2 cor0
----
-104
-117
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-8747
SELECT ALL - col0 + col0 DIV - col1 FROM tab2 AS cor0
----
-7
-79
-83

skipif mysql # not compatible
query I rowsort label-8747
SELECT ALL - col0 + col0 / - col1 FROM tab2 AS cor0
----
-7
-79
-83

query I rowsort
SELECT DISTINCT - col1 * col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - - cor0.col0 * - cor0.col2 * + col2 AS col1 FROM tab2 cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL - col1 + col1 * col2 FROM tab2 AS cor0
----
1475
629
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-8751
SELECT ALL - col0 DIV - col0 + col1 col1 FROM tab2
----
18
32
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8751
SELECT ALL - col0 / - col0 + col1 col1 FROM tab2
----
18
32
60

query I rowsort
SELECT DISTINCT + 57 AS col1 FROM tab1
----
57

query I rowsort
SELECT 46 - + 95 AS col1 FROM tab1
----
-49
-49
-49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8754
SELECT CAST( NULL AS DECIMAL ) col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8754
SELECT CAST ( NULL AS REAL ) col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8755
SELECT ALL col0 * col2 DIV col1 AS col1 FROM tab1 AS cor0
----
364
590
6

skipif mysql # not compatible
query I rowsort label-8755
SELECT ALL col0 * col2 / col1 AS col1 FROM tab1 AS cor0
----
364
590
6

query I rowsort
SELECT DISTINCT col0 * - col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT ALL - 16 * + col2 FROM tab0 AS cor0
----
-1312
-16
-528

query I rowsort
SELECT col2 + col0 * + col2 AS col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - ( + ( tab1.col0 ) ) FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT - - col2 - - 89 * - col1 FROM tab2 AS cor0
----
-1475
-2732
-5225

query I rowsort
SELECT + + col0 + - col0 * + col1 AS col1 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT col0 + - ( col2 ) AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + col2 * ( - col2 ) * + col2 + col2 AS col2 FROM tab1 AS cor0
----
-157410
-185136
-884640

onlyif mysql # use DIV operator for integer division
query I rowsort label-8765
SELECT + col1 DIV col0 col0 FROM tab0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8765
SELECT + col1 / col0 col0 FROM tab0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * col2 col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT col0 - + cor0.col2 * 89 * col2 FROM tab2 AS cor0
----
-128437
-60086
-64874

query I rowsort
SELECT ALL col0 * 91 FROM tab1 AS cor0
----
273
5824
7280

query I rowsort
SELECT - 19 * col1 AS col0 FROM tab2
----
-1121
-323
-589

query I rowsort
SELECT - col0 * ( + col2 + tab1.col1 ) AS col1 FROM tab1
----
-240
-4288
-8720

query I rowsort
SELECT ALL - col1 * col0 * 95 + col1 + col1 AS col1 FROM tab0
----
-195908
-322331
-769223

query I rowsort
SELECT + col1 + - 41 AS col1 FROM tab0
----
45
50
56

query I rowsort
SELECT cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-8774
SELECT ALL col0 + col1 * col1 DIV col1 FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-8774
SELECT ALL col0 + col1 * col1 / col1 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL + cor0.col2 * col1 * cor0.col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT - + col0 * col0 + ( col0 ) * - 13 FROM tab1 AS cor0
----
-48
-4928
-7440

query I rowsort
SELECT DISTINCT - + col0 * 81 + + col0 FROM tab0 AS cor0
----
-1920
-2800
-7120

query I rowsort
SELECT ALL + col0 + - 96 * col2 FROM tab0 AS cor0
----
-3144
-61
-7783

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col1 + col2 * col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT - cor0.col2 + 65 + - col0 FROM tab1 AS cor0
----
-111
-56
8

query I rowsort
SELECT DISTINCT - cor0.col1 * - ( + col0 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT cor0.col0 * col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8784
SELECT ALL col1 DIV 38 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8784
SELECT ALL col1 / 38 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col1 * - 43 FROM tab1 AS cor0
----
-1118
-430
-559

query I rowsort
SELECT + - col0 + col1 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-8787
SELECT ALL 18 DIV - col2 AS col1 FROM tab0
----
-18
0
0

skipif mysql # not compatible
query I rowsort label-8787
SELECT ALL 18 / - col2 AS col1 FROM tab0
----
-18
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + ( 54 ) col0 FROM tab1 AS cor0
----
-162
-3456
-4320

query I rowsort
SELECT ALL - col1 * + col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - cor0.col0 * + col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - - cor0.col1 * + cor0.col2 + col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL + col2 * + 84 AS col2 FROM tab1 AS cor0
----
4536
4788
8064

query I rowsort
SELECT col1 - - 89 FROM tab2
----
106
120
148

query I rowsort
SELECT DISTINCT cor3.col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 cor1, tab1 AS cor2, tab0 cor3
----
1
33
82

query I rowsort
SELECT cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to 39c7e653e7a493eb9c9e3dad9ba3b8c2

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab2, tab2 cor1
----
972 values hashing to 163d7732097d78f1cda7f65c2cea5a08

query I rowsort
SELECT ALL col0 * + col2 + ( col1 ) AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT + + 60 + + col1 * ( + col2 ) FROM tab0 AS cor0
----
157
2898
7522

query I rowsort
SELECT DISTINCT + col0 * - col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - 4 FROM tab2 AS cor0
----
-4
-4
-4

query I rowsort
SELECT - col1 * 93 FROM tab0
----
-7998
-8463
-9021

query I rowsort
SELECT 67 + col2 FROM tab2
----
105
93
94

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
972 values hashing to e4c748f267e8d2a0e6d563281e1fb975

query I rowsort
SELECT col1 + - col0 * + tab0.col1 * ( + 45 ) AS col1 FROM tab0
----
-152678
-364364
-92794

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1, tab2 AS cor0, tab0 AS cor1
----
972 values hashing to 9a5ab925af18e11f7748f3b2e722ff3d

query I rowsort
SELECT - col0 + col2 * + col2 AS col1 FROM tab0
----
-34
1065
6635

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col0 col0 FROM tab1, tab2 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL + 66 FROM tab2
----
66
66
66

query I rowsort
SELECT - - col0 * col0 * - col2 FROM tab1 cor0
----
-233472
-486
-614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - col0 col1 FROM tab0 cor0
----
0

query I rowsort
SELECT ALL + col0 * - col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col1 * + 0 col0 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT + 45 * + col0 * + ( - ( + col2 ) ) AS col0 FROM tab1 AS cor0
----
-164160
-345600
-7290

query I rowsort
SELECT col2 * cor0.col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8815
SELECT 78 * - col2 + - CAST( - 96 AS SIGNED ) col2 FROM tab2
----
-1932
-2010
-2868

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8815
SELECT 78 * - col2 + - CAST ( - 96 AS INTEGER ) col2 FROM tab2
----
-1932
-2010
-2868

onlyif mysql # use DIV operator for integer division
query I rowsort label-8816
SELECT + col2 DIV col0 + col2 AS col1 FROM tab2
----
26
30
38

skipif mysql # not compatible
query I rowsort label-8816
SELECT + col2 / col0 + col2 AS col1 FROM tab2
----
26
30
38

query I rowsort
SELECT DISTINCT + 29 AS col0 FROM tab1
----
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-8818
SELECT DISTINCT + - 30 DIV col1 + cor0.col2 * 87 DIV col0 FROM tab0 AS cor0
----
119
2
80

skipif mysql # not compatible
query I rowsort label-8818
SELECT DISTINCT + - 30 / col1 + cor0.col2 * 87 / col0 FROM tab0 AS cor0
----
119
2
80

query I rowsort
SELECT DISTINCT - + col1 - + col1 AS col0 FROM tab0 cor0
----
-172
-182
-194

query I rowsort
SELECT ALL + col0 * + col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + - col1 * col1 - - col0 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT ALL 0 + ( + cor0.col2 ) * 78 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c486465fb1e5009840785baabf9312f3

query I rowsort
SELECT - 56 AS col1 FROM tab0
----
-56
-56
-56

query I rowsort
SELECT col0 + ( - 20 ) FROM tab0 AS cor0
----
15
4
69

query I rowsort
SELECT ALL - col2 + 66 * 56 FROM tab0 AS cor0
----
3614
3663
3695

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8826
SELECT 74 / + ( + tab1.col1 * CAST( NULL AS SIGNED ) ) col0 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-8826
SELECT 74 / + ( + tab1.col1 * CAST ( NULL AS INTEGER ) ) col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + 29 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

query I rowsort
SELECT DISTINCT 50 FROM tab0, tab0 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
50

query I rowsort
SELECT + cor0.col2 * cor0.col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8830
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8830
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-8831
SELECT ALL - tab1.col0 DIV - col0 AS col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8831
SELECT ALL - tab1.col0 / - col0 AS col0 FROM tab1
----
1
1
1

query I rowsort
SELECT - - col2 * cor0.col2 + - cor0.col2 * 49 * + col2 + - col2 AS col1 FROM tab1 AS cor0
----
-140022
-156009
-442464

query I rowsort
SELECT + col1 - - col2 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT 83 AS col0 FROM tab0, tab0 AS cor0
----
83

query I rowsort
SELECT DISTINCT + col1 * col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL + cor0.col0 + + 70 AS col0 FROM tab1 AS cor0
----
134
150
73

query I rowsort
SELECT + + col2 * col0 + - col1 * - col1 FROM tab2 AS cor0
----
1150
3291
5509

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8838
SELECT + CAST( NULL AS SIGNED ) + + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8838
SELECT + CAST ( NULL AS INTEGER ) + + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col0 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT + 12 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab2 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to 6a63085e8cab6f97591fd0a6b6ffff07

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * cor0.col2 + col2 col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT + + cor0.col1 * + cor0.col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - + cor0.col2 + col2 * col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT + col1 * - col0 + + cor0.col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL - 19 FROM tab2 cor0
----
-19
-19
-19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8847
SELECT - - 65 + - col0 * CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8847
SELECT - - 65 + - col0 * CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( + col0 ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT col0 * col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT col1 + - col0 * col2 FROM tab1
----
-136
-3638
-7667

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8851
SELECT ( col2 ) / - col0 + - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8851
SELECT ( col2 ) / - col0 + - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 + col2 * + ( - col1 * col0 ) col2 FROM tab0
----
-656019
-66048
0

query I rowsort
SELECT - ( + col1 * col1 ) + - col2 + - col2 AS col2 FROM tab2
----
-1015
-3533
-365

query I rowsort
SELECT DISTINCT ( col2 ) + + col2 FROM tab1
----
108
114
192

query I rowsort
SELECT + 28 * col1 AS col0 FROM tab0 AS cor0
----
2408
2548
2716

query I rowsort
SELECT + 88 + col1 AS col0 FROM tab1 AS cor0
----
101
114
98

query I rowsort
SELECT DISTINCT - 39 + col0 AS col2 FROM tab2
----
-32
39
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col0 col0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL 17 FROM tab0, tab2 cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT - ( ( col2 ) ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT col0 + - 3 FROM tab1 AS cor0
----
0
61
77

query I rowsort
SELECT + col0 + col2 * - cor0.col0 FROM tab1 cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT col0 * - col2 AS col0 FROM tab2
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 * - ( col0 ) col1 FROM tab0
----
1225
576
7921

query I rowsort
SELECT ALL + tab2.col0 * 77 FROM tab2
----
539
6006
6083

query I rowsort
SELECT - 60 FROM tab0
----
-60
-60
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 66 col2 FROM tab2
----
-66
-66
-66

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8869
SELECT DISTINCT 95 DIV col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-8869
SELECT DISTINCT 95 / col0 FROM tab0
----
1
2
3

query I rowsort
SELECT ALL cor0.col0 FROM tab0, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT + tab0.col2 AS col0 FROM tab0, tab1 AS cor0, tab0 cor1
----
1
33
82

query I rowsort
SELECT DISTINCT - col1 * tab0.col0 AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + ( - ( - col1 ) ) * + col0 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + 4 * - col1 + col2 * tab2.col2 FROM tab2
----
1376
440
605

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 col2 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8876
SELECT + col0 DIV tab1.col1 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-8876
SELECT + col0 / tab1.col1 FROM tab1
----
0
6
6

query I rowsort
SELECT - cor0.col0 * - col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - col2 * - col1 * - col2 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT ALL 38 FROM tab0
----
38
38
38

query I rowsort
SELECT 20 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab1, tab0 AS cor2
----
243 values hashing to 783fdb6630589eb0fa4e0c57a7c774ac

query I rowsort
SELECT 59 * col0 FROM tab1
----
177
3776
4720

query I rowsort
SELECT - col0 * cor0.col0 + - col2 * cor0.col2 AS col2 FROM tab0 cor0
----
-1226
-14645
-1665

query I rowsort
SELECT ALL + col0 + col1 * + col1 * - col2 AS col0 FROM tab2 AS cor0
----
-10903
-25940
-90428

query I rowsort
SELECT col2 * - ( tab1.col1 ) * + col1 FROM tab1
----
-16224
-36504
-5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-8885
SELECT - col0 DIV col0 + + 91 FROM tab0 AS cor0
----
90
90
90

skipif mysql # not compatible
query I rowsort label-8885
SELECT - col0 / col0 + + 91 FROM tab0 AS cor0
----
90
90
90

query I rowsort
SELECT - col2 * 73 FROM tab2 AS cor0
----
-1898
-1971
-2774

query I rowsort
SELECT col1 * col0 + - col0 AS col2 FROM tab1 AS cor0
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-8888
SELECT ALL - col0 DIV ( col2 ) - col0 AS col2 FROM tab0
----
-24
-70
-90

skipif mysql # not compatible
query I rowsort label-8888
SELECT ALL - col0 / ( col2 ) - col0 AS col2 FROM tab0
----
-24
-70
-90

query I rowsort
SELECT DISTINCT + col2 - col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT col1 - col2 * tab2.col1 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT - col0 + - tab0.col1 + - tab0.col1 FROM tab0
----
-196
-229
-271

skipif mysql # not compatible
query I rowsort
SELECT ALL col1 * - CAST ( + col0 AS REAL ) AS col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + col2 - + ( col0 ) * col1 AS col1 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT - col0 + 69 * col1 FROM tab2 AS cor0
----
1094
2132
3993

query I rowsort
SELECT - + col1 * ( - 58 ) + - col2 AS col1 FROM tab1 AS cor0
----
1454
523
658

query I rowsort
SELECT ALL + - 73 FROM tab0, tab2 AS cor0
----
9 values hashing to 84ab9db5468b4a1781bd8d5c8e0e77fc

onlyif mysql # use DIV operator for integer division
query I rowsort label-8897
SELECT - col2 DIV + col1 + + 62 - col1 AS col2 FROM tab2
----
3
31
43

skipif mysql # not compatible
query I rowsort label-8897
SELECT - col2 / + col1 + + 62 - col1 AS col2 FROM tab2
----
3
31
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col2 + - col2 + ( + col1 + - tab1.col0 * + col2 ) col1 FROM tab1
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-8899
SELECT DISTINCT tab1.col0 DIV + col2 + - col2 AS col2 FROM tab1
----
-54
-56
-96

skipif mysql # not compatible
query I rowsort label-8899
SELECT DISTINCT tab1.col0 / + col2 + - col2 AS col2 FROM tab1
----
-54
-56
-96

query I rowsort
SELECT col1 + 71 * col2 AS col0 FROM tab1 AS cor0
----
3860
4057
6829

onlyif mysql # use DIV operator for integer division
query I rowsort label-8901
SELECT DISTINCT + col2 DIV - ( col0 ) - col1 FROM tab2 AS cor0
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort label-8901
SELECT DISTINCT + col2 / - ( col0 ) - col1 FROM tab2 AS cor0
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col1 AS REAL ) * col1 + col1 * - col1 FROM tab0 AS cor0
----
-14792
-16562
-18818

query I rowsort
SELECT + col0 * - col2 AS col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT + + ( - 40 ) + + col2 FROM tab2 AS cor0
----
-13
-14
-2

query I rowsort
SELECT DISTINCT + + 3 * + col1 AS col1 FROM tab1 AS cor0
----
30
39
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col0 * - col2 + col0 col0 FROM tab1
----
-207872
-737200
-8745

query I rowsort
SELECT - 41 * col2 + - col1 AS col2 FROM tab2 AS cor0
----
-1125
-1138
-1575

query I rowsort
SELECT + 21 + 77 FROM tab0 AS cor0
----
98
98
98

query I rowsort
SELECT - 61 + - cor0.col0 FROM tab0 AS cor0
----
-150
-85
-96

query I rowsort
SELECT DISTINCT col1 + 40 AS col1 FROM tab2 AS cor0
----
57
71
99

query I rowsort
SELECT DISTINCT + - col1 + - col2 - - col0 FROM tab2 AS cor0
----
-51
-7
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-8912
SELECT DISTINCT + 78 DIV - col0 + col0 + + 87 FROM tab0 AS cor0
----
108
120
176

skipif mysql # not compatible
query I rowsort label-8912
SELECT DISTINCT + 78 / - col0 + col0 + + 87 FROM tab0 AS cor0
----
108
120
176

query I rowsort
SELECT DISTINCT - 25 FROM tab2 AS cor0
----
-25

query I rowsort
SELECT DISTINCT + + ( + col2 ) FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8915
SELECT DISTINCT - 96 DIV 14 AS col1 FROM tab2 AS cor0
----
-6

skipif mysql # not compatible
query I rowsort label-8915
SELECT DISTINCT - 96 / 14 AS col1 FROM tab2 AS cor0
----
-6

query I rowsort
SELECT ALL + col1 * + col0 + col2 + ( col1 ) AS col2 FROM tab2 AS cor0
----
1398
275
4687

query I rowsort
SELECT ALL + 99 * + col2 FROM tab0 AS cor0
----
3267
8118
99

query I rowsort
SELECT - - ( + 70 ) * col1 * - 53 + 72 * col1 * col2 AS col2 FROM tab2 AS cor0
----
-108442
-16558
-54746

query I rowsort
SELECT - - col1 + + col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT - col0 + - col2 AS col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT ALL + col2 * col2 AS col0 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT col1 * col1 + cor0.col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT - - 5 * col1 FROM tab1 AS cor0
----
130
50
65

query I rowsort
SELECT 89 * - col1 AS col2 FROM tab0 AS cor0
----
-7654
-8099
-8633

onlyif mysql # use DIV operator for integer division
query I rowsort label-8925
SELECT DISTINCT - col2 + ( + col2 ) DIV col1 AS col2 FROM tab1 AS cor0
----
-52
-89

skipif mysql # not compatible
query I rowsort label-8925
SELECT DISTINCT - col2 + ( + col2 ) / col1 AS col2 FROM tab1 AS cor0
----
-52
-89

query I rowsort
SELECT ALL col0 + 32 AS col0 FROM tab1 AS cor0
----
112
35
96

query I rowsort
SELECT - col0 + ( col1 ) - col0 * col1 FROM tab0 AS cor0
----
-2002
-3333
-8097

query I rowsort
SELECT + col2 * + col2 - col0 FROM tab0 cor0
----
-34
1065
6635

onlyif mysql # use DIV operator for integer division
query I rowsort label-8929
SELECT ALL + col0 + + col0 DIV 66 FROM tab2 AS cor0
----
7
79
80

skipif mysql # not compatible
query I rowsort label-8929
SELECT ALL + col0 + + col0 / 66 FROM tab2 AS cor0
----
7
79
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8930
SELECT - col0 DIV col0 AS col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8930
SELECT - col0 / col0 AS col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT 55 AS col2 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT ALL col1 * - col1 AS col1 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT - ( col1 + - col1 ) AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT + 39 FROM tab1, tab2 AS cor0
----
39

query I rowsort
SELECT cor0.col1 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - 78 AS col2 FROM tab0 cor0
----
-78
-78
-78

query I rowsort
SELECT DISTINCT 25 * + col2 - col0 AS col1 FROM tab2 AS cor0
----
572
668
871

query I rowsort
SELECT DISTINCT - - cor0.col0 AS col2 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT col1 * col1 + + col0 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT ALL + 71 + ( col2 + 34 ) AS col2 FROM tab1 AS cor0
----
159
162
201

query I rowsort
SELECT DISTINCT col2 * - col0 AS col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + ( + col1 ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - col2 * col2 + + cor0.col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT ALL + col2 - col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - col1 * col1 + - col1 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT DISTINCT - + col0 + col2 FROM tab0 AS cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 16 + col2 col1 FROM tab1 AS cor0
----
112
70
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-8948
SELECT ALL + cor0.col2 + col0 - - 36 DIV col1 FROM tab1 cor0
----
124
178
58

skipif mysql # not compatible
query I rowsort label-8948
SELECT ALL + cor0.col2 + col0 - - 36 / col1 FROM tab1 cor0
----
124
178
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + col1 * ( 50 ) col2 FROM tab0 AS cor0
----
4333
4632
4851

query I rowsort
SELECT DISTINCT + col1 + + col0 * col1 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT - - cor0.col0 + cor0.col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT 75 FROM tab1 AS cor0
----
75
75
75

query I rowsort
SELECT + col2 + col1 AS col0 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8954
SELECT ( - col1 ) + + tab0.col2 DIV col1 col0 FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8954
SELECT ( - col1 ) + + tab0.col2 / col1 col0 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT cor1.col0 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT - 85 * - col0 FROM tab1 AS cor0
----
255
5440
6800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col2 * - ( - 85 ) col1 FROM tab0 AS cor0
----
-2975
-620330
-67320

query I rowsort
SELECT ALL + cor0.col2 * + col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT col0 * - col1 * - col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL - + col2 + + 22 AS col2 FROM tab0 AS cor0
----
-11
-60
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-8961
SELECT + col2 DIV - col1 AS col0 FROM tab2 cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-8961
SELECT + col2 / - col1 AS col0 FROM tab2 cor0
----
-2
0
0

query I rowsort
SELECT - - cor0.col1 + 12 * - cor0.col1 AS col1 FROM tab0 cor0
----
-1001
-1067
-946

query I rowsort
SELECT ALL + cor0.col2 * col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + - col0 * - col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + col2 * col2 * - col0 AS col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL + col1 * ( + col1 ) FROM tab1 AS cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col0 + - 61 col1 FROM tab2 AS cor0
----
-12
6023
6180

query I rowsort
SELECT DISTINCT col2 * - col2 AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-8970
SELECT ALL + col1 * 78 DIV + col0 FROM tab0 AS cor0
----
216
279
79

skipif mysql # not compatible
query I rowsort label-8970
SELECT ALL + col1 * 78 / + col0 FROM tab0 AS cor0
----
216
279
79

skipif mysql # not compatible
query I rowsort
SELECT - + cor0.col2 * CAST ( + 47 * - col1 AS REAL ) + - ( cor0.col0 ) FROM tab2 AS cor0
----
30283
39332
72020

query I rowsort
SELECT ALL + - col2 + 95 FROM tab0 AS cor0
----
13
62
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-8973
SELECT DISTINCT - + cor0.col0 + 49 DIV - col2 AS col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-8973
SELECT DISTINCT - + cor0.col0 + 49 / - col2 AS col2 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8974
SELECT - col2 DIV + col0 + cor0.col1 * + cor0.col2 * ( + 36 ) FROM tab0 AS cor0
----
102167
268632
3492

skipif mysql # not compatible
query I rowsort label-8974
SELECT - col2 / + col0 + cor0.col1 * + cor0.col2 * ( + 36 ) FROM tab0 AS cor0
----
102167
268632
3492

query I rowsort
SELECT ALL - + cor0.col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL + - col2 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8977
SELECT CAST( NULL AS SIGNED ) * - 52 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8977
SELECT CAST ( NULL AS INTEGER ) * - 52 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 99 FROM tab0, tab2 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT ALL + ( + col2 ) * cor0.col0 + - col1 FROM tab2 cor0
----
158
1969
2985

query I rowsort
SELECT + 97 * + col2 * - col1 FROM tab0 AS cor0
----
-275286
-723814
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8981
SELECT - col2 * CAST( - 22 AS SIGNED ) AS col0 FROM tab2
----
572
594
836

skipif mysql # not compatible
query I rowsort label-8981
SELECT - col2 * CAST ( - 22 AS INTEGER ) AS col0 FROM tab2
----
572
594
836

query I rowsort
SELECT DISTINCT 70 AS col1 FROM tab2, tab1 AS cor0
----
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8983
SELECT + + CAST( NULL AS SIGNED ) * cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8983
SELECT + + CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 + + col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT + + col1 + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT tab2.col1 * tab2.col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT + col2 + + col0 + col2 AS col2 FROM tab1
----
111
178
272

query I rowsort
SELECT + 64 AS col0 FROM tab2
----
64
64
64

query I rowsort
SELECT 19 * + col0 AS col0 FROM tab2
----
133
1482
1501

query I rowsort
SELECT DISTINCT col0 * 63 AS col2 FROM tab0
----
1512
2205
5607

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col2 ) * + col2 col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + + 72 FROM tab2 cor0
----
72

query I rowsort
SELECT 90 * col2 + + col2 FROM tab1 AS cor0
----
4914
5187
8736

query I rowsort
SELECT ( + col1 ) * col1 AS col0 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - col0 * - ( - col0 ) FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL col1 * 64 AS col1 FROM tab1
----
1664
640
832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col2 + - ( - 67 ) col1 FROM tab0
----
164
2905
7529

query I rowsort
SELECT ALL + col1 + - col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - + col2 + col1 * + col1 FROM tab1 cor0
----
43
622
73

query I rowsort
SELECT + col0 - - ( col2 * - col0 ) FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT - 22 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-22

query I rowsort
SELECT col2 * 98 FROM tab1
----
5292
5586
9408

query I rowsort
SELECT DISTINCT - col1 * + tab1.col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - col1 + + ( cor0.col1 * cor0.col1 ) - + col2 FROM tab2 AS cor0
----
234
3396
903

query I rowsort
SELECT ALL col2 + - col0 FROM tab1 cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9006
SELECT ALL + col0 * CAST( NULL AS SIGNED ) + - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9006
SELECT ALL + col0 * CAST ( NULL AS INTEGER ) + - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL - col0 * - col2 + 34 * col2 FROM tab1 AS cor0
----
10944
1998
5586

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 + ( - 1 ) col0 FROM tab0 AS cor0
----
2063
3394
8098

query I rowsort
SELECT - col1 - cor0.col2 * - 84 FROM tab0 AS cor0
----
-13
2686
6797

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9011
SELECT - + col0 * - col1 + + CAST( 94 AS SIGNED ) FROM tab2 AS cor0
----
1437
311
4696

skipif mysql # not compatible
query I rowsort label-9011
SELECT - + col0 * - col1 + + CAST ( 94 AS INTEGER ) FROM tab2 AS cor0
----
1437
311
4696

query I rowsort
SELECT + + col2 + - col0 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9013
SELECT - col2 * - col2 * CAST( NULL AS DECIMAL ) + col2 * - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9013
SELECT - col2 * - col2 * CAST ( NULL AS REAL ) + col2 * - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + col0 * + col1 AS col1 FROM tab0 cor0
----
1978
3298
8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-9015
SELECT + col2 + col1 * + 13 * + col1 + col2 DIV cor0.col0 FROM tab2 cor0
----
12523
3795
45279

skipif mysql # not compatible
query I rowsort label-9015
SELECT + col2 + col1 * + 13 * + col1 + col2 / cor0.col0 FROM tab2 cor0
----
12523
3795
45279

query I rowsort
SELECT + + col2 * + col1 + 75 * col0 FROM tab1 AS cor0
----
1629
5370
7248

query I rowsort
SELECT DISTINCT + col2 - 33 AS col0 FROM tab0 AS cor0
----
-32
0
49

query I rowsort
SELECT ALL - cor0.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT col1 * - 83 FROM tab0 cor0
----
-7138
-7553
-8051

query I rowsort
SELECT ALL 85 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to e4cf94cf0cc632acff30ad1dac617cb7

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab1 cor1, tab1 AS cor2
----
972 values hashing to ed80235f6457dada5cbb50ce9e2a8923

query I rowsort
SELECT - 4 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

query I rowsort
SELECT - - cor0.col0 + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT 66 AS col2 FROM tab0 AS cor0
----
66
66
66

query I rowsort
SELECT ALL col2 * tab2.col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL - + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

onlyif mysql # use DIV operator for integer division
query I rowsort label-9027
SELECT + ( col0 ) DIV - cor0.col1 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-9027
SELECT + ( col0 ) / - cor0.col1 FROM tab2 cor0
----
-1
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9028
SELECT + col0 + 75 DIV col1 FROM tab2 AS cor0
----
79
83
9

skipif mysql # not compatible
query I rowsort label-9028
SELECT + col0 + 75 / col1 FROM tab2 AS cor0
----
79
83
9

query I rowsort
SELECT + + col2 + + 14 FROM tab2 AS cor0
----
40
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9030
SELECT - - CAST( col2 AS SIGNED ) col2 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9030
SELECT - - CAST ( col2 AS INTEGER ) col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT col1 * tab1.col0 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( - col1 ) col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - - col2 * col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT cor0.col1 * col2 AS col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT - col0 * - cor0.col0 + - col0 * col1 FROM tab0 AS cor0
----
-1488
-178
-2170

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9036
SELECT ALL CAST( + ( - col0 ) AS SIGNED ) + col1 * tab0.col2 - - col2 AS col0 FROM tab0
----
2847
63
7455

skipif mysql # not compatible
query I rowsort label-9036
SELECT ALL CAST ( + ( - col0 ) AS INTEGER ) + col1 * tab0.col2 - - col2 AS col0 FROM tab0
----
2847
63
7455

onlyif mysql # use DIV operator for integer division
query I rowsort label-9037
SELECT - 41 DIV - tab1.col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9037
SELECT - 41 / - tab1.col2 FROM tab1
----
0
0
0

query I rowsort
SELECT col2 - - col1 * col2 AS col0 FROM tab0 cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT ( col2 ) + + 61 * 76 * col1 FROM tab2 AS cor0
----
143743
273550
78850

query I rowsort
SELECT DISTINCT - col1 + - col0 AS col1 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT 52 * col0 FROM tab0 AS cor0
----
1248
1820
4628

query IIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 WHERE ( NULL ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT + ( col1 ) * + cor0.col1 + col2 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT + ( - col1 ) + col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL 47 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT + cor0.col1 FROM tab2, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1, tab2, tab2 cor0
----
17
31
59

query I rowsort
SELECT + col1 * - col1 + col0 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT ALL + col0 * tab0.col1 + - col2 + + col1 * - col0 AS col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT col2 + col2 AS col2 FROM tab1
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-9051
SELECT - col2 DIV + col2 + - 22 - + col0 col2 FROM tab1
----
-103
-26
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9051
SELECT - col2 / + col2 + - 22 - + col0 col2 FROM tab1
----
-103
-26
-87

query I rowsort
SELECT ALL 51 - col2 AS col2 FROM tab1
----
-3
-45
-6

query I rowsort
SELECT ALL tab2.col2 - - col0 FROM tab2
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-9054
SELECT ALL + col2 + col0 DIV col2 + tab0.col2 * + col1 AS col1 FROM tab0
----
133
2871
7545

skipif mysql # not compatible
query I rowsort label-9054
SELECT ALL + col2 + col0 / col2 + tab0.col2 * + col1 AS col1 FROM tab0
----
133
2871
7545

query I rowsort
SELECT ALL + - col1 * col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col2 * - col2 FROM tab2 cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-9057
SELECT - cor0.col2 + col0 * col2 DIV col2 + - cor0.col1 FROM tab1 AS cor0
----
-29
-3
-77

skipif mysql # not compatible
query I rowsort label-9057
SELECT - cor0.col2 + col0 * col2 / col2 + - cor0.col1 FROM tab1 AS cor0
----
-29
-3
-77

query I rowsort
SELECT ALL - 64 FROM tab2 cor0
----
-64
-64
-64

query I rowsort
SELECT cor0.col2 + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + col0 * col0 AS col1 FROM tab1
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-9061
SELECT col2 DIV - col0 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-9061
SELECT col2 / - col0 FROM tab2
----
-3
0
0

query I rowsort
SELECT ALL - col0 * 21 + 30 AS col2 FROM tab0
----
-1839
-474
-705

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9063
SELECT - col0 - CAST( NULL AS SIGNED ) AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9063
SELECT - col0 - CAST ( NULL AS INTEGER ) AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * col2 + - col2 FROM tab0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - 93 + col1 * + 4 * 81 col2 FROM tab1 AS cor0
----
2310
3003
6006

query I rowsort
SELECT DISTINCT 49 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
49

query I rowsort
SELECT - + col1 + 55 FROM tab0 AS cor0
----
-31
-36
-42

query I rowsort
SELECT - 37 + - col2 * - col0 FROM tab0 AS cor0
----
-2
7261
755

query I rowsort
SELECT col0 + + col0 AS col1 FROM tab2
----
14
156
158

query I rowsort
SELECT ALL ( cor0.col2 ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + ( col0 ) + + col0 * 49 FROM tab1 AS cor0
----
150
3200
4000

query I rowsort
SELECT 63 FROM tab1 AS cor0
----
63
63
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-9073
SELECT DISTINCT - col1 * col1 - col0 DIV CAST( - col0 * col1 + col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-9073
SELECT DISTINCT - col1 * col1 - col0 / CAST ( - col0 * col1 + col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( - col0 ) * col2 + 87 * + 28 col2 FROM tab1 AS cor0
----
10116
2598
6084

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - 40 ) col2 FROM tab0 AS cor0
----
40
40
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-9076
SELECT DISTINCT - 30 + cor0.col2 + - col1 DIV - col0 AS col0 FROM tab1 AS cor0
----
27
32
66

skipif mysql # not compatible
query I rowsort label-9076
SELECT DISTINCT - 30 + cor0.col2 + - col1 / - col0 AS col0 FROM tab1 AS cor0
----
27
32
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-9077
SELECT DISTINCT ( - col2 ) DIV + cor0.col0 + + ( + col1 ) AS col2 FROM tab1 AS cor0
----
10
12
8

skipif mysql # not compatible
query I rowsort label-9077
SELECT DISTINCT ( - col2 ) / + cor0.col0 + + ( + col1 ) AS col2 FROM tab1 AS cor0
----
10
12
8

query I rowsort
SELECT 78 FROM tab2 AS cor0
----
78
78
78

query I rowsort
SELECT DISTINCT col2 + + col2 * 96 FROM tab2
----
2522
2619
3686

query I rowsort
SELECT - 93 FROM tab1
----
-93
-93
-93

query I rowsort
SELECT DISTINCT 80 + + col0 * - col1 AS col1 FROM tab1
----
-560
-960
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 14 + + col1 col0 FROM tab0
----
100
105
111

query I rowsort
SELECT - 28 + col2 AS col0 FROM tab0
----
-27
5
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9084
SELECT - tab2.col2 * + col1 - - CAST( - col0 AS SIGNED ) * col2 AS col1 FROM tab2
----
-1026
-3562
-3648

skipif mysql # not compatible
query I rowsort label-9084
SELECT - tab2.col2 * + col1 - - CAST ( - col0 AS INTEGER ) * col2 AS col1 FROM tab2
----
-1026
-3562
-3648

query I rowsort
SELECT + - 46 + - col0 AS col0 FROM tab0 AS cor0
----
-135
-70
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-9086
SELECT ALL + ( + col2 ) + + 60 + col1 DIV - col1 AS col1 FROM tab0 AS cor0
----
141
60
92

skipif mysql # not compatible
query I rowsort label-9086
SELECT ALL + ( + col2 ) + + 60 + col1 / - col1 AS col1 FROM tab0 AS cor0
----
141
60
92

query I rowsort
SELECT - 93 AS col1 FROM tab0
----
-93
-93
-93

query I rowsort
SELECT DISTINCT tab2.col0 * - col1 + ( + col1 ) FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT ALL 79 + col1 AS col0 FROM tab1
----
105
89
92

query I rowsort
SELECT - col1 * col0 + col1 * - col0 AS col0 FROM tab1
----
-1280
-156
-2080

query I rowsort
SELECT ALL - - col2 * + col1 + col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT + - col0 * 18 + + cor0.col1 FROM tab0 AS cor0
----
-1511
-346
-533

query I rowsort
SELECT DISTINCT + col0 * + 31 - + 95 * - col2 FROM tab0 AS cor0
----
10549
1180
3879

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col1 * - col1 + col2 col0 FROM tab1 AS cor0
----
-17522
-2101
-943

query I rowsort
SELECT ALL - col0 + 87 FROM tab2 AS cor0
----
8
80
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-9096
SELECT - col1 + + 29 DIV 59 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-9096
SELECT - col1 + + 29 / 59 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - ( col2 ) col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - + col2 * - 20 FROM tab2 AS cor0
----
520
540
760

query I rowsort
SELECT ALL - col2 - cor0.col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL col2 * 57 FROM tab2 AS cor0
----
1482
1539
2166

query I rowsort
SELECT DISTINCT + col1 + col2 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - - col1 * col0 * + 26 FROM tab1 AS cor0
----
16640
2028
27040

onlyif mysql # use DIV operator for integer division
query I rowsort label-9103
SELECT + + col1 DIV - col0 + - col2 + col2 AS col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-9103
SELECT + + col1 / - col0 + - col2 + col2 AS col0 FROM tab2 AS cor0
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab2, tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9105
SELECT - col2 - + col0 * + col0 * CAST( cor0.col0 AS SIGNED ) FROM tab2 AS cor0
----
-370
-474578
-493077

skipif mysql # not compatible
query I rowsort label-9105
SELECT - col2 - + col0 * + col0 * CAST ( cor0.col0 AS INTEGER ) FROM tab2 AS cor0
----
-370
-474578
-493077

query I rowsort
SELECT DISTINCT - + col1 * col2 - - col1 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + cor0.col1 col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - ( col2 ) - + cor0.col2 * col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT DISTINCT - 28 + col2 + + col1 AS col2 FROM tab2 cor0
----
27
30
57

query I rowsort
SELECT DISTINCT + 67 * col0 AS col0 FROM tab0 AS cor0
----
1608
2345
5963

query I rowsort
SELECT ALL - 67 - 46 AS col0 FROM tab0 AS cor0
----
-113
-113
-113

query I rowsort
SELECT + + 17 + col2 FROM tab2 AS cor0
----
43
44
55

query I rowsort
SELECT - col1 + ( + col2 ) * ( col2 ) * + col2 AS col1 FROM tab0 cor0
----
-96
35851
551277

query I rowsort
SELECT - - col1 * - 60 + col1 + 3 * + 38 FROM tab0 AS cor0
----
-4960
-5255
-5609

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9115
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9115
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col1 + + 28 AS col1 FROM tab2 cor0
----
45
59
87

query I rowsort
SELECT DISTINCT + - 44 - - col0 AS col1 FROM tab2 AS cor0
----
-37
34
35

query I rowsort
SELECT ALL + 80 AS col1 FROM tab2 AS cor0
----
80
80
80

query I rowsort
SELECT - - col2 - - ( col1 ) FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + cor0.col1 - col1 col2 FROM tab2 AS cor0
----
272
3422
930

onlyif mysql # use DIV operator for integer division
query I rowsort label-9121
SELECT ALL + ( 55 ) + cor0.col1 DIV 33 FROM tab0 AS cor0
----
57
57
57

skipif mysql # not compatible
query I rowsort label-9121
SELECT ALL + ( 55 ) + cor0.col1 / 33 FROM tab0 AS cor0
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 * col1 + col2 col1 FROM tab0 AS cor0
----
-555
-569
-678

query I rowsort
SELECT + 73 * - col2 + - col2 AS col2 FROM tab2 AS cor0
----
-1924
-1998
-2812

onlyif mysql # use DIV operator for integer division
query I rowsort label-9124
SELECT DISTINCT cor0.col1 DIV - col1 - 90 * + 55 * col1 AS col0 FROM tab0 AS cor0
----
-425701
-450451
-480151

skipif mysql # not compatible
query I rowsort label-9124
SELECT DISTINCT cor0.col1 / - col1 - 90 * + 55 * col1 AS col0 FROM tab0 AS cor0
----
-425701
-450451
-480151

query I rowsort
SELECT DISTINCT + col0 * cor0.col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - + col2 - + col0 AS col1 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT col1 * - col1 * - col0 + + col2 * col1 - col0 AS col1 FROM tab0 AS cor0
----
180318
329377
744382

query I rowsort
SELECT - 16 AS col2 FROM tab0 AS cor0
----
-16
-16
-16

query I rowsort
SELECT ALL cor0.col0 * - col0 + - col0 + col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - col2 + col1 AS col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT DISTINCT 56 - tab2.col2 AS col1 FROM tab2
----
18
29
30

query I rowsort
SELECT DISTINCT 15 - + col1 AS col0 FROM tab1
----
-11
2
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 8 col0 FROM tab1 AS cor0
----
8

query I rowsort
SELECT + col0 - + col2 * 23 AS col1 FROM tab2 AS cor0
----
-520
-614
-795

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( - col0 ) * col2 col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - cor0.col2 * col2 + col1 + cor0.col1 FROM tab1 AS cor0
----
-2864
-3229
-9190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 97 col0 FROM tab2 AS cor0
----
97

query I rowsort
SELECT DISTINCT - cor0.col1 + + col1 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - + 99 * - col0 FROM tab0 AS cor0
----
2376
3465
8811

query I rowsort
SELECT - 65 * + col1 + - 16 - + col2 FROM tab2 AS cor0
----
-1159
-2058
-3877

query IIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab0 cor1
----
54 values hashing to 3352c458f45211cf9aa3236c2cd6dd38

query I rowsort
SELECT 18 * + tab1.col0 AS col1 FROM tab1
----
1152
1440
54

query I rowsort
SELECT ALL - cor0.col1 + col1 AS col1 FROM tab2 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9144
SELECT DISTINCT 25 DIV - cor0.col0 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-9144
SELECT DISTINCT 25 / - cor0.col0 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT - col0 * - col1 + ( + col1 ) + + col1 AS col0 FROM tab2 AS cor0
----
1377
279
4720

query I rowsort
SELECT - + cor0.col0 + - cor0.col1 - - 14 FROM tab0 cor0
----
-118
-166
-96

query I rowsort
SELECT col1 + + cor0.col2 + 68 FROM tab1 AS cor0
----
135
148
177

query I rowsort
SELECT + col1 + - cor0.col0 * - col1 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT 97 * + col1 FROM tab2 AS cor0
----
1649
3007
5723

query I rowsort
SELECT col0 * col2 + - col2 AS col1 FROM tab2 AS cor0
----
162
2002
2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-9151
SELECT + col1 DIV col0 + col2 * + col1 FROM tab2
----
1534
646
841

skipif mysql # not compatible
query I rowsort label-9151
SELECT + col1 / col0 + col2 * + col1 FROM tab2
----
1534
646
841

query I rowsort
SELECT 75 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 3384246e49f3e69ba32c165b88111fee

onlyif mysql # use DIV operator for integer division
query I rowsort label-9153
SELECT col1 + col2 DIV - cor0.col1 col2 FROM tab1 AS cor0
----
24
5
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9153
SELECT col1 + col2 / - cor0.col1 col2 FROM tab1 AS cor0
----
24
5
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9154
SELECT DISTINCT col1 DIV + CAST( 80 AS SIGNED ) AS col2 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-9154
SELECT DISTINCT col1 / + CAST ( 80 AS INTEGER ) AS col2 FROM tab0
----
1

query I rowsort
SELECT + 16 FROM tab0, tab2 cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT ALL col0 * 15 FROM tab1
----
1200
45
960

query I rowsort
SELECT - 52 AS col0 FROM tab2 AS cor0
----
-52
-52
-52

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 cor1, tab0 AS cor2, tab1 AS cor3
----
3645 values hashing to 5d64bf87effa587b137e9591cd2c54bf

query I rowsort
SELECT col1 + - col2 * + col1 AS col2 FROM tab2
----
-1475
-629
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 31 col1 FROM tab2
----
31
31
31

query I rowsort
SELECT - 35 FROM tab2, tab0 AS cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

query I rowsort
SELECT - ( 39 ) FROM tab2
----
-39
-39
-39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 75 col2 FROM tab1, tab0, tab0 AS cor0
----
75

query I rowsort
SELECT 86 AS col0 FROM tab0
----
86
86
86

query I rowsort
SELECT - 27 FROM tab2
----
-27
-27
-27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9166
SELECT DISTINCT CAST( col1 AS SIGNED ) + col2 AS col0 FROM tab2
----
55
58
85

skipif mysql # not compatible
query I rowsort label-9166
SELECT DISTINCT CAST ( col1 AS INTEGER ) + col2 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL + ( col1 ) * + col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT 63 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT ALL - + 89 * + ( + col2 ) AS col1 FROM tab1 AS cor0
----
-4806
-5073
-8544

query I rowsort
SELECT cor1.col1 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9171
SELECT ALL CAST( - col2 AS SIGNED ) FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-9171
SELECT ALL CAST ( - col2 AS INTEGER ) FROM tab0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 75 col0 FROM tab0
----
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 5 col0 FROM tab0, tab0 AS cor0
----
5

query I rowsort
SELECT - - col0 + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + 0 * - cor0.col1 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-9176
SELECT 31 + + col2 DIV - col0 AS col0 FROM tab1 AS cor0
----
13
30
31

skipif mysql # not compatible
query I rowsort label-9176
SELECT 31 + + col2 / - col0 AS col0 FROM tab1 AS cor0
----
13
30
31

query I rowsort
SELECT ALL + + 10 * cor0.col2 * - cor0.col2 + ( - col1 ) * col1 FROM tab0 AS cor0
----
-18286
-75521
-9419

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( - col0 ) + cor0.col1 col2 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col0 + col2 col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL cor0.col0 + + 5 * + col0 * cor0.col1 FROM tab1 AS cor0
----
3264
393
5280

query I rowsort
SELECT DISTINCT 23 AS col1 FROM tab2
----
23

query I rowsort
SELECT DISTINCT 24 AS col1 FROM tab1
----
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT 23 FROM tab0 AS cor0
----
23
23
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9185
SELECT - col0 + CAST( - col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-104
-117
-34

skipif mysql # not compatible
query I rowsort label-9185
SELECT - col0 + CAST ( - col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT + col0 * 97 AS col0 FROM tab0 cor0
----
2328
3395
8633

query I rowsort
SELECT ALL - col1 * - cor0.col1 * col0 AS col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT - col0 * + ( col1 ) FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT 15 AS col2 FROM tab0
----
15
15
15

query I rowsort
SELECT tab1.col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT 28 * cor1.col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to de80fc70e79e9e7d591f8f9c82056ce5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 col1 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT 10 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-9194
SELECT ALL - + col2 DIV 54 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9194
SELECT ALL - + col2 / 54 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 * + col1 + - col0 * + col0 FROM tab1 AS cor0
----
-3456
-5360
69

query I rowsort
SELECT - ( - 32 ) FROM tab2, tab0 cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT - - col1 * - 68 AS col0 FROM tab2 AS cor0
----
-1156
-2108
-4012

query I rowsort
SELECT + col1 * + ( + 73 ) FROM tab1 AS cor0
----
1898
730
949

query I rowsort
SELECT col1 * + 39 + - cor0.col0 FROM tab2 cor0
----
1202
2223
584

onlyif mysql # use DIV operator for integer division
query I rowsort label-9200
SELECT DISTINCT + - col2 DIV col1 FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-9200
SELECT DISTINCT + - col2 / col1 FROM tab1 cor0
----
-2
-5
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * 12 col0 FROM tab0 AS cor0
----
12
396
984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col0 col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - 32 * tab0.col0 FROM tab0, tab0 cor0
----
-1120
-2848
-768

query I rowsort
SELECT DISTINCT - 71 * 56 AS col0 FROM tab2 cor0
----
-3976

query I rowsort
SELECT ( - col0 ) + - col2 AS col1 FROM tab1 cor0
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9206
SELECT ALL ( + 14 ) * col0 DIV 37 FROM tab1 AS cor0
----
1
24
30

skipif mysql # not compatible
query I rowsort label-9206
SELECT ALL ( + 14 ) * col0 / 37 FROM tab1 AS cor0
----
1
24
30

query I rowsort
SELECT DISTINCT ( col2 ) * col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - col1 * col1 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT + - 79 + - col0 * + col0 FROM tab0 cor0
----
-1304
-655
-8000

query I rowsort
SELECT ALL col0 * 45 FROM tab2
----
315
3510
3555

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 + + 49 col2 FROM tab2
----
127
128
56

query I rowsort
SELECT ALL + col1 * - 40 AS col2 FROM tab1
----
-1040
-400
-520

query I rowsort
SELECT col0 * ( + col1 ) + col2 FROM tab2
----
1381
244
4628

query I rowsort
SELECT + col0 + - ( + col1 ) * - tab1.col1 AS col2 FROM tab1
----
164
249
679

query I rowsort
SELECT ALL 83 FROM tab1 cor0
----
83
83
83

query I rowsort
SELECT DISTINCT 12 + col0 FROM tab1 AS cor0
----
15
76
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-9217
SELECT DISTINCT + col1 + col0 DIV + 79 AS col0 FROM tab1 AS cor0
----
10
14
26

skipif mysql # not compatible
query I rowsort label-9217
SELECT DISTINCT + col1 + col0 / + 79 AS col0 FROM tab1 AS cor0
----
10
14
26

query I rowsort
SELECT 84 FROM tab1, tab1 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT 80 + col1 + + ( col2 ) * + col2 * - col0 AS col2 FROM tab1 AS cor0
----
-207846
-737187
-8642

query I rowsort
SELECT col2 + cor0.col0 AS col0 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9221
SELECT ALL ( - col1 ) * CAST( - col1 AS SIGNED ) + - col2 + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9221
SELECT ALL ( - col1 ) * CAST ( - col1 AS INTEGER ) + - col2 + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 38 FROM tab1
----
38
38
38

query I rowsort
SELECT col2 * col2 + col2 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT DISTINCT + col2 * - col1 + col2 AS col0 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT 76 * col1 + tab0.col2 AS col1 FROM tab0
----
6569
6998
7373

query I rowsort
SELECT + 41 * - 73 * col1 AS col0 FROM tab1
----
-29930
-38909
-77818

query I rowsort
SELECT ALL 27 FROM tab2, tab2 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT DISTINCT col1 * - 54 * - col2 AS col2 FROM tab2
----
34884
45198
82836

query I rowsort
SELECT - 95 - + col0 AS col2 FROM tab0
----
-119
-130
-184

query I rowsort
SELECT ALL 49 * + col2 + + col2 FROM tab2
----
1300
1350
1900

onlyif mysql # use DIV operator for integer division
query I rowsort label-9231
SELECT DISTINCT + col0 DIV - tab0.col0 + - col2 AS col0 FROM tab0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-9231
SELECT DISTINCT + col0 / - tab0.col0 + - col2 AS col0 FROM tab0
----
-2
-34
-83

query I rowsort
SELECT + 10 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 92 * + cor0.col1 * + col0 col0 FROM tab0 AS cor0
----
-189888
-312340
-745108

query I rowsort
SELECT - + ( + col2 ) * + col1 + + col0 AS col2 FROM tab0 AS cor0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-9235
SELECT tab0.col2 + col0 DIV + col2 AS col1 FROM tab0
----
33
36
83

skipif mysql # not compatible
query I rowsort label-9235
SELECT tab0.col2 + col0 / + col2 AS col1 FROM tab0
----
33
36
83

query I rowsort
SELECT + - 71 FROM tab1 AS cor0
----
-71
-71
-71

query I rowsort
SELECT col1 * col0 * - col2 AS col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-9238
SELECT - + col1 * col0 + col0 + - 98 DIV - col2 col1 FROM tab1 cor0
----
-575
-74
-959

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9238
SELECT - + col1 * col0 + col0 + - 98 / - col2 col1 FROM tab1 cor0
----
-575
-74
-959

onlyif mysql # use DIV operator for integer division
query I rowsort label-9239
SELECT + 77 DIV col0 + CAST( col2 AS SIGNED ) - - col0 AS col2 FROM tab2 AS cor0
----
104
117
45

skipif mysql # not compatible
query I rowsort label-9239
SELECT + 77 / col0 + CAST ( col2 AS INTEGER ) - - col0 AS col2 FROM tab2 AS cor0
----
104
117
45

query I rowsort
SELECT + + cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT cor0.col2 + + cor0.col1 * - col2 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT + + ( col0 ) * cor0.col2 + col1 * col1 FROM tab1 AS cor0
----
3748
7849
838

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab2, tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + - col0 * cor0.col0 + 2 FROM tab2 AS cor0
----
-47
-6082
-6239

query I rowsort
SELECT DISTINCT tab2.col1 AS col1 FROM tab2, tab1, tab1 AS cor0
----
17
31
59

query I rowsort
SELECT - col2 + - col1 AS col1 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT 93 * 20 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 5b031b95dbce59dfcf35d18357d28927

query I rowsort
SELECT - col1 * tab1.col1 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT DISTINCT - 61 + + col1 * col0 AS col0 FROM tab1
----
17
579
979

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1, tab2, tab1 AS cor0, tab0 AS cor1
----
3
64
80

query I rowsort
SELECT ALL 74 FROM tab0
----
74
74
74

query I rowsort
SELECT ALL 60 * col0 AS col0 FROM tab0
----
1440
2100
5340

query I rowsort
SELECT col1 * + col0 * 90 FROM tab1
----
57600
7020
93600

query I rowsort
SELECT + - col2 * cor0.col0 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT DISTINCT + ( + col1 ) AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL tab0.col2 * col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT + col1 + - col0 * + col0 AS col1 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT 62 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9260
SELECT col1 DIV - 98 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9260
SELECT col1 / - 98 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 1 FROM tab1 cor0
----
1

query I rowsort
SELECT ALL - - 81 * 93 + + cor0.col2 * + col1 FROM tab0 AS cor0
----
10371
14995
7630

query I rowsort
SELECT + 97 * + col0 AS col2 FROM tab0 AS cor0
----
2328
3395
8633

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9264
SELECT CAST( NULL AS SIGNED ) * col1 col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9264
SELECT CAST ( NULL AS INTEGER ) * col1 col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - tab2.col2 * 30 * + tab2.col0 AS col1 FROM tab2
----
-5670
-60840
-90060

onlyif mysql # use DIV operator for integer division
query I rowsort label-9266
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-9266
SELECT ALL - col1 / ( col1 ) col2 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT - ( + 98 ) AS col1 FROM tab0
----
-98
-98
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-9268
SELECT + col0 DIV 63 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-9268
SELECT + col0 / 63 FROM tab2 AS cor0
----
0
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9269
SELECT DISTINCT + + col0 DIV 19 AS col0 FROM tab1 cor0
----
0
3
4

skipif mysql # not compatible
query I rowsort label-9269
SELECT DISTINCT + + col0 / 19 AS col0 FROM tab1 cor0
----
0
3
4

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - 96 AS REAL ) * - col1 AS col0 FROM tab0 cor0
----
-8256
-8736
-9312

query I rowsort
SELECT ALL - col0 * + col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9272
SELECT + CAST( - 6 AS SIGNED ) FROM tab0 AS cor0
----
-6
-6
-6

skipif mysql # not compatible
query I rowsort label-9272
SELECT + CAST ( - 6 AS INTEGER ) FROM tab0 AS cor0
----
-6
-6
-6

query I rowsort
SELECT ALL 85 * col2 FROM tab2 AS cor0
----
2210
2295
3230

query I rowsort
SELECT - col0 + col1 * + cor0.col2 FROM tab0 AS cor0
----
2814
62
7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col1 * col2 col2 FROM tab0 cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT 55 + col2 * col0 AS col2 FROM tab2 AS cor0
----
2083
244
3057

query I rowsort
SELECT ALL + - 52 + + 21 * + col2 FROM tab2 AS cor0
----
494
515
746

query I rowsort
SELECT ( col0 ) AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT ( - ( + col2 ) ) FROM tab2
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - 18 FROM tab1
----
-18

query I rowsort
SELECT ALL + 38 FROM tab1
----
38
38
38

query I rowsort
SELECT 83 AS col1 FROM tab2
----
83
83
83

query I rowsort
SELECT + 9 AS col0 FROM tab2 AS cor0
----
9
9
9

query I rowsort
SELECT DISTINCT - + ( + 85 ) + + col2 FROM tab1 cor0
----
-28
-31
11

query I rowsort
SELECT - 55 AS col1 FROM tab1 AS cor0
----
-55
-55
-55

query I rowsort
SELECT ALL - ( + col2 ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab1 AS cor1, tab0, tab2 cor2
----
3645 values hashing to 149298fc0224e93f3bc2df24a3ebeeb8

query I rowsort
SELECT cor1.col1 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-9289
SELECT 25 * cor0.col0 DIV + 77 FROM tab2, tab0 AS cor0
----
9 values hashing to 0c5c3a61aba68ddfe4b4e3a6dd512d4c

skipif mysql # not compatible
query I rowsort label-9289
SELECT 25 * cor0.col0 / + 77 FROM tab2, tab0 AS cor0
----
9 values hashing to 0c5c3a61aba68ddfe4b4e3a6dd512d4c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 36 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT DISTINCT 70 AS col1 FROM tab0
----
70

query I rowsort
SELECT + - 15 * - col1 + col2 AS col1 FROM tab0 AS cor0
----
1323
1447
1456

query I rowsort
SELECT + col2 * - col1 * col0 + - 61 FROM tab0 AS cor0
----
-3456
-664179
-68173

onlyif mysql # use DIV operator for integer division
query I rowsort label-9294
SELECT + col0 DIV col0 + col1 AS col2 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-9294
SELECT + col0 / col0 + col1 AS col2 FROM tab0 AS cor0
----
87
92
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-9295
SELECT - col0 + + col1 DIV col1 AS col0 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-9295
SELECT - col0 + + col1 / col1 AS col0 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT 90 - col0 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
139
6174
6331

query I rowsort
SELECT - 92 AS col1 FROM tab1 AS cor0
----
-92
-92
-92

query I rowsort
SELECT ALL - col0 * + ( + col0 * - col2 ) AS col2 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT - - col2 + 45 AS col0 FROM tab2 cor0
----
71
72
83

query I rowsort
SELECT - col2 * - 37 AS col2 FROM tab1
----
1998
2109
3552

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 71d467ba3372dfdd21847af1687c92e7

query I rowsort
SELECT cor0.col0 * 50 + col1 FROM tab0 AS cor0
----
1286
1847
4541

query I rowsort
SELECT + + col2 * - ( + cor0.col0 * + col2 ) + + col2 AS col0 FROM tab2 AS cor0
----
-114038
-5076
-52702

query I rowsort
SELECT col0 + + ( - col2 + - col2 ) FROM tab1 AS cor0
----
-105
-112
-50

query I rowsort
SELECT DISTINCT cor0.col2 + + ( col2 ) FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL + col2 + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - col2 + col1 * col2 AS col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT col2 * col2 + + col2 FROM tab2 cor0
----
1482
702
756

query I rowsort
SELECT + col0 + + col1 AS col0 FROM tab2 cor0
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9310
SELECT - - col0 + - CAST( NULL AS SIGNED ) / - col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9310
SELECT - - col0 + - CAST ( NULL AS INTEGER ) / - col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 50 FROM tab0 cor0
----
-50
-50
-50

query I rowsort
SELECT - ( + 75 ) * + cor0.col2 FROM tab1 AS cor0
----
-4050
-4275
-7200

query I rowsort
SELECT + 94 FROM tab1 AS cor0
----
94
94
94

query I rowsort
SELECT DISTINCT 60 AS col2 FROM tab1, tab0 cor0
----
60

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL col1 * ( 48 ) FROM tab2 AS cor0
----
1488
2832
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col0 col0 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col2 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + + col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT - + col0 * 6 FROM tab2 cor0
----
-42
-468
-474

query I rowsort
SELECT + col0 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL col2 + col1 * - ( - col2 ) FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT 77 FROM tab2
----
77
77
77

query I rowsort
SELECT DISTINCT tab1.col1 * - col0 AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col2 + cor0.col0 * + cor0.col2 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-9327
SELECT - - col1 DIV - CAST( - 56 AS SIGNED ) FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9327
SELECT - - col1 / - CAST ( - 56 AS INTEGER ) FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - col2 * 69 FROM tab2 AS cor0
----
-1794
-1863
-2622

query I rowsort
SELECT - - 97 AS col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

query I rowsort
SELECT col0 + 76 FROM tab0
----
100
111
165

onlyif mysql # use DIV operator for integer division
query I rowsort label-9331
SELECT ALL tab1.col2 DIV - 93 AS col1 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9331
SELECT ALL tab1.col2 / - 93 AS col1 FROM tab1
----
-1
0
0

query I rowsort
SELECT DISTINCT + 98 + tab0.col1 FROM tab0, tab2 AS cor0
----
184
189
195

query I rowsort
SELECT + tab1.col2 * - col0 + 32 * col2 AS col0 FROM tab1
----
-1824
-4608
1566

onlyif mysql # use DIV operator for integer division
query I rowsort label-9334
SELECT col2 DIV ( + col0 ) FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-9334
SELECT col2 / ( + col0 ) FROM tab2
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + + 97 * - col1 * col2 col0 FROM tab1 AS cor0
----
-120976
-136185
-55226

query I rowsort
SELECT - col2 * ( + 79 ) * cor0.col1 FROM tab0 AS cor0
----
-224202
-589498
-7663

query I rowsort
SELECT + col1 * tab0.col1 * col1 + col2 FROM tab0
----
636089
753653
912674

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT + col1 IN ( - col1 * + col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT ALL col2 - + col0 AS col1 FROM tab0
----
-34
-7
9

query I rowsort
SELECT - col0 * + col2 - + col0 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT - 57 AS col1 FROM tab2 AS cor0
----
-57
-57
-57

query I rowsort
SELECT DISTINCT + + 91 AS col0 FROM tab2 AS cor0
----
91

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( col2 ) NOT IN ( - tab2.col0 + + col0 + col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT ALL col1 + col1 * tab0.col1 + + col0 FROM tab0
----
7506
8461
9541

query I rowsort
SELECT DISTINCT + tab2.col0 * tab2.col2 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT col2 + col1 AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL - col0 * tab0.col2 + col0 * col0 + col0 FROM tab0
----
-192
1225
712

query I rowsort
SELECT col1 * - tab2.col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + col0 * + col2 * - col0 + + col0 * - col1 FROM tab1
----
-234112
-564
-615440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 col1 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT + col1 + tab0.col1 FROM tab0
----
172
182
194

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL >= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - - col2 col1 FROM tab0
----
164
2
66

query I rowsort
SELECT ALL + 56 * col2 AS col0 FROM tab0
----
1848
4592
56

query I rowsort
SELECT DISTINCT 63 * col0 FROM tab1
----
189
4032
5040

query I rowsort
SELECT DISTINCT + + 60 AS col0 FROM tab2 AS cor0
----
60

query I rowsort
SELECT ALL - col2 * col0 + + cor0.col0 + - col0 * - col1 * - 19 FROM tab2 AS cor0
----
-28440
-4305
-89388

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col2 col2 FROM tab0, tab1 cor0, tab1, tab2 AS cor1
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT - 60 * + col1 FROM tab2
----
-1020
-1860
-3540

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9360
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-9360
SELECT DISTINCT CAST ( NULL AS REAL ) AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
NULL

query I rowsort
SELECT ALL - 60 * + col0 + 54 FROM tab1
----
-126
-3786
-4746

query I rowsort
SELECT DISTINCT - 78 FROM tab0 AS cor0
----
-78

query I rowsort
SELECT + - col2 * - cor0.col2 AS col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - + ( col2 ) * col2 + 43 AS col2 FROM tab0 AS cor0
----
-1046
-6681
42

query I rowsort
SELECT DISTINCT - 82 FROM tab2 AS cor0
----
-82

query I rowsort
SELECT ALL ( + col2 ) AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + col0 + cor0.col1 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - + col2 - col1 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT + - col0 + - col2 AS col2 FROM tab0 AS cor0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col0 + + col1 ) * + col0 col1 FROM tab0
----
-16020
-2640
-4620

query I rowsort
SELECT ( - col2 ) + - ( - col1 ) * - col1 AS col1 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT DISTINCT - 0 + - col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + col0 + col0 * + col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT - + cor0.col0 * + cor0.col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9376
SELECT DISTINCT - cor0.col2 DIV + 76 + + 56 AS col2 FROM tab2 cor0
----
56

skipif mysql # not compatible
query I rowsort label-9376
SELECT DISTINCT - cor0.col2 / + 76 + + 56 AS col2 FROM tab2 cor0
----
56

query I rowsort
SELECT DISTINCT + col0 * + col2 + + col2 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-9378
SELECT DISTINCT + col0 DIV + ( + cor0.col0 * + cor0.col2 ) FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-9378
SELECT DISTINCT + col0 / + ( + cor0.col0 * + cor0.col2 ) FROM tab1 cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9379
SELECT DISTINCT + cor1.col2 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab0, tab2 AS cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-9379
SELECT DISTINCT + cor1.col2 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab0, tab2 AS cor2
----
NULL

query I rowsort
SELECT DISTINCT col0 + - col1 * - col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT - ( - col2 ) * cor0.col2 + col2 + - col2 * + cor0.col2 * - 93 FROM tab1 AS cor0
----
274158
305463
866400

query I rowsort
SELECT DISTINCT - + ( - 99 ) * col0 AS col0 FROM tab0 AS cor0
----
2376
3465
8811

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9383
SELECT col0 * ( + col1 ) + + CAST( NULL AS SIGNED ) / col2 + + col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9383
SELECT col0 * ( + col1 ) + + CAST ( NULL AS INTEGER ) / col2 + + col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + 95 + - 47 AS col1 FROM tab0
----
48
48
48

query I rowsort
SELECT DISTINCT 11 + col2 * + col0 AS col1 FROM tab2
----
200
2039
3013

query I rowsort
SELECT DISTINCT + col0 - + ( col2 + + ( col2 ) ) AS col2 FROM tab1 AS cor0
----
-105
-112
-50

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT - ( 18 ) * col2 + cor0.col0 AS col1 FROM tab2 AS cor0
----
-390
-479
-605

onlyif mysql # use DIV operator for integer division
query I rowsort label-9389
SELECT DISTINCT + col1 DIV col2 col2 FROM tab0 cor0
----
1
2
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9389
SELECT DISTINCT + col1 / col2 col2 FROM tab0 cor0
----
1
2
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9390
SELECT + col1 * - col0 + - col0 DIV + col1 FROM tab2 AS cor0
----
-1347
-217
-4603

skipif mysql # not compatible
query I rowsort label-9390
SELECT + col1 * - col0 + - col0 / + col1 FROM tab2 AS cor0
----
-1347
-217
-4603

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9391
SELECT DISTINCT - CAST( + col0 AS SIGNED ) FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-9391
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort
SELECT + col0 + + cor0.col1 * col1 + CAST ( col2 AS REAL ) FROM tab1 cor0
----
221
345
733

query I rowsort
SELECT ALL - 18 * 46 * col2 AS col1 FROM tab0 cor0
----
-27324
-67896
-828

query I rowsort
SELECT ALL ( + col1 ) + - 97 + - col2 * + col2 FROM tab1 AS cor0
----
-2987
-3336
-9300

query I rowsort
SELECT ALL + 72 AS col1 FROM tab1 cor0
----
72
72
72

query I rowsort
SELECT - - col0 * - col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - col2 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col0 + ( col2 ) col1 FROM tab1 AS cor0
----
-108
-3591
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 4 * + cor0.col1 + col2 col2 FROM tab0 AS cor0
----
377
389
446

query I rowsort
SELECT tab0.col2 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT - - 47 - + col0 FROM tab0 AS cor0
----
-42
12
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-9402
SELECT ALL col0 DIV - col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9402
SELECT ALL col0 / - col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col1 + col0 + col0 AS col0 FROM tab0 AS cor0
----
134
167
269

query I rowsort
SELECT DISTINCT + ( col2 ) * col0 * col1 + col0 FROM tab1 AS cor0
----
36544
4215
99920

query I rowsort
SELECT - - col2 * col2 AS col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT + 83 * cor0.col1 AS col2 FROM tab1 AS cor0
----
1079
2158
830

query I rowsort
SELECT DISTINCT + cor0.col0 - col2 * + ( - col2 ) FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT DISTINCT tab2.col1 * + ( - col1 ) + + 49 FROM tab2
----
-240
-3432
-912

query I rowsort
SELECT col2 * col2 * tab0.col1 FROM tab0
----
611884
93654
97

query I rowsort
SELECT col1 * col1 AS col0 FROM tab1
----
100
169
676

query I rowsort
SELECT + col2 + + 21 + col0 FROM tab1
----
142
197
78

query I rowsort
SELECT cor1.col0 AS col1 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT col0 + 5 FROM tab1
----
69
8
85

query I rowsort
SELECT DISTINCT - col2 * 40 FROM tab0 AS cor0
----
-1320
-3280
-40

query I rowsort
SELECT - 26 FROM tab1, tab1 AS cor0
----
9 values hashing to 47d0574274146de273829785364ada39

query I rowsort
SELECT ALL + col2 * - 59 AS col1 FROM tab2 AS cor0
----
-1534
-1593
-2242

onlyif mysql # use DIV operator for integer division
query I rowsort label-9417
SELECT DISTINCT - 47 DIV cor0.col2 AS col0 FROM tab2, tab1 cor0, tab1 AS cor1
----
0

skipif mysql # not compatible
query I rowsort label-9417
SELECT DISTINCT - 47 / cor0.col2 AS col0 FROM tab2, tab1 cor0, tab1 AS cor1
----
0

query I rowsort
SELECT + col2 * + ( + 50 ) FROM tab1 AS cor0
----
2700
2850
4800

query I rowsort
SELECT ALL + + cor0.col1 AS col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + - col0 * - col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + col1 + - col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT + - 9 * + 59 + + col1 AS col0 FROM tab0 AS cor0
----
-434
-440
-445

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9423
SELECT CAST( NULL AS SIGNED ) + col1 * col1 + - col2 * + ( + col0 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9423
SELECT CAST ( NULL AS INTEGER ) + col1 * col1 + - col2 * + ( + col0 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 - col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - - 59 AS col1 FROM tab2 AS cor0
----
59
59
59

query I rowsort
SELECT + col1 + - col0 * - col2 FROM tab1 AS cor0
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + 64 + col0 * col2 * tab1.col2 col0 FROM tab1
----
203840
732160
8556

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab0 cor0, tab2 AS cor1
----
972 values hashing to 42e69ecdafb3c81046bc5cb4c98b1666

query I rowsort
SELECT DISTINCT - tab1.col2 * col1 + - 79 FROM tab1
----
-1327
-1483
-649

query I rowsort
SELECT - tab2.col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col0 col0 FROM tab2
----
14
156
158

query I rowsort
SELECT DISTINCT - col0 + - col1 * col0 + tab1.col1 FROM tab1
----
-1107
-55
-694

query I rowsort
SELECT ALL + 61 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

query I rowsort
SELECT DISTINCT col1 * 0 + col1 AS col2 FROM tab2
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + - col2 * ( - cor0.col0 ) col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - ( + col0 ) + col0 * cor0.col0 + + col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT col0 * + col0 FROM tab1 cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-9438
SELECT ALL + - col0 DIV cor0.col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-9438
SELECT ALL + - col0 / cor0.col1 FROM tab2 AS cor0
----
-1
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9439
SELECT ALL - - 73 + cor0.col2 + + col0 DIV 28 col1 FROM tab1 AS cor0
----
127
132
171

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9439
SELECT ALL - - 73 + cor0.col2 + + col0 / 28 col1 FROM tab1 AS cor0
----
127
132
171

query I rowsort
SELECT - + col2 * + col0 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col0 col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + - col1 * - col1 + cor0.col2 FROM tab0 cor0
----
7429
8363
9410

query I rowsort
SELECT ALL - + col2 + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + col2 + col2 + ( 0 + + col0 ) * - col1 AS col0 FROM tab0 cor0
----
-1998
-3393
-7935

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * cor0.col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9446
SELECT DISTINCT + col1 + + cor0.col2 * CAST( - 50 AS SIGNED ) FROM tab2 AS cor0
----
-1241
-1319
-1883

skipif mysql # not compatible
query I rowsort label-9446
SELECT DISTINCT + col1 + + cor0.col2 * CAST ( - 50 AS INTEGER ) FROM tab2 AS cor0
----
-1241
-1319
-1883

query I rowsort
SELECT + col1 + 60 FROM tab0
----
146
151
157

query I rowsort
SELECT ALL - col2 + - 85 + + col2 FROM tab2
----
-85
-85
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - col2 * + tab0.col0 col2 FROM tab0
----
-132
-7389
-878

query I rowsort
SELECT + col1 + - tab0.col2 AS col0 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT + 44 FROM tab0 AS cor0
----
44

query I rowsort
SELECT DISTINCT - 41 FROM tab2 cor0
----
-41

query I rowsort
SELECT + 18 + - col0 AS col2 FROM tab2 AS cor0
----
-60
-61
11

query I rowsort
SELECT ALL + + 83 FROM tab1 AS cor0
----
83
83
83

query I rowsort
SELECT - col2 + ( col1 ) * - col0 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT - col2 * + col2 AS col0 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT tab1.col1 * col2 * col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT 17 * col0 * ( col0 * col0 ) AS col1 FROM tab2
----
5831
8067384
8381663

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9459
SELECT + - col0 / + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9459
SELECT + - col0 / + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 + col2 * + col2 AS col1 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT ALL - col0 + col0 * - 45 AS col2 FROM tab2 AS cor0
----
-322
-3588
-3634

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9462
SELECT + col2 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9462
SELECT + col2 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

query I rowsort
SELECT DISTINCT + 84 FROM tab2, tab1 AS cor0
----
84

query I rowsort
SELECT ALL 38 * tab0.col1 + col1 FROM tab0
----
3354
3549
3783

query I rowsort
SELECT + 81 + - ( col2 ) AS col2 FROM tab0 AS cor0
----
-1
48
80

query I rowsort
SELECT DISTINCT + ( col0 ) * col2 + - 89 * col0 FROM tab1 AS cor0
----
-105
-2048
560

query I rowsort
SELECT ALL + 12 * + cor0.col1 + - col2 FROM tab0 AS cor0
----
1010
1163
999

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - ( 34 ) FROM tab1 cor0
----
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9471
SELECT DISTINCT - - ( col0 ) * col1 / + CAST( NULL AS SIGNED ) + col0 + + col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9471
SELECT DISTINCT - - ( col0 ) * col1 / + CAST ( NULL AS INTEGER ) + col0 + + col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - col2 * + ( cor0.col2 ) AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9473
SELECT DISTINCT - CAST( ( + cor0.col2 ) AS SIGNED ) * + ( - col0 ) AS col2 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-9473
SELECT DISTINCT - CAST ( ( + cor0.col2 ) AS INTEGER ) * + ( - col0 ) AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - + 6 AS col2 FROM tab0 cor0
----
-6
-6
-6

query I rowsort
SELECT + - col1 + - col0 AS col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + col0 * + col0 + + col2 AS col1 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT + + col0 + - col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL - col1 * col0 + 77 * + col2 AS col2 FROM tab2 AS cor0
----
-2600
1583
1862

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9479
SELECT ALL ( + cor0.col1 ) / cor0.col2 + - CAST( NULL AS SIGNED ) AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-9479
SELECT ALL ( + cor0.col1 ) / cor0.col2 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col2 col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + - col0 * + col1 AS col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - tab1.col0 AS col2 FROM tab1, tab1 AS cor0, tab0 cor1
----
-3
-64
-80

query I rowsort
SELECT 92 FROM tab1 AS cor0
----
92
92
92

query I rowsort
SELECT + ( + col0 ) * col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - col0 * cor0.col0 * - col2 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT 24 * 98 AS col2 FROM tab2
----
2352

query I rowsort
SELECT + col0 * cor0.col2 * cor0.col1 AS col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT col2 + - 5 * col2 FROM tab0 cor0
----
-132
-328
-4

query I rowsort
SELECT DISTINCT + + col0 + - 14 * - col2 AS col0 FROM tab0 AS cor0
----
1237
486
49

query I rowsort
SELECT ALL + col2 * 0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 27 * col2 FROM tab1 cor0
----
1458
1539
2592

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9492
SELECT + CAST( NULL AS SIGNED ) + + col1 * col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9492
SELECT + CAST ( NULL AS INTEGER ) + + col1 * col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + ( + 81 ) * cor0.col2 FROM tab0 AS cor0
----
-2673
-6642
-81

query I rowsort
SELECT ALL + - 77 AS col0 FROM tab0 AS cor0
----
-77
-77
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9495
SELECT DISTINCT col0 * - ( cor0.col2 ) + CAST( NULL AS SIGNED ) / + cor0.col1 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9495
SELECT DISTINCT col0 * - ( cor0.col2 ) + CAST ( NULL AS INTEGER ) / + cor0.col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT - col2 + - col0 AS col0 FROM tab2 cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT + 70 * + col2 AS col0 FROM tab1 cor0
----
3780
3990
6720

query I rowsort
SELECT ALL + ( col0 ) * + col1 FROM tab2
----
1343
217
4602

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

query I rowsort
SELECT ALL - 82 AS col0 FROM tab0 AS cor0
----
-82
-82
-82

query I rowsort
SELECT + ( + cor1.col1 ) AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT ALL + 65 + col0 FROM tab2 AS cor0
----
143
144
72

query I rowsort
SELECT DISTINCT 60 FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
60

query I rowsort
SELECT DISTINCT col2 * + col2 * col2 FROM tab1
----
157464
185193
884736

query I rowsort
SELECT ALL + col2 * - 17 + + col0 FROM tab2 AS cor0
----
-364
-452
-567

query I rowsort
SELECT DISTINCT - col0 * - col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - 28 * col0 FROM tab2
----
-196
-2184
-2212

query I rowsort
SELECT DISTINCT 86 * + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
1462
2666
5074

query I rowsort
SELECT cor0.col2 FROM tab0, tab2, tab0 cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT tab0.col1 FROM tab0, tab1, tab1 cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - col2 * + 48 AS col0 FROM tab2 AS cor0
----
-1248
-1296
-1824

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col1 - col2 col0 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT ALL col0 * - col1 + + 41 * col2 AS col2 FROM tab0
----
-3354
-4737
-711

query I rowsort
SELECT DISTINCT - col2 + + col2 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * tab2.col1 col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT col0 + 6 AS col1 FROM tab0
----
30
41
95

query I rowsort
SELECT - col2 + + 23 FROM tab2 cor0
----
-15
-3
-4

query I rowsort
SELECT + - col2 + + 15 AS col2 FROM tab1 AS cor0
----
-39
-42
-81

query I rowsort
SELECT + col2 + - 43 AS col1 FROM tab1
----
11
14
53

query I rowsort
SELECT - col0 * - col2 - col1 AS col0 FROM tab1
----
136
3638
7667

query I rowsort
SELECT DISTINCT 11 + col1 FROM tab1 AS cor0
----
21
24
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9522
SELECT - CAST( + col0 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-9522
SELECT - CAST ( + col0 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL - col1 + - 29 FROM tab2
----
-46
-60
-88

query I rowsort
SELECT - - col2 + 32 FROM tab2 AS cor0
----
58
59
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9525
SELECT - col0 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9525
SELECT - col0 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9526
SELECT ALL col2 * + CAST( NULL AS DECIMAL ) * + col1 + - tab2.col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9526
SELECT ALL col2 * + CAST ( NULL AS REAL ) * + col1 + - tab2.col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9527
SELECT ALL col0 DIV 82 + + cor0.col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-9527
SELECT ALL col0 / 82 + + cor0.col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT 9 * + col2 * + col0 FROM tab2
----
1701
18252
27018

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col1 ) * col0 col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + 63 * col0 col0 FROM tab2 AS cor0
----
468
4940
5015

query I rowsort
SELECT ALL + - 93 + - cor0.col2 * col0 + + ( col2 * col2 ) FROM tab2 AS cor0
----
-1445
-1651
447

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 39 + col2 * + cor0.col1 col0 FROM tab1 AS cor0
----
1209
1365
531

query I rowsort
SELECT DISTINCT + col0 * cor0.col2 - col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT 38 + + col1 AS col2 FROM tab0
----
124
129
135

query I rowsort
SELECT 68 + col1 AS col2 FROM tab0 AS cor0
----
154
159
165

query I rowsort
SELECT DISTINCT ( col2 ) + col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL col0 * col2 + 26 AS col0 FROM tab2 AS cor0
----
2054
215
3028

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab0, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + col1 + + 78 FROM tab1 AS cor0
----
104
88
91

query I rowsort
SELECT DISTINCT col2 + ( col0 ) AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - col2 + 42 AS col0 FROM tab1 AS cor0
----
-12
-15
-54

query I rowsort
SELECT - + col1 + - col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL col2 * ( + cor0.col2 + + col1 ) AS col1 FROM tab1 AS cor0
----
10464
3819
4320

query I rowsort
SELECT DISTINCT + cor0.col0 * 41 * + col2 + col0 FROM tab2 AS cor0
----
123161
7756
83226

query I rowsort
SELECT col1 * + 8 FROM tab1 AS cor0
----
104
208
80

query I rowsort
SELECT ALL col2 - ( col2 + col0 ) AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col1 + + ( - col2 + - cor0.col1 ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + col2 - col2 * ( cor0.col2 ) AS col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT + col2 * ( + col1 ) + + col1 AS col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT col1 * col1 + + 88 AS col2 FROM tab1 AS cor0
----
188
257
764

onlyif mysql # use DIV operator for integer division
query I rowsort label-9552
SELECT col1 + ( - col2 ) DIV col1 AS col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-9552
SELECT col1 + ( - col2 ) / col1 AS col0 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9553
SELECT ALL cor0.col1 / + CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9553
SELECT ALL cor0.col1 / + CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 25 FROM tab2
----
25

query I rowsort
SELECT + 81 FROM tab0
----
81
81
81

query I rowsort
SELECT ALL + col2 + + 34 AS col1 FROM tab1 cor0
----
130
88
91

query I rowsort
SELECT DISTINCT + + cor0.col2 - - col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - + col1 * 27 AS col0 FROM tab1 AS cor0
----
-270
-351
-702

query I rowsort
SELECT DISTINCT col0 * ( col1 ) AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + - col1 * ( + cor0.col2 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - cor0.col2 * 69 FROM tab0 AS cor0
----
-2277
-5658
-69

onlyif mysql # use DIV operator for integer division
query I rowsort label-9562
SELECT + col1 DIV col0 col1 FROM tab0 AS cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9562
SELECT + col1 / col0 col1 FROM tab0 AS cor0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-9563
SELECT ALL - col1 DIV col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-9563
SELECT ALL - col1 / col0 FROM tab2
----
-4
0
0

query I rowsort
SELECT + 73 FROM tab1, tab1 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT DISTINCT 33 * - col1 FROM tab0
----
-2838
-3003
-3201

query I rowsort
SELECT - col0 * + col0 * - col1 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ( col0 ) FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL + 62 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
186
3968
4960

query I rowsort
SELECT - tab0.col0 + 44 * - col1 * tab0.col0 FROM tab0
----
-149415
-356445
-90840

query I rowsort
SELECT DISTINCT - col2 * col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + + col1 * col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + 7 FROM tab1
----
7

query I rowsort
SELECT - 81 FROM tab0 AS cor0
----
-81
-81
-81

query I rowsort
SELECT + col0 * - col0 + - ( col2 ) * 40 * + ( - col1 * 24 ) AS col0 FROM tab0 AS cor0
----
2723904
7155599
91895

query I rowsort
SELECT DISTINCT - col0 * - col2 * cor0.col0 + + col1 * col1 * 36 FROM tab2 AS cor0
----
247562
283500
35919

query I rowsort
SELECT + col1 * 55 * col1 AS col0 FROM tab2
----
15895
191455
52855

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + - col0 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 * + col0 AS col1 FROM tab0 cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-9579
SELECT - col1 * - ( cor0.col0 ) + + col0 DIV col2 AS col2 FROM tab1 AS cor0
----
1040
641
78

skipif mysql # not compatible
query I rowsort label-9579
SELECT - col1 * - ( cor0.col0 ) + + col0 / col2 AS col2 FROM tab1 AS cor0
----
1040
641
78

query I rowsort
SELECT + col0 + + col0 * 56 FROM tab0 AS cor0
----
1368
1995
5073

query I rowsort
SELECT ALL + cor0.col1 * + col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL cor0.col1 * cor0.col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL col1 + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - col2 * 8 * col2 AS col2 FROM tab1 AS cor0
----
-23328
-25992
-73728

query I rowsort
SELECT 91 AS col0 FROM tab2 cor0
----
91
91
91

query I rowsort
SELECT DISTINCT - + 20 AS col2 FROM tab2 AS cor0
----
-20

onlyif mysql # use DIV operator for integer division
query I rowsort label-9587
SELECT ALL + col2 + 81 DIV + col1 FROM tab2 AS cor0
----
27
29
42

skipif mysql # not compatible
query I rowsort label-9587
SELECT ALL + col2 + 81 / + col1 FROM tab2 AS cor0
----
27
29
42

query I rowsort
SELECT ALL + tab2.col0 * ( - col2 ) + col0 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT - ( + 2 ) + + cor0.col1 * + col0 * - col2 FROM tab0 AS cor0
----
-3397
-664120
-68114

query I rowsort
SELECT + cor1.col2 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-9591
SELECT + 27 DIV + 9 + + col1 * 63 FROM tab0 AS cor0
----
5421
5736
6114

skipif mysql # not compatible
query I rowsort label-9591
SELECT + 27 / + 9 + + col1 * 63 FROM tab0 AS cor0
----
5421
5736
6114

query I rowsort
SELECT - col2 + + col1 AS col2 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT ALL col2 + + 95 * - col1 AS col1 FROM tab0
----
-8137
-8563
-9214

onlyif mysql # use DIV operator for integer division
query I rowsort label-9594
SELECT + col2 * + col1 + col0 DIV - ( ( + col2 ) ) col2 FROM tab0 AS cor0
----
2838
62
7461

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9594
SELECT + col2 * + col1 + col0 / - ( ( + col2 ) ) col2 FROM tab0 AS cor0
----
2838
62
7461

query I rowsort
SELECT ALL - cor0.col0 * col0 * 6 + - col1 * + col0 AS col1 FROM tab2 AS cor0
----
-38789
-41106
-511

query I rowsort
SELECT 50 AS col0 FROM tab1 AS cor0
----
50
50
50

query I rowsort
SELECT DISTINCT - col0 - - col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL - 92 FROM tab1
----
-92
-92
-92

query I rowsort
SELECT - + 97 FROM tab2 cor0
----
-97
-97
-97

query I rowsort
SELECT ALL cor0.col2 - + cor0.col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + col1 * + col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT - - col0 * - col0 + col1 * col0 - - ( 66 ) * + col0 AS col0 FROM tab1 AS cor0
----
-80
267
768

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9603
SELECT - - col2 + - CAST( col1 + cor0.col1 AS SIGNED ) FROM tab2 AS cor0
----
-35
-92
4

skipif mysql # not compatible
query I rowsort label-9603
SELECT - - col2 + - CAST ( col1 + cor0.col1 AS INTEGER ) FROM tab2 AS cor0
----
-35
-92
4

query I rowsort
SELECT + col0 - + col1 * col1 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT + + col1 + col1 * cor0.col2 AS col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + + col0 * - col2 + - col1 * - col1 AS col1 FROM tab2 AS cor0
----
-2713
1453
772

query I rowsort
SELECT DISTINCT + 17 FROM tab2
----
17

query I rowsort
SELECT tab0.col2 + - col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL + tab1.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT - 25 * - col1 FROM tab1
----
250
325
650

query I rowsort
SELECT 21 FROM tab1, tab0 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

query I rowsort
SELECT + col2 * + col1 + col1 * col0 FROM tab1 AS cor0
----
1210
1482
2288

query I rowsort
SELECT col2 * + 12 + 12 * cor0.col1 AS col1 FROM tab0 AS cor0
----
1176
1428
2076

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 cor1
----
243 values hashing to 4fe4780e49e612b93957f575d9b3e89f

query I rowsort
SELECT + col2 * col2 AS col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT + col2 * + 87 FROM tab1
----
4698
4959
8352

query I rowsort
SELECT col0 - + col1 * + tab2.col0 FROM tab2
----
-1264
-210
-4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) + + 9 col0 FROM tab0
----
33
44
98

query I rowsort
SELECT DISTINCT + col2 + col1 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-9621
SELECT ALL 37 + - cor0.col1 DIV - 82 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to c023509f63faa044d654943e6df55ca2

skipif mysql # not compatible
query I rowsort label-9621
SELECT ALL 37 + - cor0.col1 / - 82 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT ALL col1 * col0 AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT - 53 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
-53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9624
SELECT + ( + cor0.col1 ) + CAST( - col1 AS SIGNED ) AS col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9624
SELECT + ( + cor0.col1 ) + CAST ( - col1 AS INTEGER ) AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT 14 * + col2 + 43 AS col2 FROM tab0
----
1191
505
57

query I rowsort
SELECT + col0 + + col0 * col2 + - 63 * + col0 AS col2 FROM tab2
----
-1896
-245
-2808

query I rowsort
SELECT + col1 + - col2 * + col1 * - col2 + col1 AS col2 FROM tab2 cor0
----
22661
24582
40002

query I rowsort
SELECT DISTINCT - - col2 + - ( - col0 ) * + col2 AS col1 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT col2 + + 50 AS col2 FROM tab2 AS cor0
----
76
77
88

query I rowsort
SELECT + - col2 * + 66 + 21 * + col2 * 69 AS col1 FROM tab0 AS cor0
----
113406
1383
45639

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9631
SELECT DISTINCT - - col1 * col1 * col1 + + col2 * + CAST( - col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
635264
746273
912638

skipif mysql # not compatible
query I rowsort label-9631
SELECT DISTINCT - - col1 * col1 * col1 + + col2 * + CAST ( - col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
635264
746273
912638

query I rowsort
SELECT ALL + + cor0.col1 + col1 AS col2 FROM tab0 AS cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 * col2 col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT - col1 + col0 + col0 * col2 AS col1 FROM tab2 cor0
----
165
2047
3064

query I rowsort
SELECT - col0 * - col2 + - col2 + col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL - - col0 + 76 * - col0 * cor0.col0 FROM tab2 AS cor0
----
-3717
-462306
-474237

query I rowsort
SELECT DISTINCT - col0 * - col1 - col0 AS col0 FROM tab0 AS cor0
----
2040
3360
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col0 col1 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT cor0.col1 + + CAST ( col0 AS REAL ) + - col0 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - ( + col2 ) col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT - cor0.col2 * - col1 AS col1 FROM tab2 cor0
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9642
SELECT ALL + + col2 * - col1 + col2 + col0 / CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9642
SELECT ALL + + col2 * - col1 + col2 + col0 / CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col1 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + col0 + + ( - col2 * col0 + + cor0.col2 ) FROM tab2 AS cor0
----
-155
-1924
-2885

query I rowsort
SELECT DISTINCT + - col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT + cor0.col1 * col2 + - col0 AS col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT - col2 + cor0.col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ( - col0 ) * + cor0.col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + tab1.col1 * - col2 + col0 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT + 68 AS col0 FROM tab0
----
68
68
68

query I rowsort
SELECT + - 33 FROM tab1 AS cor0
----
-33
-33
-33

query I rowsort
SELECT ALL + - 97 * + col1 AS col2 FROM tab1 AS cor0
----
-1261
-2522
-970

query I rowsort
SELECT - col2 * 23 * + col2 AS col1 FROM tab2 AS cor0
----
-15548
-16767
-33212

query I rowsort
SELECT ALL - ( 51 ) * + col0 AS col0 FROM tab1 AS cor0
----
-153
-3264
-4080

query I rowsort
SELECT DISTINCT - 40 FROM tab1 AS cor0
----
-40

query I rowsort
SELECT DISTINCT col1 + 81 AS col0 FROM tab1 AS cor0
----
107
91
94

query I rowsort
SELECT ALL + col1 * + col1 + + col1 AS col2 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT - ( cor0.col0 ) * - col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + - col0 * cor0.col2 + + col1 AS col0 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT + 36 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9661
SELECT DISTINCT + + col1 + - cor0.col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9661
SELECT DISTINCT + + col1 + - cor0.col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + 56 FROM tab2 cor0
----
56
56
56

query I rowsort
SELECT ALL - - 92 + col0 AS col1 FROM tab1 AS cor0
----
156
172
95

query I rowsort
SELECT - col0 * + col1 + 73 FROM tab0 AS cor0
----
-1991
-3322
-8026

query I rowsort
SELECT DISTINCT - 56 + col1 AS col2 FROM tab2 AS cor0
----
-25
-39
3

query I rowsort
SELECT DISTINCT + col1 * col2 - - col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT 85 + - cor0.col0 AS col1 FROM tab2 AS cor0
----
6
7
78

query I rowsort
SELECT col0 - cor0.col1 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-9669
SELECT + col0 DIV tab2.col1 AS col2 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-9669
SELECT + col0 / tab2.col1 AS col2 FROM tab2
----
0
1
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9670
SELECT ALL CAST( col1 AS SIGNED ) * + tab2.col2 FROM tab2
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-9670
SELECT ALL CAST ( col1 AS INTEGER ) * + tab2.col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT col2 - col0 * - col0 AS col1 FROM tab1 AS cor0
----
4153
63
6496

onlyif mysql # use DIV operator for integer division
query I rowsort label-9672
SELECT ALL - + col0 DIV + col2 AS col2 FROM tab0 cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-9672
SELECT ALL - + col0 / + col2 AS col2 FROM tab0 cor0
----
-1
-35
0

query I rowsort
SELECT + - 6 * - col0 * cor0.col2 AS col0 FROM tab0 AS cor0
----
210
43788
4752

query I rowsort
SELECT ALL - + col0 * col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + col2 + + col1 * col0 FROM tab0 cor0
----
2097
3396
8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9676
SELECT ALL + col2 * - cor0.col2 * - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9676
SELECT ALL + col2 * - cor0.col2 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col0 * col1 + col0 AS col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT 87 * col0 AS col1 FROM tab1 AS cor0
----
261
5568
6960

query I rowsort
SELECT DISTINCT - + 76 FROM tab0 AS cor0
----
-76

query I rowsort
SELECT ALL col0 * - col2 * cor0.col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT - col2 + cor0.col1 * + col1 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT + 27 AS col1 FROM tab1 AS cor0
----
27
27
27

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + + col2 * cor0.col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - 33 * - col1 FROM tab1 AS cor0
----
330
429
858

query I rowsort
SELECT - 94 AS col2 FROM tab0
----
-94
-94
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-9687
SELECT DISTINCT col1 DIV + col0 AS col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-9687
SELECT DISTINCT col1 / + col0 AS col0 FROM tab0
----
1
2
3

query I rowsort
SELECT ALL 7 AS col2 FROM tab0
----
7
7
7

query I rowsort
SELECT DISTINCT - 43 * col1 AS col0 FROM tab0 AS cor0
----
-3698
-3913
-4171

onlyif mysql # use DIV operator for integer division
query I rowsort label-9690
SELECT DISTINCT - col1 DIV - col0 FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-9690
SELECT DISTINCT - col1 / - col0 FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT - col2 + col1 * col0 FROM tab1 AS cor0
----
24
583
944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + col2 + + col0 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9694
SELECT 96 * col1 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9694
SELECT 96 * col1 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9695
SELECT DISTINCT + - col1 + - col2 * CAST( + col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-1461
-735
-760

skipif mysql # not compatible
query I rowsort label-9695
SELECT DISTINCT + - col1 + - col2 * CAST ( + col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT ALL 80 + col2 * + 24 * 1 AS col1 FROM tab2
----
704
728
992

onlyif mysql # use DIV operator for integer division
query I rowsort label-9697
SELECT DISTINCT col0 DIV col0 + - 73 * + 53 + - col1 FROM tab1 AS cor0
----
-3878
-3881
-3894

skipif mysql # not compatible
query I rowsort label-9697
SELECT DISTINCT col0 / col0 + - 73 * + 53 + - col1 FROM tab1 AS cor0
----
-3878
-3881
-3894

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL 75 FROM tab1, tab0 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT - + 43 * - col1 AS col0 FROM tab2 cor0
----
1333
2537
731

query I rowsort
SELECT ALL - cor0.col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT DISTINCT - 16 FROM tab1, tab0 AS cor0
----
-16

query I rowsort
SELECT ALL - 10 * - col2 AS col2 FROM tab0
----
10
330
820

query I rowsort
SELECT ALL + col1 * - tab1.col0 AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT + + ( + ( col2 ) ) + + col0 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - ( col2 ) + - col2 * col0 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT ALL - col1 + + 18 AS col2 FROM tab2 cor0
----
-13
-41
1

query I rowsort
SELECT + cor0.col2 * ( - col0 ) FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 + cor0.col1 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 700d3688811feb56539f64a9600f824f

query I rowsort
SELECT + - 42 + + 30 * col1 AS col0 FROM tab1 AS cor0
----
258
348
738

query I rowsort
SELECT DISTINCT - + ( - ( + col0 ) ) FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT ALL 73 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
1752
2555
6497

query I rowsort
SELECT ALL + ( - ( - tab1.col2 ) * col1 ) AS col2 FROM tab1
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9714
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col1 FROM tab2, tab1, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9714
SELECT DISTINCT CAST ( NULL AS REAL ) AS col1 FROM tab2, tab1, tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9715
SELECT col2 * 61 DIV col2 AS col1 FROM tab0 AS cor0
----
61
61
61

skipif mysql # not compatible
query I rowsort label-9715
SELECT col2 * 61 / col2 AS col1 FROM tab0 AS cor0
----
61
61
61

query I rowsort
SELECT DISTINCT - col1 * 96 AS col1 FROM tab1 AS cor0
----
-1248
-2496
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-9717
SELECT DISTINCT 27 DIV col2 FROM tab0 AS cor0
----
0
27

skipif mysql # not compatible
query I rowsort label-9717
SELECT DISTINCT 27 / col2 FROM tab0 AS cor0
----
0
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col0 col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT 55 * col1 * col2 AS col1 FROM tab0
----
156090
410410
5335

query I rowsort
SELECT DISTINCT + col2 * - col2 AS col2 FROM tab0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-9721
SELECT ALL col1 DIV + tab0.col2 AS col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-9721
SELECT ALL col1 / + tab0.col2 AS col2 FROM tab0
----
1
2
97

query I rowsort
SELECT DISTINCT + col2 * col1 + + col1 * - col0 AS col1 FROM tab0 AS cor0
----
-3298
-637
774

query I rowsort
SELECT + col2 + cor0.col1 AS col0 FROM tab1 AS cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + col0 col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + + cor0.col2 * + cor0.col2 + col0 * col1 * + col2 AS col1 FROM tab0 AS cor0
----
3396
670842
69201

query I rowsort
SELECT DISTINCT + col2 + - col0 AS col2 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-9727
SELECT + tab1.col2 DIV - col2 AS col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9727
SELECT + tab1.col2 / - col2 AS col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT col2 + + col1 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL - tab0.col0 * - 49 + col0 FROM tab0
----
1200
1750
4450

onlyif mysql # use DIV operator for integer division
query I rowsort label-9730
SELECT + 81 DIV - tab1.col2 + + col1 DIV + col1 col2 FROM tab1
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9730
SELECT + 81 / - tab1.col2 + + col1 / + col1 col2 FROM tab1
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9731
SELECT DISTINCT + col0 * + col0 + + tab2.col0 DIV + tab2.col1 AS col0 FROM tab2
----
49
6085
6245

skipif mysql # not compatible
query I rowsort label-9731
SELECT DISTINCT + col0 * + col0 + + tab2.col0 / + tab2.col1 AS col0 FROM tab2
----
49
6085
6245

query I rowsort
SELECT + 81 AS col2 FROM tab2
----
81
81
81

query I rowsort
SELECT ALL - ( ( - col0 ) ) * col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL 15 FROM tab2 AS cor0
----
15
15
15

query I rowsort
SELECT - + ( col2 ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + - col2 * + col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT col1 * + cor0.col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL - col0 * col0 + col0 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT DISTINCT + ( col0 ) * + col1 + col1 AS col0 FROM tab1
----
104
1053
650

query I rowsort
SELECT 34 * col1 + col1 + col2 FROM tab2
----
1112
2091
633

query I rowsort
SELECT DISTINCT 3 + + 67 FROM tab2
----
70

query I rowsort
SELECT 44 + + col0 FROM tab1 AS cor0
----
108
124
47

query I rowsort
SELECT ALL + col1 + col2 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT 54 * + col1 + col2 * - col2 FROM tab2 cor0
----
-526
2510
945

query I rowsort
SELECT ALL + col1 * - col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9746
SELECT DISTINCT 72 DIV col1 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-9746
SELECT DISTINCT 72 / col1 FROM tab0 cor0
----
0

query I rowsort
SELECT DISTINCT - 6 + + col2 * - col1 AS col0 FROM tab2 AS cor0
----
-1540
-652
-843

query I rowsort
SELECT ALL 83 + + col0 FROM tab2 AS cor0
----
161
162
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-9749
SELECT DISTINCT + cor0.col1 + - cor0.col2 DIV + col0 AS col2 FROM tab0 cor0
----
85
91
97

skipif mysql # not compatible
query I rowsort label-9749
SELECT DISTINCT + cor0.col1 + - cor0.col2 / + col0 AS col2 FROM tab0 cor0
----
85
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9750
SELECT col0 DIV col1 + - cor0.col1 FROM tab2 cor0
----
-13
-31
-58

skipif mysql # not compatible
query I rowsort label-9750
SELECT col0 / col1 + - cor0.col1 FROM tab2 cor0
----
-13
-31
-58

query I rowsort
SELECT DISTINCT + 3 * + col1 * + col2 AS col0 FROM tab1
----
1710
3744
4212

onlyif mysql # use DIV operator for integer division
query I rowsort label-9752
SELECT col1 + - col0 DIV - col1 AS col2 FROM tab2 AS cor0
----
21
31
60

skipif mysql # not compatible
query I rowsort label-9752
SELECT col1 + - col0 / - col1 AS col2 FROM tab2 AS cor0
----
21
31
60

query I rowsort
SELECT DISTINCT + - cor0.col2 * + col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - cor0.col1 * + col0 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL col1 + col1 * cor0.col1 + - col2 * + col0 FROM tab2 AS cor0
----
-2696
1512
803

query I rowsort
SELECT + 30 AS col2 FROM tab0 AS cor0
----
30
30
30

query I rowsort
SELECT ALL - col2 * + col0 + - col0 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT 99 - col2 * col0 AS col1 FROM tab2 AS cor0
----
-1929
-2903
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-9759
SELECT DISTINCT + col2 DIV col0 + - col0 * + tab2.col0 FROM tab2
----
-46
-6084
-6241

skipif mysql # not compatible
query I rowsort label-9759
SELECT DISTINCT + col2 / col0 + - col0 * + tab2.col0 FROM tab2
----
-46
-6084
-6241

query III rowsort
SELECT * FROM tab2 WHERE + col0 NOT IN ( + col0 + col2 * + col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT + tab0.col2 + col2 AS col2 FROM tab0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col2 + col0 col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT col0 + + tab0.col2 - col0 * + col0 * col2 AS col2 FROM tab0
----
-1189
-18951
-649351

query I rowsort
SELECT col2 * col1 AS col0 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9765
SELECT DISTINCT - col1 DIV tab1.col1 + - col0 FROM tab1
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-9765
SELECT DISTINCT - col1 / tab1.col1 + - col0 FROM tab1
----
-4
-65
-81

query I rowsort
SELECT DISTINCT col0 * + col2 * col0 + + col2 FROM tab0
----
1226
19041
649604

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col0 col2 FROM tab1
----
-162
-3648
-7680

query III rowsort
SELECT * FROM tab1 WHERE NOT col0 + + col2 <= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col1 * + col1 col0 FROM tab0 WHERE NOT col0 + - col1 / col0 IN ( - col0 )
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT - col2 * - col2 AS col1 FROM tab2
----
1444
676
729

query III rowsort
SELECT * FROM tab2 WHERE - col0 + col1 * col0 <> NULL
----

query III rowsort
SELECT * FROM tab2 WHERE NULL BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT col1 + + col2 * col0 + - col2 * col1 AS col1 FROM tab0
----
-1960
-73
35

query I rowsort
SELECT DISTINCT - col1 * + col0 FROM tab0
----
-2064
-3395
-8099

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL NOT BETWEEN ( - col2 * col0 * + col1 ) AND NULL
----

query I rowsort
SELECT col2 * - col0 - tab0.col0 AS col1 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT ALL + col1 + - col2 AS col1 FROM tab2
----
-21
33
4

query I rowsort
SELECT col2 * col0 * - col0 + - col2 FROM tab0 WHERE NOT NULL > ( - col2 )
----

query I rowsort
SELECT ALL + col1 * - col0 * col2 AS col0 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - col2 + + col0 AS col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL + col2 * col0 * tab0.col0 AS col2 FROM tab0
----
1225
19008
649522

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL BETWEEN ( + col2 ) AND ( NULL )
----

query I rowsort
SELECT + cor0.col2 * cor0.col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + col1 * cor0.col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT col1 * cor0.col1 + + col2 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT DISTINCT + col1 * tab0.col2 * + col2 FROM tab0
----
611884
93654
97

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL IN ( col0 )
----

query I rowsort
SELECT DISTINCT + tab0.col0 FROM tab0 AS cor0 CROSS JOIN tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9789
SELECT ALL col2 DIV - col1 AS col2 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-9789
SELECT ALL col2 / - col1 AS col2 FROM tab1
----
-2
-5
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9790
SELECT DISTINCT + col0 DIV - col2 col2 FROM tab1
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9790
SELECT DISTINCT + col0 / - col2 col2 FROM tab1
----
-1
0

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab0, tab1, tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ( 29 ) AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT 6 + - 48 * + col1 AS col1 FROM tab0 AS cor0
----
-4122
-4362
-4650

query I rowsort
SELECT ALL - 96 + + col2 FROM tab2 AS cor0
----
-58
-69
-70

query I rowsort
SELECT - 16 * + cor0.col2 + + col2 * + ( - col1 ) - col0 * col0 FROM tab0 AS cor0
----
-1338
-16695
-3942

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - ( 84 ) AS col1 FROM tab2 cor0
----
-84
-84
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-9798
SELECT ALL + cor0.col1 DIV col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9798
SELECT ALL + cor0.col1 / col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - - 42 AS col0 FROM tab0 cor0
----
42

query I rowsort
SELECT - 63 * col1 + + col2 * ( + cor0.col0 * cor0.col2 ) + cor0.col2 * + col1 AS col2 FROM tab2 AS cor0
----
113651
3987
50545

query I rowsort
SELECT ( - ( cor0.col2 ) * 94 ) AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to c4ec5f984b43d492930de349b59edd55

query I rowsort
SELECT ALL col2 - + 57 * + col0 AS col1 FROM tab0
----
-1335
-1994
-4991

query I rowsort
SELECT ALL 71 FROM tab2, tab1 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT tab2.col0 FROM tab2, tab0 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # use DIV operator for integer division
query I rowsort label-9805
SELECT + col0 + 80 - + col0 DIV + ( col0 ) AS col2 FROM tab0 AS cor0
----
103
114
168

skipif mysql # not compatible
query I rowsort label-9805
SELECT + col0 + 80 - + col0 / + ( col0 ) AS col2 FROM tab0 AS cor0
----
103
114
168

query I rowsort
SELECT col0 - - 10 AS col0 FROM tab1
----
13
74
90

query I rowsort
SELECT ALL + 18 + + 33 * col2 FROM tab0
----
1107
2724
51

query I rowsort
SELECT ALL + 20 + col2 + + col2 * col0 FROM tab1 AS cor0
----
236
3725
7796

query I rowsort
SELECT DISTINCT + 69 * col0 + col0 * 13 FROM tab2 cor0
----
574
6396
6478

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( - col2 ) col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + + 39 + - col1 FROM tab1 AS cor0
----
13
26
29

query I rowsort
SELECT DISTINCT 61 * + col1 AS col0 FROM tab2 AS cor0
----
1037
1891
3599

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 + col0 col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9814
SELECT DISTINCT + CAST( - 24 AS SIGNED ) FROM tab0 AS cor0
----
-24

skipif mysql # not compatible
query I rowsort label-9814
SELECT DISTINCT + CAST ( - 24 AS INTEGER ) FROM tab0 AS cor0
----
-24

onlyif mysql # use DIV operator for integer division
query I rowsort label-9815
SELECT col0 DIV col0 + cor0.col1 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-9815
SELECT col0 / col0 + cor0.col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT ALL 66 * 13 FROM tab0 AS cor0
----
858
858
858

query I rowsort
SELECT - col2 - col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT + ( + 70 ) + col1 FROM tab1 AS cor0
----
80
83
96

query I rowsort
SELECT col2 - + tab1.col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT - + col1 + + col2 * col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT - + col2 + col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - - 99 + col2 FROM tab1 AS cor0
----
153
156
195

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + + col1 * 12 col2 FROM tab0 cor0
----
1118
1183
1261

query I rowsort
SELECT ALL + 32 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT + - col0 + + col2 * col0 AS col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT ALL + col2 - - col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT - 47 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

query I rowsort
SELECT ALL - col2 + col1 * + col0 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT DISTINCT - - col1 + 42 * - col1 + cor0.col2 FROM tab1 AS cor0
----
-1012
-353
-437

query I rowsort
SELECT ALL + + col1 * 61 AS col2 FROM tab0 AS cor0
----
5246
5551
5917

query I rowsort
SELECT - + cor0.col1 + col0 * col2 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT DISTINCT col0 + col0 * - col1 * col1 FROM tab2 cor0
----
-22752
-271440
-6720

query I rowsort
SELECT ( 87 ) FROM tab2, tab2 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT ALL - col0 - col0 AS col2 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT - + col2 + - col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - col0 * col2 + + col0 AS col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL cor0.col2 + + ( col2 ) AS col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + 23 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9840
SELECT + col0 DIV + 61 AS col2 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9840
SELECT + col0 / + 61 AS col2 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * + col1 + col0 + - col0 * col0 col1 FROM tab1 AS cor0
----
-4132
-6489
-682

query I rowsort
SELECT DISTINCT - - col1 * 91 - - cor0.col1 * + col0 * col0 AS col1 FROM tab1 AS cor0
----
2600
41870
84383

query I rowsort
SELECT ALL - col2 * + cor0.col1 + + col0 * cor0.col2 AS col0 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT ALL col2 * - cor0.col0 AS col1 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col0 * - col1 + ( col0 ) FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 + cor0.col0 AS col2 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT - 66 AS col2 FROM tab2 AS cor0
----
-66
-66
-66

query I rowsort
SELECT ALL - + 74 - + col1 * - col2 AS col1 FROM tab2 AS cor0
----
1460
572
763

query I rowsort
SELECT - - col0 + col1 * + col2 AS col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT - - cor0.col0 * - 77 * col0 + - col0 * cor0.col1 FROM tab0 AS cor0
----
-46416
-618016
-97720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9851
SELECT ALL CAST( NULL AS DECIMAL ) * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9851
SELECT ALL CAST ( NULL AS REAL ) * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT - + ( + col1 ) + col1 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT ( 28 ) AS col0 FROM tab1, tab0 AS cor0
----
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 31 col1 FROM tab0, tab1 cor0
----
31

query I rowsort
SELECT ALL - ( + 30 ) FROM tab0, tab2 AS cor0
----
9 values hashing to 56fa25f9fb8040460fe3c894000ea8fb

query I rowsort
SELECT - col0 + - 36 FROM tab1
----
-100
-116
-39

query I rowsort
SELECT ALL + + col0 + col1 * - col0 AS col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + 21 * + col0 FROM tab0 AS cor0
----
1869
504
735

query I rowsort
SELECT ALL + col1 * + col0 * col0 AS col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT + - 85 * + col2 FROM tab1 AS cor0
----
-4590
-4845
-8160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 col0 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT cor0.col1 * col0 + + 8 AS col2 FROM tab0 AS cor0
----
2072
3403
8107

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1, tab1 cor0 CROSS JOIN tab0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - 51 * + col1 FROM tab0 AS cor0
----
-4386
-4641
-4947

query I rowsort
SELECT ALL - + col2 * + col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + ( - col1 * col2 ) AS col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT - 56 + col1 AS col1 FROM tab0
----
30
35
41

query I rowsort
SELECT - tab1.col2 + + col2 AS col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9871
SELECT DISTINCT col2 * col1 DIV col1 + - col1 FROM tab2
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-9871
SELECT DISTINCT col2 * col1 / col1 + - col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT col2 * 29 + - col0 * + col0 - - col2 FROM tab1 AS cor0
----
-2386
-3520
1611

onlyif mysql # use DIV operator for integer division
query I rowsort label-9873
SELECT DISTINCT col0 * col1 DIV + ( - 40 * col1 ) + col2 FROM tab0
----
1
33
80

skipif mysql # not compatible
query I rowsort label-9873
SELECT DISTINCT col0 * col1 / + ( - 40 * col1 ) + col2 FROM tab0
----
1
33
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9874
SELECT ALL col0 DIV - col1 col2 FROM tab2
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9874
SELECT ALL col0 / - col1 col2 FROM tab2
----
-1
-4
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9875
SELECT - cor0.col1 + col2 * CAST( + col0 + col0 AS SIGNED ) AS col1 FROM tab0 cor0
----
-27
14505
1498

skipif mysql # not compatible
query I rowsort label-9875
SELECT - cor0.col1 + col2 * CAST ( + col0 + col0 AS INTEGER ) AS col1 FROM tab0 cor0
----
-27
14505
1498

query I rowsort
SELECT - 79 * col0 + + tab1.col0 FROM tab1
----
-234
-4992
-6240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 50 + col1 col0 FROM tab0
----
36
41
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-9878
SELECT + tab0.col1 + + col2 DIV - col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-9878
SELECT + tab0.col1 + + col2 / - col1 FROM tab0
----
86
91
97

query I rowsort
SELECT cor0.col1 * + 91 FROM tab1, tab1 AS cor0
----
9 values hashing to fa76ff5729df17de4328df4ee19ee456

query I rowsort
SELECT DISTINCT - col1 + - cor0.col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT - 9 * col2 + col2 * - col2 FROM tab2 AS cor0
----
-1786
-910
-972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( col1 ) col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - col2 - - col0 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT cor0.col2 + cor0.col0 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - + cor0.col0 * cor1.col0 AS col0 FROM tab1, tab1 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to c7ef406690a98328d3ca1e38f55268c0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT col0 * col0 - col2 FROM tab1 cor0
----
-45
4039
6304

query I rowsort
SELECT - 58 AS col2 FROM tab0 AS cor0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT + col1 * - col2 - - col1 AS col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT + col1 * + col1 * + ( col0 ) - + col0 AS col2 FROM tab2 AS cor0
----
22752
271440
6720

query I rowsort
SELECT 10 * - col1 FROM tab0 cor0
----
-860
-910
-970

query I rowsort
SELECT - + 58 * col0 + col1 FROM tab1 AS cor0
----
-148
-3702
-4627

query I rowsort
SELECT + - cor0.col0 + + col1 * - col2 AS col2 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT col2 + - col0 * 96 AS col1 FROM tab1 AS cor0
----
-234
-6087
-7584

query I rowsort
SELECT - + col2 * + 26 + col2 * col0 AS col1 FROM tab2 AS cor0
----
-513
1352
2014

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 9 + col2 col1 FROM tab1 AS cor0
----
-432
-456
-768

query I rowsort
SELECT ALL + 43 FROM tab0, tab0 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 col2 FROM tab1
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9899
SELECT + - CAST( + 93 AS SIGNED ) * col0 FROM tab2 AS cor0
----
-651
-7254
-7347

skipif mysql # not compatible
query I rowsort label-9899
SELECT + - CAST ( + 93 AS INTEGER ) * col0 FROM tab2 AS cor0
----
-651
-7254
-7347

query I rowsort
SELECT DISTINCT - col1 * + col1 + col2 * - cor0.col2 + + col0 FROM tab1 AS cor0
----
-3285
-3589
-9305

query I rowsort
SELECT - 69 AS col1 FROM tab1
----
-69
-69
-69

query I rowsort
SELECT DISTINCT + 78 FROM tab1, tab1 cor0
----
78

query I rowsort
SELECT DISTINCT col1 + 72 FROM tab0
----
158
163
169

onlyif mysql # use DIV operator for integer division
query I rowsort label-9904
SELECT + 4 + 24 DIV - col1 FROM tab0
----
4
4
4

skipif mysql # not compatible
query I rowsort label-9904
SELECT + 4 + 24 / - col1 FROM tab0
----
4
4
4

query I rowsort
SELECT - cor1.col1 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT ALL ( + col0 ) + + col2 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL col0 + 67 AS col1 FROM tab1
----
131
147
70

query I rowsort
SELECT DISTINCT + col1 + + ( + col1 ) AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT + col2 * tab2.col1 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT - 95 * + col2 AS col0 FROM tab1 AS cor0
----
-5130
-5415
-9120

query I rowsort
SELECT ALL - col2 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - + 69 * col0 FROM tab2 AS cor0
----
-483
-5382
-5451

query I rowsort
SELECT col1 * 3 FROM tab1 AS cor0
----
30
39
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 86 ) col2 FROM tab1
----
-86
-86
-86

onlyif mysql # use DIV operator for integer division
query I rowsort label-9915
SELECT DISTINCT 44 DIV col2 FROM tab0
----
0
1
44

skipif mysql # not compatible
query I rowsort label-9915
SELECT DISTINCT 44 / col2 FROM tab0
----
0
1
44

query I rowsort
SELECT DISTINCT 15 FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab1, tab1 AS cor1
----
15

query I rowsort
SELECT + - col1 * col0 * col1 AS col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT 4 * + col1 FROM tab0 AS cor0
----
344
364
388

query I rowsort
SELECT ALL + ( - cor0.col0 ) FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + 77 FROM tab1, tab0 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT ALL - col0 * + col0 + col2 - - col1 FROM tab1
----
-4029
-6291
71

query I rowsort
SELECT DISTINCT - 27 FROM tab2, tab2 AS cor0
----
-27

query I rowsort
SELECT ALL + tab2.col0 + + 57 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 4fc05ff3d855499ce001206505b917f0

query I rowsort
SELECT + col1 + - 87 * - col1 AS col2 FROM tab0 AS cor0
----
7568
8008
8536

query I rowsort
SELECT + col2 * 51 FROM tab1 AS cor0
----
2754
2907
4896

query I rowsort
SELECT 41 AS col0 FROM tab0 cor0
----
41
41
41

query I rowsort
SELECT + col0 * ( + col1 + 45 ) FROM tab0 AS cor0
----
12104
3144
4970

query I rowsort
SELECT - 94 AS col0 FROM tab0 AS cor0
----
-94
-94
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9929
SELECT CAST( NULL AS SIGNED ) / - cor0.col1 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9929
SELECT CAST ( NULL AS INTEGER ) / - cor0.col1 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 17 * cor0.col2 AS col2 FROM tab0 AS cor0
----
1394
17
561

onlyif mysql # use DIV operator for integer division
query I rowsort label-9931
SELECT + 24 * - col1 DIV col1 FROM tab1 AS cor0
----
-24
-24
-24

skipif mysql # not compatible
query I rowsort label-9931
SELECT + 24 * - col1 / col1 FROM tab1 AS cor0
----
-24
-24
-24

query I rowsort
SELECT - 99 AS col2 FROM tab2 AS cor0
----
-99
-99
-99

query I rowsort
SELECT DISTINCT + cor0.col0 * 97 FROM tab1 AS cor0
----
291
6208
7760

query I rowsort
SELECT ALL + col0 + + cor0.col0 * + col1 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9935
SELECT ALL - - col1 * + CAST( NULL AS SIGNED ) * - ( col2 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9935
SELECT ALL - - col1 * + CAST ( NULL AS INTEGER ) * - ( col2 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col1 col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT - + cor0.col1 * - col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 + ( col1 ) col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT - col2 + ( col1 ) * + col0 AS col0 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT col1 - - 81 * - col1 FROM tab2
----
-1360
-2480
-4720

query I rowsort
SELECT ALL - ( + col2 ) + col1 * - 98 AS col2 FROM tab2 AS cor0
----
-1704
-3065
-5808

onlyif mysql # use DIV operator for integer division
query I rowsort label-9942
SELECT DISTINCT - 68 + - cor0.col1 DIV cor0.col1 AS col1 FROM tab2 AS cor0
----
-69

skipif mysql # not compatible
query I rowsort label-9942
SELECT DISTINCT - 68 + - cor0.col1 / cor0.col1 AS col1 FROM tab2 AS cor0
----
-69

query I rowsort
SELECT - + 30 * cor0.col2 - - col0 AS col2 FROM tab1 cor0
----
-1617
-1646
-2800

query I rowsort
SELECT ALL + ( col0 ) * + col2 * + col2 + col2 * + col0 AS col0 FROM tab0 cor0
----
26928
605734
70

query I rowsort
SELECT ALL + ( col2 ) FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + cor0.col2 * + col0 + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL - 30 * - col2 FROM tab1 AS cor0
----
1620
1710
2880

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9948
SELECT - + CAST( col0 AS SIGNED ) * - col0 - col2 * + col0 * col0 FROM tab2 AS cor0
----
-1274
-152100
-230917

skipif mysql # not compatible
query I rowsort label-9948
SELECT - + CAST ( col0 AS INTEGER ) * - col0 - col2 * + col0 * col0 FROM tab2 AS cor0
----
-1274
-152100
-230917

onlyif mysql # use DIV operator for integer division
query I rowsort label-9949
SELECT DISTINCT - 37 DIV - col0 - + col0 col0 FROM tab2 AS cor0
----
-2
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9949
SELECT DISTINCT - 37 / - col0 - + col0 col0 FROM tab2 AS cor0
----
-2
-78
-79

query I rowsort
SELECT - col2 * - 18 AS col1 FROM tab1 cor0
----
1026
1728
972

query I rowsort
SELECT ALL 29 * - 96 * col0 AS col0 FROM tab2 cor0
----
-19488
-217152
-219936

query I rowsort
SELECT DISTINCT + - col2 + - col2 AS col1 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT ALL + 35 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT DISTINCT - - ( + col2 ) * + 19 FROM tab0 cor0
----
1558
19
627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col0 col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - + 46 * col2 AS col2 FROM tab2 AS cor0
----
-1196
-1242
-1748

query I rowsort
SELECT DISTINCT col1 * col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + 66 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

onlyif mysql # use DIV operator for integer division
query I rowsort label-9959
SELECT DISTINCT cor0.col0 DIV col1 AS col0 FROM tab1 AS cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-9959
SELECT DISTINCT cor0.col0 / col1 AS col0 FROM tab1 AS cor0
----
0
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9960
SELECT DISTINCT + ( col2 ) DIV + 84 AS col1 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9960
SELECT DISTINCT + ( col2 ) / + 84 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT col1 + - col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL - 78 + - col2 * - ( - col1 ) * - col2 FROM tab1 AS cor0
----
119730
32412
75738

query I rowsort
SELECT - + ( col2 ) * + 98 FROM tab1 AS cor0
----
-5292
-5586
-9408

query I rowsort
SELECT ALL col2 + col2 * col1 AS col1 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-9965
SELECT DISTINCT cor0.col0 DIV + col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9965
SELECT DISTINCT cor0.col0 / + col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + 89 + + col0 FROM tab1 AS cor0
----
153
169
92

query I rowsort
SELECT + col2 * - col2 * ( ( col1 ) ) + - col2 + 31 FROM tab2 AS cor0
----
-22595
-24555
-39879

query I rowsort
SELECT 65 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT 43 * 4 FROM tab1
----
172
172
172

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9970
SELECT DISTINCT + + CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab2, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9970
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab2, tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - col2 + + col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL - tab1.col2 * ( tab1.col1 ) * - 2 + + col1 * col2 * - ( - col1 * - col2 ) AS col0 FROM tab1
----
-1555008
-1968408
-323760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - 84 + tab0.col2 col1 FROM tab0
----
-2739
-6806
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-9974
SELECT DISTINCT 80 DIV tab2.col0 AS col1 FROM tab2
----
1
11

skipif mysql # not compatible
query I rowsort label-9974
SELECT DISTINCT 80 / tab2.col0 AS col1 FROM tab2
----
1
11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9975
SELECT ALL + CAST( - tab2.col1 AS SIGNED ) AS col1 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-9975
SELECT ALL + CAST ( - tab2.col1 AS INTEGER ) AS col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT ALL tab2.col0 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL 55 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT - col2 * col2 + col2 * 25 AS col2 FROM tab0 AS cor0
----
-264
-4674
24

query I rowsort
SELECT DISTINCT + 39 * col1 + + col2 * + 36 + col1 FROM tab1 AS cor0
----
2452
2984
3976

query I rowsort
SELECT - 4 * + col2 FROM tab2 AS cor0
----
-104
-108
-152

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 - - col1 + cor0.col2 + + 57 AS col1 FROM tab0 AS cor0
----
155
176
230

query I rowsort
SELECT ALL 51 * - 63 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to a4e057d7f3f076f5816c8ea1266defb2

query I rowsort
SELECT tab1.col2 + col0 AS col1 FROM tab1
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 67 col1 FROM tab2
----
67
67
67

query I rowsort
SELECT DISTINCT col1 + + col0 * - col0 * - ( + col0 ) FROM tab1
----
262154
512013
53

query I rowsort
SELECT ALL + 40 + - col2 FROM tab2
----
13
14
2

query I rowsort
SELECT + col0 * - tab0.col1 + ( + col0 * col2 ) FROM tab0
----
-1272
-3360
-801

onlyif mysql # use DIV operator for integer division
query I rowsort label-9989
SELECT DISTINCT col2 + col2 DIV ( 87 * - col2 ) + col0 DIV col0 AS col1 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-9989
SELECT DISTINCT col2 + col2 / ( 87 * - col2 ) + col0 / col0 AS col1 FROM tab0
----
2
34
83

query I rowsort
SELECT ALL + 80 FROM tab0, tab2, tab1 cor0
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT DISTINCT - cor0.col0 * col2 * + 18 + 29 + - col1 * + 50 AS col0 FROM tab0 AS cor0
----
-135885
-18527
-5451

query I rowsort
SELECT - ( col0 ) + col0 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT - 10 AS col2 FROM tab1
----
-10
-10
-10

query I rowsort
SELECT + - col1 * + ( col1 ) AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT - + col2 * + 32 FROM tab0 AS cor0
----
-1056
-2624
-32

query I rowsort
SELECT ALL + + col0 * - ( 17 ) + col2 AS col2 FROM tab2 cor0
----
-1300
-1305
-92

query I rowsort
SELECT - col1 * + ( - col1 ) AS col2 FROM tab1 AS cor0
----
100
169
676